From owner-svn-src-all@freebsd.org Sun Jan 29 00:05:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 354A0CBB213; Sun, 29 Jan 2017 00:05:51 +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 F1F2F1C45; Sun, 29 Jan 2017 00:05:50 +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 v0T05oBh059457; Sun, 29 Jan 2017 00:05:50 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0T05nbo059451; Sun, 29 Jan 2017 00:05:49 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201701290005.v0T05nbo059451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 29 Jan 2017 00:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312939 - in head/sys/dev: mmc sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 00:05:51 -0000 Author: marius Date: Sun Jan 29 00:05:49 2017 New Revision: 312939 URL: https://svnweb.freebsd.org/changeset/base/312939 Log: Fix overly long lines, whitespace and other bugs according to style(9). Modified: head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmcsd.c head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h head/sys/dev/sdhci/sdhci_acpi.c head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sat Jan 28 23:58:17 2017 (r312938) +++ head/sys/dev/mmc/mmc.c Sun Jan 29 00:05:49 2017 (r312939) @@ -259,7 +259,7 @@ mmc_suspend(device_t dev) err = bus_generic_suspend(dev); if (err) - return (err); + return (err); mmc_power_down(sc); return (0); } @@ -980,10 +980,14 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); - csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; - csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; - csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; - csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; + csd->vdd_r_curr_min = + cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; + csd->vdd_r_curr_max = + cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; + csd->vdd_w_curr_min = + cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; + csd->vdd_w_curr_max = + cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; m = mmc_get_bits(raw_csd, 128, 62, 12); e = mmc_get_bits(raw_csd, 128, 47, 3); csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; @@ -1008,8 +1012,8 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); - csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + 1) * - 512 * 1024; + csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + + 1) * 512 * 1024; csd->erase_blk_en = mmc_get_bits(raw_csd, 128, 46, 1); csd->erase_sector = mmc_get_bits(raw_csd, 128, 39, 7) + 1; csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 7); @@ -1307,18 +1311,21 @@ mmc_discover_cards(struct mmc_softc *sc) break; } newcard = 1; - if ((err = device_get_children(sc->dev, &devlist, &devcount)) != 0) + if ((err = device_get_children(sc->dev, &devlist, + &devcount)) != 0) return; for (i = 0; i < devcount; i++) { ivar = device_get_ivars(devlist[i]); - if (memcmp(ivar->raw_cid, raw_cid, sizeof(raw_cid)) == 0) { + if (memcmp(ivar->raw_cid, raw_cid, sizeof(raw_cid)) == + 0) { newcard = 0; break; } } free(devlist, M_TEMP); if (bootverbose || mmc_debug) { - device_printf(sc->dev, "%sard detected (CID %08x%08x%08x%08x)\n", + device_printf(sc->dev, + "%sard detected (CID %08x%08x%08x%08x)\n", newcard ? "New c" : "C", raw_cid[0], raw_cid[1], raw_cid[2], raw_cid[3]); } @@ -1370,7 +1377,7 @@ mmc_discover_cards(struct mmc_softc *sc) mmc_app_decode_scr(ivar->raw_scr, &ivar->scr); /* Get card switch capabilities (command class 10). */ if ((ivar->scr.sda_vsn >= 1) && - (ivar->csd.ccc & (1<<10))) { + (ivar->csd.ccc & (1 << 10))) { mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, SD_SWITCH_GROUP1, SD_SWITCH_NOCHANGE, switch_res); @@ -1537,7 +1544,8 @@ mmc_rescan_cards(struct mmc_softc *sc) ivar = device_get_ivars(devlist[i]); if (mmc_select_card(sc, ivar->rca)) { if (bootverbose || mmc_debug) - device_printf(sc->dev, "Card at relative address %d lost.\n", + device_printf(sc->dev, + "Card at relative address %d lost.\n", ivar->rca); device_delete_child(sc->dev, devlist[i]); free(ivar, M_DEVBUF); @@ -1559,7 +1567,8 @@ mmc_delete_cards(struct mmc_softc *sc) for (i = 0; i < devcount; i++) { ivar = device_get_ivars(devlist[i]); if (bootverbose || mmc_debug) - device_printf(sc->dev, "Card at relative address %d deleted.\n", + device_printf(sc->dev, + "Card at relative address %d deleted.\n", ivar->rca); device_delete_child(sc->dev, devlist[i]); free(ivar, M_DEVBUF); @@ -1589,7 +1598,8 @@ mmc_go_discovery(struct mmc_softc *sc) mmc_idle_cards(sc); err = mmc_send_if_cond(sc, 1); if ((bootverbose || mmc_debug) && err == 0) - device_printf(sc->dev, "SD 2.0 interface conditions: OK\n"); + device_printf(sc->dev, + "SD 2.0 interface conditions: OK\n"); if (mmc_send_app_op_cond(sc, 0, &ocr) != MMC_ERR_NONE) { if (bootverbose || mmc_debug) device_printf(sc->dev, "SD probe: failed\n"); @@ -1599,13 +1609,15 @@ mmc_go_discovery(struct mmc_softc *sc) mmcbr_set_mode(dev, mode_mmc); if (mmc_send_op_cond(sc, 0, &ocr) != MMC_ERR_NONE) { if (bootverbose || mmc_debug) - device_printf(sc->dev, "MMC probe: failed\n"); + device_printf(sc->dev, + "MMC probe: failed\n"); ocr = 0; /* Failed both, powerdown. */ } else if (bootverbose || mmc_debug) device_printf(sc->dev, "MMC probe: OK (OCR: 0x%08x)\n", ocr); } else if (bootverbose || mmc_debug) - device_printf(sc->dev, "SD probe: OK (OCR: 0x%08x)\n", ocr); + device_printf(sc->dev, "SD probe: OK (OCR: 0x%08x)\n", + ocr); sc->squelched--; mmcbr_set_ocr(dev, mmc_select_vdd(sc, ocr)); @@ -1622,7 +1634,8 @@ mmc_go_discovery(struct mmc_softc *sc) * one card on the bus. */ if (bootverbose || mmc_debug) - device_printf(sc->dev, "Current OCR: 0x%08x\n", mmcbr_get_ocr(dev)); + device_printf(sc->dev, "Current OCR: 0x%08x\n", + mmcbr_get_ocr(dev)); if (mmcbr_get_ocr(dev) == 0) { device_printf(sc->dev, "No compatible cards found on bus\n"); mmc_delete_cards(sc); @@ -1760,6 +1773,7 @@ mmc_read_ivar(device_t bus, device_t chi static int mmc_write_ivar(device_t bus, device_t child, int which, uintptr_t value) { + /* * None are writable ATM */ Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Sat Jan 28 23:58:17 2017 (r312938) +++ head/sys/dev/mmc/mmcsd.c Sun Jan 29 00:05:49 2017 (r312939) @@ -113,7 +113,7 @@ static int mmcsd_probe(device_t dev); /* disk routines */ static int mmcsd_close(struct disk *dp); static int mmcsd_dump(void *arg, void *virtual, vm_offset_t physical, - off_t offset, size_t length); + off_t offset, size_t length); static int mmcsd_open(struct disk *dp); static void mmcsd_strategy(struct bio *bp); static void mmcsd_task(void *arg); @@ -122,14 +122,14 @@ static int mmcsd_bus_bit_width(device_t static daddr_t mmcsd_delete(struct mmcsd_softc *sc, struct bio *bp); static daddr_t mmcsd_rw(struct mmcsd_softc *sc, struct bio *bp); -#define MMCSD_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define MMCSD_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define MMCSD_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define MMCSD_LOCK_INIT(_sc) \ +#define MMCSD_LOCK_INIT(_sc) \ mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ "mmcsd", MTX_DEF) -#define MMCSD_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#define MMCSD_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#define MMCSD_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +#define MMCSD_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); +#define MMCSD_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); +#define MMCSD_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); static int mmcsd_probe(device_t dev) @@ -208,7 +208,7 @@ mmcsd_attach(device_t dev) sc->running = 1; sc->suspend = 0; sc->eblock = sc->eend = 0; - kproc_create(&mmcsd_task, sc, &sc->p, 0, 0, "%s: mmc/sd card", + kproc_create(&mmcsd_task, sc, &sc->p, 0, 0, "%s: mmc/sd card", device_get_nameunit(dev)); return (0); @@ -311,6 +311,7 @@ mmcsd_strategy(struct bio *bp) static const char * mmcsd_errmsg(int e) { + if (e < 0 || e > MMC_ERR_MAX) return "Bad error code"; return errmsg[e]; @@ -325,17 +326,18 @@ mmcsd_rw(struct mmcsd_softc *sc, struct struct mmc_request req; struct mmc_data data; device_t dev = sc->dev; - int sz = sc->disk->d_sectorsize; + int numblocks, sz; device_t mmcbr = device_get_parent(dev); + char *vaddr; block = bp->bio_pblkno; + sz = sc->disk->d_sectorsize; end = bp->bio_pblkno + (bp->bio_bcount / sz); while (block < end) { - char *vaddr = bp->bio_data + - (block - bp->bio_pblkno) * sz; - int numblocks = min(end - block, mmc_get_max_data(dev)); + vaddr = bp->bio_data + (block - bp->bio_pblkno) * sz; + numblocks = min(end - block, mmc_get_max_data(dev)); memset(&req, 0, sizeof(req)); - memset(&cmd, 0, sizeof(cmd)); + memset(&cmd, 0, sizeof(cmd)); memset(&stop, 0, sizeof(stop)); memset(&data, 0, sizeof(data)); cmd.mrq = &req; @@ -373,10 +375,11 @@ mmcsd_rw(struct mmcsd_softc *sc, struct } MMCBUS_WAIT_FOR_REQUEST(mmcbr, dev, &req); if (req.cmd->error != MMC_ERR_NONE) { - if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { + if (ppsratecheck(&sc->log_time, &sc->log_count, + LOG_PPS)) device_printf(dev, "Error indicated: %d %s\n", - req.cmd->error, mmcsd_errmsg(req.cmd->error)); - } + req.cmd->error, + mmcsd_errmsg(req.cmd->error)); break; } block += numblocks; @@ -407,7 +410,7 @@ mmcsd_delete(struct mmcsd_softc *sc, str start = block + erase_sector - 1; /* Round up. */ start -= start % erase_sector; stop = end; /* Round down. */ - stop -= end % erase_sector; + stop -= end % erase_sector; /* We can't erase area smaller then sector, store it for later. */ if (start >= stop) { sc->eblock = block; @@ -475,8 +478,8 @@ mmcsd_delete(struct mmcsd_softc *sc, str } static int -mmcsd_dump(void *arg, void *virtual, vm_offset_t physical, - off_t offset, size_t length) +mmcsd_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, + size_t length) { struct disk *disk = arg; struct mmcsd_softc *sc = (struct mmcsd_softc *)disk->d_drv1; Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sat Jan 28 23:58:17 2017 (r312938) +++ head/sys/dev/sdhci/sdhci.c Sun Jan 29 00:05:49 2017 (r312939) @@ -96,8 +96,10 @@ static void sdhci_card_task(void *, int) /* * Broadcom BCM577xx Controller Constants */ -#define BCM577XX_DEFAULT_MAX_DIVIDER 256 /* Maximum divider supported by the default clock source. */ -#define BCM577XX_ALT_CLOCK_BASE 63000000 /* Alternative clock's base frequency. */ +/* Maximum divider supported by the default clock source. */ +#define BCM577XX_DEFAULT_MAX_DIVIDER 256 +/* Alternative clock's base frequency. */ +#define BCM577XX_ALT_CLOCK_BASE 63000000 #define BCM577XX_HOST_CONTROL 0x198 #define BCM577XX_CTRL_CLKSEL_MASK 0xFFFFCFFF @@ -122,7 +124,7 @@ slot_printf(struct sdhci_slot *slot, con va_list ap; int retval; - retval = printf("%s-slot%d: ", + retval = printf("%s-slot%d: ", device_get_nameunit(slot->bus), slot->num); va_start(ap, fmt); @@ -266,20 +268,25 @@ sdhci_set_clock(struct sdhci_slot *slot, /* If no clock requested - left it so. */ if (clock == 0) return; - + /* Determine the clock base frequency */ clk_base = slot->max_clk; if (slot->quirks & SDHCI_QUIRK_BCM577XX_400KHZ_CLKSRC) { - clk_sel = RD2(slot, BCM577XX_HOST_CONTROL) & BCM577XX_CTRL_CLKSEL_MASK; + clk_sel = RD2(slot, BCM577XX_HOST_CONTROL) & + BCM577XX_CTRL_CLKSEL_MASK; - /* Select clock source appropriate for the requested frequency. */ + /* + * Select clock source appropriate for the requested frequency. + */ if ((clk_base / BCM577XX_DEFAULT_MAX_DIVIDER) > clock) { clk_base = BCM577XX_ALT_CLOCK_BASE; - clk_sel |= (BCM577XX_CTRL_CLKSEL_64MHZ << BCM577XX_CTRL_CLKSEL_SHIFT); + clk_sel |= (BCM577XX_CTRL_CLKSEL_64MHZ << + BCM577XX_CTRL_CLKSEL_SHIFT); } else { - clk_sel |= (BCM577XX_CTRL_CLKSEL_DEFAULT << BCM577XX_CTRL_CLKSEL_SHIFT); + clk_sel |= (BCM577XX_CTRL_CLKSEL_DEFAULT << + BCM577XX_CTRL_CLKSEL_SHIFT); } - + WR2(slot, BCM577XX_HOST_CONTROL, clk_sel); } @@ -303,8 +310,8 @@ sdhci_set_clock(struct sdhci_slot *slot, if (clock >= clk_base) div = 0; else { - for (div = 2; div < SDHCI_300_MAX_DIVIDER; div += 2) { - if ((clk_base / div) <= clock) + for (div = 2; div < SDHCI_300_MAX_DIVIDER; div += 2) { + if ((clk_base / div) <= clock) break; } } @@ -312,7 +319,7 @@ sdhci_set_clock(struct sdhci_slot *slot, } if (bootverbose || sdhci_debug) - slot_printf(slot, "Divider %d for freq %d (base %d)\n", + slot_printf(slot, "Divider %d for freq %d (base %d)\n", div, clock, clk_base); /* Now we have got divider, set it. */ @@ -329,7 +336,7 @@ sdhci_set_clock(struct sdhci_slot *slot, while (!((clk = RD2(slot, SDHCI_CLOCK_CONTROL)) & SDHCI_CLOCK_INT_STABLE)) { if (timeout == 0) { - slot_printf(slot, + slot_printf(slot, "Internal clock never stabilised.\n"); sdhci_dumpregs(slot); return; @@ -555,7 +562,7 @@ sdhci_handle_card_present(struct sdhci_s SDHCI_UNLOCK(slot); } -static void +static void sdhci_card_poll(void *arg) { struct sdhci_slot *slot = arg; @@ -565,7 +572,7 @@ sdhci_card_poll(void *arg) 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) { @@ -611,7 +618,7 @@ sdhci_init_slot(device_t dev, struct sdh /* Initialize slot. */ sdhci_init(slot); - slot->version = (RD2(slot, SDHCI_HOST_VERSION) + slot->version = (RD2(slot, SDHCI_HOST_VERSION) >> SDHCI_SPEC_VER_SHIFT) & SDHCI_SPEC_VER_MASK; if (slot->quirks & SDHCI_QUIRK_MISSING_CAPS) caps = slot->caps; @@ -621,7 +628,7 @@ sdhci_init_slot(device_t dev, struct sdh if (slot->version >= SDHCI_SPEC_300) freq = (caps & SDHCI_CLOCK_V3_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; - else + else freq = (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; if (freq != 0) @@ -634,7 +641,8 @@ sdhci_init_slot(device_t dev, struct sdh if (slot->max_clk == 0) { slot->max_clk = SDHCI_DEFAULT_MAX_FREQ * 1000000; device_printf(dev, "Hardware doesn't specify base clock " - "frequency, using %dMHz as default.\n", SDHCI_DEFAULT_MAX_FREQ); + "frequency, using %dMHz as default.\n", + SDHCI_DEFAULT_MAX_FREQ); } /* Calculate/set timeout clock frequency. */ if (slot->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) { @@ -642,8 +650,8 @@ sdhci_init_slot(device_t dev, struct sdh } 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; + slot->timeout_clk = (caps & SDHCI_TIMEOUT_CLK_MASK) >> + SDHCI_TIMEOUT_CLK_SHIFT; if (caps & SDHCI_TIMEOUT_CLK_UNIT) slot->timeout_clk *= 1000; } @@ -687,7 +695,7 @@ sdhci_init_slot(device_t dev, struct sdh if (slot->quirks & SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE) slot->opt |= SDHCI_NON_REMOVABLE; - /* + /* * Use platform-provided transfer backend * with PIO as a fallback mechanism */ @@ -825,7 +833,7 @@ sdhci_generic_update_ios(device_t brdev, } else { panic("Invalid bus width: %d", ios->bus_width); } - if (ios->timing == bus_timing_hs && + if (ios->timing == bus_timing_hs && !(slot->quirks & SDHCI_QUIRK_DONT_SET_HISPD_BIT)) slot->hostctrl |= SDHCI_CTRL_HISPD; else @@ -839,7 +847,7 @@ sdhci_generic_update_ios(device_t brdev, return (0); } -static void +static void sdhci_req_done(struct sdhci_slot *slot) { struct mmc_request *req; @@ -852,8 +860,8 @@ sdhci_req_done(struct sdhci_slot *slot) req->done(req); } } - -static void + +static void sdhci_timeout(void *arg) { struct sdhci_slot *slot = arg; @@ -868,7 +876,7 @@ sdhci_timeout(void *arg) slot_printf(slot, " Spurious timeout - no active command\n"); } } - + static void sdhci_set_transfer_mode(struct sdhci_slot *slot, struct mmc_data *data) @@ -970,7 +978,7 @@ sdhci_start_command(struct sdhci_slot *s flags |= SDHCI_CMD_TYPE_ABORT; /* Prepare data. */ sdhci_start_data(slot, cmd->data); - /* + /* * Interrupt aggregation: To reduce total number of interrupts * group response interrupt with data interrupt when possible. * If there going to be data interrupt, mask response one. @@ -994,6 +1002,8 @@ static void sdhci_finish_command(struct sdhci_slot *slot) { int i; + uint32_t val; + uint8_t extra; slot->cmd_done = 1; /* Interrupt aggregation: Restore command interrupt. @@ -1011,13 +1021,14 @@ sdhci_finish_command(struct sdhci_slot * if (slot->curcmd->flags & MMC_RSP_PRESENT) { if (slot->curcmd->flags & MMC_RSP_136) { /* CRC is stripped so we need one byte shift. */ - uint8_t extra = 0; + extra = 0; for (i = 0; i < 4; i++) { - uint32_t val = RD4(slot, SDHCI_RESPONSE + i * 4); - if (slot->quirks & SDHCI_QUIRK_DONT_SHIFT_RESPONSE) + val = RD4(slot, SDHCI_RESPONSE + i * 4); + if (slot->quirks & + SDHCI_QUIRK_DONT_SHIFT_RESPONSE) slot->curcmd->resp[3 - i] = val; else { - slot->curcmd->resp[3 - i] = + slot->curcmd->resp[3 - i] = (val << 8) | extra; extra = val >> 24; } @@ -1056,7 +1067,7 @@ sdhci_start_data(struct sdhci_slot *slot current_timeout <<= 1; } /* Compensate for an off-by-one error in the CaFe chip.*/ - if (div < 0xE && + if (div < 0xE && (slot->quirks & SDHCI_QUIRK_INCR_TIMEOUT_CONTROL)) { ++div; } @@ -1080,13 +1091,13 @@ sdhci_start_data(struct sdhci_slot *slot /* Load DMA buffer. */ if (slot->flags & SDHCI_USE_DMA) { if (data->flags & MMC_DATA_READ) - bus_dmamap_sync(slot->dmatag, slot->dmamap, + bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_PREREAD); else { memcpy(slot->dmamem, data->data, - (data->len < DMA_BLOCK_SIZE) ? + (data->len < DMA_BLOCK_SIZE) ? data->len : DMA_BLOCK_SIZE); - bus_dmamap_sync(slot->dmatag, slot->dmamap, + bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_PREWRITE); } WR4(slot, SDHCI_DMA_ADDRESS, slot->paddr); @@ -1101,8 +1112,8 @@ sdhci_start_data(struct sdhci_slot *slot /* Current data offset for both PIO and DMA. */ slot->offset = 0; /* Set block size and request IRQ on 4K border. */ - WR2(slot, SDHCI_BLOCK_SIZE, - SDHCI_MAKE_BLKSZ(DMA_BOUNDARY, (data->len < 512)?data->len:512)); + WR2(slot, SDHCI_BLOCK_SIZE, SDHCI_MAKE_BLKSZ(DMA_BOUNDARY, + (data->len < 512) ? data->len : 512)); /* Set block count. */ WR2(slot, SDHCI_BLOCK_COUNT, (data->len + 511) / 512); } @@ -1123,12 +1134,12 @@ sdhci_finish_data(struct sdhci_slot *slo if (!slot->data_done && (slot->flags & SDHCI_USE_DMA)) { if (data->flags & MMC_DATA_READ) { size_t left = data->len - slot->offset; - bus_dmamap_sync(slot->dmatag, slot->dmamap, + bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_POSTREAD); memcpy((u_char*)data->data + slot->offset, slot->dmamem, - (left < DMA_BLOCK_SIZE)?left:DMA_BLOCK_SIZE); + (left < DMA_BLOCK_SIZE) ? left : DMA_BLOCK_SIZE); } else - bus_dmamap_sync(slot->dmatag, slot->dmamap, + bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_POSTWRITE); } slot->data_done = 1; @@ -1187,9 +1198,10 @@ sdhci_generic_request(device_t brdev, de return (EBUSY); } if (sdhci_debug > 1) { - slot_printf(slot, "CMD%u arg %#x flags %#x dlen %u dflags %#x\n", - req->cmd->opcode, req->cmd->arg, req->cmd->flags, - (req->cmd->data)?(u_int)req->cmd->data->len:0, + slot_printf(slot, + "CMD%u arg %#x flags %#x dlen %u dflags %#x\n", + req->cmd->opcode, req->cmd->arg, req->cmd->flags, + (req->cmd->data)?(u_int)req->cmd->data->len:0, (req->cmd->data)?req->cmd->data->flags:0); } slot->req = req; @@ -1270,6 +1282,8 @@ sdhci_cmd_irq(struct sdhci_slot *slot, u static void sdhci_data_irq(struct sdhci_slot *slot, uint32_t intmask) { + struct mmc_data *data; + size_t left; if (!slot->curcmd) { slot_printf(slot, "Got data interrupt 0x%08x, but " @@ -1304,17 +1318,17 @@ sdhci_data_irq(struct sdhci_slot *slot, /* Handle PIO interrupt. */ if (intmask & (SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL)) { - if ((slot->opt & SDHCI_PLATFORM_TRANSFER) && + if ((slot->opt & SDHCI_PLATFORM_TRANSFER) && SDHCI_PLATFORM_WILL_HANDLE(slot->bus, slot)) { - SDHCI_PLATFORM_START_TRANSFER(slot->bus, slot, &intmask); + SDHCI_PLATFORM_START_TRANSFER(slot->bus, slot, + &intmask); slot->flags |= PLATFORM_DATA_STARTED; } else sdhci_transfer_pio(slot); } /* Handle DMA border. */ if (intmask & SDHCI_INT_DMA_END) { - struct mmc_data *data = slot->curcmd->data; - size_t left; + data = slot->curcmd->data; /* Unload DMA buffer... */ left = data->len - slot->offset; @@ -1322,7 +1336,7 @@ sdhci_data_irq(struct sdhci_slot *slot, bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_POSTREAD); memcpy((u_char*)data->data + slot->offset, slot->dmamem, - (left < DMA_BLOCK_SIZE)?left:DMA_BLOCK_SIZE); + (left < DMA_BLOCK_SIZE) ? left : DMA_BLOCK_SIZE); } else { bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_POSTWRITE); @@ -1335,7 +1349,7 @@ sdhci_data_irq(struct sdhci_slot *slot, BUS_DMASYNC_PREREAD); } else { memcpy(slot->dmamem, (u_char*)data->data + slot->offset, - (left < DMA_BLOCK_SIZE)?left:DMA_BLOCK_SIZE); + (left < DMA_BLOCK_SIZE)? left : DMA_BLOCK_SIZE); bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_PREWRITE); } @@ -1363,7 +1377,6 @@ done: SDHCI_PLATFORM_FINISH_TRANSFER(slot->bus, slot); } else sdhci_finish_data(slot); - return; } } @@ -1371,7 +1384,7 @@ static void sdhci_acmd_irq(struct sdhci_slot *slot) { uint16_t err; - + err = RD4(slot, SDHCI_ACMD12_ERR); if (!slot->curcmd) { slot_printf(slot, "Got AutoCMD12 error 0x%04x, but " @@ -1387,7 +1400,7 @@ void sdhci_generic_intr(struct sdhci_slot *slot) { uint32_t intmask, present; - + SDHCI_LOCK(slot); /* Read slot interrupt status. */ intmask = RD4(slot, SDHCI_INT_STATUS); @@ -1407,7 +1420,7 @@ sdhci_generic_intr(struct sdhci_slot *sl SDHCI_INT_CARD_INSERT; WR4(slot, SDHCI_INT_ENABLE, slot->intmask); WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - WR4(slot, SDHCI_INT_STATUS, intmask & + WR4(slot, SDHCI_INT_STATUS, intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)); sdhci_handle_card_present_locked(slot, present); intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE); @@ -1446,12 +1459,13 @@ sdhci_generic_intr(struct sdhci_slot *sl intmask); sdhci_dumpregs(slot); } - + SDHCI_UNLOCK(slot); } int -sdhci_generic_read_ivar(device_t bus, device_t child, int which, uintptr_t *result) +sdhci_generic_read_ivar(device_t bus, device_t child, int which, + uintptr_t *result) { struct sdhci_slot *slot = device_get_ivars(child); @@ -1505,7 +1519,8 @@ sdhci_generic_read_ivar(device_t bus, de } int -sdhci_generic_write_ivar(device_t bus, device_t child, int which, uintptr_t value) +sdhci_generic_write_ivar(device_t bus, device_t child, int which, + uintptr_t value) { struct sdhci_slot *slot = device_get_ivars(child); Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sat Jan 28 23:58:17 2017 (r312938) +++ head/sys/dev/sdhci/sdhci.h Sun Jan 29 00:05:49 2017 (r312939) @@ -130,7 +130,7 @@ #define SDHCI_STATE_DAT_MASK 0x00f00000 #define SDHCI_STATE_CMD 0x01000000 -#define SDHCI_HOST_CONTROL 0x28 +#define SDHCI_HOST_CONTROL 0x28 #define SDHCI_CTRL_LED 0x01 #define SDHCI_CTRL_4BITBUS 0x02 #define SDHCI_CTRL_HISPD 0x04 @@ -204,7 +204,7 @@ #define SDHCI_INT_NORMAL_MASK 0x00007FFF #define SDHCI_INT_ERROR_MASK 0xFFFF8000 -#define SDHCI_INT_CMD_ERROR_MASK (SDHCI_INT_TIMEOUT | \ +#define SDHCI_INT_CMD_ERROR_MASK (SDHCI_INT_TIMEOUT | \ SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX) #define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_CMD_ERROR_MASK) @@ -288,19 +288,19 @@ struct sdhci_slot { int timeout; /* Transfer timeout */ uint32_t max_clk; /* Max possible freq */ uint32_t timeout_clk; /* Timeout freq */ - bus_dma_tag_t dmatag; - bus_dmamap_t dmamap; + bus_dma_tag_t dmatag; + bus_dmamap_t dmamap; u_char *dmamem; bus_addr_t paddr; /* DMA buffer address */ struct task card_task; /* Card presence check task */ - struct timeout_task + 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 */ struct mmc_command *curcmd; /* Current command of current request */ - + uint32_t intmask; /* Current interrupt mask */ uint32_t clock; /* Current clock freq. */ size_t offset; /* Data buffer offset */ @@ -313,12 +313,14 @@ struct sdhci_slot { #define CMD_STARTED 1 #define STOP_STARTED 2 #define SDHCI_USE_DMA 4 /* Use DMA for this req. */ -#define PLATFORM_DATA_STARTED 8 /* Data transfer is handled by platform */ +#define PLATFORM_DATA_STARTED 8 /* Data xfer is handled by platform */ struct mtx mtx; /* Slot mutex */ }; -int sdhci_generic_read_ivar(device_t bus, device_t child, int which, uintptr_t *result); -int sdhci_generic_write_ivar(device_t bus, device_t child, int which, uintptr_t value); +int sdhci_generic_read_ivar(device_t bus, device_t child, int which, + uintptr_t *result); +int sdhci_generic_write_ivar(device_t bus, device_t child, int which, + uintptr_t value); int sdhci_init_slot(device_t dev, struct sdhci_slot *slot, int num); void sdhci_start_slot(struct sdhci_slot *slot); /* performs generic clean-up for platform transfers */ @@ -327,7 +329,8 @@ int sdhci_cleanup_slot(struct sdhci_slot int sdhci_generic_suspend(struct sdhci_slot *slot); int sdhci_generic_resume(struct sdhci_slot *slot); int sdhci_generic_update_ios(device_t brdev, device_t reqdev); -int sdhci_generic_request(device_t brdev, device_t reqdev, struct mmc_request *req); +int sdhci_generic_request(device_t brdev, device_t reqdev, + struct mmc_request *req); int sdhci_generic_get_ro(device_t brdev, device_t reqdev); int sdhci_generic_acquire_host(device_t brdev, device_t reqdev); int sdhci_generic_release_host(device_t brdev, device_t reqdev); Modified: head/sys/dev/sdhci/sdhci_acpi.c ============================================================================== --- head/sys/dev/sdhci/sdhci_acpi.c Sat Jan 28 23:58:17 2017 (r312938) +++ head/sys/dev/sdhci/sdhci_acpi.c Sun Jan 29 00:05:49 2017 (r312939) @@ -77,7 +77,7 @@ static char *sdhci_ids[] = { struct sdhci_acpi_softc { u_int quirks; /* Chip specific quirks */ struct resource *irq_res; /* IRQ resource */ - void *intrhand; /* Interrupt handle */ + void *intrhand; /* Interrupt handle */ struct sdhci_slot slot; struct resource *mem_res; /* Memory resource */ @@ -97,7 +97,8 @@ sdhci_acpi_read_1(device_t dev, struct s } static void -sdhci_acpi_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint8_t val) +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); @@ -117,7 +118,8 @@ sdhci_acpi_read_2(device_t dev, struct s } static void -sdhci_acpi_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint16_t val) +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); @@ -137,7 +139,8 @@ sdhci_acpi_read_4(device_t dev, struct s } static void -sdhci_acpi_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint32_t val) +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); @@ -237,7 +240,7 @@ sdhci_acpi_attach(device_t dev) sdhci_acpi_detach(dev); return (ENOMEM); } - + sc->slot.quirks = sc->quirks; err = sdhci_init_slot(dev, &sc->slot, 0); @@ -337,9 +340,9 @@ static device_method_t sdhci_methods[] = 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_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), Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Sat Jan 28 23:58:17 2017 (r312938) +++ head/sys/dev/sdhci/sdhci_pci.c Sun Jan 29 00:05:49 2017 (r312939) @@ -81,28 +81,28 @@ static const struct sdhci_device { const char *desc; u_int quirks; } sdhci_devices[] = { - { 0x08221180, 0xffff, "RICOH R5C822 SD", + { 0x08221180, 0xffff, "RICOH R5C822 SD", SDHCI_QUIRK_FORCE_DMA }, - { 0xe8221180, 0xffff, "RICOH R5CE822 SD", + { 0xe8221180, 0xffff, "RICOH R5CE822 SD", SDHCI_QUIRK_FORCE_DMA | SDHCI_QUIRK_LOWER_FREQUENCY }, - { 0xe8231180, 0xffff, "RICOH R5CE823 SD", + { 0xe8231180, 0xffff, "RICOH R5CE823 SD", SDHCI_QUIRK_LOWER_FREQUENCY }, - { 0x8034104c, 0xffff, "TI XX21/XX11 SD", + { 0x8034104c, 0xffff, "TI XX21/XX11 SD", SDHCI_QUIRK_FORCE_DMA }, - { 0x05501524, 0xffff, "ENE CB712 SD", + { 0x05501524, 0xffff, "ENE CB712 SD", SDHCI_QUIRK_BROKEN_TIMINGS }, - { 0x05511524, 0xffff, "ENE CB712 SD 2", + { 0x05511524, 0xffff, "ENE CB712 SD 2", SDHCI_QUIRK_BROKEN_TIMINGS }, - { 0x07501524, 0xffff, "ENE CB714 SD", + { 0x07501524, 0xffff, "ENE CB714 SD", SDHCI_QUIRK_RESET_ON_IOS | SDHCI_QUIRK_BROKEN_TIMINGS }, - { 0x07511524, 0xffff, "ENE CB714 SD 2", + { 0x07511524, 0xffff, "ENE CB714 SD 2", SDHCI_QUIRK_RESET_ON_IOS | SDHCI_QUIRK_BROKEN_TIMINGS }, - { 0x410111ab, 0xffff, "Marvell CaFe SD", + { 0x410111ab, 0xffff, "Marvell CaFe SD", SDHCI_QUIRK_INCR_TIMEOUT_CONTROL }, - { 0x2381197B, 0xffff, "JMicron JMB38X SD", + { 0x2381197B, 0xffff, "JMicron JMB38X SD", SDHCI_QUIRK_32BIT_DMA_SIZE | SDHCI_QUIRK_RESET_AFTER_REQUEST }, { 0x16bc14e4, 0xffff, "Broadcom BCM577xx SDXC/MMC Card Reader", @@ -127,7 +127,7 @@ static const struct sdhci_device { struct sdhci_pci_softc { u_int quirks; /* Chip specific quirks */ struct resource *irq_res; /* IRQ resource */ - void *intrhand; /* Interrupt handle */ + void *intrhand; /* Interrupt handle */ int num_slots; /* Number of slots on this controller */ struct sdhci_slot slots[6]; @@ -151,7 +151,8 @@ sdhci_pci_read_1(device_t dev, struct sd } static void -sdhci_pci_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint8_t val) +sdhci_pci_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off, + uint8_t val) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -171,7 +172,8 @@ sdhci_pci_read_2(device_t dev, struct sd } static void -sdhci_pci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint16_t val) +sdhci_pci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, + uint16_t val) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -191,7 +193,8 @@ sdhci_pci_read_4(device_t dev, struct sd } static void -sdhci_pci_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint32_t val) +sdhci_pci_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off, + uint32_t val) { struct sdhci_pci_softc *sc = device_get_softc(dev); @@ -346,7 +349,8 @@ sdhci_pci_attach(device_t dev) sc->mem_res[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem_res[i] == NULL) { - device_printf(dev, "Can't allocate memory for slot %d\n", i); + device_printf(dev, + "Can't allocate memory for slot %d\n", i); continue; } @@ -463,9 +467,9 @@ static device_method_t sdhci_methods[] = 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_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), From owner-svn-src-all@freebsd.org Sun Jan 29 00:12:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C1CFCBB4DF; Sun, 29 Jan 2017 00:12:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFF52F1; Sun, 29 Jan 2017 00:12: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 v0T0C6Il062911; Sun, 29 Jan 2017 00:12:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0T0C6G9062910; Sun, 29 Jan 2017 00:12:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701290012.v0T0C6G9062910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 29 Jan 2017 00:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312940 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 00:12:08 -0000 Author: ngie Date: Sun Jan 29 00:12:06 2017 New Revision: 312940 URL: https://svnweb.freebsd.org/changeset/base/312940 Log: Remove non-existent ct(4) dependency for scsi_low.c ct(4) was removed with pc98 in r312910 Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 29 00:05:49 2017 (r312939) +++ head/sys/conf/files Sun Jan 29 00:12:06 2017 (r312940) @@ -111,7 +111,7 @@ cam/ctl/ctl_error.c optional ctl cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/scsi/scsi_da.c optional da -cam/scsi/scsi_low.c optional ct | ncv | nsp | stg +cam/scsi/scsi_low.c optional ncv | nsp | stg cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa From owner-svn-src-all@freebsd.org Sun Jan 29 00:24:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DC18CBB935; Sun, 29 Jan 2017 00:24:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DAA9B0E; Sun, 29 Jan 2017 00:24:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0T0OYYw067954; Sun, 29 Jan 2017 00:24:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0T0OYaF067953; Sun, 29 Jan 2017 00:24:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701290024.v0T0OYaF067953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 29 Jan 2017 00:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312941 - head/usr.bin/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 00:24:35 -0000 Author: ngie Date: Sun Jan 29 00:24:34 2017 New Revision: 312941 URL: https://svnweb.freebsd.org/changeset/base/312941 Log: Update MACHINE/MACHINE_ARCH examples to use arm64/aarch64 instead of i386/pc98 pc98 support was removed in r312910 Modified: head/usr.bin/man/man.1 Modified: head/usr.bin/man/man.1 ============================================================================== --- head/usr.bin/man/man.1 Sun Jan 29 00:12:06 2017 (r312940) +++ head/usr.bin/man/man.1 Sun Jan 29 00:24:34 2017 (r312941) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 26, 2014 +.Dd January 28, 2017 .Dt MAN 1 .Os .Sh NAME @@ -242,20 +242,20 @@ environment variables. For example, if .Ev MACHINE_ARCH is set to -.Dq Li i386 +.Dq Li aarch64 and .Ev MACHINE is set to -.Dq Li pc98 , +.Dq Li arm64 , .Nm will search the following paths when considering section 4 manual pages in .Pa /usr/share/man : .Pp .Bl -item -offset indent -compact .It -.Pa /usr/share/man/man4/pc98 +.Pa /usr/share/man/man4/aarch64 .It -.Pa /usr/share/man/man4/i386 +.Pa /usr/share/man/man4/arm64 .It .Pa /usr/share/man/man4 .El From owner-svn-src-all@freebsd.org Sun Jan 29 00:32:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A833ECBBC82; Sun, 29 Jan 2017 00:32:29 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E6EAF9C; Sun, 29 Jan 2017 00:32:29 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v0T0WKVk032470; Sat, 28 Jan 2017 16:32:20 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v0T0WHLF032469; Sat, 28 Jan 2017 16:32:17 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201701290032.v0T0WHLF032469@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r312871 - stable/11/share/zoneinfo In-Reply-To: <722a5ab1-f997-fa44-4f67-91430673622d@freebsd.org> To: Julian Elischer Date: Sat, 28 Jan 2017 16:32:17 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 00:32:29 -0000 > Hi Rod, Hello Julian, > On 27/1/17 11:25 pm, Rodney W. Grimes wrote: > >> Author: julian > >> Date: Fri Jan 27 09:11:44 2017 > >> New Revision: 312871 > >> URL: https://svnweb.freebsd.org/changeset/base/312871 > >> > >> Log: > >> MFH: r308671 > >> > >> When you select make OLDTIMEZONES=1 then you need a few added directories > >> to be made or the command fails > >> > >> Sponsored by: panzura > >> > >> MFH: r310426 > >> > >> If you are going to be run individually to make a new timezone set > >> then ensure the destination directories exist. > >> Especially if you define OLDTIMEZONES because the mtree pass > >> doesn't do it for you. > > Perhaps it is time to start pre-processing mtree files so this > > would no longer be the case? > A much bigger question than I can handle at this time.. :-) Fair enough. I did run (cd /usr/src; find . -name Makefile | xargs grep mkdir | more) to see how much of this has occured, and was happy to see that only a few places. When I did all the early mtree work I had to remove mkdir/chown/chmod's in the Makefiles. > >> Sponsored by: Panzura > >> > >> Modified: > >> stable/11/share/zoneinfo/Makefile > >> Directory Properties: > >> stable/11/ (props changed) > >> > >> Modified: stable/11/share/zoneinfo/Makefile > >> ============================================================================== > >> --- stable/11/share/zoneinfo/Makefile Fri Jan 27 09:07:11 2017 (r312870) > >> +++ stable/11/share/zoneinfo/Makefile Fri Jan 27 09:11:44 2017 (r312871) > >> @@ -67,6 +67,10 @@ TZBUILDSUBDIRS= \ > >> Pacific \ > >> SystemV > >> > >> +.if defined(OLDTIMEZONES) > >> +TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil > >> +.endif > >> + > >> .if !defined(_SKIP_BUILD) > >> all: zoneinfo > >> .endif > >> @@ -81,6 +85,8 @@ zoneinfo: yearistype ${TDATA} > >> > >> beforeinstall: install-zoneinfo > >> install-zoneinfo: > >> + mkdir -p ${DESTDIR}/usr/share/zoneinfo > >> + cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p ${TZBUILDSUBDIRS} > > This has the failure mode that your current uid and umask, etc are > > used in creating the directories. Please add appropriate chown/chmod > > commands to reflect what mtree would of done had it done this. > This is mostly because it failed when run as an individual operation > to update zoninfo files. I think it would also fail on a complete installworld if you had OLDTIMEZONES set would it not? > which would probably be done as root, or someone who wants the files > owned by them. > You can't write here unless you are root, so I'm not sure what the > right thing to do would be. > and chown doesn't work if you are not root, so what would you suggest? This is an install phase thing, so is only expected to work as root, and hence should be coded assuming it is running as root, so chown/chmod are fine, though still a sic bandaide. > (what is needed for the offline permissions tool)? > should we assume ${DESTDIR}/usr/share exists already? Probably, I dont like the -p on mkdir cause if any of the components are missing you can easy create ones with wrong permissions using this. > > the following might be a very slight improvement, but ... > > mkdir -p -m 755 ${DESTDIR}/usr/share Never, clearly the space of etc/mtree/BSD.usr.dist, and if this directoy does not exist your make install SHOULD fail. > mkdir -p -m 755 ${DESTDIR}/usr/share/zoneinfo Ditto > cd ${DESTDIR}/usr/share/zoneinfo; mkdir -p -m 755 ${TZBUILDSUBDIRS} This one I am ok with. Though I think the code in the Makefile already does a umask override so not sure what is going on now. > -cd ${DESTDIR}/usr/share/zoneinfo; chown -R ${BINOWN}:${BINGRP} . < would fail if you are not root. No need for the -, it should fail if you are not root, running install as non root inside /usr/src has never been supported. Another, simple, and cleaner solution would be to write etc/mtree/BSD.oldtz, properly populate it, and invoke it, when appropriate, from the make hierarchy target. Sorry you stumbled into one of my pedantic things about the src tree not having mkdir -p in the Makefiles. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sun Jan 29 00:45:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1C09CBBEE8; Sun, 29 Jan 2017 00:45:53 +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 8CFA41456; Sun, 29 Jan 2017 00:45:53 +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 v0T0jqfa076162; Sun, 29 Jan 2017 00:45:52 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0T0jqWW076161; Sun, 29 Jan 2017 00:45:52 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701290045.v0T0jqWW076161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 29 Jan 2017 00:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312942 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 00:45:53 -0000 Author: pfg Date: Sun Jan 29 00:45:52 2017 New Revision: 312942 URL: https://svnweb.freebsd.org/changeset/base/312942 Log: Remove GCC's __nonnull() attribute definition. While GCC's __nonnull__ attribute is generally useful to prevent misuse of some functions it also tends to do rather dangerous "optimizations". Now that we have replaced (r312934) all such uses with the clang nullability qualifiers, the GCC attribute is unnecessary. Remove the definition completely to prevent its use in system's headers. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun Jan 29 00:24:34 2017 (r312941) +++ head/sys/sys/cdefs.h Sun Jan 29 00:45:52 2017 (r312942) @@ -375,14 +375,6 @@ #define __noinline #endif -#if __GNUC_PREREQ__(3, 3) -#define __nonnull(x) __attribute__((__nonnull__(x))) -#define __nonnull_all __attribute__((__nonnull__)) -#else -#define __nonnull(x) -#define __nonnull_all -#endif - #if __GNUC_PREREQ__(3, 4) #define __fastcall __attribute__((__fastcall__)) #define __result_use_check __attribute__((__warn_unused_result__)) From owner-svn-src-all@freebsd.org Sun Jan 29 01:52:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1EAECC27E2; Sun, 29 Jan 2017 01:52:25 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "sakura.ccs.furiru.org", Issuer "sakura.ccs.furiru.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 87A951788; Sun, 29 Jan 2017 01:52:25 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTPA id v0T1qLq4006936; Sun, 29 Jan 2017 10:52:23 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Sun, 29 Jan 2017 10:52:20 +0900 (JST) Message-Id: <20170129.105220.1181744779718930597.nyan@FreeBSD.org> To: yaneurabeya@gmail.com Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312917 - in head: share/man/man4 share/man/man4/man4.i386 sys/dev/pci sys/modules/ata/atacbus From: TAKAHASHI Yoshihiro In-Reply-To: References: <201701280958.v0S9w0ja004827@repo.freebsd.org> X-Mailer: Mew version 6.7 on Emacs 25.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 01:52:25 -0000 In article Ngie Cooper writes: >> On Jan 28, 2017, at 01:58, Takahashi Yoshihiro wrote: >> >> Author: nyan >> Date: Sat Jan 28 09:58:00 2017 >> New Revision: 312917 >> URL: https://svnweb.freebsd.org/changeset/base/312917 >> >> Log: >> Remove more pc98 support. > > Hello Yoshiro-San, > Have appropriate man pages and files been added to ObsoleteFiles.inc? Yes. But I found that there are some pc98 related files even now. I'll remove them and add to ObsoleteFiles.inc. Thank you for your recent work for pc98 removal. --- TAKAHASHI Yoshihiro From owner-svn-src-all@freebsd.org Sun Jan 29 02:17:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3549CC2F45; Sun, 29 Jan 2017 02:17:53 +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 830B71F7; Sun, 29 Jan 2017 02:17:53 +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 v0T2HqFR012355; Sun, 29 Jan 2017 02:17:52 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0T2HqGM012354; Sun, 29 Jan 2017 02:17:52 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701290217.v0T2HqGM012354@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, 29 Jan 2017 02:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312943 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 02:17:53 -0000 Author: loos Date: Sun Jan 29 02:17:52 2017 New Revision: 312943 URL: https://svnweb.freebsd.org/changeset/base/312943 Log: Do not run the pf purge thread while the VNET variables are not initialized, this can cause a divide by zero (if the VNET initialization takes to long to complete). Obtained from: pfSense MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sun Jan 29 00:45:52 2017 (r312942) +++ head/sys/netpfil/pf/pf.c Sun Jan 29 02:17:52 2017 (r312943) @@ -129,6 +129,8 @@ VNET_DEFINE(int, pf_tcp_secret_init); #define V_pf_tcp_secret_init VNET(pf_tcp_secret_init) VNET_DEFINE(int, pf_tcp_iss_off); #define V_pf_tcp_iss_off VNET(pf_tcp_iss_off) +VNET_DECLARE(int, pf_vnet_active); +#define V_pf_vnet_active VNET(pf_vnet_active) /* * Queue for pf_intr() sends. @@ -1441,6 +1443,12 @@ pf_purge_thread(void *unused __unused) kproc_exit(0); } + /* Wait while V_pf_default_rule.timeout is initialized. */ + if (V_pf_vnet_active == 0) { + CURVNET_RESTORE(); + continue; + } + /* Process 1/interval fraction of the state table every run. */ idx = pf_purge_expired_states(idx, pf_hashmask / (V_pf_default_rule.timeout[PFTM_INTERVAL] * 10)); From owner-svn-src-all@freebsd.org Sun Jan 29 03:34:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B924CC445F; Sun, 29 Jan 2017 03:34:50 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B29ECB0; Sun, 29 Jan 2017 03:34:50 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0T3Ynjb044873; Sun, 29 Jan 2017 03:34:49 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0T3YnjJ044872; Sun, 29 Jan 2017 03:34:49 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201701290334.v0T3YnjJ044872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 29 Jan 2017 03:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312944 - in head: . sys/dev/ic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 03:34:50 -0000 Author: nyan Date: Sun Jan 29 03:34:49 2017 New Revision: 312944 URL: https://svnweb.freebsd.org/changeset/base/312944 Log: - Remove i8255.h because it's pc98 device. - rsa.h is for both RSA-DV/S ISA and RSA-98III CBUS, but there is no RSA-DV/S support. So it can be removed. Deleted: head/sys/dev/ic/i8255.h head/sys/dev/ic/rsa.h Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jan 29 02:17:52 2017 (r312943) +++ head/ObsoleteFiles.inc Sun Jan 29 03:34:49 2017 (r312944) @@ -40,6 +40,8 @@ # 20170128: remove pc98 support OLD_FILES+=usr/include/dev/ic/i8251.h +OLD_FILES+=usr/include/dev/ic/i8255.h +OLD_FILES+=usr/include/dev/ic/rsa.h OLD_FILES+=usr/include/dev/ic/wd33c93reg.h OLD_FILES+=usr/include/sys/disk/pc98.h OLD_FILES+=usr/include/sys/diskpc98.h From owner-svn-src-all@freebsd.org Sun Jan 29 10:33:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5DB9CC6DE7; Sun, 29 Jan 2017 10:33:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7E83200; Sun, 29 Jan 2017 10:33:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TAXgWP014198; Sun, 29 Jan 2017 10:33:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TAXg60014197; Sun, 29 Jan 2017 10:33:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701291033.v0TAXg60014197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 29 Jan 2017 10:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r312945 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 10:33:44 -0000 Author: kib Date: Sun Jan 29 10:33:42 2017 New Revision: 312945 URL: https://svnweb.freebsd.org/changeset/base/312945 Log: MFC r312647: Add comments explaining unobvious td_critnest adjustments in critical_exit(). Modified: stable/11/sys/kern/kern_switch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_switch.c ============================================================================== --- stable/11/sys/kern/kern_switch.c Sun Jan 29 03:34:49 2017 (r312944) +++ stable/11/sys/kern/kern_switch.c Sun Jan 29 10:33:42 2017 (r312945) @@ -206,7 +206,22 @@ critical_exit(void) if (td->td_critnest == 1) { td->td_critnest = 0; + + /* + * Interrupt handlers execute critical_exit() on + * leave, and td_owepreempt may be left set by an + * interrupt handler only when td_critnest > 0. If we + * are decrementing td_critnest from 1 to 0, read + * td_owepreempt after decrementing, to not miss the + * preempt. Disallow compiler to reorder operations. + */ + __compiler_membar(); if (td->td_owepreempt && !kdb_active) { + /* + * Microoptimization: we committed to switch, + * disable preemption in interrupt handlers + * while spinning for the thread lock. + */ td->td_critnest = 1; thread_lock(td); td->td_critnest--; From owner-svn-src-all@freebsd.org Sun Jan 29 10:36:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 527ECCC6EB5; Sun, 29 Jan 2017 10:36:44 +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 21D6169F; Sun, 29 Jan 2017 10:36:44 +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 v0TAah6n014498; Sun, 29 Jan 2017 10:36:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TAahwa014497; Sun, 29 Jan 2017 10:36:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701291036.v0TAahwa014497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 29 Jan 2017 10:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r312946 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 10:36:44 -0000 Author: kib Date: Sun Jan 29 10:36:43 2017 New Revision: 312946 URL: https://svnweb.freebsd.org/changeset/base/312946 Log: MFC r312647: Add comments explaining unobvious td_critnest adjustments in critical_exit(). Modified: stable/10/sys/kern/kern_switch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_switch.c ============================================================================== --- stable/10/sys/kern/kern_switch.c Sun Jan 29 10:33:42 2017 (r312945) +++ stable/10/sys/kern/kern_switch.c Sun Jan 29 10:36:43 2017 (r312946) @@ -206,7 +206,22 @@ critical_exit(void) if (td->td_critnest == 1) { td->td_critnest = 0; + + /* + * Interrupt handlers execute critical_exit() on + * leave, and td_owepreempt may be left set by an + * interrupt handler only when td_critnest > 0. If we + * are decrementing td_critnest from 1 to 0, read + * td_owepreempt after decrementing, to not miss the + * preempt. Disallow compiler to reorder operations. + */ + __compiler_membar(); if (td->td_owepreempt && !kdb_active) { + /* + * Microoptimization: we committed to switch, + * disable preemption in interrupt handlers + * while spinning for the thread lock. + */ td->td_critnest = 1; thread_lock(td); td->td_critnest--; From owner-svn-src-all@freebsd.org Sun Jan 29 11:11:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35E16CC6999; Sun, 29 Jan 2017 11:11:58 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 0005F18CC; Sun, 29 Jan 2017 11:11:57 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (unknown [IPv6:2a02:c7f:1e13:cf00:4e34:88ff:fe5b:ab17]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id EFC8ED8506; Sun, 29 Jan 2017 11:06:24 +0000 (UTC) Date: Sun, 29 Jan 2017 11:11:17 +0000 From: Andrew Turner To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312938 - head/share/man/man7 Message-ID: <20170129111117.209bd639@zapp> In-Reply-To: <201701282358.v0SNwHo6055555@repo.freebsd.org> References: <201701282358.v0SNwHo6055555@repo.freebsd.org> X-Mailer: Claws Mail 3.14.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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 11:11:58 -0000 On Sat, 28 Jan 2017 23:58:17 +0000 (UTC) Ngie Cooper wrote: > Author: ngie > Date: Sat Jan 28 23:58:17 2017 > New Revision: 312938 > URL: https://svnweb.freebsd.org/changeset/base/312938 > > Log: > Update TARGET/TARGET_ARCH examples to use arm64/aarch64 instead of > i386/pc98 > pc98 support was removed in r312910 > > Modified: > head/share/man/man7/build.7 > head/share/man/man7/release.7 > > Modified: head/share/man/man7/build.7 > ============================================================================== > --- head/share/man/man7/build.7 Sat Jan 28 23:51:03 > 2017 (r312937) +++ head/share/man/man7/build.7 Sat Jan > 28 23:58:17 2017 (r312938) @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd July 20, 2016 > +.Dd January 28, 2017 > .Dt BUILD 7 > .Os > .Sh NAME > @@ -517,10 +517,10 @@ This is analogous to the > .Dq Nm uname Fl m > output. > This is necessary to cross-build some target architectures. > -For example, cross-building for PC98 machines requires > -.Va TARGET_ARCH Ns = Ns Li i386 > +For example, cross-building for ARM64 machines requires > +.Va TARGET_ARCH Ns = Ns Li aarch64 > and > -.Va TARGET Ns = Ns Li pc98 . > +.Va TARGET Ns = Ns Li arm64 . That's not quite correct. Now pc98 has been removed TARGET_ARCH is enough to specify the hardware to support. TARGET can be used on many hardware platforms as it will have a default TARGET_ARCH to use, e.g. on arm64 TARGET=arm64 is enough as it implies TARGET_ARCH=aarch64, however to build armv6 you would need to set TARGET_ARCH=armv6 as TARGET=arm implies TARGET_ARCH=arm. Andrew From owner-svn-src-all@freebsd.org Sun Jan 29 11:52:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 713B2CC6951; Sun, 29 Jan 2017 11:52:37 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40D5B1056; Sun, 29 Jan 2017 11:52:37 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TBqaHL047758; Sun, 29 Jan 2017 11:52:36 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TBqaBY047757; Sun, 29 Jan 2017 11:52:36 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201701291152.v0TBqaBY047757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Sun, 29 Jan 2017 11:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312947 - head/sys/boot/mips/beri/boot2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 11:52:37 -0000 Author: brooks Date: Sun Jan 29 11:52:36 2017 New Revision: 312947 URL: https://svnweb.freebsd.org/changeset/base/312947 Log: Remove "-Xassembler -G0" from CFLAGS. -G0 is sufficent except on old version of clang (<3.8) and such versions are unlikely to be generally useful on mips64. Reported by: sbruno Sponsored by: DARPA, AFRL Modified: head/sys/boot/mips/beri/boot2/Makefile Modified: head/sys/boot/mips/beri/boot2/Makefile ============================================================================== --- head/sys/boot/mips/beri/boot2/Makefile Sun Jan 29 10:36:43 2017 (r312946) +++ head/sys/boot/mips/beri/boot2/Makefile Sun Jan 29 11:52:36 2017 (r312947) @@ -52,7 +52,7 @@ CFLAGS= -ffreestanding \ -I${.CURDIR}/../../../.. \ -D_KERNEL \ -Wall \ - -G0 -Xassembler -G0 \ + -G0 \ -fno-pic -mno-abicalls \ -msoft-float \ -g From owner-svn-src-all@freebsd.org Sun Jan 29 12:31:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58004CC4E82; Sun, 29 Jan 2017 12:31:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27C5AACD; Sun, 29 Jan 2017 12:31:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TCVOgi063171; Sun, 29 Jan 2017 12:31:24 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TCVOqb063170; Sun, 29 Jan 2017 12:31:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701291231.v0TCVOqb063170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 29 Jan 2017 12:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312948 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 12:31:25 -0000 Author: trasz Date: Sun Jan 29 12:31:24 2017 New Revision: 312948 URL: https://svnweb.freebsd.org/changeset/base/312948 Log: Remove unused kern_sendfile() declaration. Modified: head/sys/sys/syscallsubr.h Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Sun Jan 29 11:52:36 2017 (r312947) +++ head/sys/sys/syscallsubr.h Sun Jan 29 12:31:24 2017 (r312948) @@ -52,7 +52,6 @@ struct ogetdirentries_args; struct rlimit; struct rusage; union semun; -struct sendfile_args; struct sockaddr; struct stat; struct thr_param; @@ -197,8 +196,6 @@ int kern_semctl(struct thread *td, int s union semun *arg, register_t *rval); int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits); -int kern_sendfile(struct thread *td, struct sendfile_args *uap, - struct uio *hdr_uio, struct uio *trl_uio, int compat); int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct mbuf *control, enum uio_seg segflg); int kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups); From owner-svn-src-all@freebsd.org Sun Jan 29 13:31:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4654FCC7653; Sun, 29 Jan 2017 13:31:58 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15F8B165D; Sun, 29 Jan 2017 13:31:58 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TDVvkE089424; Sun, 29 Jan 2017 13:31:57 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TDVvP1089423; Sun, 29 Jan 2017 13:31:57 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201701291331.v0TDVvP1089423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sun, 29 Jan 2017 13:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312949 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 13:31:58 -0000 Author: cognet Date: Sun Jan 29 13:31:56 2017 New Revision: 312949 URL: https://svnweb.freebsd.org/changeset/base/312949 Log: Correct the IT instruction in atomic_fcmpset_64(). Reported by: andrew Modified: head/sys/arm/include/atomic-v6.h Modified: head/sys/arm/include/atomic-v6.h ============================================================================== --- head/sys/arm/include/atomic-v6.h Sun Jan 29 12:31:24 2017 (r312948) +++ head/sys/arm/include/atomic-v6.h Sun Jan 29 13:31:56 2017 (r312949) @@ -220,7 +220,7 @@ atomic_fcmpset_64(volatile uint64_t *p, "1: mov %[ret], #1 \n" " ldrexd %Q[tmp], %R[tmp], [%[ptr]] \n" " teq %Q[tmp], %Q[_cmpval] \n" - " itee eq \n" + " ite eq \n" " teqeq %R[tmp], %R[_cmpval] \n" " bne 2f \n" " strexd %[ret], %Q[newval], %R[newval], [%[ptr]]\n" From owner-svn-src-all@freebsd.org Sun Jan 29 14:28:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0126CC6319; Sun, 29 Jan 2017 14:28:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E64215BA; Sun, 29 Jan 2017 14:28:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TESTfa011125; Sun, 29 Jan 2017 14:28:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TESTCi011124; Sun, 29 Jan 2017 14:28:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701291428.v0TESTCi011124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 29 Jan 2017 14:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r312950 - stable/11/sbin/camcontrol X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 14:28:31 -0000 Author: mav Date: Sun Jan 29 14:28:29 2017 New Revision: 312950 URL: https://svnweb.freebsd.org/changeset/base/312950 Log: MFC r312228: Make `camcontrol cmd ... -i ...` return only valid bytes. Previously code ignored resid field and returned extra zeroes in case of data underflow. Now it returns only real bytes received from target. Modified: stable/11/sbin/camcontrol/camcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Sun Jan 29 13:31:56 2017 (r312949) +++ stable/11/sbin/camcontrol/camcontrol.c Sun Jan 29 14:28:29 2017 (r312950) @@ -4150,7 +4150,7 @@ scsicmd(struct cam_device *device, int a u_int8_t cdb[20]; u_int8_t atacmd[12]; struct get_hook hook; - int c, data_bytes = 0; + int c, data_bytes = 0, valid_bytes; int cdb_len = 0; int atacmd_len = 0; int dmacmd = 0; @@ -4454,16 +4454,20 @@ scsicmd(struct cam_device *device, int a } } + if (cdb_len) + valid_bytes = ccb->csio.dxfer_len - ccb->csio.resid; + else + valid_bytes = ccb->ataio.dxfer_len - ccb->ataio.resid; if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) && (arglist & CAM_ARG_CMD_IN) - && (data_bytes > 0)) { + && (valid_bytes > 0)) { if (fd_data == 0) { - buff_decode_visit(data_ptr, data_bytes, datastr, + buff_decode_visit(data_ptr, valid_bytes, datastr, arg_put, NULL); fprintf(stdout, "\n"); } else { ssize_t amt_written; - int amt_to_write = data_bytes; + int amt_to_write = valid_bytes; u_int8_t *buf_ptr = data_ptr; for (amt_written = 0; (amt_to_write > 0) && @@ -4478,7 +4482,7 @@ scsicmd(struct cam_device *device, int a } else if ((amt_written == 0) && (amt_to_write > 0)) { warnx("only wrote %u bytes out of %u", - data_bytes - amt_to_write, data_bytes); + valid_bytes - amt_to_write, valid_bytes); } } } From owner-svn-src-all@freebsd.org Sun Jan 29 14:29:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92514CC63A8; Sun, 29 Jan 2017 14:29:03 +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 481441707; Sun, 29 Jan 2017 14:29:03 +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 v0TET28u011202; Sun, 29 Jan 2017 14:29:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TET2Nn011201; Sun, 29 Jan 2017 14:29:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701291429.v0TET2Nn011201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 29 Jan 2017 14:29:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r312951 - stable/10/sbin/camcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 14:29:03 -0000 Author: mav Date: Sun Jan 29 14:29:02 2017 New Revision: 312951 URL: https://svnweb.freebsd.org/changeset/base/312951 Log: MFC r312228: Make `camcontrol cmd ... -i ...` return only valid bytes. Previously code ignored resid field and returned extra zeroes in case of data underflow. Now it returns only real bytes received from target. Modified: stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Sun Jan 29 14:28:29 2017 (r312950) +++ stable/10/sbin/camcontrol/camcontrol.c Sun Jan 29 14:29:02 2017 (r312951) @@ -4145,7 +4145,7 @@ scsicmd(struct cam_device *device, int a u_int8_t cdb[20]; u_int8_t atacmd[12]; struct get_hook hook; - int c, data_bytes = 0; + int c, data_bytes = 0, valid_bytes; int cdb_len = 0; int atacmd_len = 0; int dmacmd = 0; @@ -4449,16 +4449,20 @@ scsicmd(struct cam_device *device, int a } } + if (cdb_len) + valid_bytes = ccb->csio.dxfer_len - ccb->csio.resid; + else + valid_bytes = ccb->ataio.dxfer_len - ccb->ataio.resid; if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) && (arglist & CAM_ARG_CMD_IN) - && (data_bytes > 0)) { + && (valid_bytes > 0)) { if (fd_data == 0) { - buff_decode_visit(data_ptr, data_bytes, datastr, + buff_decode_visit(data_ptr, valid_bytes, datastr, arg_put, NULL); fprintf(stdout, "\n"); } else { ssize_t amt_written; - int amt_to_write = data_bytes; + int amt_to_write = valid_bytes; u_int8_t *buf_ptr = data_ptr; for (amt_written = 0; (amt_to_write > 0) && @@ -4473,7 +4477,7 @@ scsicmd(struct cam_device *device, int a } else if ((amt_written == 0) && (amt_to_write > 0)) { warnx("only wrote %u bytes out of %u", - data_bytes - amt_to_write, data_bytes); + valid_bytes - amt_to_write, valid_bytes); } } } From owner-svn-src-all@freebsd.org Sun Jan 29 16:54:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32983CC7E36; Sun, 29 Jan 2017 16:54:57 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0782317AA; Sun, 29 Jan 2017 16:54:56 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TGsuJr077440; Sun, 29 Jan 2017 16:54:56 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TGsus1077438; Sun, 29 Jan 2017 16:54:56 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201701291654.v0TGsus1077438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sun, 29 Jan 2017 16:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312952 - in head/sys/i386: i386 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 16:54:57 -0000 Author: jah Date: Sun Jan 29 16:54:55 2017 New Revision: 312952 URL: https://svnweb.freebsd.org/changeset/base/312952 Log: Implement get_pcpu() for i386 and use it to replace pcpu_find(curcpu) in the i386 pmap. The curcpu macro loads the per-cpu data pointer as its first step, so the remaining steps of pcpu_find(curcpu) are circular. get_pcpu() is already implemented for arm, arm64, and risc-v. My plan is to implement it for the remaining architectures and use it to replace several instances of pcpu_find(curcpu) in MI code. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9370 Modified: head/sys/i386/i386/pmap.c head/sys/i386/include/pcpu.h Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Jan 29 14:29:02 2017 (r312951) +++ head/sys/i386/i386/pmap.c Sun Jan 29 16:54:55 2017 (r312952) @@ -440,7 +440,7 @@ pmap_bootstrap(vm_paddr_t firstaddr) * CMAP1/CMAP2 are used for zeroing and copying pages. * CMAP3 is used for the boot-time memory test. */ - pc = pcpu_find(curcpu); + pc = get_pcpu(); mtx_init(&pc->pc_cmap_lock, "SYSMAPS", NULL, MTX_DEF); SYSMAP(caddr_t, pc->pc_cmap_pte1, pc->pc_cmap_addr1, 1) SYSMAP(caddr_t, pc->pc_cmap_pte2, pc->pc_cmap_addr2, 1) @@ -4206,7 +4206,7 @@ pmap_zero_page(vm_page_t m) struct pcpu *pc; sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap_pte2 = pc->pc_cmap_pte2; mtx_lock(&pc->pc_cmap_lock); if (*cmap_pte2) @@ -4237,7 +4237,7 @@ pmap_zero_page_area(vm_page_t m, int off struct pcpu *pc; sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap_pte2 = pc->pc_cmap_pte2; mtx_lock(&pc->pc_cmap_lock); if (*cmap_pte2) @@ -4264,7 +4264,7 @@ pmap_copy_page(vm_page_t src, vm_page_t struct pcpu *pc; sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap_pte1 = pc->pc_cmap_pte1; cmap_pte2 = pc->pc_cmap_pte2; mtx_lock(&pc->pc_cmap_lock); @@ -4299,7 +4299,7 @@ pmap_copy_pages(vm_page_t ma[], vm_offse int cnt; sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap_pte1 = pc->pc_cmap_pte1; cmap_pte2 = pc->pc_cmap_pte2; mtx_lock(&pc->pc_cmap_lock); @@ -5288,7 +5288,7 @@ pmap_flush_page(vm_page_t m) useclflushopt = (cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0; if (useclflushopt || (cpu_feature & CPUID_CLFSH) != 0) { sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap_pte2 = pc->pc_cmap_pte2; mtx_lock(&pc->pc_cmap_lock); if (*cmap_pte2) Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Sun Jan 29 14:29:02 2017 (r312951) +++ head/sys/i386/include/pcpu.h Sun Jan 29 16:54:55 2017 (r312952) @@ -76,6 +76,7 @@ extern struct pcpu *pcpup; +#define get_pcpu() (pcpup) #define PCPU_GET(member) (pcpup->pc_ ## member) #define PCPU_ADD(member, val) (pcpup->pc_ ## member += (val)) #define PCPU_INC(member) PCPU_ADD(member, 1) @@ -196,6 +197,15 @@ extern struct pcpu *pcpup; } \ } while (0) +#define get_pcpu() __extension__ ({ \ + struct pcpu *__pc; \ + \ + __asm __volatile("movl %%fs:%1,%0" \ + : "=r" (__pc) \ + : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace)))); \ + __pc; \ +}) + #define PCPU_GET(member) __PCPU_GET(pc_ ## member) #define PCPU_ADD(member, val) __PCPU_ADD(pc_ ## member, val) #define PCPU_INC(member) __PCPU_INC(pc_ ## member) From owner-svn-src-all@freebsd.org Sun Jan 29 17:19:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57316CC78BC for ; Sun, 29 Jan 2017 17:19:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::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 26380A1C for ; Sun, 29 Jan 2017 17:19:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x242.google.com with SMTP id m98so12485184iod.2 for ; Sun, 29 Jan 2017 09:19:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=QIYp/aEBEMdN1STA741IlSa8Xfj384cKLZLGjEjecR0=; b=sW4TizE2er0pQtCqGwhH7k7zJT82c2SKZpsXIucHVvYme4osBeh2fTQVWeTSa0da61 JLayyZHMsFA38RgsBsddS2kdcNipMsGInZIUaOTMML7i4jRhUDxRTafMDlFFcocbG4JN g8cG0L5tymCQ/nE381dm/QVjpyR0F9pZRVJ0DmEtqb6AVLDCdwg/2HMJeuyYtPAWe7ID SF1UlIylBIudsQtmixH4Edhv6BvZEltK41Fu2tADd2Wg/AljxpvdMKQNamwR1vOgQfBP CsE7xgpXB43Zd8aULgMMZCCukv7Z7HGp55KFUBw8BL5QkGDX5u5/I1QVUhWqMlZwKj0d 9tpA== 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=QIYp/aEBEMdN1STA741IlSa8Xfj384cKLZLGjEjecR0=; b=ocAyv4BF+dHWWmC9Zhw8VE9m0IUgkPz6ZxQ7D+DUpBvwBC+bZL1iioPnYtVbIe9RK/ R9mT3sYxA/p+S7g++s6m+kkAIWhs9BT9cgoI7GIaHLuisXm2hdWpntn9/iC/Kt5W5tyq q619XliKAXgX1CwK+0dBKzJNZFWmQLIueA8He/MZksOscbzvAWFntsOuO89FKD7V+xwf Zf+TWbbjF3mC9JJV1kriuGTyhHXmAOLXNl+Cq0Y0bH8SG+Bt5AucjetveaOIWkknpJ35 UNr6plLyehILkKlPJ9D/qVWf8LvzBZFSu9nWUQvb0zfZoA9V+PYgGsgivqbSO5Qt+X0A rvuA== X-Gm-Message-State: AIkVDXLanIfCjSXssz4R66e1hCOjhSEIPOpLe7PmE8blnDEYOaB4pdf6Y81SNgDngz+DaD8eyCVxjQPqF7rtxQ== X-Received: by 10.107.20.13 with SMTP id 13mr15586498iou.0.1485710350311; Sun, 29 Jan 2017 09:19:10 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Sun, 29 Jan 2017 09:19:09 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <20170129111117.209bd639@zapp> References: <201701282358.v0SNwHo6055555@repo.freebsd.org> <20170129111117.209bd639@zapp> From: Warner Losh Date: Sun, 29 Jan 2017 10:19:09 -0700 X-Google-Sender-Auth: LlwNXtdaZeM0SLXUbnH0k-rDaCc Message-ID: Subject: Re: svn commit: r312938 - head/share/man/man7 To: Andrew Turner Cc: Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 17:19:11 -0000 On Sun, Jan 29, 2017 at 4:11 AM, Andrew Turner wrote: > On Sat, 28 Jan 2017 23:58:17 +0000 (UTC) > Ngie Cooper wrote: > >> Author: ngie >> Date: Sat Jan 28 23:58:17 2017 >> New Revision: 312938 >> URL: https://svnweb.freebsd.org/changeset/base/312938 >> >> Log: >> Update TARGET/TARGET_ARCH examples to use arm64/aarch64 instead of >> i386/pc98 >> pc98 support was removed in r312910 >> >> Modified: >> head/share/man/man7/build.7 >> head/share/man/man7/release.7 >> >> Modified: head/share/man/man7/build.7 >> ============================================================================== >> --- head/share/man/man7/build.7 Sat Jan 28 23:51:03 >> 2017 (r312937) +++ head/share/man/man7/build.7 Sat Jan >> 28 23:58:17 2017 (r312938) @@ -24,7 +24,7 @@ >> .\" >> .\" $FreeBSD$ >> .\" >> -.Dd July 20, 2016 >> +.Dd January 28, 2017 >> .Dt BUILD 7 >> .Os >> .Sh NAME >> @@ -517,10 +517,10 @@ This is analogous to the >> .Dq Nm uname Fl m >> output. >> This is necessary to cross-build some target architectures. >> -For example, cross-building for PC98 machines requires >> -.Va TARGET_ARCH Ns = Ns Li i386 >> +For example, cross-building for ARM64 machines requires >> +.Va TARGET_ARCH Ns = Ns Li aarch64 >> and >> -.Va TARGET Ns = Ns Li pc98 . >> +.Va TARGET Ns = Ns Li arm64 . > > That's not quite correct. > > Now pc98 has been removed TARGET_ARCH is enough to specify the hardware > to support. TARGET can be used on many hardware platforms as it will > have a default TARGET_ARCH to use, e.g. on arm64 TARGET=arm64 is enough > as it implies TARGET_ARCH=aarch64, however to build armv6 you would > need to set TARGET_ARCH=armv6 as TARGET=arm implies TARGET_ARCH=arm. Correct. We no longer have any architectures where we have two kernel KPIs like we did on i386 with the radically different machines. This approach, however, has been a bit of a hassle. We inherited it from NetBSD when the pc98 port came in (NetBSD didn't have a pc98 port integrated into their tree, but had a boatload of m68k machines with different kernels). For a while we almost supported 3 different i386 architectures as there were efforts made to port to Sun's i386 roadrunner that never finished. It's unlikely, though not impossible, that we'll repeat this though. NetBSD did it to allow every MACHINE to have a GENERIC that will boot everywhere. Now that we've kinda swallowed that up into boot options and a tertiary loader that's different for different boot environments, it's less of a clear-cut case to have a separate MACHINE, especially since we've been moving to LINT and/or GENERIC on the MACHINE types that have multiple kernels. I'd recommend telling people to always set TARGET_ARCH with an aside saying its safer to set both TARGET and TARGET_ARCH to allow us the flexibility in the future to repeat this sort of situation should unforeseen circumstances warrant it. Since TARGET_ARCH is unique, for the moment and likely near term, that will be flexible enough for the developers and simple enough for the users. The safer advice will mean that the script writers will set them both. Warner From owner-svn-src-all@freebsd.org Sun Jan 29 18:41:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51C60CC7E37; Sun, 29 Jan 2017 18:41:11 +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 EE2221199; Sun, 29 Jan 2017 18:41:10 +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 v0TIfA1q018510; Sun, 29 Jan 2017 18:41:10 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TIfANX018509; Sun, 29 Jan 2017 18:41:10 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701291841.v0TIfANX018509@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, 29 Jan 2017 18:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312953 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 18:41:11 -0000 Author: loos Date: Sun Jan 29 18:41:09 2017 New Revision: 312953 URL: https://svnweb.freebsd.org/changeset/base/312953 Log: The stf(4) interface name does not conform with the default naming convention for interfaces, because only one stf(4) interface can exist in the system. This disallow the use of unit numbers different than 0, however, it is possible to create the clone without specify the unit number (wildcard). In the wildcard case we must update the interface name before return. This fix an infinite recursion in pf code that keeps track of network interfaces and groups: 1 - a group for the cloned type of the interface is added (stf in this case); 2 - the system will now try to add an interface named stf (instead of stf0) to stf group; 3 - when pfi_kif_attach() tries to search for an already existing 'stf' interface, the 'stf' group is returned and thus the group is added as an interface of itself; This will now cause a crash at the first attempt to traverse the groups which the stf interface belongs (which loops over itself). Obtained from: pfSense MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/net/if_stf.c Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Sun Jan 29 16:54:55 2017 (r312952) +++ head/sys/net/if_stf.c Sun Jan 29 18:41:09 2017 (r312953) @@ -202,10 +202,16 @@ stf_clone_match(struct if_clone *ifc, co static int stf_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) { - int err, unit; + char *dp; + int err, unit, wildcard; struct stf_softc *sc; struct ifnet *ifp; + err = ifc_name2unit(name, &unit); + if (err != 0) + return (err); + wildcard = (unit < 0); + /* * We can only have one unit, but since unit allocation is * already locked, we use it to keep from allocating extra @@ -229,7 +235,20 @@ stf_clone_create(struct if_clone *ifc, c /* * Set the name manually rather then using if_initname because * we don't conform to the default naming convention for interfaces. + * In the wildcard case, we need to update the name. */ + if (wildcard) { + for (dp = name; *dp != '\0'; dp++); + if (snprintf(dp, len - (dp-name), "%d", unit) > + len - (dp-name) - 1) { + /* + * This can only be a programmer error and + * there's no straightforward way to recover if + * it happens. + */ + panic("if_clone_create(): interface name too long"); + } + } strlcpy(ifp->if_xname, name, IFNAMSIZ); ifp->if_dname = stfname; ifp->if_dunit = IF_DUNIT_NONE; From owner-svn-src-all@freebsd.org Sun Jan 29 19:14:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E09DCC760B; Sun, 29 Jan 2017 19:14:49 +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 55A88367; Sun, 29 Jan 2017 19:14:49 +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 v0TJEm3t034444; Sun, 29 Jan 2017 19:14:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TJEml4034442; Sun, 29 Jan 2017 19:14:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201701291914.v0TJEml4034442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 29 Jan 2017 19:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312954 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 19:14:49 -0000 Author: kib Date: Sun Jan 29 19:14:48 2017 New Revision: 312954 URL: https://svnweb.freebsd.org/changeset/base/312954 Log: Do not leave stale 4K TLB entries on pde (superpage) removal or protection change. On superpage promotion, x86 pmaps do not invalidate existing 4K entries for the superpage range, because they are compatible with the promoted 2/4M entry. But the invalidation on superpage removal or protection change only did single INVLPG with the base address of the superpage. This reliably flushed superpage TLB entry, and 4K entry for the first page of the superpage, potentially leaving other 4K TLB entries lingering. Do the invalidation of the whole superpage range to correct the problem. Note that the precise invalidation is done by x86 code for kernel_pmap only, for user pmaps whole (per-AS) TLB is flushed. This made the bug well hidden, because promotions of the kernel mappings require specific load. Reported and tested by: Jonathan Looney (previous version) Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week 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 Sun Jan 29 18:41:09 2017 (r312953) +++ head/sys/amd64/amd64/pmap.c Sun Jan 29 19:14:48 2017 (r312954) @@ -1040,7 +1040,12 @@ pmap_bootstrap(vm_paddr_t *firstaddr) virtual_avail = va; - /* Initialize the PAT MSR. */ + /* + * Initialize the PAT MSR. + * pmap_init_pat() clears and sets CR4_PGE, which, as a + * side-effect, invalidates stale PG_G TLB entries that might + * have been created in our pre-boot environment. + */ pmap_init_pat(); /* Initialize TLB Context Id. */ @@ -3428,6 +3433,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e vm_paddr_t mptepa; vm_page_t mpte; struct spglist free; + vm_offset_t sva; int PG_PTE_CACHE; PG_G = pmap_global_bit(pmap); @@ -3464,9 +3470,9 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e DMAP_MAX_ADDRESS ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { SLIST_INIT(&free); - pmap_remove_pde(pmap, pde, trunc_2mpage(va), &free, - lockp); - pmap_invalidate_page(pmap, trunc_2mpage(va)); + sva = trunc_2mpage(va); + pmap_remove_pde(pmap, pde, sva, &free, lockp); + pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#lx" " in pmap %p", va, pmap); @@ -3608,11 +3614,23 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t pmap->pm_stats.wired_count -= NBPDR / PAGE_SIZE; /* - * Machines that don't support invlpg, also don't support - * PG_G. - */ - if (oldpde & PG_G) - pmap_invalidate_page(kernel_pmap, sva); + * When workaround_erratum383 is false, a promotion to a 2M + * page mapping does not invalidate the 512 4K page mappings + * from the TLB. Consequently, at this point, the TLB may + * hold both 4K and 2M page mappings. Therefore, the entire + * range of addresses must be invalidated here. In contrast, + * when workaround_erratum383 is true, a promotion does + * invalidate the 512 4K page mappings, and so a single INVLPG + * suffices to invalidate the 2M page mapping. + */ + if ((oldpde & PG_G) != 0) { + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } + pmap_resident_count_dec(pmap, NBPDR / PAGE_SIZE); if (oldpde & PG_MANAGED) { CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, oldpde & PG_PS_FRAME); @@ -3994,9 +4012,14 @@ retry: if (newpde != oldpde) { if (!atomic_cmpset_long(pde, oldpde, newpde)) goto retry; - if (oldpde & PG_G) - pmap_invalidate_page(pmap, sva); - else + if (oldpde & PG_G) { + /* See pmap_remove_pde() for explanation. */ + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } else anychanged = TRUE; } return (anychanged); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Jan 29 18:41:09 2017 (r312953) +++ head/sys/i386/i386/pmap.c Sun Jan 29 19:14:48 2017 (r312954) @@ -507,7 +507,14 @@ pmap_bootstrap(vm_paddr_t firstaddr) for (i = 1; i < NKPT; i++) PTD[i] = 0; - /* Initialize the PAT MSR if present. */ + /* + * Initialize the PAT MSR if present. + * pmap_init_pat() clears and sets CR4_PGE, which, as a + * side-effect, invalidates stale PG_G TLB entries that might + * have been created in our pre-boot environment. We assume + * that PAT support implies PGE and in reverse, PGE presence + * comes with PAT. Both features were added for Pentium Pro. + */ pmap_init_pat(); /* Turn on PG_G on kernel page(s) */ @@ -564,7 +571,10 @@ pmap_init_pat(void) pat_table[PAT_WRITE_PROTECTED] = 3; pat_table[PAT_UNCACHED] = 3; - /* Bail if this CPU doesn't implement PAT. */ + /* + * Bail if this CPU doesn't implement PAT. + * We assume that PAT support implies PGE. + */ if ((cpu_feature & CPUID_PAT) == 0) { for (i = 0; i < PAT_INDEX_SIZE; i++) pat_index[i] = pat_table[i]; @@ -2620,6 +2630,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t vm_paddr_t mptepa; vm_page_t mpte; struct spglist free; + vm_offset_t sva; PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpde = *pde; @@ -2640,8 +2651,9 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t va >> PDRSHIFT, VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED)) == NULL) { SLIST_INIT(&free); - pmap_remove_pde(pmap, pde, trunc_4mpage(va), &free); - pmap_invalidate_page(pmap, trunc_4mpage(va)); + sva = trunc_4mpage(va); + pmap_remove_pde(pmap, pde, sva, &free); + pmap_invalidate_range(pmap, sva, sva + NBPDR - 1); pmap_free_zero_pages(&free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#x" " in pmap %p", va, pmap); @@ -2811,9 +2823,24 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t /* * Machines that don't support invlpg, also don't support * PG_G. - */ - if (oldpde & PG_G) - pmap_invalidate_page(kernel_pmap, sva); + * + * When workaround_erratum383 is false, a promotion to a 2M/4M + * page mapping does not invalidate the 512/1024 4K page mappings + * from the TLB. Consequently, at this point, the TLB may + * hold both 4K and 2M/4M page mappings. Therefore, the entire + * range of addresses must be invalidated here. In contrast, + * when workaround_erratum383 is true, a promotion does + * invalidate the 512/1024 4K page mappings, and so a single INVLPG + * suffices to invalidate the 2M/4M page mapping. + */ + if ((oldpde & PG_G) != 0) { + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } + pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE; if (oldpde & PG_MANAGED) { pvh = pa_to_pvh(oldpde & PG_PS_FRAME); @@ -3122,9 +3149,14 @@ retry: if (newpde != oldpde) { if (!pde_cmpset(pde, oldpde, newpde)) goto retry; - if (oldpde & PG_G) - pmap_invalidate_page(pmap, sva); - else + if (oldpde & PG_G) { + /* See pmap_remove_pde() for explanation. */ + if (workaround_erratum383) + pmap_invalidate_page(kernel_pmap, sva); + else + pmap_invalidate_range(kernel_pmap, sva, + sva + NBPDR - 1); + } else anychanged = TRUE; } return (anychanged); From owner-svn-src-all@freebsd.org Sun Jan 29 19:54:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 894BBCC720C; Sun, 29 Jan 2017 19:54:35 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DD181ADC; Sun, 29 Jan 2017 19:54:35 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TJsY75051148; Sun, 29 Jan 2017 19:54:34 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TJsY4r051147; Sun, 29 Jan 2017 19:54:34 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201701291954.v0TJsY4r051147@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Sun, 29 Jan 2017 19:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r312955 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 19:54:35 -0000 Author: matthew (ports committer) Date: Sun Jan 29 19:54:34 2017 New Revision: 312955 URL: https://svnweb.freebsd.org/changeset/base/312955 Log: Take in the commit bits for the following people who have been inactive for more than 18 months and who have agreed that they are unlikely to begin contributing again in the near future: benl Ben Laurie jhay John Hay raj Rafal Jaworowski ups Stephan Uphoff wkoszek Wojciech Koszek We wish them well in their future endeavours and hope to see them return to FreeBSD development sooner rather than later. Approved by: core (implicit) Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sun Jan 29 19:14:48 2017 (r312954) +++ svnadmin/conf/access Sun Jan 29 19:54:34 2017 (r312955) @@ -42,7 +42,6 @@ badger bapt bde bdrewery -benl benno bms br @@ -111,7 +110,6 @@ jceel jch jchandra jeff -jhay jhb jhibbits jilles @@ -183,7 +181,6 @@ pluknet ps pstef qingli -raj ray remko rmacklem @@ -229,13 +226,11 @@ tsoome tuexen tychon ume -ups ups_old@stups.com uqs vangyzen venkat whu will -wkoszek wma wollman yongari Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sun Jan 29 19:14:48 2017 (r312954) +++ svnadmin/conf/mentors Sun Jan 29 19:54:34 2017 (r312955) @@ -14,7 +14,6 @@ achim scottl Co-mentor: emaste anish neel Co-mentor: grehan agc scottl Co-mentor: emax badger kib Co-mentor: vangyzen -benl philip Co-mentor: simon carl jimharris cherry gibbs dab vangyzen From owner-svn-src-all@freebsd.org Sun Jan 29 20:58:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16C20CC7F58; Sun, 29 Jan 2017 20:58:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A980E133A; Sun, 29 Jan 2017 20:58:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TKwc64074939; Sun, 29 Jan 2017 20:58:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKwa25074916; Sun, 29 Jan 2017 20:58:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292058.v0TKwa25074916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:58:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312956 - in vendor/llvm/dist: cmake/modules include/llvm/IR lib/Analysis lib/Bitcode/Reader lib/CodeGen/SelectionDAG lib/Target/AArch64 lib/Target/AMDGPU lib/Target/ARM lib/Target/X86 ... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:58:40 -0000 Author: dim Date: Sun Jan 29 20:58:36 2017 New Revision: 312956 URL: https://svnweb.freebsd.org/changeset/base/312956 Log: Vendor import of llvm release_40 branch r293443: https://llvm.org/svn/llvm-project/llvm/branches/release_40@293443 Added: vendor/llvm/dist/test/Analysis/BasicAA/pr31761.ll vendor/llvm/dist/test/CodeGen/AMDGPU/flat-for-global-subtarget-feature.ll vendor/llvm/dist/utils/sanitizers/ vendor/llvm/dist/utils/sanitizers/ubsan_blacklist.txt (contents, props changed) Deleted: vendor/llvm/dist/test/CodeGen/AMDGPU/ci-use-flat-for-global.ll Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/include/llvm/IR/IntrinsicsAMDGPU.td vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64.td vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/VOP3Instructions.td vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/test/CodeGen/AArch64/no-quad-ldp-stp.ll vendor/llvm/dist/test/CodeGen/AMDGPU/32-bit-local-address-space.ll vendor/llvm/dist/test/CodeGen/AMDGPU/add.i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/add.ll vendor/llvm/dist/test/CodeGen/AMDGPU/amdgcn.private-memory.ll vendor/llvm/dist/test/CodeGen/AMDGPU/amdgpu.work-item-intrinsics.deprecated.ll vendor/llvm/dist/test/CodeGen/AMDGPU/and.ll vendor/llvm/dist/test/CodeGen/AMDGPU/anyext.ll vendor/llvm/dist/test/CodeGen/AMDGPU/atomic_cmp_swap_local.ll vendor/llvm/dist/test/CodeGen/AMDGPU/atomic_load_add.ll vendor/llvm/dist/test/CodeGen/AMDGPU/atomic_load_sub.ll vendor/llvm/dist/test/CodeGen/AMDGPU/basic-branch.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bfi_int.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bfm.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bitcast-vector-extract.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bitreverse.ll vendor/llvm/dist/test/CodeGen/AMDGPU/br_cc.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/branch-condition-and.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bswap.ll vendor/llvm/dist/test/CodeGen/AMDGPU/bug-vopc-commute.ll vendor/llvm/dist/test/CodeGen/AMDGPU/build_vector.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cgp-addressing-modes-flat.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cgp-addressing-modes.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cgp-bitfield-extract.ll vendor/llvm/dist/test/CodeGen/AMDGPU/concat_vectors.ll vendor/llvm/dist/test/CodeGen/AMDGPU/constant-fold-mi-operands.ll vendor/llvm/dist/test/CodeGen/AMDGPU/copy-illegal-type.ll vendor/llvm/dist/test/CodeGen/AMDGPU/copy-to-reg.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ctlz.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ctlz_zero_undef.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ctpop.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ctpop64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cttz_zero_undef.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cube.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cvt_rpi_i32_f32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/elf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/extload.ll vendor/llvm/dist/test/CodeGen/AMDGPU/extract_vector_elt-f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/extract_vector_elt-i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/extract_vector_elt-i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/extract_vector_elt-i8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fabs.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fadd.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fadd.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fadd64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fcanonicalize.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fceil.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fcmp.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fcmp64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fcopysign.f32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fcopysign.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fdiv.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fdiv.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fdiv.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ffloor.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ffloor.ll vendor/llvm/dist/test/CodeGen/AMDGPU/flat-address-space.ll vendor/llvm/dist/test/CodeGen/AMDGPU/flat-scratch-reg.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fma.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmax3.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmax3.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmaxnum.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmaxnum.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmin3.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fminnum.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmul-2-combine-multi-use.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmul.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmul.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmuladd.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fnearbyint.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg-combines.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg-fabs.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fp16_to_fp32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fp16_to_fp64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fp32_to_fp16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fp_to_sint.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fp_to_uint.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fpext.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fpext.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fptosi.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fptoui.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fptrunc.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fptrunc.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fract.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fract.ll vendor/llvm/dist/test/CodeGen/AMDGPU/frem.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fsqrt.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fsqrt.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fsub.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/ftrunc.ll vendor/llvm/dist/test/CodeGen/AMDGPU/gep-address-space.ll vendor/llvm/dist/test/CodeGen/AMDGPU/global-directive.ll vendor/llvm/dist/test/CodeGen/AMDGPU/global-extload-i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/global_atomics.ll vendor/llvm/dist/test/CodeGen/AMDGPU/global_atomics_i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/gv-const-addrspace.ll vendor/llvm/dist/test/CodeGen/AMDGPU/gv-offset-folding.ll vendor/llvm/dist/test/CodeGen/AMDGPU/half.ll vendor/llvm/dist/test/CodeGen/AMDGPU/hsa-note-no-func.ll vendor/llvm/dist/test/CodeGen/AMDGPU/i1-copy-phi.ll vendor/llvm/dist/test/CodeGen/AMDGPU/icmp64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/imm.ll vendor/llvm/dist/test/CodeGen/AMDGPU/imm16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/indirect-addressing-si.ll vendor/llvm/dist/test/CodeGen/AMDGPU/indirect-private-64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/infinite-loop.ll vendor/llvm/dist/test/CodeGen/AMDGPU/inline-asm.ll vendor/llvm/dist/test/CodeGen/AMDGPU/insert_vector_elt.ll vendor/llvm/dist/test/CodeGen/AMDGPU/inserted-wait-states.mir vendor/llvm/dist/test/CodeGen/AMDGPU/kernel-args.ll vendor/llvm/dist/test/CodeGen/AMDGPU/large-alloca-graphics.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.AMDGPU.bfe.i32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.AMDGPU.bfe.u32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.AMDGPU.clamp.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.atomic.dec.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.atomic.inc.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.class.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.cos.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.div.fixup.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.div.fixup.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.div.fmas.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.div.scale.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.fract.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.fract.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.frexp.exp.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.frexp.exp.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.frexp.mant.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.ldexp.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.mbcnt.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.mov.dpp.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.rcp.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.readlane.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.rsq.clamp.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.rsq.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.rsq.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.memrealtime.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.memtime.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.s.waitcnt.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.sffbh.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.sin.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.sin.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.trig.preop.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.amdgcn.workitem.id.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.ceil.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.cos.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.exp2.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.floor.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.fma.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.fmuladd.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.log2.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.maxnum.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.memcpy.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.minnum.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.r600.read.local.size.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.rint.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.round.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.sin.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.sqrt.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.trunc.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-constant-f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-constant-i1.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-constant-i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-constant-i32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-constant-i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-constant-i8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-f32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-i1.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-i32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-i8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-local-i32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-local-i8.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-weird-sizes.ll vendor/llvm/dist/test/CodeGen/AMDGPU/local-64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/local-atomics.ll vendor/llvm/dist/test/CodeGen/AMDGPU/local-atomics64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/local-stack-slot-bug.ll vendor/llvm/dist/test/CodeGen/AMDGPU/local-stack-slot-offset.ll vendor/llvm/dist/test/CodeGen/AMDGPU/lshl.ll vendor/llvm/dist/test/CodeGen/AMDGPU/lshr.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mad_int24.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mad_uint24.ll vendor/llvm/dist/test/CodeGen/AMDGPU/madak.ll vendor/llvm/dist/test/CodeGen/AMDGPU/madmk.ll vendor/llvm/dist/test/CodeGen/AMDGPU/max.i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/merge-store-usedef.ll vendor/llvm/dist/test/CodeGen/AMDGPU/min.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mubuf-shader-vgpr.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mul.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mul_int24.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mul_uint24-amdgcn.ll vendor/llvm/dist/test/CodeGen/AMDGPU/operand-spacing.ll vendor/llvm/dist/test/CodeGen/AMDGPU/or.ll vendor/llvm/dist/test/CodeGen/AMDGPU/rcp-pattern.ll vendor/llvm/dist/test/CodeGen/AMDGPU/readcyclecounter.ll vendor/llvm/dist/test/CodeGen/AMDGPU/reduce-load-width-alignment.ll vendor/llvm/dist/test/CodeGen/AMDGPU/reg-coalescer-sched-crash.ll vendor/llvm/dist/test/CodeGen/AMDGPU/reorder-stores.ll vendor/llvm/dist/test/CodeGen/AMDGPU/rotl.i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/rotr.i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/rotr.ll vendor/llvm/dist/test/CodeGen/AMDGPU/s_addk_i32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/s_movk_i32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/s_mulk_i32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/scalar_to_vector.ll vendor/llvm/dist/test/CodeGen/AMDGPU/schedule-kernel-arg-loads.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdiv.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdivrem24.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sdivrem64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select-fabs-fneg-extract.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select-i1.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select-vectors.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/selectcc-opt.ll vendor/llvm/dist/test/CodeGen/AMDGPU/setcc-opt.ll vendor/llvm/dist/test/CodeGen/AMDGPU/setcc64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/seto.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sext-in-reg.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sgpr-copy-duplicate-operand.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sgpr-copy.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shl.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shl_add_ptr.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-annotate-cf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-lod-bias.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-sgpr-spill.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-spill-cf.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-spill-sgpr-stack.ll vendor/llvm/dist/test/CodeGen/AMDGPU/si-vector-hang.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sign_extend.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sint_to_fp.i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sint_to_fp.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sitofp.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/smed3.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sminmax.ll vendor/llvm/dist/test/CodeGen/AMDGPU/smrd-vccz-bug.ll vendor/llvm/dist/test/CodeGen/AMDGPU/smrd.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sopk-compares.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sra.ll vendor/llvm/dist/test/CodeGen/AMDGPU/srl.ll vendor/llvm/dist/test/CodeGen/AMDGPU/store-global.ll vendor/llvm/dist/test/CodeGen/AMDGPU/store-v3i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sub.i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/trunc-bitcast-vector.ll vendor/llvm/dist/test/CodeGen/AMDGPU/trunc-cmp-constant.ll vendor/llvm/dist/test/CodeGen/AMDGPU/trunc-store-i1.ll vendor/llvm/dist/test/CodeGen/AMDGPU/trunc-store.ll vendor/llvm/dist/test/CodeGen/AMDGPU/uaddo.ll vendor/llvm/dist/test/CodeGen/AMDGPU/udiv.ll vendor/llvm/dist/test/CodeGen/AMDGPU/udivrem.ll vendor/llvm/dist/test/CodeGen/AMDGPU/udivrem24.ll vendor/llvm/dist/test/CodeGen/AMDGPU/udivrem64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/uint_to_fp.i64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/uint_to_fp.ll vendor/llvm/dist/test/CodeGen/AMDGPU/uitofp.f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/umed3.ll vendor/llvm/dist/test/CodeGen/AMDGPU/unaligned-load-store.ll vendor/llvm/dist/test/CodeGen/AMDGPU/uniform-cfg.ll vendor/llvm/dist/test/CodeGen/AMDGPU/urecip.ll vendor/llvm/dist/test/CodeGen/AMDGPU/urem.ll vendor/llvm/dist/test/CodeGen/AMDGPU/use-sgpr-multiple-times.ll vendor/llvm/dist/test/CodeGen/AMDGPU/v_cndmask.ll vendor/llvm/dist/test/CodeGen/AMDGPU/v_mac.ll vendor/llvm/dist/test/CodeGen/AMDGPU/v_mac_f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/v_madak_f16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot-compute.ll vendor/llvm/dist/test/CodeGen/AMDGPU/vselect.ll vendor/llvm/dist/test/CodeGen/AMDGPU/wait.ll vendor/llvm/dist/test/CodeGen/AMDGPU/waitcnt-flat.ll vendor/llvm/dist/test/CodeGen/AMDGPU/xor.ll vendor/llvm/dist/test/CodeGen/AMDGPU/zero_extend.ll vendor/llvm/dist/test/CodeGen/ARM/neon_div.ll vendor/llvm/dist/test/CodeGen/ARM/vector-load.ll vendor/llvm/dist/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/X86/avx-trunc.ll vendor/llvm/dist/test/CodeGen/X86/avx512-trunc.ll vendor/llvm/dist/test/CodeGen/X86/phaddsub.ll vendor/llvm/dist/test/MC/AMDGPU/vop3.s vendor/llvm/dist/test/Transforms/SimplifyCFG/sink-common-code.ll Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sun Jan 29 20:58:36 2017 (r312956) @@ -555,6 +555,8 @@ if(LLVM_USE_SANITIZER) append_common_sanitizer_flags() append("-fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + append("-fsanitize-blacklist=${CMAKE_SOURCE_DIR}/utils/sanitizers/ubsan_blacklist.txt" + CMAKE_C_FLAGS CMAKE_CXX_FLAGS) elseif (LLVM_USE_SANITIZER STREQUAL "Thread") append_common_sanitizer_flags() append("-fsanitize=thread" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) Modified: vendor/llvm/dist/include/llvm/IR/IntrinsicsAMDGPU.td ============================================================================== --- vendor/llvm/dist/include/llvm/IR/IntrinsicsAMDGPU.td Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/include/llvm/IR/IntrinsicsAMDGPU.td Sun Jan 29 20:58:36 2017 (r312956) @@ -100,6 +100,10 @@ def int_amdgcn_dispatch_id : GCCBuiltin<"__builtin_amdgcn_dispatch_id">, Intrinsic<[llvm_i64_ty], [], [IntrNoMem]>; +def int_amdgcn_implicit_buffer_ptr : + GCCBuiltin<"__builtin_amdgcn_implicit_buffer_ptr">, + Intrinsic<[LLVMQualPointerType], [], [IntrNoMem]>; + //===----------------------------------------------------------------------===// // Instruction Intrinsics //===----------------------------------------------------------------------===// Modified: vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -1191,14 +1191,14 @@ AliasResult BasicAAResult::aliasGEP(cons return MayAlias; AliasResult R = aliasCheck(UnderlyingV1, MemoryLocation::UnknownSize, - AAMDNodes(), V2, V2Size, V2AAInfo, - nullptr, UnderlyingV2); + AAMDNodes(), V2, MemoryLocation::UnknownSize, + V2AAInfo, nullptr, UnderlyingV2); if (R != MustAlias) // If V2 may alias GEP base pointer, conservatively returns MayAlias. // If V2 is known not to alias GEP base pointer, then the two values - // cannot alias per GEP semantics: "A pointer value formed from a - // getelementptr instruction is associated with the addresses associated - // with the first operand of the getelementptr". + // cannot alias per GEP semantics: "Any memory access must be done through + // a pointer value associated with an address range of the memory access, + // otherwise the behavior is undefined.". return R; // If the max search depth is reached the result is undefined Modified: vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp ============================================================================== --- vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -919,7 +919,8 @@ Error MetadataLoader::MetadataLoaderImpl // If this isn't a LocalAsMetadata record, we're dropping it. This used // to be legal, but there's no upgrade path. auto dropRecord = [&] { - MetadataList.assignValue(MDNode::get(Context, None), NextMetadataNo++); + MetadataList.assignValue(MDNode::get(Context, None), NextMetadataNo); + NextMetadataNo++; }; if (Record.size() != 2) { dropRecord(); @@ -934,7 +935,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( LocalAsMetadata::get(ValueList.getValueFwdRef(Record[1], Ty)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_OLD_NODE: { @@ -959,7 +961,8 @@ Error MetadataLoader::MetadataLoaderImpl } else Elts.push_back(nullptr); } - MetadataList.assignValue(MDNode::get(Context, Elts), NextMetadataNo++); + MetadataList.assignValue(MDNode::get(Context, Elts), NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_VALUE: { @@ -972,7 +975,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( ValueAsMetadata::get(ValueList.getValueFwdRef(Record[1], Ty)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_DISTINCT_NODE: @@ -985,7 +989,8 @@ Error MetadataLoader::MetadataLoaderImpl Elts.push_back(getMDOrNull(ID)); MetadataList.assignValue(IsDistinct ? MDNode::getDistinct(Context, Elts) : MDNode::get(Context, Elts), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_LOCATION: { @@ -999,7 +1004,8 @@ Error MetadataLoader::MetadataLoaderImpl Metadata *InlinedAt = getMDOrNull(Record[4]); MetadataList.assignValue( GET_OR_DISTINCT(DILocation, (Context, Line, Column, Scope, InlinedAt)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_GENERIC_DEBUG: { @@ -1019,7 +1025,8 @@ Error MetadataLoader::MetadataLoaderImpl DwarfOps.push_back(getMDOrNull(Record[I])); MetadataList.assignValue( GET_OR_DISTINCT(GenericDINode, (Context, Tag, Header, DwarfOps)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_SUBRANGE: { @@ -1030,7 +1037,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( GET_OR_DISTINCT(DISubrange, (Context, Record[1], unrotateSign(Record[2]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_ENUMERATOR: { @@ -1041,7 +1049,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( GET_OR_DISTINCT(DIEnumerator, (Context, unrotateSign(Record[1]), getMDString(Record[2]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_BASIC_TYPE: { @@ -1053,7 +1062,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DIBasicType, (Context, Record[1], getMDString(Record[2]), Record[3], Record[4], Record[5])), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_DERIVED_TYPE: { @@ -1069,7 +1079,8 @@ Error MetadataLoader::MetadataLoaderImpl getDITypeRefOrNull(Record[5]), getDITypeRefOrNull(Record[6]), Record[7], Record[8], Record[9], Flags, getDITypeRefOrNull(Record[11]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_COMPOSITE_TYPE: { @@ -1134,7 +1145,8 @@ Error MetadataLoader::MetadataLoaderImpl if (!IsNotUsedInTypeRef && Identifier) MetadataList.addTypeRef(*Identifier, *cast(CT)); - MetadataList.assignValue(CT, NextMetadataNo++); + MetadataList.assignValue(CT, NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_SUBROUTINE_TYPE: { @@ -1151,7 +1163,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( GET_OR_DISTINCT(DISubroutineType, (Context, Flags, CC, Types)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } @@ -1165,7 +1178,8 @@ Error MetadataLoader::MetadataLoaderImpl (Context, getMDOrNull(Record[1]), getMDString(Record[2]), getMDString(Record[3]), getMDString(Record[4]), getMDString(Record[5]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } @@ -1181,7 +1195,8 @@ Error MetadataLoader::MetadataLoaderImpl Record.size() == 3 ? DIFile::CSK_None : static_cast(Record[3]), Record.size() == 3 ? nullptr : getMDString(Record[4]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_COMPILE_UNIT: { @@ -1200,7 +1215,8 @@ Error MetadataLoader::MetadataLoaderImpl Record.size() <= 14 ? 0 : Record[14], Record.size() <= 16 ? true : Record[16]); - MetadataList.assignValue(CU, NextMetadataNo++); + MetadataList.assignValue(CU, NextMetadataNo); + NextMetadataNo++; // Move the Upgrade the list of subprograms. if (Metadata *SPs = getMDOrNullWithoutPlaceholders(Record[11])) @@ -1247,7 +1263,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[16 + Offset]), // declaration getMDOrNull(Record[17 + Offset]) // variables )); - MetadataList.assignValue(SP, NextMetadataNo++); + MetadataList.assignValue(SP, NextMetadataNo); + NextMetadataNo++; // Upgrade sp->function mapping to function->sp mapping. if (HasFn) { @@ -1272,7 +1289,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DILexicalBlock, (Context, getMDOrNull(Record[1]), getMDOrNull(Record[2]), Record[3], Record[4])), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_LEXICAL_BLOCK_FILE: { @@ -1284,7 +1302,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DILexicalBlockFile, (Context, getMDOrNull(Record[1]), getMDOrNull(Record[2]), Record[3])), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_NAMESPACE: { @@ -1298,7 +1317,8 @@ Error MetadataLoader::MetadataLoaderImpl (Context, getMDOrNull(Record[1]), getMDOrNull(Record[2]), getMDString(Record[3]), Record[4], ExportSymbols)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_MACRO: { @@ -1310,7 +1330,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DIMacro, (Context, Record[1], Record[2], getMDString(Record[3]), getMDString(Record[4]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_MACRO_FILE: { @@ -1322,7 +1343,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DIMacroFile, (Context, Record[1], Record[2], getMDOrNull(Record[3]), getMDOrNull(Record[4]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_TEMPLATE_TYPE: { @@ -1333,7 +1355,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue(GET_OR_DISTINCT(DITemplateTypeParameter, (Context, getMDString(Record[1]), getDITypeRefOrNull(Record[2]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_TEMPLATE_VALUE: { @@ -1346,7 +1369,8 @@ Error MetadataLoader::MetadataLoaderImpl (Context, Record[1], getMDString(Record[2]), getDITypeRefOrNull(Record[3]), getMDOrNull(Record[4]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_GLOBAL_VAR: { @@ -1364,7 +1388,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[4]), Record[5], getDITypeRefOrNull(Record[6]), Record[7], Record[8], getMDOrNull(Record[10]), Record[11])), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; } else if (Version == 0) { // Upgrade old metadata, which stored a global variable reference or a // ConstantInt here. @@ -1396,7 +1421,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[10]), AlignInBits)); auto *DGVE = DIGlobalVariableExpression::getDistinct(Context, DGV, Expr); - MetadataList.assignValue(DGVE, NextMetadataNo++); + MetadataList.assignValue(DGVE, NextMetadataNo); + NextMetadataNo++; if (Attach) Attach->addDebugInfo(DGVE); } else @@ -1429,7 +1455,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[3 + HasTag]), Record[4 + HasTag], getDITypeRefOrNull(Record[5 + HasTag]), Record[6 + HasTag], Flags, AlignInBits)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_EXPRESSION: { @@ -1446,7 +1473,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( GET_OR_DISTINCT(DIExpression, (Context, makeArrayRef(Record).slice(1))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_GLOBAL_VAR_EXPR: { @@ -1457,7 +1485,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue(GET_OR_DISTINCT(DIGlobalVariableExpression, (Context, getMDOrNull(Record[1]), getMDOrNull(Record[2]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_OBJC_PROPERTY: { @@ -1471,7 +1500,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[2]), Record[3], getMDString(Record[4]), getMDString(Record[5]), Record[6], getDITypeRefOrNull(Record[7]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_IMPORTED_ENTITY: { @@ -1484,7 +1514,8 @@ Error MetadataLoader::MetadataLoaderImpl (Context, Record[1], getMDOrNull(Record[2]), getDITypeRefOrNull(Record[3]), Record[4], getMDString(Record[5]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_STRING_OLD: { @@ -1494,13 +1525,15 @@ Error MetadataLoader::MetadataLoaderImpl HasSeenOldLoopTags |= mayBeOldLoopAttachmentTag(String); ++NumMDStringLoaded; Metadata *MD = MDString::get(Context, String); - MetadataList.assignValue(MD, NextMetadataNo++); + MetadataList.assignValue(MD, NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_STRINGS: { auto CreateNextMDString = [&](StringRef Str) { ++NumMDStringLoaded; - MetadataList.assignValue(MDString::get(Context, Str), NextMetadataNo++); + MetadataList.assignValue(MDString::get(Context, Str), NextMetadataNo); + NextMetadataNo++; }; if (Error Err = parseMetadataStrings(Record, Blob, CreateNextMDString)) return Err; Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -3439,7 +3439,10 @@ SDValue DAGTypeLegalizer::GenWidenVector LD->getPointerInfo().getWithOffset(Offset), MinAlign(Align, Increment), MMOFlags, AAInfo); LdChain.push_back(L.getValue(1)); - if (L->getValueType(0).isVector()) { + if (L->getValueType(0).isVector() && NewVTWidth >= LdWidth) { + // Later code assumes the vector loads produced will be mergeable, so we + // must pad the final entry up to the previous width. Scalars are + // combined separately. SmallVector Loads; Loads.push_back(L); unsigned size = L->getValueSizeInBits(0); Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64.td ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64.td Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64.td Sun Jan 29 20:58:36 2017 (r312956) @@ -85,9 +85,8 @@ def FeaturePostRAScheduler : SubtargetFe def FeatureSlowMisaligned128Store : SubtargetFeature<"slow-misaligned-128store", "Misaligned128StoreIsSlow", "true", "Misaligned 128 bit stores are slow">; -def FeatureAvoidQuadLdStPairs : SubtargetFeature<"no-quad-ldst-pairs", - "AvoidQuadLdStPairs", "true", - "Do not form quad load/store pair operations">; +def FeatureSlowPaired128 : SubtargetFeature<"slow-paired-128", + "Paired128IsSlow", "true", "Paired 128 bit loads and stores are slow">; def FeatureAlternateSExtLoadCVTF32Pattern : SubtargetFeature< "alternate-sextload-cvt-f32-pattern", "UseAlternateSExtLoadCVTF32Pattern", @@ -222,7 +221,7 @@ def ProcCyclone : SubtargetFeature<"cycl def ProcExynosM1 : SubtargetFeature<"exynosm1", "ARMProcFamily", "ExynosM1", "Samsung Exynos-M1 processors", - [FeatureAvoidQuadLdStPairs, + [FeatureSlowPaired128, FeatureCRC, FeatureCrypto, FeatureCustomCheapAsMoveHandling, @@ -236,7 +235,7 @@ def ProcExynosM1 : SubtargetFeature<"exy def ProcExynosM2 : SubtargetFeature<"exynosm2", "ARMProcFamily", "ExynosM1", "Samsung Exynos-M2/M3 processors", - [FeatureAvoidQuadLdStPairs, + [FeatureSlowPaired128, FeatureCRC, FeatureCrypto, FeatureCustomCheapAsMoveHandling, Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -1652,7 +1652,7 @@ bool AArch64InstrInfo::isCandidateToMerg return false; // On some CPUs quad load/store pairs are slower than two single load/stores. - if (Subtarget.avoidQuadLdStPairs()) { + if (Subtarget.isPaired128Slow()) { switch (MI.getOpcode()) { default: break; Modified: vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.h ============================================================================== --- vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.h Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.h Sun Jan 29 20:58:36 2017 (r312956) @@ -79,7 +79,7 @@ protected: bool CustomAsCheapAsMove = false; bool UsePostRAScheduler = false; bool Misaligned128StoreIsSlow = false; - bool AvoidQuadLdStPairs = false; + bool Paired128IsSlow = false; bool UseAlternateSExtLoadCVTF32Pattern = false; bool HasArithmeticBccFusion = false; bool HasArithmeticCbzFusion = false; @@ -189,7 +189,7 @@ public: } bool hasCustomCheapAsMoveHandling() const { return CustomAsCheapAsMove; } bool isMisaligned128StoreSlow() const { return Misaligned128StoreIsSlow; } - bool avoidQuadLdStPairs() const { return AvoidQuadLdStPairs; } + bool isPaired128Slow() const { return Paired128IsSlow; } bool useAlternateSExtLoadCVTF32Pattern() const { return UseAlternateSExtLoadCVTF32Pattern; } Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td Sun Jan 29 20:58:36 2017 (r312956) @@ -282,6 +282,12 @@ def FeatureEnableSIScheduler : Subtarget "Enable SI Machine Scheduler" >; +// Unless +-flat-for-global is specified, turn on FlatForGlobal for +// all OS-es on VI and newer hardware to avoid assertion failures due +// to missing ADDR64 variants of MUBUF instructions. +// FIXME: moveToVALU should be able to handle converting addr64 MUBUF +// instructions. + def FeatureFlatForGlobal : SubtargetFeature<"flat-for-global", "FlatForGlobal", "true", Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -140,7 +140,7 @@ bool AMDGPUAsmPrinter::isBlockOnlyReacha void AMDGPUAsmPrinter::EmitFunctionBodyStart() { const AMDGPUSubtarget &STM = MF->getSubtarget(); SIProgramInfo KernelInfo; - if (STM.isAmdCodeObjectV2()) { + if (STM.isAmdCodeObjectV2(*MF)) { getSIProgramInfo(KernelInfo, *MF); EmitAmdKernelCodeT(*MF, KernelInfo); } @@ -149,7 +149,7 @@ void AMDGPUAsmPrinter::EmitFunctionBodyS void AMDGPUAsmPrinter::EmitFunctionEntryLabel() { const SIMachineFunctionInfo *MFI = MF->getInfo(); const AMDGPUSubtarget &STM = MF->getSubtarget(); - if (MFI->isKernel() && STM.isAmdCodeObjectV2()) { + if (MFI->isKernel() && STM.isAmdCodeObjectV2(*MF)) { AMDGPUTargetStreamer *TS = static_cast(OutStreamer->getTargetStreamer()); SmallString<128> SymbolName; @@ -779,7 +779,7 @@ void AMDGPUAsmPrinter::EmitAmdKernelCode // FIXME: Should use getKernArgSize header.kernarg_segment_byte_size = - STM.getKernArgSegmentSize(MFI->getABIArgOffset()); + STM.getKernArgSegmentSize(MF, MFI->getABIArgOffset()); header.wavefront_sgpr_count = KernelInfo.NumSGPR; header.workitem_vgpr_count = KernelInfo.NumVGPR; header.workitem_private_segment_byte_size = KernelInfo.ScratchSize; Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -727,14 +727,8 @@ void AMDGPUDAGToDAGISel::SelectDIV_SCALE unsigned Opc = (VT == MVT::f64) ? AMDGPU::V_DIV_SCALE_F64 : AMDGPU::V_DIV_SCALE_F32; - // src0_modifiers, src0, src1_modifiers, src1, src2_modifiers, src2, clamp, - // omod - SDValue Ops[8]; - - SelectVOP3Mods0(N->getOperand(0), Ops[1], Ops[0], Ops[6], Ops[7]); - SelectVOP3Mods(N->getOperand(1), Ops[3], Ops[2]); - SelectVOP3Mods(N->getOperand(2), Ops[5], Ops[4]); - CurDAG->SelectNodeTo(N, Opc, VT, MVT::i1, Ops); + SDValue Ops[] = { N->getOperand(0), N->getOperand(1), N->getOperand(2) }; + CurDAG->SelectNodeTo(N, Opc, N->getVTList(), Ops); } bool AMDGPUDAGToDAGISel::isDSOffsetLegal(const SDValue &Base, unsigned Offset, Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -2855,6 +2855,9 @@ SDValue AMDGPUTargetLowering::performFNe SDLoc SL(N); switch (Opc) { case ISD::FADD: { + if (!mayIgnoreSignedZero(N0)) + return SDValue(); + // (fneg (fadd x, y)) -> (fadd (fneg x), (fneg y)) SDValue LHS = N0.getOperand(0); SDValue RHS = N0.getOperand(1); @@ -2895,6 +2898,9 @@ SDValue AMDGPUTargetLowering::performFNe } case ISD::FMA: case ISD::FMAD: { + if (!mayIgnoreSignedZero(N0)) + return SDValue(); + // (fneg (fma x, y, z)) -> (fma x, (fneg y), (fneg z)) SDValue LHS = N0.getOperand(0); SDValue MHS = N0.getOperand(1); @@ -3272,6 +3278,7 @@ const char* AMDGPUTargetLowering::getTar NODE_NAME_CASE(CONST_DATA_PTR) NODE_NAME_CASE(PC_ADD_REL_OFFSET) NODE_NAME_CASE(KILL) + NODE_NAME_CASE(DUMMY_CHAIN) case AMDGPUISD::FIRST_MEM_OPCODE_NUMBER: break; NODE_NAME_CASE(SENDMSG) NODE_NAME_CASE(SENDMSGHALT) Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h Sun Jan 29 20:58:36 2017 (r312956) @@ -119,6 +119,16 @@ protected: public: AMDGPUTargetLowering(const TargetMachine &TM, const AMDGPUSubtarget &STI); + bool mayIgnoreSignedZero(SDValue Op) const { + if (getTargetMachine().Options.UnsafeFPMath) // FIXME: nsz only + return true; + + if (const auto *BO = dyn_cast(Op)) + return BO->Flags.hasNoSignedZeros(); + + return false; + } + bool isFAbsFree(EVT VT) const override; bool isFNegFree(EVT VT) const override; bool isTruncateFree(EVT Src, EVT Dest) const override; @@ -320,6 +330,7 @@ enum NodeType : unsigned { INTERP_P2, PC_ADD_REL_OFFSET, KILL, + DUMMY_CHAIN, FIRST_MEM_OPCODE_NUMBER = ISD::FIRST_TARGET_MEMORY_OPCODE, STORE_MSKOR, LOAD_CONSTANT, Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.td ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.td Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstrInfo.td Sun Jan 29 20:58:36 2017 (r312956) @@ -54,6 +54,9 @@ def AMDGPUconstdata_ptr : SDNode< // This argument to this node is a dword address. def AMDGPUdwordaddr : SDNode<"AMDGPUISD::DWORDADDR", SDTIntUnaryOp>; +// Force dependencies for vector trunc stores +def R600dummy_chain : SDNode<"AMDGPUISD::DUMMY_CHAIN", SDTNone, [SDNPHasChain]>; + def AMDGPUcos : SDNode<"AMDGPUISD::COS_HW", SDTFPUnaryOp>; def AMDGPUsin : SDNode<"AMDGPUISD::SIN_HW", SDTFPUnaryOp>; Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -48,6 +48,13 @@ AMDGPUSubtarget::initializeSubtargetDepe ParseSubtargetFeatures(GPU, FullFS); + // Unless +-flat-for-global is specified, turn on FlatForGlobal for all OS-es + // on VI and newer hardware to avoid assertion failures due to missing ADDR64 + // variants of MUBUF instructions. + if (!hasAddr64() && !FS.contains("flat-for-global")) { + FlatForGlobal = true; + } + // FIXME: I don't think think Evergreen has any useful support for // denormals, but should be checked. Should we issue a warning somewhere // if someone tries to enable these? @@ -297,8 +304,9 @@ bool SISubtarget::isVGPRSpillingEnabled( return EnableVGPRSpilling || !AMDGPU::isShader(F.getCallingConv()); } -unsigned SISubtarget::getKernArgSegmentSize(unsigned ExplicitArgBytes) const { - unsigned ImplicitBytes = getImplicitArgNumBytes(); +unsigned SISubtarget::getKernArgSegmentSize(const MachineFunction &MF, + unsigned ExplicitArgBytes) const { + unsigned ImplicitBytes = getImplicitArgNumBytes(MF); if (ImplicitBytes == 0) return ExplicitArgBytes; Modified: vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h Sun Jan 29 20:58:36 2017 (r312956) @@ -311,22 +311,31 @@ public: return EnableXNACK; } - bool isAmdCodeObjectV2() const { - return isAmdHsaOS() || isMesa3DOS(); + bool isMesaKernel(const MachineFunction &MF) const { + return isMesa3DOS() && !AMDGPU::isShader(MF.getFunction()->getCallingConv()); + } + + // Covers VS/PS/CS graphics shaders + bool isMesaGfxShader(const MachineFunction &MF) const { + return isMesa3DOS() && AMDGPU::isShader(MF.getFunction()->getCallingConv()); + } + + bool isAmdCodeObjectV2(const MachineFunction &MF) const { + return isAmdHsaOS() || isMesaKernel(MF); } /// \brief Returns the offset in bytes from the start of the input buffer /// of the first explicit kernel argument. - unsigned getExplicitKernelArgOffset() const { - return isAmdCodeObjectV2() ? 0 : 36; + unsigned getExplicitKernelArgOffset(const MachineFunction &MF) const { + return isAmdCodeObjectV2(MF) ? 0 : 36; } unsigned getAlignmentForImplicitArgPtr() const { return isAmdHsaOS() ? 8 : 4; } - unsigned getImplicitArgNumBytes() const { - if (isMesa3DOS()) + unsigned getImplicitArgNumBytes(const MachineFunction &MF) const { + if (isMesaKernel(MF)) return 16; if (isAmdHsaOS() && isOpenCLEnv()) return 32; @@ -585,7 +594,7 @@ public: return getGeneration() != AMDGPUSubtarget::SOUTHERN_ISLANDS; } - unsigned getKernArgSegmentSize(unsigned ExplictArgBytes) const; + unsigned getKernArgSegmentSize(const MachineFunction &MF, unsigned ExplictArgBytes) const; /// Return the maximum number of waves per SIMD for kernels using \p SGPRs SGPRs unsigned getOccupancyWithNumSGPRs(unsigned SGPRs) const; Modified: vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -1115,7 +1115,10 @@ SDValue R600TargetLowering::lowerPrivate llvm_unreachable("Unsupported private trunc store"); } - SDValue Chain = Store->getChain(); + SDValue OldChain = Store->getChain(); + bool VectorTrunc = (OldChain.getOpcode() == AMDGPUISD::DUMMY_CHAIN); + // Skip dummy + SDValue Chain = VectorTrunc ? OldChain->getOperand(0) : OldChain; SDValue BasePtr = Store->getBasePtr(); SDValue Offset = Store->getOffset(); EVT MemVT = Store->getMemoryVT(); @@ -1171,7 +1174,15 @@ SDValue R600TargetLowering::lowerPrivate // Store dword // TODO: Can we be smarter about MachinePointerInfo? - return DAG.getStore(Chain, DL, Value, Ptr, MachinePointerInfo()); + SDValue NewStore = DAG.getStore(Chain, DL, Value, Ptr, MachinePointerInfo()); + + // If we are part of expanded vector, make our neighbors depend on this store + if (VectorTrunc) { + // Make all other vector elements depend on this store + Chain = DAG.getNode(AMDGPUISD::DUMMY_CHAIN, DL, MVT::Other, NewStore); + DAG.ReplaceAllUsesOfValueWith(OldChain, Chain); + } + return NewStore; } SDValue R600TargetLowering::LowerSTORE(SDValue Op, SelectionDAG &DAG) const { @@ -1191,6 +1202,17 @@ SDValue R600TargetLowering::LowerSTORE(S // Neither LOCAL nor PRIVATE can do vectors at the moment if ((AS == AMDGPUAS::LOCAL_ADDRESS || AS == AMDGPUAS::PRIVATE_ADDRESS) && VT.isVector()) { + if ((AS == AMDGPUAS::PRIVATE_ADDRESS) && StoreNode->isTruncatingStore()) { + // Add an extra level of chain to isolate this vector + SDValue NewChain = DAG.getNode(AMDGPUISD::DUMMY_CHAIN, DL, MVT::Other, Chain); + // TODO: can the chain be replaced without creating a new store? + SDValue NewStore = DAG.getTruncStore( + NewChain, DL, Value, Ptr, StoreNode->getPointerInfo(), + MemVT, StoreNode->getAlignment(), + StoreNode->getMemOperand()->getFlags(), StoreNode->getAAInfo()); + StoreNode = cast(NewStore); + } + return scalarizeVectorStore(StoreNode, DAG); } @@ -1225,7 +1247,7 @@ SDValue R600TargetLowering::LowerSTORE(S // Put the mask in correct place SDValue Mask = DAG.getNode(ISD::SHL, DL, VT, MaskConstant, BitShift); - // Put the mask in correct place + // Put the value bits in correct place SDValue TruncValue = DAG.getNode(ISD::AND, DL, VT, Value, MaskConstant); SDValue ShiftedValue = DAG.getNode(ISD::SHL, DL, VT, TruncValue, BitShift); @@ -1560,7 +1582,7 @@ SDValue R600TargetLowering::LowerFormalA unsigned ValBase = ArgLocs[In.getOrigArgIndex()].getLocMemOffset(); unsigned PartOffset = VA.getLocMemOffset(); - unsigned Offset = Subtarget->getExplicitKernelArgOffset() + VA.getLocMemOffset(); + unsigned Offset = Subtarget->getExplicitKernelArgOffset(MF) + VA.getLocMemOffset(); MachinePointerInfo PtrInfo(UndefValue::get(PtrTy), PartOffset - ValBase); SDValue Arg = DAG.getLoad( Modified: vendor/llvm/dist/lib/Target/AMDGPU/R600Instructions.td ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/R600Instructions.td Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/R600Instructions.td Sun Jan 29 20:58:36 2017 (r312956) @@ -727,6 +727,20 @@ def FLOOR : R600_1OP_Helper <0x14, "FLOO def MOV : R600_1OP <0x19, "MOV", []>; + +// This is a hack to get rid of DUMMY_CHAIN nodes. +// Most DUMMY_CHAINs should be eliminated during legalization, but undef +// values can sneak in some to selection. +let isPseudo = 1, isCodeGenOnly = 1 in { +def DUMMY_CHAIN : AMDGPUInst < + (outs), + (ins), + "DUMMY_CHAIN", + [(R600dummy_chain)] +>; +} // end let isPseudo = 1, isCodeGenOnly = 1 + + let isPseudo = 1, isCodeGenOnly = 1, usesCustomInserter = 1 in { class MOV_IMM : AMDGPUInst < Modified: vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -237,7 +237,7 @@ void SIFrameLowering::emitPrologue(Machi unsigned PreloadedPrivateBufferReg = AMDGPU::NoRegister; - if (ST.isAmdCodeObjectV2()) { + if (ST.isAmdCodeObjectV2(MF) || ST.isMesaGfxShader(MF)) { PreloadedPrivateBufferReg = TRI->getPreloadedValue( MF, SIRegisterInfo::PRIVATE_SEGMENT_BUFFER); } @@ -255,7 +255,7 @@ void SIFrameLowering::emitPrologue(Machi } if (ResourceRegUsed && PreloadedPrivateBufferReg != AMDGPU::NoRegister) { - assert(ST.isAmdCodeObjectV2()); + assert(ST.isAmdCodeObjectV2(MF) || ST.isMesaGfxShader(MF)); MRI.addLiveIn(PreloadedPrivateBufferReg); MBB.addLiveIn(PreloadedPrivateBufferReg); } @@ -280,6 +280,7 @@ void SIFrameLowering::emitPrologue(Machi bool CopyBuffer = ResourceRegUsed && PreloadedPrivateBufferReg != AMDGPU::NoRegister && + ST.isAmdCodeObjectV2(MF) && ScratchRsrcReg != PreloadedPrivateBufferReg; // This needs to be careful of the copying order to avoid overwriting one of @@ -303,24 +304,57 @@ void SIFrameLowering::emitPrologue(Machi .addReg(PreloadedPrivateBufferReg, RegState::Kill); } - if (ResourceRegUsed && PreloadedPrivateBufferReg == AMDGPU::NoRegister) { - assert(!ST.isAmdCodeObjectV2()); + if (ResourceRegUsed && (ST.isMesaGfxShader(MF) || (PreloadedPrivateBufferReg == AMDGPU::NoRegister))) { + assert(!ST.isAmdCodeObjectV2(MF)); const MCInstrDesc &SMovB32 = TII->get(AMDGPU::S_MOV_B32); - unsigned Rsrc0 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub0); - unsigned Rsrc1 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub1); unsigned Rsrc2 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub2); unsigned Rsrc3 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub3); // Use relocations to get the pointer, and setup the other bits manually. uint64_t Rsrc23 = TII->getScratchRsrcWords23(); - BuildMI(MBB, I, DL, SMovB32, Rsrc0) - .addExternalSymbol("SCRATCH_RSRC_DWORD0") - .addReg(ScratchRsrcReg, RegState::ImplicitDefine); - BuildMI(MBB, I, DL, SMovB32, Rsrc1) - .addExternalSymbol("SCRATCH_RSRC_DWORD1") - .addReg(ScratchRsrcReg, RegState::ImplicitDefine); + if (MFI->hasPrivateMemoryInputPtr()) { + unsigned Rsrc01 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub0_sub1); + + if (AMDGPU::isCompute(MF.getFunction()->getCallingConv())) { + const MCInstrDesc &Mov64 = TII->get(AMDGPU::S_MOV_B64); + + BuildMI(MBB, I, DL, Mov64, Rsrc01) + .addReg(PreloadedPrivateBufferReg) + .addReg(ScratchRsrcReg, RegState::ImplicitDefine); + } else { + const MCInstrDesc &LoadDwordX2 = TII->get(AMDGPU::S_LOAD_DWORDX2_IMM); + + PointerType *PtrTy = + PointerType::get(Type::getInt64Ty(MF.getFunction()->getContext()), + AMDGPUAS::CONSTANT_ADDRESS); + MachinePointerInfo PtrInfo(UndefValue::get(PtrTy)); + auto MMO = MF.getMachineMemOperand(PtrInfo, + MachineMemOperand::MOLoad | + MachineMemOperand::MOInvariant | + MachineMemOperand::MODereferenceable, + 0, 0); + BuildMI(MBB, I, DL, LoadDwordX2, Rsrc01) + .addReg(PreloadedPrivateBufferReg) + .addImm(0) // offset + .addImm(0) // glc + .addMemOperand(MMO) + .addReg(ScratchRsrcReg, RegState::ImplicitDefine); + } + } else { + unsigned Rsrc0 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub0); + unsigned Rsrc1 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub1); + + BuildMI(MBB, I, DL, SMovB32, Rsrc0) + .addExternalSymbol("SCRATCH_RSRC_DWORD0") + .addReg(ScratchRsrcReg, RegState::ImplicitDefine); + + BuildMI(MBB, I, DL, SMovB32, Rsrc1) + .addExternalSymbol("SCRATCH_RSRC_DWORD1") + .addReg(ScratchRsrcReg, RegState::ImplicitDefine); + + } BuildMI(MBB, I, DL, SMovB32, Rsrc2) .addImm(Rsrc23 & 0xffffffff) Modified: vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -842,7 +842,7 @@ SDValue SITargetLowering::LowerFormalArg if (!AMDGPU::isShader(CallConv)) { assert(Info->hasWorkGroupIDX() && Info->hasWorkItemIDX()); } else { - assert(!Info->hasPrivateSegmentBuffer() && !Info->hasDispatchPtr() && + assert(!Info->hasDispatchPtr() && !Info->hasKernargSegmentPtr() && !Info->hasFlatScratchInit() && !Info->hasWorkGroupIDX() && !Info->hasWorkGroupIDY() && !Info->hasWorkGroupIDZ() && !Info->hasWorkGroupInfo() && @@ -850,6 +850,12 @@ SDValue SITargetLowering::LowerFormalArg !Info->hasWorkItemIDZ()); } + if (Info->hasPrivateMemoryInputPtr()) { + unsigned PrivateMemoryPtrReg = Info->addPrivateMemoryPtr(*TRI); + MF.addLiveIn(PrivateMemoryPtrReg, &AMDGPU::SReg_64RegClass); + CCInfo.AllocateReg(PrivateMemoryPtrReg); + } + // FIXME: How should these inputs interact with inreg / custom SGPR inputs? if (Info->hasPrivateSegmentBuffer()) { unsigned PrivateSegmentBufferReg = Info->addPrivateSegmentBuffer(*TRI); @@ -908,7 +914,7 @@ SDValue SITargetLowering::LowerFormalArg if (VA.isMemLoc()) { VT = Ins[i].VT; EVT MemVT = VA.getLocVT(); - const unsigned Offset = Subtarget->getExplicitKernelArgOffset() + + const unsigned Offset = Subtarget->getExplicitKernelArgOffset(MF) + VA.getLocMemOffset(); // The first 36 bytes of the input buffer contains information about // thread group and global sizes. @@ -1033,7 +1039,7 @@ SDValue SITargetLowering::LowerFormalArg if (getTargetMachine().getOptLevel() == CodeGenOpt::None) HasStackObjects = true; - if (ST.isAmdCodeObjectV2()) { + if (ST.isAmdCodeObjectV2(MF)) { if (HasStackObjects) { // If we have stack objects, we unquestionably need the private buffer // resource. For the Code Object V2 ABI, this will be the first 4 user @@ -2362,9 +2368,13 @@ SDValue SITargetLowering::LowerINTRINSIC // TODO: Should this propagate fast-math-flags? switch (IntrinsicID) { + case Intrinsic::amdgcn_implicit_buffer_ptr: { + unsigned Reg = TRI->getPreloadedValue(MF, SIRegisterInfo::PRIVATE_SEGMENT_BUFFER); + return CreateLiveInRegister(DAG, &AMDGPU::SReg_64RegClass, Reg, VT); + } case Intrinsic::amdgcn_dispatch_ptr: case Intrinsic::amdgcn_queue_ptr: { - if (!Subtarget->isAmdCodeObjectV2()) { + if (!Subtarget->isAmdCodeObjectV2(MF)) { DiagnosticInfoUnsupported BadIntrin( *MF.getFunction(), "unsupported hsa intrinsic without hsa target", DL.getDebugLoc()); Modified: vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp Sun Jan 29 20:58:36 2017 (r312956) @@ -77,7 +77,8 @@ SIMachineFunctionInfo::SIMachineFunction PrivateSegmentWaveByteOffset(false), WorkItemIDX(false), WorkItemIDY(false), - WorkItemIDZ(false) { + WorkItemIDZ(false), + PrivateMemoryInputPtr(false) { const SISubtarget &ST = MF.getSubtarget(); const Function *F = MF.getFunction(); @@ -114,7 +115,7 @@ SIMachineFunctionInfo::SIMachineFunction if (HasStackObjects || MaySpill) PrivateSegmentWaveByteOffset = true; - if (ST.isAmdCodeObjectV2()) { + if (ST.isAmdCodeObjectV2(MF)) { if (HasStackObjects || MaySpill) PrivateSegmentBuffer = true; @@ -126,6 +127,9 @@ SIMachineFunctionInfo::SIMachineFunction if (F->hasFnAttribute("amdgpu-dispatch-id")) DispatchID = true; + } else if (ST.isMesaGfxShader(MF)) { + if (HasStackObjects || MaySpill) + PrivateMemoryInputPtr = true; } // We don't need to worry about accessing spills with flat instructions. @@ -182,6 +186,13 @@ unsigned SIMachineFunctionInfo::addFlatS return FlatScratchInitUserSGPR; } +unsigned SIMachineFunctionInfo::addPrivateMemoryPtr(const SIRegisterInfo &TRI) { + PrivateMemoryPtrUserSGPR = TRI.getMatchingSuperReg( + getNextUserSGPR(), AMDGPU::sub0, &AMDGPU::SReg_64RegClass); + NumUserSGPRs += 2; + return PrivateMemoryPtrUserSGPR; +} + SIMachineFunctionInfo::SpilledReg SIMachineFunctionInfo::getSpilledReg ( MachineFunction *MF, unsigned FrameIndex, Modified: vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.h ============================================================================== --- vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.h Sun Jan 29 19:54:34 2017 (r312955) +++ vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.h Sun Jan 29 20:58:36 2017 (r312956) @@ -84,6 +84,9 @@ class SIMachineFunctionInfo final : publ unsigned ScratchRSrcReg; unsigned ScratchWaveOffsetReg; + // Input registers for non-HSA ABI + unsigned PrivateMemoryPtrUserSGPR; + // Input registers setup for the HSA ABI. // User SGPRs in allocation order. unsigned PrivateSegmentBufferUserSGPR; @@ -163,6 +166,11 @@ private: bool WorkItemIDY : 1; bool WorkItemIDZ : 1; + // Private memory buffer + // Compute directly in sgpr[0:1] + // Other shaders indirect 64-bits at sgpr[0:1] + bool PrivateMemoryInputPtr : 1; + MCPhysReg getNextUserSGPR() const { assert(NumSystemSGPRs == 0 && "System SGPRs must be added after user SGPRs"); return AMDGPU::SGPR0 + NumUserSGPRs; @@ -198,6 +206,7 @@ public: unsigned addKernargSegmentPtr(const SIRegisterInfo &TRI); unsigned addDispatchID(const SIRegisterInfo &TRI); unsigned addFlatScratchInit(const SIRegisterInfo &TRI); + unsigned addPrivateMemoryPtr(const SIRegisterInfo &TRI); // Add system SGPRs. unsigned addWorkGroupIDX() { @@ -302,6 +311,10 @@ public: return WorkItemIDZ; } + bool hasPrivateMemoryInputPtr() const { + return PrivateMemoryInputPtr; + } + unsigned getNumUserSGPRs() const { return NumUserSGPRs; } @@ -338,6 +351,10 @@ public: return QueuePtrUserSGPR; } + unsigned getPrivateMemoryPtrUserSGPR() const { + return PrivateMemoryPtrUserSGPR; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jan 29 20:58:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DF66CC7F5D; Sun, 29 Jan 2017 20:58:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E81F0133B; Sun, 29 Jan 2017 20:58:43 +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 v0TKwhpt074987; Sun, 29 Jan 2017 20:58:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKwhJ0074986; Sun, 29 Jan 2017 20:58:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292058.v0TKwhJ0074986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312957 - vendor/llvm/llvm-release_40-r293443 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:58:44 -0000 Author: dim Date: Sun Jan 29 20:58:42 2017 New Revision: 312957 URL: https://svnweb.freebsd.org/changeset/base/312957 Log: Tag llvm release_40 branch r293443. Added: vendor/llvm/llvm-release_40-r293443/ - copied from r312956, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Sun Jan 29 20:58:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC615CC7FA6; Sun, 29 Jan 2017 20:58:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 719FC13CE; Sun, 29 Jan 2017 20:58:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TKwqVV075094; Sun, 29 Jan 2017 20:58:52 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKwqsU075093; Sun, 29 Jan 2017 20:58:52 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292058.v0TKwqsU075093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312959 - vendor/clang/clang-release_40-r293443 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:58:53 -0000 Author: dim Date: Sun Jan 29 20:58:52 2017 New Revision: 312959 URL: https://svnweb.freebsd.org/changeset/base/312959 Log: Tag clang release_40 branch r293443. Added: vendor/clang/clang-release_40-r293443/ - copied from r312958, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Sun Jan 29 20:59:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 285BACC6013; Sun, 29 Jan 2017 20:59:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D300B14D6; Sun, 29 Jan 2017 20:58:59 +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 v0TKwwen075190; Sun, 29 Jan 2017 20:58:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKwwIv075189; Sun, 29 Jan 2017 20:58:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292058.v0TKwwIv075189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312961 - vendor/compiler-rt/compiler-rt-release_40-r293443 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:59:00 -0000 Author: dim Date: Sun Jan 29 20:58:58 2017 New Revision: 312961 URL: https://svnweb.freebsd.org/changeset/base/312961 Log: Tag compiler-rt release_40 branch r293443. Added: vendor/compiler-rt/compiler-rt-release_40-r293443/ - copied from r312960, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Sun Jan 29 20:58:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E851CC7FD5; Sun, 29 Jan 2017 20:58:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 190511454; Sun, 29 Jan 2017 20:58:56 +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 v0TKwteQ075143; Sun, 29 Jan 2017 20:58:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKwsWw075140; Sun, 29 Jan 2017 20:58:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292058.v0TKwsWw075140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312960 - in vendor/compiler-rt/dist: lib/builtins/arm lib/xray test/xray X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:58:56 -0000 Author: dim Date: Sun Jan 29 20:58:54 2017 New Revision: 312960 URL: https://svnweb.freebsd.org/changeset/base/312960 Log: Vendor import of compiler-rt release_40 branch r293443: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_40@293443 Modified: vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S vendor/compiler-rt/dist/lib/xray/xray_arm.cc vendor/compiler-rt/dist/test/xray/lit.cfg Modified: vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S Sun Jan 29 20:58:52 2017 (r312959) +++ vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S Sun Jan 29 20:58:54 2017 (r312960) @@ -283,7 +283,7 @@ DEFINE_COMPILERRT_FUNCTION(__unordsf2) END_COMPILERRT_FUNCTION(__unordsf2) #if defined(COMPILER_RT_ARMHF_TARGET) -DEFINE_COMPILERRT_FUNCTION(__aeabi_fcmpum): +DEFINE_COMPILERRT_FUNCTION(__aeabi_fcmpum) vmov s0, r0 vmov s1, r1 b SYMBOL_NAME(__unordsf2) Modified: vendor/compiler-rt/dist/lib/xray/xray_arm.cc ============================================================================== --- vendor/compiler-rt/dist/lib/xray/xray_arm.cc Sun Jan 29 20:58:52 2017 (r312959) +++ vendor/compiler-rt/dist/lib/xray/xray_arm.cc Sun Jan 29 20:58:54 2017 (r312960) @@ -19,6 +19,8 @@ #include #include +extern "C" void __clear_cache(void* start, void* end); + namespace __xray { uint64_t cycleFrequency() XRAY_NEVER_INSTRUMENT { @@ -116,8 +118,8 @@ inline static bool patchSled(const bool // B #20 uint32_t *FirstAddress = reinterpret_cast(Sled.Address); + uint32_t *CurAddress = FirstAddress + 1; if (Enable) { - uint32_t *CurAddress = FirstAddress + 1; CurAddress = Write32bitLoadR0(CurAddress, reinterpret_cast(FuncId)); CurAddress = @@ -125,6 +127,7 @@ inline static bool patchSled(const bool *CurAddress = uint32_t(PatchOpcodes::PO_BlxIp); CurAddress++; *CurAddress = uint32_t(PatchOpcodes::PO_PopR0Lr); + CurAddress++; std::atomic_store_explicit( reinterpret_cast *>(FirstAddress), uint32_t(PatchOpcodes::PO_PushR0Lr), std::memory_order_release); @@ -133,6 +136,8 @@ inline static bool patchSled(const bool reinterpret_cast *>(FirstAddress), uint32_t(PatchOpcodes::PO_B20), std::memory_order_release); } + __clear_cache(reinterpret_cast(FirstAddress), + reinterpret_cast(CurAddress)); return true; } Modified: vendor/compiler-rt/dist/test/xray/lit.cfg ============================================================================== --- vendor/compiler-rt/dist/test/xray/lit.cfg Sun Jan 29 20:58:52 2017 (r312959) +++ vendor/compiler-rt/dist/test/xray/lit.cfg Sun Jan 29 20:58:54 2017 (r312960) @@ -30,8 +30,14 @@ config.substitutions.append( # Default test suffixes. config.suffixes = ['.c', '.cc', '.cpp'] -if config.host_os not in ['Linux'] or config.host_arch.find('64') == -1: +if config.host_os not in ['Linux']: config.unsupported = True +elif '64' not in config.host_arch: + if 'arm' in config.host_arch: + if '-mthumb' in config.target_cflags: + config.unsupported = True + else: + config.unsupported = True # Allow tests to use REQUIRES=stable-runtime. For use when you cannot use XFAIL # e.g. because the test sometimes passes, sometimes fails. From owner-svn-src-all@freebsd.org Sun Jan 29 20:59:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1A32CC60F4; Sun, 29 Jan 2017 20:59:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 408CA1631; Sun, 29 Jan 2017 20:59:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TKx8gI075311; Sun, 29 Jan 2017 20:59:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKx8di075310; Sun, 29 Jan 2017 20:59:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292059.v0TKx8di075310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312963 - vendor/libc++/libc++-release_40-r293443 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:59:09 -0000 Author: dim Date: Sun Jan 29 20:59:08 2017 New Revision: 312963 URL: https://svnweb.freebsd.org/changeset/base/312963 Log: Tag libc++ release_40 branch r293443. Added: vendor/libc++/libc++-release_40-r293443/ - copied from r312962, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Sun Jan 29 20:58:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8535CC7F86; Sun, 29 Jan 2017 20:58:49 +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 6DB041378; Sun, 29 Jan 2017 20:58:49 +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 v0TKwmHX075047; Sun, 29 Jan 2017 20:58:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKwlau075033; Sun, 29 Jan 2017 20:58:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292058.v0TKwlau075033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:58:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312958 - in vendor/clang/dist: lib/AST lib/CodeGen lib/Index lib/Sema test/Index test/Index/Core test/OpenMP test/SemaCXX tools/libclang X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:58:49 -0000 Author: dim Date: Sun Jan 29 20:58:47 2017 New Revision: 312958 URL: https://svnweb.freebsd.org/changeset/base/312958 Log: Vendor import of clang release_40 branch r293443: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293443 Added: vendor/clang/dist/test/OpenMP/openmp_seh.c (contents, props changed) Modified: vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/Index/IndexDecl.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/test/Index/Core/index-source.m vendor/clang/dist/test/Index/Core/index-subkinds.m vendor/clang/dist/test/Index/index-decls.m vendor/clang/dist/test/Index/index-module.m vendor/clang/dist/test/SemaCXX/constant-expression.cpp vendor/clang/dist/test/SemaCXX/new-delete-cxx0x.cpp vendor/clang/dist/tools/libclang/CXIndexDataConsumer.cpp vendor/clang/dist/tools/libclang/CXIndexDataConsumer.h Modified: vendor/clang/dist/lib/AST/ASTContext.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTContext.cpp Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/lib/AST/ASTContext.cpp Sun Jan 29 20:58:47 2017 (r312958) @@ -9025,7 +9025,8 @@ bool ASTContext::DeclMustBeEmitted(const // Variables that have initialization with side-effects are required. if (VD->getInit() && VD->getInit()->HasSideEffects(*this) && - !VD->evaluateValue()) + // We can get a value-dependent initializer during error recovery. + (VD->getInit()->isValueDependent() || !VD->evaluateValue())) return true; // Likewise, variables with tuple-like bindings are required if their Modified: vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp Sun Jan 29 20:58:47 2017 (r312958) @@ -112,9 +112,8 @@ CodeGenFunction::~CodeGenFunction() { if (FirstBlockInfo) destroyBlockInfos(FirstBlockInfo); - if (getLangOpts().OpenMP) { + if (getLangOpts().OpenMP && CurFn) CGM.getOpenMPRuntime().functionFinished(*this); - } } CharUnits CodeGenFunction::getNaturalPointeeTypeAlignment(QualType T, Modified: vendor/clang/dist/lib/Index/IndexDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Index/IndexDecl.cpp Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/lib/Index/IndexDecl.cpp Sun Jan 29 20:58:47 2017 (r312958) @@ -92,7 +92,13 @@ public: Relations.emplace_back((unsigned)SymbolRole::RelationAccessorOf, AssociatedProp); - if (!IndexCtx.handleDecl(D, (unsigned)SymbolRole::Dynamic, Relations)) + // getLocation() returns beginning token of a method declaration, but for + // indexing purposes we want to point to the base name. + SourceLocation MethodLoc = D->getSelectorStartLoc(); + if (MethodLoc.isInvalid()) + MethodLoc = D->getLocation(); + + if (!IndexCtx.handleDecl(D, MethodLoc, (unsigned)SymbolRole::Dynamic, Relations)) return false; IndexCtx.indexTypeSourceInfo(D->getReturnTypeSourceInfo(), D); bool hasIBActionAndFirst = D->hasAttr(); Modified: vendor/clang/dist/lib/Sema/SemaInit.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaInit.cpp Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/lib/Sema/SemaInit.cpp Sun Jan 29 20:58:47 2017 (r312958) @@ -1684,7 +1684,7 @@ void InitListChecker::CheckArrayType(con // If this is an incomplete array type, the actual type needs to // be calculated here. llvm::APSInt Zero(maxElements.getBitWidth(), maxElements.isUnsigned()); - if (maxElements == Zero) { + if (maxElements == Zero && !Entity.isVariableLengthArrayNew()) { // Sizing an array implicitly to zero is not allowed by ISO C, // but is supported by GNU. SemaRef.Diag(IList->getLocStart(), Modified: vendor/clang/dist/test/Index/Core/index-source.m ============================================================================== --- vendor/clang/dist/test/Index/Core/index-source.m Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/test/Index/Core/index-source.m Sun Jan 29 20:58:47 2017 (r312958) @@ -3,10 +3,10 @@ @interface Base // CHECK: [[@LINE-1]]:12 | class/ObjC | Base | c:objc(cs)Base | _OBJC_CLASS_$_Base | Decl | rel: 0 -(void)meth; -// CHECK: [[@LINE-1]]:1 | instance-method/ObjC | meth | c:objc(cs)Base(im)meth | -[Base meth] | Decl,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE-1]]:8 | instance-method/ObjC | meth | c:objc(cs)Base(im)meth | -[Base meth] | Decl,Dyn,RelChild | rel: 1 // CHECK-NEXT: RelChild | Base | c:objc(cs)Base +(Base*)class_meth; -// CHECK: [[@LINE-1]]:1 | class-method/ObjC | class_meth | c:objc(cs)Base(cm)class_meth | +[Base class_meth] | Decl,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE-1]]:9 | class-method/ObjC | class_meth | c:objc(cs)Base(cm)class_meth | +[Base class_meth] | Decl,Dyn,RelChild | rel: 1 // CHECK: [[@LINE-2]]:3 | class/ObjC | Base | c:objc(cs)Base | _OBJC_CLASS_$_Base | Ref,RelCont | rel: 1 // CHECK-NEXT: RelCont | class_meth | c:objc(cs)Base(cm)class_meth @@ -92,7 +92,7 @@ extern int setjmp(jmp_buf); @class I1; @interface I1 -// CHECK: [[@LINE+1]]:1 | instance-method/ObjC | meth | c:objc(cs)I1(im)meth | -[I1 meth] | Decl,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE+1]]:8 | instance-method/ObjC | meth | c:objc(cs)I1(im)meth | -[I1 meth] | Decl,Dyn,RelChild | rel: 1 -(void)meth; @end @@ -117,7 +117,7 @@ extern int setjmp(jmp_buf); // CHECK-NEXT: RelChild | I2 | c:objc(cs)I2 @synthesize prop = _prop; -// CHECK: [[@LINE+5]]:1 | instance-method(IB)/ObjC | doAction:foo: | c:objc(cs)I2(im)doAction:foo: | -[I2 doAction:foo:] | Def,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE+5]]:12 | instance-method(IB)/ObjC | doAction:foo: | c:objc(cs)I2(im)doAction:foo: | -[I2 doAction:foo:] | Def,Dyn,RelChild | rel: 1 // CHECK-NEXT: RelChild | I2 | c:objc(cs)I2 // CHECK: [[@LINE+3]]:22 | class/ObjC | I1 | c:objc(cs)I1 | _OBJC_CLASS_$_I1 | Ref,RelCont,RelIBType | rel: 1 // CHECK-NEXT: RelCont,RelIBType | doAction:foo: | c:objc(cs)I2(im)doAction:foo: @@ -127,11 +127,11 @@ extern int setjmp(jmp_buf); @interface I3 @property (readwrite) id prop; -// CHECK: [[@LINE+3]]:1 | instance-method/acc-get/ObjC | prop | c:objc(cs)I3(im)prop | -[I3 prop] | Decl,Dyn,RelChild,RelAcc | rel: 2 +// CHECK: [[@LINE+3]]:6 | instance-method/acc-get/ObjC | prop | c:objc(cs)I3(im)prop | -[I3 prop] | Decl,Dyn,RelChild,RelAcc | rel: 2 // CHECK-NEXT: RelChild | I3 | c:objc(cs)I3 // CHECK-NEXT: RelAcc | prop | c:objc(cs)I3(py)prop -(id)prop; -// CHECK: [[@LINE+3]]:1 | instance-method/acc-set/ObjC | setProp: | c:objc(cs)I3(im)setProp: | -[I3 setProp:] | Decl,Dyn,RelChild,RelAcc | rel: 2 +// CHECK: [[@LINE+3]]:8 | instance-method/acc-set/ObjC | setProp: | c:objc(cs)I3(im)setProp: | -[I3 setProp:] | Decl,Dyn,RelChild,RelAcc | rel: 2 // CHECK-NEXT: RelChild | I3 | c:objc(cs)I3 // CHECK-NEXT: RelAcc | prop | c:objc(cs)I3(py)prop -(void)setProp:(id)p; Modified: vendor/clang/dist/test/Index/Core/index-subkinds.m ============================================================================== --- vendor/clang/dist/test/Index/Core/index-subkinds.m Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/test/Index/Core/index-subkinds.m Sun Jan 29 20:58:47 2017 (r312958) @@ -9,11 +9,11 @@ @end // CHECK: [[@LINE+1]]:17 | class(test)/ObjC | MyTestCase | c:objc(cs)MyTestCase | | Def | rel: 0 @implementation MyTestCase -// CHECK: [[@LINE+1]]:1 | instance-method(test)/ObjC | testMe | c:objc(cs)MyTestCase(im)testMe | -[MyTestCase testMe] | Def,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE+1]]:8 | instance-method(test)/ObjC | testMe | c:objc(cs)MyTestCase(im)testMe | -[MyTestCase testMe] | Def,Dyn,RelChild | rel: 1 -(void)testMe {} -// CHECK: [[@LINE+1]]:1 | instance-method/ObjC | testResult | c:objc(cs)MyTestCase(im)testResult | -[MyTestCase testResult] | Def,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE+1]]:6 | instance-method/ObjC | testResult | c:objc(cs)MyTestCase(im)testResult | -[MyTestCase testResult] | Def,Dyn,RelChild | rel: 1 -(id)testResult { return 0; } -// CHECK: [[@LINE+1]]:1 | instance-method/ObjC | testWithInt: | c:objc(cs)MyTestCase(im)testWithInt: | -[MyTestCase testWithInt:] | Def,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE+1]]:8 | instance-method/ObjC | testWithInt: | c:objc(cs)MyTestCase(im)testWithInt: | -[MyTestCase testWithInt:] | Def,Dyn,RelChild | rel: 1 -(void)testWithInt:(int)i {} @end @@ -22,7 +22,7 @@ @end // CHECK: [[@LINE+1]]:17 | class(test)/ObjC | SubTestCase | c:objc(cs)SubTestCase | | Def | rel: 0 @implementation SubTestCase -// CHECK: [[@LINE+1]]:1 | instance-method(test)/ObjC | testIt2 | c:objc(cs)SubTestCase(im)testIt2 | -[SubTestCase testIt2] | Def,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE+1]]:8 | instance-method(test)/ObjC | testIt2 | c:objc(cs)SubTestCase(im)testIt2 | -[SubTestCase testIt2] | Def,Dyn,RelChild | rel: 1 -(void)testIt2 {} @end @@ -34,7 +34,7 @@ // CHECK: [[@LINE+2]]:17 | class(test)/ObjC | MyTestCase | c:objc(cs)MyTestCase | _OBJC_CLASS_$_MyTestCase | Ref,RelCont | rel: 1 // CHECK: [[@LINE+1]]:28 | extension/ObjC | MyTestCase | c:objc(cy)MyTestCase@cat | | Def | rel: 0 @implementation MyTestCase(cat) -// CHECK: [[@LINE+1]]:1 | instance-method(test)/ObjC | testInCat | c:objc(cs)MyTestCase(im)testInCat | -[MyTestCase(cat) testInCat] | Def,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE+1]]:9 | instance-method(test)/ObjC | testInCat | c:objc(cs)MyTestCase(im)testInCat | -[MyTestCase(cat) testInCat] | Def,Dyn,RelChild | rel: 1 - (void)testInCat {} @end @@ -47,7 +47,7 @@ @property (readonly) IBOutlet id prop; // CHECK: [[@LINE+1]]:54 | instance-property(IB,IBColl)/ObjC | propColl | c:objc(cs)IBCls(py)propColl | | Decl,RelChild | rel: 1 @property (readonly) IBOutletCollection(NSButton) id propColl; -// CHECK: [[@LINE+1]]:1 | instance-method(IB)/ObjC | doIt | c:objc(cs)IBCls(im)doIt | -[IBCls doIt] | Decl,Dyn,RelChild | rel: 1 +// CHECK: [[@LINE+1]]:12 | instance-method(IB)/ObjC | doIt | c:objc(cs)IBCls(im)doIt | -[IBCls doIt] | Decl,Dyn,RelChild | rel: 1 -(IBAction)doIt; @end Modified: vendor/clang/dist/test/Index/index-decls.m ============================================================================== --- vendor/clang/dist/test/Index/index-decls.m Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/test/Index/index-decls.m Sun Jan 29 20:58:47 2017 (r312958) @@ -58,7 +58,7 @@ int test1() { // RUN: c-index-test -index-file %s -target x86_64-apple-macosx10.7 > %t // RUN: FileCheck %s -input-file=%t // CHECK: [indexDeclaration]: kind: objc-class | name: I | {{.*}} | loc: 1:12 -// CHECK: [indexDeclaration]: kind: objc-instance-method | name: prop | {{.*}} | loc: 3:2 +// CHECK: [indexDeclaration]: kind: objc-instance-method | name: prop | {{.*}} | loc: 3:7 // CHECK: [indexDeclaration]: kind: objc-property | name: prop | {{.*}} | loc: 2:25 // CHECK: [indexDeclaration]: kind: objc-category | name: | {{.*}} | loc: 6:12 // CHECK: [indexDeclaration]: kind: objc-instance-method | name: setProp: | {{.*}} | loc: 7:33 @@ -82,5 +82,5 @@ int test1() { // CHECK-NOT: [indexDeclaration]: kind: objc-instance-method {{.*}} loc: 37: // CHECK-NOT: [indexDeclaration]: kind: objc-instance-method {{.*}} loc: 43: -// CHECK: [indexDeclaration]: kind: objc-instance-method | name: meth | {{.*}} loc: 54:1 | {{.*}} | isRedecl: 0 | isDef: 0 | +// CHECK: [indexDeclaration]: kind: objc-instance-method | name: meth | {{.*}} loc: 54:8 | {{.*}} | isRedecl: 0 | isDef: 0 | // CHECK: [indexDeclaration]: kind: objc-property | name: c | USR: c:objc(cs)I5(cpy)c | lang: ObjC | cursor: ObjCPropertyDecl=c:55:23 [class,] | loc: 55:23 Modified: vendor/clang/dist/test/Index/index-module.m ============================================================================== --- vendor/clang/dist/test/Index/index-module.m Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/test/Index/index-module.m Sun Jan 29 20:58:47 2017 (r312958) @@ -52,7 +52,7 @@ int glob; // CHECK-TMOD-NEXT: [indexDeclaration]: kind: objc-class | name: Module | {{.*}} | loc: [[TMOD_MODULE_H]]:15:12 // CHECK-TMOD-NEXT: : kind: interface // CHECK-TMOD-NEXT: [indexDeclaration]: kind: objc-class-method | name: version | {{.*}} | loc: [[TMOD_MODULE_H]]:16:1 -// CHECK-TMOD-NEXT: [indexDeclaration]: kind: objc-class-method | name: alloc | {{.*}} | loc: [[TMOD_MODULE_H]]:17:1 +// CHECK-TMOD-NEXT: [indexDeclaration]: kind: objc-class-method | name: alloc | {{.*}} | loc: [[TMOD_MODULE_H]]:17:2 // CHECK-TMOD-NEXT: [indexDeclaration]: kind: typedef | name: FILE | {{.*}} | loc: [[TMOD_MODULE_H]]:30:3 // CHECK-TMOD-NEXT: [indexDeclaration]: kind: struct | name: __sFILE | {{.*}} | loc: [[TMOD_MODULE_H]]:28:16 // CHECK-TMOD-NEXT: [indexDeclaration]: kind: field | name: _offset | {{.*}} | loc: [[TMOD_MODULE_H]]:29:7 Added: vendor/clang/dist/test/OpenMP/openmp_seh.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/OpenMP/openmp_seh.c Sun Jan 29 20:58:47 2017 (r312958) @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -verify -triple x86_64-pc-windows-msvc19.0.0 -fopenmp -fms-compatibility -x c++ -emit-llvm %s -o - | FileCheck %s +// expected-no-diagnostics +// REQUIRES: x86-registered-target +extern "C" { +void __cpuid(int[4], int); +} + +// CHECK-LABEL: @main +int main(void) { + __try { + int info[4]; + __cpuid(info, 1); + } __except (1) { + } + + return 0; +} + Modified: vendor/clang/dist/test/SemaCXX/constant-expression.cpp ============================================================================== --- vendor/clang/dist/test/SemaCXX/constant-expression.cpp Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/test/SemaCXX/constant-expression.cpp Sun Jan 29 20:58:47 2017 (r312958) @@ -143,3 +143,14 @@ namespace rdar16064952 { } char PR17381_ice = 1000000 * 1000000; // expected-warning {{overflow}} expected-warning {{changes value}} + +namespace PR31701 { + struct C { + template static int n; // expected-warning {{extension}} + }; + template class D; + template + template void D::set() { // expected-error {{from class 'D' without definition}} + const C c = C::n; + } +} Modified: vendor/clang/dist/test/SemaCXX/new-delete-cxx0x.cpp ============================================================================== --- vendor/clang/dist/test/SemaCXX/new-delete-cxx0x.cpp Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/test/SemaCXX/new-delete-cxx0x.cpp Sun Jan 29 20:58:47 2017 (r312958) @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 -triple=i686-pc-linux-gnu +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 -triple=i686-pc-linux-gnu -pedantic void ugly_news(int *ip) { (void)new int[-1]; // expected-error {{array size is negative}} @@ -29,6 +29,7 @@ void fn(int n) { (void) new int[2] {1, 2}; (void) new S[2] {1, 2}; (void) new S[3] {1, 2}; + (void) new S[n] {}; // C++11 [expr.new]p19: // If the new-expression creates an object or an array of objects of class // type, access and ambiguity control are done for the allocation function, @@ -44,6 +45,7 @@ void fn(int n) { (void) new T[2] {1, 2}; // ok (void) new T[3] {1, 2}; // expected-error {{no matching constructor}} expected-note {{in implicit initialization of array element 2}} (void) new T[n] {1, 2}; // expected-error {{no matching constructor}} expected-note {{in implicit initialization of trailing array elements in runtime-sized array new}} + (void) new T[n] {}; // expected-error {{no matching constructor}} expected-note {{in implicit initialization of trailing array elements in runtime-sized array new}} } struct U { Modified: vendor/clang/dist/tools/libclang/CXIndexDataConsumer.cpp ============================================================================== --- vendor/clang/dist/tools/libclang/CXIndexDataConsumer.cpp Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/tools/libclang/CXIndexDataConsumer.cpp Sun Jan 29 20:58:47 2017 (r312958) @@ -95,7 +95,7 @@ public: if (isa(LexicalDC) && !D->isThisDeclarationADefinition()) DataConsumer.handleSynthesizedObjCMethod(D, DeclLoc, LexicalDC); else - DataConsumer.handleObjCMethod(D); + DataConsumer.handleObjCMethod(D, DeclLoc); return true; } @@ -801,7 +801,8 @@ bool CXIndexDataConsumer::handleObjCCate return handleObjCContainer(D, CategoryLoc, getCursor(D), CatDInfo); } -bool CXIndexDataConsumer::handleObjCMethod(const ObjCMethodDecl *D) { +bool CXIndexDataConsumer::handleObjCMethod(const ObjCMethodDecl *D, + SourceLocation Loc) { bool isDef = D->isThisDeclarationADefinition(); bool isContainer = isDef; bool isSkipped = false; @@ -814,7 +815,7 @@ bool CXIndexDataConsumer::handleObjCMeth DeclInfo DInfo(!D->isCanonicalDecl(), isDef, isContainer); if (isSkipped) DInfo.flags |= CXIdxDeclFlag_Skipped; - return handleDecl(D, D->getLocation(), getCursor(D), DInfo); + return handleDecl(D, Loc, getCursor(D), DInfo); } bool CXIndexDataConsumer::handleSynthesizedObjCProperty( Modified: vendor/clang/dist/tools/libclang/CXIndexDataConsumer.h ============================================================================== --- vendor/clang/dist/tools/libclang/CXIndexDataConsumer.h Sun Jan 29 20:58:42 2017 (r312957) +++ vendor/clang/dist/tools/libclang/CXIndexDataConsumer.h Sun Jan 29 20:58:47 2017 (r312958) @@ -418,7 +418,7 @@ public: bool handleObjCCategory(const ObjCCategoryDecl *D); bool handleObjCCategoryImpl(const ObjCCategoryImplDecl *D); - bool handleObjCMethod(const ObjCMethodDecl *D); + bool handleObjCMethod(const ObjCMethodDecl *D, SourceLocation Loc); bool handleSynthesizedObjCProperty(const ObjCPropertyImplDecl *D); bool handleSynthesizedObjCMethod(const ObjCMethodDecl *D, SourceLocation Loc, From owner-svn-src-all@freebsd.org Sun Jan 29 20:59:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 632DBCC6194; Sun, 29 Jan 2017 20:59:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 161E3175D; Sun, 29 Jan 2017 20:59:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TKxI29075458; Sun, 29 Jan 2017 20:59:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKxIvW075457; Sun, 29 Jan 2017 20:59:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292059.v0TKxIvW075457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312966 - vendor/lldb/lldb-release_40-r293443 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:59:19 -0000 Author: dim Date: Sun Jan 29 20:59:17 2017 New Revision: 312966 URL: https://svnweb.freebsd.org/changeset/base/312966 Log: Tag lldb release_40 branch r293443. Added: vendor/lldb/lldb-release_40-r293443/ - copied from r312965, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Sun Jan 29 20:59:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B06D0CC60B2; Sun, 29 Jan 2017 20:59:05 +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 4CEFD15B9; Sun, 29 Jan 2017 20:59:05 +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 v0TKx4U9075262; Sun, 29 Jan 2017 20:59:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKx27W075242; Sun, 29 Jan 2017 20:59:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292059.v0TKx27W075242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312962 - in vendor/libc++/dist: include test/libcxx/test test/std/containers/container.adaptors/queue/queue.defn test/std/containers/container.adaptors/stack/stack.defn test/std/contai... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:59:05 -0000 Author: dim Date: Sun Jan 29 20:59:02 2017 New Revision: 312962 URL: https://svnweb.freebsd.org/changeset/base/312962 Log: Vendor import of libc++ release_40 branch r293443: https://llvm.org/svn/llvm-project/libcxx/branches/release_40@293443 Modified: vendor/libc++/dist/include/__config vendor/libc++/dist/include/__string vendor/libc++/dist/include/__threading_support vendor/libc++/dist/include/deque vendor/libc++/dist/include/forward_list vendor/libc++/dist/include/list vendor/libc++/dist/include/queue vendor/libc++/dist/include/stack vendor/libc++/dist/include/vector vendor/libc++/dist/test/libcxx/test/config.py vendor/libc++/dist/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp vendor/libc++/dist/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp vendor/libc++/dist/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp vendor/libc++/dist/test/std/containers/sequences/list/list.modifiers/emplace_back.pass.cpp vendor/libc++/dist/test/std/containers/sequences/list/list.modifiers/emplace_front.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp vendor/libc++/dist/www/cxx1z_status.html Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/include/__config Sun Jan 29 20:59:02 2017 (r312962) @@ -403,15 +403,6 @@ namespace std { #define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow"))) #endif -// A constexpr version of __builtin_memcmp was added in clang 4.0 -#if __has_builtin(__builtin_memcmp) -# ifdef __apple_build_version__ -// No shipping version of Apple's clang has constexpr __builtin_memcmp -# elif __clang_major__ > 3 -# define _LIBCPP_BUILTIN_MEMCMP_ISCONSTEXPR -# endif -#endif - #elif defined(_LIBCPP_COMPILER_GCC) #define _ALIGNAS(x) __attribute__((__aligned__(x))) Modified: vendor/libc++/dist/include/__string ============================================================================== --- vendor/libc++/dist/include/__string Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/include/__string Sun Jan 29 20:59:02 2017 (r312962) @@ -243,7 +243,7 @@ char_traits::compare(const char_ty { if (__n == 0) return 0; -#ifdef _LIBCPP_BUILTIN_MEMCMP_ISCONSTEXPR +#if __has_feature(cxx_constexpr_string_builtins) return __builtin_memcmp(__s1, __s2, __n); #elif _LIBCPP_STD_VER <= 14 return memcmp(__s1, __s2, __n); @@ -265,7 +265,9 @@ char_traits::find(const char_type* { if (__n == 0) return NULL; -#if _LIBCPP_STD_VER <= 14 +#if __has_feature(cxx_constexpr_string_builtins) + return __builtin_char_memchr(__s, to_int_type(__a), __n); +#elif _LIBCPP_STD_VER <= 14 return (const char_type*) memchr(__s, to_int_type(__a), __n); #else for (; __n; --__n) @@ -331,7 +333,7 @@ char_traits::compare(const char { if (__n == 0) return 0; -#if __has_builtin(__builtin_wmemcmp) +#if __has_feature(cxx_constexpr_string_builtins) return __builtin_wmemcmp(__s1, __s2, __n); #elif _LIBCPP_STD_VER <= 14 return wmemcmp(__s1, __s2, __n); @@ -351,7 +353,7 @@ inline _LIBCPP_CONSTEXPR_AFTER_CXX14 size_t char_traits::length(const char_type* __s) _NOEXCEPT { -#if __has_builtin(__builtin_wcslen) +#if __has_feature(cxx_constexpr_string_builtins) return __builtin_wcslen(__s); #elif _LIBCPP_STD_VER <= 14 return wcslen(__s); @@ -369,7 +371,7 @@ char_traits::find(const char_ty { if (__n == 0) return NULL; -#if __has_builtin(__builtin_wmemchr) +#if __has_feature(cxx_constexpr_string_builtins) return __builtin_wmemchr(__s, __a, __n); #elif _LIBCPP_STD_VER <= 14 return wmemchr(__s, __a, __n); Modified: vendor/libc++/dist/include/__threading_support ============================================================================== --- vendor/libc++/dist/include/__threading_support Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/include/__threading_support Sun Jan 29 20:59:02 2017 (r312962) @@ -40,6 +40,12 @@ #define _LIBCPP_THREAD_ABI_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY #endif +#if defined(__FreeBSD__) && defined(__clang__) && __has_attribute(no_thread_safety_analysis) +#define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS __attribute__((no_thread_safety_analysis)) +#else +#define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS +#endif + _LIBCPP_BEGIN_NAMESPACE_STD #if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) @@ -98,25 +104,25 @@ typedef DWORD __libcpp_tls_key; _LIBCPP_THREAD_ABI_VISIBILITY int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m); _LIBCPP_THREAD_ABI_VISIBILITY int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_mutex_lock(__libcpp_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_mutex_trylock(__libcpp_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_mutex_unlock(__libcpp_mutex_t *__m); _LIBCPP_THREAD_ABI_VISIBILITY @@ -129,10 +135,10 @@ int __libcpp_condvar_signal(__libcpp_con _LIBCPP_THREAD_ABI_VISIBILITY int __libcpp_condvar_broadcast(__libcpp_condvar_t* __cv); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_condvar_wait(__libcpp_condvar_t* __cv, __libcpp_mutex_t* __m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m, timespec *__ts); Modified: vendor/libc++/dist/include/deque ============================================================================== --- vendor/libc++/dist/include/deque Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/include/deque Sun Jan 29 20:59:02 2017 (r312962) @@ -110,8 +110,8 @@ public: void push_front(value_type&& v); void push_back(const value_type& v); void push_back(value_type&& v); - template reference emplace_front(Args&&... args); - template reference emplace_back(Args&&... args); + template reference emplace_front(Args&&... args); // reference in C++17 + template reference emplace_back(Args&&... args); // reference in C++17 template iterator emplace(const_iterator p, Args&&... args); iterator insert(const_iterator p, const value_type& v); iterator insert(const_iterator p, value_type&& v); @@ -1342,8 +1342,13 @@ public: void push_back(const value_type& __v); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS +#if _LIBCPP_STD_VER > 14 template reference emplace_front(_Args&&... __args); - template reference emplace_back(_Args&&... __args); + template reference emplace_back (_Args&&... __args); +#else + template void emplace_front(_Args&&... __args); + template void emplace_back (_Args&&... __args); +#endif template iterator emplace(const_iterator __p, _Args&&... __args); #endif // _LIBCPP_HAS_NO_VARIADICS void push_front(value_type&& __v); @@ -1822,7 +1827,11 @@ deque<_Tp, _Allocator>::push_back(value_ template template +#if _LIBCPP_STD_VER > 14 typename deque<_Tp, _Allocator>::reference +#else +void +#endif deque<_Tp, _Allocator>::emplace_back(_Args&&... __args) { allocator_type& __a = __base::__alloc(); @@ -1832,7 +1841,9 @@ deque<_Tp, _Allocator>::emplace_back(_Ar __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::forward<_Args>(__args)...); ++__base::size(); +#if _LIBCPP_STD_VER > 14 return *--__base::end(); +#endif } #endif // _LIBCPP_HAS_NO_VARIADICS @@ -1870,7 +1881,11 @@ deque<_Tp, _Allocator>::push_front(value template template +#if _LIBCPP_STD_VER > 14 typename deque<_Tp, _Allocator>::reference +#else +void +#endif deque<_Tp, _Allocator>::emplace_front(_Args&&... __args) { allocator_type& __a = __base::__alloc(); @@ -1880,7 +1895,9 @@ deque<_Tp, _Allocator>::emplace_front(_A __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...); --__base::__start_; ++__base::size(); +#if _LIBCPP_STD_VER > 14 return *__base::begin(); +#endif } #endif // _LIBCPP_HAS_NO_VARIADICS Modified: vendor/libc++/dist/include/forward_list ============================================================================== --- vendor/libc++/dist/include/forward_list Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/include/forward_list Sun Jan 29 20:59:02 2017 (r312962) @@ -87,7 +87,7 @@ public: reference front(); const_reference front() const; - template reference emplace_front(Args&&... args); + template reference emplace_front(Args&&... args); // reference in C++17 void push_front(const value_type& v); void push_front(value_type&& v); @@ -747,7 +747,11 @@ public: #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS +#if _LIBCPP_STD_VER > 14 template reference emplace_front(_Args&&... __args); +#else + template void emplace_front(_Args&&... __args); +#endif #endif void push_front(value_type&& __v); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES @@ -1103,7 +1107,11 @@ forward_list<_Tp, _Alloc>::assign(initia template template +#if _LIBCPP_STD_VER > 14 typename forward_list<_Tp, _Alloc>::reference +#else +void +#endif forward_list<_Tp, _Alloc>::emplace_front(_Args&&... __args) { __node_allocator& __a = base::__alloc(); @@ -1113,7 +1121,9 @@ forward_list<_Tp, _Alloc>::emplace_front _VSTD::forward<_Args>(__args)...); __h->__next_ = base::__before_begin()->__next_; base::__before_begin()->__next_ = __h.release(); +#if _LIBCPP_STD_VER > 14 return base::__before_begin()->__next_->__value_; +#endif } #endif // _LIBCPP_HAS_NO_VARIADICS Modified: vendor/libc++/dist/include/list ============================================================================== --- vendor/libc++/dist/include/list Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/include/list Sun Jan 29 20:59:02 2017 (r312962) @@ -93,10 +93,10 @@ public: size_type max_size() const noexcept; template - reference emplace_front(Args&&... args); + reference emplace_front(Args&&... args); // reference in C++17 void pop_front(); template - reference emplace_back(Args&&... args); + reference emplace_back(Args&&... args); // reference in C++17 void pop_back(); void push_front(const value_type& x); void push_front(value_type&& x); @@ -969,9 +969,17 @@ public: void push_back(value_type&& __x); #ifndef _LIBCPP_HAS_NO_VARIADICS template +#if _LIBCPP_STD_VER > 14 reference emplace_front(_Args&&... __args); +#else + void emplace_front(_Args&&... __args); +#endif template +#if _LIBCPP_STD_VER > 14 reference emplace_back(_Args&&... __args); +#else + void emplace_back(_Args&&... __args); +#endif template iterator emplace(const_iterator __p, _Args&&... __args); #endif // _LIBCPP_HAS_NO_VARIADICS @@ -1600,7 +1608,11 @@ list<_Tp, _Alloc>::push_back(value_type& template template +#if _LIBCPP_STD_VER > 14 typename list<_Tp, _Alloc>::reference +#else +void +#endif list<_Tp, _Alloc>::emplace_front(_Args&&... __args) { __node_allocator& __na = base::__node_alloc(); @@ -1609,12 +1621,20 @@ list<_Tp, _Alloc>::emplace_front(_Args&& __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...); __link_nodes_at_front(__hold.get()->__as_link(), __hold.get()->__as_link()); ++base::__sz(); +#if _LIBCPP_STD_VER > 14 return __hold.release()->__value_; +#else + __hold.release(); +#endif } template template +#if _LIBCPP_STD_VER > 14 typename list<_Tp, _Alloc>::reference +#else +void +#endif list<_Tp, _Alloc>::emplace_back(_Args&&... __args) { __node_allocator& __na = base::__node_alloc(); @@ -1624,7 +1644,11 @@ list<_Tp, _Alloc>::emplace_back(_Args&&. __link_pointer __nl = __hold->__as_link(); __link_nodes_at_back(__nl, __nl); ++base::__sz(); +#if _LIBCPP_STD_VER > 14 return __hold.release()->__value_; +#else + __hold.release(); +#endif } template Modified: vendor/libc++/dist/include/queue ============================================================================== --- vendor/libc++/dist/include/queue Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/include/queue Sun Jan 29 20:59:02 2017 (r312962) @@ -63,7 +63,7 @@ public: void push(const value_type& v); void push(value_type&& v); - template reference emplace(Args&&... args); + template reference emplace(Args&&... args); // reference in C++17 void pop(); void swap(queue& q) noexcept(is_nothrow_swappable_v) @@ -292,8 +292,13 @@ public: #ifndef _LIBCPP_HAS_NO_VARIADICS template _LIBCPP_INLINE_VISIBILITY +#if _LIBCPP_STD_VER > 14 reference emplace(_Args&&... __args) { return c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#else + void emplace(_Args&&... __args) + { c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#endif #endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY Modified: vendor/libc++/dist/include/stack ============================================================================== --- vendor/libc++/dist/include/stack Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/include/stack Sun Jan 29 20:59:02 2017 (r312962) @@ -55,7 +55,7 @@ public: void push(const value_type& x); void push(value_type&& x); - template reference emplace(Args&&... args); + template reference emplace(Args&&... args); // reference in C++17 void pop(); void swap(stack& c) noexcept(is_nothrow_swappable_v) @@ -199,8 +199,13 @@ public: #ifndef _LIBCPP_HAS_NO_VARIADICS template _LIBCPP_INLINE_VISIBILITY +#if _LIBCPP_STD_VER > 14 reference emplace(_Args&&... __args) { return c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#else + void emplace(_Args&&... __args) + { c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#endif #endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY Modified: vendor/libc++/dist/include/vector ============================================================================== --- vendor/libc++/dist/include/vector Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/include/vector Sun Jan 29 20:59:02 2017 (r312962) @@ -99,7 +99,7 @@ public: void push_back(const value_type& x); void push_back(value_type&& x); template - reference emplace_back(Args&&... args); + reference emplace_back(Args&&... args); // reference in C++17 void pop_back(); template iterator emplace(const_iterator position, Args&&... args); @@ -218,7 +218,7 @@ public: const_reference back() const; void push_back(const value_type& x); - template reference emplace_back(Args&&... args); // C++14 + template reference emplace_back(Args&&... args); // C++14; reference in C++17 void pop_back(); template iterator emplace(const_iterator position, Args&&... args); // C++14 @@ -679,7 +679,11 @@ public: #ifndef _LIBCPP_HAS_NO_VARIADICS template _LIBCPP_INLINE_VISIBILITY +#if _LIBCPP_STD_VER > 14 reference emplace_back(_Args&&... __args); +#else + void emplace_back(_Args&&... __args); +#endif #endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY @@ -1625,7 +1629,11 @@ vector<_Tp, _Allocator>::__emplace_back_ template template inline +#if _LIBCPP_STD_VER > 14 typename vector<_Tp, _Allocator>::reference +#else +void +#endif vector<_Tp, _Allocator>::emplace_back(_Args&&... __args) { if (this->__end_ < this->__end_cap()) @@ -1639,7 +1647,9 @@ vector<_Tp, _Allocator>::emplace_back(_A } else __emplace_back_slow_path(_VSTD::forward<_Args>(__args)...); +#if _LIBCPP_STD_VER > 14 return this->back(); +#endif } #endif // _LIBCPP_HAS_NO_VARIADICS @@ -2336,9 +2346,16 @@ public: void push_back(const value_type& __x); #if _LIBCPP_STD_VER > 11 template - _LIBCPP_INLINE_VISIBILITY reference emplace_back(_Args&&... __args) { +#if _LIBCPP_STD_VER > 14 + _LIBCPP_INLINE_VISIBILITY reference emplace_back(_Args&&... __args) +#else + _LIBCPP_INLINE_VISIBILITY void emplace_back(_Args&&... __args) +#endif + { push_back ( value_type ( _VSTD::forward<_Args>(__args)... )); +#if _LIBCPP_STD_VER > 14 return this->back(); +#endif } #endif Modified: vendor/libc++/dist/test/libcxx/test/config.py ============================================================================== --- vendor/libc++/dist/test/libcxx/test/config.py Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/libcxx/test/config.py Sun Jan 29 20:59:02 2017 (r312962) @@ -403,6 +403,15 @@ class Configuration(object): if not std: # Choose the newest possible language dialect if none is given. possible_stds = ['c++1z', 'c++14', 'c++11', 'c++03'] + if self.cxx.type == 'gcc': + maj_v, _, _ = self.cxx.version + maj_v = int(maj_v) + if maj_v < 7: + possible_stds.remove('c++1z') + # FIXME: How many C++14 tests actually fail under GCC 5 and 6? + # Should we XFAIL them individually instead? + if maj_v <= 6: + possible_stds.remove('c++14') for s in possible_stds: if self.cxx.hasCompileFlag('-std=%s' % s): std = s Modified: vendor/libc++/dist/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp Sun Jan 29 20:59:02 2017 (r312962) @@ -12,25 +12,35 @@ // // template reference emplace(Args&&... args); +// return type is 'reference' in C++17; 'void' before + #include #include +#include "test_macros.h" + #include "../../../Emplaceable.h" int main() { typedef Emplaceable T; std::queue q; +#if TEST_STD_VER > 14 T& r1 = q.emplace(1, 2.5); assert(&r1 == &q.back()); T& r2 = q.emplace(2, 3.5); assert(&r2 == &q.back()); T& r3 = q.emplace(3, 4.5); assert(&r3 == &q.back()); + assert(&r1 == &q.front()); +#else + q.emplace(1, 2.5); + q.emplace(2, 3.5); + q.emplace(3, 4.5); +#endif + assert(q.size() == 3); assert(q.front() == Emplaceable(1, 2.5)); assert(q.back() == Emplaceable(3, 4.5)); - assert(&r3 == &q.back()); - assert(&r1 == &q.front()); } Modified: vendor/libc++/dist/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp Sun Jan 29 20:59:02 2017 (r312962) @@ -12,22 +12,31 @@ // // template reference emplace(Args&&... args); +// return type is 'reference' in C++17; 'void' before #include #include +#include "test_macros.h" + #include "../../../Emplaceable.h" int main() { typedef Emplaceable T; std::stack q; +#if TEST_STD_VER > 14 T& r1 = q.emplace(1, 2.5); assert(&r1 == &q.top()); T& r2 = q.emplace(2, 3.5); assert(&r2 == &q.top()); T& r3 = q.emplace(3, 4.5); assert(&r3 == &q.top()); +#else + q.emplace(1, 2.5); + q.emplace(2, 3.5); + q.emplace(3, 4.5); +#endif assert(q.size() == 3); assert(q.top() == Emplaceable(3, 4.5)); } Modified: vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp Sun Jan 29 20:59:02 2017 (r312962) @@ -12,6 +12,7 @@ // // template reference emplace_back(Args&&... args); +// return type is 'reference' in C++17; 'void' before #include #include @@ -49,15 +50,21 @@ void test(C& c1) { typedef typename C::iterator I; - typedef typename C::reference Ref; std::size_t c1_osize = c1.size(); +#if TEST_STD_VER > 14 + typedef typename C::reference Ref; Ref ref = c1.emplace_back(Emplaceable(1, 2.5)); +#else + c1.emplace_back(Emplaceable(1, 2.5)); +#endif assert(c1.size() == c1_osize + 1); assert(distance(c1.begin(), c1.end()) == static_cast(c1.size())); I i = c1.end(); assert(*--i == Emplaceable(1, 2.5)); +#if TEST_STD_VER > 14 assert(&(*i) == &ref); +#endif } template Modified: vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp Sun Jan 29 20:59:02 2017 (r312962) @@ -12,6 +12,7 @@ // // template reference emplace_front(Args&&... args); +// return type is 'reference' in C++17; 'void' before #include #include @@ -20,6 +21,7 @@ #include "test_macros.h" #include "../../../Emplaceable.h" #include "min_allocator.h" +#include "test_allocator.h" template C @@ -48,15 +50,21 @@ void test(C& c1) { typedef typename C::iterator I; - typedef typename C::reference Ref; std::size_t c1_osize = c1.size(); +#if TEST_STD_VER > 14 + typedef typename C::reference Ref; Ref res_ref = c1.emplace_front(Emplaceable(1, 2.5)); +#else + c1.emplace_front(Emplaceable(1, 2.5)); +#endif assert(c1.size() == c1_osize + 1); assert(distance(c1.begin(), c1.end()) == static_cast(c1.size())); I i = c1.begin(); assert(*i == Emplaceable(1, 2.5)); +#if TEST_STD_VER > 14 assert(&res_ref == &(*i)); +#endif } template @@ -84,4 +92,15 @@ int main() for (int j = 0; j < N; ++j) testN> >(rng[i], rng[j]); } + { + std::deque> c; + c.emplace_front(); + assert(c.size() == 1); + c.emplace_front(1, 2, 3); + assert(c.size() == 2); + c.emplace_front(); + assert(c.size() == 3); + c.emplace_front(1, 2, 3); + assert(c.size() == 4); + } } Modified: vendor/libc++/dist/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp Sun Jan 29 20:59:02 2017 (r312962) @@ -12,10 +12,13 @@ // // template reference emplace_front(Args&&... args); +// return type is 'reference' in C++17; 'void' before #include #include +#include "test_macros.h" + #include "../../../Emplaceable.h" #include "min_allocator.h" @@ -25,6 +28,7 @@ int main() typedef Emplaceable T; typedef std::forward_list C; C c; +#if TEST_STD_VER > 14 T& r1 = c.emplace_front(); assert(c.front() == Emplaceable()); assert(&r1 == &c.front()); @@ -32,6 +36,13 @@ int main() T& r2 = c.emplace_front(1, 2.5); assert(c.front() == Emplaceable(1, 2.5)); assert(&r2 == &c.front()); +#else + c.emplace_front(); + assert(c.front() == Emplaceable()); + assert(distance(c.begin(), c.end()) == 1); + c.emplace_front(1, 2.5); + assert(c.front() == Emplaceable(1, 2.5)); +#endif assert(*next(c.begin()) == Emplaceable()); assert(distance(c.begin(), c.end()) == 2); } @@ -39,6 +50,7 @@ int main() typedef Emplaceable T; typedef std::forward_list> C; C c; +#if TEST_STD_VER > 14 T& r1 = c.emplace_front(); assert(c.front() == Emplaceable()); assert(&r1 == &c.front()); @@ -46,6 +58,13 @@ int main() T& r2 = c.emplace_front(1, 2.5); assert(c.front() == Emplaceable(1, 2.5)); assert(&r2 == &c.front()); +#else + c.emplace_front(); + assert(c.front() == Emplaceable()); + assert(distance(c.begin(), c.end()) == 1); + c.emplace_front(1, 2.5); + assert(c.front() == Emplaceable(1, 2.5)); +#endif assert(*next(c.begin()) == Emplaceable()); assert(distance(c.begin(), c.end()) == 2); } Modified: vendor/libc++/dist/test/std/containers/sequences/list/list.modifiers/emplace_back.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/containers/sequences/list/list.modifiers/emplace_back.pass.cpp Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/std/containers/sequences/list/list.modifiers/emplace_back.pass.cpp Sun Jan 29 20:59:02 2017 (r312962) @@ -12,10 +12,12 @@ // // template reference emplace_back(Args&&... args); +// return type is 'reference' in C++17; 'void' before #include #include +#include "test_macros.h" #include "min_allocator.h" class A @@ -37,6 +39,7 @@ int main() { { std::list c; +#if TEST_STD_VER > 14 A& r1 = c.emplace_back(2, 3.5); assert(c.size() == 1); assert(&r1 == &c.back()); @@ -45,6 +48,14 @@ int main() A& r2 = c.emplace_back(3, 4.5); assert(c.size() == 2); assert(&r2 == &c.back()); +#else + c.emplace_back(2, 3.5); + assert(c.size() == 1); + assert(c.front().geti() == 2); + assert(c.front().getd() == 3.5); + c.emplace_back(3, 4.5); + assert(c.size() == 2); +#endif assert(c.front().geti() == 2); assert(c.front().getd() == 3.5); assert(c.back().geti() == 3); @@ -52,6 +63,7 @@ int main() } { std::list> c; +#if TEST_STD_VER > 14 A& r1 = c.emplace_back(2, 3.5); assert(c.size() == 1); assert(&r1 == &c.back()); @@ -60,6 +72,14 @@ int main() A& r2 = c.emplace_back(3, 4.5); assert(c.size() == 2); assert(&r2 == &c.back()); +#else + c.emplace_back(2, 3.5); + assert(c.size() == 1); + assert(c.front().geti() == 2); + assert(c.front().getd() == 3.5); + c.emplace_back(3, 4.5); + assert(c.size() == 2); +#endif assert(c.front().geti() == 2); assert(c.front().getd() == 3.5); assert(c.back().geti() == 3); Modified: vendor/libc++/dist/test/std/containers/sequences/list/list.modifiers/emplace_front.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/containers/sequences/list/list.modifiers/emplace_front.pass.cpp Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/std/containers/sequences/list/list.modifiers/emplace_front.pass.cpp Sun Jan 29 20:59:02 2017 (r312962) @@ -12,6 +12,7 @@ // // template reference emplace_front(Args&&... args); +// return type is 'reference' in C++17; 'void' before #include #include @@ -37,6 +38,7 @@ int main() { { std::list c; +#if TEST_STD_VER > 14 A& r1 = c.emplace_front(2, 3.5); assert(c.size() == 1); assert(&r1 == &c.front()); @@ -45,13 +47,23 @@ int main() A& r2 = c.emplace_front(3, 4.5); assert(c.size() == 2); assert(&r2 == &c.front()); +#else + c.emplace_front(2, 3.5); + assert(c.size() == 1); + assert(c.front().geti() == 2); + assert(c.front().getd() == 3.5); + c.emplace_front(3, 4.5); + assert(c.size() == 2); +#endif assert(c.front().geti() == 3); assert(c.front().getd() == 4.5); assert(c.back().geti() == 2); assert(c.back().getd() == 3.5); } + { std::list> c; +#if TEST_STD_VER > 14 A& r1 = c.emplace_front(2, 3.5); assert(c.size() == 1); assert(&r1 == &c.front()); @@ -60,6 +72,14 @@ int main() A& r2 = c.emplace_front(3, 4.5); assert(c.size() == 2); assert(&r2 == &c.front()); +#else + c.emplace_front(2, 3.5); + assert(c.size() == 1); + assert(c.front().geti() == 2); + assert(c.front().getd() == 3.5); + c.emplace_front(3, 4.5); + assert(c.size() == 2); +#endif assert(c.front().geti() == 3); assert(c.front().getd() == 4.5); assert(c.back().geti() == 2); Modified: vendor/libc++/dist/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp Sun Jan 29 20:59:02 2017 (r312962) @@ -12,17 +12,20 @@ // vector.bool // template reference emplace_back(Args&&... args); +// return type is 'reference' in C++17; 'void' before #include #include +#include "test_macros.h" #include "min_allocator.h" int main() { { typedef std::vector C; - typedef C::reference Ref; C c; +#if TEST_STD_VER > 14 + typedef C::reference Ref; Ref r1 = c.emplace_back(); assert(c.size() == 1); assert(c.front() == false); @@ -36,19 +39,27 @@ int main() r2 = false; assert(c.back() == false); r2 = true; - Ref r3 = c.emplace_back(1 == 1); +#else + c.emplace_back(); + assert(c.size() == 1); + assert(c.front() == false); + c.emplace_back(true); + assert(c.size() == 2); + assert(c.front() == false); + assert(c.back() == true); +#endif + c.emplace_back(1 == 1); assert(c.size() == 3); assert(c.front() == false); assert(c[1] == true); assert(c.back() == true); - r3 = false; - assert(c.back() == false); } { typedef std::vector> C; - typedef C::reference Ref; C c; +#if TEST_STD_VER > 14 + typedef C::reference Ref; Ref r1 = c.emplace_back(); assert(c.size() == 1); assert(c.front() == false); @@ -62,6 +73,15 @@ int main() r2 = false; assert(c.back() == false); r2 = true; +#else + c.emplace_back(); + assert(c.size() == 1); + assert(c.front() == false); + c.emplace_back(true); + assert(c.size() == 2); + assert(c.front() == false); + assert(c.back() == true); +#endif c.emplace_back(1 == 1); assert(c.size() == 3); assert(c.front() == false); Modified: vendor/libc++/dist/test/std/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/test/std/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp Sun Jan 29 20:59:02 2017 (r312962) @@ -12,9 +12,11 @@ // // template reference emplace_back(Args&&... args); +// return type is 'reference' in C++17; 'void' before #include #include +#include "test_macros.h" #include "test_allocator.h" #include "min_allocator.h" #include "test_allocator.h" @@ -56,6 +58,7 @@ int main() { { std::vector c; +#if TEST_STD_VER > 14 A& r1 = c.emplace_back(2, 3.5); assert(c.size() == 1); assert(&r1 == &c.back()); @@ -65,6 +68,15 @@ int main() A& r2 = c.emplace_back(3, 4.5); assert(c.size() == 2); assert(&r2 == &c.back()); +#else + c.emplace_back(2, 3.5); + assert(c.size() == 1); + assert(c.front().geti() == 2); + assert(c.front().getd() == 3.5); + assert(is_contiguous_container_asan_correct(c)); + c.emplace_back(3, 4.5); + assert(c.size() == 2); +#endif assert(c.front().geti() == 2); assert(c.front().getd() == 3.5); assert(c.back().geti() == 3); @@ -73,6 +85,7 @@ int main() } { std::vector > c; +#if TEST_STD_VER > 14 A& r1 = c.emplace_back(2, 3.5); assert(c.size() == 1); assert(&r1 == &c.back()); @@ -82,6 +95,15 @@ int main() A& r2 = c.emplace_back(3, 4.5); assert(c.size() == 2); assert(&r2 == &c.back()); +#else + c.emplace_back(2, 3.5); + assert(c.size() == 1); + assert(c.front().geti() == 2); + assert(c.front().getd() == 3.5); + assert(is_contiguous_container_asan_correct(c)); + c.emplace_back(3, 4.5); + assert(c.size() == 2); +#endif assert(c.front().geti() == 2); assert(c.front().getd() == 3.5); assert(c.back().geti() == 3); @@ -90,6 +112,7 @@ int main() } { std::vector> c; +#if TEST_STD_VER > 14 A& r1 = c.emplace_back(2, 3.5); assert(c.size() == 1); assert(&r1 == &c.back()); @@ -99,6 +122,15 @@ int main() A& r2 = c.emplace_back(3, 4.5); assert(c.size() == 2); assert(&r2 == &c.back()); +#else + c.emplace_back(2, 3.5); + assert(c.size() == 1); + assert(c.front().geti() == 2); + assert(c.front().getd() == 3.5); + assert(is_contiguous_container_asan_correct(c)); + c.emplace_back(3, 4.5); + assert(c.size() == 2); +#endif assert(c.front().geti() == 2); assert(c.front().getd() == 3.5); assert(c.back().geti() == 3); Modified: vendor/libc++/dist/www/cxx1z_status.html ============================================================================== --- vendor/libc++/dist/www/cxx1z_status.html Sun Jan 29 20:58:58 2017 (r312961) +++ vendor/libc++/dist/www/cxx1z_status.html Sun Jan 29 20:59:02 2017 (r312962) @@ -376,10 +376,10 @@ 2680Add "Equivalent to" to filesystemIssaquahComplete 2681filesystem::copy() cannot copy symlinksIssaquahComplete 2682filesystem::copy() won't create a symlink to a directoryIssaquahComplete - 2686Why is std::hash specialized for error_code, but not error_condition?IssaquahPatch ready + 2686Why is std::hash specialized for error_code, but not error_condition?IssaquahComplete 2694Application of LWG 436 accidentally deleted definition of "facet"IssaquahComplete 2696Interaction between make_shared and enable_shared_from_this is underspecifiedIssaquah - 2699Missing restriction in [numeric.requirements]Issaquah + 2699Missing restriction in [numeric.requirements]IssaquahComplete 2712copy_file(from, to, ...) has a number of unspecified error conditionsIssaquahComplete 2722equivalent incorrectly specifies throws clauseIssaquahComplete 2729Missing SFINAE on std::pair::operator=Issaquah From owner-svn-src-all@freebsd.org Sun Jan 29 20:59:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23AA0CC615A; Sun, 29 Jan 2017 20:59:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCD5F16E7; Sun, 29 Jan 2017 20:59:15 +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 v0TKxEOm075410; Sun, 29 Jan 2017 20:59:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKxEn3075409; Sun, 29 Jan 2017 20:59:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292059.v0TKxEn3075409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312965 - vendor/lld/lld-release_40-r293443 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:59:16 -0000 Author: dim Date: Sun Jan 29 20:59:14 2017 New Revision: 312965 URL: https://svnweb.freebsd.org/changeset/base/312965 Log: Tag lld release_40 branch r293443. Added: vendor/lld/lld-release_40-r293443/ - copied from r312964, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Sun Jan 29 20:59:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5074FCC6121; Sun, 29 Jan 2017 20:59:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12ACC1676; Sun, 29 Jan 2017 20:59:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TKxBqq075363; Sun, 29 Jan 2017 20:59:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKxAZC075357; Sun, 29 Jan 2017 20:59:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292059.v0TKxAZC075357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312964 - in vendor/lld/dist: . ELF cmake/modules docs test/ELF/linkerscript X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 20:59:12 -0000 Author: dim Date: Sun Jan 29 20:59:10 2017 New Revision: 312964 URL: https://svnweb.freebsd.org/changeset/base/312964 Log: Vendor import of lld release_40 branch r293443: https://llvm.org/svn/llvm-project/lld/branches/release_40@293443 Added: vendor/lld/dist/test/ELF/linkerscript/common-assign.s (contents, props changed) Modified: vendor/lld/dist/CMakeLists.txt vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/SyntheticSections.h vendor/lld/dist/cmake/modules/AddLLD.cmake vendor/lld/dist/docs/ReleaseNotes.rst Modified: vendor/lld/dist/CMakeLists.txt ============================================================================== --- vendor/lld/dist/CMakeLists.txt Sun Jan 29 20:59:08 2017 (r312963) +++ vendor/lld/dist/CMakeLists.txt Sun Jan 29 20:59:10 2017 (r312964) @@ -42,6 +42,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRE include_directories("${LLVM_BINARY_DIR}/include" ${LLVM_INCLUDE_DIRS}) link_directories(${LLVM_LIBRARY_DIRS}) + set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) Modified: vendor/lld/dist/ELF/LinkerScript.cpp ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.cpp Sun Jan 29 20:59:08 2017 (r312963) +++ vendor/lld/dist/ELF/LinkerScript.cpp Sun Jan 29 20:59:10 2017 (r312964) @@ -918,12 +918,7 @@ const OutputSectionBase *LinkerScript>(Sym)) - return DR->Section ? DR->Section->OutSec : nullptr; - if (auto *DS = dyn_cast_or_null(Sym)) - return DS->Section; - - return nullptr; + return SymbolTableSection::getOutputSection(Sym); } // Returns indices of ELF headers containing specific section, identified Modified: vendor/lld/dist/ELF/SyntheticSections.h ============================================================================== --- vendor/lld/dist/ELF/SyntheticSections.h Sun Jan 29 20:59:08 2017 (r312963) +++ vendor/lld/dist/ELF/SyntheticSections.h Sun Jan 29 20:59:10 2017 (r312964) @@ -372,6 +372,8 @@ public: ArrayRef getSymbols() const { return Symbols; } + static const OutputSectionBase *getOutputSection(SymbolBody *Sym); + unsigned NumLocals = 0; StringTableSection &StrTabSec; @@ -379,8 +381,6 @@ private: void writeLocalSymbols(uint8_t *&Buf); void writeGlobalSymbols(uint8_t *Buf); - const OutputSectionBase *getOutputSection(SymbolBody *Sym); - // A vector of symbols and their string table offsets. std::vector Symbols; }; Modified: vendor/lld/dist/cmake/modules/AddLLD.cmake ============================================================================== --- vendor/lld/dist/cmake/modules/AddLLD.cmake Sun Jan 29 20:59:08 2017 (r312963) +++ vendor/lld/dist/cmake/modules/AddLLD.cmake Sun Jan 29 20:59:10 2017 (r312964) @@ -1,6 +1,38 @@ macro(add_lld_library name) - llvm_add_library(${name} ${ARGN}) + cmake_parse_arguments(ARG + "SHARED" + "" + "" + ${ARGN}) + if(ARG_SHARED) + set(ARG_ENABLE_SHARED SHARED) + endif() + llvm_add_library(${name} ${ARG_ENABLE_SHARED} ${ARG_UNPARSED_ARGUMENTS}) set_target_properties(${name} PROPERTIES FOLDER "lld libraries") + + if (LLD_BUILD_TOOLS) + if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR + NOT LLVM_DISTRIBUTION_COMPONENTS) + set(export_to_lldtargets EXPORT lldTargets) + set_property(GLOBAL PROPERTY LLD_HAS_EXPORTS True) + endif() + + install(TARGETS ${name} + COMPONENT ${name} + ${export_to_lldtargets} + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} + RUNTIME DESTINATION bin) + + if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) + add_custom_target(install-${name} + DEPENDS ${name} + COMMAND "${CMAKE_COMMAND}" + -DCMAKE_INSTALL_COMPONENT=${name} + -P "${CMAKE_BINARY_DIR}/cmake_install.cmake") + endif() + set_property(GLOBAL APPEND PROPERTY LLD_EXPORTS ${name}) + endif() endmacro(add_lld_library) macro(add_lld_executable name) Modified: vendor/lld/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/lld/dist/docs/ReleaseNotes.rst Sun Jan 29 20:59:08 2017 (r312963) +++ vendor/lld/dist/docs/ReleaseNotes.rst Sun Jan 29 20:59:10 2017 (r312964) @@ -11,25 +11,94 @@ LLD 4.0.0 Release Notes Introduction ============ -This document contains the release notes for the LLD linker, release 4.0.0. +LLD is a linker which supports ELF (Unix), COFF (Windows) and Mach-O +(macOS). It is generally faster than the GNU BFD/gold linkers or the +MSVC linker. + +LLD is designed to be a drop-in replacmenet for the system linkers, so +that users don't need to change their build systems other than swapping +the linker command. + +This document contains the release notes for LLD 4.0.0. Here we describe the status of LLD, including major improvements from the previous release. All LLD releases may be downloaded from the `LLVM releases web site `_. -Non-comprehensive list of changes in this release -================================================= + +What's New in LLD 4.0? +====================== ELF Improvements ---------------- -* Initial support for LTO. +LLD provides much better compatibility with the GNU linker than before. +Now it is able to link the entire FreeBSD base system including the kernel +out of the box. We are working closely with the FreeBSD project to +make it usable as the system linker in a future release of the operating +system. + +Multi-threading performance has been improved, and multi-threading +is now enabled by default. Combined with other optimizations, LLD 4.0 +is about 1.5 times faster than LLD 3.9 when linking large programs +in our test environment. + +Other notable changes are listed below: + +* Error messages contain more information than before. If debug info + is available, the linker prints out not only the object file name + but the source location of unresolved symbols. + +* Error messages are printed in red just like Clang by default. You + can disable it by passing -no-color-diagnostics. + +* LLD's version string is now embedded in a .comment section in the + result output file. You can dump it with this command: ``objdump -j -s + .comment ``. + +* The -Map option is supported. With that, you can print out section + and symbol information to a specified file. This feature is useful + for analyzing link results. + +* The file format for the -reproduce option has changed from cpio to + tar. + +* When creating a copy relocation for a symbol, LLD now scans the + DSO's header to see if the symbol is in a read-only segment. If so, + space for the copy relocation is reserved in .bss.rel.ro instead of + .bss. This fixes a security issue that read-only data in a DSO + becomes writable if it is copied by a copy relocation. This issue + was disclosed originally on the binutils mailing list at + ``. + +* Compressed input sections are supported. + +* ``--oformat binary``, ``--section-start``, ``-Tbss``, ``-Tdata``, + ``-Ttext``, ``-b binary``, ``-build-id=uuid``, ``-no-rosegment``, + ``-nopie``, ``-nostdlib``, ``-omagic``, ``-retain-symbols-file``, + ``-sort-section``, ``-z max-page-size`` and ``-z wxneeded`` are + suppoorted. + +* A lot of linker script directives have been added. + +* Default image base address for x86-64 has changed from 0x10000 to + 0x200000 to make it huge-page friendly. + +* ARM port now supports GNU ifunc, the ARM C++ exceptions ABI, TLS + relocations and static linking. Problems with dlopen() on systems + using eglibc fixed. + +* MIPS port now supports input files in new R6 revision of MIPS ABIs + or N32 ABI. Generated file now contains .MIPS.abiflags section and + complete set of ELF headers flags. + +* Relocations produced by the ``-mxgot`` compiler's flag is supported + for MIPS. Now it is possible to generate "large" GOT exceeds 64K + limit. COFF Improvements ----------------- -* Item 1. - -MachO Improvements ------------------- - -* Item 1. +* Performance on Windows has been improved by parallelizing parts of the + linker and optimizing file system operations. As a result of these + improvements, LLD 4.0 has been measured to be about 2.5 times faster + than LLD 3.9 when linking a large Chromium DLL. Added: vendor/lld/dist/test/ELF/linkerscript/common-assign.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/ELF/linkerscript/common-assign.s Sun Jan 29 20:59:10 2017 (r312964) @@ -0,0 +1,48 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t +# RUN: echo "SECTIONS { . = SIZEOF_HEADERS; pfoo = foo; pbar = bar; }" > %t.script +# RUN: ld.lld -o %t1 --script %t.script %t +# RUN: llvm-readobj -symbols %t1 | FileCheck %s + +# CHECK: Symbol { +# CHECK: Name: bar +# CHECK-NEXT: Value: 0x134 +# CHECK-NEXT: Size: 4 +# CHECK-NEXT: Binding: Global +# CHECK-NEXT: Type: Object +# CHECK-NEXT: Other: 0 +# CHECK-NEXT: Section: .bss +# CHECK-NEXT: } +# CHECK-NEXT: Symbol { +# CHECK-NEXT: Name: foo +# CHECK-NEXT: Value: 0x138 +# CHECK-NEXT: Size: 4 +# CHECK-NEXT: Binding: Global +# CHECK-NEXT: Type: Object +# CHECK-NEXT: Other: 0 +# CHECK-NEXT: Section: .bss +# CHECK-NEXT: } +# CHECK-NEXT: Symbol { +# CHECK-NEXT: Name: pfoo +# CHECK-NEXT: Value: 0x138 +# CHECK-NEXT: Size: 0 +# CHECK-NEXT: Binding: Global +# CHECK-NEXT: Type: None +# CHECK-NEXT: Other: 0 +# CHECK-NEXT: Section: .bss +# CHECK-NEXT: } +# CHECK-NEXT: Symbol { +# CHECK-NEXT: Name: pbar +# CHECK-NEXT: Value: 0x134 +# CHECK-NEXT: Size: 0 +# CHECK-NEXT: Binding: Global +# CHECK-NEXT: Type: None +# CHECK-NEXT: Other: 0 +# CHECK-NEXT: Section: .bss +# CHECK-NEXT: } +# CHECK-NEXT: ] + +.comm foo,4,4 +.comm bar,4,4 +movl $1, foo(%rip) +movl $2, bar(%rip) From owner-svn-src-all@freebsd.org Sun Jan 29 22:06:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84C0BCC7E5D; Sun, 29 Jan 2017 22:06:53 +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 422A0117E; Sun, 29 Jan 2017 22:06:53 +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 v0TM6qX3004243; Sun, 29 Jan 2017 22:06:52 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TM6q8U004242; Sun, 29 Jan 2017 22:06:52 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201701292206.v0TM6q8U004242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 29 Jan 2017 22:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312969 - head/sys/modules/dtb/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 22:06:53 -0000 Author: gonzo Date: Sun Jan 29 22:06:52 2017 New Revision: 312969 URL: https://svnweb.freebsd.org/changeset/base/312969 Log: [am335x] Fix DTB name in LINKS variable Fix apparent typo introduced by r312915, upstream DTBs are am335x-* not am3335x-* Modified: head/sys/modules/dtb/am335x/Makefile Modified: head/sys/modules/dtb/am335x/Makefile ============================================================================== --- head/sys/modules/dtb/am335x/Makefile Sun Jan 29 22:00:47 2017 (r312968) +++ head/sys/modules/dtb/am335x/Makefile Sun Jan 29 22:06:52 2017 (r312969) @@ -7,7 +7,7 @@ DTS= \ ufw.dts LINKS= \ - ${DTBDIR}/am3335x-bone.dtb ${DTBDIR}/beaglebone.dtb \ - ${DTBDIR}/am3335x-boneblack.dtb ${DTBDIR}/beaglebone-black.dtb + ${DTBDIR}/am335x-bone.dtb ${DTBDIR}/beaglebone.dtb \ + ${DTBDIR}/am335x-boneblack.dtb ${DTBDIR}/beaglebone-black.dtb .include From owner-svn-src-all@freebsd.org Sun Jan 29 22:33:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A867DCC7543; Sun, 29 Jan 2017 22:33:02 +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 692D21EEC; Sun, 29 Jan 2017 22:33:02 +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 v0TMX11J016316; Sun, 29 Jan 2017 22:33:01 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TMX0hZ016308; Sun, 29 Jan 2017 22:33:00 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701292233.v0TMX0hZ016308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 29 Jan 2017 22:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312970 - vendor/openresolv/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 22:33:02 -0000 Author: pfg Date: Sun Jan 29 22:33:00 2017 New Revision: 312970 URL: https://svnweb.freebsd.org/changeset/base/312970 Log: Import openresolv 3.9.0 Obtained from: http://roy.marples.name/projects/openresolv Modified: vendor/openresolv/dist/Makefile vendor/openresolv/dist/configure vendor/openresolv/dist/libc.in vendor/openresolv/dist/pdns_recursor.in vendor/openresolv/dist/resolvconf.8.in vendor/openresolv/dist/resolvconf.conf.5.in vendor/openresolv/dist/resolvconf.in Modified: vendor/openresolv/dist/Makefile ============================================================================== --- vendor/openresolv/dist/Makefile Sun Jan 29 22:06:52 2017 (r312969) +++ vendor/openresolv/dist/Makefile Sun Jan 29 22:33:00 2017 (r312970) @@ -37,6 +37,11 @@ SED_STATUSARG= -e 's:@STATUSARG@:${STAT DISTPREFIX?= ${PKG}-${VERSION} DISTFILEGZ?= ${DISTPREFIX}.tar.gz DISTFILE?= ${DISTPREFIX}.tar.xz +DISTINFO= ${DISTFILE}.distinfo +DISTINFOSIGN= ${DISTINFO}.asc +CKSUM?= cksum -a SHA256 +PGP?= netpgp + FOSSILID?= current .SUFFIXES: .in @@ -53,7 +58,7 @@ clean: rm -f ${TARGET} distclean: clean - rm -f config.mk ${DISTFILE} + rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} installdirs: @@ -83,3 +88,11 @@ dist: fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} gunzip -c ${DISTFILEGZ} | xz >${DISTFILE} rm ${DISTFILEGZ} + +distinfo: dist + rm -f ${DISTINFO} ${DISTINFOSIGN} + ${CKSUM} ${DISTFILE} >${DISTINFO} + #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO} + ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO} + chmod 644 ${DISTINFOSIGN} + ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} Modified: vendor/openresolv/dist/configure ============================================================================== --- vendor/openresolv/dist/configure Sun Jan 29 22:06:52 2017 (r312969) +++ vendor/openresolv/dist/configure Sun Jan 29 22:33:00 2017 (r312970) @@ -120,14 +120,21 @@ echo "Configuring openresolv for ... $OS rm -rf $CONFIG_MK echo "# $OS" >$CONFIG_MK -# On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled -# regardless of if it's not running. -# So we force onestatus to work around this silly bug. -if [ -z "$STATUSARG" ]; then - case "$OS" in - freebsd*) STATUSARG="onestatus";; - esac -fi +case "$OS" in +freebsd*) + # On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled + # regardless of if it's not running. + # So we force onestatus to work around this silly bug. + if [ -z "$STATUSARG" ]; then + STATUSARG="onestatus" + fi + ;; +linux*) + # cksum does't support -a and netpgp is rare + echo "CKSUM= sha256sum --tag" >>$CONFIG_MK + echo "PGP= gpg2" >>$CONFIG_MK + ;; +esac for x in SYSCONFDIR SBINDIR LIBEXECDIR VARDIR MANDIR RESTARTCMD RCDIR STATUSARG do Modified: vendor/openresolv/dist/libc.in ============================================================================== --- vendor/openresolv/dist/libc.in Sun Jan 29 22:06:52 2017 (r312969) +++ vendor/openresolv/dist/libc.in Sun Jan 29 22:33:00 2017 (r312970) @@ -216,7 +216,7 @@ fi if $backup; then if [ "$newconf" = "$signature$NL" ]; then if [ -e "$resolv_conf.bak" ]; then - newconf="$(cat "$resolv_conf.bak")" + newconf="$(cat "$resolv_conf.bak")$NL" fi elif [ -e "$resolv_conf" ]; then read line <"$resolv_conf" Modified: vendor/openresolv/dist/pdns_recursor.in ============================================================================== --- vendor/openresolv/dist/pdns_recursor.in Sun Jan 29 22:06:52 2017 (r312969) +++ vendor/openresolv/dist/pdns_recursor.in Sun Jan 29 22:33:00 2017 (r312970) @@ -34,7 +34,6 @@ NL=" " : ${pdns_service:=pdns_recursor} -: ${pdns_restart:=@RESTARTCMD ${pdns_service}@} newzones= @@ -68,5 +67,12 @@ if [ ! -f "$pdns_zones" ] || \ [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ] then printf %s "$newzones" >"$pdns_zones" - eval $pdns_restart + if [ -n "$pdns_restart" ]; then + eval $pdns_restart + elif [ -n "$RESTARTCMD" ]; then + set -- ${pdns_service} + eval $RESTARTCMD + else + @SBINDIR@/resolvconf -r ${pdns_service} + fi fi Modified: vendor/openresolv/dist/resolvconf.8.in ============================================================================== --- vendor/openresolv/dist/resolvconf.8.in Sun Jan 29 22:06:52 2017 (r312969) +++ vendor/openresolv/dist/resolvconf.8.in Sun Jan 29 22:33:00 2017 (r312970) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 7, 2016 +.Dd November 29, 2016 .Dt RESOLVCONF 8 .Os .Sh NAME @@ -45,6 +45,8 @@ .Fl il Ar pattern .Nm .Fl u +.Nm +.Fl Fl version .Sh DESCRIPTION .Nm manages @@ -106,7 +108,7 @@ See .Xr resolvconf.conf 5 for how to configure .Nm -to use a local name server. +to use a local name server and how to remove the private marking. .Pp .Nm can mark an interfaces @@ -126,7 +128,7 @@ on the .Ar interface . .Pp Here are some options for the above commands:- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It Fl f Ignore non existent interfaces. Only really useful for deleting interfaces. @@ -146,7 +148,7 @@ as exclusive when adding, otherwise only .Pp .Nm has some more commands for general usage:- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It Fl i Ar pattern List the interfaces and protocols, optionally matching .Ar pattern , @@ -168,12 +170,15 @@ to update all its subscribers. .Nm does not update the subscribers when adding a resolv.conf that matches what it already has for that interface. +.It Fl Fl version +Echo the resolvconf version to +.Em stdout . .El .Pp .Nm also has some commands designed to be used by it's subscribers and system startup:- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It Fl I Initialise the state directory .Pa @VARDIR@ . @@ -223,7 +228,7 @@ Here are some suggested protocol tags to .Pa resolv.conf file registered on an .Ar interface Ns No :- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It dhcp Dynamic Host Configuration Protocol. Initial versions of Modified: vendor/openresolv/dist/resolvconf.conf.5.in ============================================================================== --- vendor/openresolv/dist/resolvconf.conf.5.in Sun Jan 29 22:06:52 2017 (r312969) +++ vendor/openresolv/dist/resolvconf.conf.5.in Sun Jan 29 22:33:00 2017 (r312970) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 28, 2016 +.Dd December 29, 2016 .Dt RESOLVCONF.CONF 5 .Os .Sh NAME @@ -69,6 +69,11 @@ If unset, defaults to the following:- These interfaces will be processed next, unless they have a metric. If unset, defaults to the following:- .D1 tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]* +.It Sy inclusive_interfaces +Ignore any exlcusive marking for these interfaces. +This is handy when 3rd party integrations force the +.Nm resolvconf -x +option and you want to disable it easily. .It Sy local_nameservers If unset, defaults to the following:- .D1 127.* 0.0.0.0 255.255.255.255 ::1 @@ -102,6 +107,11 @@ Requires a local nameserver other than l This is equivalent to the .Nm resolvconf -p option. +.It Sy public_interfaces +Force these interface to be public, overriding the private marking. +This is handy when 3rd party integrations force the +.Nm resolvconf -p +option and you want to disable it easily. .It Sy replace Is a space separated list of replacement keywords. The syntax is this: Modified: vendor/openresolv/dist/resolvconf.in ============================================================================== --- vendor/openresolv/dist/resolvconf.in Sun Jan 29 22:06:52 2017 (r312969) +++ vendor/openresolv/dist/resolvconf.in Sun Jan 29 22:33:00 2017 (r312970) @@ -25,13 +25,19 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. RESOLVCONF="$0" -OPENRESOLV_VERSION="3.8.1" +OPENRESOLV_VERSION="3.9.0" SYSCONFDIR=@SYSCONFDIR@ LIBEXECDIR=@LIBEXECDIR@ VARDIR=@VARDIR@ RCDIR=@RCDIR@ RESTARTCMD=@RESTARTCMD@ +if [ "$1" = "--version" ]; then + echo "openresolv $OPENRESOLV_VERSION" + echo "Copyright (c) 2007-2016 Roy Marples" + exit 0 +fi + # Disregard dhcpcd setting unset interface_order state_dir @@ -90,6 +96,7 @@ usage() that match the specified pattern -u Run updates from our current DNS information + --version Echo the ${RESOLVCONF##*/} version Options: -f Ignore non existent interfaces @@ -129,6 +136,34 @@ strip_trailing_dots() printf "\n" } +private_iface() +{ + local p + + # Allow expansion + cd "$IFACEDIR" + + # Public interfaces override private ones. + for p in $public_interfaces; do + case "$iface" in + "$p"|"$p":*) return 1;; + esac + done + + if [ -e "$PRIVATEDIR/$iface" ]; then + return 0 + fi + + for p in $private_interfaces; do + case "$iface" in + "$p"|"$p":*) return 0;; + esac + done + + # Not a private interface + return 1 +} + # Parse resolv.conf's and make variables # for domain name servers, search name servers and global nameservers parse_resolv() @@ -144,20 +179,10 @@ parse_resolv() if ${new}; then iface="${line#\# resolv.conf from *}" new=false - if [ -e "$PRIVATEDIR/$iface" ]; then + if private_iface "$iface"; then private=true else - # Allow expansion - cd "$IFACEDIR" private=false - for p in $private_interfaces; do - case "$iface" in - "$p"|"$p":*) - private=true - break - ;; - esac - done fi fi ;; @@ -301,9 +326,9 @@ fi" /usr/sbin/service \$1 restart; fi" elif [ -x /bin/sv ]; then - RESTARTCMD="/bin/sv try-restart \$1" + RESTARTCMD="/bin/sv status \$1 >/dev/null 2>&1 && /bin/sv try-restart \$1" elif [ -x /usr/bin/sv ]; then - RESTARTCMD="/usr/bin/sv try-restart \$1" + RESTARTCMD="/usr/bin/sv status \$1 >/dev/null 2>&1 && /usr/bin/sv try-restart \$1" elif [ -e /etc/arch-release -a -d /etc/rc.d ]; then RCDIR=/etc/rc.d RESTARTCMD="if [ -e /var/run/daemons/\$1 ]; then @@ -378,6 +403,14 @@ list_resolv() done fi excl=true + cd "$IFACEDIR" + for i in $inclusive_interfaces; do + if [ -f "$i" -a "$list" = "$i" ]; then + list= + excl=false + break + fi + done ;; *) excl=false @@ -418,7 +451,6 @@ list_resolv() cd "$IFACEDIR" retval=1 - excl=true for i in $(uniqify $list); do # Only list interfaces which we really have if ! [ -f "$i" ]; then @@ -432,8 +464,7 @@ list_resolv() if [ "$cmd" = i -o "$cmd" = "-i" ]; then printf %s "$i " else - echo_resolv "$i" - echo + echo_resolv "$i" && echo fi [ $? = 0 -a "$retval" = 1 ] && retval=0 done From owner-svn-src-all@freebsd.org Sun Jan 29 22:38:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 071C1CC7607; Sun, 29 Jan 2017 22:38:15 +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 99C04E4; Sun, 29 Jan 2017 22:38:14 +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 v0TMcDBp016534; Sun, 29 Jan 2017 22:38:13 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TMcDG8016526; Sun, 29 Jan 2017 22:38:13 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701292238.v0TMcDG8016526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 29 Jan 2017 22:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312971 - vendor/openresolv/3.9.0 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 22:38:15 -0000 Author: pfg Date: Sun Jan 29 22:38:13 2017 New Revision: 312971 URL: https://svnweb.freebsd.org/changeset/base/312971 Log: Tag openresolv 3.9.0. Obtained from: http://roy.marples.name/projects/openresolv Added: vendor/openresolv/3.9.0/ - copied from r312966, vendor/openresolv/dist/ Replaced: vendor/openresolv/3.9.0/Makefile - copied unchanged from r312970, vendor/openresolv/dist/Makefile vendor/openresolv/3.9.0/configure - copied unchanged from r312970, vendor/openresolv/dist/configure vendor/openresolv/3.9.0/libc.in - copied unchanged from r312970, vendor/openresolv/dist/libc.in vendor/openresolv/3.9.0/pdns_recursor.in - copied unchanged from r312970, vendor/openresolv/dist/pdns_recursor.in vendor/openresolv/3.9.0/resolvconf.8.in - copied unchanged from r312970, vendor/openresolv/dist/resolvconf.8.in vendor/openresolv/3.9.0/resolvconf.conf.5.in - copied unchanged from r312970, vendor/openresolv/dist/resolvconf.conf.5.in vendor/openresolv/3.9.0/resolvconf.in - copied unchanged from r312970, vendor/openresolv/dist/resolvconf.in Copied: vendor/openresolv/3.9.0/Makefile (from r312970, vendor/openresolv/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openresolv/3.9.0/Makefile Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/Makefile) @@ -0,0 +1,98 @@ +PKG= openresolv + +# Nasty hack so that make clean works without configure being run +_CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk +CONFIG_MK?= ${_CONFIG_MK} +include ${CONFIG_MK} + +SBINDIR?= /sbin +SYSCONFDIR?= /etc +LIBEXECDIR?= /libexec/resolvconf +VARDIR?= /var/run/resolvconf + +INSTALL?= install +SED?= sed + +VERSION!= ${SED} -n 's/OPENRESOLV_VERSION="\(.*\)".*/\1/p' resolvconf.in + +BINMODE?= 0755 +DOCMODE?= 0644 +MANMODE?= 0444 + +RESOLVCONF= resolvconf resolvconf.8 resolvconf.conf.5 +SUBSCRIBERS= libc dnsmasq named pdnsd unbound +TARGET= ${RESOLVCONF} ${SUBSCRIBERS} +SRCS= ${TARGET:C,$,.in,} # pmake +SRCS:= ${TARGET:=.in} # gmake + +SED_SBINDIR= -e 's:@SBINDIR@:${SBINDIR}:g' +SED_SYSCONFDIR= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' +SED_LIBEXECDIR= -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' +SED_VARDIR= -e 's:@VARDIR@:${VARDIR}:g' +SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g' +SED_RESTARTCMD= -e 's:@RESTARTCMD@:${RESTARTCMD}:g' +SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g' +SED_STATUSARG= -e 's:@STATUSARG@:${STATUSARG}:g' + +DISTPREFIX?= ${PKG}-${VERSION} +DISTFILEGZ?= ${DISTPREFIX}.tar.gz +DISTFILE?= ${DISTPREFIX}.tar.xz +DISTINFO= ${DISTFILE}.distinfo +DISTINFOSIGN= ${DISTINFO}.asc +CKSUM?= cksum -a SHA256 +PGP?= netpgp + +FOSSILID?= current + +.SUFFIXES: .in + +all: ${TARGET} + +.in: Makefile ${CONFIG_MK} + ${SED} ${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \ + ${SED_VARDIR} \ + ${SED_RCDIR} ${SED_RESTARTCMD} ${SED_RCDIR} ${SED_STATUSARG} \ + $< > $@ + +clean: + rm -f ${TARGET} + +distclean: clean + rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} + +installdirs: + +proginstall: ${TARGET} + ${INSTALL} -d ${DESTDIR}${SBINDIR} + ${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${SBINDIR} + ${INSTALL} -d ${DESTDIR}${SYSCONFDIR} + test -e ${DESTDIR}${SYSCONFDIR}/resolvconf.conf || \ + ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR} + ${INSTALL} -d ${DESTDIR}${LIBEXECDIR} + ${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR} + +maninstall: + ${INSTALL} -d ${DESTDIR}${MANDIR}/man8 + ${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8 + ${INSTALL} -d ${DESTDIR}${MANDIR}/man5 + ${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5 + +install: proginstall maninstall + +import: + rm -rf /tmp/${DISTPREFIX} + ${INSTALL} -d /tmp/${DISTPREFIX} + cp README ${SRCS} /tmp/${DISTPREFIX} + +dist: + fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} + gunzip -c ${DISTFILEGZ} | xz >${DISTFILE} + rm ${DISTFILEGZ} + +distinfo: dist + rm -f ${DISTINFO} ${DISTINFOSIGN} + ${CKSUM} ${DISTFILE} >${DISTINFO} + #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO} + ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO} + chmod 644 ${DISTINFOSIGN} + ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} Copied: vendor/openresolv/3.9.0/configure (from r312970, vendor/openresolv/dist/configure) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openresolv/3.9.0/configure Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/configure) @@ -0,0 +1,159 @@ +#!/bin/sh +# Try and be like autotools configure, but without autotools + +# Ensure that we do not inherit these from env +OS= +BUILD= +HOST= +TARGET= +RESTARTCMD= +RCDIR= +STATUSARG= + +for x do + opt=${x%%=*} + var=${x#*=} + case "$opt" in + --os|OS) OS=$var;; + --with-cc|CC) CC=$var;; + --debug) DEBUG=$var;; + --disable-debug) DEBUG=no;; + --enable-debug) DEBUG=yes;; + --prefix) PREFIX=$var;; + --sysconfdir) SYSCONFDIR=$var;; + --bindir|--sbindir) SBINDIR=$var;; + --libexecdir) LIBEXECDIR=$var;; + --statedir|--localstatedir) STATEDIR=$var;; + --dbdir) DBDIR=$var;; + --rundir) RUNDIR=$var;; + --mandir) MANDIR=$var;; + --with-ccopts|CFLAGS) CFLAGS=$var;; + CPPFLAGS) CPPFLAGS=$var;; + --build) BUILD=$var;; + --host) HOST=$var;; + --target) TARGET=$var;; + --libdir) LIBDIR=$var;; + --restartcmd) RESTARTCMD=$var;; + --rcdir) RCDIR=$var;; + --statusarg) STATUSARG=$var;; + --includedir) eval INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }$var";; + --datadir|--infodir) ;; # ignore autotools + --disable-maintainer-mode|--disable-dependency-tracking) ;; + --help) echo "See the README file for available options"; exit 0;; + *) echo "$0: WARNING: unknown option $opt" >&2;; + esac +done + +if [ -z "$LIBEXECDIR" ]; then + printf "Checking for directory /libexec ... " + if [ -d /libexec ]; then + echo "yes" + LIBEXECDIR=$PREFIX/libexec/resolvconf + else + echo "no" + LIBEXECDIR=$PREFIX/lib/resolvconf + fi +fi +if [ -z "$RUNDIR" ]; then + printf "Checking for directory /run ... " + if [ -d /run ]; then + echo "yes" + RUNDIR=/run + else + echo "no" + RUNDIR=/var/run + fi +fi + +: ${SED:=sed} + +: ${SYSCONFDIR:=$PREFIX/etc} +: ${SBINDIR:=$PREFIX/sbin} +: ${LIBEXECDIR:=$PREFIX/libexec/resolvconf} +: ${STATEDIR:=/var} +: ${RUNDIR:=$STATEDIR/run} +: ${MANDIR:=${PREFIX:-/usr}/share/man} + +eval SYSCONFDIR="$SYSCONFDIR" +eval SBINDIR="$SBINDIR" +eval LIBEXECDIR="$LIBEXECDIR" +eval VARDIR="$RUNDIR/resolvconf" +eval MANDIR="$MANDIR" + +CONFIG_MK=config.mk + +if [ -z "$BUILD" ]; then + # autoconf target triplet: cpu-vendor-os + BUILD=$(uname -m)-unknown-$(uname -s | tr '[:upper:]' '[:lower:]') +fi +: ${HOST:=$BUILD} + +if [ -z "$OS" ]; then + echo "Deriving operating system from ... $HOST" + # Derive OS from cpu-vendor-[kernel-]os + CPU=${HOST%%-*} + REST=${HOST#*-} + if [ "$CPU" != "$REST" ]; then + VENDOR=${REST%%-*} + REST=${REST#*-} + if [ "$VENDOR" != "$REST" ]; then + # Use kernel if given, otherwise os + OS=${REST%%-*} + else + # 2 tupple + OS=$VENDOR + VENDOR= + fi + fi + + # Work with cpu-kernel-os, ie Debian + case "$VENDOR" in + linux*|kfreebsd*) OS=$VENDOR; VENDOR= ;; + esac + # Special case + case "$OS" in + gnu*) OS=hurd;; # No HURD support as yet + esac +fi + +echo "Configuring openresolv for ... $OS" +rm -rf $CONFIG_MK +echo "# $OS" >$CONFIG_MK + +case "$OS" in +freebsd*) + # On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled + # regardless of if it's not running. + # So we force onestatus to work around this silly bug. + if [ -z "$STATUSARG" ]; then + STATUSARG="onestatus" + fi + ;; +linux*) + # cksum does't support -a and netpgp is rare + echo "CKSUM= sha256sum --tag" >>$CONFIG_MK + echo "PGP= gpg2" >>$CONFIG_MK + ;; +esac + +for x in SYSCONFDIR SBINDIR LIBEXECDIR VARDIR MANDIR RESTARTCMD RCDIR STATUSARG +do + eval v=\$$x + # Make files look nice for import + l=$((10 - ${#x})) + unset t + [ $l -gt 3 ] && t=" " + echo "$x=$t $v" >>$CONFIG_MK +done + +echo +echo " SYSCONFDIR = $SYSCONFDIR" +echo " SBINDIR = $SBINDIR" +echo " LIBEXECDIR = $LIBEXECDIR" +echo " VARDIR = $RUNDIR" +echo " MANDIR = $MANDIR" +echo +echo " RESTARTCMD = $RESTARTCMD" +echo " RCDIR = $RCDIR" +echo " STATUSARG = $STATUSARG" +echo Copied: vendor/openresolv/3.9.0/libc.in (from r312970, vendor/openresolv/dist/libc.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openresolv/3.9.0/libc.in Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/libc.in) @@ -0,0 +1,252 @@ +#!/bin/sh +# Copyright (c) 2007-2016 Roy Marples +# All rights reserved + +# libc subscriber for resolvconf + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +SYSCONFDIR=@SYSCONFDIR@ +LIBEXECDIR=@LIBEXECDIR@ +VARDIR=@VARDIR@ +IFACEDIR="$VARDIR/interfaces" +NL=" +" + +# sed may not be available, and this is faster on small files +key_get_value() +{ + local key="$1" x= line= + + shift + if [ $# -eq 0 ]; then + while read -r line; do + case "$line" in + "$key"*) echo "${line##$key}";; + esac + done + else + for x do + while read -r line; do + case "$line" in + "$key"*) echo "${line##$key}";; + esac + done < "$x" + done + fi +} + +keys_remove() +{ + local key x line found + + while read -r line; do + found=false + for key do + case "$line" in + "$key"*|"#"*|" "*|" "*|"") found=true;; + esac + $found && break + done + $found || echo "$line" + done +} + +local_nameservers="127.* 0.0.0.0 255.255.255.255 ::1" + +# Support original resolvconf configuration layout +# as well as the openresolv config file +if [ -f "$SYSCONFDIR"/resolvconf.conf ]; then + . "$SYSCONFDIR"/resolvconf.conf +elif [ -d "$SYSCONFDIR"/resolvconf ]; then + SYSCONFDIR="$SYSCONFDIR/resolvconf/resolv.conf.d" + base="$SYSCONFDIR/resolv.conf.d/base" + if [ -f "$base" ]; then + prepend_nameservers="$(key_get_value "nameserver " "$base")" + domain="$(key_get_value "domain " "$base")" + prepend_search="$(key_get_value "search " "$base")" + resolv_conf_options="$(key_get_value "options " "$base")" + resolv_conf_sortlist="$(key_get_value "sortlist " "$base")" + fi + if [ -f "$SYSCONFDIR"/resolv.conf.d/head ]; then + resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.d/head)" + fi + if [ -f "$SYSCONFDIR"/resolv.conf.d/tail ]; then + resolv_conf_tail="$(cat "$SYSCONFDIR"/resolv.conf.d/tail)" + fi +fi +: ${resolv_conf:=/etc/resolv.conf} +: ${libc_service:=nscd} +: ${list_resolv:=@SBINDIR@/resolvconf -l} +if [ "${resolv_conf_head-x}" = x -a -f "$SYSCONFDIR"/resolv.conf.head ]; then + resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.head)" +fi +if [ "${resolv_conf_tail-x}" = x -a -f "$SYSCONFDIR"/resolv.conf.tail ]; then + resolv_conf_tail="$(cat "$SYSCONFDIR"/resolv.conf.tail)" +fi + +backup=true +signature="# Generated by resolvconf" + +uniqify() +{ + local result= + while [ -n "$1" ]; do + case " $result " in + *" $1 "*);; + *) result="$result $1";; + esac + shift + done + echo "${result# *}" +} + +case "${resolv_conf_passthrough:-NO}" in +[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + backup=false + newest= + for conf in "$IFACEDIR"/*; do + if [ -z "$newest" -o "$conf" -nt "$newest" ]; then + newest="$conf" + fi + done + [ -z "$newest" ] && exit 0 + newconf="$(cat "$newest")$NL" + ;; +/dev/null|[Nn][Uu][Ll][Ll]) + : ${resolv_conf_local_only:=NO} + if [ "$local_nameservers" = "127.* 0.0.0.0 255.255.255.255 ::1" ]; then + local_nameservers= + fi + # Need to overwrite our variables. + eval "$(@SBINDIR@/resolvconf -V)" + ;; + +*) + [ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" + ;; +esac +case "${resolv_conf_passthrough:-NO}" in +[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;; +*) + : ${domain:=$DOMAIN} + newsearch="$(uniqify $prepend_search $SEARCH $append_search)" + NS="$LOCALNAMESERVERS $NAMESERVERS" + newns= + gotlocal=false + for n in $(uniqify $prepend_nameservers $NS $append_nameservers); do + add=true + islocal=false + for l in $local_nameservers; do + case "$n" in + $l) islocal=true; gotlocal=true; break;; + esac + done + if ! $islocal; then + case "${resolv_conf_local_only:-YES}" in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + $gotlocal && add=false;; + esac + fi + $add && newns="$newns $n" + done + + # Hold our new resolv.conf in a variable to save on temporary files + newconf="$signature$NL" + if [ -n "$resolv_conf_head" ]; then + newconf="$newconf$resolv_conf_head$NL" + fi + + [ -n "$domain" ] && newconf="${newconf}domain $domain$NL" + if [ -n "$newsearch" -a "$newsearch" != "$domain" ]; then + newconf="${newconf}search $newsearch$NL" + fi + for n in $newns; do + newconf="${newconf}nameserver $n$NL" + done + + # Now add anything we don't care about such as sortlist and options + stuff="$($list_resolv | keys_remove nameserver domain search)" + if [ -n "$stuff" ]; then + newconf="$newconf$stuff$NL" + fi + + # Append any user defined ones + if [ -n "$resolv_conf_options" ]; then + newconf="${newconf}options $resolv_conf_options$NL" + fi + if [ -n "$resolv_conf_sortlist" ]; then + newconf="${newconf}sortlist $resolv_conf_sortlist$NL" + fi + + if [ -n "$resolv_conf_tail" ]; then + newconf="$newconf$resolv_conf_tail$NL" + fi + ;; +esac + +# Check if the file has actually changed or not +if [ -e "$resolv_conf" ]; then + [ "$(cat "$resolv_conf")" = "$(printf %s "$newconf")" ] && exit 0 +fi + +# Change is good. +# If the old file does not have our signature, back it up. +# If the new file just has our signature, restore the backup. +if $backup; then + if [ "$newconf" = "$signature$NL" ]; then + if [ -e "$resolv_conf.bak" ]; then + newconf="$(cat "$resolv_conf.bak")$NL" + fi + elif [ -e "$resolv_conf" ]; then + read line <"$resolv_conf" + if [ "$line" != "$signature" ]; then + cp "$resolv_conf" "$resolv_conf.bak" + fi + fi +fi + +# Create our resolv.conf now +(umask 022; printf %s "$newconf" >"$resolv_conf") +if [ -n "$libc_restart" ]; then + eval $libc_restart +elif [ -n "$RESTARTCMD" ]; then + set -- ${libc_service} + eval $RESTARTCMD +else + @SBINDIR@/resolvconf -r ${libc_service} +fi + +retval=0 +# Notify users of the resolver +for script in "$LIBEXECDIR"/libc.d/*; do + if [ -f "$script" ]; then + if [ -x "$script" ]; then + "$script" "$@" + else + (. "$script") + fi + retval=$(($retval + $?)) + fi +done +exit $retval Copied: vendor/openresolv/3.9.0/pdns_recursor.in (from r312970, vendor/openresolv/dist/pdns_recursor.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openresolv/3.9.0/pdns_recursor.in Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/pdns_recursor.in) @@ -0,0 +1,78 @@ +#!/bin/sh +# Copyright (c) 2009-2011 Roy Marples +# All rights reserved + +# PowerDNS Recursor subscriber for resolvconf + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +[ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0 +. "@SYSCONFDIR@/resolvconf.conf" || exit 1 +[ -z "$pdns_zones" ] && exit 0 +[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" +NL=" +" + +: ${pdns_service:=pdns_recursor} + +newzones= + +# pds_recursor does not present support global forward servers, which +# does limit it's usefulness somewhat. +# If it did, the below code can be enabled, or something like it. +#for n in $NAMESERVERS; do +# newzones="$newzones${newzones:+,}$n" +#done +#[ -n "$newzones" ] && newzones=".=$newzones$NL" + +for d in $DOMAINS; do + newns= + ns="${d#*:}" + while [ -n "$ns" ]; do + newns="$newns${newns:+,}${ns%%,*}" + [ "$ns" = "${ns#*,}" ] && break + ns="${ns#*,}" + done + [ -n "$newns" ] && newzones="$newzones${d%%:*}=$newns$NL" +done + +# Try to ensure that config dirs exist +if type config_mkdirs >/dev/null 2>&1; then + config_mkdirs "$pdnsd_zones" +else + @SBINDIR@/resolvconf -D "$pdnsd_zones" +fi + +if [ ! -f "$pdns_zones" ] || \ + [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ] +then + printf %s "$newzones" >"$pdns_zones" + if [ -n "$pdns_restart" ]; then + eval $pdns_restart + elif [ -n "$RESTARTCMD" ]; then + set -- ${pdns_service} + eval $RESTARTCMD + else + @SBINDIR@/resolvconf -r ${pdns_service} + fi +fi Copied: vendor/openresolv/3.9.0/resolvconf.8.in (from r312970, vendor/openresolv/dist/resolvconf.8.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openresolv/3.9.0/resolvconf.8.in Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/resolvconf.8.in) @@ -0,0 +1,323 @@ +.\" Copyright (c) 2007-2016 Roy Marples +.\" 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. +.\" +.Dd November 29, 2016 +.Dt RESOLVCONF 8 +.Os +.Sh NAME +.Nm resolvconf +.Nd a framework for managing multiple DNS configurations +.Sh SYNOPSIS +.Nm +.Fl I +.Nm +.Op Fl m Ar metric +.Op Fl p +.Op Fl x +.Fl a Ar interface Ns Op Ar .protocol +.No < Ns Pa file +.Nm +.Op Fl f +.Fl d Ar interface Ns Op Ar .protocol +.Nm +.Op Fl x +.Fl il Ar pattern +.Nm +.Fl u +.Nm +.Fl Fl version +.Sh DESCRIPTION +.Nm +manages +.Xr resolv.conf 5 +files from multiple sources, such as DHCP and VPN clients. +Traditionally, the host runs just one client and that updates +.Pa /etc/resolv.conf . +More modern systems frequently have wired and wireless interfaces and there is +no guarantee both are on the same network. +With the advent of VPN and other +types of networking daemons, many things now contend for the contents of +.Pa /etc/resolv.conf . +.Pp +.Nm +solves this by letting the daemon send their +.Xr resolv.conf 5 +file to +.Nm +via +.Xr stdin 4 +with the argument +.Fl a Ar interface Ns Op Ar .protocol +instead of the filesystem. +.Nm +then updates +.Pa /etc/resolv.conf +as it thinks best. +When a local resolver other than libc is installed, such as +.Xr dnsmasq 8 +or +.Xr named 8 , +then +.Nm +will supply files that the resolver should be configured to include. +.Pp +.Nm +assumes it has a job to do. +In some situations +.Nm +needs to act as a deterrent to writing to +.Pa /etc/resolv.conf . +Where this file cannot be made immutable or you just need to toggle this +behaviour, +.Nm +can be disabled by adding +.Sy resolvconf Ns = Ns NO +to +.Xr resolvconf.conf 5 . +.Pp +.Nm +can mark an interfaces +.Pa resolv.conf +as private. +This means that the name servers listed in that +.Pa resolv.conf +are only used for queries against the domain/search listed in the same file. +This only works when a local resolver other than libc is installed. +See +.Xr resolvconf.conf 5 +for how to configure +.Nm +to use a local name server and how to remove the private marking. +.Pp +.Nm +can mark an interfaces +.Pa resolv.conf +as exclusive. +Only the latest exclusive interface is used for processing, otherwise all are. +.Pp +When an interface goes down, it should then call +.Nm +with +.Fl d Ar interface.* +arguments to delete the +.Pa resolv.conf +file(s) for all the +.Ar protocols +on the +.Ar interface . +.Pp +Here are some options for the above commands:- +.Bl -tag -width pattern_opt +.It Fl f +Ignore non existent interfaces. +Only really useful for deleting interfaces. +.It Fl m Ar metric +Set the metric of the interface when adding it, default of 0. +Lower metrics take precedence. +This affects the default order of interfaces when listed. +.It Fl p +Marks the interface +.Pa resolv.conf +as private. +.It Fl x +Mark the interface +.Pa resolv.conf +as exclusive when adding, otherwise only use the latest exclusive interface. +.El +.Pp +.Nm +has some more commands for general usage:- +.Bl -tag -width pattern_opt +.It Fl i Ar pattern +List the interfaces and protocols, optionally matching +.Ar pattern , +we have +.Pa resolv.conf +files for. +.It Fl l Ar pattern +List the +.Pa resolv.conf +files we have. +If +.Ar pattern +is specified then we list the files for the interfaces and protocols +that match it. +.It Fl u +Force +.Nm +to update all its subscribers. +.Nm +does not update the subscribers when adding a resolv.conf that matches +what it already has for that interface. +.It Fl Fl version +Echo the resolvconf version to +.Em stdout . +.El +.Pp +.Nm +also has some commands designed to be used by it's subscribers and +system startup:- +.Bl -tag -width pattern_opt +.It Fl I +Initialise the state directory +.Pa @VARDIR@ . +This only needs to be called if the initial system boot sequence does not +automatically clean it out; for example the state directory is moved +somewhere other than +.Pa /var/run . +If used, it should only be called once as early in the system boot sequence +as possible and before +.Nm +is used to add interfaces. +.It Fl R +Echo the command used to restart a service. +.It Fl r Ar service +If the +.Ar service +is running then restart it. +If the service does not exist or is not running then zero is returned, +otherwise the result of restarting the service. +.It Fl v +Echo variables DOMAINS, SEARCH and NAMESERVERS so that the subscriber can +configure the resolver easily. +.It Fl V +Same as +.Fl v +except that only the information configured in +.Xr resolvconf.conf 5 +is set. +.El +.Sh INTERFACE ORDERING +For +.Nm +to work effectively, it has to process the resolv.confs for the interfaces +in the correct order. +.Nm +first processes interfaces from the +.Sy interface_order +list, then interfaces without a metic and that match the +.Sy dynamic_order +list, then interfaces with a metric in order and finally the rest in +the operating systems lexical order. +See +.Xr resolvconf.conf 5 +for details on these lists. +.Sh PROTOCOLS +Here are some suggested protocol tags to use for each +.Pa resolv.conf +file registered on an +.Ar interface Ns No :- +.Bl -tag -width pattern_opt +.It dhcp +Dynamic Host Configuration Protocol. +Initial versions of +.Nm +did not recommend a +.Ar protocol +tag be appended to the +.Ar interface +name. +When the protocol is absent, it is assumed to be the DHCP protocol. +.It ppp +Point-to-Point Protocol. +.It ra +IPv6 Router Advertisement. +.It dhcp6 +Dynamic Host Configuration Protocol, version 6. +.El +.Sh IMPLEMENTATION NOTES +If a subscriber has the executable bit then it is executed otherwise it is +assumed to be a shell script and sourced into the current environment in a +subshell. +This is done so that subscribers can remain fast, but are also not limited +to the shell language. +.Pp +Portable subscribers should not use anything outside of +.Pa /bin +and +.Pa /sbin +because +.Pa /usr +and others may not be available when booting. +Also, it would be unwise to assume any shell specific features. +.Sh ENVIRONMENT +.Bl -ohang +.It Va IF_METRIC +If the +.Fl m +option is not present then we use +.Va IF_METRIC +for the metric. +.It Va IF_PRIVATE +Marks the interface +.Pa resolv.conf +as private. +.It Va IF_EXCLUSIVE +Marks the interface +.Pa resolv.conf +as exclusive. +.El +.Sh FILES +.Bl -ohang +.It Pa /etc/resolv.conf.bak +Backup file of the original resolv.conf. +.It Pa @SYSCONFDIR@/resolvconf.conf +Configuration file for +.Nm . +.It Pa @LIBEXECDIR@ +Directory of subscribers which are run every time +.Nm +adds, deletes or updates. +.It Pa @LIBEXECDIR@/libc.d +Directory of subscribers which are run after the libc subscriber is run. +.It Pa @VARDIR@ +State directory for +.Nm . +.El +.Sh SEE ALSO +.Xr resolver 3 , +.Xr stdin 4 , +.Xr resolv.conf 5 , +.Xr resolvconf.conf 5 +.Sh HISTORY +This implementation of +.Nm +is called openresolv and is fully command line compatible with Debian's +resolvconf, as written by Thomas Hood. +.Sh AUTHORS +.An Roy Marples Aq Mt roy@marples.name +.Sh BUGS +Please report them to +.Lk http://roy.marples.name/projects/openresolv +.Pp +.Nm +does not validate any of the files given to it. +.Pp +When running a local resolver other than libc, you will need to configure it +to include files that +.Nm +will generate. +You should consult +.Xr resolvconf.conf 5 +for instructions on how to configure your resolver. Copied: vendor/openresolv/3.9.0/resolvconf.conf.5.in (from r312970, vendor/openresolv/dist/resolvconf.conf.5.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openresolv/3.9.0/resolvconf.conf.5.in Sun Jan 29 22:38:13 2017 (r312971, copy of r312970, vendor/openresolv/dist/resolvconf.conf.5.in) @@ -0,0 +1,331 @@ +.\" Copyright (c) 2009-2016 Roy Marples +.\" 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. +.\" +.Dd December 29, 2016 +.Dt RESOLVCONF.CONF 5 +.Os +.Sh NAME +.Nm resolvconf.conf +.Nd resolvconf configuration file +.Sh DESCRIPTION +.Nm +is the configuration file for +.Xr resolvconf 8 . +The +.Nm +file is a shell script that is sourced by +.Xr resolvconf 8 , +meaning that +.Nm +must contain valid shell commands. +Listed below are the standard +.Nm +variables that may be set. +If the values contain whitespace, wildcards or other special shell characters, +ensure they are quoted and escaped correctly. +See the +.Sy replace +variable for an example on quoting. +.Pp +After updating this file, you may wish to run +.Nm resolvconf -u +to apply the new configuration. +.Pp +When a dynamically generated list is appended or prepended to, the whole +is made unique where left-most wins. +.Sh RESOLVCONF OPTIONS +.Bl -tag -width indent +.It Sy resolvconf +Set to NO to disable +.Nm resolvconf +from running any subscribers. +Defaults to YES. +.It Sy interface_order +These interfaces will always be processed first. +If unset, defaults to the following:- +.D1 lo lo[0-9]* +.It Sy dynamic_order +These interfaces will be processed next, unless they have a metric. +If unset, defaults to the following:- +.D1 tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]* +.It Sy inclusive_interfaces *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jan 30 01:11:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D092CC6C88; Mon, 30 Jan 2017 01:11:32 +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 4780ABA3; Mon, 30 Jan 2017 01:11:32 +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 v0U1BVW0081273; Mon, 30 Jan 2017 01:11:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U1BV6L081269; Mon, 30 Jan 2017 01:11:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701300111.v0U1BV6L081269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 30 Jan 2017 01:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312972 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 01:11:32 -0000 Author: adrian Date: Mon Jan 30 01:11:30 2017 New Revision: 312972 URL: https://svnweb.freebsd.org/changeset/base/312972 Log: [net80211] address seqno allocation for group addressed frames After some digging and looking at packet traces, it looks like the sequence number allocation being done by net80211 doesn't meet 802.11-2012. Specifically, group addressed frames (broadcast, multicast) have sequence numbers allocated from a separate pool, even if they're QoS frames. This patch starts to try and address this, both on transmit and receive. * When receiving, don't throw away multicast frames for now. It's sub-optimal, but until we correctly track group addressed frames via another TID counter, this is the best we can do. * When doing A-MPDU checks, don't include group addressed frames in the sequence number checks. * When transmitting, don't allocate group frame sequence numbers from the TID, instead use the NONQOS TID for allocation. This may fix iwn(4) 11n because I /think/ this was one of the handful of places where ni_txseqs[] was being assigned /outside/ of the driver itself. This however doesn't completely fix things - notably the way that TID assignment versus WME assignment for driver hardware queues will mess up multicast ordering. For example, if all multicast QoS frames come from one sequence number space but they're expected to obey the QoS value assigned, they'll end up in different queues in the hardware and go out in different orders. I can't fix that right now and indeed fixing it will require some pretty heavy lifting of both the WME<->TID QoS assignment, as well as figuring out what the correct way for drivers to behave. For example, both iwn(4) and ath(4) shouldn't put QoS multicast traffic into the same output queue as aggregate traffic, because the sequence numbers are all wrong. So perhaps the correct thing to do there is ignore the WME/TID for QoS traffic and map it all to the best effort queue or something, and ensure it doesn't muck up the TID/blockack window tracking. However, I'm /pretty/ sure that is still going to happen. .. maybe I should disable multicast QoS frames in general as well, but I don't know what that'll do for whatever the current state of 802.11s mesh support is. Tested: * STA mode, ath10k NIC * AP mode, AR9344/AR9580 AP * iperf tcp/udp tests with concurrent multicast QoS traffic. Before this, iperfs would fail pretty quickly because the sending AP would start sending out QoS multicast frames that would be out of order from the rest of the TID traffic, causing the blockack window to get way, way out of sync. This now doesn't occur. TODO: * verify which QoS frames SHOULD be tagged as M_AMPDU_MPDU. For example, QoS NULL frames shouldn't be tagged! Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D9357 Modified: head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_input.h head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Sun Jan 29 22:38:13 2017 (r312971) +++ head/sys/net80211/ieee80211_ht.c Mon Jan 30 01:11:30 2017 (r312972) @@ -827,6 +827,16 @@ ieee80211_ampdu_reorder(struct ieee80211 */ return PROCESS; } + + /* + * 802.11-2012 9.3.2.10 - Duplicate detection and recovery. + * + * Multicast QoS data frames are checked against a different + * counter, not the per-TID counter. + */ + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) + return PROCESS; + if (IEEE80211_IS_DSTODS(wh)) tid = ((struct ieee80211_qosframe_addr4 *)wh)->i_qos[0]; else Modified: head/sys/net80211/ieee80211_input.h ============================================================================== --- head/sys/net80211/ieee80211_input.h Sun Jan 29 22:38:13 2017 (r312971) +++ head/sys/net80211/ieee80211_input.h Mon Jan 30 01:11:30 2017 (r312972) @@ -149,6 +149,12 @@ ishtinfooui(const uint8_t *frm) * (as the seqnum wraps), handle that special case so packets aren't * incorrectly dropped - ie, if the next packet is sequence number 0 * but a retransmit since the initial packet didn't make it. + * + * XXX TODO: handle sequence number space wrapping with dropped frames; + * especially in high interference conditions under high traffic load + * The RX AMPDU reorder code also needs it. + * + * XXX TODO: update for 802.11-2012 9.3.2.10 Duplicate Detection and Recovery. */ static __inline int ieee80211_check_rxseq(struct ieee80211_node *ni, struct ieee80211_frame *wh, @@ -175,6 +181,13 @@ ieee80211_check_rxseq(struct ieee80211_n if (! IEEE80211_HAS_SEQ(type, subtype)) return 1; + /* + * Always allow multicast frames for now - QoS (any TID) + * or not. + */ + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) + return 1; + tid = ieee80211_gettid(wh); /* Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Jan 29 22:38:13 2017 (r312971) +++ head/sys/net80211/ieee80211_output.c Mon Jan 30 01:11:30 2017 (r312972) @@ -122,9 +122,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 { struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = vap->iv_ifp; -#ifdef IEEE80211_SUPPORT_SUPERG int mcast; -#endif if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && (m->m_flags & M_PWR_SAV) == 0) { @@ -164,9 +162,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 * interface it (might have been) received on. */ m->m_pkthdr.rcvif = (void *)ni; -#ifdef IEEE80211_SUPPORT_SUPERG mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1: 0; -#endif BPF_MTAP(ifp, m); /* 802.3 tx */ @@ -181,10 +177,15 @@ ieee80211_vap_pkt_send_dest(struct ieee8 * The default ic_ampdu_enable routine handles staggering * ADDBA requests in case the receiver NAK's us or we are * otherwise unable to establish a BA stream. + * + * Don't treat group-addressed frames as candidates for aggregation; + * net80211 doesn't support 802.11aa-2012 and so group addressed + * frames will always have sequence numbers allocated from the NON_QOS + * TID. */ if ((ni->ni_flags & IEEE80211_NODE_AMPDU_TX) && (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_TX)) { - if ((m->m_flags & M_EAPOL) == 0) { + if ((m->m_flags & M_EAPOL) == 0 && (! mcast)) { int tid = WME_AC_TO_TID(M_WME_GETAC(m)); struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[tid]; @@ -776,12 +777,20 @@ ieee80211_send_setup( * requiring the TX lock. */ tap = &ni->ni_tx_ampdu[tid]; - if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) + if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) { m->m_flags |= M_AMPDU_MPDU; - else { + } else { if (IEEE80211_HAS_SEQ(type & IEEE80211_FC0_TYPE_MASK, type & IEEE80211_FC0_SUBTYPE_MASK)) - seqno = ni->ni_txseqs[tid]++; + /* + * 802.11-2012 9.3.2.10 - QoS multicast frames + * come out of a different seqno space. + */ + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { + seqno = ni->ni_txseqs[IEEE80211_NONQOS_TID]++; + } else { + seqno = ni->ni_txseqs[tid]++; + } else seqno = 0; @@ -1239,7 +1248,7 @@ ieee80211_encap(struct ieee80211vap *vap struct ieee80211_frame *wh; struct ieee80211_key *key; struct llc *llc; - int hdrsize, hdrspace, datalen, addqos, txfrag, is4addr; + int hdrsize, hdrspace, datalen, addqos, txfrag, is4addr, is_mcast; ieee80211_seq seqno; int meshhdrsize, meshae; uint8_t *qos; @@ -1247,6 +1256,8 @@ ieee80211_encap(struct ieee80211vap *vap IEEE80211_TX_LOCK_ASSERT(ic); + is_mcast = !! (m->m_flags & (M_MCAST | M_BCAST)); + /* * Copy existing Ethernet header to a safe place. The * rest of the code assumes it's ok to strip it when @@ -1291,11 +1302,19 @@ ieee80211_encap(struct ieee80211vap *vap * ap's require all data frames to be QoS-encapsulated * once negotiated in which case we'll need to make this * configurable. - * NB: mesh data frames are QoS. + * + * Don't send multicast QoS frames. + * Technically multicast frames can be QoS if all stations in the + * BSS are also QoS. + * + * NB: mesh data frames are QoS, including multicast frames. */ - addqos = ((ni->ni_flags & (IEEE80211_NODE_QOS|IEEE80211_NODE_HT)) || + addqos = + (((is_mcast == 0) && (ni->ni_flags & + (IEEE80211_NODE_QOS|IEEE80211_NODE_HT))) || (vap->iv_opmode == IEEE80211_M_MBSS)) && (m->m_flags & M_EAPOL) == 0; + if (addqos) hdrsize = sizeof(struct ieee80211_qosframe); else @@ -1560,6 +1579,22 @@ ieee80211_encap(struct ieee80211vap *vap */ if ((m->m_flags & M_AMPDU_MPDU) == 0) { /* + * 802.11-2012 9.3.2.10 - + * + * If this is a multicast frame then we need + * to ensure that the sequence number comes from + * a separate seqno space and not the TID space. + * + * Otherwise multicast frames may actually cause + * holes in the TX blockack window space and + * upset various things. + */ + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) + seqno = ni->ni_txseqs[IEEE80211_NONQOS_TID]++; + else + seqno = ni->ni_txseqs[tid]++; + + /* * NB: don't assign a sequence # to potential * aggregates; we expect this happens at the * point the frame comes off any aggregation q From owner-svn-src-all@freebsd.org Mon Jan 30 02:15:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0A43CC6B64; Mon, 30 Jan 2017 02:15:55 +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 7B0367C2; Mon, 30 Jan 2017 02:15:55 +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 v0U2FsSn006456; Mon, 30 Jan 2017 02:15:54 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U2Fsl0006455; Mon, 30 Jan 2017 02:15:54 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701300215.v0U2Fsl0006455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Jan 2017 02:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312973 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 02:15:55 -0000 Author: jhibbits Date: Mon Jan 30 02:15:54 2017 New Revision: 312973 URL: https://svnweb.freebsd.org/changeset/base/312973 Log: Add atomic_fcmpset_*() inlines for powerpc Summary: atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the read value from the target memory location into the 'old' pointer in the case of failure. Requested by: mjg Differential Revision: https://reviews.freebsd.org/D9325 Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Mon Jan 30 01:11:30 2017 (r312972) +++ head/sys/powerpc/include/atomic.h Mon Jan 30 02:15:54 2017 (r312973) @@ -674,6 +674,129 @@ atomic_cmpset_rel_long(volatile u_long * #define atomic_cmpset_rel_ptr atomic_cmpset_rel_int #endif +/* + * Atomically compare the value stored at *p with *cmpval and if the + * two values are equal, update the value of *p with newval. Returns + * zero if the compare failed and sets *cmpval to the read value from *p, + * nonzero otherwise. + */ +static __inline int +atomic_fcmpset_int(volatile u_int *p, u_int *cmpval, u_int newval) +{ + int ret; + +#ifdef __GNUCLIKE_ASM + __asm __volatile ( + "1:\tlwarx %0, 0, %3\n\t" /* load old value */ + "cmplw %4, %0\n\t" /* compare */ + "bne 2f\n\t" /* exit if not equal */ + "stwcx. %5, 0, %3\n\t" /* attempt to store */ + "bne- 1b\n\t" /* spin if failed */ + "li %0, 1\n\t" /* success - retval = 1 */ + "b 3f\n\t" /* we've succeeded */ + "2:\n\t" + "stwcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ + "stwx %0, 0, %7\n\t" + "li %0, 0\n\t" /* failure - retval = 0 */ + "3:\n\t" + : "=&r" (ret), "=m" (*p), "=m" (*cmpval) + : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) + : "cr0", "memory"); +#endif + + return (ret); +} +static __inline int +atomic_fcmpset_long(volatile u_long *p, u_long *cmpval, u_long newval) +{ + int ret; + +#ifdef __GNUCLIKE_ASM + __asm __volatile ( + #ifdef __powerpc64__ + "1:\tldarx %0, 0, %3\n\t" /* load old value */ + "cmpld %4, %0\n\t" /* compare */ + "bne 2f\n\t" /* exit if not equal */ + "stdcx. %5, 0, %3\n\t" /* attempt to store */ + #else + "1:\tlwarx %0, 0, %3\n\t" /* load old value */ + "cmplw %4, %0\n\t" /* compare */ + "bne 2f\n\t" /* exit if not equal */ + "stwcx. %5, 0, %3\n\t" /* attempt to store */ + #endif + "bne- 1b\n\t" /* spin if failed */ + "li %0, 1\n\t" /* success - retval = 1 */ + "b 3f\n\t" /* we've succeeded */ + "2:\n\t" + #ifdef __powerpc64__ + "stdcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ + "stdx %0, 0, %7\n\t" + #else + "stwcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ + "stwx %0, 0, %7\n\t" + #endif + "li %0, 0\n\t" /* failure - retval = 0 */ + "3:\n\t" + : "=&r" (ret), "=m" (*p), "=m" (*cmpval) + : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) + : "cr0", "memory"); +#endif + + return (ret); +} + +static __inline int +atomic_fcmpset_acq_int(volatile u_int *p, u_int *cmpval, u_int newval) +{ + int retval; + + retval = atomic_fcmpset_int(p, cmpval, newval); + __ATOMIC_ACQ(); + return (retval); +} + +static __inline int +atomic_fcmpset_rel_int(volatile u_int *p, u_int *cmpval, u_int newval) +{ + __ATOMIC_REL(); + return (atomic_fcmpset_int(p, cmpval, newval)); +} + +static __inline int +atomic_fcmpset_acq_long(volatile u_long *p, u_long *cmpval, u_long newval) +{ + u_long retval; + + retval = atomic_fcmpset_long(p, cmpval, newval); + __ATOMIC_ACQ(); + return (retval); +} + +static __inline int +atomic_fcmpset_rel_long(volatile u_long *p, u_long *cmpval, u_long newval) +{ + __ATOMIC_REL(); + return (atomic_fcmpset_long(p, cmpval, newval)); +} + +#define atomic_fcmpset_32 atomic_fcmpset_int +#define atomic_fcmpset_acq_32 atomic_fcmpset_acq_int +#define atomic_fcmpset_rel_32 atomic_fcmpset_rel_int + +#ifdef __powerpc64__ +#define atomic_fcmpset_64 atomic_fcmpset_long +#define atomic_fcmpset_acq_64 atomic_fcmpset_acq_long +#define atomic_fcmpset_rel_64 atomic_fcmpset_rel_long + +#define atomic_fcmpset_ptr atomic_fcmpset_long +#define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_long +#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_long +#else +#define atomic_fcmpset_ptr atomic_fcmpset_int +#define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_int +#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_int +#endif + static __inline u_int atomic_fetchadd_int(volatile u_int *p, u_int v) { From owner-svn-src-all@freebsd.org Mon Jan 30 02:21:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA37ECC6FD4; Mon, 30 Jan 2017 02:21:30 +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 A113CC2B; Mon, 30 Jan 2017 02:21:30 +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 v0U2LTgO007476; Mon, 30 Jan 2017 02:21:29 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U2LTvM007474; Mon, 30 Jan 2017 02:21:29 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701300221.v0U2LTvM007474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Jan 2017 02:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312974 - in head/sys: powerpc/powerpc sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 02:21:31 -0000 Author: jhibbits Date: Mon Jan 30 02:21:29 2017 New Revision: 312974 URL: https://svnweb.freebsd.org/changeset/base/312974 Log: Add a INTR_TRIG_INVALID, and use it in the powerpc interrupt code. Summary: Clang throws the following warning in powerpc intr_machdep: /usr/src/sys/powerpc/powerpc/intr_machdep.c:454:15: warning: comparison of constant -1 with expression of type 'enum intr_trigger' is always false [-Wtautological-constant-out-of-range-compare] if (i->trig == -1) ~~~~~~~ ^ ~~ This may lead to legitimate problems with aggressive optimizations, if not now then in the future. To avoid this, add a new enum, INTR_TRIG_INVALID, set to -1, and use this new enumeration in these checks. Test Plan: Compile test. Reviewed By: jhb, kib Differential Revision: https://reviews.freebsd.org/D9300 Modified: head/sys/powerpc/powerpc/intr_machdep.c head/sys/sys/bus.h Modified: head/sys/powerpc/powerpc/intr_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/intr_machdep.c Mon Jan 30 02:15:54 2017 (r312973) +++ head/sys/powerpc/powerpc/intr_machdep.c Mon Jan 30 02:21:29 2017 (r312974) @@ -451,7 +451,7 @@ powerpc_enable_intr(void) if (error) continue; - if (i->trig == -1) + if (i->trig == INTR_TRIGGER_INVALID) PIC_TRANSLATE_CODE(i->pic, i->intline, i->fwcode, &i->trig, &i->pol); if (i->trig != INTR_TRIGGER_CONFORM || @@ -497,7 +497,7 @@ powerpc_setup_intr(const char *name, u_i error = powerpc_map_irq(i); if (!error) { - if (i->trig == -1) + if (i->trig == INTR_TRIGGER_INVALID) PIC_TRANSLATE_CODE(i->pic, i->intline, i->fwcode, &i->trig, &i->pol); @@ -545,7 +545,7 @@ powerpc_fw_config_intr(int irq, int sens if (i == NULL) return (ENOMEM); - i->trig = -1; + i->trig = INTR_TRIGGER_INVALID; i->pol = INTR_POLARITY_CONFORM; i->fwcode = sense_code; Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Mon Jan 30 02:15:54 2017 (r312973) +++ head/sys/sys/bus.h Mon Jan 30 02:21:29 2017 (r312974) @@ -265,6 +265,7 @@ enum intr_type { }; enum intr_trigger { + INTR_TRIGGER_INVALID = -1, INTR_TRIGGER_CONFORM = 0, INTR_TRIGGER_EDGE = 1, INTR_TRIGGER_LEVEL = 2 From owner-svn-src-all@freebsd.org Mon Jan 30 02:24:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B305CC70A3; Mon, 30 Jan 2017 02:24:55 +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 7590DE6D; Mon, 30 Jan 2017 02:24:55 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0U2OskA010422; Mon, 30 Jan 2017 02:24:54 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U2Osj1010421; Mon, 30 Jan 2017 02:24:54 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701300224.v0U2Osj1010421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 30 Jan 2017 02:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312975 - head/sys/i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 02:24:55 -0000 Author: mjg Date: Mon Jan 30 02:24:54 2017 New Revision: 312975 URL: https://svnweb.freebsd.org/changeset/base/312975 Log: i386: add atomic_fcmpset Tested by: pho Modified: head/sys/i386/include/atomic.h Modified: head/sys/i386/include/atomic.h ============================================================================== --- head/sys/i386/include/atomic.h Mon Jan 30 02:21:29 2017 (r312974) +++ head/sys/i386/include/atomic.h Mon Jan 30 02:24:54 2017 (r312975) @@ -106,6 +106,7 @@ void atomic_##NAME##_##TYPE(volatile u_# void atomic_##NAME##_barr_##TYPE(volatile u_##TYPE *p, u_##TYPE v) int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src); +int atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src); u_int atomic_fetchadd_int(volatile u_int *p, u_int v); int atomic_testandset_int(volatile u_int *p, u_int v); int atomic_testandclear_int(volatile u_int *p, u_int v); @@ -214,6 +215,24 @@ atomic_cmpset_int(volatile u_int *dst, u return (res); } +static __inline int +atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) +{ + u_char res; + + __asm __volatile( + " " MPLOCKED " " + " cmpxchgl %3,%1 ; " + " sete %0 ; " + "# atomic_cmpset_int" + : "=r" (res), /* 0 */ + "+m" (*dst), /* 1 */ + "+a" (*expect) /* 2 */ + : "r" (src) /* 3 */ + : "memory", "cc"); + return (res); +} + #endif /* CPU_DISABLE_CMPXCHG */ /* @@ -684,6 +703,8 @@ u_long atomic_swap_long(volatile u_long #define atomic_subtract_rel_int atomic_subtract_barr_int #define atomic_cmpset_acq_int atomic_cmpset_int #define atomic_cmpset_rel_int atomic_cmpset_int +#define atomic_fcmpset_acq_int atomic_fcmpset_int +#define atomic_fcmpset_rel_int atomic_fcmpset_int #define atomic_set_acq_long atomic_set_barr_long #define atomic_set_rel_long atomic_set_barr_long @@ -695,6 +716,8 @@ u_long atomic_swap_long(volatile u_long #define atomic_subtract_rel_long atomic_subtract_barr_long #define atomic_cmpset_acq_long atomic_cmpset_long #define atomic_cmpset_rel_long atomic_cmpset_long +#define atomic_fcmpset_acq_long atomic_fcmpset_long +#define atomic_fcmpset_rel_long atomic_fcmpset_long #define atomic_readandclear_int(p) atomic_swap_int(p, 0) #define atomic_readandclear_long(p) atomic_swap_long(p, 0) @@ -749,6 +772,9 @@ u_long atomic_swap_long(volatile u_long #define atomic_cmpset_32 atomic_cmpset_int #define atomic_cmpset_acq_32 atomic_cmpset_acq_int #define atomic_cmpset_rel_32 atomic_cmpset_rel_int +#define atomic_fcmpset_32 atomic_fcmpset_int +#define atomic_fcmpset_acq_32 atomic_fcmpset_acq_int +#define atomic_fcmpset_rel_32 atomic_fcmpset_rel_int #define atomic_swap_32 atomic_swap_int #define atomic_readandclear_32 atomic_readandclear_int #define atomic_fetchadd_32 atomic_fetchadd_int @@ -792,6 +818,14 @@ u_long atomic_swap_long(volatile u_long #define atomic_cmpset_rel_ptr(dst, old, new) \ atomic_cmpset_rel_int((volatile u_int *)(dst), (u_int)(old), \ (u_int)(new)) +#define atomic_fcmpset_ptr(dst, old, new) \ + atomic_fcmpset_int((volatile u_int *)(dst), (u_int *)(old), (u_int)(new)) +#define atomic_fcmpset_acq_ptr(dst, old, new) \ + atomic_fcmpset_acq_int((volatile u_int *)(dst), (u_int *)(old), \ + (u_int)(new)) +#define atomic_fcmpset_rel_ptr(dst, old, new) \ + atomic_fcmpset_rel_int((volatile u_int *)(dst), (u_int *)(old), \ + (u_int)(new)) #define atomic_swap_ptr(p, v) \ atomic_swap_int((volatile u_int *)(p), (u_int)(v)) #define atomic_readandclear_ptr(p) \ From owner-svn-src-all@freebsd.org Mon Jan 30 02:25:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4DF3CC714C; Mon, 30 Jan 2017 02:25:56 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 945B6101D; Mon, 30 Jan 2017 02:25:56 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0U2PtdO010513; Mon, 30 Jan 2017 02:25:55 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U2Ptsd010512; Mon, 30 Jan 2017 02:25:55 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201701300225.v0U2Ptsd010512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 30 Jan 2017 02:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312976 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 02:25:56 -0000 Author: hiren Date: Mon Jan 30 02:25:55 2017 New Revision: 312976 URL: https://svnweb.freebsd.org/changeset/base/312976 Log: Man page update to go along with r312907. Reviewed by: Allanjude MFC after: 2 weeks Sponsored by: Limelight Networks Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Mon Jan 30 02:24:54 2017 (r312975) +++ head/share/man/man4/tcp.4 Mon Jan 30 02:25:55 2017 (r312976) @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd October 21, 2016 +.Dd Jan 29, 2017 .Dt TCP 4 .Os .Sh NAME @@ -586,6 +586,12 @@ downshift. List of available TCP function blocks (TCP stacks). .It Va functions_default The default TCP function block (TCP stack). +.It Va functions_inherit_listen_socket_stack +Determines whether to inherit listen socket's tcp stack or use the current +system default tcp stack, as defined by +.Va functions_default +.Pc . +Default is true. .It Va insecure_rst Use criteria defined in RFC793 instead of RFC5961 for accepting RST segments. Default is false. From owner-svn-src-all@freebsd.org Mon Jan 30 02:32:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0709ACC7353; Mon, 30 Jan 2017 02:32:35 +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 CAAC1143B; Mon, 30 Jan 2017 02:32:34 +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 v0U2WXKL014487; Mon, 30 Jan 2017 02:32:33 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U2WXMT014486; Mon, 30 Jan 2017 02:32:33 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701300232.v0U2WXMT014486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Jan 2017 02:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312977 - head/sys/dev/adb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 02:32:35 -0000 Author: jhibbits Date: Mon Jan 30 02:32:33 2017 New Revision: 312977 URL: https://svnweb.freebsd.org/changeset/base/312977 Log: Force the setting of bit 7 in the sysmouse packet byte 1 to be unsigned. Clang complains about the shift of (1 << 7) into a int8_t changing the value: warning: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes value from 128 to -128 [-Wconstant-conversion] Squash this warning by forcing clang to see it as an unsigned bit. This seems odd, given that it's still a conversion of 128->-128, but I'm guessing the explicit unsigned attribute notifies clang that sign really doesn't matter in this case. Reported by: Mark Millard MFC after: 2 weeks Modified: head/sys/dev/adb/adb_mouse.c Modified: head/sys/dev/adb/adb_mouse.c ============================================================================== --- head/sys/dev/adb/adb_mouse.c Mon Jan 30 02:25:55 2017 (r312976) +++ head/sys/dev/adb/adb_mouse.c Mon Jan 30 02:32:33 2017 (r312977) @@ -520,7 +520,7 @@ ams_read(struct cdev *dev, struct uio *u } } - sc->packet[0] = 1 << 7; + sc->packet[0] = 1U << 7; sc->packet[0] |= (!(sc->buttons & 1)) << 2; sc->packet[0] |= (!(sc->buttons & 4)) << 1; sc->packet[0] |= (!(sc->buttons & 2)); From owner-svn-src-all@freebsd.org Mon Jan 30 02:52:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 601E0CC75B6; Mon, 30 Jan 2017 02:52:17 +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 083281C3E; Mon, 30 Jan 2017 02:52:16 +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 v0U2qGOL022478; Mon, 30 Jan 2017 02:52:16 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U2qGcO022477; Mon, 30 Jan 2017 02:52:16 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701300252.v0U2qGcO022477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Jan 2017 02:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312978 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 02:52:17 -0000 Author: jhibbits Date: Mon Jan 30 02:52:15 2017 New Revision: 312978 URL: https://svnweb.freebsd.org/changeset/base/312978 Log: Drop the __GNUCLIKE_ASM guards around most atomic inlines. There are no alternatives defined, so there's no point in keeping them. Also, they weren't around every inline asm block anyway. Without __GNUCLIKE_ASM defined, the guarded functions return garbage. Reported by: Andrew Thompson Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Mon Jan 30 02:32:33 2017 (r312977) +++ head/sys/powerpc/include/atomic.h Mon Jan 30 02:52:15 2017 (r312978) @@ -446,7 +446,6 @@ atomic_readandclear_int(volatile u_int * { u_int result,temp; -#ifdef __GNUCLIKE_ASM __asm __volatile ( "\tsync\n" /* drain writes */ "1:\tlwarx %0, 0, %3\n\t" /* load old value */ @@ -456,7 +455,6 @@ atomic_readandclear_int(volatile u_int * : "=&r"(result), "=&r"(temp), "=m" (*addr) : "r" (addr), "m" (*addr) : "cr0", "memory"); -#endif return (result); } @@ -467,7 +465,6 @@ atomic_readandclear_long(volatile u_long { u_long result,temp; -#ifdef __GNUCLIKE_ASM __asm __volatile ( "\tsync\n" /* drain writes */ "1:\tldarx %0, 0, %3\n\t" /* load old value */ @@ -477,7 +474,6 @@ atomic_readandclear_long(volatile u_long : "=&r"(result), "=&r"(temp), "=m" (*addr) : "r" (addr), "m" (*addr) : "cr0", "memory"); -#endif return (result); } @@ -565,7 +561,6 @@ atomic_cmpset_int(volatile u_int* p, u_i { int ret; -#ifdef __GNUCLIKE_ASM __asm __volatile ( "1:\tlwarx %0, 0, %2\n\t" /* load old value */ "cmplw %3, %0\n\t" /* compare */ @@ -581,7 +576,6 @@ atomic_cmpset_int(volatile u_int* p, u_i : "=&r" (ret), "=m" (*p) : "r" (p), "r" (cmpval), "r" (newval), "m" (*p) : "cr0", "memory"); -#endif return (ret); } @@ -590,7 +584,6 @@ atomic_cmpset_long(volatile u_long* p, u { int ret; -#ifdef __GNUCLIKE_ASM __asm __volatile ( #ifdef __powerpc64__ "1:\tldarx %0, 0, %2\n\t" /* load old value */ @@ -617,7 +610,6 @@ atomic_cmpset_long(volatile u_long* p, u : "=&r" (ret), "=m" (*p) : "r" (p), "r" (cmpval), "r" (newval), "m" (*p) : "cr0", "memory"); -#endif return (ret); } @@ -685,7 +677,6 @@ atomic_fcmpset_int(volatile u_int *p, u_ { int ret; -#ifdef __GNUCLIKE_ASM __asm __volatile ( "1:\tlwarx %0, 0, %3\n\t" /* load old value */ "cmplw %4, %0\n\t" /* compare */ @@ -702,7 +693,6 @@ atomic_fcmpset_int(volatile u_int *p, u_ : "=&r" (ret), "=m" (*p), "=m" (*cmpval) : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) : "cr0", "memory"); -#endif return (ret); } @@ -711,7 +701,6 @@ atomic_fcmpset_long(volatile u_long *p, { int ret; -#ifdef __GNUCLIKE_ASM __asm __volatile ( #ifdef __powerpc64__ "1:\tldarx %0, 0, %3\n\t" /* load old value */ @@ -740,7 +729,6 @@ atomic_fcmpset_long(volatile u_long *p, : "=&r" (ret), "=m" (*p), "=m" (*cmpval) : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) : "cr0", "memory"); -#endif return (ret); } From owner-svn-src-all@freebsd.org Mon Jan 30 03:04:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EE52CC7C59; Mon, 30 Jan 2017 03:04:37 +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 2D926894; Mon, 30 Jan 2017 03:04:35 +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 v0U34Yix027163; Mon, 30 Jan 2017 03:04:34 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U34YQp027161; Mon, 30 Jan 2017 03:04:34 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201701300304.v0U34YQp027161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 30 Jan 2017 03:04:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312979 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 03:04:37 -0000 Author: loos Date: Mon Jan 30 03:04:33 2017 New Revision: 312979 URL: https://svnweb.freebsd.org/changeset/base/312979 Log: Do not update the lagg link layer address when destroying a lagg clone. This would enqueue an event to send the gratuitous arp on a dying lagg interface without any physical ports attached to it. Apart from that, the taskqueue_drain() on lagg_clone_destroy() runs too late, when the ifp data structure is already freed. Fix that too. Obtained from: pfSense MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Mon Jan 30 02:52:15 2017 (r312978) +++ head/sys/net/if_lagg.c Mon Jan 30 03:04:33 2017 (r312979) @@ -550,12 +550,15 @@ lagg_clone_destroy(struct ifnet *ifp) EVENTHANDLER_DEREGISTER(vlan_unconfig, sc->vlan_detach); /* Shutdown and remove lagg ports */ - while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL) + while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL) { + lp->lp_detaching = LAGG_CLONE_DESTROY; lagg_port_destroy(lp, 1); + } /* Unhook the aggregation protocol */ lagg_proto_detach(sc); LAGG_UNLOCK_ASSERT(sc); + taskqueue_drain(taskqueue_swi, &sc->sc_lladdr_task); ifmedia_removeall(&sc->sc_media); ether_ifdetach(ifp); if_free(ifp); @@ -564,7 +567,6 @@ lagg_clone_destroy(struct ifnet *ifp) SLIST_REMOVE(&V_lagg_list, sc, lagg_softc, sc_entries); LAGG_LIST_UNLOCK(); - taskqueue_drain(taskqueue_swi, &sc->sc_lladdr_task); LAGG_LOCK_DESTROY(sc); free(sc, M_DEVBUF); } @@ -902,7 +904,7 @@ lagg_port_destroy(struct lagg_port *lp, * Remove multicast addresses and interface flags from this port and * reset the MAC address, skip if the interface is being detached. */ - if (!lp->lp_detaching) { + if (lp->lp_detaching == 0) { lagg_ether_cmdmulti(lp, 0); lagg_setflags(lp, 0); lagg_port_lladdr(lp, lp->lp_lladdr, LAGG_LLQTYPE_PHYS); @@ -935,7 +937,8 @@ lagg_port_destroy(struct lagg_port *lp, bcopy(lp0->lp_lladdr, lladdr, ETHER_ADDR_LEN); } - lagg_lladdr(sc, lladdr); + if (lp->lp_detaching != LAGG_CLONE_DESTROY) + lagg_lladdr(sc, lladdr); /* Mark lp0 as new primary */ sc->sc_primary = lp0; @@ -950,7 +953,7 @@ lagg_port_destroy(struct lagg_port *lp, } /* Remove any pending lladdr changes from the queue */ - if (lp->lp_detaching) { + if (lp->lp_detaching != 0) { SLIST_FOREACH(llq, &sc->sc_llq_head, llq_entries) { if (llq->llq_ifp == ifp) { SLIST_REMOVE(&sc->sc_llq_head, llq, lagg_llq, @@ -1129,7 +1132,7 @@ lagg_port_ifdetach(void *arg __unused, s sc = lp->lp_softc; LAGG_WLOCK(sc); - lp->lp_detaching = 1; + lp->lp_detaching = LAGG_PORT_DETACH; lagg_port_destroy(lp, 1); LAGG_WUNLOCK(sc); } @@ -1660,7 +1663,7 @@ lagg_ether_cmdmulti(struct lagg_port *lp } else { while ((mc = SLIST_FIRST(&lp->lp_mc_head)) != NULL) { SLIST_REMOVE(&lp->lp_mc_head, mc, lagg_mc, mc_entries); - if (mc->mc_ifma && !lp->lp_detaching) + if (mc->mc_ifma && lp->lp_detaching == 0) if_delmulti_ifma(mc->mc_ifma); free(mc, M_DEVBUF); } Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Mon Jan 30 02:52:15 2017 (r312978) +++ head/sys/net/if_lagg.h Mon Jan 30 03:04:33 2017 (r312979) @@ -261,6 +261,8 @@ struct lagg_port { void *lh_cookie; /* if state hook */ void *lp_psc; /* protocol data */ int lp_detaching; /* ifnet is detaching */ +#define LAGG_PORT_DETACH 0x01 /* detach lagg port */ +#define LAGG_CLONE_DESTROY 0x02 /* destroy lagg clone */ SLIST_HEAD(__mclhd, lagg_mc) lp_mc_head; /* multicast addresses */ From owner-svn-src-all@freebsd.org Mon Jan 30 03:07:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5019CC7DA0; Mon, 30 Jan 2017 03:07:33 +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 B4D63C70; Mon, 30 Jan 2017 03:07:33 +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 v0U37Wax027300; Mon, 30 Jan 2017 03:07:32 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U37W3L027299; Mon, 30 Jan 2017 03:07:32 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701300307.v0U37W3L027299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 30 Jan 2017 03:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312980 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 03:07:34 -0000 Author: mjg Date: Mon Jan 30 03:07:32 2017 New Revision: 312980 URL: https://svnweb.freebsd.org/changeset/base/312980 Log: fd: sprinkle __read_mostly and __exclusive_cache_line Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Mon Jan 30 03:04:33 2017 (r312979) +++ head/sys/kern/kern_descrip.c Mon Jan 30 03:07:32 2017 (r312980) @@ -97,8 +97,8 @@ MALLOC_DEFINE(M_FILECAPS, "filecaps", "d MALLOC_DECLARE(M_FADVISE); -static uma_zone_t file_zone; -static uma_zone_t filedesc0_zone; +static __read_mostly uma_zone_t file_zone; +static __read_mostly uma_zone_t filedesc0_zone; static int closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, int holdleaders); @@ -168,9 +168,9 @@ struct filedesc0 { /* * Descriptor management. */ -volatile int openfiles; /* actual number of open files */ +volatile int __exclusive_cache_line openfiles; /* actual number of open files */ struct mtx sigio_lock; /* mtx to protect pointers to sigio */ -void (*mq_fdclose)(struct thread *td, int fd, struct file *fp); +void __read_mostly (*mq_fdclose)(struct thread *td, int fd, struct file *fp); /* * If low >= size, just return low. Otherwise find the first zero bit in the From owner-svn-src-all@freebsd.org Mon Jan 30 03:15:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE052CC7FCB; Mon, 30 Jan 2017 03:15:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42EA91158; Mon, 30 Jan 2017 03:15:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id c85so195686603wmi.1; Sun, 29 Jan 2017 19:15:51 -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; bh=ATAV/pndH8r7/Hx5D12U1DpN7NASJ4atwD+m0QRzH2I=; b=HD+/p0s6f99mP2aUslbaidkKk6O/FezdgdRi2dCWpt/QJ7YOTa4ecMDJI+WuiG5Kdi xF82bHK290smBCAdVZNeX8fU736dpt0z+N0Zi3YUpX0lWQw/AStHIBqGgxy7rDSxWgxK vD0QTYOPSBhQDgOLomYyH34vYtSYtSY9sAXcKiu8VBeZLWGPfOiKU8Gu/loiAxCOH3ux X+DZUmF/JLj1XcUq1c5GKs402I4Yia9I/BbNTujrTsFKy0YQbrbcWtEJ0Yda0mbCG4Bd ciDN4NDE2N3uqoXaTPQqaxKQzq2GeEYDqSSB6DK4Hp+iPluew8YYoZRtL5d6sq9k1xMp KXHg== 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; bh=ATAV/pndH8r7/Hx5D12U1DpN7NASJ4atwD+m0QRzH2I=; b=WzFVy1J6bxGElrks2BhUJRw5R6WIEi8r+saTSq5/1blsqyLO5o1nmE/iNP17e6gwKJ pvzjaqJOp8NlQ625v2PwahhTRfz8nW/+P5OvPxggTJlOu94QyEEQqvh3JpmyeZZXp7pt eiOUHfdmKMVLJMa3fiTNszl4KCcKtkpRhHw4x0HRvqoLRIkptVeKlcx4/o7uGLf+jIXx 4I1mnMmKfngGg3Hs6sKk7ZUcIfLOn7l0xRj5CzNWDg6DzsXY7v4+8sfEtMVXsCoYU9gG XJZ39AHL/wJQcR30bZo9En9y4sU8KQgHDvimG9BFC3ALX+e/lGiUgjms2FxGqLNXieo+ x3pA== X-Gm-Message-State: AIkVDXLn0WYceoNoP4zbmZtfKkBUo12RoRgU9n1z9N0+qp4CyUZJwMQDIc4yJ2EHVwPbonY3DlmsP7DN/7S6tQ== X-Received: by 10.223.169.112 with SMTP id u103mr16055188wrc.166.1485746148696; Sun, 29 Jan 2017 19:15:48 -0800 (PST) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.194.82.162 with HTTP; Sun, 29 Jan 2017 19:15:47 -0800 (PST) In-Reply-To: <201701300111.v0U1BV6L081269@repo.freebsd.org> References: <201701300111.v0U1BV6L081269@repo.freebsd.org> From: Adrian Chadd Date: Sun, 29 Jan 2017 19:15:47 -0800 X-Google-Sender-Auth: cPLMGHGgj7utlKAZiWo0BfaH8NU Message-ID: Subject: Re: svn commit: r312972 - head/sys/net80211 To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 03:15:52 -0000 ... and obviously between writing the initial review message and the commit, I also decided to disable multicast QoS frame generation for now. It just makes things less terrible. At some point IBSS/hostap mode should grow "how many stations are QoS/non-QoS" tracking so this can be dynamic and multicast QoS can occur. (ANd for whenever I implement 802.11aa extensions, I'll need it to work..) -adrian On 29 January 2017 at 17:11, Adrian Chadd wrote: > Author: adrian > Date: Mon Jan 30 01:11:30 2017 > New Revision: 312972 > URL: https://svnweb.freebsd.org/changeset/base/312972 > > Log: > [net80211] address seqno allocation for group addressed frames > > After some digging and looking at packet traces, it looks like the > sequence number allocation being done by net80211 doesn't meet > 802.11-2012. > > Specifically, group addressed frames (broadcast, multicast) have > sequence numbers allocated from a separate pool, even if they're > QoS frames. > > This patch starts to try and address this, both on transmit and > receive. > > * When receiving, don't throw away multicast frames for now. > It's sub-optimal, but until we correctly track group addressed > frames via another TID counter, this is the best we can do. > > * When doing A-MPDU checks, don't include group addressed frames > in the sequence number checks. > > * When transmitting, don't allocate group frame sequence numbers > from the TID, instead use the NONQOS TID for allocation. > > This may fix iwn(4) 11n because I /think/ this was one of the > handful of places where ni_txseqs[] was being assigned /outside/ > of the driver itself. > > This however doesn't completely fix things - notably the way that > TID assignment versus WME assignment for driver hardware queues > will mess up multicast ordering. For example, if all multicast > QoS frames come from one sequence number space but they're > expected to obey the QoS value assigned, they'll end up in > different queues in the hardware and go out in different > orders. > > I can't fix that right now and indeed fixing it will require some > pretty heavy lifting of both the WME<->TID QoS assignment, as well > as figuring out what the correct way for drivers to behave. > > For example, both iwn(4) and ath(4) shouldn't put QoS multicast > traffic into the same output queue as aggregate traffic, because > the sequence numbers are all wrong. So perhaps the correct thing > to do there is ignore the WME/TID for QoS traffic and map it all > to the best effort queue or something, and ensure it doesn't > muck up the TID/blockack window tracking. However, I'm /pretty/ > sure that is still going to happen. > > .. maybe I should disable multicast QoS frames in general as well, > but I don't know what that'll do for whatever the current state > of 802.11s mesh support is. > > Tested: > > * STA mode, ath10k NIC > * AP mode, AR9344/AR9580 AP > * iperf tcp/udp tests with concurrent multicast QoS traffic. > > Before this, iperfs would fail pretty quickly because the sending > AP would start sending out QoS multicast frames that would be > out of order from the rest of the TID traffic, causing the blockack > window to get way, way out of sync. > > This now doesn't occur. > > TODO: > > * verify which QoS frames SHOULD be tagged as M_AMPDU_MPDU. > For example, QoS NULL frames shouldn't be tagged! > > Reviewed by: avos > Differential Revision: https://reviews.freebsd.org/D9357 > > Modified: > head/sys/net80211/ieee80211_ht.c > head/sys/net80211/ieee80211_input.h > head/sys/net80211/ieee80211_output.c > > Modified: head/sys/net80211/ieee80211_ht.c > ============================================================================== > --- head/sys/net80211/ieee80211_ht.c Sun Jan 29 22:38:13 2017 (r312971) > +++ head/sys/net80211/ieee80211_ht.c Mon Jan 30 01:11:30 2017 (r312972) > @@ -827,6 +827,16 @@ ieee80211_ampdu_reorder(struct ieee80211 > */ > return PROCESS; > } > + > + /* > + * 802.11-2012 9.3.2.10 - Duplicate detection and recovery. > + * > + * Multicast QoS data frames are checked against a different > + * counter, not the per-TID counter. > + */ > + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) > + return PROCESS; > + > if (IEEE80211_IS_DSTODS(wh)) > tid = ((struct ieee80211_qosframe_addr4 *)wh)->i_qos[0]; > else > > Modified: head/sys/net80211/ieee80211_input.h > ============================================================================== > --- head/sys/net80211/ieee80211_input.h Sun Jan 29 22:38:13 2017 (r312971) > +++ head/sys/net80211/ieee80211_input.h Mon Jan 30 01:11:30 2017 (r312972) > @@ -149,6 +149,12 @@ ishtinfooui(const uint8_t *frm) > * (as the seqnum wraps), handle that special case so packets aren't > * incorrectly dropped - ie, if the next packet is sequence number 0 > * but a retransmit since the initial packet didn't make it. > + * > + * XXX TODO: handle sequence number space wrapping with dropped frames; > + * especially in high interference conditions under high traffic load > + * The RX AMPDU reorder code also needs it. > + * > + * XXX TODO: update for 802.11-2012 9.3.2.10 Duplicate Detection and Recovery. > */ > static __inline int > ieee80211_check_rxseq(struct ieee80211_node *ni, struct ieee80211_frame *wh, > @@ -175,6 +181,13 @@ ieee80211_check_rxseq(struct ieee80211_n > if (! IEEE80211_HAS_SEQ(type, subtype)) > return 1; > > + /* > + * Always allow multicast frames for now - QoS (any TID) > + * or not. > + */ > + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) > + return 1; > + > tid = ieee80211_gettid(wh); > > /* > > Modified: head/sys/net80211/ieee80211_output.c > ============================================================================== > --- head/sys/net80211/ieee80211_output.c Sun Jan 29 22:38:13 2017 (r312971) > +++ head/sys/net80211/ieee80211_output.c Mon Jan 30 01:11:30 2017 (r312972) > @@ -122,9 +122,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 > { > struct ieee80211com *ic = vap->iv_ic; > struct ifnet *ifp = vap->iv_ifp; > -#ifdef IEEE80211_SUPPORT_SUPERG > int mcast; > -#endif > > if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && > (m->m_flags & M_PWR_SAV) == 0) { > @@ -164,9 +162,7 @@ ieee80211_vap_pkt_send_dest(struct ieee8 > * interface it (might have been) received on. > */ > m->m_pkthdr.rcvif = (void *)ni; > -#ifdef IEEE80211_SUPPORT_SUPERG > mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1: 0; > -#endif > > BPF_MTAP(ifp, m); /* 802.3 tx */ > > @@ -181,10 +177,15 @@ ieee80211_vap_pkt_send_dest(struct ieee8 > * The default ic_ampdu_enable routine handles staggering > * ADDBA requests in case the receiver NAK's us or we are > * otherwise unable to establish a BA stream. > + * > + * Don't treat group-addressed frames as candidates for aggregation; > + * net80211 doesn't support 802.11aa-2012 and so group addressed > + * frames will always have sequence numbers allocated from the NON_QOS > + * TID. > */ > if ((ni->ni_flags & IEEE80211_NODE_AMPDU_TX) && > (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_TX)) { > - if ((m->m_flags & M_EAPOL) == 0) { > + if ((m->m_flags & M_EAPOL) == 0 && (! mcast)) { > int tid = WME_AC_TO_TID(M_WME_GETAC(m)); > struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[tid]; > > @@ -776,12 +777,20 @@ ieee80211_send_setup( > * requiring the TX lock. > */ > tap = &ni->ni_tx_ampdu[tid]; > - if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) > + if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) { > m->m_flags |= M_AMPDU_MPDU; > - else { > + } else { > if (IEEE80211_HAS_SEQ(type & IEEE80211_FC0_TYPE_MASK, > type & IEEE80211_FC0_SUBTYPE_MASK)) > - seqno = ni->ni_txseqs[tid]++; > + /* > + * 802.11-2012 9.3.2.10 - QoS multicast frames > + * come out of a different seqno space. > + */ > + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { > + seqno = ni->ni_txseqs[IEEE80211_NONQOS_TID]++; > + } else { > + seqno = ni->ni_txseqs[tid]++; > + } > else > seqno = 0; > > @@ -1239,7 +1248,7 @@ ieee80211_encap(struct ieee80211vap *vap > struct ieee80211_frame *wh; > struct ieee80211_key *key; > struct llc *llc; > - int hdrsize, hdrspace, datalen, addqos, txfrag, is4addr; > + int hdrsize, hdrspace, datalen, addqos, txfrag, is4addr, is_mcast; > ieee80211_seq seqno; > int meshhdrsize, meshae; > uint8_t *qos; > @@ -1247,6 +1256,8 @@ ieee80211_encap(struct ieee80211vap *vap > > IEEE80211_TX_LOCK_ASSERT(ic); > > + is_mcast = !! (m->m_flags & (M_MCAST | M_BCAST)); > + > /* > * Copy existing Ethernet header to a safe place. The > * rest of the code assumes it's ok to strip it when > @@ -1291,11 +1302,19 @@ ieee80211_encap(struct ieee80211vap *vap > * ap's require all data frames to be QoS-encapsulated > * once negotiated in which case we'll need to make this > * configurable. > - * NB: mesh data frames are QoS. > + * > + * Don't send multicast QoS frames. > + * Technically multicast frames can be QoS if all stations in the > + * BSS are also QoS. > + * > + * NB: mesh data frames are QoS, including multicast frames. > */ > - addqos = ((ni->ni_flags & (IEEE80211_NODE_QOS|IEEE80211_NODE_HT)) || > + addqos = > + (((is_mcast == 0) && (ni->ni_flags & > + (IEEE80211_NODE_QOS|IEEE80211_NODE_HT))) || > (vap->iv_opmode == IEEE80211_M_MBSS)) && > (m->m_flags & M_EAPOL) == 0; > + > if (addqos) > hdrsize = sizeof(struct ieee80211_qosframe); > else > @@ -1560,6 +1579,22 @@ ieee80211_encap(struct ieee80211vap *vap > */ > if ((m->m_flags & M_AMPDU_MPDU) == 0) { > /* > + * 802.11-2012 9.3.2.10 - > + * > + * If this is a multicast frame then we need > + * to ensure that the sequence number comes from > + * a separate seqno space and not the TID space. > + * > + * Otherwise multicast frames may actually cause > + * holes in the TX blockack window space and > + * upset various things. > + */ > + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) > + seqno = ni->ni_txseqs[IEEE80211_NONQOS_TID]++; > + else > + seqno = ni->ni_txseqs[tid]++; > + > + /* > * NB: don't assign a sequence # to potential > * aggregates; we expect this happens at the > * point the frame comes off any aggregation q > From owner-svn-src-all@freebsd.org Mon Jan 30 03:20:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 460EACC6061; Mon, 30 Jan 2017 03:20:07 +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 157831355; Mon, 30 Jan 2017 03:20:07 +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 v0U3K6W7031460; Mon, 30 Jan 2017 03:20:06 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U3K6VH031459; Mon, 30 Jan 2017 03:20:06 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201701300320.v0U3K6VH031459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 30 Jan 2017 03:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312981 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 03:20:07 -0000 Author: mjg Date: Mon Jan 30 03:20:05 2017 New Revision: 312981 URL: https://svnweb.freebsd.org/changeset/base/312981 Log: cache: use vrefact for '.' lookups and refing the rdir in fullpath Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Mon Jan 30 03:07:32 2017 (r312980) +++ head/sys/kern/vfs_cache.c Mon Jan 30 03:20:05 2017 (r312981) @@ -1124,7 +1124,7 @@ retry: timespecclear(tsp); if (ticksp != NULL) *ticksp = ticks; - VREF(*vpp); + vrefact(*vpp); /* * When we lookup "." we still can be asked to lock it * differently... @@ -2115,7 +2115,7 @@ vn_fullpath(struct thread *td, struct vn fdp = td->td_proc->p_fd; FILEDESC_SLOCK(fdp); rdir = fdp->fd_rdir; - VREF(rdir); + vrefact(rdir); FILEDESC_SUNLOCK(fdp); error = vn_fullpath1(td, vn, rdir, buf, retbuf, MAXPATHLEN); vrele(rdir); From owner-svn-src-all@freebsd.org Mon Jan 30 04:45:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B583CC7449; Mon, 30 Jan 2017 04:45:10 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 60CDA1733; Mon, 30 Jan 2017 04:45:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id A3D3310318C; Mon, 30 Jan 2017 15:44:59 +1100 (AEDT) Date: Mon, 30 Jan 2017 15:44:59 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mateusz Guzik cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312975 - head/sys/i386/include In-Reply-To: <201701300224.v0U2Osj1010421@repo.freebsd.org> Message-ID: <20170130142123.V953@besplex.bde.org> References: <201701300224.v0U2Osj1010421@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=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=RcezWy2ymVxIhtw7SZQA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 04:45:10 -0000 On Mon, 30 Jan 2017, Mateusz Guzik wrote: > Log: > i386: add atomic_fcmpset > > Tested by: pho This is has some bugs and style bugs. > Modified: > head/sys/i386/include/atomic.h > > Modified: head/sys/i386/include/atomic.h > ============================================================================== > --- head/sys/i386/include/atomic.h Mon Jan 30 02:21:29 2017 (r312974) > +++ head/sys/i386/include/atomic.h Mon Jan 30 02:24:54 2017 (r312975) > @@ -214,6 +215,24 @@ atomic_cmpset_int(volatile u_int *dst, u > return (res); > } > > +static __inline int > +atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) This is unusable except under SMP or CPU_DISABLE_CMPXCHG ifdefs, since it is not defined if CPU_DISABLE_CMPXCHG is configured. CPU_DISABLE_CMPXCHG is still a supported user option if !SMP. According to NOTES, it is to support vmware emulating cmpxchg poorly. This function and its excessive aliases seems to be undocumented and not yet used, so I don't know what it is supposed to be used for or whether these uses are naturally restricted to the SMP case where the function is available. > +{ > + u_char res; > + > + __asm __volatile( > + " " MPLOCKED " " > + " cmpxchgl %3,%1 ; " > + " sete %0 ; " > + "# atomic_cmpset_int" > + : "=r" (res), /* 0 */ Invalid asm. sete is only valid for q registers, except in long mode on amd64. > + "+m" (*dst), /* 1 */ > + "+a" (*expect) /* 2 */ Style bug (inconsistent indentation). Bugs like this can be created by blind indentation. Cloning atomic_cmpset_int() and then s/expect/*expect/ to get the subtle difference between these function would have given the style bug here. But that wouldn't have given the invalid asm. The i386 atomic_cmpset_int() doesn't have the invalid asm, and the amd64 atomic_fcmpset_int() doesn't have the style bug. > + : "r" (src) /* 3 */ > + : "memory", "cc"); > + return (res); > +} > + > #endif /* CPU_DISABLE_CMPXCHG */ > > /* The other style bugs seem to be consistent with the rest of the file (API explosion, unsorted #define's in the explosion, and bogus casts in the "pointer" APIs; amd64 never had the latter, so MI code can't depend on the casts hiding type errors). Bruce From owner-svn-src-all@freebsd.org Mon Jan 30 04:51:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21B5CCC7516; Mon, 30 Jan 2017 04:51:20 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE9381991; Mon, 30 Jan 2017 04:51:19 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0U4pJiN069685; Mon, 30 Jan 2017 04:51:19 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U4pJnq069682; Mon, 30 Jan 2017 04:51:19 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201701300451.v0U4pJnq069682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 30 Jan 2017 04:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312982 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 04:51:20 -0000 Author: cy Date: Mon Jan 30 04:51:18 2017 New Revision: 312982 URL: https://svnweb.freebsd.org/changeset/base/312982 Log: Correct comment grammar and make it easier to understand. MFC after: 1 week Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Jan 30 03:20:05 2017 (r312981) +++ head/sys/netinet/tcp_output.c Mon Jan 30 04:51:18 2017 (r312982) @@ -1270,8 +1270,8 @@ send: #ifdef INET6 if (isipv6) { /* - * ip6_plen is not need to be filled now, and will be filled - * in ip6_output. + * There is no need to fill in ip6_plen right now. + * It will be filled later by ip6_output. */ m->m_pkthdr.csum_flags = CSUM_TCP_IPV6; th->th_sum = in6_cksum_pseudo(ip6, sizeof(struct tcphdr) + From owner-svn-src-all@freebsd.org Mon Jan 30 05:46:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81BC7CC7246; Mon, 30 Jan 2017 05:46:41 +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 41D1E1202; Mon, 30 Jan 2017 05:46:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 75so30640312pgf.3; Sun, 29 Jan 2017 21:46:41 -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=o9+e1fV0zYp+Q9krE/7ZcFTccXEKlMo2FLZZGGzUBuQ=; b=PUnymayLooeWyo6cIVsZZvF0K0vRsDDvAzX1CCm5ZEpRo40N1KHmAgG1AJQbX5ExhO 035wh7VTQEMzEZGzoxkV3XNsIrulXy8saq2ez0gxgI/QABDJXjnRLghZoiEvfGI3ne96 dZ8FxviYGOjRIPrZC4SUC0PoHdP+OJ9naNyylTjtGtL93zWPWHLD2/7k3a9JLUEHDvqd nvJml6N1ft2WVFJePE4m9kj0BMcRnQ8IZkozqhoOS5XmFrbCYssl+xhEdneVSDPgR5nf pY5KJajUq0tU25QnzWtsDouLrr/i6X5OBnRnriPE6cGe80Zf1tVR/uEpaqF13kJO7GP2 0UPw== 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=o9+e1fV0zYp+Q9krE/7ZcFTccXEKlMo2FLZZGGzUBuQ=; b=XSUkZfmpCwTITDTbGazT9NRpkm4YtbNC1rWknYX3o+FnuTGBRdWzBbjQfDDhgDBEqh pPAfnzw2wxN5QzrToo6WzAU0b05qvhoHutOF5GVAH6L+glBjIrBt+qVm98ZV6g793TKr PPnXeFdcFby1TDqetJ6hBAHURCvb4hVywbt8UPouebBsZsnuKRbx0pzZkNwq/hxX410F +9MEwvRB32Oectb7GjPXwKV3qxl2biCX1lKZL5PrUwRxOvmgAJBnjN+/94b2GkTsHog/ ZqTWc9UFzYfXMRkccVU721EowRK2UpkIH7RHQ+XKS2o97rRNJJO4xUT72upVj30BmQXK b1GQ== X-Gm-Message-State: AIkVDXLNa4q+wivqIkKAmlDiNnh/8SD9ZKn2b9nhRCszQZ8BYVyEVeJVJEajETUrRcJL3g== X-Received: by 10.84.216.89 with SMTP id f25mr28884330plj.6.1485755200737; Sun, 29 Jan 2017 21:46:40 -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 j7sm28427810pfe.84.2017.01.29.21.46.39 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Jan 2017 21:46:39 -0800 (PST) Subject: Re: svn commit: r312981 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_64DC5FA5-C168-4B12-87C4-E60788A54B55"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201701300320.v0U3K6VH031459@repo.freebsd.org> Date: Sun, 29 Jan 2017 21:46:38 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201701300320.v0U3K6VH031459@repo.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 05:46:41 -0000 --Apple-Mail=_64DC5FA5-C168-4B12-87C4-E60788A54B55 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 29, 2017, at 19:20, Mateusz Guzik wrote: >=20 > Author: mjg > Date: Mon Jan 30 03:20:05 2017 > New Revision: 312981 > URL: https://svnweb.freebsd.org/changeset/base/312981 >=20 > Log: > cache: use vrefact for '.' lookups and refing the rdir in fullpath =E2=80=A6 why? -Ngie --Apple-Mail=_64DC5FA5-C168-4B12-87C4-E60788A54B55 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 iQIbBAEBCgAGBQJYjtM+AAoJEPWDqSZpMIYV57oP+KWeakdF9OrS3/dPk1hcEPeJ YsFNBkQJjCP7YTtZqE0Jzq1b7WODdvQS4seghP/gdJVoQ2IRaufc1MFWMTW21wEJ TgQfWEs8Q+tHCw8l/ZQozpMSt55rHz13amqspHSzF5z9TP73nGINtECJPclwqJ9W OXjj6nhjqjqEhgzaaJSBH+0ISIzp4pPFNtJeRO3p0F3cMr8FPrg3nnMYmwWrbumA 8zd9VLKu/Iksz1l9iLnvutLX6ieVJSWSx4jaOedB6BFT5eGoBuIUreGP2FqUD/3m EAen6T75wkktKbQ5biPZl74wlQsswcuRywODUI9y2Vqj3b0KoYdWOt8B8Mst+Q+1 iIA4z6dwyyw1iemwil/Qe1bJs+gVEFVPQ8LCYnDqR2sQobX8ChJmTpN9UsYw1svt hLCf99dXDxT38KuOMH+vxO++5JmlyAdWkxmrgLw+oOukzURW5rd8sSAK8ORK7mpP twqxCNNG9FtdGzufFkIoOWkDufZb2ZNMDu8M0oqZmKada0U59fBYeEnZEFh+uCEX SeIYFFamytHPwLTthWfMG8ZgGg5vvmn8s+YQ3v4G2vB96ne72Ju993LHs1e+6EQD 1isMGqf00Bpj0CNUp45kPrhtc350Y/tIdGNaMBvP70U6cnU+Wandmapt2Ofe2Xax JqmysSRHr7Dkbu7i/mI= =OGqj -----END PGP SIGNATURE----- --Apple-Mail=_64DC5FA5-C168-4B12-87C4-E60788A54B55-- From owner-svn-src-all@freebsd.org Mon Jan 30 07:36:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13317CC7CA7; Mon, 30 Jan 2017 07:36:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1A4B1EF3; Mon, 30 Jan 2017 07:36:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id y143so22779806pfb.1; Sun, 29 Jan 2017 23:36:48 -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=ybXnzBrwgNxRNj2YdeqU5aLtff+P8x9xPZv76s6J1fU=; b=YcvrAIqOhM+v+khYsmECxX3yTyTiM0kM7s7aykauQwNgehoOXw4yq1f8A8I99iMuwJ oElH1bpiMttrzEVcxKledQgtZ3P3GFQr253ts5VAmUpFzm11vFZ0Y+zIk9YbHA29ec74 XFg+EqWdSuAUmwXERQo9ScvfPGGJ5tbXGmyXJ/WNzCr9idnw/TMXnV54H2dhKSYlO7Sf ko+RfsuFFgoBcNEI3Wj7me87Xae8MGq7lMtfVF902tJwr66f2LuIFtlGUse9GXDR+ilp /ZBdc5uiuCyZV9tfbrkzi8Vt5jtPeIXs4QlmxKhJ0K/OJVv+8YN6aVZy+N0agsNyXX06 9xNw== 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=ybXnzBrwgNxRNj2YdeqU5aLtff+P8x9xPZv76s6J1fU=; b=NXeObqsaiUwlj0O4nDM7Af/VlWAP4NARDEbqVuFonmgghqqLqENboRlBUuX4eut8Ey X2xSWaaucFauP1/VYAnGRvrNwcSkjzftH0x6/kY1KJ+uW+uuiS0MRXrStSSjzagAM2ao nA69Y6lVa+Eg5f0ZKvs91ax4f881EUy6qeQyMtGRW5iePe+QOFgVjJEH6rypo+QtqrUM nMS2Q4uK8GfxErkjLOvxpUZSVz1L7lLtuY1LWWHVpMaxZwWFPy+T3olRqDad6YxMIh6X oJRqmFa3d01E4+L7yAFapTn2nmWMoaThhQ5yj61hBSZYB9tuitHYZZ49IY9zUFQ6BlVG efDQ== X-Gm-Message-State: AIkVDXIFI0/QfjWz7bxZvYkI/I6VP3aetg+9jYjqqVJGupmIbMIRj3XiYuZ8LALdlTKupw== X-Received: by 10.98.196.202 with SMTP id h71mr21642988pfk.66.1485761808485; Sun, 29 Jan 2017 23:36:48 -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 x16sm29522849pfk.79.2017.01.29.23.36.47 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Jan 2017 23:36:47 -0800 (PST) Subject: Re: svn commit: r312981 - head/sys/kern Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E31D0254-B597-437C-AD1B-B9FB41878D64"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <69ABCAE8-DC41-41F1-B980-BD4190B59B28@gmail.com> Date: Sun, 29 Jan 2017 23:36:46 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <8BD46B78-3929-4C4C-877B-E8B935359636@gmail.com> References: <201701300320.v0U3K6VH031459@repo.freebsd.org> <69ABCAE8-DC41-41F1-B980-BD4190B59B28@gmail.com> To: Benjamin Kaduk X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 07:36:49 -0000 --Apple-Mail=_E31D0254-B597-437C-AD1B-B9FB41878D64 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 29, 2017, at 21:52, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On Jan 29, 2017, at 21:51, Benjamin Kaduk wrote: >>=20 >> On Sun, Jan 29, 2017 at 11:46 PM, Ngie Cooper (yaneurabeya) = wrote: >>=20 >>> On Jan 29, 2017, at 19:20, Mateusz Guzik wrote: >>>=20 >>> Author: mjg >>> Date: Mon Jan 30 03:20:05 2017 >>> New Revision: 312981 >>> URL: https://svnweb.freebsd.org/changeset/base/312981 >>>=20 >>> Log: >>> cache: use vrefact for '.' lookups and refing the rdir in fullpath >>=20 >> =E2=80=A6 why? >>=20 >> These are cases when it's know that there already exists a reference = somewhere [else], so it's safe to apply the optimization? I'm not sure = I understand whether that's what you're asking, though. >=20 > Thanks! I=E2=80=99m trying to note that for folks that don=E2=80=99t = know this knowledge area, it would be nice if it was actually listed in = the commit message ;)=E2=80=A6 (sending non-unicast this time) -Ngie --Apple-Mail=_E31D0254-B597-437C-AD1B-B9FB41878D64 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 iQIcBAEBCgAGBQJYju0PAAoJEPWDqSZpMIYV3DMP/3kjJbqc4ml/UlxPiHJJ23L7 kRH2X6qFpTDh2YzA3McfKiNP2BZ37qiGhO/sxCL/+nq0FGxokCi0LwVOAWFk0Nsf ZglqhWmBKDLu1P5PvZGGJVW7cIbu+cae95SXU0BNwOCmVX7WRN9+aDt9GXtSBZjF hFfkhukFV+VosJluPbTPw54Fmq+GctxpAstzpaLw6jupRxt6oDV3YvdX1nk0STJo VjFJwc98Nol3jvMOwQYUUB17D9EfK5/ERWlagc7R/EthBm4BsEzXd3XDHzyzvRdf /uOG24LjVaNuOcv1aLBsDmYmrpjEdLDkzuB/joxS8ihTVt9HW7Yccn3EYA4vSWSx TheyNd/yZjYioUGGFpyaucVDhyCNXXpEOWh7IFBoyt6Xeox3Q50S8711Iy8hxSkB RCuVERIGmTj0iiisV6Sqh5hRUGdv+c+FiMC1fLyYJL7mpAlUSC6DVEN656OmUllS XBoRwk96auJJlSkjrdHnI0aMo1pgLJqS70yVJu6gHKBI8Gt9vRG0Ym7IIFc9223n VGCjn69F/xPo9yOEKcBaNaOrYdlK2XNcNbEvF/Q3j02odAlHYULvInPzetfsDpaC uGDa1Ko9pwaI5jt+3MZBeqVX62nqraPeJiHBd+MJg3UAAs0PKIUOe9Y2UCKIBHJB +UpdjEG3JZy8/Hd77xHF =m68A -----END PGP SIGNATURE----- --Apple-Mail=_E31D0254-B597-437C-AD1B-B9FB41878D64-- From owner-svn-src-all@freebsd.org Mon Jan 30 08:35:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED995CC6F16; Mon, 30 Jan 2017 08:35:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD2631BE0; Mon, 30 Jan 2017 08:35:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0U8ZF7j059590; Mon, 30 Jan 2017 08:35:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U8ZFph059589; Mon, 30 Jan 2017 08:35:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201701300835.v0U8ZFph059589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 30 Jan 2017 08:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312983 - head/sys/dev/mlx5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 08:35:17 -0000 Author: hselasky Date: Mon Jan 30 08:35:15 2017 New Revision: 312983 URL: https://svnweb.freebsd.org/changeset/base/312983 Log: Make "desc" pointer non-constant inside the mlx5_core_diagnostics_entry structure. This fixes compilation with amd64-xtoolchain-gcc. PR: 216588 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/diagnostics.h Modified: head/sys/dev/mlx5/diagnostics.h ============================================================================== --- head/sys/dev/mlx5/diagnostics.h Mon Jan 30 04:51:18 2017 (r312982) +++ head/sys/dev/mlx5/diagnostics.h Mon Jan 30 08:35:15 2017 (r312983) @@ -33,7 +33,7 @@ #define MLX5_CORE_DIAGNOSTICS_ENTRY(n, s, t) { #s, (t) }, struct mlx5_core_diagnostics_entry { - const char *const desc; + const char *desc; u16 counter_id; }; From owner-svn-src-all@freebsd.org Mon Jan 30 08:38:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 336B2CC70CD; Mon, 30 Jan 2017 08:38:34 +0000 (UTC) (envelope-from peterj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCEC31E14; Mon, 30 Jan 2017 08:38:33 +0000 (UTC) (envelope-from peterj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0U8cWna059743; Mon, 30 Jan 2017 08:38:33 GMT (envelope-from peterj@FreeBSD.org) Received: (from peterj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0U8cWNx059740; Mon, 30 Jan 2017 08:38:32 GMT (envelope-from peterj@FreeBSD.org) Message-Id: <201701300838.v0U8cWNx059740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: peterj set sender to peterj@FreeBSD.org using -f From: Peter Jeremy Date: Mon, 30 Jan 2017 08:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312984 - in head: lib/libsysdecode libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 08:38:34 -0000 Author: peterj Date: Mon Jan 30 08:38:32 2017 New Revision: 312984 URL: https://svnweb.freebsd.org/changeset/base/312984 Log: Extend LD_UTRACE by also generating utrace(2) log events for runtime linker errors. Reviewed by: kib, jhb Approved by: jhb(mentor) MFC after: 1 week Differential Revision: D9347 Modified: head/lib/libsysdecode/utrace.c head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld_utrace.h Modified: head/lib/libsysdecode/utrace.c ============================================================================== --- head/lib/libsysdecode/utrace.c Mon Jan 30 08:35:15 2017 (r312983) +++ head/lib/libsysdecode/utrace.c Mon Jan 30 08:38:32 2017 (r312984) @@ -124,6 +124,10 @@ print_utrace_rtld(FILE *fp, void *p) fprintf(fp, "RTLD: %p = dlsym(%p, %s)", ut->mapbase, ut->handle, ut->name); break; + case UTRACE_RTLD_ERROR: + fprintf(fp, "RTLD: error: %s\n", ut->name); + break; + default: return (0); } Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Jan 30 08:35:15 2017 (r312983) +++ head/libexec/rtld-elf/rtld.c Mon Jan 30 08:38:32 2017 (r312984) @@ -764,6 +764,7 @@ _rtld_error(const char *fmt, ...) rtld_vsnprintf(buf, sizeof buf, fmt, ap); error_message = buf; va_end(ap); + LD_UTRACE(UTRACE_RTLD_ERROR, NULL, NULL, 0, 0, error_message); } /* Modified: head/libexec/rtld-elf/rtld_utrace.h ============================================================================== --- head/libexec/rtld-elf/rtld_utrace.h Mon Jan 30 08:35:15 2017 (r312983) +++ head/libexec/rtld-elf/rtld_utrace.h Mon Jan 30 08:38:32 2017 (r312984) @@ -45,6 +45,7 @@ #define UTRACE_FINI_CALL 10 #define UTRACE_DLSYM_START 11 #define UTRACE_DLSYM_STOP 12 +#define UTRACE_RTLD_ERROR 13 #define RTLD_UTRACE_SIG_SZ 4 #define RTLD_UTRACE_SIG "RTLD" From owner-svn-src-all@freebsd.org Mon Jan 30 10:53:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CD69CC8285; Mon, 30 Jan 2017 10:53:50 +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 0A8991061; Mon, 30 Jan 2017 10:53:49 +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 v0UArjDG071806 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Jan 2017 12:53:45 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v0UArjDG071806 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v0UArjhG071805; Mon, 30 Jan 2017 12:53:45 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 30 Jan 2017 12:53:45 +0200 From: Konstantin Belousov To: Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312973 - head/sys/powerpc/include Message-ID: <20170130105345.GL3018@kib.kiev.ua> References: <201701300215.v0U2Fsl0006455@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701300215.v0U2Fsl0006455@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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 10:53:50 -0000 > +#ifdef __GNUCLIKE_ASM > + __asm __volatile ( > + "1:\tlwarx %0, 0, %3\n\t" /* load old value */ > + "cmplw %4, %0\n\t" /* compare */ > + "bne 2f\n\t" /* exit if not equal */ > + "stwcx. %5, 0, %3\n\t" /* attempt to store */ > + "bne- 1b\n\t" /* spin if failed */ > + "li %0, 1\n\t" /* success - retval = 1 */ > + "b 3f\n\t" /* we've succeeded */ > + "2:\n\t" > + "stwcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ > + "stwx %0, 0, %7\n\t" > + "li %0, 0\n\t" /* failure - retval = 0 */ > + "3:\n\t" > + : "=&r" (ret), "=m" (*p), "=m" (*cmpval) > + : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) > + : "cr0", "memory"); > +#endif It seems that in case of failed conditional store, the code retries. Note that this is not incorrect but also not a desirable behaviour with fcmpset: the function should return error and leave the retry to the caller. There is no point in having embedded loop. From owner-svn-src-all@freebsd.org Mon Jan 30 11:50:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2ADECC665A; Mon, 30 Jan 2017 11:50:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D30C19D4; Mon, 30 Jan 2017 11:50:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UBos4o037621; Mon, 30 Jan 2017 11:50:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UBoswd037616; Mon, 30 Jan 2017 11:50:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701301150.v0UBoswd037616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 30 Jan 2017 11:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312986 - in head/sys: amd64/linux32 compat/freebsd32 compat/linux i386/linux kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 11:50:55 -0000 Author: trasz Date: Mon Jan 30 11:50:54 2017 New Revision: 312986 URL: https://svnweb.freebsd.org/changeset/base/312986 Log: Replace sys_ftruncate() with kern_ftruncate() in various compats. Reviewed by: kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9368 Modified: head/sys/amd64/linux32/linux32_machdep.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_file.c head/sys/i386/linux/linux_machdep.c head/sys/kern/vfs_syscalls.c Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/amd64/linux32/linux32_machdep.c Mon Jan 30 11:50:54 2017 (r312986) @@ -645,7 +645,6 @@ linux_sigaltstack(struct thread *td, str int linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args) { - struct ftruncate_args sa; #ifdef DEBUG if (ldebug(ftruncate64)) @@ -653,9 +652,7 @@ linux_ftruncate64(struct thread *td, str (intmax_t)args->length); #endif - sa.fd = args->fd; - sa.length = args->length; - return sys_ftruncate(td, &sa); + return (kern_ftruncate(td, args->fd, args->length)); } int Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Jan 30 11:50:54 2017 (r312986) @@ -1517,11 +1517,8 @@ freebsd32_truncate(struct thread *td, st int freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap) { - struct ftruncate_args ap; - ap.fd = uap->fd; - ap.length = PAIR32TO64(off_t,uap->length); - return (sys_ftruncate(td, &ap)); + return (kern_ftruncate(td, uap->fd, PAIR32TO64(off_t, uap->length))); } #ifdef COMPAT_43 @@ -1623,11 +1620,8 @@ freebsd6_freebsd32_truncate(struct threa int freebsd6_freebsd32_ftruncate(struct thread *td, struct freebsd6_freebsd32_ftruncate_args *uap) { - struct ftruncate_args ap; - ap.fd = uap->fd; - ap.length = PAIR32TO64(off_t,uap->length); - return (sys_ftruncate(td, &ap)); + return (kern_ftruncate(td, uap->fd, PAIR32TO64(off_t, uap->length))); } #endif /* COMPAT_FREEBSD6 */ Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/compat/linux/linux_file.c Mon Jan 30 11:50:54 2017 (r312986) @@ -939,15 +939,8 @@ linux_truncate64(struct thread *td, stru int linux_ftruncate(struct thread *td, struct linux_ftruncate_args *args) { - struct ftruncate_args /* { - int fd; - int pad; - off_t length; - } */ nuap; - - nuap.fd = args->fd; - nuap.length = args->length; - return (sys_ftruncate(td, &nuap)); + + return (kern_ftruncate(td, args->fd, args->length)); } int Modified: head/sys/i386/linux/linux_machdep.c ============================================================================== --- head/sys/i386/linux/linux_machdep.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/i386/linux/linux_machdep.c Mon Jan 30 11:50:54 2017 (r312986) @@ -611,7 +611,6 @@ linux_sigaltstack(struct thread *td, str int linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args) { - struct ftruncate_args sa; #ifdef DEBUG if (ldebug(ftruncate64)) @@ -619,9 +618,7 @@ linux_ftruncate64(struct thread *td, str (intmax_t)args->length); #endif - sa.fd = args->fd; - sa.length = args->length; - return sys_ftruncate(td, &sa); + return (kern_ftruncate(td, args->fd, args->length)); } int Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/kern/vfs_syscalls.c Mon Jan 30 11:50:54 2017 (r312986) @@ -3365,11 +3365,8 @@ freebsd6_truncate(struct thread *td, str int freebsd6_ftruncate(struct thread *td, struct freebsd6_ftruncate_args *uap) { - struct ftruncate_args ouap; - ouap.fd = uap->fd; - ouap.length = uap->length; - return (sys_ftruncate(td, &ouap)); + return (kern_ftruncate(td, uap->fd, uap->length)); } #endif From owner-svn-src-all@freebsd.org Mon Jan 30 12:24:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19D07CC7D55; Mon, 30 Jan 2017 12:24:49 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEA821353; Mon, 30 Jan 2017 12:24:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UCOl3B053616; Mon, 30 Jan 2017 12:24:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UCOlJX053611; Mon, 30 Jan 2017 12:24:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701301224.v0UCOlJX053611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 30 Jan 2017 12:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312987 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 12:24:49 -0000 Author: trasz Date: Mon Jan 30 12:24:47 2017 New Revision: 312987 URL: https://svnweb.freebsd.org/changeset/base/312987 Log: Add kern_lseek() and use it instead of sys_lseek() in various compats. I didn't touch svr4/, there's no point. Reviewed by: ed@, kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9366 Modified: head/sys/compat/cloudabi/cloudabi_fd.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_file.c head/sys/kern/vfs_syscalls.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Mon Jan 30 11:50:54 2017 (r312986) +++ head/sys/compat/cloudabi/cloudabi_fd.c Mon Jan 30 12:24:47 2017 (r312987) @@ -209,26 +209,23 @@ cloudabi_sys_fd_replace(struct thread *t int cloudabi_sys_fd_seek(struct thread *td, struct cloudabi_sys_fd_seek_args *uap) { - struct lseek_args lseek_args = { - .fd = uap->fd, - .offset = uap->offset - }; + int whence; switch (uap->whence) { case CLOUDABI_WHENCE_CUR: - lseek_args.whence = SEEK_CUR; + whence = SEEK_CUR; break; case CLOUDABI_WHENCE_END: - lseek_args.whence = SEEK_END; + whence = SEEK_END; break; case CLOUDABI_WHENCE_SET: - lseek_args.whence = SEEK_SET; + whence = SEEK_SET; break; default: return (EINVAL); } - return (sys_lseek(td, &lseek_args)); + return (kern_lseek(td, uap->fd, uap->offset, whence)); } /* Converts a file descriptor to a CloudABI file descriptor type. */ Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Jan 30 11:50:54 2017 (r312986) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Jan 30 12:24:47 2017 (r312987) @@ -1477,12 +1477,8 @@ freebsd32_pwrite(struct thread *td, stru int ofreebsd32_lseek(struct thread *td, struct ofreebsd32_lseek_args *uap) { - struct lseek_args nuap; - nuap.fd = uap->fd; - nuap.offset = uap->offset; - nuap.whence = uap->whence; - return (sys_lseek(td, &nuap)); + return (kern_lseek(td, uap->fd, uap->offset, uap->whence)); } #endif @@ -1490,13 +1486,10 @@ int freebsd32_lseek(struct thread *td, struct freebsd32_lseek_args *uap) { int error; - struct lseek_args ap; off_t pos; - ap.fd = uap->fd; - ap.offset = PAIR32TO64(off_t,uap->offset); - ap.whence = uap->whence; - error = sys_lseek(td, &ap); + error = kern_lseek(td, uap->fd, PAIR32TO64(off_t, uap->offset), + uap->whence); /* Expand the quad return into two parts for eax and edx */ pos = td->td_uretoff.tdu_off; td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */ @@ -1593,13 +1586,10 @@ int freebsd6_freebsd32_lseek(struct thread *td, struct freebsd6_freebsd32_lseek_args *uap) { int error; - struct lseek_args ap; off_t pos; - ap.fd = uap->fd; - ap.offset = PAIR32TO64(off_t,uap->offset); - ap.whence = uap->whence; - error = sys_lseek(td, &ap); + error = kern_lseek(td, uap->fd, PAIR32TO64(off_t, uap->offset), + uap->whence); /* Expand the quad return into two parts for eax and edx */ pos = *(off_t *)(td->td_retval); td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */ Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Jan 30 11:50:54 2017 (r312986) +++ head/sys/compat/linux/linux_file.c Mon Jan 30 12:24:47 2017 (r312987) @@ -210,31 +210,19 @@ linux_open(struct thread *td, struct lin int linux_lseek(struct thread *td, struct linux_lseek_args *args) { - struct lseek_args /* { - int fd; - int pad; - off_t offset; - int whence; - } */ tmp_args; - int error; #ifdef DEBUG if (ldebug(lseek)) printf(ARGS(lseek, "%d, %ld, %d"), args->fdes, (long)args->off, args->whence); #endif - tmp_args.fd = args->fdes; - tmp_args.offset = (off_t)args->off; - tmp_args.whence = args->whence; - error = sys_lseek(td, &tmp_args); - return (error); + return (kern_lseek(td, args->fdes, args->off, args->whence)); } #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) int linux_llseek(struct thread *td, struct linux_llseek_args *args) { - struct lseek_args bsd_args; int error; off_t off; @@ -245,14 +233,12 @@ linux_llseek(struct thread *td, struct l #endif off = (args->olow) | (((off_t) args->ohigh) << 32); - bsd_args.fd = args->fd; - bsd_args.offset = off; - bsd_args.whence = args->whence; - - if ((error = sys_lseek(td, &bsd_args))) + error = kern_lseek(td, args->fd, off, args->whence); + if (error != 0) return (error); - if ((error = copyout(td->td_retval, args->res, sizeof (off_t)))) + error = copyout(td->td_retval, args->res, sizeof(off_t)); + if (error != 0) return (error); td->td_retval[0] = 0; Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Jan 30 11:50:54 2017 (r312986) +++ head/sys/kern/vfs_syscalls.c Mon Jan 30 12:24:47 2017 (r312987) @@ -1806,25 +1806,25 @@ struct lseek_args { }; #endif int -sys_lseek(td, uap) - struct thread *td; - register struct lseek_args /* { - int fd; - int pad; - off_t offset; - int whence; - } */ *uap; +sys_lseek(struct thread *td, struct lseek_args *uap) +{ + + return (kern_lseek(td, uap->fd, uap->offset, uap->whence)); +} + +int +kern_lseek(struct thread *td, int fd, off_t offset, int whence) { struct file *fp; cap_rights_t rights; int error; - AUDIT_ARG_FD(uap->fd); - error = fget(td, uap->fd, cap_rights_init(&rights, CAP_SEEK), &fp); + AUDIT_ARG_FD(fd); + error = fget(td, fd, cap_rights_init(&rights, CAP_SEEK), &fp); if (error != 0) return (error); error = (fp->f_ops->fo_flags & DFLAG_SEEKABLE) != 0 ? - fo_seek(fp, uap->offset, uap->whence, td) : ESPIPE; + fo_seek(fp, offset, whence, td) : ESPIPE; fdrop(fp, td); return (error); } @@ -1841,41 +1841,20 @@ struct olseek_args { }; #endif int -olseek(td, uap) - struct thread *td; - register struct olseek_args /* { - int fd; - long offset; - int whence; - } */ *uap; +olseek(struct thread *td, struct olseek_args *uap) { - struct lseek_args /* { - int fd; - int pad; - off_t offset; - int whence; - } */ nuap; - nuap.fd = uap->fd; - nuap.offset = uap->offset; - nuap.whence = uap->whence; - return (sys_lseek(td, &nuap)); + return (kern_lseek(td, uap->fd, uap->offset, uap->whence)); } #endif /* COMPAT_43 */ #if defined(COMPAT_FREEBSD6) /* Version with the 'pad' argument */ int -freebsd6_lseek(td, uap) - struct thread *td; - register struct freebsd6_lseek_args *uap; +freebsd6_lseek(struct thread *td, struct freebsd6_lseek_args *uap) { - struct lseek_args ouap; - ouap.fd = uap->fd; - ouap.offset = uap->offset; - ouap.whence = uap->whence; - return (sys_lseek(td, &ouap)); + return (kern_lseek(td, uap->fd, uap->offset, uap->whence)); } #endif Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Mon Jan 30 11:50:54 2017 (r312986) +++ head/sys/sys/syscallsubr.h Mon Jan 30 12:24:47 2017 (r312987) @@ -135,6 +135,7 @@ int kern_kldstat(struct thread *td, int int kern_kldunload(struct thread *td, int fileid, int flags); int kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, enum uio_seg segflg, int follow); +int kern_lseek(struct thread *td, int fd, off_t offset, int whence); int kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); int kern_mkdirat(struct thread *td, int fd, char *path, From owner-svn-src-all@freebsd.org Mon Jan 30 12:57:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B827FCC7569; Mon, 30 Jan 2017 12:57:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78FD06EC; Mon, 30 Jan 2017 12:57:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UCvNEG065998; Mon, 30 Jan 2017 12:57:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UCvNrK065993; Mon, 30 Jan 2017 12:57:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701301257.v0UCvNrK065993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 30 Jan 2017 12:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 12:57:24 -0000 Author: trasz Date: Mon Jan 30 12:57:22 2017 New Revision: 312988 URL: https://svnweb.freebsd.org/changeset/base/312988 Log: Add kern_listen(), kern_shutdown(), and kern_socket(), and use them instead of their sys_*() counterparts in various compats. The svr4 is left untouched, because there's no point. Reviewed by: ed@, kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9367 Modified: head/sys/compat/cloudabi/cloudabi_fd.c head/sys/compat/cloudabi/cloudabi_sock.c head/sys/compat/linux/linux_socket.c head/sys/kern/uipc_syscalls.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/cloudabi/cloudabi_fd.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_fd.c Mon Jan 30 12:24:47 2017 (r312987) +++ head/sys/compat/cloudabi/cloudabi_fd.c Mon Jan 30 12:57:22 2017 (r312988) @@ -100,9 +100,6 @@ cloudabi_sys_fd_create1(struct thread *t struct cloudabi_sys_fd_create1_args *uap) { struct filecaps fcaps = {}; - struct socket_args socket_args = { - .domain = AF_UNIX, - }; switch (uap->type) { case CLOUDABI_FILETYPE_POLL: @@ -113,14 +110,11 @@ cloudabi_sys_fd_create1(struct thread *t CAP_MMAP_RWX); return (kern_shm_open(td, SHM_ANON, O_RDWR, 0, &fcaps)); case CLOUDABI_FILETYPE_SOCKET_DGRAM: - socket_args.type = SOCK_DGRAM; - return (sys_socket(td, &socket_args)); + return (kern_socket(td, AF_UNIX, SOCK_DGRAM, 0)); case CLOUDABI_FILETYPE_SOCKET_SEQPACKET: - socket_args.type = SOCK_SEQPACKET; - return (sys_socket(td, &socket_args)); + return (kern_socket(td, AF_UNIX, SOCK_SEQPACKET, 0)); case CLOUDABI_FILETYPE_SOCKET_STREAM: - socket_args.type = SOCK_STREAM; - return (sys_socket(td, &socket_args)); + return (kern_socket(td, AF_UNIX, SOCK_STREAM, 0)); default: return (EINVAL); } Modified: head/sys/compat/cloudabi/cloudabi_sock.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_sock.c Mon Jan 30 12:24:47 2017 (r312987) +++ head/sys/compat/cloudabi/cloudabi_sock.c Mon Jan 30 12:57:22 2017 (r312988) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -165,37 +164,31 @@ int cloudabi_sys_sock_listen(struct thread *td, struct cloudabi_sys_sock_listen_args *uap) { - struct listen_args listen_args = { - .s = uap->sock, - .backlog = uap->backlog, - }; - return (sys_listen(td, &listen_args)); + return (kern_listen(td, uap->sock, uap->backlog)); } int cloudabi_sys_sock_shutdown(struct thread *td, struct cloudabi_sys_sock_shutdown_args *uap) { - struct shutdown_args shutdown_args = { - .s = uap->sock, - }; + int how; switch (uap->how) { case CLOUDABI_SHUT_RD: - shutdown_args.how = SHUT_RD; + how = SHUT_RD; break; case CLOUDABI_SHUT_WR: - shutdown_args.how = SHUT_WR; + how = SHUT_WR; break; case CLOUDABI_SHUT_RD | CLOUDABI_SHUT_WR: - shutdown_args.how = SHUT_RDWR; + how = SHUT_RDWR; break; default: return (EINVAL); } - return (sys_shutdown(td, &shutdown_args)); + return (kern_shutdown(td, uap->sock, how)); } int Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Mon Jan 30 12:24:47 2017 (r312987) +++ head/sys/compat/linux/linux_socket.c Mon Jan 30 12:57:22 2017 (r312988) @@ -697,32 +697,26 @@ goout: int linux_socket(struct thread *td, struct linux_socket_args *args) { - struct socket_args /* { - int domain; - int type; - int protocol; - } */ bsd_args; - int retval_socket; + int domain, retval_socket, type; - bsd_args.protocol = args->protocol; - bsd_args.type = args->type & LINUX_SOCK_TYPE_MASK; - if (bsd_args.type < 0 || bsd_args.type > LINUX_SOCK_MAX) + type = args->type & LINUX_SOCK_TYPE_MASK; + if (type < 0 || type > LINUX_SOCK_MAX) return (EINVAL); retval_socket = linux_set_socket_flags(args->type & ~LINUX_SOCK_TYPE_MASK, - &bsd_args.type); + &type); if (retval_socket != 0) return (retval_socket); - bsd_args.domain = linux_to_bsd_domain(args->domain); - if (bsd_args.domain == -1) + domain = linux_to_bsd_domain(args->domain); + if (domain == -1) return (EAFNOSUPPORT); - retval_socket = sys_socket(td, &bsd_args); + retval_socket = kern_socket(td, domain, type, args->protocol); if (retval_socket) return (retval_socket); - if (bsd_args.type == SOCK_RAW - && (bsd_args.protocol == IPPROTO_RAW || bsd_args.protocol == 0) - && bsd_args.domain == PF_INET) { + if (type == SOCK_RAW + && (args->protocol == IPPROTO_RAW || args->protocol == 0) + && domain == PF_INET) { /* It's a raw IP socket: set the IP_HDRINCL option. */ int hdrincl; @@ -738,7 +732,7 @@ linux_socket(struct thread *td, struct l * For simplicity we do this unconditionally of the net.inet6.ip6.v6only * sysctl value. */ - if (bsd_args.domain == PF_INET6) { + if (domain == PF_INET6) { int v6only; v6only = 0; @@ -816,14 +810,8 @@ linux_connect(struct thread *td, struct int linux_listen(struct thread *td, struct linux_listen_args *args) { - struct listen_args /* { - int s; - int backlog; - } */ bsd_args; - bsd_args.s = args->s; - bsd_args.backlog = args->backlog; - return (sys_listen(td, &bsd_args)); + return (kern_listen(td, args->s, args->backlog)); } static int @@ -1524,14 +1512,8 @@ linux_recvmmsg(struct thread *td, struct int linux_shutdown(struct thread *td, struct linux_shutdown_args *args) { - struct shutdown_args /* { - int s; - int how; - } */ bsd_args; - bsd_args.s = args->s; - bsd_args.how = args->how; - return (sys_shutdown(td, &bsd_args)); + return (kern_shutdown(td, args->s, args->how)); } int Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Mon Jan 30 12:24:47 2017 (r312987) +++ head/sys/kern/uipc_syscalls.c Mon Jan 30 12:57:22 2017 (r312988) @@ -124,13 +124,19 @@ getsock_cap(struct thread *td, int fd, c int sys_socket(struct thread *td, struct socket_args *uap) { + + return (kern_socket(td, uap->domain, uap->type, uap->protocol)); +} + +int +kern_socket(struct thread *td, int domain, int type, int protocol) +{ struct socket *so; struct file *fp; - int fd, error, type, oflag, fflag; + int fd, error, oflag, fflag; - AUDIT_ARG_SOCKET(uap->domain, uap->type, uap->protocol); + AUDIT_ARG_SOCKET(domain, type, protocol); - type = uap->type; oflag = 0; fflag = 0; if ((type & SOCK_CLOEXEC) != 0) { @@ -143,8 +149,7 @@ sys_socket(struct thread *td, struct soc } #ifdef MAC - error = mac_socket_check_create(td->td_ucred, uap->domain, type, - uap->protocol); + error = mac_socket_check_create(td->td_ucred, domain, type, protocol); if (error != 0) return (error); #endif @@ -152,8 +157,7 @@ sys_socket(struct thread *td, struct soc if (error != 0) return (error); /* An extra reference on `fp' has been held for us by falloc(). */ - error = socreate(uap->domain, &so, type, uap->protocol, - td->td_ucred, td); + error = socreate(domain, &so, type, protocol, td->td_ucred, td); if (error != 0) { fdclose(td, fp, fd); } else { @@ -231,13 +235,20 @@ sys_bindat(struct thread *td, struct bin int sys_listen(struct thread *td, struct listen_args *uap) { + + return (kern_listen(td, uap->s, uap->backlog)); +} + +int +kern_listen(struct thread *td, int s, int backlog) +{ struct socket *so; struct file *fp; cap_rights_t rights; int error; - AUDIT_ARG_FD(uap->s); - error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), + AUDIT_ARG_FD(s); + error = getsock_cap(td, s, cap_rights_init(&rights, CAP_LISTEN), &fp, NULL, NULL); if (error == 0) { so = fp->f_data; @@ -245,10 +256,10 @@ sys_listen(struct thread *td, struct lis error = mac_socket_check_listen(td->td_ucred, so); if (error == 0) #endif - error = solisten(so, uap->backlog, td); + error = solisten(so, backlog, td); fdrop(fp, td); } - return(error); + return (error); } /* @@ -1205,17 +1216,24 @@ sys_recvmsg(struct thread *td, struct re int sys_shutdown(struct thread *td, struct shutdown_args *uap) { + + return (kern_shutdown(td, uap->s, uap->how)); +} + +int +kern_shutdown(struct thread *td, int s, int how) +{ struct socket *so; struct file *fp; cap_rights_t rights; int error; - AUDIT_ARG_FD(uap->s); - error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), + AUDIT_ARG_FD(s); + error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SHUTDOWN), &fp, NULL, NULL); if (error == 0) { so = fp->f_data; - error = soshutdown(so, uap->how); + error = soshutdown(so, how); /* * Previous versions did not return ENOTCONN, but 0 in * case the socket was not connected. Some important Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Mon Jan 30 12:24:47 2017 (r312987) +++ head/sys/sys/syscallsubr.h Mon Jan 30 12:57:22 2017 (r312988) @@ -135,6 +135,7 @@ int kern_kldstat(struct thread *td, int int kern_kldunload(struct thread *td, int fileid, int flags); int kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, enum uio_seg segflg, int follow); +int kern_listen(struct thread *td, int s, int backlog); int kern_lseek(struct thread *td, int fd, off_t offset, int whence); int kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); @@ -213,6 +214,7 @@ int kern_shmat(struct thread *td, int sh int shmflg); int kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, size_t *bufsz); +int kern_shutdown(struct thread *td, int s, int how); int kern_sigaction(struct thread *td, int sig, const struct sigaction *act, struct sigaction *oact, int flags); int kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss); @@ -221,6 +223,7 @@ int kern_sigprocmask(struct thread *td, int kern_sigsuspend(struct thread *td, sigset_t mask); int kern_sigtimedwait(struct thread *td, sigset_t waitset, struct ksiginfo *ksi, struct timespec *timeout); +int kern_socket(struct thread *td, int domain, int type, int protocol); int kern_statat(struct thread *td, int flag, int fd, char *path, enum uio_seg pathseg, struct stat *sbp, void (*hook)(struct vnode *vp, struct stat *sbp)); From owner-svn-src-all@freebsd.org Mon Jan 30 14:33:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4EDBCC8908; Mon, 30 Jan 2017 14:33:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A43559FD; Mon, 30 Jan 2017 14:33:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UEXrp8006548; Mon, 30 Jan 2017 14:33:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UEXrij006547; Mon, 30 Jan 2017 14:33:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201701301433.v0UEXrij006547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 30 Jan 2017 14:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r312989 - stable/11/sys/amd64/vmm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 14:33:54 -0000 Author: avg Date: Mon Jan 30 14:33:53 2017 New Revision: 312989 URL: https://svnweb.freebsd.org/changeset/base/312989 Log: MFC r312531: vmm_dev: work around a bogus error with gcc 6.3.0 Modified: stable/11/sys/amd64/vmm/vmm_dev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/vmm/vmm_dev.c ============================================================================== --- stable/11/sys/amd64/vmm/vmm_dev.c Mon Jan 30 12:57:22 2017 (r312988) +++ stable/11/sys/amd64/vmm/vmm_dev.c Mon Jan 30 14:33:53 2017 (r312989) @@ -258,7 +258,7 @@ alloc_memseg(struct vmmdev_softc *sc, st if (VM_MEMSEG_NAME(mseg)) { sysmem = false; name = malloc(SPECNAMELEN + 1, M_VMMDEV, M_WAITOK); - error = copystr(VM_MEMSEG_NAME(mseg), name, SPECNAMELEN + 1, 0); + error = copystr(mseg->name, name, SPECNAMELEN + 1, 0); if (error) goto done; } From owner-svn-src-all@freebsd.org Mon Jan 30 14:34:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 625E6CC894A; Mon, 30 Jan 2017 14:34:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 319BEA8A; Mon, 30 Jan 2017 14:34:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UEY4U9006610; Mon, 30 Jan 2017 14:34:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UEY47m006609; Mon, 30 Jan 2017 14:34:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201701301434.v0UEY47m006609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 30 Jan 2017 14:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r312990 - stable/10/sys/amd64/vmm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 14:34:05 -0000 Author: avg Date: Mon Jan 30 14:34:04 2017 New Revision: 312990 URL: https://svnweb.freebsd.org/changeset/base/312990 Log: MFC r312531: vmm_dev: work around a bogus error with gcc 6.3.0 Modified: stable/10/sys/amd64/vmm/vmm_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/vmm_dev.c ============================================================================== --- stable/10/sys/amd64/vmm/vmm_dev.c Mon Jan 30 14:33:53 2017 (r312989) +++ stable/10/sys/amd64/vmm/vmm_dev.c Mon Jan 30 14:34:04 2017 (r312990) @@ -258,7 +258,7 @@ alloc_memseg(struct vmmdev_softc *sc, st if (VM_MEMSEG_NAME(mseg)) { sysmem = false; name = malloc(SPECNAMELEN + 1, M_VMMDEV, M_WAITOK); - error = copystr(VM_MEMSEG_NAME(mseg), name, SPECNAMELEN + 1, 0); + error = copystr(mseg->name, name, SPECNAMELEN + 1, 0); if (error) goto done; } From owner-svn-src-all@freebsd.org Mon Jan 30 15:20:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1FA9CC78C1; Mon, 30 Jan 2017 15:20:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1C7D7E2; Mon, 30 Jan 2017 15:20:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UFKDjM023763; Mon, 30 Jan 2017 15:20:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UFKDej023762; Mon, 30 Jan 2017 15:20:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201701301520.v0UFKDej023762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 30 Jan 2017 15:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312991 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 15:20:15 -0000 Author: avg Date: Mon Jan 30 15:20:13 2017 New Revision: 312991 URL: https://svnweb.freebsd.org/changeset/base/312991 Log: put very expensive sanity checks of advisory locks under DIAGNOSTIC The checks have quadratic complexity over a number of advisory locks active for a file and that could be a lot. What's the worse is that the checks are done while holding ls_lock. That could lead to a long a very long backlog and performance degradation even if all requested locks are compatible (e.g. all shared locks). The checks used to be under INVARIANTS. Discussed with: kib MFC after: 2 weeks Sponsored by: Panzura Modified: head/sys/kern/kern_lockf.c Modified: head/sys/kern/kern_lockf.c ============================================================================== --- head/sys/kern/kern_lockf.c Mon Jan 30 14:34:04 2017 (r312990) +++ head/sys/kern/kern_lockf.c Mon Jan 30 15:20:13 2017 (r312991) @@ -689,7 +689,7 @@ retry_setlock: break; } -#ifdef INVARIANTS +#ifdef DIAGNOSTIC /* * Check for some can't happen stuff. In this case, the active * lock list becoming disordered or containing mutually @@ -917,7 +917,7 @@ lf_add_edge(struct lockf_entry *x, struc struct lockf_edge *e; int error; -#ifdef INVARIANTS +#ifdef DIAGNOSTIC LIST_FOREACH(e, &x->lf_outedges, le_outlink) KASSERT(e->le_to != y, ("adding lock edge twice")); #endif From owner-svn-src-all@freebsd.org Mon Jan 30 15:32:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68D29CC7F05; Mon, 30 Jan 2017 15:32:25 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qk0-x241.google.com (mail-qk0-x241.google.com [IPv6:2607:f8b0:400d:c09::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 1E427129A; Mon, 30 Jan 2017 15:32:25 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qk0-x241.google.com with SMTP id e1so19373822qkh.1; Mon, 30 Jan 2017 07:32:25 -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=jZbDYn1jQfj/ftnA0jhAIZDe+iy8JUpYQf1hKwj2IeY=; b=vTO7JD/2xL/q2WAlJBtLRpJ3ZyqogQXAOFX3u9/K+lwutgyCbqJi+fxkHbis+yKAi7 g9wpPPbYUy3o8clruUZkyx5bWEWqhYIVB27iKmSc3+RIePd9N2hfwX1VF1ECcAw5YSX2 UcYLLXW+Vwb95umSZwI+uTXjVL9ewxp8kjkHvJKaUrLtLPMgSv3EaXhbS2G4NZ2Q+gp5 ej+x6uhWs4ifiXHZu26pIAq4EwgBWzepzBirvWUsGTBcw9AjYVoGVGstHZLAAGQGT/0u CVGBJJYHjuEdAxzwbE53/PnrB216e0/xmHNQPt0iL1clZP1C03QJtDjpHH1aBsD8bb3o 1iWg== 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=jZbDYn1jQfj/ftnA0jhAIZDe+iy8JUpYQf1hKwj2IeY=; b=agQelR7v1bvPICnFVh/8Oc8ynSMSfUlknOZvBiJA2454k5Ek6mTPL+pM776Dfeq1w7 TJbCn842rDEcpTojogXOf0ubMap03ycFeuiEEwiWz43Nx7Ufi2anko6G/Xwd9LIZA7+f gws6onxoCNWUD0TQx/USBeHyM+YzG1vHEMGAhrOa9/YZ49LImJiKk8IP6pgnBt74B+pq A8rZ2Cqg+8g+hiHIpZBeY/SDd88ZH9K0o8AL5oi13QFkpeG5pzlBhc6wYrPe7s5uJYNl Lz8QZcwMuM5SbyfIgubvgjdc7gAZAFxCSsvgLQacVOyfymvq9pGlCcSfYacBEx9DeoA0 ydGg== X-Gm-Message-State: AIkVDXLtjL5XmUzreZklLC9lewMy8K8RldhCmHf88NagFvWRx/dwlDT5X+S75h51wHffkLCuB5wJAkXtMhBbnA== X-Received: by 10.55.118.67 with SMTP id r64mr21465147qkc.285.1485790344345; Mon, 30 Jan 2017 07:32:24 -0800 (PST) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.12.157.69 with HTTP; Mon, 30 Jan 2017 07:32:23 -0800 (PST) In-Reply-To: <20170130105345.GL3018@kib.kiev.ua> References: <201701300215.v0U2Fsl0006455@repo.freebsd.org> <20170130105345.GL3018@kib.kiev.ua> From: Justin Hibbits Date: Mon, 30 Jan 2017 09:32:23 -0600 X-Google-Sender-Auth: AZj9ZLz8UbmlOwR_C-0inZyvOuo Message-ID: Subject: Re: svn commit: r312973 - head/sys/powerpc/include To: Konstantin Belousov Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 15:32:25 -0000 On Mon, Jan 30, 2017 at 4:53 AM, Konstantin Belousov wrote: >> +#ifdef __GNUCLIKE_ASM >> + __asm __volatile ( >> + "1:\tlwarx %0, 0, %3\n\t" /* load old value */ >> + "cmplw %4, %0\n\t" /* compare */ >> + "bne 2f\n\t" /* exit if not equal */ >> + "stwcx. %5, 0, %3\n\t" /* attempt to store */ >> + "bne- 1b\n\t" /* spin if failed */ >> + "li %0, 1\n\t" /* success - retval = 1 */ >> + "b 3f\n\t" /* we've succeeded */ >> + "2:\n\t" >> + "stwcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ >> + "stwx %0, 0, %7\n\t" >> + "li %0, 0\n\t" /* failure - retval = 0 */ >> + "3:\n\t" >> + : "=&r" (ret), "=m" (*p), "=m" (*cmpval) >> + : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) >> + : "cr0", "memory"); >> +#endif > > It seems that in case of failed conditional store, the code retries. > Note that this is not incorrect but also not a desirable behaviour > with fcmpset: the function should return error and leave the retry > to the caller. There is no point in having embedded loop. From owner-svn-src-all@freebsd.org Mon Jan 30 15:37:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E06AACC8085; Mon, 30 Jan 2017 15:37:05 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::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 B0DB51658; Mon, 30 Jan 2017 15:37:05 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id e1so19397553qkh.1; Mon, 30 Jan 2017 07:37:05 -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=U8+O3G3MyVI8KLIYE6Qxmz6WbiSdZwbgFrbB2Fim1iY=; b=kmHWcV61rNtIi7kCZ6S/uKXn6CPqzWgf8p08+6SnltDVFdwPnLBZjWd7ti08O2Ylo5 iuxRXALzvhdGHrErHCb0eBifGz8hFt90xnAkrIYFLoXa+qT4t5h5IU6nEypBiNoEHFCy pMVUsM0dQQwvNhasIVj3Y1VbsAeIP1B5mLpb9EhPn6x39/HZICzIEOeJH41pqi88+rSg EmwftfRbnG5kURZ6+yLBiRyCIKT9uqj3itktWfD5K2p43QIdEhoqhUOCdn8FTR4EK+Gq VdBXoNUmBBN8uzgM/DSW+8Wg7Y/v+VuA1U8VfJw3cbq1kOii5rl8d2vYwpOD8Rircma0 NmUw== 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=U8+O3G3MyVI8KLIYE6Qxmz6WbiSdZwbgFrbB2Fim1iY=; b=XQ2YlbEHoxCUHm4FoXi5DS/Rv/oPnSoYrE523WXgGLO5ay9mxbGn0RJ7lGOSzCvzE2 7LbmBsx+VyikdUDEr5+JlG1t37GMDZ5EwgiApBl4F0dd6iGBR/d4BjPJYqSECLRevbj4 L1BvbRk8ATCBlJXlYeT9Oy1Olug8nJZze5vJzkWiP9H0VCU+DmdDs4pk1axjU1Atex2c WRuQ0cHqwd+h9avw63B5Sm1y/Z+GRthAohL/ngoreizl8f5vq6nrG0twd3pG9wh9Irmg vdrOMLRtqhbchF2DHYC2f064uiGBdDKXiYs4KaRdtJFGQ3a9e8co+bi8s5qiQLa9cFxV 0uhg== X-Gm-Message-State: AIkVDXL09tfnE0Bc604h0IT+ZujAnceywgeG5bkeTr65rXv0Qq27ZLegYF3EDYgf7+mYtUROJtBHsczFpGRHAQ== X-Received: by 10.55.5.66 with SMTP id 63mr23796315qkf.163.1485790624832; Mon, 30 Jan 2017 07:37:04 -0800 (PST) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.12.157.69 with HTTP; Mon, 30 Jan 2017 07:37:04 -0800 (PST) In-Reply-To: References: <201701300215.v0U2Fsl0006455@repo.freebsd.org> <20170130105345.GL3018@kib.kiev.ua> From: Justin Hibbits Date: Mon, 30 Jan 2017 09:37:04 -0600 X-Google-Sender-Auth: 0GOHapSvjeQpu4XIe49L53f7NrQ Message-ID: Subject: Re: svn commit: r312973 - head/sys/powerpc/include To: Konstantin Belousov Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 15:37:06 -0000 On Mon, Jan 30, 2017 at 9:32 AM, Justin Hibbits wrote: > On Mon, Jan 30, 2017 at 4:53 AM, Konstantin Belousov > wrote: >>> +#ifdef __GNUCLIKE_ASM >>> + __asm __volatile ( >>> + "1:\tlwarx %0, 0, %3\n\t" /* load old value */ >>> + "cmplw %4, %0\n\t" /* compare */ >>> + "bne 2f\n\t" /* exit if not equal */ >>> + "stwcx. %5, 0, %3\n\t" /* attempt to store */ >>> + "bne- 1b\n\t" /* spin if failed */ >>> + "li %0, 1\n\t" /* success - retval = 1 */ >>> + "b 3f\n\t" /* we've succeeded */ >>> + "2:\n\t" >>> + "stwcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ >>> + "stwx %0, 0, %7\n\t" >>> + "li %0, 0\n\t" /* failure - retval = 0 */ >>> + "3:\n\t" >>> + : "=&r" (ret), "=m" (*p), "=m" (*cmpval) >>> + : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) >>> + : "cr0", "memory"); >>> +#endif >> >> It seems that in case of failed conditional store, the code retries. >> Note that this is not incorrect but also not a desirable behaviour >> with fcmpset: the function should return error and leave the retry >> to the caller. There is no point in having embedded loop. (stupid gmail web UI being so slow it registered me clicking Send when I clicked the ...) Thanks, Kib. I discussed this with mjg on IRC, and it was kind of a toss-up how to implement it, so I took the easiest route. I'll update it tonight and remove the loop. There is an instruction on newer ISAs that would reduce this inline asm even further, 'mfocrf', but it doesn't exist on all supported PowerPC architectures, so it will be just a minor tweak. - Justin From owner-svn-src-all@freebsd.org Mon Jan 30 16:19:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C31DCC8B0D; Mon, 30 Jan 2017 16:19:07 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F78BEA8; Mon, 30 Jan 2017 16:19:06 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (67-0-248-244.albq.qwest.net [67.0.248.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 0337C1928BA; Mon, 30 Jan 2017 16:18:59 +0000 (UTC) Subject: Re: svn commit: r312755 - head/sys/net To: John Baldwin References: <201701251437.v0PEb5D7047773@repo.freebsd.org> <6817684.C985jk9qCN@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Matthew Macy From: Sean Bruno Message-ID: Date: Mon, 30 Jan 2017 09:18:56 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <6817684.C985jk9qCN@ralph.baldwin.cx> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HFqjPIwvv10aPjluuAjqto8MMfcn16jEE" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 16:19:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HFqjPIwvv10aPjluuAjqto8MMfcn16jEE Content-Type: multipart/mixed; boundary="42evHKNlMPM6UtKtjBbTOdhvqFOqofU90"; protected-headers="v1" From: Sean Bruno To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Matthew Macy Message-ID: Subject: Re: svn commit: r312755 - head/sys/net References: <201701251437.v0PEb5D7047773@repo.freebsd.org> <6817684.C985jk9qCN@ralph.baldwin.cx> In-Reply-To: <6817684.C985jk9qCN@ralph.baldwin.cx> --42evHKNlMPM6UtKtjBbTOdhvqFOqofU90 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 01/27/17 12:28, John Baldwin wrote: > On Wednesday, January 25, 2017 02:37:05 PM Sean Bruno wrote: >> Author: sbruno >> Date: Wed Jan 25 14:37:05 2017 >> New Revision: 312755 >> URL: https://svnweb.freebsd.org/changeset/base/312755 >> >> Log: >> Add error checking to the pci_find_cap(, PCIY_MSIX,) call that is re= turns >> success and a good value. Only then try to use it and set the MSIX_= ENABLE >> bit. >> =20 >> With the current em(4) driver we have observed failures in this case= in a >> specific environment when pci_find_cap() would not return the assume= d >> value, which meant we ended up writing to PCI register 2 (PCI_DEVICE= _ID) >> which is read-only. >=20 > Why is this writing directly to the MSIX registers at all? pci_alloc_m= six() > etc. handle those registers for all other drivers and proper suspend/re= sume > depends on drivers using the existing PCI API for managing MSI and MSI-= X. >=20 The comment above this code block explains what's up. Basically, virtualized environments are sometimes "lazy" about correct register setu= p. If MSIX caps aren't set, try to enable them. If that fails, assume MSI. Later on the code does the proper pci_alloc_msix() calls in the proper sequence, IMO. sean --42evHKNlMPM6UtKtjBbTOdhvqFOqofU90-- --HFqjPIwvv10aPjluuAjqto8MMfcn16jEE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEuq1GMucSHejSCZfdEgHvyh5yfmQFAliPZ3BfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEJB QUQ0NjMyRTcxMjFERThEMjA5OTdERDEyMDFFRkNBMUU3MjdFNjQACgkQEgHvyh5y fmSI0gf/d+zpOy+MJvENkQhw88p52UOyAmubJbWsLifVwxlRpUv89t+rAHM54rKF kE8Vx1045CZCmU1jEiajrW9DOSnmZZvWAjjI3jWqK4TYNL1AFRayhKZwzpG4x41k e/2rCgy3NhpZWK7rRkDRy7Qqb7DtU+BvZCcIpp4uqb1bMdbCNiFhYkzgRr4SgNje YHuSBmD9CIfCJQnbj9p+rDs6t26iyCIViCppZzEaJpnk1BivyYOrR3mOZVj3b8Wi 2tkEKF1PZRakF5tT8dpuwRgglppxYaUImect8yT+uwCkqlVHDz2CtEkQvPLzc8Cl oTKz9fCVOZ2oMNz5Oz3qBFeLWLVhFA== =lj4B -----END PGP SIGNATURE----- --HFqjPIwvv10aPjluuAjqto8MMfcn16jEE-- From owner-svn-src-all@freebsd.org Mon Jan 30 16:32:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84C9DCC8F3F; Mon, 30 Jan 2017 16:32:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 571E3194C; Mon, 30 Jan 2017 16:32:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UGWsB3055950; Mon, 30 Jan 2017 16:32:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UGWrG6055942; Mon, 30 Jan 2017 16:32:53 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701301632.v0UGWrG6055942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 30 Jan 2017 16:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312992 - in head: contrib/openresolv sbin/resolvconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 16:32:55 -0000 Author: pfg Date: Mon Jan 30 16:32:53 2017 New Revision: 312992 URL: https://svnweb.freebsd.org/changeset/base/312992 Log: MFV r312970: openresolv: update to version 3.9.0. It is now possible to drop the _WITH_ARG vars thanks to a change to the pdns_recursor upstreamed by Guy Yur. MFC after: 3 weeks Modified: head/contrib/openresolv/Makefile head/contrib/openresolv/configure head/contrib/openresolv/libc.in head/contrib/openresolv/pdns_recursor.in head/contrib/openresolv/resolvconf.8.in head/contrib/openresolv/resolvconf.conf.5.in head/contrib/openresolv/resolvconf.in head/sbin/resolvconf/Makefile Directory Properties: head/contrib/openresolv/ (props changed) Modified: head/contrib/openresolv/Makefile ============================================================================== --- head/contrib/openresolv/Makefile Mon Jan 30 15:20:13 2017 (r312991) +++ head/contrib/openresolv/Makefile Mon Jan 30 16:32:53 2017 (r312992) @@ -37,6 +37,11 @@ SED_STATUSARG= -e 's:@STATUSARG@:${STAT DISTPREFIX?= ${PKG}-${VERSION} DISTFILEGZ?= ${DISTPREFIX}.tar.gz DISTFILE?= ${DISTPREFIX}.tar.xz +DISTINFO= ${DISTFILE}.distinfo +DISTINFOSIGN= ${DISTINFO}.asc +CKSUM?= cksum -a SHA256 +PGP?= netpgp + FOSSILID?= current .SUFFIXES: .in @@ -53,7 +58,7 @@ clean: rm -f ${TARGET} distclean: clean - rm -f config.mk ${DISTFILE} + rm -f config.mk ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} installdirs: @@ -83,3 +88,11 @@ dist: fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} gunzip -c ${DISTFILEGZ} | xz >${DISTFILE} rm ${DISTFILEGZ} + +distinfo: dist + rm -f ${DISTINFO} ${DISTINFOSIGN} + ${CKSUM} ${DISTFILE} >${DISTINFO} + #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO} + ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO} + chmod 644 ${DISTINFOSIGN} + ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} Modified: head/contrib/openresolv/configure ============================================================================== --- head/contrib/openresolv/configure Mon Jan 30 15:20:13 2017 (r312991) +++ head/contrib/openresolv/configure Mon Jan 30 16:32:53 2017 (r312992) @@ -120,14 +120,21 @@ echo "Configuring openresolv for ... $OS rm -rf $CONFIG_MK echo "# $OS" >$CONFIG_MK -# On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled -# regardless of if it's not running. -# So we force onestatus to work around this silly bug. -if [ -z "$STATUSARG" ]; then - case "$OS" in - freebsd*) STATUSARG="onestatus";; - esac -fi +case "$OS" in +freebsd*) + # On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled + # regardless of if it's not running. + # So we force onestatus to work around this silly bug. + if [ -z "$STATUSARG" ]; then + STATUSARG="onestatus" + fi + ;; +linux*) + # cksum does't support -a and netpgp is rare + echo "CKSUM= sha256sum --tag" >>$CONFIG_MK + echo "PGP= gpg2" >>$CONFIG_MK + ;; +esac for x in SYSCONFDIR SBINDIR LIBEXECDIR VARDIR MANDIR RESTARTCMD RCDIR STATUSARG do Modified: head/contrib/openresolv/libc.in ============================================================================== --- head/contrib/openresolv/libc.in Mon Jan 30 15:20:13 2017 (r312991) +++ head/contrib/openresolv/libc.in Mon Jan 30 16:32:53 2017 (r312992) @@ -216,7 +216,7 @@ fi if $backup; then if [ "$newconf" = "$signature$NL" ]; then if [ -e "$resolv_conf.bak" ]; then - newconf="$(cat "$resolv_conf.bak")" + newconf="$(cat "$resolv_conf.bak")$NL" fi elif [ -e "$resolv_conf" ]; then read line <"$resolv_conf" Modified: head/contrib/openresolv/pdns_recursor.in ============================================================================== --- head/contrib/openresolv/pdns_recursor.in Mon Jan 30 15:20:13 2017 (r312991) +++ head/contrib/openresolv/pdns_recursor.in Mon Jan 30 16:32:53 2017 (r312992) @@ -34,7 +34,6 @@ NL=" " : ${pdns_service:=pdns_recursor} -: ${pdns_restart:=@RESTARTCMD ${pdns_service}@} newzones= @@ -68,5 +67,12 @@ if [ ! -f "$pdns_zones" ] || \ [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ] then printf %s "$newzones" >"$pdns_zones" - eval $pdns_restart + if [ -n "$pdns_restart" ]; then + eval $pdns_restart + elif [ -n "$RESTARTCMD" ]; then + set -- ${pdns_service} + eval $RESTARTCMD + else + @SBINDIR@/resolvconf -r ${pdns_service} + fi fi Modified: head/contrib/openresolv/resolvconf.8.in ============================================================================== --- head/contrib/openresolv/resolvconf.8.in Mon Jan 30 15:20:13 2017 (r312991) +++ head/contrib/openresolv/resolvconf.8.in Mon Jan 30 16:32:53 2017 (r312992) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 7, 2016 +.Dd November 29, 2016 .Dt RESOLVCONF 8 .Os .Sh NAME @@ -45,6 +45,8 @@ .Fl il Ar pattern .Nm .Fl u +.Nm +.Fl Fl version .Sh DESCRIPTION .Nm manages @@ -106,7 +108,7 @@ See .Xr resolvconf.conf 5 for how to configure .Nm -to use a local name server. +to use a local name server and how to remove the private marking. .Pp .Nm can mark an interfaces @@ -126,7 +128,7 @@ on the .Ar interface . .Pp Here are some options for the above commands:- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It Fl f Ignore non existent interfaces. Only really useful for deleting interfaces. @@ -146,7 +148,7 @@ as exclusive when adding, otherwise only .Pp .Nm has some more commands for general usage:- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It Fl i Ar pattern List the interfaces and protocols, optionally matching .Ar pattern , @@ -168,12 +170,15 @@ to update all its subscribers. .Nm does not update the subscribers when adding a resolv.conf that matches what it already has for that interface. +.It Fl Fl version +Echo the resolvconf version to +.Em stdout . .El .Pp .Nm also has some commands designed to be used by it's subscribers and system startup:- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It Fl I Initialise the state directory .Pa @VARDIR@ . @@ -223,7 +228,7 @@ Here are some suggested protocol tags to .Pa resolv.conf file registered on an .Ar interface Ns No :- -.Bl -tag -width indent +.Bl -tag -width pattern_opt .It dhcp Dynamic Host Configuration Protocol. Initial versions of Modified: head/contrib/openresolv/resolvconf.conf.5.in ============================================================================== --- head/contrib/openresolv/resolvconf.conf.5.in Mon Jan 30 15:20:13 2017 (r312991) +++ head/contrib/openresolv/resolvconf.conf.5.in Mon Jan 30 16:32:53 2017 (r312992) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 28, 2016 +.Dd December 29, 2016 .Dt RESOLVCONF.CONF 5 .Os .Sh NAME @@ -69,6 +69,11 @@ If unset, defaults to the following:- These interfaces will be processed next, unless they have a metric. If unset, defaults to the following:- .D1 tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]* +.It Sy inclusive_interfaces +Ignore any exlcusive marking for these interfaces. +This is handy when 3rd party integrations force the +.Nm resolvconf -x +option and you want to disable it easily. .It Sy local_nameservers If unset, defaults to the following:- .D1 127.* 0.0.0.0 255.255.255.255 ::1 @@ -102,6 +107,11 @@ Requires a local nameserver other than l This is equivalent to the .Nm resolvconf -p option. +.It Sy public_interfaces +Force these interface to be public, overriding the private marking. +This is handy when 3rd party integrations force the +.Nm resolvconf -p +option and you want to disable it easily. .It Sy replace Is a space separated list of replacement keywords. The syntax is this: Modified: head/contrib/openresolv/resolvconf.in ============================================================================== --- head/contrib/openresolv/resolvconf.in Mon Jan 30 15:20:13 2017 (r312991) +++ head/contrib/openresolv/resolvconf.in Mon Jan 30 16:32:53 2017 (r312992) @@ -25,13 +25,19 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. RESOLVCONF="$0" -OPENRESOLV_VERSION="3.8.1" +OPENRESOLV_VERSION="3.9.0" SYSCONFDIR=@SYSCONFDIR@ LIBEXECDIR=@LIBEXECDIR@ VARDIR=@VARDIR@ RCDIR=@RCDIR@ RESTARTCMD=@RESTARTCMD@ +if [ "$1" = "--version" ]; then + echo "openresolv $OPENRESOLV_VERSION" + echo "Copyright (c) 2007-2016 Roy Marples" + exit 0 +fi + # Disregard dhcpcd setting unset interface_order state_dir @@ -90,6 +96,7 @@ usage() that match the specified pattern -u Run updates from our current DNS information + --version Echo the ${RESOLVCONF##*/} version Options: -f Ignore non existent interfaces @@ -129,6 +136,34 @@ strip_trailing_dots() printf "\n" } +private_iface() +{ + local p + + # Allow expansion + cd "$IFACEDIR" + + # Public interfaces override private ones. + for p in $public_interfaces; do + case "$iface" in + "$p"|"$p":*) return 1;; + esac + done + + if [ -e "$PRIVATEDIR/$iface" ]; then + return 0 + fi + + for p in $private_interfaces; do + case "$iface" in + "$p"|"$p":*) return 0;; + esac + done + + # Not a private interface + return 1 +} + # Parse resolv.conf's and make variables # for domain name servers, search name servers and global nameservers parse_resolv() @@ -144,20 +179,10 @@ parse_resolv() if ${new}; then iface="${line#\# resolv.conf from *}" new=false - if [ -e "$PRIVATEDIR/$iface" ]; then + if private_iface "$iface"; then private=true else - # Allow expansion - cd "$IFACEDIR" private=false - for p in $private_interfaces; do - case "$iface" in - "$p"|"$p":*) - private=true - break - ;; - esac - done fi fi ;; @@ -301,9 +326,9 @@ fi" /usr/sbin/service \$1 restart; fi" elif [ -x /bin/sv ]; then - RESTARTCMD="/bin/sv try-restart \$1" + RESTARTCMD="/bin/sv status \$1 >/dev/null 2>&1 && /bin/sv try-restart \$1" elif [ -x /usr/bin/sv ]; then - RESTARTCMD="/usr/bin/sv try-restart \$1" + RESTARTCMD="/usr/bin/sv status \$1 >/dev/null 2>&1 && /usr/bin/sv try-restart \$1" elif [ -e /etc/arch-release -a -d /etc/rc.d ]; then RCDIR=/etc/rc.d RESTARTCMD="if [ -e /var/run/daemons/\$1 ]; then @@ -378,6 +403,14 @@ list_resolv() done fi excl=true + cd "$IFACEDIR" + for i in $inclusive_interfaces; do + if [ -f "$i" -a "$list" = "$i" ]; then + list= + excl=false + break + fi + done ;; *) excl=false @@ -418,7 +451,6 @@ list_resolv() cd "$IFACEDIR" retval=1 - excl=true for i in $(uniqify $list); do # Only list interfaces which we really have if ! [ -f "$i" ]; then @@ -432,8 +464,7 @@ list_resolv() if [ "$cmd" = i -o "$cmd" = "-i" ]; then printf %s "$i " else - echo_resolv "$i" - echo + echo_resolv "$i" && echo fi [ $? = 0 -a "$retval" = 1 ] && retval=0 done Modified: head/sbin/resolvconf/Makefile ============================================================================== --- head/sbin/resolvconf/Makefile Mon Jan 30 15:20:13 2017 (r312991) +++ head/sbin/resolvconf/Makefile Mon Jan 30 16:32:53 2017 (r312992) @@ -20,20 +20,16 @@ SBINDIR= /sbin # We don't assume to restart the services in /sbin. So, though # our service(8) is in /usr/sbin, we can use it, here. -CMD1_WITH_ARG= \1 onestatus >/dev/null 2>\&1 -CMD2_WITH_ARG= \1 restart -RESTARTCMD_WITH_ARG= /usr/sbin/service ${CMD1_WITH_ARG} \&\& /usr/sbin/service ${CMD2_WITH_ARG} -CMD1= \\$$1 onestatus >/dev/null 2>\&1 -CMD2= \\$$1 restart -RESTARTCMD= "/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}" +CMD1= \1 onestatus >/dev/null 2>\&1 +CMD2= \1 restart +RESTARTCMD= /usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2} .for f in ${SCRIPTS} ${FILES} ${MAN} ${f}: ${f}.in sed -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \ -e 's:@LIBEXECDIR@:${FILESDIR}:g' \ -e 's:@VARDIR@:${VARDIR}:g' \ - -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD_WITH_ARG}:g' \ - -e 's:@RESTARTCMD@:${RESTARTCMD}:g' \ + -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \ -e 's:@RCDIR@:${RCDIR}:g' \ -e 's:@SBINDIR@:${SBINDIR}:g' \ -e 's: vpn : ng[0-9]*&:g' \ From owner-svn-src-all@freebsd.org Mon Jan 30 18:06:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 818CDCC7D27; Mon, 30 Jan 2017 18:06:45 +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 60E0F130C; Mon, 30 Jan 2017 18:06:45 +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 8FDBA10A791; Mon, 30 Jan 2017 13:06:43 -0500 (EST) From: John Baldwin To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Matthew Macy Subject: Re: svn commit: r312755 - head/sys/net Date: Mon, 30 Jan 2017 10:06:36 -0800 Message-ID: <212260342.t54IaOFj3v@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201701251437.v0PEb5D7047773@repo.freebsd.org> <6817684.C985jk9qCN@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 30 Jan 2017 13:06:43 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 18:06:45 -0000 On Monday, January 30, 2017 09:18:56 AM Sean Bruno wrote: > > On 01/27/17 12:28, John Baldwin wrote: > > On Wednesday, January 25, 2017 02:37:05 PM Sean Bruno wrote: > >> Author: sbruno > >> Date: Wed Jan 25 14:37:05 2017 > >> New Revision: 312755 > >> URL: https://svnweb.freebsd.org/changeset/base/312755 > >> > >> Log: > >> Add error checking to the pci_find_cap(, PCIY_MSIX,) call that is returns > >> success and a good value. Only then try to use it and set the MSIX_ENABLE > >> bit. > >> > >> With the current em(4) driver we have observed failures in this case in a > >> specific environment when pci_find_cap() would not return the assumed > >> value, which meant we ended up writing to PCI register 2 (PCI_DEVICE_ID) > >> which is read-only. > > > > Why is this writing directly to the MSIX registers at all? pci_alloc_msix() > > etc. handle those registers for all other drivers and proper suspend/resume > > depends on drivers using the existing PCI API for managing MSI and MSI-X. > > > > The comment above this code block explains what's up. Basically, > virtualized environments are sometimes "lazy" about correct register setup. Can you provide more details here? We already deploy workarounds for specific versions of Xen that emulate MSI-X incorrectly, though for Xen your change actually makes things worse (older versions of Xen don't "see" updates to the MSI-X table while MSI-X is enabled). However, you are still enabling MSI-X while there is uninitialized junk in the table meaning that if the device asserted an interrupt it could trigger a panic. If there are bugs with hypervisors, we need to work around them in the base PCI code as we have done with the Xen workarounds. They are not going to be e1000-specific (or even NIC-specific), so iflib is the wrong place to handle them. > If MSIX caps aren't set, try to enable them. If that fails, assume MSI. Enabling MSI-X with an uninitialized table is not safe. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jan 30 18:35:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 069F5CC8456; Mon, 30 Jan 2017 18:35: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 CA40936E; Mon, 30 Jan 2017 18:35: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 v0UIZOcB005212; Mon, 30 Jan 2017 18:35:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UIZOhO005211; Mon, 30 Jan 2017 18:35:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701301835.v0UIZOhO005211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 30 Jan 2017 18:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312993 - head/contrib/llvm/lib/Transforms/Scalar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 18:35:26 -0000 Author: dim Date: Mon Jan 30 18:35:24 2017 New Revision: 312993 URL: https://svnweb.freebsd.org/changeset/base/312993 Log: Pull in r279454 from upstream llvm trunk (by James Molloy): [SROA] Remove incorrect assertion Confirmed with aprantl, this assertion is incorrect - code can get here (for example 80-bit FP types) and if it does it's benign. This is exposed by a completely unrelated patch of mine, so stop the compiler falling over. Original differential: http://reviews.llvm.org/D16187 aprantl's advice to remove assertion: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382129.html This should fix assertions when building the math/opensolaris-libm port. Reported by: marino MFC after: 3 days Modified: head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Modified: head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp ============================================================================== --- head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Mon Jan 30 16:32:53 2017 (r312992) +++ head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Mon Jan 30 18:35:24 2017 (r312993) @@ -4040,9 +4040,6 @@ bool SROA::splitAlloca(AllocaInst &AI, A Size = std::min(Size, AbsEnd - Start); } PieceExpr = DIB.createBitPieceExpression(Start, Size); - } else { - assert(Pieces.size() == 1 && - "partition is as large as original alloca"); } // Remove any existing dbg.declare intrinsic describing the same alloca. From owner-svn-src-all@freebsd.org Mon Jan 30 18:51:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0955BCC88DF; Mon, 30 Jan 2017 18:51:45 +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 D8227F9A; Mon, 30 Jan 2017 18:51:44 +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 v0UIphA0012233; Mon, 30 Jan 2017 18:51:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UIph0M012232; Mon, 30 Jan 2017 18:51:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701301851.v0UIph0M012232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 30 Jan 2017 18:51:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312994 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 18:51:45 -0000 Author: markj Date: Mon Jan 30 18:51:43 2017 New Revision: 312994 URL: https://svnweb.freebsd.org/changeset/base/312994 Log: Avoid page lookups in the top-level object in vm_object_madvise(). We can iterate over consecutive resident pages in the top-level object using the object's page list rather than by performing lookups in the object radix tree. This extends one of the optimizations in r312208 to the case where a shadow chain is present. Suggested by: alc Reviewed by: alc, kib (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9282 Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Mon Jan 30 18:35:24 2017 (r312993) +++ head/sys/vm/vm_object.c Mon Jan 30 18:51:43 2017 (r312994) @@ -1075,6 +1075,33 @@ vm_object_sync(vm_object_t object, vm_oo } /* + * Determine whether the given advice can be applied to the object. Advice is + * not applied to unmanaged pages since they never belong to page queues, and + * since MADV_FREE is destructive, it can apply only to anonymous pages that + * have been mapped at most once. + */ +static bool +vm_object_advice_applies(vm_object_t object, int advice) +{ + + if ((object->flags & OBJ_UNMANAGED) != 0) + return (false); + if (advice != MADV_FREE) + return (true); + return ((object->type == OBJT_DEFAULT || object->type == OBJT_SWAP) && + (object->flags & OBJ_ONEMAPPING) != 0); +} + +static void +vm_object_madvise_freespace(vm_object_t object, int advice, vm_pindex_t pindex, + vm_size_t size) +{ + + if (advice == MADV_FREE && object->type == OBJT_SWAP) + swap_pager_freespace(object, pindex, size); +} + +/* * vm_object_madvise: * * Implements the madvise function at the object/page level. @@ -1101,100 +1128,102 @@ vm_object_madvise(vm_object_t object, vm { vm_pindex_t tpindex; vm_object_t backing_object, tobject; - vm_page_t m; + vm_page_t m, tm; if (object == NULL) return; - VM_OBJECT_WLOCK(object); - for (m = NULL; pindex < end; pindex++) { relookup: + VM_OBJECT_WLOCK(object); + if (!vm_object_advice_applies(object, advice)) { + VM_OBJECT_WUNLOCK(object); + return; + } + for (m = vm_page_find_least(object, pindex); pindex < end; pindex++) { tobject = object; - tpindex = pindex; -shadowlookup: - /* - * MADV_FREE only operates on OBJT_DEFAULT or OBJT_SWAP pages - * and those pages must be OBJ_ONEMAPPING. - */ - if (advice == MADV_FREE) { - if ((tobject->type != OBJT_DEFAULT && - tobject->type != OBJT_SWAP) || - (tobject->flags & OBJ_ONEMAPPING) == 0) { - goto unlock_tobject; - } - } else if ((tobject->flags & OBJ_UNMANAGED) != 0) - goto unlock_tobject; /* - * In the common case where the object has no backing object, we - * can avoid performing lookups at each pindex. In either case, - * when applying MADV_FREE we take care to release any swap - * space used to store non-resident pages. + * If the next page isn't resident in the top-level object, we + * need to search the shadow chain. When applying MADV_FREE, we + * take care to release any swap space used to store + * non-resident pages. */ - if (object->backing_object == NULL) { - m = (m != NULL) ? TAILQ_NEXT(m, listq) : - vm_page_find_least(object, pindex); - tpindex = (m != NULL && m->pindex < end) ? - m->pindex : end; - if (advice == MADV_FREE && object->type == OBJT_SWAP && - tpindex > pindex) - swap_pager_freespace(object, pindex, - tpindex - pindex); - if ((pindex = tpindex) == end) - break; - } else if ((m = vm_page_lookup(tobject, tpindex)) == NULL) { - if (advice == MADV_FREE && tobject->type == OBJT_SWAP) - swap_pager_freespace(tobject, tpindex, 1); + if (m == NULL || pindex < m->pindex) { /* - * Prepare to search the next object in the chain. + * Optimize a common case: if the top-level object has + * no backing object, we can skip over the non-resident + * range in constant time. */ - backing_object = tobject->backing_object; - if (backing_object == NULL) - goto unlock_tobject; - VM_OBJECT_WLOCK(backing_object); - tpindex += OFF_TO_IDX(tobject->backing_object_offset); - if (tobject != object) - VM_OBJECT_WUNLOCK(tobject); - tobject = backing_object; - goto shadowlookup; + if (object->backing_object == NULL) { + tpindex = (m != NULL && m->pindex < end) ? + m->pindex : end; + vm_object_madvise_freespace(object, advice, + pindex, tpindex - pindex); + if ((pindex = tpindex) == end) + break; + goto next_page; + } + + tpindex = pindex; + do { + vm_object_madvise_freespace(tobject, advice, + tpindex, 1); + /* + * Prepare to search the next object in the + * chain. + */ + backing_object = tobject->backing_object; + if (backing_object == NULL) + goto next_pindex; + VM_OBJECT_WLOCK(backing_object); + tpindex += + OFF_TO_IDX(tobject->backing_object_offset); + if (tobject != object) + VM_OBJECT_WUNLOCK(tobject); + tobject = backing_object; + if (!vm_object_advice_applies(tobject, advice)) + goto next_pindex; + } while ((tm = vm_page_lookup(tobject, tpindex)) == + NULL); + } else { +next_page: + tm = m; + m = TAILQ_NEXT(m, listq); } /* * If the page is not in a normal state, skip it. */ - if (m->valid != VM_PAGE_BITS_ALL) - goto unlock_tobject; - vm_page_lock(m); - if (m->hold_count != 0 || m->wire_count != 0) { - vm_page_unlock(m); - goto unlock_tobject; - } - KASSERT((m->flags & PG_FICTITIOUS) == 0, - ("vm_object_madvise: page %p is fictitious", m)); - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("vm_object_madvise: page %p is not managed", m)); - if (vm_page_busied(m)) { + if (tm->valid != VM_PAGE_BITS_ALL) + goto next_pindex; + vm_page_lock(tm); + if (tm->hold_count != 0 || tm->wire_count != 0) { + vm_page_unlock(tm); + goto next_pindex; + } + KASSERT((tm->flags & PG_FICTITIOUS) == 0, + ("vm_object_madvise: page %p is fictitious", tm)); + KASSERT((tm->oflags & VPO_UNMANAGED) == 0, + ("vm_object_madvise: page %p is not managed", tm)); + if (vm_page_busied(tm)) { + if (object != tobject) + VM_OBJECT_WUNLOCK(tobject); + VM_OBJECT_WUNLOCK(object); if (advice == MADV_WILLNEED) { /* * Reference the page before unlocking and * sleeping so that the page daemon is less - * likely to reclaim it. + * likely to reclaim it. */ - vm_page_aflag_set(m, PGA_REFERENCED); + vm_page_aflag_set(tm, PGA_REFERENCED); } - if (object != tobject) - VM_OBJECT_WUNLOCK(object); - VM_OBJECT_WUNLOCK(tobject); - vm_page_busy_sleep(m, "madvpo", false); - m = NULL; - VM_OBJECT_WLOCK(object); + vm_page_busy_sleep(tm, "madvpo", false); goto relookup; } - vm_page_advise(m, advice); - vm_page_unlock(m); - if (advice == MADV_FREE && tobject->type == OBJT_SWAP) - swap_pager_freespace(tobject, tpindex, 1); -unlock_tobject: + vm_page_advise(tm, advice); + vm_page_unlock(tm); + vm_object_madvise_freespace(tobject, advice, tm->pindex, 1); +next_pindex: if (tobject != object) VM_OBJECT_WUNLOCK(tobject); } From owner-svn-src-all@freebsd.org Mon Jan 30 19:49:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68C03CC7BEA; Mon, 30 Jan 2017 19:49:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3824211E9; Mon, 30 Jan 2017 19:49:09 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UJn89C034347; Mon, 30 Jan 2017 19:49:08 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UJn8jL034346; Mon, 30 Jan 2017 19:49:08 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701301949.v0UJn8jL034346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 30 Jan 2017 19:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312995 - head/sys/dev/mpr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 19:49:09 -0000 Author: asomers Date: Mon Jan 30 19:49:08 2017 New Revision: 312995 URL: https://svnweb.freebsd.org/changeset/base/312995 Log: Initialize a stack variable in mprsas_get_sas_address_for_sata_disk Thought it's difficult to reproduce, I think this variable was responsible for a use-after-free panic when a SATA disk timed out responding to a SATA identify command during boot. Submitted by: slm Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9364 Modified: head/sys/dev/mpr/mpr_sas_lsi.c Modified: head/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- head/sys/dev/mpr/mpr_sas_lsi.c Mon Jan 30 18:51:43 2017 (r312994) +++ head/sys/dev/mpr/mpr_sas_lsi.c Mon Jan 30 19:49:08 2017 (r312995) @@ -911,6 +911,7 @@ mprsas_get_sas_address_for_sata_disk(str u8 sas_status; memset(&ata_identify, 0, sizeof(ata_identify)); + memset(&mpi_reply, 0, sizeof(mpi_reply)); try_count = 0; do { rc = mprsas_get_sata_identify(sc, handle, &mpi_reply, From owner-svn-src-all@freebsd.org Mon Jan 30 21:06:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9EB1CC8CB6; Mon, 30 Jan 2017 21:06:09 +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 483CC1E78; Mon, 30 Jan 2017 21:06:09 +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 v0UL68OM066909; Mon, 30 Jan 2017 21:06:08 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UL67k1066897; Mon, 30 Jan 2017 21:06:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701302106.v0UL67k1066897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 30 Jan 2017 21:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312996 - in vendor/NetBSD/libedit: 2016-02-27 dist dist/TEST dist/readline X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 21:06:09 -0000 Author: pfg Date: Mon Jan 30 21:06:07 2017 New Revision: 312996 URL: https://svnweb.freebsd.org/changeset/base/312996 Log: Import libedit 2016-02-27 This basically reverts r296500: there are many changes in the latest version and this intermediate step lets us save all the work done for the previous update. Obtained from: NetBSD Added: vendor/NetBSD/libedit/2016-02-27/ - copied from r296499, vendor/NetBSD/libedit/2016-02-27/ Modified: vendor/NetBSD/libedit/dist/Makefile vendor/NetBSD/libedit/dist/TEST/Makefile vendor/NetBSD/libedit/dist/TEST/rl1.c vendor/NetBSD/libedit/dist/TEST/tc1.c vendor/NetBSD/libedit/dist/TEST/wtc1.c vendor/NetBSD/libedit/dist/chared.c vendor/NetBSD/libedit/dist/chared.h vendor/NetBSD/libedit/dist/chartype.c vendor/NetBSD/libedit/dist/chartype.h vendor/NetBSD/libedit/dist/common.c vendor/NetBSD/libedit/dist/config.h vendor/NetBSD/libedit/dist/editline.3 vendor/NetBSD/libedit/dist/el.c vendor/NetBSD/libedit/dist/el.h vendor/NetBSD/libedit/dist/eln.c vendor/NetBSD/libedit/dist/emacs.c vendor/NetBSD/libedit/dist/filecomplete.c vendor/NetBSD/libedit/dist/hist.c vendor/NetBSD/libedit/dist/hist.h vendor/NetBSD/libedit/dist/histedit.h vendor/NetBSD/libedit/dist/history.c vendor/NetBSD/libedit/dist/keymacro.c vendor/NetBSD/libedit/dist/makelist vendor/NetBSD/libedit/dist/map.c vendor/NetBSD/libedit/dist/parse.c vendor/NetBSD/libedit/dist/prompt.c vendor/NetBSD/libedit/dist/prompt.h vendor/NetBSD/libedit/dist/read.c vendor/NetBSD/libedit/dist/read.h vendor/NetBSD/libedit/dist/readline.c vendor/NetBSD/libedit/dist/readline/Makefile vendor/NetBSD/libedit/dist/readline/readline.h vendor/NetBSD/libedit/dist/refresh.c vendor/NetBSD/libedit/dist/refresh.h vendor/NetBSD/libedit/dist/search.c vendor/NetBSD/libedit/dist/search.h vendor/NetBSD/libedit/dist/sig.c vendor/NetBSD/libedit/dist/sig.h vendor/NetBSD/libedit/dist/sys.h vendor/NetBSD/libedit/dist/terminal.c vendor/NetBSD/libedit/dist/terminal.h vendor/NetBSD/libedit/dist/tokenizer.c vendor/NetBSD/libedit/dist/tty.c vendor/NetBSD/libedit/dist/tty.h vendor/NetBSD/libedit/dist/vi.c Modified: vendor/NetBSD/libedit/dist/Makefile ============================================================================== --- vendor/NetBSD/libedit/dist/Makefile Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/Makefile Mon Jan 30 21:06:07 2017 (r312996) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.53 2015/01/29 20:30:02 joerg Exp $ +# $NetBSD: Makefile,v 1.55 2016/02/24 14:25:38 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -15,7 +15,7 @@ COPTS+= -Wunused-parameter CWARNFLAGS.gcc+= -Wconversion CWARNFLAGS.clang+= -Wno-cast-qual -OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \ +OSRCS= chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \ hist.c keymacro.c map.c chartype.c \ parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c @@ -37,7 +37,6 @@ MLINKS= editline.3 el_init.3 editline.3 SRCS= editline.c readline.c tokenizer.c history.c .if ${WIDECHAR} == "yes" -OSRCS += eln.c SRCS += tokenizern.c historyn.c CLEANFILES+=tokenizern.c.tmp tokenizern.c historyn.c.tmp historyn.c CPPFLAGS+=-DWIDECHAR @@ -52,12 +51,12 @@ CLEANFILES+=editline.c CLEANFILES+=common.h.tmp editline.c.tmp emacs.h.tmp fcns.c.tmp fcns.h.tmp CLEANFILES+=help.c.tmp help.h.tmp vi.h.tmp tc1.o tc1 CLEANFILES+=tokenizern.c.tmp tokenizern.c tokenizerw.c.tmp tokenizerw.c -CPPFLAGS+=-I. -I${LIBEDITDIR} +CPPFLAGS+=-I. -I${LIBEDITDIR} CPPFLAGS+=-I. -I${.CURDIR} CPPFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH CPPFLAGS+=#-DDEBUG_PASTE -DDEBUG_EDIT -AHDR=vi.h emacs.h common.h +AHDR=vi.h emacs.h common.h ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c DPSRCS+= ${AHDR} fcns.h help.h fcns.c help.c @@ -120,7 +119,7 @@ historyn.c: makelist Makefile tc1.o: ${LIBEDITDIR}/TEST/tc1.c -tc1: libedit.a tc1.o +tc1: libedit.a tc1.o ${_MKTARGET_LINK} ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermlib Modified: vendor/NetBSD/libedit/dist/TEST/Makefile ============================================================================== --- vendor/NetBSD/libedit/dist/TEST/Makefile Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/TEST/Makefile Mon Jan 30 21:06:07 2017 (r312996) @@ -1,4 +1,6 @@ -# $NetBSD: Makefile,v 1.5 2010/02/03 15:34:43 roy Exp $ +# $NetBSD: Makefile,v 1.6 2016/02/15 21:38:07 christos Exp $ + +WIDECHAR ?= yes NOMAN=1 PROG=wtc1 @@ -6,6 +8,10 @@ CPPFLAGS=-I${.CURDIR}/.. LDADD+=-ledit -ltermlib DPADD+=${LIBEDIT} ${LIBTERMLIB} +.if "${WIDECHAR}" == "yes" +CPPFLAGS+=-DWIDECHAR +.endif + .ifdef DEBUG CPPFLAGS+=-DDEBUG .endif Modified: vendor/NetBSD/libedit/dist/TEST/rl1.c ============================================================================== --- vendor/NetBSD/libedit/dist/TEST/rl1.c Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/TEST/rl1.c Mon Jan 30 21:06:07 2017 (r312996) @@ -1,4 +1,4 @@ -/* $NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $ */ +/* $NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -15,6 +15,13 @@ * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -31,7 +38,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $"); +__RCSID("$NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $"); #endif /* not lint */ /* Modified: vendor/NetBSD/libedit/dist/TEST/tc1.c ============================================================================== --- vendor/NetBSD/libedit/dist/TEST/tc1.c Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/TEST/tc1.c Mon Jan 30 21:06:07 2017 (r312996) @@ -1,4 +1,4 @@ -/* $NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $ */ +/* $NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -42,22 +42,22 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)test.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $"); +__RCSID("$NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $"); #endif #endif /* not lint && not SCCSID */ /* * test.c: A little test program */ -#include -#include -#include #include #include -#include -#include #include #include +#include +#include +#include +#include +#include #include "histedit.h" @@ -157,7 +157,7 @@ main(int argc, char *argv[]) /* Add a user-defined function */ el_set(el, EL_ADDFN, "ed-complete", "Complete argument", complete); - /* Bind tab to it */ + /* Bind tab to it */ el_set(el, EL_BIND, "^I", "ed-complete", NULL); /* Modified: vendor/NetBSD/libedit/dist/TEST/wtc1.c ============================================================================== --- vendor/NetBSD/libedit/dist/TEST/wtc1.c Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/TEST/wtc1.c Mon Jan 30 21:06:07 2017 (r312996) @@ -1,14 +1,14 @@ -#include -#include -#include #include -#include #include -#include -#include #include +#include #include #include +#include +#include +#include +#include +#include #include "../histedit.h" Modified: vendor/NetBSD/libedit/dist/chared.c ============================================================================== --- vendor/NetBSD/libedit/dist/chared.c Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/chared.c Mon Jan 30 21:06:07 2017 (r312996) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $ */ +/* $NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,15 +37,19 @@ #if 0 static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $"); +__RCSID("$NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $"); #endif #endif /* not lint && not SCCSID */ /* * chared.c: Character editor utilities */ +#include #include +#include + #include "el.h" +#include "common.h" private void ch__clearmacro (EditLine *); @@ -199,7 +203,7 @@ c_delbefore1(EditLine *el) * Return if p is part of a word according to emacs */ protected int -ce__isword(Int p) +ce__isword(wint_t p) { return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL; } @@ -209,7 +213,7 @@ ce__isword(Int p) * Return if p is part of a word according to vi */ protected int -cv__isword(Int p) +cv__isword(wint_t p) { if (Isalnum(p) || p == '_') return 1; @@ -223,7 +227,7 @@ cv__isword(Int p) * Return if p is part of a big word according to vi */ protected int -cv__isWord(Int p) +cv__isWord(wint_t p) { return !Isspace(p); } @@ -233,7 +237,7 @@ cv__isWord(Int p) * Find the previous word */ protected Char * -c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) +c__prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) { p--; @@ -257,7 +261,7 @@ c__prev_word(Char *p, Char *low, int n, * Find the next word */ protected Char * -c__next_word(Char *p, Char *high, int n, int (*wtest)(Int)) +c__next_word(Char *p, Char *high, int n, int (*wtest)(wint_t)) { while (n--) { while ((p < high) && !(*wtest)(*p)) @@ -275,7 +279,7 @@ c__next_word(Char *p, Char *high, int n, * Find the next word vi style */ protected Char * -cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int)) +cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(wint_t)) { int test; @@ -304,7 +308,7 @@ cv_next_word(EditLine *el, Char *p, Char * Find the previous word vi style */ protected Char * -cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) +cv_prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) { int test; @@ -368,7 +372,7 @@ cv_delfini(EditLine *el) * Go to the end of this word according to vi */ protected Char * -cv__endword(Char *p, Char *high, int n, int (*wtest)(Int)) +cv__endword(Char *p, Char *high, int n, int (*wtest)(wint_t)) { int test; @@ -522,7 +526,7 @@ ch_enlargebufs(EditLine *el, size_t addl /* zero the newly added memory, leave old data in */ (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); - + oldbuf = el->el_line.buffer; el->el_line.buffer = newbuffer; @@ -571,7 +575,7 @@ ch_enlargebufs(EditLine *el, size_t addl el->el_chared.c_redo.lim = newbuffer + (el->el_chared.c_redo.lim - el->el_chared.c_redo.buf); el->el_chared.c_redo.buf = newbuffer; - + if (!hist_enlargebuf(el, sz, newsz)) return 0; @@ -671,9 +675,9 @@ out: protected int c_gets(EditLine *el, Char *buf, const Char *prompt) { - Char ch; + wchar_t wch; ssize_t len; - Char *cp = el->el_line.buffer; + Char *cp = el->el_line.buffer, ch; if (prompt) { len = (ssize_t)Strlen(prompt); @@ -688,26 +692,28 @@ c_gets(EditLine *el, Char *buf, const Ch el->el_line.lastchar = cp + 1; re_refresh(el); - if (FUN(el,getc)(el, &ch) != 1) { + if (el_wgetc(el, &wch) != 1) { ed_end_of_file(el, 0); len = -1; break; } + ch = (Char)wch; switch (ch) { - case 0010: /* Delete and backspace */ + case L'\b': /* Delete and backspace */ case 0177: if (len == 0) { len = -1; break; } + len--; cp--; continue; case 0033: /* ESC */ - case '\r': /* Newline */ - case '\n': + case L'\r': /* Newline */ + case L'\n': buf[len] = ch; break; Modified: vendor/NetBSD/libedit/dist/chared.h ============================================================================== --- vendor/NetBSD/libedit/dist/chared.h Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/chared.h Mon Jan 30 21:06:07 2017 (r312996) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.h,v 1.22 2014/06/18 18:12:28 christos Exp $ */ +/* $NetBSD: chared.h,v 1.27 2016/02/16 22:53:14 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -40,11 +40,6 @@ #ifndef _h_el_chared #define _h_el_chared -#include -#include - -#include "histedit.h" - #define EL_MAXMACRO 10 /* @@ -139,24 +134,18 @@ typedef struct el_chared_t { #define MODE_REPLACE 1 #define MODE_REPLACE_1 2 -#include "common.h" -#include "vi.h" -#include "emacs.h" -#include "search.h" -#include "fcns.h" - -protected int cv__isword(Int); -protected int cv__isWord(Int); +protected int cv__isword(wint_t); +protected int cv__isWord(wint_t); protected void cv_delfini(EditLine *); -protected Char *cv__endword(Char *, Char *, int, int (*)(Int)); -protected int ce__isword(Int); +protected Char *cv__endword(Char *, Char *, int, int (*)(wint_t)); +protected int ce__isword(wint_t); protected void cv_undo(EditLine *); protected void cv_yank(EditLine *, const Char *, int); -protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int)); -protected Char *cv_prev_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__next_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__prev_word(Char *, Char *, int, int (*)(Int)); +protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(wint_t)); +protected Char *cv_prev_word(Char *, Char *, int, int (*)(wint_t)); +protected Char *c__next_word(Char *, Char *, int, int (*)(wint_t)); +protected Char *c__prev_word(Char *, Char *, int, int (*)(wint_t)); protected void c_insert(EditLine *, int); protected void c_delbefore(EditLine *, int); protected void c_delbefore1(EditLine *); Modified: vendor/NetBSD/libedit/dist/chartype.c ============================================================================== --- vendor/NetBSD/libedit/dist/chartype.c Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/chartype.c Mon Jan 30 21:06:07 2017 (r312996) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $ */ +/* $NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -12,13 +12,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -38,10 +31,14 @@ */ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $"); +__RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $"); #endif /* not lint && not SCCSID */ -#include "el.h" + +#include #include +#include + +#include "el.h" #define CT_BUFSIZ ((size_t)1024) @@ -72,7 +69,7 @@ ct_conv_wbuff_resize(ct_buffer_t *conv, { void *p; - if (wsize <= conv->wsize) + if (wsize <= conv->wsize) return 0; conv->wsize = wsize; @@ -210,6 +207,28 @@ ct_encode_char(char *dst, size_t len, Ch } return l; } + +size_t +ct_mbrtowc(wchar_t *wc, const char *s, size_t n) +{ + mbstate_t mbs; + /* This only works because UTF-8 is stateless */ + memset(&mbs, 0, sizeof(mbs)); + return mbrtowc(wc, s, n, &mbs); +} + +#else + +size_t +ct_mbrtowc(wchar_t *wc, const char *s, size_t n) + if (s == NULL) + return 0; + if (n == 0) + return (size_t)-2; + if (wc != NULL) + *wc = *s; + return *s != '\0'; +} #endif protected const Char * @@ -333,7 +352,7 @@ ct_visual_char(Char *dst, size_t len, Ch return c > 0xffff ? 8 : 7; #else *dst++ = '\\'; -#define tooctaldigit(v) ((v) + '0') +#define tooctaldigit(v) (Char)((v) + '0') *dst++ = tooctaldigit(((unsigned int) c >> 6) & 0x7); *dst++ = tooctaldigit(((unsigned int) c >> 3) & 0x7); *dst++ = tooctaldigit(((unsigned int) c ) & 0x7); Modified: vendor/NetBSD/libedit/dist/chartype.h ============================================================================== --- vendor/NetBSD/libedit/dist/chartype.h Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/chartype.h Mon Jan 30 21:06:07 2017 (r312996) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.h,v 1.15 2015/05/17 13:14:41 christos Exp $ */ +/* $NetBSD: chartype.h,v 1.23 2016/02/24 17:20:01 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -37,7 +37,6 @@ #define _h_chartype_f - #ifdef WIDECHAR /* Ideally we should also test the value of the define to see if it @@ -60,21 +59,18 @@ #warning Build environment does not support non-BMP characters #endif -#define ct_mbtowc mbtowc -#define ct_mbtowc_reset mbtowc(0,0,(size_t)0) +#define ct_wctob wctob #define ct_wctomb wctomb #define ct_wctomb_reset wctomb(0,0) #define ct_wcstombs wcstombs #define ct_mbstowcs mbstowcs #define Char wchar_t -#define Int wint_t #define FUN(prefix,rest) prefix ## _w ## rest #define FUNW(type) type ## _w #define TYPE(type) type ## W -#define FCHAR "%lc" #define FSTR "%ls" -#define STR(x) L ## x +#define STR(x) L ## x #define UC(c) c #define Isalpha(x) iswalpha(x) #define Isalnum(x) iswalnum(x) @@ -115,21 +111,18 @@ Width(wchar_t c) #else /* NARROW */ -#define ct_mbtowc error -#define ct_mbtowc_reset +#define ct_wctob(w) ((int)(w)) #define ct_wctomb error -#define ct_wctomb_reset +#define ct_wctomb_reset #define ct_wcstombs(a, b, c) (strncpy(a, b, c), strlen(a)) #define ct_mbstowcs(a, b, c) (strncpy(a, b, c), strlen(a)) #define Char char -#define Int int #define FUN(prefix,rest) prefix ## _ ## rest #define FUNW(type) type #define TYPE(type) type -#define FCHAR "%c" #define FSTR "%s" -#define STR(x) x +#define STR(x) x #define UC(c) (unsigned char)(c) #define Isalpha(x) isalpha((unsigned char)x) @@ -218,7 +211,7 @@ protected size_t ct_enc_width(Char); #define VISUAL_WIDTH_MAX ((size_t)8) /* The terminal is thought of in terms of X columns by Y lines. In the cases - * where a wide character takes up more than one column, the adjacent + * where a wide character takes up more than one column, the adjacent * occupied column entries will contain this faux character. */ #define MB_FILL_CHAR ((Char)-1) @@ -250,5 +243,7 @@ protected const Char *ct_visual_string(c protected int ct_chr_class(Char c); #endif +size_t ct_mbrtowc(wchar_t *, const char *, size_t); + #endif /* _chartype_f */ Modified: vendor/NetBSD/libedit/dist/common.c ============================================================================== --- vendor/NetBSD/libedit/dist/common.c Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/common.c Mon Jan 30 21:06:07 2017 (r312996) @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $ */ +/* $NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,14 +37,20 @@ #if 0 static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $"); +__RCSID("$NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $"); #endif #endif /* not lint && not SCCSID */ /* * common.c: Common Editor functions */ +#include +#include + #include "el.h" +#include "common.h" +#include "parse.h" +#include "vi.h" /* ed_end_of_file(): * Indicate end of file @@ -52,7 +58,7 @@ __RCSID("$NetBSD: common.c,v 1.29 2012/0 */ protected el_action_t /*ARGSUSED*/ -ed_end_of_file(EditLine *el, Int c __attribute__((__unused__))) +ed_end_of_file(EditLine *el, wint_t c __attribute__((__unused__))) { re_goto_bottom(el); @@ -66,7 +72,7 @@ ed_end_of_file(EditLine *el, Int c __att * Insert a character [bound to all insert keys] */ protected el_action_t -ed_insert(EditLine *el, Int c) +ed_insert(EditLine *el, wint_t c) { int count = el->el_state.argument; @@ -85,14 +91,14 @@ ed_insert(EditLine *el, Int c) || el->el_line.cursor >= el->el_line.lastchar) c_insert(el, 1); - *el->el_line.cursor++ = c; + *el->el_line.cursor++ = (Char)c; re_fastaddc(el); /* fast refresh for one char. */ } else { if (el->el_state.inputmode != MODE_REPLACE_1) c_insert(el, el->el_state.argument); while (count-- && el->el_line.cursor < el->el_line.lastchar) - *el->el_line.cursor++ = c; + *el->el_line.cursor++ = (Char)c; re_refresh(el); } @@ -109,7 +115,7 @@ ed_insert(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_word(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp, *p, *kp; @@ -137,7 +143,7 @@ ed_delete_prev_word(EditLine *el, Int c */ protected el_action_t /*ARGSUSED*/ -ed_delete_next_char(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { #ifdef DEBUG_EDIT #define EL el->el_line @@ -184,7 +190,7 @@ ed_delete_next_char(EditLine *el, Int c */ protected el_action_t /*ARGSUSED*/ -ed_kill_line(EditLine *el, Int c __attribute__((__unused__))) +ed_kill_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *kp, *cp; @@ -205,7 +211,7 @@ ed_kill_line(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_move_to_end(EditLine *el, Int c __attribute__((__unused__))) +ed_move_to_end(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.lastchar; @@ -228,7 +234,7 @@ ed_move_to_end(EditLine *el, Int c __att */ protected el_action_t /*ARGSUSED*/ -ed_move_to_beg(EditLine *el, Int c __attribute__((__unused__))) +ed_move_to_beg(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.buffer; @@ -251,7 +257,7 @@ ed_move_to_beg(EditLine *el, Int c __att * [^T] [^T] */ protected el_action_t -ed_transpose_chars(EditLine *el, Int c) +ed_transpose_chars(EditLine *el, wint_t c) { if (el->el_line.cursor < el->el_line.lastchar) { @@ -264,7 +270,7 @@ ed_transpose_chars(EditLine *el, Int c) /* must have at least two chars entered */ c = el->el_line.cursor[-2]; el->el_line.cursor[-2] = el->el_line.cursor[-1]; - el->el_line.cursor[-1] = c; + el->el_line.cursor[-1] = (Char)c; return CC_REFRESH; } else return CC_ERROR; @@ -277,7 +283,7 @@ ed_transpose_chars(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_next_char(EditLine *el, Int c __attribute__((__unused__))) +ed_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { Char *lim = el->el_line.lastchar; @@ -306,7 +312,7 @@ ed_next_char(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_word(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.buffer) @@ -332,7 +338,7 @@ ed_prev_word(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_char(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor > el->el_line.buffer) { @@ -356,14 +362,12 @@ ed_prev_char(EditLine *el, Int c __attri * [^V] [^V] */ protected el_action_t -ed_quoted_insert(EditLine *el, Int c) +ed_quoted_insert(EditLine *el, wint_t c) { int num; - Char tc; tty_quotemode(el); - num = FUN(el,getc)(el, &tc); - c = tc; + num = el_wgetc(el, &c); tty_noquotemode(el); if (num == 1) return ed_insert(el, c); @@ -376,7 +380,7 @@ ed_quoted_insert(EditLine *el, Int c) * Adds to argument or enters a digit */ protected el_action_t -ed_digit(EditLine *el, Int c) +ed_digit(EditLine *el, wint_t c) { if (!Isdigit(c)) @@ -404,7 +408,7 @@ ed_digit(EditLine *el, Int c) * For ESC-n */ protected el_action_t -ed_argument_digit(EditLine *el, Int c) +ed_argument_digit(EditLine *el, wint_t c) { if (!Isdigit(c)) @@ -430,7 +434,7 @@ ed_argument_digit(EditLine *el, Int c) protected el_action_t /*ARGSUSED*/ ed_unassigned(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_ERROR; @@ -447,8 +451,8 @@ ed_unassigned(EditLine *el __attribute__ */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigint(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_sigint(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -461,8 +465,8 @@ ed_tty_sigint(EditLine *el __attribute__ */ protected el_action_t /*ARGSUSED*/ -ed_tty_dsusp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_dsusp(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -475,8 +479,8 @@ ed_tty_dsusp(EditLine *el __attribute__( */ protected el_action_t /*ARGSUSED*/ -ed_tty_flush_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_flush_output(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -489,8 +493,8 @@ ed_tty_flush_output(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigquit(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_sigquit(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -503,8 +507,8 @@ ed_tty_sigquit(EditLine *el __attribute_ */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -517,8 +521,8 @@ ed_tty_sigtstp(EditLine *el __attribute_ */ protected el_action_t /*ARGSUSED*/ -ed_tty_stop_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_stop_output(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -531,8 +535,8 @@ ed_tty_stop_output(EditLine *el __attrib */ protected el_action_t /*ARGSUSED*/ -ed_tty_start_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_start_output(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -545,7 +549,7 @@ ed_tty_start_output(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_newline(EditLine *el, Int c __attribute__((__unused__))) +ed_newline(EditLine *el, wint_t c __attribute__((__unused__))) { re_goto_bottom(el); @@ -561,7 +565,7 @@ ed_newline(EditLine *el, Int c __attribu */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor <= el->el_line.buffer) @@ -581,7 +585,7 @@ ed_delete_prev_char(EditLine *el, Int c */ protected el_action_t /*ARGSUSED*/ -ed_clear_screen(EditLine *el, Int c __attribute__((__unused__))) +ed_clear_screen(EditLine *el, wint_t c __attribute__((__unused__))) { terminal_clear_screen(el); /* clear the whole real screen */ @@ -596,8 +600,8 @@ ed_clear_screen(EditLine *el, Int c __at */ protected el_action_t /*ARGSUSED*/ -ed_redisplay(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_redisplay(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_REDISPLAY; @@ -610,7 +614,7 @@ ed_redisplay(EditLine *el __attribute__( */ protected el_action_t /*ARGSUSED*/ -ed_start_over(EditLine *el, Int c __attribute__((__unused__))) +ed_start_over(EditLine *el, wint_t c __attribute__((__unused__))) { ch_reset(el, 0); @@ -624,8 +628,8 @@ ed_start_over(EditLine *el, Int c __attr */ protected el_action_t /*ARGSUSED*/ -ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -638,7 +642,7 @@ ed_sequence_lead_in(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_history(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) { char beep = 0; int sv_event = el->el_history.eventno; @@ -658,7 +662,6 @@ ed_prev_history(EditLine *el, Int c __at if (hist_get(el) == CC_ERROR) { if (el->el_map.type == MAP_VI) { el->el_history.eventno = sv_event; - } beep = 1; /* el->el_history.eventno was fixed by first call */ @@ -676,7 +679,7 @@ ed_prev_history(EditLine *el, Int c __at */ protected el_action_t /*ARGSUSED*/ -ed_next_history(EditLine *el, Int c __attribute__((__unused__))) +ed_next_history(EditLine *el, wint_t c __attribute__((__unused__))) { el_action_t beep = CC_REFRESH, rval; @@ -703,11 +706,11 @@ ed_next_history(EditLine *el, Int c __at */ protected el_action_t /*ARGSUSED*/ -ed_search_prev_history(EditLine *el, Int c __attribute__((__unused__))) +ed_search_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) { const Char *hp; int h; - bool_t found = 0; + int found = 0; el->el_chared.c_vcmd.action = NOP; el->el_chared.c_undo.len = -1; @@ -746,7 +749,7 @@ ed_search_prev_history(EditLine *el, Int (el->el_line.lastchar - el->el_line.buffer)) || hp[el->el_line.lastchar - el->el_line.buffer]) && c_hmatch(el, hp)) { - found++; + found = 1; break; } h++; @@ -771,11 +774,11 @@ ed_search_prev_history(EditLine *el, Int */ protected el_action_t /*ARGSUSED*/ -ed_search_next_history(EditLine *el, Int c __attribute__((__unused__))) +ed_search_next_history(EditLine *el, wint_t c __attribute__((__unused__))) { const Char *hp; int h; - bool_t found = 0; + int found = 0; el->el_chared.c_vcmd.action = NOP; el->el_chared.c_undo.len = -1; @@ -825,7 +828,7 @@ ed_search_next_history(EditLine *el, Int */ protected el_action_t /*ARGSUSED*/ -ed_prev_line(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -868,7 +871,7 @@ ed_prev_line(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_next_line(EditLine *el, Int c __attribute__((__unused__))) +ed_next_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -902,7 +905,7 @@ ed_next_line(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_command(EditLine *el, Int c __attribute__((__unused__))) +ed_command(EditLine *el, wint_t c __attribute__((__unused__))) { Char tmpbuf[EL_BUFSIZ]; int tmplen; Modified: vendor/NetBSD/libedit/dist/config.h ============================================================================== --- vendor/NetBSD/libedit/dist/config.h Mon Jan 30 19:49:08 2017 (r312995) +++ vendor/NetBSD/libedit/dist/config.h Mon Jan 30 21:06:07 2017 (r312996) @@ -20,8 +20,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have the `fgetln' function. */ -#define HAVE_FGETLN 1 +/* Define to 1 if you have the `getline' function. */ +#define HAVE_GETLINE 1 /* Define to 1 if you have the `fork' function. */ #define HAVE_FORK 1 @@ -187,9 +187,6 @@ /* Define to 1 if you have the `vis' function. */ #define HAVE_VIS 1 -/* Define to 1 if you have the `wcsdup' function. */ -#define HAVE_WCSDUP 1 - /* Define to 1 if `fork' works. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jan 30 22:11:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63004CC8E39; Mon, 30 Jan 2017 22:11:56 +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 00585BF9; Mon, 30 Jan 2017 22:11:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UMBtVk097752; Mon, 30 Jan 2017 22:11:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UMBs6u097740; Mon, 30 Jan 2017 22:11:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701302211.v0UMBs6u097740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 30 Jan 2017 22:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312997 - in head/lib/libedit: . TEST edit/readline X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 22:11:56 -0000 Author: pfg Date: Mon Jan 30 22:11:53 2017 New Revision: 312997 URL: https://svnweb.freebsd.org/changeset/base/312997 Log: MFV r312996: Re-import libedit 2016-02-27 This reverts r296435: the issues related to lldb and this update appear to have been identified (in lldb). Obtained from: NetBSD Reported by: emaste MFC after: 3 weeks Modified: head/lib/libedit/Makefile head/lib/libedit/TEST/tc1.c head/lib/libedit/TEST/wtc1.c head/lib/libedit/chared.c head/lib/libedit/chared.h head/lib/libedit/chartype.c head/lib/libedit/chartype.h head/lib/libedit/common.c head/lib/libedit/config.h head/lib/libedit/edit/readline/readline.h head/lib/libedit/editline.3 head/lib/libedit/el.c head/lib/libedit/el.h head/lib/libedit/eln.c head/lib/libedit/emacs.c head/lib/libedit/filecomplete.c head/lib/libedit/hist.c head/lib/libedit/hist.h head/lib/libedit/histedit.h head/lib/libedit/history.c head/lib/libedit/keymacro.c head/lib/libedit/makelist head/lib/libedit/map.c head/lib/libedit/parse.c head/lib/libedit/prompt.c head/lib/libedit/prompt.h head/lib/libedit/read.c head/lib/libedit/read.h head/lib/libedit/readline.c head/lib/libedit/refresh.c head/lib/libedit/refresh.h head/lib/libedit/search.c head/lib/libedit/search.h head/lib/libedit/sig.c head/lib/libedit/sig.h head/lib/libedit/sys.h head/lib/libedit/terminal.c head/lib/libedit/terminal.h head/lib/libedit/tokenizer.c head/lib/libedit/tty.c head/lib/libedit/tty.h head/lib/libedit/vi.c Directory Properties: head/lib/libedit/ (props changed) head/lib/libedit/edit/readline/ (props changed) Modified: head/lib/libedit/Makefile ============================================================================== --- head/lib/libedit/Makefile Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/Makefile Mon Jan 30 22:11:53 2017 (r312997) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.37 2009/01/18 12:17:49 lukem Exp $ +# $NetBSD: Makefile,v 1.55 2016/02/24 14:25:38 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ @@ -7,7 +7,7 @@ LIB= edit SHLIB_MAJOR= 7 SHLIBDIR?= /lib -OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \ +OSRCS= chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \ hist.c keymacro.c map.c chartype.c \ parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c @@ -35,7 +35,6 @@ CLEANFILES+= common.h editline.c emacs.h INCS= histedit.h -OSRCS+= eln.c SRCS+= tokenizern.c historyn.c CLEANFILES+= tokenizern.c historyn.c CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR Modified: head/lib/libedit/TEST/tc1.c ============================================================================== --- head/lib/libedit/TEST/tc1.c Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/TEST/tc1.c Mon Jan 30 22:11:53 2017 (r312997) @@ -1,4 +1,4 @@ -/* $NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $ */ +/* $NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)test.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $"); +__RCSID("$NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $"); #endif #endif /* not lint && not SCCSID */ __FBSDID("$FreeBSD$"); @@ -50,15 +50,15 @@ __FBSDID("$FreeBSD$"); /* * test.c: A little test program */ -#include -#include -#include #include #include -#include -#include #include #include +#include +#include +#include +#include +#include #include "histedit.h" @@ -158,7 +158,7 @@ main(int argc, char *argv[]) /* Add a user-defined function */ el_set(el, EL_ADDFN, "ed-complete", "Complete argument", complete); - /* Bind tab to it */ + /* Bind tab to it */ el_set(el, EL_BIND, "^I", "ed-complete", NULL); /* Modified: head/lib/libedit/TEST/wtc1.c ============================================================================== --- head/lib/libedit/TEST/wtc1.c Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/TEST/wtc1.c Mon Jan 30 22:11:53 2017 (r312997) @@ -5,13 +5,16 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include -#include #include +#include #include #include +#include +#include +#include +#include +#include #include "../histedit.h" Modified: head/lib/libedit/chared.c ============================================================================== --- head/lib/libedit/chared.c Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/chared.c Mon Jan 30 22:11:53 2017 (r312997) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $ */ +/* $NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $"); +__RCSID("$NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -46,8 +46,12 @@ __FBSDID("$FreeBSD$"); /* * chared.c: Character editor utilities */ +#include #include +#include + #include "el.h" +#include "common.h" private void ch__clearmacro (EditLine *); @@ -201,7 +205,7 @@ c_delbefore1(EditLine *el) * Return if p is part of a word according to emacs */ protected int -ce__isword(Int p) +ce__isword(wint_t p) { return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL; } @@ -211,7 +215,7 @@ ce__isword(Int p) * Return if p is part of a word according to vi */ protected int -cv__isword(Int p) +cv__isword(wint_t p) { if (Isalnum(p) || p == '_') return 1; @@ -225,7 +229,7 @@ cv__isword(Int p) * Return if p is part of a big word according to vi */ protected int -cv__isWord(Int p) +cv__isWord(wint_t p) { return !Isspace(p); } @@ -235,7 +239,7 @@ cv__isWord(Int p) * Find the previous word */ protected Char * -c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) +c__prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) { p--; @@ -259,7 +263,7 @@ c__prev_word(Char *p, Char *low, int n, * Find the next word */ protected Char * -c__next_word(Char *p, Char *high, int n, int (*wtest)(Int)) +c__next_word(Char *p, Char *high, int n, int (*wtest)(wint_t)) { while (n--) { while ((p < high) && !(*wtest)(*p)) @@ -277,7 +281,7 @@ c__next_word(Char *p, Char *high, int n, * Find the next word vi style */ protected Char * -cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int)) +cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(wint_t)) { int test; @@ -306,7 +310,7 @@ cv_next_word(EditLine *el, Char *p, Char * Find the previous word vi style */ protected Char * -cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) +cv_prev_word(Char *p, Char *low, int n, int (*wtest)(wint_t)) { int test; @@ -370,7 +374,7 @@ cv_delfini(EditLine *el) * Go to the end of this word according to vi */ protected Char * -cv__endword(Char *p, Char *high, int n, int (*wtest)(Int)) +cv__endword(Char *p, Char *high, int n, int (*wtest)(wint_t)) { int test; @@ -524,7 +528,7 @@ ch_enlargebufs(EditLine *el, size_t addl /* zero the newly added memory, leave old data in */ (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); - + oldbuf = el->el_line.buffer; el->el_line.buffer = newbuffer; @@ -573,7 +577,7 @@ ch_enlargebufs(EditLine *el, size_t addl el->el_chared.c_redo.lim = newbuffer + (el->el_chared.c_redo.lim - el->el_chared.c_redo.buf); el->el_chared.c_redo.buf = newbuffer; - + if (!hist_enlargebuf(el, sz, newsz)) return 0; @@ -673,9 +677,9 @@ out: protected int c_gets(EditLine *el, Char *buf, const Char *prompt) { - Char ch; + wchar_t wch; ssize_t len; - Char *cp = el->el_line.buffer; + Char *cp = el->el_line.buffer, ch; if (prompt) { len = (ssize_t)Strlen(prompt); @@ -690,26 +694,28 @@ c_gets(EditLine *el, Char *buf, const Ch el->el_line.lastchar = cp + 1; re_refresh(el); - if (FUN(el,getc)(el, &ch) != 1) { + if (el_wgetc(el, &wch) != 1) { ed_end_of_file(el, 0); len = -1; break; } + ch = (Char)wch; switch (ch) { - case 0010: /* Delete and backspace */ + case L'\b': /* Delete and backspace */ case 0177: if (len == 0) { len = -1; break; } + len--; cp--; continue; case 0033: /* ESC */ - case '\r': /* Newline */ - case '\n': + case L'\r': /* Newline */ + case L'\n': buf[len] = ch; break; Modified: head/lib/libedit/chared.h ============================================================================== --- head/lib/libedit/chared.h Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/chared.h Mon Jan 30 22:11:53 2017 (r312997) @@ -1,4 +1,4 @@ -/* $NetBSD: chared.h,v 1.22 2014/06/18 18:12:28 christos Exp $ */ +/* $NetBSD: chared.h,v 1.27 2016/02/16 22:53:14 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -41,11 +41,6 @@ #ifndef _h_el_chared #define _h_el_chared -#include -#include - -#include "histedit.h" - #define EL_MAXMACRO 10 /* @@ -140,24 +135,18 @@ typedef struct el_chared_t { #define MODE_REPLACE 1 #define MODE_REPLACE_1 2 -#include "common.h" -#include "vi.h" -#include "emacs.h" -#include "search.h" -#include "fcns.h" - -protected int cv__isword(Int); -protected int cv__isWord(Int); +protected int cv__isword(wint_t); +protected int cv__isWord(wint_t); protected void cv_delfini(EditLine *); -protected Char *cv__endword(Char *, Char *, int, int (*)(Int)); -protected int ce__isword(Int); +protected Char *cv__endword(Char *, Char *, int, int (*)(wint_t)); +protected int ce__isword(wint_t); protected void cv_undo(EditLine *); protected void cv_yank(EditLine *, const Char *, int); -protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int)); -protected Char *cv_prev_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__next_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__prev_word(Char *, Char *, int, int (*)(Int)); +protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(wint_t)); +protected Char *cv_prev_word(Char *, Char *, int, int (*)(wint_t)); +protected Char *c__next_word(Char *, Char *, int, int (*)(wint_t)); +protected Char *c__prev_word(Char *, Char *, int, int (*)(wint_t)); protected void c_insert(EditLine *, int); protected void c_delbefore(EditLine *, int); protected void c_delbefore1(EditLine *); Modified: head/lib/libedit/chartype.c ============================================================================== --- head/lib/libedit/chartype.c Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/chartype.c Mon Jan 30 22:11:53 2017 (r312997) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $ */ +/* $NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -31,13 +31,16 @@ */ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: chartype.c,v 1.12 2015/02/22 02:16:19 christos Exp $"); +__RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:24 christos Exp $"); #endif /* not lint && not SCCSID */ #include __FBSDID("$FreeBSD$"); -#include "el.h" +#include #include +#include + +#include "el.h" #define CT_BUFSIZ ((size_t)1024) @@ -68,7 +71,7 @@ ct_conv_wbuff_resize(ct_buffer_t *conv, { void *p; - if (wsize <= conv->wsize) + if (wsize <= conv->wsize) return 0; conv->wsize = wsize; @@ -206,6 +209,28 @@ ct_encode_char(char *dst, size_t len, Ch } return l; } + +size_t +ct_mbrtowc(wchar_t *wc, const char *s, size_t n) +{ + mbstate_t mbs; + /* This only works because UTF-8 is stateless */ + memset(&mbs, 0, sizeof(mbs)); + return mbrtowc(wc, s, n, &mbs); +} + +#else + +size_t +ct_mbrtowc(wchar_t *wc, const char *s, size_t n) + if (s == NULL) + return 0; + if (n == 0) + return (size_t)-2; + if (wc != NULL) + *wc = *s; + return *s != '\0'; +} #endif protected const Char * @@ -329,7 +354,7 @@ ct_visual_char(Char *dst, size_t len, Ch return c > 0xffff ? 8 : 7; #else *dst++ = '\\'; -#define tooctaldigit(v) ((v) + '0') +#define tooctaldigit(v) (Char)((v) + '0') *dst++ = tooctaldigit(((unsigned int) c >> 6) & 0x7); *dst++ = tooctaldigit(((unsigned int) c >> 3) & 0x7); *dst++ = tooctaldigit(((unsigned int) c ) & 0x7); Modified: head/lib/libedit/chartype.h ============================================================================== --- head/lib/libedit/chartype.h Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/chartype.h Mon Jan 30 22:11:53 2017 (r312997) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.h,v 1.15 2015/05/17 13:14:41 christos Exp $ */ +/* $NetBSD: chartype.h,v 1.23 2016/02/24 17:20:01 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -32,7 +32,6 @@ #define _h_chartype_f - #ifdef WIDECHAR /* Ideally we should also test the value of the define to see if it @@ -55,21 +54,18 @@ #warning Build environment does not support non-BMP characters #endif -#define ct_mbtowc mbtowc -#define ct_mbtowc_reset mbtowc(0,0,(size_t)0) +#define ct_wctob wctob #define ct_wctomb wctomb #define ct_wctomb_reset wctomb(0,0) #define ct_wcstombs wcstombs #define ct_mbstowcs mbstowcs #define Char wchar_t -#define Int wint_t #define FUN(prefix,rest) prefix ## _w ## rest #define FUNW(type) type ## _w #define TYPE(type) type ## W -#define FCHAR "%lc" #define FSTR "%ls" -#define STR(x) L ## x +#define STR(x) L ## x #define UC(c) c #define Isalpha(x) iswalpha(x) #define Isalnum(x) iswalnum(x) @@ -110,21 +106,18 @@ Width(wchar_t c) #else /* NARROW */ -#define ct_mbtowc error -#define ct_mbtowc_reset +#define ct_wctob(w) ((int)(w)) #define ct_wctomb error -#define ct_wctomb_reset +#define ct_wctomb_reset #define ct_wcstombs(a, b, c) (strncpy(a, b, c), strlen(a)) #define ct_mbstowcs(a, b, c) (strncpy(a, b, c), strlen(a)) #define Char char -#define Int int #define FUN(prefix,rest) prefix ## _ ## rest #define FUNW(type) type #define TYPE(type) type -#define FCHAR "%c" #define FSTR "%s" -#define STR(x) x +#define STR(x) x #define UC(c) (unsigned char)(c) #define Isalpha(x) isalpha((unsigned char)x) @@ -213,7 +206,7 @@ protected size_t ct_enc_width(Char); #define VISUAL_WIDTH_MAX ((size_t)8) /* The terminal is thought of in terms of X columns by Y lines. In the cases - * where a wide character takes up more than one column, the adjacent + * where a wide character takes up more than one column, the adjacent * occupied column entries will contain this faux character. */ #define MB_FILL_CHAR ((Char)-1) @@ -245,5 +238,7 @@ protected const Char *ct_visual_string(c protected int ct_chr_class(Char c); #endif +size_t ct_mbrtowc(wchar_t *, const char *, size_t); + #endif /* _chartype_f */ Modified: head/lib/libedit/common.c ============================================================================== --- head/lib/libedit/common.c Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/common.c Mon Jan 30 22:11:53 2017 (r312997) @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $ */ +/* $NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $"); +__RCSID("$NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -46,7 +46,13 @@ __FBSDID("$FreeBSD$"); /* * common.c: Common Editor functions */ +#include +#include + #include "el.h" +#include "common.h" +#include "parse.h" +#include "vi.h" /* ed_end_of_file(): * Indicate end of file @@ -54,7 +60,7 @@ __FBSDID("$FreeBSD$"); */ protected el_action_t /*ARGSUSED*/ -ed_end_of_file(EditLine *el, Int c __attribute__((__unused__))) +ed_end_of_file(EditLine *el, wint_t c __attribute__((__unused__))) { re_goto_bottom(el); @@ -68,7 +74,7 @@ ed_end_of_file(EditLine *el, Int c __att * Insert a character [bound to all insert keys] */ protected el_action_t -ed_insert(EditLine *el, Int c) +ed_insert(EditLine *el, wint_t c) { int count = el->el_state.argument; @@ -87,14 +93,14 @@ ed_insert(EditLine *el, Int c) || el->el_line.cursor >= el->el_line.lastchar) c_insert(el, 1); - *el->el_line.cursor++ = c; + *el->el_line.cursor++ = (Char)c; re_fastaddc(el); /* fast refresh for one char. */ } else { if (el->el_state.inputmode != MODE_REPLACE_1) c_insert(el, el->el_state.argument); while (count-- && el->el_line.cursor < el->el_line.lastchar) - *el->el_line.cursor++ = c; + *el->el_line.cursor++ = (Char)c; re_refresh(el); } @@ -111,7 +117,7 @@ ed_insert(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_word(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { Char *cp, *p, *kp; @@ -139,7 +145,7 @@ ed_delete_prev_word(EditLine *el, Int c */ protected el_action_t /*ARGSUSED*/ -ed_delete_next_char(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { #ifdef DEBUG_EDIT #define EL el->el_line @@ -186,7 +192,7 @@ ed_delete_next_char(EditLine *el, Int c */ protected el_action_t /*ARGSUSED*/ -ed_kill_line(EditLine *el, Int c __attribute__((__unused__))) +ed_kill_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *kp, *cp; @@ -207,7 +213,7 @@ ed_kill_line(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_move_to_end(EditLine *el, Int c __attribute__((__unused__))) +ed_move_to_end(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.lastchar; @@ -230,7 +236,7 @@ ed_move_to_end(EditLine *el, Int c __att */ protected el_action_t /*ARGSUSED*/ -ed_move_to_beg(EditLine *el, Int c __attribute__((__unused__))) +ed_move_to_beg(EditLine *el, wint_t c __attribute__((__unused__))) { el->el_line.cursor = el->el_line.buffer; @@ -253,7 +259,7 @@ ed_move_to_beg(EditLine *el, Int c __att * [^T] [^T] */ protected el_action_t -ed_transpose_chars(EditLine *el, Int c) +ed_transpose_chars(EditLine *el, wint_t c) { if (el->el_line.cursor < el->el_line.lastchar) { @@ -266,7 +272,7 @@ ed_transpose_chars(EditLine *el, Int c) /* must have at least two chars entered */ c = el->el_line.cursor[-2]; el->el_line.cursor[-2] = el->el_line.cursor[-1]; - el->el_line.cursor[-1] = c; + el->el_line.cursor[-1] = (Char)c; return CC_REFRESH; } else return CC_ERROR; @@ -279,7 +285,7 @@ ed_transpose_chars(EditLine *el, Int c) */ protected el_action_t /*ARGSUSED*/ -ed_next_char(EditLine *el, Int c __attribute__((__unused__))) +ed_next_char(EditLine *el, wint_t c __attribute__((__unused__))) { Char *lim = el->el_line.lastchar; @@ -308,7 +314,7 @@ ed_next_char(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_word(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_word(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor == el->el_line.buffer) @@ -334,7 +340,7 @@ ed_prev_word(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_char(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor > el->el_line.buffer) { @@ -358,14 +364,12 @@ ed_prev_char(EditLine *el, Int c __attri * [^V] [^V] */ protected el_action_t -ed_quoted_insert(EditLine *el, Int c) +ed_quoted_insert(EditLine *el, wint_t c) { int num; - Char tc; tty_quotemode(el); - num = FUN(el,getc)(el, &tc); - c = tc; + num = el_wgetc(el, &c); tty_noquotemode(el); if (num == 1) return ed_insert(el, c); @@ -378,7 +382,7 @@ ed_quoted_insert(EditLine *el, Int c) * Adds to argument or enters a digit */ protected el_action_t -ed_digit(EditLine *el, Int c) +ed_digit(EditLine *el, wint_t c) { if (!Isdigit(c)) @@ -406,7 +410,7 @@ ed_digit(EditLine *el, Int c) * For ESC-n */ protected el_action_t -ed_argument_digit(EditLine *el, Int c) +ed_argument_digit(EditLine *el, wint_t c) { if (!Isdigit(c)) @@ -432,7 +436,7 @@ ed_argument_digit(EditLine *el, Int c) protected el_action_t /*ARGSUSED*/ ed_unassigned(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) + wint_t c __attribute__((__unused__))) { return CC_ERROR; @@ -449,8 +453,8 @@ ed_unassigned(EditLine *el __attribute__ */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigint(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_sigint(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -463,8 +467,8 @@ ed_tty_sigint(EditLine *el __attribute__ */ protected el_action_t /*ARGSUSED*/ -ed_tty_dsusp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_dsusp(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -477,8 +481,8 @@ ed_tty_dsusp(EditLine *el __attribute__( */ protected el_action_t /*ARGSUSED*/ -ed_tty_flush_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_flush_output(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -491,8 +495,8 @@ ed_tty_flush_output(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigquit(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_sigquit(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -505,8 +509,8 @@ ed_tty_sigquit(EditLine *el __attribute_ */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -519,8 +523,8 @@ ed_tty_sigtstp(EditLine *el __attribute_ */ protected el_action_t /*ARGSUSED*/ -ed_tty_stop_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_stop_output(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -533,8 +537,8 @@ ed_tty_stop_output(EditLine *el __attrib */ protected el_action_t /*ARGSUSED*/ -ed_tty_start_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_tty_start_output(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -547,7 +551,7 @@ ed_tty_start_output(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_newline(EditLine *el, Int c __attribute__((__unused__))) +ed_newline(EditLine *el, wint_t c __attribute__((__unused__))) { re_goto_bottom(el); @@ -563,7 +567,7 @@ ed_newline(EditLine *el, Int c __attribu */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) +ed_delete_prev_char(EditLine *el, wint_t c __attribute__((__unused__))) { if (el->el_line.cursor <= el->el_line.buffer) @@ -583,7 +587,7 @@ ed_delete_prev_char(EditLine *el, Int c */ protected el_action_t /*ARGSUSED*/ -ed_clear_screen(EditLine *el, Int c __attribute__((__unused__))) +ed_clear_screen(EditLine *el, wint_t c __attribute__((__unused__))) { terminal_clear_screen(el); /* clear the whole real screen */ @@ -598,8 +602,8 @@ ed_clear_screen(EditLine *el, Int c __at */ protected el_action_t /*ARGSUSED*/ -ed_redisplay(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_redisplay(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_REDISPLAY; @@ -612,7 +616,7 @@ ed_redisplay(EditLine *el __attribute__( */ protected el_action_t /*ARGSUSED*/ -ed_start_over(EditLine *el, Int c __attribute__((__unused__))) +ed_start_over(EditLine *el, wint_t c __attribute__((__unused__))) { ch_reset(el, 0); @@ -626,8 +630,8 @@ ed_start_over(EditLine *el, Int c __attr */ protected el_action_t /*ARGSUSED*/ -ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) +ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), + wint_t c __attribute__((__unused__))) { return CC_NORM; @@ -640,7 +644,7 @@ ed_sequence_lead_in(EditLine *el __attri */ protected el_action_t /*ARGSUSED*/ -ed_prev_history(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) { char beep = 0; int sv_event = el->el_history.eventno; @@ -660,7 +664,6 @@ ed_prev_history(EditLine *el, Int c __at if (hist_get(el) == CC_ERROR) { if (el->el_map.type == MAP_VI) { el->el_history.eventno = sv_event; - } beep = 1; /* el->el_history.eventno was fixed by first call */ @@ -678,7 +681,7 @@ ed_prev_history(EditLine *el, Int c __at */ protected el_action_t /*ARGSUSED*/ -ed_next_history(EditLine *el, Int c __attribute__((__unused__))) +ed_next_history(EditLine *el, wint_t c __attribute__((__unused__))) { el_action_t beep = CC_REFRESH, rval; @@ -705,11 +708,11 @@ ed_next_history(EditLine *el, Int c __at */ protected el_action_t /*ARGSUSED*/ -ed_search_prev_history(EditLine *el, Int c __attribute__((__unused__))) +ed_search_prev_history(EditLine *el, wint_t c __attribute__((__unused__))) { const Char *hp; int h; - bool_t found = 0; + int found = 0; el->el_chared.c_vcmd.action = NOP; el->el_chared.c_undo.len = -1; @@ -748,7 +751,7 @@ ed_search_prev_history(EditLine *el, Int (el->el_line.lastchar - el->el_line.buffer)) || hp[el->el_line.lastchar - el->el_line.buffer]) && c_hmatch(el, hp)) { - found++; + found = 1; break; } h++; @@ -773,11 +776,11 @@ ed_search_prev_history(EditLine *el, Int */ protected el_action_t /*ARGSUSED*/ -ed_search_next_history(EditLine *el, Int c __attribute__((__unused__))) +ed_search_next_history(EditLine *el, wint_t c __attribute__((__unused__))) { const Char *hp; int h; - bool_t found = 0; + int found = 0; el->el_chared.c_vcmd.action = NOP; el->el_chared.c_undo.len = -1; @@ -827,7 +830,7 @@ ed_search_next_history(EditLine *el, Int */ protected el_action_t /*ARGSUSED*/ -ed_prev_line(EditLine *el, Int c __attribute__((__unused__))) +ed_prev_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -870,7 +873,7 @@ ed_prev_line(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_next_line(EditLine *el, Int c __attribute__((__unused__))) +ed_next_line(EditLine *el, wint_t c __attribute__((__unused__))) { Char *ptr; int nchars = c_hpos(el); @@ -904,7 +907,7 @@ ed_next_line(EditLine *el, Int c __attri */ protected el_action_t /*ARGSUSED*/ -ed_command(EditLine *el, Int c __attribute__((__unused__))) +ed_command(EditLine *el, wint_t c __attribute__((__unused__))) { Char tmpbuf[EL_BUFSIZ]; int tmplen; Modified: head/lib/libedit/config.h ============================================================================== --- head/lib/libedit/config.h Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/config.h Mon Jan 30 22:11:53 2017 (r312997) @@ -21,8 +21,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have the `fgetln' function. */ -#define HAVE_FGETLN 1 +/* Define to 1 if you have the `getline' function. */ +#define HAVE_GETLINE 1 /* Define to 1 if you have the `fork' function. */ #define HAVE_FORK 1 @@ -188,9 +188,6 @@ /* Define to 1 if you have the `vis' function. */ #define HAVE_VIS 1 -/* Define to 1 if you have the `wcsdup' function. */ -#define HAVE_WCSDUP 1 - /* Define to 1 if `fork' works. */ #define HAVE_WORKING_FORK 1 @@ -257,6 +254,9 @@ /* Version number of package */ #define VERSION "3.0" +/* Define to 1 if the system provides the SIZE_MAX constant */ +#define HAVE_SIZE_MAX 1 + /* Define to 1 if you want wide-character code */ /* #undef WIDECHAR */ Modified: head/lib/libedit/edit/readline/readline.h ============================================================================== --- head/lib/libedit/edit/readline/readline.h Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/edit/readline/readline.h Mon Jan 30 22:11:53 2017 (r312997) @@ -1,4 +1,4 @@ -/* $NetBSD: readline.h,v 1.37 2015/06/02 15:36:45 christos Exp $ */ +/* $NetBSD: readline.h,v 1.39 2016/02/17 19:47:49 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ typedef void *histdata_t; typedef struct _hist_entry { const char *line; - histdata_t data; + histdata_t data; } HIST_ENTRY; typedef struct _keymap_entry { @@ -89,7 +89,7 @@ typedef KEYMAP_ENTRY *Keymap; #define RUBOUT 0x7f #define ABORT_CHAR CTRL('G') -#define RL_READLINE_VERSION 0x0402 +#define RL_READLINE_VERSION 0x0402 #define RL_PROMPT_START_IGNORE '\1' #define RL_PROMPT_END_IGNORE '\2' @@ -98,7 +98,7 @@ typedef KEYMAP_ENTRY *Keymap; extern "C" { #endif extern const char *rl_library_version; -extern int rl_readline_version; +extern int rl_readline_version; extern char *rl_readline_name; extern FILE *rl_instream; extern FILE *rl_outstream; @@ -199,10 +199,10 @@ int rl_add_defun(const char *, rl_comm HISTORY_STATE *history_get_history_state(void); void rl_get_screen_size(int *, int *); void rl_set_screen_size(int, int); -char *rl_filename_completion_function (const char *, int); +char *rl_filename_completion_function (const char *, int); int _rl_abort_internal(void); int _rl_qsort_string_compare(char **, char **); -char **rl_completion_matches(const char *, rl_compentry_func_t *); +char **rl_completion_matches(const char *, rl_compentry_func_t *); void rl_forced_update_display(void); int rl_set_prompt(const char *); int rl_on_new_line(void); @@ -218,6 +218,8 @@ int rl_generic_bind(int, const char *, int rl_bind_key_in_map(int, rl_command_func_t *, Keymap); void rl_cleanup_after_signal(void); void rl_free_line_state(void); +int rl_set_keyboard_input_timeout(int); + #ifdef __cplusplus } #endif Modified: head/lib/libedit/editline.3 ============================================================================== --- head/lib/libedit/editline.3 Mon Jan 30 21:06:07 2017 (r312996) +++ head/lib/libedit/editline.3 Mon Jan 30 22:11:53 2017 (r312997) @@ -1,4 +1,4 @@ -.\" $NetBSD: editline.3,v 1.85 2015/11/03 21:36:59 christos Exp $ +.\" $NetBSD: editline.3,v 1.88 2016/02/25 14:59:22 wiz Exp $ .\" .\" Copyright (c) 1997-2014 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 3, 2015 +.Dd February 24, 2016 .Dt EDITLINE 3 .Os .Sh NAME *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jan 30 22:29:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EF1CCC8125; Mon, 30 Jan 2017 22:29:23 +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 41A5CC02; Mon, 30 Jan 2017 22:29:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UMTMPB002189; Mon, 30 Jan 2017 22:29:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UMTMES002186; Mon, 30 Jan 2017 22:29:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701302229.v0UMTMES002186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 30 Jan 2017 22:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312998 - in head/sys/modules: . hwpmc_mips24k hwpmc_mips74k X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 22:29:23 -0000 Author: adrian Date: Mon Jan 30 22:29:21 2017 New Revision: 312998 URL: https://svnweb.freebsd.org/changeset/base/312998 Log: [mips] add some (temporary, I hope!) mips24k/mips74k hwpmc modules. Ideally we'd have a top level hwpmc module with the shared bits, then cpu specific glue as needed. However, on the MIPS side, there's no probe code - {mips24k, mips74k, octeon} implement a set of methods that hwpmc_mips.c expects. So this populates separate modules with duplicate code. Ew, but it does work. This gets me off the hook - these work fine as copied into the relevant mfsroot for mips24k/mips74k systems. TODO: * do it the "right" way in the future. Note that modules/hwpmc/ does build fine on MIPS, it jusn't DO anything. So it'd be nice to maybe call that "hwpmc_core" and then "hwpmc" can be the CPU/arch glue. Added: head/sys/modules/hwpmc_mips24k/ head/sys/modules/hwpmc_mips24k/Makefile (contents, props changed) head/sys/modules/hwpmc_mips74k/ head/sys/modules/hwpmc_mips74k/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Jan 30 22:11:53 2017 (r312997) +++ head/sys/modules/Makefile Mon Jan 30 22:29:21 2017 (r312998) @@ -138,6 +138,8 @@ SUBDIR= \ ${_hptnr} \ ${_hptrr} \ hwpmc \ + ${_hwpmc_mips24k} \ + ${_hwpmc_mips74k} \ ${_hyperv} \ i2c \ ${_ibcore} \ @@ -520,6 +522,11 @@ _cxgbe= cxgbe SUBDIR+= zfs .endif +.if ${MACHINE_CPUARCH} == "mips" + _hwpmc_mips24k= hwpmc_mips24k + _hwpmc_mips74k= hwpmc_mips74k +.endif + .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" && \ ${MACHINE_CPUARCH} != "riscv" Added: head/sys/modules/hwpmc_mips24k/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/hwpmc_mips24k/Makefile Mon Jan 30 22:29:21 2017 (r312998) @@ -0,0 +1,14 @@ +# +# $FreeBSD$ +# + +.PATH: ${.CURDIR}/../../dev/hwpmc + +KMOD= hwpmc_mips24k + +SRCS= hwpmc_mod.c hwpmc_logging.c hwpmc_soft.c vnode_if.h +SRCS+= hwpmc_mips.c + +SRCS+= hwpmc_mips24k.c + +.include Added: head/sys/modules/hwpmc_mips74k/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/hwpmc_mips74k/Makefile Mon Jan 30 22:29:21 2017 (r312998) @@ -0,0 +1,14 @@ +# +# $FreeBSD$ +# + +.PATH: ${.CURDIR}/../../dev/hwpmc + +KMOD= hwpmc_mips74k + +SRCS= hwpmc_mod.c hwpmc_logging.c hwpmc_soft.c vnode_if.h +SRCS+= hwpmc_mips.c + +SRCS+= hwpmc_mips74k.c + +.include From owner-svn-src-all@freebsd.org Mon Jan 30 22:35:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0CC0CC8E21; Mon, 30 Jan 2017 22:35:44 +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 69A64B9; Mon, 30 Jan 2017 22:35:44 +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 v0UMZhSE006216; Mon, 30 Jan 2017 22:35:43 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UMZglh006208; Mon, 30 Jan 2017 22:35:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701302235.v0UMZglh006208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 30 Jan 2017 22:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312999 - in vendor/NetBSD/libedit/dist: . TEST X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 22:35:44 -0000 Author: pfg Date: Mon Jan 30 22:35:42 2017 New Revision: 312999 URL: https://svnweb.freebsd.org/changeset/base/312999 Log: Import libedit 2016-03-21 Obtained from: NetBSD Modified: vendor/NetBSD/libedit/dist/Makefile vendor/NetBSD/libedit/dist/TEST/rl1.c vendor/NetBSD/libedit/dist/chartype.h vendor/NetBSD/libedit/dist/common.c vendor/NetBSD/libedit/dist/read.c vendor/NetBSD/libedit/dist/refresh.c vendor/NetBSD/libedit/dist/terminal.c vendor/NetBSD/libedit/dist/tty.c vendor/NetBSD/libedit/dist/vi.c Modified: vendor/NetBSD/libedit/dist/Makefile ============================================================================== --- vendor/NetBSD/libedit/dist/Makefile Mon Jan 30 22:29:21 2017 (r312998) +++ vendor/NetBSD/libedit/dist/Makefile Mon Jan 30 22:35:42 2017 (r312999) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.55 2016/02/24 14:25:38 christos Exp $ +# $NetBSD: Makefile,v 1.56 2016/03/02 19:24:20 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -53,8 +53,8 @@ CLEANFILES+=help.c.tmp help.h.tmp vi.h.t CLEANFILES+=tokenizern.c.tmp tokenizern.c tokenizerw.c.tmp tokenizerw.c CPPFLAGS+=-I. -I${LIBEDITDIR} CPPFLAGS+=-I. -I${.CURDIR} -CPPFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH -CPPFLAGS+=#-DDEBUG_PASTE -DDEBUG_EDIT +#CPPFLAGS+=-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH +#CPPFLAGS+=-DDEBUG_PASTE -DDEBUG_EDIT AHDR=vi.h emacs.h common.h ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c Modified: vendor/NetBSD/libedit/dist/TEST/rl1.c ============================================================================== --- vendor/NetBSD/libedit/dist/TEST/rl1.c Mon Jan 30 22:29:21 2017 (r312998) +++ vendor/NetBSD/libedit/dist/TEST/rl1.c Mon Jan 30 22:35:42 2017 (r312999) @@ -1,4 +1,4 @@ -/* $NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $ */ +/* $NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -15,13 +15,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -38,7 +31,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $"); +__RCSID("$NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $"); #endif /* not lint */ /* Modified: vendor/NetBSD/libedit/dist/chartype.h ============================================================================== --- vendor/NetBSD/libedit/dist/chartype.h Mon Jan 30 22:29:21 2017 (r312998) +++ vendor/NetBSD/libedit/dist/chartype.h Mon Jan 30 22:35:42 2017 (r312999) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.h,v 1.23 2016/02/24 17:20:01 christos Exp $ */ +/* $NetBSD: chartype.h,v 1.25 2016/03/07 00:05:20 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -12,13 +12,6 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -70,6 +63,7 @@ #define FUNW(type) type ## _w #define TYPE(type) type ## W #define FSTR "%ls" +#define FSTARSTR "%.*ls" #define STR(x) L ## x #define UC(c) c #define Isalpha(x) iswalpha(x) @@ -122,6 +116,7 @@ Width(wchar_t c) #define FUNW(type) type #define TYPE(type) type #define FSTR "%s" +#define FSTARSTR "%.*s" #define STR(x) x #define UC(c) (unsigned char)(c) Modified: vendor/NetBSD/libedit/dist/common.c ============================================================================== --- vendor/NetBSD/libedit/dist/common.c Mon Jan 30 22:29:21 2017 (r312998) +++ vendor/NetBSD/libedit/dist/common.c Mon Jan 30 22:35:42 2017 (r312999) @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $ */ +/* $NetBSD: common.c,v 1.40 2016/03/02 19:24:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $"); +__RCSID("$NetBSD: common.c,v 1.40 2016/03/02 19:24:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -147,8 +147,9 @@ ed_delete_next_char(EditLine *el, wint_t { #ifdef DEBUG_EDIT #define EL el->el_line - (void) fprintf(el->el_errlfile, - "\nD(b: %x(%s) c: %x(%s) last: %x(%s) limit: %x(%s)\n", + (void) fprintf(el->el_errfile, + "\nD(b: %p(" FSTR ") c: %p(" FSTR ") last: %p(" FSTR + ") limit: %p(" FSTR ")\n", EL.buffer, EL.buffer, EL.cursor, EL.cursor, EL.lastchar, EL.lastchar, EL.limit, EL.limit); #endif Modified: vendor/NetBSD/libedit/dist/read.c ============================================================================== --- vendor/NetBSD/libedit/dist/read.c Mon Jan 30 22:29:21 2017 (r312998) +++ vendor/NetBSD/libedit/dist/read.c Mon Jan 30 22:35:42 2017 (r312999) @@ -1,4 +1,4 @@ -/* $NetBSD: read.c,v 1.85 2016/02/24 17:20:01 christos Exp $ */ +/* $NetBSD: read.c,v 1.86 2016/03/02 19:24:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: read.c,v 1.85 2016/02/24 17:20:01 christos Exp $"); +__RCSID("$NetBSD: read.c,v 1.86 2016/03/02 19:24:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -615,7 +615,7 @@ FUN(el,gets)(EditLine *el, int *nread) break; if (b->name) (void) fprintf(el->el_errfile, - "Executing %s\n", b->name); + "Executing " FSTR "\n", b->name); else (void) fprintf(el->el_errfile, "Error command = %d\n", cmdnum); Modified: vendor/NetBSD/libedit/dist/refresh.c ============================================================================== --- vendor/NetBSD/libedit/dist/refresh.c Mon Jan 30 22:29:21 2017 (r312998) +++ vendor/NetBSD/libedit/dist/refresh.c Mon Jan 30 22:35:42 2017 (r312999) @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.44 2016/02/17 19:47:49 christos Exp $ */ +/* $NetBSD: refresh.c,v 1.45 2016/03/02 19:24:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: refresh.c,v 1.44 2016/02/17 19:47:49 christos Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.45 2016/03/02 19:24:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -61,7 +61,7 @@ private void re__strncopy(Char *, Char * private void re__copy_and_pad(Char *, const Char *, size_t); #ifdef DEBUG_REFRESH -private void re_printstr(EditLine *, const char *, char *, char *); +private void re_printstr(EditLine *, const char *, Char *, Char *); #define __F el->el_errfile #define ELRE_ASSERT(a, b, c) do \ if (/*CONSTCOND*/ a) { \ @@ -75,7 +75,7 @@ private void re_printstr(EditLine *, con * Print a string on the debugging pty */ private void -re_printstr(EditLine *el, const char *str, char *f, char *t) +re_printstr(EditLine *el, const char *str, Char *f, Char *t) { ELRE_DEBUG(1, (__F, "%s:\"", str)); @@ -205,7 +205,7 @@ re_refresh(EditLine *el) size_t termsz; #endif - ELRE_DEBUG(1, (__F, "el->el_line.buffer = :%s:\r\n", + ELRE_DEBUG(1, (__F, "el->el_line.buffer = :" FSTR ":\r\n", el->el_line.buffer)); /* reset the Drawing cursor */ @@ -293,7 +293,8 @@ re_refresh(EditLine *el) ELRE_DEBUG(1, (__F, "term.h=%d vcur.h=%d vcur.v=%d vdisplay[0]=\r\n:%80.80s:\r\n", el->el_terminal.t_size.h, el->el_refresh.r_cursor.h, - el->el_refresh.r_cursor.v, ct_encode_string(el->el_vdisplay[0]))); + el->el_refresh.r_cursor.v, ct_encode_string(el->el_vdisplay[0], + &el->el_scratch))); ELRE_DEBUG(1, (__F, "updating %d lines.\r\n", el->el_refresh.r_newcv)); for (i = 0; i <= el->el_refresh.r_newcv; i++) { @@ -321,7 +322,7 @@ re_refresh(EditLine *el) /* This Strlen should be safe even with MB_FILL_CHARs */ terminal_clear_EOL(el, (int) Strlen(el->el_display[i])); #ifdef DEBUG_REFRESH - terminal_overwrite(el, "C\b", (size_t)2); + terminal_overwrite(el, STR("C\b"), 2); #endif /* DEBUG_REFRESH */ el->el_display[i][0] = '\0'; } @@ -368,8 +369,9 @@ re_insert(EditLine *el __attribute__((__ ELRE_DEBUG(1, (__F, "re_insert() starting: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); - ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s))); + num, dat, dlen, ct_encode_string(d, &el->el_scratch))); + ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s, + &el->el_scratch))); /* open up the space for num chars */ if (num > 0) { @@ -382,8 +384,9 @@ re_insert(EditLine *el __attribute__((__ ELRE_DEBUG(1, (__F, "re_insert() after insert: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); - ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s))); + num, dat, dlen, ct_encode_string(d, &el->el_scratch))); + ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s, + &el->el_scratch))); /* copy the characters */ for (a = d + dat; (a < d + dlen) && (num > 0); num--) @@ -418,7 +421,7 @@ re_delete(EditLine *el __attribute__((__ } ELRE_DEBUG(1, (__F, "re_delete() starting: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); + num, dat, dlen, ct_encode_string(d, &el->el_scratch))); /* open up the space for num chars */ if (num > 0) { @@ -430,7 +433,7 @@ re_delete(EditLine *el __attribute__((__ } ELRE_DEBUG(1, (__F, "re_delete() after delete: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); + num, dat, dlen, ct_encode_string(d, &el->el_scratch))); } @@ -688,9 +691,9 @@ re_update_line(EditLine *el, Char *old, sx = (int)((nls - nse) - (ols - ose)); ELRE_DEBUG(1, (__F, "fx %d, sx %d\n", fx, sx)); - ELRE_DEBUG(1, (__F, "ofd %d, osb %d, ose %d, ols %d, oe %d\n", + ELRE_DEBUG(1, (__F, "ofd %td, osb %td, ose %td, ols %td, oe %td\n", ofd - old, osb - old, ose - old, ols - old, oe - old)); - ELRE_DEBUG(1, (__F, "nfd %d, nsb %d, nse %d, nls %d, ne %d\n", + ELRE_DEBUG(1, (__F, "nfd %td, nsb %td, nse %td, nls %td, ne %td\n", nfd - new, nsb - new, nse - new, nls - new, ne - new)); ELRE_DEBUG(1, (__F, "xxx-xxx:\"00000000001111111111222222222233333333334\"\r\n")); @@ -764,7 +767,7 @@ re_update_line(EditLine *el, Char *old, if ((nsb != nfd) && fx > 0 && ((p - old) + fx <= el->el_terminal.t_size.h)) { ELRE_DEBUG(1, - (__F, "first diff insert at %d...\r\n", nfd - new)); + (__F, "first diff insert at %td...\r\n", nfd - new)); /* * Move to the first char to insert, where the first diff is. */ @@ -803,7 +806,7 @@ re_update_line(EditLine *el, Char *old, } } else if (fx < 0) { ELRE_DEBUG(1, - (__F, "first diff delete at %d...\r\n", ofd - old)); + (__F, "first diff delete at %td...\r\n", ofd - old)); /* * move to the first char to delete where the first diff is */ @@ -850,7 +853,7 @@ re_update_line(EditLine *el, Char *old, if (sx < 0 && (ose - old) + fx < el->el_terminal.t_size.h) { ELRE_DEBUG(1, (__F, - "second diff delete at %d...\r\n", (ose - old) + fx)); + "second diff delete at %td...\r\n", (ose - old) + fx)); /* * Check if we have stuff to delete */ @@ -888,7 +891,7 @@ re_update_line(EditLine *el, Char *old, * if we have a first insert AND WE HAVEN'T ALREADY DONE IT... */ if ((nsb != nfd) && (osb - ofd) <= (nsb - nfd) && (fx == 0)) { - ELRE_DEBUG(1, (__F, "late first diff insert at %d...\r\n", + ELRE_DEBUG(1, (__F, "late first diff insert at %td...\r\n", nfd - new)); terminal_move_to_char(el, (int)(nfd - new)); Modified: vendor/NetBSD/libedit/dist/terminal.c ============================================================================== --- vendor/NetBSD/libedit/dist/terminal.c Mon Jan 30 22:29:21 2017 (r312998) +++ vendor/NetBSD/libedit/dist/terminal.c Mon Jan 30 22:35:42 2017 (r312999) @@ -1,4 +1,4 @@ -/* $NetBSD: terminal.c,v 1.22 2016/02/17 19:47:49 christos Exp $ */ +/* $NetBSD: terminal.c,v 1.24 2016/03/22 01:38:17 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95"; #else -__RCSID("$NetBSD: terminal.c,v 1.22 2016/02/17 19:47:49 christos Exp $"); +__RCSID("$NetBSD: terminal.c,v 1.24 2016/03/22 01:38:17 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -378,7 +378,7 @@ terminal_alloc(EditLine *el, const struc */ tlen = 0; for (tmp = tlist; tmp < &tlist[T_str]; tmp++) - if (*tmp != NULL && *tmp != '\0' && *tmp != *str) { + if (*tmp != NULL && **tmp != '\0' && *tmp != *str) { char *ptr; for (ptr = *tmp; *ptr != '\0'; termbuf[tlen++] = *ptr++) @@ -666,7 +666,7 @@ terminal_overwrite(EditLine *el, const C if (n > (size_t)el->el_terminal.t_size.h) { #ifdef DEBUG_SCREEN (void) fprintf(el->el_errfile, - "%s: n is ridiculous: %d\r\n", __func__, n); + "%s: n is ridiculous: %zu\r\n", __func__, n); #endif /* DEBUG_SCREEN */ return; } Modified: vendor/NetBSD/libedit/dist/tty.c ============================================================================== --- vendor/NetBSD/libedit/dist/tty.c Mon Jan 30 22:29:21 2017 (r312998) +++ vendor/NetBSD/libedit/dist/tty.c Mon Jan 30 22:35:42 2017 (r312999) @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.58 2016/02/27 18:13:21 christos Exp $ */ +/* $NetBSD: tty.c,v 1.59 2016/03/22 01:34:32 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tty.c,v 1.58 2016/02/27 18:13:21 christos Exp $"); +__RCSID("$NetBSD: tty.c,v 1.59 2016/03/22 01:34:32 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -498,10 +498,12 @@ tty_setup(EditLine *el) { int rst = 1; - el->el_tty.t_initialized = 0; if (el->el_flags & EDIT_DISABLED) return 0; + if (el->el_tty.t_initialized) + return -1; + if (!isatty(el->el_outfd)) { #ifdef DEBUG_TTY (void) fprintf(el->el_errfile, "%s: isatty: %s\n", __func__, @@ -571,6 +573,7 @@ tty_init(EditLine *el) el->el_tty.t_mode = EX_IO; el->el_tty.t_vdisable = _POSIX_VDISABLE; + el->el_tty.t_initialized = 0; (void) memcpy(el->el_tty.t_t, ttyperm, sizeof(ttyperm_t)); (void) memcpy(el->el_tty.t_c, ttychar, sizeof(ttychar_t)); return tty_setup(el); @@ -587,7 +590,7 @@ tty_end(EditLine *el) if (el->el_flags & EDIT_DISABLED) return; - if (el->el_tty.t_initialized) + if (!el->el_tty.t_initialized) return; if (tty_setty(el, TCSAFLUSH, &el->el_tty.t_or) == -1) { Modified: vendor/NetBSD/libedit/dist/vi.c ============================================================================== --- vendor/NetBSD/libedit/dist/vi.c Mon Jan 30 22:29:21 2017 (r312998) +++ vendor/NetBSD/libedit/dist/vi.c Mon Jan 30 22:35:42 2017 (r312999) @@ -1,4 +1,4 @@ -/* $NetBSD: vi.c,v 1.54 2016/02/17 19:47:49 christos Exp $ */ +/* $NetBSD: vi.c,v 1.55 2016/03/02 19:24:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: vi.c,v 1.54 2016/02/17 19:47:49 christos Exp $"); +__RCSID("$NetBSD: vi.c,v 1.55 2016/03/02 19:24:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -103,7 +103,8 @@ cv_paste(EditLine *el, wint_t c) if (k->buf == NULL || len == 0) return CC_ERROR; #ifdef DEBUG_PASTE - (void) fprintf(el->el_errfile, "Paste: \"%.*s\"\n", (int)len, k->buf); + (void) fprintf(el->el_errfile, "Paste: \"" FSTARSTR "\"\n", (int)len, + k->buf); #endif cv_undo(el); From owner-svn-src-all@freebsd.org Mon Jan 30 22:40:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9FD2CC8676; Mon, 30 Jan 2017 22:40:45 +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 682DEEAF; Mon, 30 Jan 2017 22:40:45 +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 v0UMeil8006458; Mon, 30 Jan 2017 22:40:44 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UMeiHD006451; Mon, 30 Jan 2017 22:40:44 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701302240.v0UMeiHD006451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 30 Jan 2017 22:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313000 - in vendor/NetBSD/libedit/2016-03-21: . TEST readline X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 22:40:45 -0000 Author: pfg Date: Mon Jan 30 22:40:43 2017 New Revision: 313000 URL: https://svnweb.freebsd.org/changeset/base/313000 Log: Tag import of libedit 2016-03-21. Added: vendor/NetBSD/libedit/2016-03-21/ - copied from r312995, vendor/NetBSD/libedit/dist/ Replaced: vendor/NetBSD/libedit/2016-03-21/Makefile - copied unchanged from r312999, vendor/NetBSD/libedit/dist/Makefile vendor/NetBSD/libedit/2016-03-21/TEST/Makefile - copied unchanged from r312996, vendor/NetBSD/libedit/dist/TEST/Makefile vendor/NetBSD/libedit/2016-03-21/TEST/rl1.c - copied unchanged from r312999, vendor/NetBSD/libedit/dist/TEST/rl1.c vendor/NetBSD/libedit/2016-03-21/TEST/tc1.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/TEST/tc1.c vendor/NetBSD/libedit/2016-03-21/TEST/wtc1.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/TEST/wtc1.c vendor/NetBSD/libedit/2016-03-21/chared.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/chared.c vendor/NetBSD/libedit/2016-03-21/chared.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/chared.h vendor/NetBSD/libedit/2016-03-21/chartype.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/chartype.c vendor/NetBSD/libedit/2016-03-21/chartype.h - copied unchanged from r312999, vendor/NetBSD/libedit/dist/chartype.h vendor/NetBSD/libedit/2016-03-21/common.c - copied unchanged from r312999, vendor/NetBSD/libedit/dist/common.c vendor/NetBSD/libedit/2016-03-21/config.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/config.h vendor/NetBSD/libedit/2016-03-21/editline.3 - copied unchanged from r312996, vendor/NetBSD/libedit/dist/editline.3 vendor/NetBSD/libedit/2016-03-21/el.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/el.c vendor/NetBSD/libedit/2016-03-21/el.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/el.h vendor/NetBSD/libedit/2016-03-21/eln.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/eln.c vendor/NetBSD/libedit/2016-03-21/emacs.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/emacs.c vendor/NetBSD/libedit/2016-03-21/filecomplete.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/filecomplete.c vendor/NetBSD/libedit/2016-03-21/hist.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/hist.c vendor/NetBSD/libedit/2016-03-21/hist.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/hist.h vendor/NetBSD/libedit/2016-03-21/histedit.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/histedit.h vendor/NetBSD/libedit/2016-03-21/history.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/history.c vendor/NetBSD/libedit/2016-03-21/keymacro.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/keymacro.c vendor/NetBSD/libedit/2016-03-21/makelist - copied unchanged from r312996, vendor/NetBSD/libedit/dist/makelist vendor/NetBSD/libedit/2016-03-21/map.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/map.c vendor/NetBSD/libedit/2016-03-21/parse.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/parse.c vendor/NetBSD/libedit/2016-03-21/prompt.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/prompt.c vendor/NetBSD/libedit/2016-03-21/prompt.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/prompt.h vendor/NetBSD/libedit/2016-03-21/read.c - copied unchanged from r312999, vendor/NetBSD/libedit/dist/read.c vendor/NetBSD/libedit/2016-03-21/read.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/read.h vendor/NetBSD/libedit/2016-03-21/readline.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/readline.c vendor/NetBSD/libedit/2016-03-21/readline/Makefile - copied unchanged from r312996, vendor/NetBSD/libedit/dist/readline/Makefile vendor/NetBSD/libedit/2016-03-21/readline/readline.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/readline/readline.h vendor/NetBSD/libedit/2016-03-21/refresh.c - copied unchanged from r312999, vendor/NetBSD/libedit/dist/refresh.c vendor/NetBSD/libedit/2016-03-21/refresh.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/refresh.h vendor/NetBSD/libedit/2016-03-21/search.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/search.c vendor/NetBSD/libedit/2016-03-21/search.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/search.h vendor/NetBSD/libedit/2016-03-21/sig.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/sig.c vendor/NetBSD/libedit/2016-03-21/sig.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/sig.h vendor/NetBSD/libedit/2016-03-21/sys.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/sys.h vendor/NetBSD/libedit/2016-03-21/terminal.c - copied unchanged from r312999, vendor/NetBSD/libedit/dist/terminal.c vendor/NetBSD/libedit/2016-03-21/terminal.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/terminal.h vendor/NetBSD/libedit/2016-03-21/tokenizer.c - copied unchanged from r312996, vendor/NetBSD/libedit/dist/tokenizer.c vendor/NetBSD/libedit/2016-03-21/tty.c - copied unchanged from r312999, vendor/NetBSD/libedit/dist/tty.c vendor/NetBSD/libedit/2016-03-21/tty.h - copied unchanged from r312996, vendor/NetBSD/libedit/dist/tty.h vendor/NetBSD/libedit/2016-03-21/vi.c - copied unchanged from r312999, vendor/NetBSD/libedit/dist/vi.c Copied: vendor/NetBSD/libedit/2016-03-21/Makefile (from r312999, vendor/NetBSD/libedit/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2016-03-21/Makefile Mon Jan 30 22:40:43 2017 (r313000, copy of r312999, vendor/NetBSD/libedit/dist/Makefile) @@ -0,0 +1,134 @@ +# $NetBSD: Makefile,v 1.56 2016/03/02 19:24:20 christos Exp $ +# @(#)Makefile 8.1 (Berkeley) 6/4/93 + +USE_SHLIBDIR= yes + +WIDECHAR ?= yes +WARNS?= 5 +LIB= edit + +LIBDPLIBS+= terminfo ${.CURDIR}/../libterminfo + +.include "bsd.own.mk" + +COPTS+= -Wunused-parameter +CWARNFLAGS.gcc+= -Wconversion +CWARNFLAGS.clang+= -Wno-cast-qual + +OSRCS= chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \ + hist.c keymacro.c map.c chartype.c \ + parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c + +MAN= editline.3 editrc.5 + +MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \ + editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \ + editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_get.3 \ + editline.3 el_source.3 editline.3 el_resize.3 editline.3 el_line.3 \ + editline.3 el_insertstr.3 editline.3 el_deletestr.3 \ + editline.3 history_init.3 editline.3 history_end.3 \ + editline.3 history.3 \ + editline.3 tok_init.3 editline.3 tok_end.3 editline.3 tok_reset.3 \ + editline.3 tok_line.3 editline.3 tok_str.3 + +# For speed and debugging +#SRCS= ${OSRCS} readline.c tokenizer.c history.c +# For protection +SRCS= editline.c readline.c tokenizer.c history.c + +.if ${WIDECHAR} == "yes" +SRCS += tokenizern.c historyn.c +CLEANFILES+=tokenizern.c.tmp tokenizern.c historyn.c.tmp historyn.c +CPPFLAGS+=-DWIDECHAR +.endif + +LIBEDITDIR?=${.CURDIR} + +INCS= histedit.h +INCSDIR=/usr/include + +CLEANFILES+=editline.c +CLEANFILES+=common.h.tmp editline.c.tmp emacs.h.tmp fcns.c.tmp fcns.h.tmp +CLEANFILES+=help.c.tmp help.h.tmp vi.h.tmp tc1.o tc1 +CLEANFILES+=tokenizern.c.tmp tokenizern.c tokenizerw.c.tmp tokenizerw.c +CPPFLAGS+=-I. -I${LIBEDITDIR} +CPPFLAGS+=-I. -I${.CURDIR} +#CPPFLAGS+=-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH +#CPPFLAGS+=-DDEBUG_PASTE -DDEBUG_EDIT + +AHDR=vi.h emacs.h common.h +ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c + +DPSRCS+= ${AHDR} fcns.h help.h fcns.c help.c +CLEANFILES+= ${AHDR} fcns.h help.h fcns.c help.c + +SUBDIR= readline + +vi.h: vi.c makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \ + > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +emacs.h: emacs.c makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \ + > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +common.h: common.c makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \ + > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +fcns.h: ${AHDR} makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +fcns.c: ${AHDR} fcns.h help.h makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +help.c: ${ASRC} makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +help.h: ${ASRC} makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +editline.c: ${OSRCS} makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -e ${OSRCS:T} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +tokenizern.c: makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -n tokenizer.c > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +historyn.c: makelist Makefile + ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -n history.c > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + +tc1.o: ${LIBEDITDIR}/TEST/tc1.c + +tc1: libedit.a tc1.o + ${_MKTARGET_LINK} + ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermlib + +.include +.include + +# XXX +.if defined(HAVE_GCC) +COPTS.editline.c+= -Wno-cast-qual +COPTS.tokenizer.c+= -Wno-cast-qual +COPTS.tokenizern.c+= -Wno-cast-qual +.endif Copied: vendor/NetBSD/libedit/2016-03-21/TEST/Makefile (from r312996, vendor/NetBSD/libedit/dist/TEST/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2016-03-21/TEST/Makefile Mon Jan 30 22:40:43 2017 (r313000, copy of r312996, vendor/NetBSD/libedit/dist/TEST/Makefile) @@ -0,0 +1,19 @@ +# $NetBSD: Makefile,v 1.6 2016/02/15 21:38:07 christos Exp $ + +WIDECHAR ?= yes + +NOMAN=1 +PROG=wtc1 +CPPFLAGS=-I${.CURDIR}/.. +LDADD+=-ledit -ltermlib +DPADD+=${LIBEDIT} ${LIBTERMLIB} + +.if "${WIDECHAR}" == "yes" +CPPFLAGS+=-DWIDECHAR +.endif + +.ifdef DEBUG +CPPFLAGS+=-DDEBUG +.endif + +.include Copied: vendor/NetBSD/libedit/2016-03-21/TEST/rl1.c (from r312999, vendor/NetBSD/libedit/dist/TEST/rl1.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2016-03-21/TEST/rl1.c Mon Jan 30 22:40:43 2017 (r313000, copy of r312999, vendor/NetBSD/libedit/dist/TEST/rl1.c) @@ -0,0 +1,52 @@ +/* $NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $ */ + +/*- + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#if !defined(lint) +__RCSID("$NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $"); +#endif /* not lint */ + +/* + * test.c: A little test program + */ +#include +#include + +int +main(int argc, char *argv[]) +{ + char *p; + while ((p = readline("hi$")) != NULL) { + add_history(p); + printf("%d %s\n", history_length, p); + } + return 0; +} Copied: vendor/NetBSD/libedit/2016-03-21/TEST/tc1.c (from r312996, vendor/NetBSD/libedit/dist/TEST/tc1.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2016-03-21/TEST/tc1.c Mon Jan 30 22:40:43 2017 (r313000, copy of r312996, vendor/NetBSD/libedit/dist/TEST/tc1.c) @@ -0,0 +1,304 @@ +/* $NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $ */ + +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Christos Zoulas of Cornell University. + * + * 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 University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "config.h" +#ifndef lint +__COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\ + The Regents of the University of California. All rights reserved.\n"); +#endif /* not lint */ + +#if !defined(lint) && !defined(SCCSID) +#if 0 +static char sccsid[] = "@(#)test.c 8.1 (Berkeley) 6/4/93"; +#else +__RCSID("$NetBSD: tc1.c,v 1.7 2016/02/17 19:47:49 christos Exp $"); +#endif +#endif /* not lint && not SCCSID */ + +/* + * test.c: A little test program + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "histedit.h" + +static int continuation = 0; +volatile sig_atomic_t gotsig = 0; + +static unsigned char complete(EditLine *, int); + int main(int, char **); +static char *prompt(EditLine *); +static void sig(int); + +static char * +prompt(EditLine *el) +{ + static char a[] = "\1\033[7m\1Edit$\1\033[0m\1 "; + static char b[] = "Edit> "; + + return (continuation ? b : a); +} + +static void +sig(int i) +{ + gotsig = i; +} + +static unsigned char +complete(EditLine *el, int ch) +{ + DIR *dd = opendir("."); + struct dirent *dp; + const char* ptr; + const LineInfo *lf = el_line(el); + int len; + int res = CC_ERROR; + + /* + * Find the last word + */ + for (ptr = lf->cursor - 1; + !isspace((unsigned char)*ptr) && ptr > lf->buffer; ptr--) + continue; + len = lf->cursor - ++ptr; + + for (dp = readdir(dd); dp != NULL; dp = readdir(dd)) { + if (len > strlen(dp->d_name)) + continue; + if (strncmp(dp->d_name, ptr, len) == 0) { + if (el_insertstr(el, &dp->d_name[len]) == -1) + res = CC_ERROR; + else + res = CC_REFRESH; + break; + } + } + + closedir(dd); + return res; +} + +int +main(int argc, char *argv[]) +{ + EditLine *el = NULL; + int num; + const char *buf; + Tokenizer *tok; +#if 0 + int lastevent = 0; +#endif + int ncontinuation; + History *hist; + HistEvent ev; + + (void) setlocale(LC_CTYPE, ""); + (void) signal(SIGINT, sig); + (void) signal(SIGQUIT, sig); + (void) signal(SIGHUP, sig); + (void) signal(SIGTERM, sig); + + hist = history_init(); /* Init the builtin history */ + /* Remember 100 events */ + history(hist, &ev, H_SETSIZE, 100); + + tok = tok_init(NULL); /* Initialize the tokenizer */ + + /* Initialize editline */ + el = el_init(*argv, stdin, stdout, stderr); + + el_set(el, EL_EDITOR, "vi"); /* Default editor is vi */ + el_set(el, EL_SIGNAL, 1); /* Handle signals gracefully */ + el_set(el, EL_PROMPT_ESC, prompt, '\1');/* Set the prompt function */ + + /* Tell editline to use this history interface */ + el_set(el, EL_HIST, history, hist); + + /* Add a user-defined function */ + el_set(el, EL_ADDFN, "ed-complete", "Complete argument", complete); + + /* Bind tab to it */ + el_set(el, EL_BIND, "^I", "ed-complete", NULL); + + /* + * Bind j, k in vi command mode to previous and next line, instead + * of previous and next history. + */ + el_set(el, EL_BIND, "-a", "k", "ed-prev-line", NULL); + el_set(el, EL_BIND, "-a", "j", "ed-next-line", NULL); + + /* + * Source the user's defaults file. + */ + el_source(el, NULL); + + while ((buf = el_gets(el, &num)) != NULL && num != 0) { + int ac, cc, co; +#ifdef DEBUG + int i; +#endif + const char **av; + const LineInfo *li; + li = el_line(el); +#ifdef DEBUG + (void) fprintf(stderr, "==> got %d %s", num, buf); + (void) fprintf(stderr, " > li `%.*s_%.*s'\n", + (li->cursor - li->buffer), li->buffer, + (li->lastchar - 1 - li->cursor), + (li->cursor >= li->lastchar) ? "" : li->cursor); + +#endif + if (gotsig) { + (void) fprintf(stderr, "Got signal %d.\n", (int)gotsig); + gotsig = 0; + el_reset(el); + } + + if (!continuation && num == 1) + continue; + + ac = cc = co = 0; + ncontinuation = tok_line(tok, li, &ac, &av, &cc, &co); + if (ncontinuation < 0) { + (void) fprintf(stderr, "Internal error\n"); + continuation = 0; + continue; + } +#ifdef DEBUG + (void) fprintf(stderr, " > nc %d ac %d cc %d co %d\n", + ncontinuation, ac, cc, co); +#endif +#if 0 + if (continuation) { + /* + * Append to the right event in case the user + * moved around in history. + */ + if (history(hist, &ev, H_SET, lastevent) == -1) + err(1, "%d: %s", lastevent, ev.str); + history(hist, &ev, H_ADD , buf); + } else { + history(hist, &ev, H_ENTER, buf); + lastevent = ev.num; + } +#else + /* Simpler */ + history(hist, &ev, continuation ? H_APPEND : H_ENTER, buf); +#endif + + continuation = ncontinuation; + ncontinuation = 0; + if (continuation) + continue; +#ifdef DEBUG + for (i = 0; i < ac; i++) { + (void) fprintf(stderr, " > arg# %2d ", i); + if (i != cc) + (void) fprintf(stderr, "`%s'\n", av[i]); + else + (void) fprintf(stderr, "`%.*s_%s'\n", + co, av[i], av[i] + co); + } +#endif + + if (strcmp(av[0], "history") == 0) { + int rv; + + switch (ac) { + case 1: + for (rv = history(hist, &ev, H_LAST); rv != -1; + rv = history(hist, &ev, H_PREV)) + (void) fprintf(stdout, "%4d %s", + ev.num, ev.str); + break; + + case 2: + if (strcmp(av[1], "clear") == 0) + history(hist, &ev, H_CLEAR); + else + goto badhist; + break; + + case 3: + if (strcmp(av[1], "load") == 0) + history(hist, &ev, H_LOAD, av[2]); + else if (strcmp(av[1], "save") == 0) + history(hist, &ev, H_SAVE, av[2]); + break; + + badhist: + default: + (void) fprintf(stderr, + "Bad history arguments\n"); + break; + } + } else if (el_parse(el, ac, av) == -1) { + switch (fork()) { + case 0: + execvp(av[0], (char *const *)__UNCONST(av)); + perror(av[0]); + _exit(1); + /*NOTREACHED*/ + break; + + case -1: + perror("fork"); + break; + + default: + if (wait(&num) == -1) + perror("wait"); + (void) fprintf(stderr, "Exit %x\n", num); + break; + } + } + + tok_reset(tok); + } + + el_end(el); + tok_end(tok); + history_end(hist); + + return (0); +} Copied: vendor/NetBSD/libedit/2016-03-21/TEST/wtc1.c (from r312996, vendor/NetBSD/libedit/dist/TEST/wtc1.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2016-03-21/TEST/wtc1.c Mon Jan 30 22:40:43 2017 (r313000, copy of r312996, vendor/NetBSD/libedit/dist/TEST/wtc1.c) @@ -0,0 +1,278 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../histedit.h" + + +static int continuation; +volatile sig_atomic_t gotsig; +static const char hfile[] = ".whistory"; + +static wchar_t * +prompt(EditLine *el) +{ + static wchar_t a[] = L"\1\033[7m\1Edit$\1\033[0m\1 "; + static wchar_t b[] = L"Edit> "; + + return continuation ? b : a; +} + + +static void +sig(int i) +{ + gotsig = i; +} + +const char * +my_wcstombs(const wchar_t *wstr) +{ + static struct { + char *str; + int len; + } buf; + + int needed = wcstombs(0, wstr, 0) + 1; + if (needed > buf.len) { + buf.str = malloc(needed); + buf.len = needed; + } + wcstombs(buf.str, wstr, needed); + buf.str[needed - 1] = 0; + + return buf.str; +} + + +static unsigned char +complete(EditLine *el, int ch) +{ + DIR *dd = opendir("."); + struct dirent *dp; + const wchar_t *ptr; + char *buf, *bptr; + const LineInfoW *lf = el_wline(el); + int len, mblen, i; + unsigned char res = 0; + wchar_t dir[1024]; + + /* Find the last word */ + for (ptr = lf->cursor -1; !iswspace(*ptr) && ptr > lf->buffer; --ptr) + continue; + len = lf->cursor - ++ptr; + + /* Convert last word to multibyte encoding, so we can compare to it */ + wctomb(NULL, 0); /* Reset shift state */ + mblen = MB_LEN_MAX * len + 1; + buf = bptr = malloc(mblen); + if (buf == NULL) + err(1, "malloc"); + for (i = 0; i < len; ++i) { + /* Note: really should test for -1 return from wctomb */ + bptr += wctomb(bptr, ptr[i]); + } + *bptr = 0; /* Terminate multibyte string */ + mblen = bptr - buf; + + /* Scan directory for matching name */ + for (dp = readdir(dd); dp != NULL; dp = readdir(dd)) { + if (mblen > strlen(dp->d_name)) + continue; + if (strncmp(dp->d_name, buf, mblen) == 0) { + mbstowcs(dir, &dp->d_name[mblen], + sizeof(dir) / sizeof(*dir)); + if (el_winsertstr(el, dir) == -1) + res = CC_ERROR; + else + res = CC_REFRESH; + break; + } + } + + closedir(dd); + free(buf); + return res; +} + + +int +main(int argc, char *argv[]) +{ + EditLine *el = NULL; + int numc, ncontinuation; + const wchar_t *line; + TokenizerW *tok; + HistoryW *hist; + HistEventW ev; +#ifdef DEBUG + int i; +#endif + + setlocale(LC_ALL, ""); + + (void)signal(SIGINT, sig); + (void)signal(SIGQUIT, sig); + (void)signal(SIGHUP, sig); + (void)signal(SIGTERM, sig); + + hist = history_winit(); /* Init built-in history */ + history_w(hist, &ev, H_SETSIZE, 100); /* Remember 100 events */ + history_w(hist, &ev, H_LOAD, hfile); + + tok = tok_winit(NULL); /* Init the tokenizer */ + + el = el_init(argv[0], stdin, stdout, stderr); + + el_wset(el, EL_EDITOR, L"vi"); /* Default editor is vi */ + el_wset(el, EL_SIGNAL, 1); /* Handle signals gracefully */ + el_wset(el, EL_PROMPT_ESC, prompt, '\1'); /* Set the prompt function */ + + el_wset(el, EL_HIST, history_w, hist); /* FIXME - history_w? */ + + /* Add a user-defined function */ + el_wset(el, EL_ADDFN, L"ed-complete", L"Complete argument", complete); + + /* Bind to it */ + el_wset(el, EL_BIND, L"^I", L"ed-complete", NULL); + + /* + * Bind j, k in vi command mode to previous and next line, instead + * of previous and next history. + */ + el_wset(el, EL_BIND, L"-a", L"k", L"ed-prev-line", NULL); + el_wset(el, EL_BIND, L"-a", L"j", L"ed-next-line", NULL); + + /* Source the user's defaults file. */ + el_source(el, NULL); + + while((line = el_wgets(el, &numc)) != NULL && numc != 0) { + int ac, cc, co, rc; + const wchar_t **av; + + const LineInfoW *li; + li = el_wline(el); + +#ifdef DEBUG + (void)fwprintf(stderr, L"==> got %d %ls", numc, line); + (void)fwprintf(stderr, L" > li `%.*ls_%.*ls'\n", + (li->cursor - li->buffer), li->buffer, + (li->lastchar - 1 - li->cursor), + (li->cursor >= li->lastchar) ? L"" : li->cursor); +#endif + + if (gotsig) { + (void)fprintf(stderr, "Got signal %d.\n", (int)gotsig); + gotsig = 0; + el_reset(el); + } + + if(!continuation && numc == 1) + continue; /* Only got a linefeed */ + + ac = cc = co = 0; + ncontinuation = tok_wline(tok, li, &ac, &av, &cc, &co); + if (ncontinuation < 0) { + (void) fprintf(stderr, "Internal error\n"); + continuation = 0; + continue; + } + +#ifdef DEBUG + (void)fprintf(stderr, " > nc %d ac %d cc %d co %d\n", + ncontinuation, ac, cc, co); +#endif + history_w(hist, &ev, continuation ? H_APPEND : H_ENTER, line); + + continuation = ncontinuation; + ncontinuation = 0; + if(continuation) + continue; + +#ifdef DEBUG + for (i = 0; i < ac; ++i) { + (void)fwprintf(stderr, L" > arg# %2d ", i); + if (i != cc) + (void)fwprintf(stderr, L"`%ls'\n", av[i]); + else + (void)fwprintf(stderr, L"`%.*ls_%ls'\n", + co, av[i], av[i] + co); + } +#endif + + if (wcscmp (av[0], L"history") == 0) { + switch(ac) { + case 1: + for(rc = history_w(hist, &ev, H_LAST); + rc != -1; + rc = history_w(hist, &ev, H_PREV)) + (void)fwprintf(stdout, L"%4d %ls", + ev.num, ev.str); + break; + case 2: + if (wcscmp(av[1], L"clear") == 0) + history_w(hist, &ev, H_CLEAR); + else + goto badhist; + break; + case 3: + if (wcscmp(av[1], L"load") == 0) + history_w(hist, &ev, H_LOAD, + my_wcstombs(av[2])); + else if (wcscmp(av[1], L"save") == 0) + history_w(hist, &ev, H_SAVE, + my_wcstombs(av[2])); + else + goto badhist; + break; + badhist: + default: + (void)fprintf(stderr, + "Bad history arguments\n"); + break; + } + } else if (el_wparse(el, ac, av) == -1) { + switch (fork()) { + case 0: { + Tokenizer *ntok = tok_init(NULL); + int nargc; + const char **nav; + tok_str(ntok, my_wcstombs(line), &nargc, &nav); + execvp(nav[0],(char **)nav); + perror(nav[0]); + _exit(1); + /* NOTREACHED */ + break; + } + case -1: + perror("fork"); + break; + default: + if (wait(&rc) == -1) + perror("wait"); + (void)fprintf(stderr, "Exit %x\n", rc); + break; + } + } + + tok_wreset(tok); + } + + el_end(el); + tok_wend(tok); + history_w(hist, &ev, H_SAVE, hfile); + history_wend(hist); + + fprintf(stdout, "\n"); + return 0; +} + + Copied: vendor/NetBSD/libedit/2016-03-21/chared.c (from r312996, vendor/NetBSD/libedit/dist/chared.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libedit/2016-03-21/chared.c Mon Jan 30 22:40:43 2017 (r313000, copy of r312996, vendor/NetBSD/libedit/dist/chared.c) @@ -0,0 +1,775 @@ +/* $NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $ */ + +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Christos Zoulas of Cornell University. + * + * 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 University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "config.h" +#if !defined(lint) && !defined(SCCSID) +#if 0 +static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93"; +#else +__RCSID("$NetBSD: chared.c,v 1.49 2016/02/24 14:29:21 christos Exp $"); +#endif +#endif /* not lint && not SCCSID */ + +/* + * chared.c: Character editor utilities + */ +#include +#include +#include + +#include "el.h" +#include "common.h" + +private void ch__clearmacro (EditLine *); + +/* value to leave unused in line buffer */ +#define EL_LEAVE 2 + +/* cv_undo(): + * Handle state for the vi undo command + */ +protected void +cv_undo(EditLine *el) +{ + c_undo_t *vu = &el->el_chared.c_undo; + c_redo_t *r = &el->el_chared.c_redo; + size_t size; + + /* Save entire line for undo */ + size = (size_t)(el->el_line.lastchar - el->el_line.buffer); + vu->len = (ssize_t)size; + vu->cursor = (int)(el->el_line.cursor - el->el_line.buffer); + (void)memcpy(vu->buf, el->el_line.buffer, size * sizeof(*vu->buf)); + + /* save command info for redo */ + r->count = el->el_state.doingarg ? el->el_state.argument : 0; + r->action = el->el_chared.c_vcmd.action; + r->pos = r->buf; + r->cmd = el->el_state.thiscmd; + r->ch = el->el_state.thisch; +} + +/* cv_yank(): + * Save yank/delete data for paste + */ +protected void +cv_yank(EditLine *el, const Char *ptr, int size) +{ + c_kill_t *k = &el->el_chared.c_kill; + + (void)memcpy(k->buf, ptr, (size_t)size * sizeof(*k->buf)); + k->last = k->buf + size; +} + + +/* c_insert(): + * Insert num characters + */ +protected void +c_insert(EditLine *el, int num) +{ + Char *cp; + + if (el->el_line.lastchar + num >= el->el_line.limit) { + if (!ch_enlargebufs(el, (size_t)num)) + return; /* can't go past end of buffer */ + } + + if (el->el_line.cursor < el->el_line.lastchar) { + /* if I must move chars */ + for (cp = el->el_line.lastchar; cp >= el->el_line.cursor; cp--) + cp[num] = *cp; + } + el->el_line.lastchar += num; +} + + +/* c_delafter(): + * Delete num characters after the cursor + */ +protected void +c_delafter(EditLine *el, int num) +{ + + if (el->el_line.cursor + num > el->el_line.lastchar) + num = (int)(el->el_line.lastchar - el->el_line.cursor); + + if (el->el_map.current != el->el_map.emacs) { + cv_undo(el); + cv_yank(el, el->el_line.cursor, num); + } + + if (num > 0) { + Char *cp; + + for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++) + *cp = cp[num]; + + el->el_line.lastchar -= num; + } +} + + +/* c_delafter1(): + * Delete the character after the cursor, do not yank + */ +protected void +c_delafter1(EditLine *el) +{ + Char *cp; + + for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++) + *cp = cp[1]; + + el->el_line.lastchar--; +} + + +/* c_delbefore(): + * Delete num characters before the cursor + */ +protected void +c_delbefore(EditLine *el, int num) +{ + + if (el->el_line.cursor - num < el->el_line.buffer) + num = (int)(el->el_line.cursor - el->el_line.buffer); + + if (el->el_map.current != el->el_map.emacs) { + cv_undo(el); + cv_yank(el, el->el_line.cursor - num, num); + } + + if (num > 0) { + Char *cp; + + for (cp = el->el_line.cursor - num; + cp <= el->el_line.lastchar; + cp++) + *cp = cp[num]; + + el->el_line.lastchar -= num; + } +} + + +/* c_delbefore1(): + * Delete the character before the cursor, do not yank + */ +protected void +c_delbefore1(EditLine *el) +{ + Char *cp; + + for (cp = el->el_line.cursor - 1; cp <= el->el_line.lastchar; cp++) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jan 30 22:47:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6189ECC8D3A; Mon, 30 Jan 2017 22:47:50 +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 146EF195A; Mon, 30 Jan 2017 22:47:50 +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 v0UMlnRP010450; Mon, 30 Jan 2017 22:47:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UMlnNr010449; Mon, 30 Jan 2017 22:47:49 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701302247.v0UMlnNr010449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 30 Jan 2017 22:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313001 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 22:47:50 -0000 Author: glebius Date: Mon Jan 30 22:47:48 2017 New Revision: 313001 URL: https://svnweb.freebsd.org/changeset/base/313001 Log: Fix indentantion in pf_purge_thread(). No functional change. Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Mon Jan 30 22:40:43 2017 (r313000) +++ head/sys/netpfil/pf/pf.c Mon Jan 30 22:47:48 2017 (r313001) @@ -1437,35 +1437,41 @@ pf_purge_thread(void *unused __unused) VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - if (pf_end_threads) { - pf_end_threads++; - wakeup(pf_purge_thread); - kproc_exit(0); - } + if (pf_end_threads) { + pf_end_threads++; + wakeup(pf_purge_thread); + kproc_exit(0); + } - /* Wait while V_pf_default_rule.timeout is initialized. */ - if (V_pf_vnet_active == 0) { - CURVNET_RESTORE(); - continue; - } + /* Wait until V_pf_default_rule is initialized. */ + if (V_pf_vnet_active == 0) { + CURVNET_RESTORE(); + continue; + } - /* Process 1/interval fraction of the state table every run. */ - idx = pf_purge_expired_states(idx, pf_hashmask / + /* + * Process 1/interval fraction of the state + * table every run. + */ + idx = pf_purge_expired_states(idx, pf_hashmask / (V_pf_default_rule.timeout[PFTM_INTERVAL] * 10)); - /* Purge other expired types every PFTM_INTERVAL seconds. */ - if (idx == 0) { /* - * Order is important: - * - states and src nodes reference rules - * - states and rules reference kifs + * Purge other expired types every + * PFTM_INTERVAL seconds. */ - pf_purge_expired_fragments(); - pf_purge_expired_src_nodes(); - pf_purge_unlinked_rules(); - pfi_kif_purge(); - } - CURVNET_RESTORE(); + if (idx == 0) { + /* + * Order is important: + * - states and src nodes reference rules + * - states and rules reference kifs + */ + pf_purge_expired_fragments(); + pf_purge_expired_src_nodes(); + pf_purge_unlinked_rules(); + pfi_kif_purge(); + } + CURVNET_RESTORE(); } VNET_LIST_RUNLOCK(); } From owner-svn-src-all@freebsd.org Mon Jan 30 23:00:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95359CC82FF; Mon, 30 Jan 2017 23:00:53 +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 644C71A1; Mon, 30 Jan 2017 23:00:53 +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 v0UN0qSe014680; Mon, 30 Jan 2017 23:00:52 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UN0pfN014671; Mon, 30 Jan 2017 23:00:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201701302300.v0UN0pfN014671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 30 Jan 2017 23:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313002 - in head/lib/libedit: . TEST X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 23:00:53 -0000 Author: pfg Date: Mon Jan 30 23:00:51 2017 New Revision: 313002 URL: https://svnweb.freebsd.org/changeset/base/313002 Log: MFV 312999: Update libedit 2016-03-21 Minor cleanups plus some license syncing. Obtained from: NetBSD X-MFC with: r312997 Modified: head/lib/libedit/Makefile head/lib/libedit/TEST/rl1.c head/lib/libedit/chartype.h head/lib/libedit/common.c head/lib/libedit/read.c head/lib/libedit/refresh.c head/lib/libedit/terminal.c head/lib/libedit/tty.c head/lib/libedit/vi.c Directory Properties: head/lib/libedit/ (props changed) Modified: head/lib/libedit/Makefile ============================================================================== --- head/lib/libedit/Makefile Mon Jan 30 22:47:48 2017 (r313001) +++ head/lib/libedit/Makefile Mon Jan 30 23:00:51 2017 (r313002) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.55 2016/02/24 14:25:38 christos Exp $ +# $NetBSD: Makefile,v 1.56 2016/03/02 19:24:20 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ @@ -38,8 +38,8 @@ INCS= histedit.h SRCS+= tokenizern.c historyn.c CLEANFILES+= tokenizern.c historyn.c CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR -CFLAGS+= #-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH -CFLAGS+= #-DDEBUG_PASTE -DDEBUG_EDIT +#CFLAGS+= -DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH +#CFLAGS+= -DDEBUG_PASTE -DDEBUG_EDIT WARNS?= 1 Modified: head/lib/libedit/TEST/rl1.c ============================================================================== --- head/lib/libedit/TEST/rl1.c Mon Jan 30 22:47:48 2017 (r313001) +++ head/lib/libedit/TEST/rl1.c Mon Jan 30 23:00:51 2017 (r313002) @@ -1,4 +1,4 @@ -/* $NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $ */ +/* $NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $"); +__RCSID("$NetBSD: rl1.c,v 1.2 2016/02/29 00:54:19 christos Exp $"); #endif /* not lint */ __FBSDID("$FreeBSD$"); Modified: head/lib/libedit/chartype.h ============================================================================== --- head/lib/libedit/chartype.h Mon Jan 30 22:47:48 2017 (r313001) +++ head/lib/libedit/chartype.h Mon Jan 30 23:00:51 2017 (r313002) @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.h,v 1.23 2016/02/24 17:20:01 christos Exp $ */ +/* $NetBSD: chartype.h,v 1.25 2016/03/07 00:05:20 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -65,6 +65,7 @@ #define FUNW(type) type ## _w #define TYPE(type) type ## W #define FSTR "%ls" +#define FSTARSTR "%.*ls" #define STR(x) L ## x #define UC(c) c #define Isalpha(x) iswalpha(x) @@ -117,6 +118,7 @@ Width(wchar_t c) #define FUNW(type) type #define TYPE(type) type #define FSTR "%s" +#define FSTARSTR "%.*s" #define STR(x) x #define UC(c) (unsigned char)(c) Modified: head/lib/libedit/common.c ============================================================================== --- head/lib/libedit/common.c Mon Jan 30 22:47:48 2017 (r313001) +++ head/lib/libedit/common.c Mon Jan 30 23:00:51 2017 (r313002) @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $ */ +/* $NetBSD: common.c,v 1.40 2016/03/02 19:24:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: common.c,v 1.39 2016/02/24 14:25:38 christos Exp $"); +__RCSID("$NetBSD: common.c,v 1.40 2016/03/02 19:24:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -149,8 +149,9 @@ ed_delete_next_char(EditLine *el, wint_t { #ifdef DEBUG_EDIT #define EL el->el_line - (void) fprintf(el->el_errlfile, - "\nD(b: %x(%s) c: %x(%s) last: %x(%s) limit: %x(%s)\n", + (void) fprintf(el->el_errfile, + "\nD(b: %p(" FSTR ") c: %p(" FSTR ") last: %p(" FSTR + ") limit: %p(" FSTR ")\n", EL.buffer, EL.buffer, EL.cursor, EL.cursor, EL.lastchar, EL.lastchar, EL.limit, EL.limit); #endif Modified: head/lib/libedit/read.c ============================================================================== --- head/lib/libedit/read.c Mon Jan 30 22:47:48 2017 (r313001) +++ head/lib/libedit/read.c Mon Jan 30 23:00:51 2017 (r313002) @@ -1,4 +1,4 @@ -/* $NetBSD: read.c,v 1.85 2016/02/24 17:20:01 christos Exp $ */ +/* $NetBSD: read.c,v 1.86 2016/03/02 19:24:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: read.c,v 1.85 2016/02/24 17:20:01 christos Exp $"); +__RCSID("$NetBSD: read.c,v 1.86 2016/03/02 19:24:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -617,7 +617,7 @@ FUN(el,gets)(EditLine *el, int *nread) break; if (b->name) (void) fprintf(el->el_errfile, - "Executing %s\n", b->name); + "Executing " FSTR "\n", b->name); else (void) fprintf(el->el_errfile, "Error command = %d\n", cmdnum); Modified: head/lib/libedit/refresh.c ============================================================================== --- head/lib/libedit/refresh.c Mon Jan 30 22:47:48 2017 (r313001) +++ head/lib/libedit/refresh.c Mon Jan 30 23:00:51 2017 (r313002) @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.44 2016/02/17 19:47:49 christos Exp $ */ +/* $NetBSD: refresh.c,v 1.45 2016/03/02 19:24:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: refresh.c,v 1.44 2016/02/17 19:47:49 christos Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.45 2016/03/02 19:24:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -63,7 +63,7 @@ private void re__strncopy(Char *, Char * private void re__copy_and_pad(Char *, const Char *, size_t); #ifdef DEBUG_REFRESH -private void re_printstr(EditLine *, const char *, char *, char *); +private void re_printstr(EditLine *, const char *, Char *, Char *); #define __F el->el_errfile #define ELRE_ASSERT(a, b, c) do \ if (/*CONSTCOND*/ a) { \ @@ -77,7 +77,7 @@ private void re_printstr(EditLine *, con * Print a string on the debugging pty */ private void -re_printstr(EditLine *el, const char *str, char *f, char *t) +re_printstr(EditLine *el, const char *str, Char *f, Char *t) { ELRE_DEBUG(1, (__F, "%s:\"", str)); @@ -207,7 +207,7 @@ re_refresh(EditLine *el) size_t termsz; #endif - ELRE_DEBUG(1, (__F, "el->el_line.buffer = :%s:\r\n", + ELRE_DEBUG(1, (__F, "el->el_line.buffer = :" FSTR ":\r\n", el->el_line.buffer)); /* reset the Drawing cursor */ @@ -295,7 +295,8 @@ re_refresh(EditLine *el) ELRE_DEBUG(1, (__F, "term.h=%d vcur.h=%d vcur.v=%d vdisplay[0]=\r\n:%80.80s:\r\n", el->el_terminal.t_size.h, el->el_refresh.r_cursor.h, - el->el_refresh.r_cursor.v, ct_encode_string(el->el_vdisplay[0]))); + el->el_refresh.r_cursor.v, ct_encode_string(el->el_vdisplay[0], + &el->el_scratch))); ELRE_DEBUG(1, (__F, "updating %d lines.\r\n", el->el_refresh.r_newcv)); for (i = 0; i <= el->el_refresh.r_newcv; i++) { @@ -323,7 +324,7 @@ re_refresh(EditLine *el) /* This Strlen should be safe even with MB_FILL_CHARs */ terminal_clear_EOL(el, (int) Strlen(el->el_display[i])); #ifdef DEBUG_REFRESH - terminal_overwrite(el, "C\b", (size_t)2); + terminal_overwrite(el, STR("C\b"), 2); #endif /* DEBUG_REFRESH */ el->el_display[i][0] = '\0'; } @@ -370,8 +371,9 @@ re_insert(EditLine *el __attribute__((__ ELRE_DEBUG(1, (__F, "re_insert() starting: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); - ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s))); + num, dat, dlen, ct_encode_string(d, &el->el_scratch))); + ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s, + &el->el_scratch))); /* open up the space for num chars */ if (num > 0) { @@ -384,8 +386,9 @@ re_insert(EditLine *el __attribute__((__ ELRE_DEBUG(1, (__F, "re_insert() after insert: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); - ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s))); + num, dat, dlen, ct_encode_string(d, &el->el_scratch))); + ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s, + &el->el_scratch))); /* copy the characters */ for (a = d + dat; (a < d + dlen) && (num > 0); num--) @@ -420,7 +423,7 @@ re_delete(EditLine *el __attribute__((__ } ELRE_DEBUG(1, (__F, "re_delete() starting: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); + num, dat, dlen, ct_encode_string(d, &el->el_scratch))); /* open up the space for num chars */ if (num > 0) { @@ -432,7 +435,7 @@ re_delete(EditLine *el __attribute__((__ } ELRE_DEBUG(1, (__F, "re_delete() after delete: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); + num, dat, dlen, ct_encode_string(d, &el->el_scratch))); } @@ -690,9 +693,9 @@ re_update_line(EditLine *el, Char *old, sx = (int)((nls - nse) - (ols - ose)); ELRE_DEBUG(1, (__F, "fx %d, sx %d\n", fx, sx)); - ELRE_DEBUG(1, (__F, "ofd %d, osb %d, ose %d, ols %d, oe %d\n", + ELRE_DEBUG(1, (__F, "ofd %td, osb %td, ose %td, ols %td, oe %td\n", ofd - old, osb - old, ose - old, ols - old, oe - old)); - ELRE_DEBUG(1, (__F, "nfd %d, nsb %d, nse %d, nls %d, ne %d\n", + ELRE_DEBUG(1, (__F, "nfd %td, nsb %td, nse %td, nls %td, ne %td\n", nfd - new, nsb - new, nse - new, nls - new, ne - new)); ELRE_DEBUG(1, (__F, "xxx-xxx:\"00000000001111111111222222222233333333334\"\r\n")); @@ -766,7 +769,7 @@ re_update_line(EditLine *el, Char *old, if ((nsb != nfd) && fx > 0 && ((p - old) + fx <= el->el_terminal.t_size.h)) { ELRE_DEBUG(1, - (__F, "first diff insert at %d...\r\n", nfd - new)); + (__F, "first diff insert at %td...\r\n", nfd - new)); /* * Move to the first char to insert, where the first diff is. */ @@ -805,7 +808,7 @@ re_update_line(EditLine *el, Char *old, } } else if (fx < 0) { ELRE_DEBUG(1, - (__F, "first diff delete at %d...\r\n", ofd - old)); + (__F, "first diff delete at %td...\r\n", ofd - old)); /* * move to the first char to delete where the first diff is */ @@ -852,7 +855,7 @@ re_update_line(EditLine *el, Char *old, if (sx < 0 && (ose - old) + fx < el->el_terminal.t_size.h) { ELRE_DEBUG(1, (__F, - "second diff delete at %d...\r\n", (ose - old) + fx)); + "second diff delete at %td...\r\n", (ose - old) + fx)); /* * Check if we have stuff to delete */ @@ -890,7 +893,7 @@ re_update_line(EditLine *el, Char *old, * if we have a first insert AND WE HAVEN'T ALREADY DONE IT... */ if ((nsb != nfd) && (osb - ofd) <= (nsb - nfd) && (fx == 0)) { - ELRE_DEBUG(1, (__F, "late first diff insert at %d...\r\n", + ELRE_DEBUG(1, (__F, "late first diff insert at %td...\r\n", nfd - new)); terminal_move_to_char(el, (int)(nfd - new)); Modified: head/lib/libedit/terminal.c ============================================================================== --- head/lib/libedit/terminal.c Mon Jan 30 22:47:48 2017 (r313001) +++ head/lib/libedit/terminal.c Mon Jan 30 23:00:51 2017 (r313002) @@ -1,4 +1,4 @@ -/* $NetBSD: terminal.c,v 1.22 2016/02/17 19:47:49 christos Exp $ */ +/* $NetBSD: terminal.c,v 1.24 2016/03/22 01:38:17 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95"; #else -__RCSID("$NetBSD: terminal.c,v 1.22 2016/02/17 19:47:49 christos Exp $"); +__RCSID("$NetBSD: terminal.c,v 1.24 2016/03/22 01:38:17 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -380,7 +380,7 @@ terminal_alloc(EditLine *el, const struc */ tlen = 0; for (tmp = tlist; tmp < &tlist[T_str]; tmp++) - if (*tmp != NULL && *tmp != '\0' && *tmp != *str) { + if (*tmp != NULL && **tmp != '\0' && *tmp != *str) { char *ptr; for (ptr = *tmp; *ptr != '\0'; termbuf[tlen++] = *ptr++) @@ -668,7 +668,7 @@ terminal_overwrite(EditLine *el, const C if (n > (size_t)el->el_terminal.t_size.h) { #ifdef DEBUG_SCREEN (void) fprintf(el->el_errfile, - "%s: n is ridiculous: %d\r\n", __func__, n); + "%s: n is ridiculous: %zu\r\n", __func__, n); #endif /* DEBUG_SCREEN */ return; } Modified: head/lib/libedit/tty.c ============================================================================== --- head/lib/libedit/tty.c Mon Jan 30 22:47:48 2017 (r313001) +++ head/lib/libedit/tty.c Mon Jan 30 23:00:51 2017 (r313002) @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.58 2016/02/27 18:13:21 christos Exp $ */ +/* $NetBSD: tty.c,v 1.59 2016/03/22 01:34:32 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tty.c,v 1.58 2016/02/27 18:13:21 christos Exp $"); +__RCSID("$NetBSD: tty.c,v 1.59 2016/03/22 01:34:32 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -500,10 +500,12 @@ tty_setup(EditLine *el) { int rst = 1; - el->el_tty.t_initialized = 0; if (el->el_flags & EDIT_DISABLED) return 0; + if (el->el_tty.t_initialized) + return -1; + if (!isatty(el->el_outfd)) { #ifdef DEBUG_TTY (void) fprintf(el->el_errfile, "%s: isatty: %s\n", __func__, @@ -573,6 +575,7 @@ tty_init(EditLine *el) el->el_tty.t_mode = EX_IO; el->el_tty.t_vdisable = _POSIX_VDISABLE; + el->el_tty.t_initialized = 0; (void) memcpy(el->el_tty.t_t, ttyperm, sizeof(ttyperm_t)); (void) memcpy(el->el_tty.t_c, ttychar, sizeof(ttychar_t)); return tty_setup(el); @@ -589,7 +592,7 @@ tty_end(EditLine *el) if (el->el_flags & EDIT_DISABLED) return; - if (el->el_tty.t_initialized) + if (!el->el_tty.t_initialized) return; if (tty_setty(el, TCSAFLUSH, &el->el_tty.t_or) == -1) { Modified: head/lib/libedit/vi.c ============================================================================== --- head/lib/libedit/vi.c Mon Jan 30 22:47:48 2017 (r313001) +++ head/lib/libedit/vi.c Mon Jan 30 23:00:51 2017 (r313002) @@ -1,4 +1,4 @@ -/* $NetBSD: vi.c,v 1.54 2016/02/17 19:47:49 christos Exp $ */ +/* $NetBSD: vi.c,v 1.55 2016/03/02 19:24:20 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: vi.c,v 1.54 2016/02/17 19:47:49 christos Exp $"); +__RCSID("$NetBSD: vi.c,v 1.55 2016/03/02 19:24:20 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include @@ -105,7 +105,8 @@ cv_paste(EditLine *el, wint_t c) if (k->buf == NULL || len == 0) return CC_ERROR; #ifdef DEBUG_PASTE - (void) fprintf(el->el_errfile, "Paste: \"%.*s\"\n", (int)len, k->buf); + (void) fprintf(el->el_errfile, "Paste: \"" FSTARSTR "\"\n", (int)len, + k->buf); #endif cv_undo(el); From owner-svn-src-all@freebsd.org Mon Jan 30 23:02:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05572CC84C5; Mon, 30 Jan 2017 23:02:02 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 71CB476F; Mon, 30 Jan 2017 23:02:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v0UN20wb061288 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Jan 2017 15:02:00 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v0UN20c6061287; Mon, 30 Jan 2017 15:02:00 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 30 Jan 2017 15:02:00 -0800 From: Gleb Smirnoff To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys Message-ID: <20170130230200.GD2611@FreeBSD.org> References: <201701301257.v0UCvNrK065993@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701301257.v0UCvNrK065993@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 23:02:02 -0000 On Mon, Jan 30, 2017 at 12:57:23PM +0000, Edward Tomasz Napierala wrote: E> Author: trasz E> Date: Mon Jan 30 12:57:22 2017 E> New Revision: 312988 E> URL: https://svnweb.freebsd.org/changeset/base/312988 E> E> Log: E> Add kern_listen(), kern_shutdown(), and kern_socket(), and use them E> instead of their sys_*() counterparts in various compats. The svr4 E> is left untouched, because there's no point. Btw, any good reasons to keep SVR4 support for FreeBSD 12? I recently reviewed some socket code and noticed, that having SVR4-compatible sockets we need COMPAT_OLDSOCK to be compiled in, which isn't in GENERIC, of course. Thus doing just 'kldload svr4' on GENERIC won't allow to create SVR4 compatible sockets. Not even mentioning that COMPAT_OLDSOCK is probably broken since nobody needs it and it has no regression tests. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Mon Jan 30 23:13:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0B71CC8E06; Mon, 30 Jan 2017 23:13:42 +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 B071414F4; Mon, 30 Jan 2017 23:13:42 +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 v0UNDfPc022499; Mon, 30 Jan 2017 23:13:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UNDf3h022498; Mon, 30 Jan 2017 23:13:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701302313.v0UNDf3h022498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 30 Jan 2017 23:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313003 - head/libexec/rtld-elf/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 23:13:43 -0000 Author: jhb Date: Mon Jan 30 23:13:41 2017 New Revision: 313003 URL: https://svnweb.freebsd.org/changeset/base/313003 Log: Remove a duplicate store when performing REL32 relocations in rtld. The duplicate call to store_ptr() was added in r204687, but it should have no effect as it only stores an Elf_Sword and the later store_ptr() does a write that is at least as large if not larger. Reviewed by: jmallett Obtained from: CheriBSD (sort of) Sponsored by: DARPA / AFRL Modified: head/libexec/rtld-elf/mips/reloc.c Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Mon Jan 30 23:00:51 2017 (r313002) +++ head/libexec/rtld-elf/mips/reloc.c Mon Jan 30 23:13:41 2017 (r313003) @@ -215,7 +215,6 @@ _rtld_relocate_nonplt_self(Elf_Dyn *dynp sym = symtab + r_symndx; assert(ELF_ST_BIND(sym->st_info) == STB_LOCAL); val += relocbase; - store_ptr(where, val, sizeof(Elf_Sword)); dbg("REL32/L(%p) %p -> %p in ", where, (void *)old, (void *)val); store_ptr(where, val, rlen); From owner-svn-src-all@freebsd.org Tue Jan 31 01:48:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F4003CC7D13; Tue, 31 Jan 2017 01:48:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3AA4B33; Tue, 31 Jan 2017 01:48:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0V1mtpJ082937; Tue, 31 Jan 2017 01:48:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0V1mtGk082936; Tue, 31 Jan 2017 01:48:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701310148.v0V1mtGk082936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 31 Jan 2017 01:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313004 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 01:48:57 -0000 Author: adrian Date: Tue Jan 31 01:48:55 2017 New Revision: 313004 URL: https://svnweb.freebsd.org/changeset/base/313004 Log: Fix compilation! Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Jan 30 23:13:41 2017 (r313003) +++ head/sys/modules/Makefile Tue Jan 31 01:48:55 2017 (r313004) @@ -523,8 +523,8 @@ SUBDIR+= zfs .endif .if ${MACHINE_CPUARCH} == "mips" - _hwpmc_mips24k= hwpmc_mips24k - _hwpmc_mips74k= hwpmc_mips74k +_hwpmc_mips24k= hwpmc_mips24k +_hwpmc_mips74k= hwpmc_mips74k .endif .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ From owner-svn-src-all@freebsd.org Tue Jan 31 01:55:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BDC3CC90FE; Tue, 31 Jan 2017 01:55:31 +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 DF49F1135; Tue, 31 Jan 2017 01:55:30 +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 v0V1tUjg087023; Tue, 31 Jan 2017 01:55:30 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0V1tTrY087021; Tue, 31 Jan 2017 01:55:29 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701310155.v0V1tTrY087021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 31 Jan 2017 01:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313005 - in head/sys: conf modules/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 01:55:31 -0000 Author: jhibbits Date: Tue Jan 31 01:55:29 2017 New Revision: 313005 URL: https://svnweb.freebsd.org/changeset/base/313005 Log: Update CFLAGS for clang compatibility * Clang/llvm does not (yet) support -m(no-)spe, so make it gcc-only * Clang now supports -msoft-float, and does not appear to recognize "-disable-ppc-float-in-variadic", which appears to have been a crutch until soft-float was implemented. It's now implemented for both 32- and 64-bit. * Clang/llvm use a 'medium' code model by default for powerpc64, supporting up to 4GB TOC, and does not support the '-mminimal-toc' option. Given both of these, make -mminimal-toc gcc-only. MFC after: 2 weeks Modified: head/sys/conf/kern.mk head/sys/modules/zfs/Makefile Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Jan 31 01:48:55 2017 (r313004) +++ head/sys/conf/kern.mk Tue Jan 31 01:55:29 2017 (r313005) @@ -161,14 +161,12 @@ INLINE_LIMIT?= 8000 # Also explicitly disable Altivec instructions inside the kernel. # .if ${MACHINE_CPUARCH} == "powerpc" -CFLAGS+= -mno-altivec -CFLAGS.clang+= -mllvm -disable-ppc-float-in-variadic=true -CFLAGS.gcc+= -msoft-float +CFLAGS+= -mno-altivec -msoft-float INLINE_LIMIT?= 15000 .endif .if ${MACHINE_ARCH} == "powerpcspe" -CFLAGS+= -mno-spe +CFLAGS.gcc+= -mno-spe .endif # Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Tue Jan 31 01:48:55 2017 (r313004) +++ head/sys/modules/zfs/Makefile Tue Jan 31 01:55:29 2017 (r313005) @@ -94,7 +94,7 @@ CFLAGS+=-I${SUNW}/common CFLAGS+=-DBUILDING_ZFS .if ${MACHINE_ARCH} == "powerpc64" -CFLAGS+=-mminimal-toc +CFLAGS.gcc+=-mminimal-toc .endif .ifdef ZFS_DEBUG From owner-svn-src-all@freebsd.org Tue Jan 31 03:26:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26F73CC9FB6; Tue, 31 Jan 2017 03: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 E9968EBB; Tue, 31 Jan 2017 03:26:33 +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 v0V3QXv5024382; Tue, 31 Jan 2017 03:26:33 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0V3QW30024375; Tue, 31 Jan 2017 03:26:32 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201701310326.v0V3QW30024375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 31 Jan 2017 03:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 03:26:34 -0000 Author: cem Date: Tue Jan 31 03:26:32 2017 New Revision: 313006 URL: https://svnweb.freebsd.org/changeset/base/313006 Log: calculate_crc32c: Add SSE4.2 implementation on x86 Derived from an implementation by Mark Adler. The fast loop performs three simultaneous CRCs over subsets of the data before composing them. This takes advantage of certain properties of the CRC32 implementation in Intel hardware. (The CRC instruction takes 1 cycle but has 2-3 cycles of latency.) The CRC32 instruction does not manipulate FPU state. i386 does not have the crc32q instruction, so avoid it there. Otherwise the implementation is identical to amd64. Add basic userland tests to verify correctness on a variety of inputs. PR: 216467 Reported by: Ben RUBSON Reviewed by: kib@, markj@ (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9342 Added: head/sys/libkern/x86/ head/sys/libkern/x86/crc32_sse42.c (contents, props changed) head/tests/sys/kern/libkern_crc32.c (contents, props changed) Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/libkern/crc32.c head/sys/sys/libkern.h head/tests/sys/kern/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Jan 31 01:55:29 2017 (r313005) +++ head/sys/conf/files.amd64 Tue Jan 31 03:26:32 2017 (r313006) @@ -593,6 +593,11 @@ compat/ndis/subr_pe.c optional ndisapi compat/ndis/subr_usbd.c optional ndisapi pci compat/ndis/winx64_wrap.S optional ndisapi pci # +crc32_sse42.o standard \ + dependency "$S/libkern/x86/crc32_sse42.c" \ + compile-with "${CC} -c ${CFLAGS:N-nostdinc} ${WERROR} ${PROF} -msse4 ${.IMPSRC}" \ + no-implicit-rule \ + clean "crc32_sse42.o" libkern/memmove.c standard libkern/memset.c standard # Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Jan 31 01:55:29 2017 (r313005) +++ head/sys/conf/files.i386 Tue Jan 31 03:26:32 2017 (r313006) @@ -554,6 +554,11 @@ kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip kern/subr_sfbuf.c standard +crc32_sse42.o standard \ + dependency "$S/libkern/x86/crc32_sse42.c" \ + compile-with "${CC} -c ${CFLAGS:N-nostdinc} ${WERROR} ${PROF} -msse4 ${.IMPSRC}" \ + no-implicit-rule \ + clean "crc32_sse42.o" libkern/divdi3.c standard libkern/ffsll.c standard libkern/flsll.c standard Modified: head/sys/libkern/crc32.c ============================================================================== --- head/sys/libkern/crc32.c Tue Jan 31 01:55:29 2017 (r313005) +++ head/sys/libkern/crc32.c Tue Jan 31 03:26:32 2017 (r313006) @@ -46,8 +46,14 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#if defined(__amd64__) || defined(__i386__) +#include +#include +#endif + const uint32_t crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, @@ -749,6 +755,11 @@ calculate_crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length) { +#if defined(__amd64__) || defined(__i386__) + if ((cpu_feature2 & CPUID2_SSE42) != 0) { + return (sse42_crc32c(crc32c, buffer, length)); + } else +#endif if (length < 4) { return (singletable_crc32c(crc32c, buffer, length)); } else { Added: head/sys/libkern/x86/crc32_sse42.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/x86/crc32_sse42.c Tue Jan 31 03:26:32 2017 (r313006) @@ -0,0 +1,288 @@ +/* + * Derived from crc32c.c version 1.1 by Mark Adler. + * + * Copyright (C) 2013 Mark Adler + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the author be held liable for any damages arising from the + * use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + * + * Mark Adler + * madler@alumni.caltech.edu + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * This file is compiled in userspace in order to run ATF unit tests. + */ +#ifdef USERSPACE_TESTING +#include +#else +#include +#include +#include +#include +#endif + +#include + +/* CRC-32C (iSCSI) polynomial in reversed bit order. */ +#define POLY 0x82f63b78 + +/* + * Block sizes for three-way parallel crc computation. LONG and SHORT must + * both be powers of two. + */ +#define LONG 8192 +#define SHORT 256 + +/* Tables for hardware crc that shift a crc by LONG and SHORT zeros. */ +static uint32_t crc32c_long[4][256]; +static uint32_t crc32c_short[4][256]; + +/* + * Multiply a matrix times a vector over the Galois field of two elements, + * GF(2). Each element is a bit in an unsigned integer. mat must have at + * least as many entries as the power of two for most significant one bit in + * vec. + */ +static inline uint32_t +gf2_matrix_times(uint32_t *mat, uint32_t vec) +{ + uint32_t sum; + + sum = 0; + while (vec) { + if (vec & 1) + sum ^= *mat; + vec >>= 1; + mat++; + } + return (sum); +} + +/* + * Multiply a matrix by itself over GF(2). Both mat and square must have 32 + * rows. + */ +static inline void +gf2_matrix_square(uint32_t *square, uint32_t *mat) +{ + int n; + + for (n = 0; n < 32; n++) + square[n] = gf2_matrix_times(mat, mat[n]); +} + +/* + * Construct an operator to apply len zeros to a crc. len must be a power of + * two. If len is not a power of two, then the result is the same as for the + * largest power of two less than len. The result for len == 0 is the same as + * for len == 1. A version of this routine could be easily written for any + * len, but that is not needed for this application. + */ +static void +crc32c_zeros_op(uint32_t *even, size_t len) +{ + uint32_t odd[32]; /* odd-power-of-two zeros operator */ + uint32_t row; + int n; + + /* put operator for one zero bit in odd */ + odd[0] = POLY; /* CRC-32C polynomial */ + row = 1; + for (n = 1; n < 32; n++) { + odd[n] = row; + row <<= 1; + } + + /* put operator for two zero bits in even */ + gf2_matrix_square(even, odd); + + /* put operator for four zero bits in odd */ + gf2_matrix_square(odd, even); + + /* + * first square will put the operator for one zero byte (eight zero + * bits), in even -- next square puts operator for two zero bytes in + * odd, and so on, until len has been rotated down to zero + */ + do { + gf2_matrix_square(even, odd); + len >>= 1; + if (len == 0) + return; + gf2_matrix_square(odd, even); + len >>= 1; + } while (len); + + /* answer ended up in odd -- copy to even */ + for (n = 0; n < 32; n++) + even[n] = odd[n]; +} + +/* + * Take a length and build four lookup tables for applying the zeros operator + * for that length, byte-by-byte on the operand. + */ +static void +crc32c_zeros(uint32_t zeros[][256], size_t len) +{ + uint32_t op[32]; + uint32_t n; + + crc32c_zeros_op(op, len); + for (n = 0; n < 256; n++) { + zeros[0][n] = gf2_matrix_times(op, n); + zeros[1][n] = gf2_matrix_times(op, n << 8); + zeros[2][n] = gf2_matrix_times(op, n << 16); + zeros[3][n] = gf2_matrix_times(op, n << 24); + } +} + +/* Apply the zeros operator table to crc. */ +static inline uint32_t +crc32c_shift(uint32_t zeros[][256], uint32_t crc) +{ + + return (zeros[0][crc & 0xff] ^ zeros[1][(crc >> 8) & 0xff] ^ + zeros[2][(crc >> 16) & 0xff] ^ zeros[3][crc >> 24]); +} + +/* Initialize tables for shifting crcs. */ +static void +#ifdef USERSPACE_TESTING +__attribute__((__constructor__)) +#endif +crc32c_init_hw(void) +{ + crc32c_zeros(crc32c_long, LONG); + crc32c_zeros(crc32c_short, SHORT); +} +#ifdef _KERNEL +SYSINIT(crc32c_sse42, SI_SUB_LOCK, SI_ORDER_ANY, crc32c_init_hw, NULL); +#endif + +/* Compute CRC-32C using the Intel hardware instruction. */ +#ifdef USERSPACE_TESTING +uint32_t sse42_crc32c(uint32_t, const unsigned char *, unsigned); +#endif +uint32_t +sse42_crc32c(uint32_t crc, const unsigned char *buf, unsigned len) +{ +#ifdef __amd64__ + const size_t align = 8; +#else + const size_t align = 4; +#endif + const unsigned char *next, *end; + uint64_t crc0, crc1, crc2; /* need to be 64 bits for crc32q */ + + next = buf; + crc0 = crc; + + /* Compute the crc to bring the data pointer to an aligned boundary. */ + while (len && ((uintptr_t)next & (align - 1)) != 0) { + crc0 = _mm_crc32_u8(crc0, *next); + next++; + len--; + } + + /* + * Compute the crc on sets of LONG*3 bytes, executing three independent + * crc instructions, each on LONG bytes -- this is optimized for the + * Nehalem, Westmere, Sandy Bridge, and Ivy Bridge architectures, which + * have a throughput of one crc per cycle, but a latency of three + * cycles. + */ + while (len >= LONG * 3) { + crc1 = 0; + crc2 = 0; + end = next + LONG; + do { +#ifdef __amd64__ + crc0 = _mm_crc32_u64(crc0, *(const uint64_t *)next); + crc1 = _mm_crc32_u64(crc1, + *(const uint64_t *)(next + LONG)); + crc2 = _mm_crc32_u64(crc2, + *(const uint64_t *)(next + (LONG * 2))); +#else + crc0 = _mm_crc32_u32(crc0, *(const uint32_t *)next); + crc1 = _mm_crc32_u32(crc1, + *(const uint32_t *)(next + LONG)); + crc2 = _mm_crc32_u32(crc2, + *(const uint32_t *)(next + (LONG * 2))); +#endif + next += align; + } while (next < end); + crc0 = crc32c_shift(crc32c_long, crc0) ^ crc1; + crc0 = crc32c_shift(crc32c_long, crc0) ^ crc2; + next += LONG * 2; + len -= LONG * 3; + } + + /* + * Do the same thing, but now on SHORT*3 blocks for the remaining data + * less than a LONG*3 block + */ + while (len >= SHORT * 3) { + crc1 = 0; + crc2 = 0; + end = next + SHORT; + do { +#ifdef __amd64__ + crc0 = _mm_crc32_u64(crc0, *(const uint64_t *)next); + crc1 = _mm_crc32_u64(crc1, + *(const uint64_t *)(next + SHORT)); + crc2 = _mm_crc32_u64(crc2, + *(const uint64_t *)(next + (SHORT * 2))); +#else + crc0 = _mm_crc32_u32(crc0, *(const uint32_t *)next); + crc1 = _mm_crc32_u32(crc1, + *(const uint32_t *)(next + SHORT)); + crc2 = _mm_crc32_u32(crc2, + *(const uint32_t *)(next + (SHORT * 2))); +#endif + next += align; + } while (next < end); + crc0 = crc32c_shift(crc32c_short, crc0) ^ crc1; + crc0 = crc32c_shift(crc32c_short, crc0) ^ crc2; + next += SHORT * 2; + len -= SHORT * 3; + } + + /* Compute the crc on the remaining bytes at native word size. */ + end = next + (len - (len & (align - 1))); + while (next < end) { +#ifdef __amd64__ + crc0 = _mm_crc32_u64(crc0, *(const uint64_t *)next); +#else + crc0 = _mm_crc32_u32(crc0, *(const uint32_t *)next); +#endif + next += align; + } + len &= (align - 1); + + /* Compute the crc for any trailing bytes. */ + while (len) { + crc0 = _mm_crc32_u8(crc0, *next); + next++; + len--; + } + + return ((uint32_t)crc0); +} Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Tue Jan 31 01:55:29 2017 (r313005) +++ head/sys/sys/libkern.h Tue Jan 31 03:26:32 2017 (r313006) @@ -205,6 +205,11 @@ crc32(const void *buf, size_t size) uint32_t calculate_crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length); +#ifdef _KERNEL +#if defined(__amd64__) || defined(__i386__) +uint32_t sse42_crc32c(uint32_t, const unsigned char *, unsigned); +#endif +#endif LIBKERN_INLINE void *memset(void *, int, size_t); Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Tue Jan 31 01:55:29 2017 (r313005) +++ head/tests/sys/kern/Makefile Tue Jan 31 03:26:32 2017 (r313006) @@ -29,13 +29,19 @@ NETBSD_ATF_TESTS_C+= mqueue_test CFLAGS.mqueue_test+= -I${SRCTOP}/tests LIBADD.mqueue_test+= rt +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +ATF_TESTS_C+= libkern_crc32 +CFLAGS.libkern_crc32+= -msse4 -DUSERSPACE_TESTING +LDADD.libkern_crc32+= ${SRCTOP}/sys/libkern/x86/crc32_sse42.c +.endif + # subr_unit.c contains functions whose prototypes lie in headers that cannot be # included in userland. But as far as subr_unit_test goes, they're effectively # static. So it's ok to disable -Wmissing-prototypes for this program. CFLAGS.subr_unit.c+= -Wno-missing-prototypes SRCS.subr_unit_test+= subr_unit.c -WARNS?= 5 +WARNS?= 3 TESTS_SUBDIRS+= acct TESTS_SUBDIRS+= execve Added: head/tests/sys/kern/libkern_crc32.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/libkern_crc32.c Tue Jan 31 03:26:32 2017 (r313006) @@ -0,0 +1,132 @@ +/* + * 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. + * + * $FreeBSD$ + */ + +#include + +#include + +#include + +extern uint32_t sse42_crc32c(uint32_t, const unsigned char *, unsigned); + +ATF_TC_WITHOUT_HEAD(crc32c_basic_correctness); +ATF_TC_BODY(crc32c_basic_correctness, tc) +{ + const uint64_t inputs[] = { + 0xf408c634b3a9142, + 0x80539e8c7c352e2b, + 0x62e9121db6e4d649, + 0x899345850ed0a286, + 0x2302df11b4a43b15, + 0xe943de7b3d35d70, + 0xdf1ff2bf41abf56b, + 0x9bc138abae315de2, + 0x31cc82e56234f0ff, + 0xce63c0cd6988e847, + 0x3e42f6b78ee352fa, + 0xfa4085436078cfa6, + 0x53349558bf670a4b, + 0x2714e10e7d722c61, + 0xc0d3261addfc6908, + 0xd1567c3181d3a1bf, + }; + const uint32_t results[] = { + 0x2ce33ede, + 0xc49cc573, + 0xb8683c96, + 0x6918660d, + 0xa904e522, + 0x52dbc42c, + 0x98863c22, + 0x894d5d2c, + 0xb003745d, + 0xfc496dbd, + 0x97d2fbb5, + 0x3c062ef1, + 0xcc2eff18, + 0x6a9b09f6, + 0x420242c1, + 0xfd562dc3, + }; + size_t i; + uint32_t act; + + ATF_REQUIRE(nitems(inputs) == nitems(results)); + + for (i = 0; i < nitems(inputs); i++) { + act = sse42_crc32c(~0, (const void *)&inputs[i], + sizeof(inputs[0])); + ATF_REQUIRE_MSG(act == results[i], + "crc32c(0x%jx) = 0x%08x, got 0x%08x", (uintmax_t)inputs[i], + results[i], act); + } +} + +ATF_TC_WITHOUT_HEAD(crc32c_alignment); +ATF_TC_BODY(crc32c_alignment, tc) +{ + const uint64_t input = 0xf408c634b3a9142; + const uint32_t result = 0x2ce33ede; + unsigned char buf[15]; + size_t i; + uint32_t act; + + + for (i = 1; i < 8; i++) { + memcpy(&buf[i], &input, sizeof(input)); + + act = sse42_crc32c(~0, (const void *)&buf[i], sizeof(input)); + ATF_REQUIRE_MSG(act == result, + "crc32c(0x%jx) = 0x%08x, got 0x%08x", (uintmax_t)input, + result, act); + } +} + +ATF_TC_WITHOUT_HEAD(crc32c_trailing_bytes); +ATF_TC_BODY(crc32c_trailing_bytes, tc) +{ + const unsigned char input[] = { + 0x87, 0x54, 0x74, 0xd2, 0xb, 0x9b, 0xdd, 0xf6, 0x68, 0x37, + 0xd4, 0x4, 0x5e, 0xa9, 0xb3 + }; + const uint32_t result = 0xec638d62; + uint32_t act; + + act = sse42_crc32c(~0, input, sizeof(input)); + ATF_REQUIRE_MSG(act == result, "expected 0x%08x, got 0x%08x", result, + act); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, crc32c_basic_correctness); + ATF_TP_ADD_TC(tp, crc32c_alignment); + ATF_TP_ADD_TC(tp, crc32c_trailing_bytes); + return (atf_no_error()); +} From owner-svn-src-all@freebsd.org Tue Jan 31 03:38:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 636E4C988A9; Tue, 31 Jan 2017 03:38:11 +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 040B8182D; Tue, 31 Jan 2017 03:38:10 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f67.google.com with SMTP id v77so19912156wmv.0; Mon, 30 Jan 2017 19:38:10 -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=x44pXePbmpET/5/N/AuPgcLhsPCt2A8Si7tJECzcEfQ=; b=cAezAf2PbR3b/ANxBTL0OIcWzylKmFPp43G5l2glbfMymaSLLsb11rly4/WFCCe+53 6SxflLYadO9IiVMtGhlHqLTg2QwvU7tengwH/sv6vSUsuWurrqd8AOz1NkQcetUY44uz 7ky3j7j+kIf6Hib6+E2k/i2WEFWmPMSSrxgAYUGeQ4YHtgpzsUNFcu/XE9XAU+kzvIcO o9VIe6HQQBd+R+XwhIAjPwSvQGuWMKFmpis0DIZhjQN1x32H0tuDBh/9P/bFT/gXV21e QZslHZRcS2K17KquJKXLE75A6dQTqYX3TcNQT3OxK0LUzzvwnDDoL0qgGpDLN3FChhrq 3yZA== X-Gm-Message-State: AIkVDXJ03JRdiB3M8WJSZ72LXPHhXm5ZkAIRwK5opVpnuyeySq8vidE6TnKRG9AnoSxNHw== X-Received: by 10.223.134.104 with SMTP id 37mr20551901wrw.121.1485833538323; Mon, 30 Jan 2017 19:32:18 -0800 (PST) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com. [74.125.82.45]) by smtp.gmail.com with ESMTPSA id g40sm25952432wrg.19.2017.01.30.19.32.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jan 2017 19:32:18 -0800 (PST) Received: by mail-wm0-f45.google.com with SMTP id v77so74026038wmv.0; Mon, 30 Jan 2017 19:32:18 -0800 (PST) X-Received: by 10.28.155.5 with SMTP id d5mr16194449wme.85.1485833538113; Mon, 30 Jan 2017 19:32:18 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.22.42 with HTTP; Mon, 30 Jan 2017 19:32:17 -0800 (PST) In-Reply-To: <201701310326.v0V3QW30024375@repo.freebsd.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> From: Conrad Meyer Date: Mon, 30 Jan 2017 19:32:17 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 03:38:11 -0000 On Mon, Jan 30, 2017 at 7:26 PM, Conrad E. Meyer wrote: > (The CRC instruction takes 1 cycle but has 2-3 cycles of latency.) My mistake, it's not 2 anywhere. It's just 3 cycles on all workstation/server CPUs since Nehalem. Different on Atom chips and AMD. Best, Conrad From owner-svn-src-all@freebsd.org Tue Jan 31 03:40:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8A01C98AAD; Tue, 31 Jan 2017 03:40:14 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 611831A5B; Tue, 31 Jan 2017 03:40:14 +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 v0V3eDoZ028800; Tue, 31 Jan 2017 03:40:13 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0V3eDcj028799; Tue, 31 Jan 2017 03:40:13 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201701310340.v0V3eDcj028799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 31 Jan 2017 03:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313007 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 03:40:14 -0000 Author: jhibbits Date: Tue Jan 31 03:40:13 2017 New Revision: 313007 URL: https://svnweb.freebsd.org/changeset/base/313007 Log: Don't retry a lost reservation in atomic_fcmpset() The desired behavior of atomic_fcmpset_() is to always exit on error. Instead of retrying on lost reservation, leave the retry to the caller, and return error. Reported by: kib Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Tue Jan 31 03:26:32 2017 (r313006) +++ head/sys/powerpc/include/atomic.h Tue Jan 31 03:40:13 2017 (r313007) @@ -678,18 +678,18 @@ atomic_fcmpset_int(volatile u_int *p, u_ int ret; __asm __volatile ( - "1:\tlwarx %0, 0, %3\n\t" /* load old value */ + "lwarx %0, 0, %3\n\t" /* load old value */ "cmplw %4, %0\n\t" /* compare */ - "bne 2f\n\t" /* exit if not equal */ + "bne 1f\n\t" /* exit if not equal */ "stwcx. %5, 0, %3\n\t" /* attempt to store */ - "bne- 1b\n\t" /* spin if failed */ + "bne- 1f\n\t" /* exit if failed */ "li %0, 1\n\t" /* success - retval = 1 */ - "b 3f\n\t" /* we've succeeded */ - "2:\n\t" + "b 2f\n\t" /* we've succeeded */ + "1:\n\t" "stwcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ "stwx %0, 0, %7\n\t" "li %0, 0\n\t" /* failure - retval = 0 */ - "3:\n\t" + "2:\n\t" : "=&r" (ret), "=m" (*p), "=m" (*cmpval) : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) : "cr0", "memory"); @@ -703,20 +703,20 @@ atomic_fcmpset_long(volatile u_long *p, __asm __volatile ( #ifdef __powerpc64__ - "1:\tldarx %0, 0, %3\n\t" /* load old value */ + "ldarx %0, 0, %3\n\t" /* load old value */ "cmpld %4, %0\n\t" /* compare */ - "bne 2f\n\t" /* exit if not equal */ + "bne 1f\n\t" /* exit if not equal */ "stdcx. %5, 0, %3\n\t" /* attempt to store */ #else - "1:\tlwarx %0, 0, %3\n\t" /* load old value */ + "lwarx %0, 0, %3\n\t" /* load old value */ "cmplw %4, %0\n\t" /* compare */ - "bne 2f\n\t" /* exit if not equal */ + "bne 1f\n\t" /* exit if not equal */ "stwcx. %5, 0, %3\n\t" /* attempt to store */ #endif - "bne- 1b\n\t" /* spin if failed */ + "bne- 1f\n\t" /* exit if failed */ "li %0, 1\n\t" /* success - retval = 1 */ - "b 3f\n\t" /* we've succeeded */ - "2:\n\t" + "b 2f\n\t" /* we've succeeded */ + "1:\n\t" #ifdef __powerpc64__ "stdcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ "stdx %0, 0, %7\n\t" @@ -725,7 +725,7 @@ atomic_fcmpset_long(volatile u_long *p, "stwx %0, 0, %7\n\t" #endif "li %0, 0\n\t" /* failure - retval = 0 */ - "3:\n\t" + "2:\n\t" : "=&r" (ret), "=m" (*p), "=m" (*cmpval) : "r" (p), "r" (*cmpval), "r" (newval), "m" (*p), "r"(cmpval) : "cr0", "memory"); From owner-svn-src-all@freebsd.org Tue Jan 31 05:27:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A42A1CC9B28; Tue, 31 Jan 2017 05:27:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 39ED61733; Tue, 31 Jan 2017 05:27:04 +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 mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 20059D644D1; Tue, 31 Jan 2017 16:26:56 +1100 (AEDT) Date: Tue, 31 Jan 2017 16:26:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Conrad E. Meyer" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern In-Reply-To: <201701310326.v0V3QW30024375@repo.freebsd.org> Message-ID: <20170131153411.G1061@besplex.bde.org> References: <201701310326.v0V3QW30024375@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=uODR78-PWboclYSAja4A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 05:27:05 -0000 On Tue, 31 Jan 2017, Conrad E. Meyer wrote: > Log: > calculate_crc32c: Add SSE4.2 implementation on x86 This breaks building with gcc-4.2.1, and depends on using non-kernel clang headers for clang. > Modified: head/sys/conf/files.amd64 > ============================================================================== > --- head/sys/conf/files.amd64 Tue Jan 31 01:55:29 2017 (r313005) > +++ head/sys/conf/files.amd64 Tue Jan 31 03:26:32 2017 (r313006) > @@ -593,6 +593,11 @@ compat/ndis/subr_pe.c optional ndisapi > compat/ndis/subr_usbd.c optional ndisapi pci > compat/ndis/winx64_wrap.S optional ndisapi pci > # > +crc32_sse42.o standard \ I don't want it, but it is standard. > + dependency "$S/libkern/x86/crc32_sse42.c" \ > + compile-with "${CC} -c ${CFLAGS:N-nostdinc} ${WERROR} ${PROF} -msse4 ${.IMPSRC}" \ -msse4 is not supported by gcc-4.2.1, Removing nostdinc pollutes the build with host headers, and the one needed might not be installed, and it doesn't exist for gcc-4.2.1. Similarly for i386. > Modified: head/sys/libkern/crc32.c > ============================================================================== > --- head/sys/libkern/crc32.c Tue Jan 31 01:55:29 2017 (r313005) > +++ head/sys/libkern/crc32.c Tue Jan 31 03:26:32 2017 (r313006) > @@ -46,8 +46,14 @@ > __FBSDID("$FreeBSD$"); > > #include > +#include Style bug. libkern.h is part if systm.h. > #include Ordering bug. systm.h is a prerequisite for all kernel headers except param.h, since it defines macros which might be used by other headers. > Added: head/sys/libkern/x86/crc32_sse42.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/libkern/x86/crc32_sse42.c Tue Jan 31 03:26:32 2017 (r313006) > @@ -0,0 +1,288 @@ > ... > +#ifdef USERSPACE_TESTING > +#include > +#else > +#include > +#include > +#include > +#include > +#endif Style and ordering bugs, as above. > + > +#include This header is outside of the kernel source tree. It is not even in /usr/include, but clang finds it in: crc32_sse42.o: /usr/bin/../lib/clang/3.9.0/include/nmmintrin.h \ /usr/bin/../lib/clang/3.9.0/include/smmintrin.h \ /usr/bin/../lib/clang/3.9.0/include/tmmintrin.h \ /usr/bin/../lib/clang/3.9.0/include/pmmintrin.h \ /usr/bin/../lib/clang/3.9.0/include/emmintrin.h \ /usr/bin/../lib/clang/3.9.0/include/xmmintrin.h \ /usr/bin/../lib/clang/3.9.0/include/mmintrin.h \ /usr/bin/../lib/clang/3.9.0/include/f16cintrin.h \ /usr/bin/../lib/clang/3.9.0/include/popcntintrin.h nmmintrin.h doesn't exist for gcc-4.2.1. gcc-4.2.1 has some of the other intrin.h files, but they aren't installed in FreeBSD-9, and of course they don't support newer SSE. Inline asm is much less unportable than intrinsics. kib used the correct method of .byte's in asms to avoid depending on assembler support for newer instructions. .byte is still used for clflush on amd64 and i386. It used to be used for invpcid on amd64. I can't find where it is or was used for xsave stuff. Bruce From owner-svn-src-all@freebsd.org Tue Jan 31 06:12:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28B60CC9C90; Tue, 31 Jan 2017 06:12: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 EC8071051; Tue, 31 Jan 2017 06:12: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 v0V6Cq22093452; Tue, 31 Jan 2017 06:12:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0V6CqVL093451; Tue, 31 Jan 2017 06:12:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701310612.v0V6CqVL093451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 31 Jan 2017 06:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313008 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 06:12:53 -0000 Author: ngie Date: Tue Jan 31 06:12:51 2017 New Revision: 313008 URL: https://svnweb.freebsd.org/changeset/base/313008 Log: Wait for /dev/ggate* to appear after calling `ggatel create` in :ggatel_{file,md} The test assumed that `ggatel create` created a device on completion, but that's incorrect. This squashes the race by waiting for the device to appear, as `ggatel create` daemonizes before issuing an ioctl to geom_gate(4) if not called with `-v`. Discussed with: asomers MFC after: 1 week PR: 204616 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/geom/class/gate/ggate_test.sh Modified: head/tests/sys/geom/class/gate/ggate_test.sh ============================================================================== --- head/tests/sys/geom/class/gate/ggate_test.sh Tue Jan 31 03:40:13 2017 (r313007) +++ head/tests/sys/geom/class/gate/ggate_test.sh Tue Jan 31 06:12:51 2017 (r313008) @@ -74,7 +74,11 @@ ggatel_file_body() atf_check ggatel create -u $us work - dd if=src of=/dev/ggate${us} bs=1m count=1 conv=notrunc + ggate_dev=/dev/ggate${us} + + wait_for_ggate_device ${ggate_dev} + + dd if=src of=${ggate_dev} bs=1m count=1 conv=notrunc checksum src work } @@ -104,7 +108,11 @@ ggatel_md_body() atf_check ggatel create -u $us /dev/$work - dd if=/dev/$src of=/dev/ggate${us} bs=1m count=1 conv=notrunc + ggate_dev=/dev/ggate${us} + + wait_for_ggate_device ${ggate_dev} + + dd if=/dev/$src of=${ggate_dev} bs=1m count=1 conv=notrunc checksum /dev/$src /dev/$work } @@ -191,3 +199,14 @@ common_cleanup() fi true } + +# Bug 204616: ggatel(8) creates /dev/ggate* asynchronously if `ggatel create` +# isn't called with `-v`. +wait_for_ggate_device() +{ + ggate_device=$1 + + while [ ! -c $ggate_device ]; do + sleep 0.5 + done +} From owner-svn-src-all@freebsd.org Tue Jan 31 06:25:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E3A0CC90A0; Tue, 31 Jan 2017 06:25:34 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) (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 F3922164F; Tue, 31 Jan 2017 06:25:33 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f43.google.com with SMTP id b65so63717249wmf.0; Mon, 30 Jan 2017 22:25: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=gnxo8+rR5kwSlYgMLWIjuHqxzaEAdZiU7x1v2/YWlh0=; b=TUFBK2GAtMK+QAtiBO9Men2WBdsOMzJUHFdo3K75ona4uBaRm3+IH4JdGpICHo9WQY vG9Nfr2r+tif+5eB+m3nUdM23z2JHr7DO6CQP1zhGnX7Dv754qv0DNSwpi5xBL6HJq9K CEz0ytKH2GlD4qM6jonTKJ1VAJujy6OBiPBPw3ZQn6DHpIYyTGjHGomDgzok6TfPOBoq p786VldKuqNmkW8jhkvZUGkx0ykU9oV9GYSOAYOCHtn+ap04PhBS5jVEFRstBPtEPNPt sOgASTyGaAKVJ6Dhe3whpIYmTGYVKuL38pS4c1cATzdNkkx0nieTNKE2WMROgBuHDSYV jSHQ== X-Gm-Message-State: AIkVDXKZIkgpIY3/rrKQyKHnjIGXaoMZBHNRdC4qxZbprkJmOGoVJeXKOse8OZURY76rQg== X-Received: by 10.223.148.35 with SMTP id 32mr25568575wrq.18.1485843446537; Mon, 30 Jan 2017 22:17:26 -0800 (PST) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com. [74.125.82.48]) by smtp.gmail.com with ESMTPSA id m188sm20693446wma.0.2017.01.30.22.17.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jan 2017 22:17:26 -0800 (PST) Received: by mail-wm0-f48.google.com with SMTP id b65so63494606wmf.0; Mon, 30 Jan 2017 22:17:26 -0800 (PST) X-Received: by 10.223.173.183 with SMTP id w52mr26223441wrc.164.1485843446226; Mon, 30 Jan 2017 22:17:26 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.22.42 with HTTP; Mon, 30 Jan 2017 22:17:25 -0800 (PST) In-Reply-To: <20170131153411.G1061@besplex.bde.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170131153411.G1061@besplex.bde.org> From: Conrad Meyer Date: Mon, 30 Jan 2017 22:17:25 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern To: Bruce Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 06:25:34 -0000 Hi Bruce, On Mon, Jan 30, 2017 at 9:26 PM, Bruce Evans wrote: > On Tue, 31 Jan 2017, Conrad E. Meyer wrote: > >> Log: >> calculate_crc32c: Add SSE4.2 implementation on x86 > > > This breaks building with gcc-4.2.1, gcc-4.2.1 is an ancient compiler. Good riddance. >> Added: head/sys/libkern/x86/crc32_sse42.c >> >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sys/libkern/x86/crc32_sse42.c Tue Jan 31 03:26:32 2017 >> (r313006) >> + >> +#include > > ... > > Inline asm is much less unportable than intrinsics. kib used the correct > method of .byte's in asms to avoid depending on assembler support for newer > instructions. .byte is still used for clflush on amd64 and i386. It > used to be used for invpcid on amd64. I can't find where it is or was > used for xsave stuff. Konstantin predicted this complaint in code review (phabricator). Unfortunately, Clang does not automatically unroll asms, even with the correct mnemonic. Unrolling is essential to performance below the by-3 block size (768 bytes in this implementation). Hand unrolling in C seems to generate less efficient assembly than the compiler's unrolling. The left column below is block size. The measurements are nanoseconds per buf, per CLOCK_VIRTUAL, averaged over 10^5 loops. These numbers do not vary more than +/- 1ns run to run on my idle Sandy Bridge laptop. "asm" is using __asm__(), "intrins" using the _mm_crc32 intrinsics that Clang can unroll, and multitable is the older lookup-table implementation (still used on other architectures). 0x000010: asm:0 intrins:0 multitable:0 (ns per buf) 0x000020: asm:7 intrins:9 multitable:78 (ns per buf) 0x000040: asm:10 intrins:7 multitable:50 (ns per buf) 0x000080: asm:15 intrins:9 multitable:91 (ns per buf) 0x000100: asm:25 intrins:17 multitable:178 (ns per buf) 0x000200: asm:55 intrins:38 multitable:347 (ns per buf) 0x000400: asm:61 intrins:62 multitable:684 (ns per buf) Both implementations are superior to the multitable approach, so it is unreasonable not to make one of them standard on x86 platforms. The unrolled intrinsics are consistently better than not unrolled on objects 0x40-0x200 bytes large. At 0x400 bytes we pass the first unroll-by-3 threshold and it stops mattering as much. At 0x40 bytes, it is the difference between 6.4 GB/s and 9.1 GB/s. At 0x200 bytes, it is the difference between 9.3 GB/s and 13.5 GB/s. I think this justifies some minor ugliness. Best, Conrad From owner-svn-src-all@freebsd.org Tue Jan 31 07:13:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFE80CC9FE7; Tue, 31 Jan 2017 07:13: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 B9D38DC8; Tue, 31 Jan 2017 07:13: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 v0V7D1B4017927; Tue, 31 Jan 2017 07:13:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0V7D14H017926; Tue, 31 Jan 2017 07:13:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701310713.v0V7D14H017926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 31 Jan 2017 07:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313009 - head/lib/libclang_rt/profile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 07:13:03 -0000 Author: ngie Date: Tue Jan 31 07:13:01 2017 New Revision: 313009 URL: https://svnweb.freebsd.org/changeset/base/313009 Log: Expose symbols in lib/libclang_rt/profile to fix --coverage The symbols currently hidden in libprofile_rt are needed for linking with `clang --coverage` to add coverage counters at link time and produce coverage numbers at runtime. In collaboration with: dim MFC after: 1 month Sponsored by: Dell EMC Isilon Differential Revision: D9168 Modified: head/lib/libclang_rt/profile/Makefile Modified: head/lib/libclang_rt/profile/Makefile ============================================================================== --- head/lib/libclang_rt/profile/Makefile Tue Jan 31 06:12:51 2017 (r313008) +++ head/lib/libclang_rt/profile/Makefile Tue Jan 31 07:13:01 2017 (r313009) @@ -4,6 +4,9 @@ LIB= clang_rt.profile-${CRTARCH} +# This is needed for --coverage +CFLAGS+= -fvisibility=default + SRCS+= profile/GCDAProfiling.c SRCS+= profile/InstrProfiling.c SRCS+= profile/InstrProfilingBuffer.c From owner-svn-src-all@freebsd.org Tue Jan 31 08:31:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E04B3CCAA3D; Tue, 31 Jan 2017 08:31:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8E7091678; Tue, 31 Jan 2017 08:31:39 +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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id EAB303C4326; Tue, 31 Jan 2017 19:31:29 +1100 (AEDT) Date: Tue, 31 Jan 2017 19:31:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Conrad Meyer cc: Bruce Evans , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern In-Reply-To: Message-ID: <20170131175309.N1418@besplex.bde.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170131153411.G1061@besplex.bde.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=PO7r1zJSAAAA:8 a=srfTNGtpKdxiwwSISBkA:9 a=5ylg2T7B_A-Amnrw:21 a=MTGi1m3gAQG5o30M:21 a=CjuIK1q_8ugA:10 a=Oa0T6EYmKFNB-xRHvYM1:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 08:31:41 -0000 On Mon, 30 Jan 2017, Conrad Meyer wrote: > On Mon, Jan 30, 2017 at 9:26 PM, Bruce Evans wrote: >> On Tue, 31 Jan 2017, Conrad E. Meyer wrote: >> >>> Log: >>> calculate_crc32c: Add SSE4.2 implementation on x86 >> >> This breaks building with gcc-4.2.1, > > gcc-4.2.1 is an ancient compiler. Good riddance. I prefer it. >>> Added: head/sys/libkern/x86/crc32_sse42.c >>> >>> ============================================================================== >>> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >>> +++ head/sys/libkern/x86/crc32_sse42.c Tue Jan 31 03:26:32 2017 >>> (r313006) >>> + >>> +#include >> >> ... >> >> Inline asm is much less unportable than intrinsics. kib used the correct >> method of .byte's in asms to avoid depending on assembler support for newer >> instructions. .byte is still used for clflush on amd64 and i386. It >> used to be used for invpcid on amd64. I can't find where it is or was >> used for xsave stuff. > > Konstantin predicted this complaint in code review (phabricator). > Unfortunately, Clang does not automatically unroll asms, even with the > correct mnemonic. Unrolling is essential to performance below the > by-3 block size (768 bytes in this implementation). Hand unrolling in > C seems to generate less efficient assembly than the compiler's > unrolling. Unorolling is almost completely useless if the instruction takes 3 cycles like you said it does. The loop calculations run much faster than that, so they can run in parallel. However, clang generates horrible code for inline asms instead of intrinsics. Simple asms can be compiled even by gcc (apparently old binutils supports SSE4): X Index: crc32_sse42.c X =================================================================== X --- crc32_sse42.c (revision 313007) X +++ crc32_sse42.c (working copy) X @@ -38,8 +38,29 @@ X #include X #endif X X -#include X +static __inline uint32_t X +_mm_crc32_u8(uint32_t x, uint8_t y) X +{ X + __asm("crc32b %1,%0" : "+r" (x) : "rm" (y)); X + return (x); X +} X X +static __inline uint32_t __unused X +_mm_crc32_u32(uint32_t x, int32_t y) X +{ X + __asm("crc32l %1,%0" : "+r" (x) : "rm" (y)); X + return (x); X +} X + X +#ifdef __amd64__ X +static __inline uint64_t X +_mm_crc32_u64(uint64_t x, int64_t y) X +{ X + __asm("crc32q %1,%0" : "+r" (x) : "rm" (y)); X + return (x); X +} X +#endif X + X /* CRC-32C (iSCSI) polynomial in reversed bit order. */ X #define POLY 0x82f63b78 I only tested this at compile time. clang generates horrible code. Starting with y in an array in memory, it always copies y to the stack and does a memory access there. There is nothing special about these inline asms, so I think clang does the same pessimizations for most asms in cpufunc.h. jkim got annoyed by this for something like rdtsc() and changed too much to reduce the problem for just one case. The differences in the generated code look like: intrinsincs (old <) vs inline asm (new >): 28,29c29,33 < movl %edi, %eax < crc32b (%rsi), %eax --- > movzbl (%rsi), %eax > movb %al, -10(%rbp) > #APP > crc32b -10(%rbp), %edi > #NO_APP Similarly for crc32q, except the load doesn't do an extension. 157,181d192 < .p2align 4, 0x90 < .LBB0_19: # %while.body69 < # =>This Inner Loop Header: Depth=1 < crc32b (%rsi,%rdx), %eax < crc32b 1(%rsi,%rdx), %eax < crc32b 2(%rsi,%rdx), %eax < crc32b 3(%rsi,%rdx), %eax < crc32b 4(%rsi,%rdx), %eax < crc32b 5(%rsi,%rdx), %eax < crc32b 6(%rsi,%rdx), %eax < crc32b 7(%rsi,%rdx), %eax This is the only clang unrolling. < addq $8, %rdx < testl %edx, %edx < jne .LBB0_19 < # BB#20: # %while.end75.loopexit.unr-lcssa.loopexit < addq %rdx, %rsi < .LBB0_21: # %while.end75.loopexit.unr-lcssa < testl %ecx, %ecx < je .LBB0_24 < # BB#22: # %while.body69.epil.preheader 184c195 < .LBB0_23: # %while.body69.epil --- > .LBB0_18: # %while.body69 186c197,201 < crc32b (%rsi), %eax --- > movzbl (%rsi), %edx > movb %dl, -9(%rbp) > #APP > crc32b -9(%rbp), %eax > #NO_APP With inline asm, clang doesn't unroll this byte loop. gcc generates nice-looking code: G #APP G crc32q (%r8),%rcx G crc32q 8192(%r8),%rdi G crc32q 16384(%r8),%r10 G #NO_APP G ... G #APP G crc32q (%r8),%rcx G crc32q 256(%r8),%rdi G crc32q 512(%r8),%r10 G #NO_APP G ... G .L97: G movl %ecx, %r8d G decl %edx G #APP G crc32b -1(%rsi),%r8d G #NO_APP G mov %r8d, %ecx G .L96: G incq %rsi G testl %edx, %edx G jne .L97 It doesn't do the copying or the unrolling. > The left column below is block size. The measurements are nanoseconds > per buf, per CLOCK_VIRTUAL, averaged over 10^5 loops. These numbers > do not vary more than +/- 1ns run to run on my idle Sandy Bridge > laptop. "asm" is using __asm__(), "intrins" using the _mm_crc32 > intrinsics that Clang can unroll, and multitable is the older > lookup-table implementation (still used on other architectures). > > 0x000010: asm:0 intrins:0 multitable:0 (ns per buf) > 0x000020: asm:7 intrins:9 multitable:78 (ns per buf) > 0x000040: asm:10 intrins:7 multitable:50 (ns per buf) > 0x000080: asm:15 intrins:9 multitable:91 (ns per buf) > 0x000100: asm:25 intrins:17 multitable:178 (ns per buf) > 0x000200: asm:55 intrins:38 multitable:347 (ns per buf) > 0x000400: asm:61 intrins:62 multitable:684 (ns per buf) > > Both implementations are superior to the multitable approach, so it is > unreasonable not to make one of them standard on x86 platforms. > > The unrolled intrinsics are consistently better than not unrolled on > objects 0x40-0x200 bytes large. At 0x400 bytes we pass the first > unroll-by-3 threshold and it stops mattering as much. > > At 0x40 bytes, it is the difference between 6.4 GB/s and 9.1 GB/s. At > 0x200 bytes, it is the difference between 9.3 GB/s and 13.5 GB/s. I > think this justifies some minor ugliness. If it matters, which I doubt, then the compiler shouldn't be trusted for unrolling. It can only do better than handwritten unrolling if it has tables for the correct amount unrolling for every instruction for thousands of CPUs (since such tables are too hard to write manually). clang seems to only unroll for the byte loop. Perhaps that is useless since if the byte loop is reached then things are already slow. I get this by only noticing large differences for the byte loop in the above diff, and then static instruction counting. All of clang with intrinsics, clang with asms and gcc with asms generate the same number of crc32q's; clang with asms and gcc with asms generate the same number of crc32b's; so the only difference seems to be extra crc32b's for the unrolling. You get differences of a few nsec per buf, but say that this is for _mm_crc32. I don't see any unrolling for _mm_crc32. The full byte loop with clang pessimizations is: C .p2align 4, 0x90 C .LBB0_18: # %while.body69 C # =>This Inner Loop Header: Depth=1 C movzbl (%rsi), %edx C movb %dl, -9(%rbp) C #APP C crc32b -9(%rbp), %eax C #NO_APP C incq %rsi C incl %ecx C jne .LBB0_18 That has too many instructions, but many of them can be done in parallel. gcc increments the counter at the beginning of the loop, but then has to do an extra instruction (testl) to check the status just before the branch. clang's extra instructions to copy to the stack can't help. I'm not sure if the overhead for this is mostly hidden by parallelism, or if it creates serious extra dependencies. The unrolling is mediocre at best: < crc32b (%rsi,%rdx), %eax < crc32b 1(%rsi,%rdx), %eax < crc32b 2(%rsi,%rdx), %eax < crc32b 3(%rsi,%rdx), %eax < crc32b 4(%rsi,%rdx), %eax < crc32b 5(%rsi,%rdx), %eax < crc32b 6(%rsi,%rdx), %eax < crc32b 7(%rsi,%rdx), %eax Why not a single crc32q for this? I don't know exactly what the instruction does, but there must be ways to calculate with more than a byte at a time. Every instruction in this has a dependency on the result of the previous one. It is might be better to do crc32b into 8 different registers and combine the result. Similar techniques if FP code give speedups of about a factor of 2. Inet checksum (in_cksum.c) might be more important than this, but is still pessimized on amd64 and only "optimized" for 486-era CPUs on i386. i386 uses asms, but these had bugs related to not using __volatile enough and/ or not declaring enough clobbers, and this was "fixed" for amd64 by not using asms but regressing to a C MD version of in_cksum.c that is little different from the C MI version. My i386 version has some updates for newer CPUs, but I never saw a significant difference from this. The "optimizations" have similar problems to the above. The main loop doing 32-bit accesses might be OK, but setup and exit code with byte loops in it has large overheads and is just as hard to unroll correctly; the code doesn't try to unroll it manually and ends up quite slow. NetBSD wrote the entire in_cksum for i386 in asm. This was faster in the i586 era, but would be difficult to maintain. Every CPU needs different scheduling for best results. OTOH, newer CPUs have better scheduling in hardware. I looked at the source code. Unrolling for the byte loop is just a pessimization. This loop is just for trailing bytes. The main loop should have used wider accesses, leaving < 8 bytes to handle at the end on amd64, and 4 bytes on i386. Thus the 8 unrolled crc32b's in the above (for amd64) are never reached, but it takes an extra branch to not reach them. The real byte loop at the end for the intrinsics case is: X .p2align 4, 0x90 X .LBB0_23: # %while.body69.epil X # =>This Inner Loop Header: Depth=1 X crc32b (%rsi), %eax X incq %rsi X incl %ecx X jne .LBB0_23 This is the same as in the asm case except it is missing the pessimization. The other loops have lots of manual unrolling which is apparently too hard for clang to understand to unroll further. The main step seems to be just manually unrolling into 3 crc32[lq]'s at a time. This 3 looks like an optimization for i386 -- i386 barely has 3 registers to hold the results. Or perhaps 3 is exactly right for the latency/throughput of crc32[lq] on the author's hardware. 3 would go well with a latency of 3 cycles and a throughput of 3 per 3 cycles. Then the extra instructions for the asm would mess up the latency/throughput hard-coding. Here is one of the loops with this 3-way unrolling, for the asm case: C .p2align 4, 0x90 C .LBB0_7: # %do.body C # Parent Loop BB0_6 Depth=1 C # => This Inner Loop Header: Depth=2 C movq %rsi, %rbx C movq -16384(%rbx), %rsi C movq %rsi, -72(%rbp) C #APP C crc32q -72(%rbp), %rax C #NO_APP C movq -8192(%rbx), %rsi C movq %rsi, -64(%rbp) C #APP C crc32q -64(%rbp), %rdi C #NO_APP C movq (%rbx), %rsi C movq %rsi, -56(%rbp) C #APP C crc32q -56(%rbp), %rcx C #NO_APP C leaq 8(%rbx), %rsi C addq $-16376, %rbx # imm = 0xC008 C cmpq %r8, %rbx C jb .LBB0_7 This has 2 extra instructions before every crc32q. If 3 crc32q's in parallel leave no spare resouces (or if less than 3 can run in parallel), then there is nothing to spare for loop control or for the extra instructions. The loss would be quite small however. Just a couple of cycles extra if 3 crc32q's take 3 cycles with nothing to spare. L2 (and L1?) cache misses already cost more. Bruce From owner-svn-src-all@freebsd.org Tue Jan 31 12:29:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87720CC9F1C; Tue, 31 Jan 2017 12:29:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DDEB1C6E; Tue, 31 Jan 2017 12:29:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VCTnCs043009; Tue, 31 Jan 2017 12:29:49 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VCTn77043006; Tue, 31 Jan 2017 12:29:49 GMT (envelope-from des@FreeBSD.org) Message-Id: <201701311229.v0VCTn77043006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 31 Jan 2017 12:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313010 - in vendor-crypto/openssh/dist: . contrib contrib/cygwin contrib/redhat contrib/suse openbsd-compat openbsd-compat/regress regress regress/misc regress/misc/kexfuzz regress/uni... X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 12:29:50 -0000 Author: des Date: Tue Jan 31 12:29:48 2017 New Revision: 313010 URL: https://svnweb.freebsd.org/changeset/base/313010 Log: Vendor import of OpenSSH 7.3p1. Added: vendor-crypto/openssh/dist/.skipped-commit-ids vendor-crypto/openssh/dist/openbsd-compat/bsd-err.c vendor-crypto/openssh/dist/platform-tracing.c vendor-crypto/openssh/dist/regress/cfginclude.sh vendor-crypto/openssh/dist/regress/misc/ vendor-crypto/openssh/dist/regress/misc/Makefile vendor-crypto/openssh/dist/regress/misc/kexfuzz/ vendor-crypto/openssh/dist/regress/misc/kexfuzz/Makefile vendor-crypto/openssh/dist/regress/misc/kexfuzz/README vendor-crypto/openssh/dist/regress/misc/kexfuzz/kexfuzz.c vendor-crypto/openssh/dist/regress/sshcfgparse.sh vendor-crypto/openssh/dist/regress/unittests/utf8/ vendor-crypto/openssh/dist/regress/unittests/utf8/Makefile vendor-crypto/openssh/dist/regress/unittests/utf8/tests.c vendor-crypto/openssh/dist/utf8.c vendor-crypto/openssh/dist/utf8.h Deleted: vendor-crypto/openssh/dist/.cvsignore vendor-crypto/openssh/dist/openbsd-compat/.cvsignore vendor-crypto/openssh/dist/openbsd-compat/regress/.cvsignore vendor-crypto/openssh/dist/regress/.cvsignore vendor-crypto/openssh/dist/roaming.h vendor-crypto/openssh/dist/scard/ Modified: vendor-crypto/openssh/dist/ChangeLog vendor-crypto/openssh/dist/INSTALL vendor-crypto/openssh/dist/Makefile.in vendor-crypto/openssh/dist/PROTOCOL vendor-crypto/openssh/dist/PROTOCOL.agent vendor-crypto/openssh/dist/PROTOCOL.certkeys vendor-crypto/openssh/dist/PROTOCOL.chacha20poly1305 vendor-crypto/openssh/dist/README vendor-crypto/openssh/dist/audit-linux.c vendor-crypto/openssh/dist/auth-krb5.c vendor-crypto/openssh/dist/auth-options.c vendor-crypto/openssh/dist/auth-pam.c vendor-crypto/openssh/dist/auth-pam.h vendor-crypto/openssh/dist/auth-passwd.c vendor-crypto/openssh/dist/auth-rh-rsa.c vendor-crypto/openssh/dist/auth-rhosts.c vendor-crypto/openssh/dist/auth.c vendor-crypto/openssh/dist/auth.h vendor-crypto/openssh/dist/auth2-chall.c vendor-crypto/openssh/dist/auth2-hostbased.c vendor-crypto/openssh/dist/auth2.c vendor-crypto/openssh/dist/authfile.c vendor-crypto/openssh/dist/canohost.c vendor-crypto/openssh/dist/canohost.h vendor-crypto/openssh/dist/channels.c vendor-crypto/openssh/dist/cipher-bf1.c vendor-crypto/openssh/dist/cipher.c vendor-crypto/openssh/dist/clientloop.c vendor-crypto/openssh/dist/compat.c vendor-crypto/openssh/dist/config.h.in vendor-crypto/openssh/dist/configure vendor-crypto/openssh/dist/configure.ac vendor-crypto/openssh/dist/contrib/cygwin/README vendor-crypto/openssh/dist/contrib/redhat/openssh.spec vendor-crypto/openssh/dist/contrib/ssh-copy-id vendor-crypto/openssh/dist/contrib/suse/openssh.spec vendor-crypto/openssh/dist/defines.h vendor-crypto/openssh/dist/dh.c vendor-crypto/openssh/dist/dh.h vendor-crypto/openssh/dist/kex.c vendor-crypto/openssh/dist/kex.h vendor-crypto/openssh/dist/kexc25519.c vendor-crypto/openssh/dist/kexdh.c vendor-crypto/openssh/dist/kexdhc.c vendor-crypto/openssh/dist/kexdhs.c vendor-crypto/openssh/dist/kexgexs.c vendor-crypto/openssh/dist/key.c vendor-crypto/openssh/dist/log.c vendor-crypto/openssh/dist/log.h vendor-crypto/openssh/dist/mac.c vendor-crypto/openssh/dist/mac.h vendor-crypto/openssh/dist/misc.c vendor-crypto/openssh/dist/misc.h vendor-crypto/openssh/dist/moduli vendor-crypto/openssh/dist/moduli.0 vendor-crypto/openssh/dist/monitor.c vendor-crypto/openssh/dist/monitor_fdpass.c vendor-crypto/openssh/dist/monitor_wrap.c vendor-crypto/openssh/dist/monitor_wrap.h vendor-crypto/openssh/dist/mux.c vendor-crypto/openssh/dist/myproposal.h vendor-crypto/openssh/dist/opacket.h vendor-crypto/openssh/dist/openbsd-compat/Makefile.in vendor-crypto/openssh/dist/openbsd-compat/arc4random.c vendor-crypto/openssh/dist/openbsd-compat/bindresvport.c vendor-crypto/openssh/dist/openbsd-compat/bsd-asprintf.c vendor-crypto/openssh/dist/openbsd-compat/bsd-misc.c vendor-crypto/openssh/dist/openbsd-compat/bsd-misc.h vendor-crypto/openssh/dist/openbsd-compat/bsd-snprintf.c vendor-crypto/openssh/dist/openbsd-compat/inet_aton.c vendor-crypto/openssh/dist/openbsd-compat/openbsd-compat.h vendor-crypto/openssh/dist/openbsd-compat/port-solaris.h vendor-crypto/openssh/dist/openbsd-compat/vis.c vendor-crypto/openssh/dist/openbsd-compat/vis.h vendor-crypto/openssh/dist/openbsd-compat/xcrypt.c vendor-crypto/openssh/dist/packet.c vendor-crypto/openssh/dist/packet.h vendor-crypto/openssh/dist/pathnames.h vendor-crypto/openssh/dist/platform.c vendor-crypto/openssh/dist/platform.h vendor-crypto/openssh/dist/progressmeter.c vendor-crypto/openssh/dist/readconf.c vendor-crypto/openssh/dist/readconf.h vendor-crypto/openssh/dist/regress/Makefile vendor-crypto/openssh/dist/regress/agent-getpeereid.sh vendor-crypto/openssh/dist/regress/cert-hostkey.sh vendor-crypto/openssh/dist/regress/cert-userkey.sh vendor-crypto/openssh/dist/regress/cfgparse.sh vendor-crypto/openssh/dist/regress/connect-privsep.sh vendor-crypto/openssh/dist/regress/forwarding.sh vendor-crypto/openssh/dist/regress/integrity.sh vendor-crypto/openssh/dist/regress/modpipe.c vendor-crypto/openssh/dist/regress/netcat.c vendor-crypto/openssh/dist/regress/test-exec.sh vendor-crypto/openssh/dist/regress/unittests/Makefile vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_misc.c vendor-crypto/openssh/dist/regress/unittests/sshkey/test_sshkey.c vendor-crypto/openssh/dist/regress/unittests/test_helper/Makefile vendor-crypto/openssh/dist/sandbox-seccomp-filter.c vendor-crypto/openssh/dist/scp.0 vendor-crypto/openssh/dist/scp.1 vendor-crypto/openssh/dist/scp.c vendor-crypto/openssh/dist/servconf.c vendor-crypto/openssh/dist/serverloop.c vendor-crypto/openssh/dist/session.c vendor-crypto/openssh/dist/session.h vendor-crypto/openssh/dist/sftp-client.c vendor-crypto/openssh/dist/sftp-server.0 vendor-crypto/openssh/dist/sftp-server.c vendor-crypto/openssh/dist/sftp.0 vendor-crypto/openssh/dist/sftp.1 vendor-crypto/openssh/dist/sftp.c vendor-crypto/openssh/dist/ssh-add.0 vendor-crypto/openssh/dist/ssh-agent.0 vendor-crypto/openssh/dist/ssh-agent.1 vendor-crypto/openssh/dist/ssh-agent.c vendor-crypto/openssh/dist/ssh-dss.c vendor-crypto/openssh/dist/ssh-ecdsa.c vendor-crypto/openssh/dist/ssh-ed25519.c vendor-crypto/openssh/dist/ssh-keygen.0 vendor-crypto/openssh/dist/ssh-keygen.1 vendor-crypto/openssh/dist/ssh-keygen.c vendor-crypto/openssh/dist/ssh-keyscan.0 vendor-crypto/openssh/dist/ssh-keyscan.c vendor-crypto/openssh/dist/ssh-keysign.0 vendor-crypto/openssh/dist/ssh-pkcs11-helper.0 vendor-crypto/openssh/dist/ssh-rsa.c vendor-crypto/openssh/dist/ssh.0 vendor-crypto/openssh/dist/ssh.1 vendor-crypto/openssh/dist/ssh.c vendor-crypto/openssh/dist/ssh1.h vendor-crypto/openssh/dist/ssh2.h vendor-crypto/openssh/dist/ssh_api.c vendor-crypto/openssh/dist/ssh_config.0 vendor-crypto/openssh/dist/ssh_config.5 vendor-crypto/openssh/dist/sshbuf-getput-basic.c vendor-crypto/openssh/dist/sshbuf-misc.c vendor-crypto/openssh/dist/sshbuf.h vendor-crypto/openssh/dist/sshconnect2.c vendor-crypto/openssh/dist/sshd.0 vendor-crypto/openssh/dist/sshd.c vendor-crypto/openssh/dist/sshd_config vendor-crypto/openssh/dist/sshd_config.0 vendor-crypto/openssh/dist/sshd_config.5 vendor-crypto/openssh/dist/sshkey.c vendor-crypto/openssh/dist/sshkey.h vendor-crypto/openssh/dist/ttymodes.c vendor-crypto/openssh/dist/ttymodes.h vendor-crypto/openssh/dist/version.h Added: vendor-crypto/openssh/dist/.skipped-commit-ids ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-crypto/openssh/dist/.skipped-commit-ids Tue Jan 31 12:29:48 2017 (r313010) @@ -0,0 +1,11 @@ +321065a95a7ccebdd5fd08482a1e19afbf524e35 Update DH groups +d4f699a421504df35254cf1c6f1a7c304fb907ca Remove 1k bit groups +aafe246655b53b52bc32c8a24002bc262f4230f7 Remove intermediate moduli +8fa9cd1dee3c3339ae329cf20fb591db6d605120 put back SSH1 for 6.9 +f31327a48dd4103333cc53315ec53fe65ed8a17a Generate new moduli +edbfde98c40007b7752a4ac106095e060c25c1ef Regen moduli +052fd565e3ff2d8cec3bc957d1788f50c827f8e2 Switch to tame-based sandbox +7cf73737f357492776223da1c09179fa6ba74660 Remove moduli <2k +180d84674be1344e45a63990d60349988187c1ae Update moduli +f6ae971186ba68d066cd102e57d5b0b2c211a5ee systrace is dead. +96c5054e3e1f170c6276902d5bc65bb3b87a2603 remove DEBUGLIBS from Makefile Modified: vendor-crypto/openssh/dist/ChangeLog ============================================================================== --- vendor-crypto/openssh/dist/ChangeLog Tue Jan 31 07:13:01 2017 (r313009) +++ vendor-crypto/openssh/dist/ChangeLog Tue Jan 31 12:29:48 2017 (r313010) @@ -1,8905 +1,9202 @@ -commit 5c35450a0c901d9375fb23343a8dc82397da5f75 +commit 99522ba7ec6963a05c04a156bf20e3ba3605987c Author: Damien Miller -Date: Thu Mar 10 05:04:48 2016 +1100 +Date: Thu Jul 28 08:54:27 2016 +1000 - update versions for release - -commit 9d47b8d3f50c3a6282896df8274147e3b9a38c56 -Author: Damien Miller -Date: Thu Mar 10 05:03:39 2016 +1100 - - sanitise characters destined for xauth(1) + define _OPENBSD_SOURCE for reallocarray on NetBSD - reported by github.com/tintinweb + Report by and debugged with Hisashi T Fujinaka, dtucker nailed + the problem (lack of prototype causing return type confusion). -commit 72b061d4ba0f909501c595d709ea76e06b01e5c9 -Author: Darren Tucker -Date: Fri Feb 26 14:40:04 2016 +1100 +commit 3e1e076550c27c6bbdddf36d8f42bd79fbaaa187 +Author: Damien Miller +Date: Wed Jul 27 08:25:42 2016 +1000 - Add a note about using xlc on AIX. + KNF -commit fd4e4f2416baa2e6565ea49d52aade296bad3e28 -Author: Darren Tucker -Date: Wed Feb 24 10:44:25 2016 +1100 +commit d99ee9c4e5e217e7d05eeec84e9ce641f4675331 +Author: Damien Miller +Date: Wed Jul 27 08:25:23 2016 +1000 - Skip PrintLastLog in config dump mode. - - When DISABLE_LASTLOG is set, do not try to include PrintLastLog in the - config dump since it'll be reported as UNKNOWN. + Linux auditing also needs packet.h -commit 99135c764fa250801da5ec3b8d06cbd0111caae8 +commit 393bd381a45884b589baa9aed4394f1d250255ca Author: Damien Miller -Date: Tue Feb 23 20:17:23 2016 +1100 +Date: Wed Jul 27 08:18:05 2016 +1000 - update spec/README versions ahead of release + fix auditing on Linux + + get_remote_ipaddr() was replaced with ssh_remote_ipaddr() -commit b86a334aaaa4d1e643eb1fd71f718573d6d948b5 +commit 80e766fb089de4f3c92b1600eb99e9495e37c992 Author: Damien Miller -Date: Tue Feb 23 20:16:53 2016 +1100 +Date: Sun Jul 24 21:50:13 2016 +1000 - put back portable patchlevel to p1 + crank version numbers -commit 555dd35ff176847e3c6bd068ba2e8db4022eb24f +commit b1a478792d458f2e938a302e64bab2b520edc1b3 Author: djm@openbsd.org -Date: Tue Feb 23 09:14:34 2016 +0000 +Date: Sun Jul 24 11:45:36 2016 +0000 upstream commit - openssh-7.2 + openssh-7.3 - Upstream-ID: 9db776b26014147fc907ece8460ef2bcb0f11e78 + Upstream-ID: af106a7eb665f642648cf1993e162c899f358718 -commit 1acc058d0a7913838c830ed998a1a1fb5b7864bf -Author: Damien Miller -Date: Tue Feb 23 16:12:13 2016 +1100 +commit 353766e0881f069aeca30275ab706cd60a1a8fdd +Author: Darren Tucker +Date: Sat Jul 23 16:14:42 2016 +1000 - Disable tests where fs perms are incorrect + Move Cygwin IPPORT_RESERVED overrride to defines.h - Some tests have strict requirements on the filesystem permissions - for certain files and directories. This adds a regress/check-perm - tool that copies the relevant logic from sshd to exactly test - the paths in question. This lets us skip tests when the local - filesystem doesn't conform to our expectations rather than - continuing and failing the test run. - - ok dtucker@ + Patch from vinschen at redhat.com. -commit 39f303b1f36d934d8410b05625f25c7bcb75db4d -Author: Damien Miller -Date: Tue Feb 23 12:56:59 2016 +1100 +commit 368dd977ae07afb93f4ecea23615128c95ab2b32 +Author: djm@openbsd.org +Date: Sat Jul 23 02:54:08 2016 +0000 - fix sandbox on OSX Lion - - sshd was failing with: + upstream commit - ssh_sandbox_child: sandbox_init: dlopen(/usr/lib/libsandbox.1.dylib, 261):cw - image not found [preauth] + fix pledge violation with ssh -f; reported by Valentin + Kozamernik ok dtucker@ - caused by chroot before sandboxing. Avoid by explicitly linking libsandbox - to sshd. Spotted by Darren. + Upstream-ID: a61db7988db88d9dac3c4dd70e18876a8edf84aa -commit 0d1451a32c7436e6d3d482351e776bc5e7824ce4 +commit f00211e3c6d24d6ea2b64b4b1209f671f6c1d42e Author: djm@openbsd.org -Date: Tue Feb 23 01:34:14 2016 +0000 +Date: Fri Jul 22 07:00:46 2016 +0000 upstream commit - fix spurious error message when incorrect passphrase - entered for keys; reported by espie@ ok deraadt@ + improve wording; suggested by jmc@ - Upstream-ID: 58b2e46e63ed6912ed1ee780bd3bd8560f9a5899 + Upstream-ID: 55cb0a24c8e0618b3ceec80998dc82c85db2d2f8 -commit 09d87d79741beb85768b5e788d7dfdf4bc3543dc -Author: sobrado@openbsd.org -Date: Sat Feb 20 23:06:23 2016 +0000 +commit 83cbca693c3b0719270e6a0f2efe3f9ee93a65b8 +Author: dtucker@openbsd.org +Date: Fri Jul 22 05:46:11 2016 +0000 upstream commit - set ssh(1) protocol version to 2 only. - - ok djm@ + Lower loglevel for "Authenticated with partial success" + message similar to other similar level. bz#2599, patch from cgallek at + gmail.com, ok markus@ - Upstream-ID: e168daf9d27d7e392e3c9923826bd8e87b2b3a10 + Upstream-ID: 3faab814e947dc7b2e292edede23e94c608cb4dd -commit 9262e07826ba5eebf8423f7ac9e47ec488c47869 -Author: sobrado@openbsd.org -Date: Sat Feb 20 23:02:39 2016 +0000 +commit 10358abd087ab228b7ce2048efc4f3854a9ab9a6 +Author: Damien Miller +Date: Fri Jul 22 14:06:36 2016 +1000 - upstream commit - - add missing ~/.ssh/id_ecdsa and ~/.ssh/id_ed25519 to - IdentityFile. - - ok djm@ + retry waitpid on EINTR failure - Upstream-ID: 6ce99466312e4ae7708017c3665e3edb976f70cf + patch from Jakub Jelen on bz#2581; ok dtucker@ -commit c12f0fdce8f985fca8d71829fd64c5b89dc777f5 -Author: sobrado@openbsd.org -Date: Sat Feb 20 23:01:46 2016 +0000 +commit da88a70a89c800e74ea8e5661ffa127a3cc79a92 +Author: djm@openbsd.org +Date: Fri Jul 22 03:47:36 2016 +0000 upstream commit - AddressFamily defaults to any. - - ok djm@ - - Upstream-ID: 0d94aa06a4b889bf57a7f631c45ba36d24c13e0c - -commit 907091acb188b1057d50c2158f74c3ecf1c2302b -Author: Darren Tucker -Date: Fri Feb 19 09:05:39 2016 +1100 - - Make Solaris privs code build on older systems. + constify a few functions' arguments; patch from Jakub + Jelen bz#2581 - Not all systems with Solaris privs have priv_basicset so factor that - out and provide backward compatibility code. Similarly, not all have - PRIV_NET_ACCESS so wrap that in #ifdef. Based on code from - alex at cooperi.net and djm@ with help from carson at taltos.org and - wieland at purdue.edu. + Upstream-ID: f2043f51454ea37830ff6ad60c8b32b4220f448d -commit 292a8dee14e5e67dcd1b49ba5c7b9023e8420d59 +commit c36d91bd4ebf767f310f7cea88d61d1c15f53ddf Author: djm@openbsd.org -Date: Wed Feb 17 22:20:14 2016 +0000 +Date: Fri Jul 22 03:39:13 2016 +0000 upstream commit - rekey refactor broke SSH1; spotted by Tom G. Christensen + move debug("%p", key) to before key is free'd; probable + undefined behaviour on strict compilers; reported by Jakub Jelen bz#2581 - Upstream-ID: 43f0d57928cc077c949af0bfa71ef574dcb58243 + Upstream-ID: 767f323e1f5819508a0e35e388ec241bac2f953a -commit 3a13cb543df9919aec2fc6b75f3dd3802facaeca +commit 286f5a77c3bfec1e8892ca268087ac885ac871bf Author: djm@openbsd.org -Date: Wed Feb 17 08:57:34 2016 +0000 +Date: Fri Jul 22 03:35:11 2016 +0000 upstream commit - rsa-sha2-512,rsa-sha2-256 cannot be selected explicitly - in *KeyTypes options yet. Remove them from the lists of algorithms for now. - committing on behalf of markus@ ok djm@ + reverse the order in which -J/JumpHost proxies are visited to + be more intuitive and document - Upstream-ID: c6e8820eb8e610ac21551832c0c89684a9a51bb7 + reported by and manpage bits naddy@ + + Upstream-ID: 3a68fd6a841fd6cf8cedf6552a9607ba99df179a -commit a685ae8d1c24fb7c712c55a4f3280ee76f5f1e4b -Author: jmc@openbsd.org -Date: Wed Feb 17 07:38:19 2016 +0000 +commit fcd135c9df440bcd2d5870405ad3311743d78d97 +Author: dtucker@openbsd.org +Date: Thu Jul 21 01:39:35 2016 +0000 upstream commit - since these pages now clearly tell folks to avoid v1, - normalise the docs from a v2 perspective (i.e. stop pointing out which bits - are v2 only); + Skip passwords longer than 1k in length so clients can't + easily DoS sshd by sending very long passwords, causing it to spend CPU + hashing them. feedback djm@, ok markus@. - ok/tweaks djm ok markus + Brought to our attention by tomas.kuthan at oracle.com, shilei-c at + 360.cn and coredump at autistici.org - Upstream-ID: eb474f8c36fb6a532dc05c282f7965e38dcfa129 + Upstream-ID: d0af7d4a2190b63ba1d38eec502bc4be0be9e333 -commit c5c3f3279a0e4044b8de71b70d3570d692d0f29d -Author: djm@openbsd.org -Date: Wed Feb 17 05:29:04 2016 +0000 +commit 324583e8fb3935690be58790425793df619c6d4d +Author: naddy@openbsd.org +Date: Wed Jul 20 10:45:27 2016 +0000 upstream commit - make sandboxed privilege separation the default, not just - for new installs; "absolutely" deraadt@ + Do not clobber the global jump_host variables when + parsing an inactive configuration. ok djm@ - Upstream-ID: 5221ef3b927d2df044e9aa3f5db74ae91743f69b + Upstream-ID: 5362210944d91417d5976346d41ac0b244350d31 -commit eb3f7337a651aa01d5dec019025e6cdc124ed081 +commit 32d921c323b989d28405e78d0a8923d12913d737 Author: jmc@openbsd.org -Date: Tue Feb 16 07:47:54 2016 +0000 +Date: Tue Jul 19 12:59:16 2016 +0000 upstream commit - no need to state that protocol 2 is the default twice; + tweak previous; - Upstream-ID: b1e4c36b0c2e12e338e5b66e2978f2ac953b95eb + Upstream-ID: f3c1a5b3f05dff366f60c028728a2b43f15ff534 -commit e7901efa9b24e5b0c7e74f2c5520d47eead4d005 -Author: djm@openbsd.org -Date: Tue Feb 16 05:11:04 2016 +0000 +commit d7eabc86fa049a12ba2c3fb198bd1d51b37f7025 +Author: dtucker@openbsd.org +Date: Tue Jul 19 11:38:53 2016 +0000 upstream commit - Replace list of ciphers and MACs adjacent to -1/-2 flag - descriptions in ssh(1) with a strong recommendation not to use protocol 1. - Add a similar warning to the Protocol option descriptions in ssh_config(5) - and sshd_config(5); - - prompted by and ok mmcc@ + Allow wildcard for PermitOpen hosts as well as ports. + bz#2582, patch from openssh at mzpqnxow.com and jjelen at redhat.com. ok + markus@ - Upstream-ID: 961f99e5437d50e636feca023978950a232ead5e + Upstream-ID: af0294e9b9394c4e16e991424ca0a47a7cc605f2 -commit 5a0fcb77287342e2fc2ba1cee79b6af108973dc2 -Author: djm@openbsd.org -Date: Tue Feb 16 03:37:48 2016 +0000 +commit b98a2a8348e907b3d71caafd80f0be8fdd075943 +Author: markus@openbsd.org +Date: Mon Jul 18 11:35:33 2016 +0000 upstream commit - add a "Close session" log entry (at loglevel=verbose) to - correspond to the existing "Starting session" one. Also include the session - id number to make multiplexed sessions more apparent. - - feedback and ok dtucker@ + Reduce timing attack against obsolete CBC modes by always + computing the MAC over a fixed size of data. Reported by Jean Paul + Degabriele, Kenny Paterson, Torben Hansen and Martin Albrecht. ok djm@ - Upstream-ID: e72d2ac080e02774376325136e532cb24c2e617c + Upstream-ID: f20a13279b00ba0afbacbcc1f04e62e9d41c2912 -commit 624fd395b559820705171f460dd33d67743d13d6 -Author: djm@openbsd.org -Date: Wed Feb 17 02:24:17 2016 +0000 +commit dbf788b4d9d9490a5fff08a7b09888272bb10fcc +Author: Darren Tucker +Date: Thu Jul 21 14:17:31 2016 +1000 - upstream commit - - include bad $SSH_CONNECTION in failure output + Search users for one with a valid salt. - Upstream-Regress-ID: b22d72edfde78c403aaec2b9c9753ef633cc0529 + If the root account is locked (eg password "!!" or "*LK*") keep looking + until we find a user with a valid salt to use for crypting passwords of + invalid users. ok djm@ -commit 60d860e54b4f199e5e89963b1c086981309753cb +commit e8b58f48fbb1b524fb4f0d4865fa0005d6a4b782 Author: Darren Tucker -Date: Wed Feb 17 13:37:09 2016 +1100 +Date: Mon Jul 18 17:22:49 2016 +1000 - Rollback addition of va_start. + Explicitly specify source files for regress tools. - va_start was added in 0f754e29dd3760fc0b172c1220f18b753fb0957e, however - it has the wrong number of args and it's not usable in non-variadic - functions anyway so it breaks things (for example Solaris 2.6 as - reported by Tom G. Christensen).i ok djm@ + Since adding $(REGRESSLIBS), $? is wrong because it includes only the + changed source files. $< seems like it'd be right however it doesn't + seem to work on some non-GNU makes, so do what works everywhere. -commit 2fee909c3cee2472a98b26eb82696297b81e0d38 +commit eac1bbd06872c273f16ac0f9976b0aef026b701b Author: Darren Tucker -Date: Wed Feb 17 09:48:15 2016 +1100 +Date: Mon Jul 18 17:12:22 2016 +1000 - Look for gethostbyname in libresolv and libnsl. - - Should fix build problem on Solaris 2.6 reported by Tom G. Christensen. + Conditionally include err.h. -commit 5ac712d81a84396aab441a272ec429af5b738302 -Author: Damien Miller -Date: Tue Feb 16 10:45:02 2016 +1100 +commit 0a454147568746c503f669e1ba861f76a2e7a585 +Author: Darren Tucker +Date: Mon Jul 18 16:26:26 2016 +1000 - make existing ssh_malloc_init only for __OpenBSD__ + Remove local implementation of err, errx. + + We now have a shared implementation in libopenbsd-compat. -commit 24c9bded569d9f2449ded73f92fb6d12db7a9eec +commit eb999a4590846ba4d56ddc90bd07c23abfbab7b1 Author: djm@openbsd.org -Date: Mon Feb 15 23:32:37 2016 +0000 +Date: Mon Jul 18 06:08:01 2016 +0000 upstream commit - memleak of algorithm name in mm_answer_sign; reported by - Jakub Jelen + Add some unsigned overflow checks for extra_pad. None of + these are reachable with the amount of padding that we use internally. + bz#2566, pointed out by Torben Hansen. ok markus@ - Upstream-ID: ccd742cd25952240ebd23d7d4d6b605862584d08 + Upstream-ID: 4d4be8450ab2fc1b852d5884339f8e8c31c3fd76 -commit ffb1e7e896139a42ceb78676f637658f44612411 -Author: dtucker@openbsd.org -Date: Mon Feb 15 09:47:49 2016 +0000 +commit c71ba790c304545464bb494de974cdf0f4b5cf1e +Author: Darren Tucker +Date: Mon Jul 18 15:43:25 2016 +1000 - upstream commit - - Add a function to enable security-related malloc_options. - With and ok deraadt@, something similar has been in the snaps for a while. + Add dependency on libs for unit tests. - Upstream-ID: 43a95523b832b7f3b943d2908662191110c380ed + Makes "./configure && make tests" work again. ok djm@ -commit ef39e8c0497ff0564990a4f9e8b7338b3ba3507c -Author: Damien Miller -Date: Tue Feb 16 10:34:39 2016 +1100 +commit 8199d0311aea3e6fd0284c9025e7a83f4ece79e8 +Author: Darren Tucker +Date: Mon Jul 18 13:47:39 2016 +1000 - sync ssh-copy-id with upstream 783ef08b0a75 + Correct location for kexfuzz in clean target. -commit d2d772f55b19bb0e8d03c2fe1b9bb176d9779efd -Author: djm@openbsd.org -Date: Fri Feb 12 00:20:30 2016 +0000 +commit 01558b7b07af43da774d3a11a5c51fa9c310849d +Author: Darren Tucker +Date: Mon Jul 18 09:33:25 2016 +1000 - upstream commit + Handle PAM_MAXTRIES from modules. - avoid fatal() for PKCS11 tokens that present empty key IDs - bz#1773, ok markus@ + bz#2249: handle the case where PAM returns PAM_MAXTRIES by ceasing to offer + password and keyboard-interative authentication methods. Should prevent + "sshd ignoring max retries" warnings in the log. ok djm@ - Upstream-ID: 044a764fee526f2c4a9d530bd10695422d01fc54 + It probably won't trigger with keyboard-interactive in the default + configuration because the retry counter is stored in module-private + storage which goes away with the sshd PAM process (see bz#688). On the + other hand, those cases probably won't log a warning either. -commit e4c918a6c721410792b287c9fd21356a1bed5805 +commit 65c6c6b567ab5ab12945a5ad8e0ab3a8c26119cc Author: djm@openbsd.org -Date: Thu Feb 11 02:56:32 2016 +0000 +Date: Sun Jul 17 04:20:16 2016 +0000 upstream commit - sync crypto algorithm lists in ssh_config(5) and - sshd_config(5) with current reality. bz#2527 + support UTF-8 characters in ssh(1) banners using + schwarze@'s safe fmprintf printer; bz#2058 - Upstream-ID: d7fd1b6c1ed848d866236bcb1d7049d2bb9b2ff6 + feedback schwarze@ ok dtucker@ + + Upstream-ID: a72ce4e3644c957643c9524eea2959e41b91eea7 -commit e30cabfa4ab456a30b3224f7f545f1bdfc4a2517 -Author: djm@openbsd.org -Date: Thu Feb 11 02:21:34 2016 +0000 +commit e4eb7d910976fbfc7ce3e90c95c11b07b483d0d7 +Author: jmc@openbsd.org +Date: Sat Jul 16 06:57:55 2016 +0000 upstream commit - fix regression in openssh-6.8 sftp client: existing - destination directories would incorrectly terminate recursive uploads; - bz#2528 + - add proxyjump to the options list - formatting fixes - + update usage() - Upstream-ID: 3306be469f41f26758e3d447987ac6d662623e18 + ok djm + + Upstream-ID: 43d318e14ce677a2eec8f21ef5ba2f9f68a59457 -commit 714e367226ded4dc3897078be48b961637350b05 -Author: djm@openbsd.org -Date: Tue Feb 9 05:30:04 2016 +0000 +commit af1f084857621f14bd9391aba8033d35886c2455 +Author: dtucker@openbsd.org +Date: Fri Jul 15 05:01:58 2016 +0000 upstream commit - turn off more old crypto in the client: hmac-md5, ripemd, - truncated HMACs, RC4, blowfish. ok markus@ dtucker@ + Reduce the syslog level of some relatively common protocol + events from LOG_CRIT by replacing fatal() calls with logdie(). Part of + bz#2585, ok djm@ - Upstream-ID: 96aa11c2c082be45267a690c12f1d2aae6acd46e + Upstream-ID: 9005805227c94edf6ac02a160f0e199638d288e5 -commit 5a622844ff7f78dcb75e223399f9ef0977e8d0a3 -Author: djm@openbsd.org -Date: Mon Feb 8 23:40:12 2016 +0000 +commit bd5f2b78b69cf38d6049a0de445a79c8595e4a1f +Author: Damien Miller +Date: Fri Jul 15 19:14:48 2016 +1000 - upstream commit + missing openssl/dh.h + +commit 4a984fd342effe5f0aad874a0d538c4322d973c0 +Author: Damien Miller +Date: Fri Jul 15 18:47:07 2016 +1000 + + cast to avoid type warning in error message + +commit 5abfb15ced985c340359ae7fb65a625ed3692b3e +Author: Darren Tucker +Date: Fri Jul 15 14:48:30 2016 +1000 + + Move VA_COPY macro into compat header. - don't attempt to percent_expand() already-canonicalised - addresses, avoiding unnecessary failures when attempting to connect to scoped - IPv6 addresses (that naturally contain '%' characters) + Some AIX compilers unconditionally undefine va_copy but don't set it back + to an internal function, causing link errors. In some compat code we + already use VA_COPY instead so move the two existing instances into the + shared header and use for sshbuf-getput-basic.c too. Should fix building + with at lease some versions of AIX's compiler. bz#2589, ok djm@ + +commit 832b7443b7a8e181c95898bc5d73497b7190decd +Author: Damien Miller +Date: Fri Jul 15 14:45:34 2016 +1000 + + disable ciphers not supported by OpenSSL - Upstream-ID: f24569cffa1a7cbde5f08dc739a72f4d78aa5c6a + bz#2466 ok dtucker@ -commit 19bcf2ea2d17413f2d9730dd2a19575ff86b9b6a +commit 5fbe93fc6fbb2fe211e035703dec759d095e3dd8 +Author: Damien Miller +Date: Fri Jul 15 13:54:31 2016 +1000 + + add a --disable-pkcs11 knob + +commit 679ce88ec2a8e2fe6515261c489e8c1449bb9da9 +Author: Damien Miller +Date: Fri Jul 15 13:44:38 2016 +1000 + + fix newline escaping for unsupported_algorithms + + The hmac-ripemd160 was incorrect and could lead to broken + Makefiles on systems that lacked support for it, but I made + all the others consistent too. + +commit ed877ef653847d056bb433975d731b7a1132a979 Author: djm@openbsd.org -Date: Mon Feb 8 10:57:07 2016 +0000 +Date: Fri Jul 15 00:24:30 2016 +0000 upstream commit - refactor activation of rekeying + Add a ProxyJump ssh_config(5) option and corresponding -J + ssh(1) command-line flag to allow simplified indirection through a SSH + bastion or "jump host". - This makes automatic rekeying internal to the packet code (previously - the server and client loops needed to assist). In doing to it makes - application of rekey limits more accurate by accounting for packets - about to be sent as well as packets queued during rekeying events - themselves. + These options construct a proxy command that connects to the + specified jump host(s) (more than one may be specified) and uses + port-forwarding to establish a connection to the next destination. - Based on a patch from dtucker@ which was in turn based on a patch - Aleksander Adamowski in bz#2521; ok markus@ + This codifies the safest way of indirecting connections through SSH + servers and makes it easy to use. - Upstream-ID: a441227fd64f9739850ca97b4cf794202860fcd8 + ok markus@ + + Upstream-ID: fa899cb8b26d889da8f142eb9774c1ea36b04397 -commit 603ba41179e4b53951c7b90ee95b6ef3faa3f15d -Author: naddy@openbsd.org -Date: Fri Feb 5 13:28:19 2016 +0000 +commit 5c02dd126206a26785379e80f2d3848e4470b711 +Author: Darren Tucker +Date: Fri Jul 15 12:56:39 2016 +1000 - upstream commit + Map umac_ctx struct name too. - Only check errno if read() has returned an error. EOF is - not an error. This fixes a problem where the mux master would sporadically - fail to notice that the client had exited. ok mikeb@ djm@ + Prevents size mismatch linker warnings on Solaris 11. + +commit 283b97ff33ea2c641161950849931bd578de6946 +Author: Darren Tucker +Date: Fri Jul 15 13:49:44 2016 +1000 + + Mitigate timing of disallowed users PAM logins. - Upstream-ID: 3c2dadc21fac6ef64665688aac8a75fffd57ae53 + When sshd decides to not allow a login (eg PermitRootLogin=no) and + it's using PAM, it sends a fake password to PAM so that the timing for + the failure is not noticeably different whether or not the password + is correct. This behaviour can be detected by sending a very long + password string which is slower to hash than the fake password. + + Mitigate by constructing an invalid password that is the same length + as the one from the client and thus takes the same time to hash. + Diff from djm@ -commit 56d7dac790693ce420d225119283bc355cff9185 -Author: jsg@openbsd.org -Date: Fri Feb 5 04:31:21 2016 +0000 +commit 9286875a73b2de7736b5e50692739d314cd8d9dc +Author: Darren Tucker +Date: Fri Jul 15 13:32:45 2016 +1000 + + Determine appropriate salt for invalid users. + + When sshd is processing a non-PAM login for a non-existent user it uses + the string from the fakepw structure as the salt for crypt(3)ing the + password supplied by the client. That string has a Blowfish prefix, so on + systems that don't understand that crypt will fail fast due to an invalid + salt, and even on those that do it may have significantly different timing + from the hash methods used for real accounts (eg sha512). This allows + user enumeration by, eg, sending large password strings. This was noted + by EddieEzra.Harari at verint.com (CVE-2016-6210). + + To mitigate, use the same hash algorithm that root uses for hashing + passwords for users that do not exist on the system. ok djm@ + +commit a162dd5e58ca5b224d7500abe35e1ef32b5de071 +Author: Darren Tucker +Date: Thu Jul 14 21:19:59 2016 +1000 + + OpenSSL 1.1.x not currently supported. + +commit 7df91b01fc558a33941c5c5f31abbcdc53a729fb +Author: Darren Tucker +Date: Thu Jul 14 12:25:24 2016 +1000 + + Check for VIS_ALL. + + If we don't have it, set BROKEN_STRNVIS to activate the compat replacement. + +commit ee67716f61f1042d5e67f91c23707cca5dcdd7d0 +Author: dtucker@openbsd.org +Date: Thu Jul 14 01:24:21 2016 +0000 upstream commit - avoid an uninitialised value when NumberOfPasswordPrompts - is 0 ok markus@ djm@ + Correct equal in test. - Upstream-ID: 11b068d83c2865343aeb46acf1e9eec00f829b6b + Upstream-Regress-ID: 4e32f7a5c57a619c4e8766cb193be2a1327ec37a -commit deae7d52d59c5019c528f977360d87fdda15d20b -Author: djm@openbsd.org -Date: Fri Feb 5 03:07:06 2016 +0000 +commit 372807c2065c8572fdc6478b25cc5ac363743073 +Author: tb@openbsd.org +Date: Mon Jul 11 21:38:13 2016 +0000 upstream commit - mention internal DH-GEX fallback groups; bz#2302 + Add missing "recvfd" pledge promise: Raf Czlonka reported + ssh coredumps when Control* keywords were set in ssh_config. This patch also + fixes similar problems with scp and sftp. - Upstream-ID: e7b395fcca3122cd825515f45a2e41c9a157e09e + ok deraadt, looks good to millert + + Upstream-ID: ca2099eade1ef3e87a79614fefa26a0297ad8a3b -commit cac3b6665f884d46192c0dc98a64112e8b11a766 -Author: djm@openbsd.org -Date: Fri Feb 5 02:37:56 2016 +0000 +commit e0453f3df64bf485c61c7eb6bd12893eee9fe2cd +Author: tedu@openbsd.org +Date: Mon Jul 11 03:19:44 2016 +0000 upstream commit - better description for MaxSessions; bz#2531 + obsolete note about fascistloggin is obsolete. ok djm + dtucker - Upstream-ID: e2c0d74ee185cd1a3e9d4ca1f1b939b745b354da + Upstream-ID: dae60df23b2bb0e89f42661ddd96a7b0d1b7215a -commit 5ef4b0fdcc7a239577a754829b50022b91ab4712 +commit a2333584170a565adf4f209586772ef8053b10b8 +Author: Darren Tucker +Date: Thu Jul 14 10:59:09 2016 +1000 + + Add compat code for missing wcwidth. + + If we don't have wcwidth force fallback implementations of nl_langinfo + and mbtowc. Based on advice from Ingo Schwarze. + +commit 8aaec7050614494014c47510b7e94daf6e644c62 Author: Damien Miller -Date: Wed Jan 27 17:45:56 2016 +1100 +Date: Thu Jul 14 09:48:48 2016 +1000 - avoid FreeBSD RCS Id in comment + fix missing include for systems with err.h + +commit 6310ef27a2567cda66d6cf0c1ad290ee1167f243 +Author: Darren Tucker +Date: Wed Jul 13 14:42:35 2016 +1000 + + Move err.h replacements into compat lib. - Change old $FreeBSD version string in comment so it doesn't - become an RCS ident downstream; requested by des AT des.no + Move implementations of err.h replacement functions into their own file + in the libopenbsd-compat so we can use them in kexfuzz.c too. ok djm@ -commit 696d12683c90d20a0a9c5f4275fc916b7011fb04 -Author: djm@openbsd.org -Date: Thu Feb 4 23:43:48 2016 +0000 +commit f3f2cc8386868f51440c45210098f65f9787449a +Author: Darren Tucker +Date: Mon Jul 11 17:23:38 2016 +1000 - upstream commit + Check for wchar.h and langinfo.h - printf argument casts to avoid warnings on strict - compilers + Wrap includes in the appropriate #ifdefs. + +commit b9c50614eba9d90939b2b119b6e1b7e03b462278 +Author: Damien Miller +Date: Fri Jul 8 13:59:13 2016 +1000 + + whitelist more architectures for seccomp-bpf - Upstream-ID: 7b9f6712cef01865ad29070262d366cf13587c9c + bz#2590 - testing and patch from Jakub Jelen -commit 5658ef2501e785fbbdf5de2dc33b1ff7a4dca73a -Author: millert@openbsd.org -Date: Mon Feb 1 21:18:17 2016 +0000 +commit 18813a32b6fd964037e0f5e1893cb4468ac6a758 +Author: guenther@openbsd.org +Date: Mon Jul 4 18:01:44 2016 +0000 upstream commit - Avoid ugly "DISPLAY "(null)" invalid; disabling X11 - forwarding" message when DISPLAY is not set. This could also result in a - crash on systems with a printf that doesn't handle NULL. OK djm@ + DEBUGLIBS has been broken since the gcc4 switch, so delete + it. CFLAGS contains -g by default anyway - Upstream-ID: 20ee0cfbda678a247264c20ed75362042b90b412 + problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com) + ok millert@ kettenis@ deraadt@ + + Upstream-Regress-ID: 4a0bb72f95c63f2ae9daa8a040ac23914bddb542 -commit 537f88ec7bcf40bd444ac5584c707c5588c55c43 -Author: dtucker@openbsd.org -Date: Fri Jan 29 05:18:15 2016 +0000 +commit 6d31193d0baa3da339c196ac49625b7ba1c2ecc7 +Author: djm@openbsd.org +Date: Fri Jul 8 03:44:42 2016 +0000 upstream commit - Add regression test for RekeyLimit parsing of >32bit values - (4G and 8G). + Improve crypto ordering for Encrypt-then-MAC (EtM) mode + MAC algorithms. - Upstream-Regress-ID: 548390350c62747b6234f522a99c319eee401328 + Previously we were computing the MAC, decrypting the packet and then + checking the MAC. This gave rise to the possibility of creating a + side-channel oracle in the decryption step, though no such oracle has + been identified. + + This adds a mac_check() function that computes and checks the MAC in + one pass, and uses it to advance MAC checking for EtM algorithms to + before payload decryption. + + Reported by Jean Paul Degabriele, Kenny Paterson, Torben Hansen and + Martin Albrecht. feedback and ok markus@ + + Upstream-ID: 1999bb67cab47dda5b10b80d8155fe83d4a1867b -commit 4c6cb8330460f94e6c7ae28a364236d4188156a3 -Author: dtucker@openbsd.org -Date: Fri Jan 29 23:04:46 2016 +0000 +commit 71f5598f06941f645a451948c4a5125c83828e1c +Author: guenther@openbsd.org +Date: Mon Jul 4 18:01:44 2016 +0000 upstream commit - Remove leftover roaming dead code. ok djm markus. + DEBUGLIBS has been broken since the gcc4 switch, so + delete it. CFLAGS contains -g by default anyway - Upstream-ID: 13d1f9c8b65a5109756bcfd3b74df949d53615be + problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com) + ok millert@ kettenis@ deraadt@ + + Upstream-ID: 96c5054e3e1f170c6276902d5bc65bb3b87a2603 -commit 28136471809806d6246ef41e4341467a39fe2f91 -Author: djm@openbsd.org -Date: Fri Jan 29 05:46:01 2016 +0000 +commit e683fc6f1c8c7295648dbda679df8307786ec1ce +Author: dtucker@openbsd.org +Date: Thu Jun 30 05:17:05 2016 +0000 upstream commit - include packet type of non-data packets in debug3 output; - ok markus dtucker + Explicitly check for 100% completion to avoid potential + floating point rounding error, which could cause progressmeter to report 99% + on completion. While there invert the test so the 100% case is clearer. with + & ok djm@ - Upstream-ID: 034eaf639acc96459b9c5ce782db9fcd8bd02d41 + Upstream-ID: a166870c5878e422f3c71ff802e2ccd7032f715d -commit 6fd6e28daccafaa35f02741036abe64534c361a1 -Author: dtucker@openbsd.org -Date: Fri Jan 29 03:31:03 2016 +0000 +commit 772e6cec0ed740fc7db618dc30b4134f5a358b43 +Author: jmc@openbsd.org +Date: Wed Jun 29 17:14:28 2016 +0000 upstream commit - Revert "account for packets buffered but not yet - processed" change as it breaks for very small RekeyLimit values due to - continuous rekeying. ok djm@ + sort the -o list; - Upstream-ID: 7e03f636cb45ab60db18850236ccf19079182a19 + Upstream-ID: 1a97465ede8790b4d47cb618269978e07f41f8ac -commit 921ff00b0ac429666fb361d2d6cb1c8fff0006cb -Author: dtucker@openbsd.org -Date: Fri Jan 29 02:54:45 2016 +0000 +commit 46ecd19e554ccca15a7309cd1b6b44bc8e6b84af +Author: djm@openbsd.org +Date: Thu Jun 23 05:17:51 2016 +0000 upstream commit - Allow RekeyLimits in excess of 4G up to 2**63 bits - (limited by the return type of scan_scaled). Part of bz#2521, ok djm. + fix AuthenticationMethods during configuration re-parse; + reported by Juan Francisco Cantero Hurtado - Upstream-ID: 13bea82be566b9704821b1ea05bf7804335c7979 + Upstream-ID: 8ffa1dac25c7577eca8238e825317ab20848f9b4 -commit c0060a65296f01d4634f274eee184c0e93ba0f23 -Author: dtucker@openbsd.org -Date: Fri Jan 29 02:42:46 2016 +0000 +commit 3147e7595d0f2f842a666c844ac53e6c7a253d7e +Author: djm@openbsd.org +Date: Sun Jun 19 07:48:02 2016 +0000 upstream commit - Account for packets buffered but not yet processed when - computing whether or not it is time to perform rekeying. bz#2521, based - loosely on a patch from olo at fb.com, ok djm@ + revert 1.34; causes problems loading public keys - Upstream-ID: 67e268b547f990ed220f3cb70a5624d9bda12b8c + reported by semarie@ + + Upstream-ID: b393794f8935c8b15d98a407fe7721c62d2ed179 -commit 44cf930e670488c85c9efeb373fa5f4b455692ac -Author: djm@openbsd.org -Date: Wed Jan 27 06:44:58 2016 +0000 +commit ad23a75509f4320d43f628c50f0817e3ad12bfa7 +Author: jmc@openbsd.org +Date: Fri Jun 17 06:33:30 2016 +0000 upstream commit - change old $FreeBSD version string in comment so it doesn't - become an RCS ident downstream; requested by des AT des.no + grammar fix; - Upstream-ID: 8ca558c01f184e596b45e4fc8885534b2c864722 + Upstream-ID: 5d5b21c80f1e81db367333ce0bb3e5874fb3e463 -commit ebacd377769ac07d1bf3c75169644336056b7060 +commit 5e28b1a2a3757548b40018cc2493540a17c82e27 Author: djm@openbsd.org -Date: Wed Jan 27 00:53:12 2016 +0000 +Date: Fri Jun 17 05:06:23 2016 +0000 upstream commit - make the debug messages a bit more useful here + translate OpenSSL error codes to something more + meaninful; bz#2522 reported by Jakub Jelen, ok dtucker@ - Upstream-ID: 478ccd4e897e0af8486b294aa63aa3f90ab78d64 + Upstream-ID: 4cb0795a366381724314e6515d57790c5930ffe5 -commit 458abc2934e82034c5c281336d8dc0f910aecad3 -Author: jsg@openbsd.org -Date: Sat Jan 23 05:31:35 2016 +0000 +commit b64faeb5eda7eff8210c754d00464f9fe9d23de5 +Author: djm@openbsd.org +Date: Fri Jun 17 05:03:40 2016 +0000 upstream commit - Zero a stack buffer with explicit_bzero() instead of - memset() when returning from client_loop() for consistency with - buffer_free()/sshbuf_free(). + ban AuthenticationMethods="" and accept + AuthenticationMethods=any for the default behaviour of not requiring multiple + authentication - ok dtucker@ deraadt@ djm@ + bz#2398 from Jakub Jelen; ok dtucker@ - Upstream-ID: bc9975b2095339811c3b954694d7d15ea5c58f66 + Upstream-ID: fabd7f44d59e4518d241d0d01e226435cc23cf27 -commit 65a3c0dacbc7dbb75ddb6a70ebe22d8de084d0b0 +commit 9816fc5daee5ca924dd5c4781825afbaab728877 Author: dtucker@openbsd.org -Date: Wed Jan 20 09:22:39 2016 +0000 +Date: Thu Jun 16 11:00:17 2016 +0000 upstream commit - Include sys/time.h for gettimeofday. From sortie at - maxsi.org. + Include stdarg.h for va_copy as per man page. - Upstream-ID: 6ed0c33b836d9de0a664cd091e86523ecaa2fb3b + Upstream-ID: 105d6b2f1af2fbd9d91c893c436ab121434470bd -commit fc77ccdc2ce6d5d06628b8da5048a6a5f6ffca5a -Author: markus@openbsd.org -Date: Thu Jan 14 22:56:56 2016 +0000 +commit b6cf84b51bc0f5889db48bf29a0c771954ade283 +Author: jmc@openbsd.org +Date: Thu Jun 16 06:10:45 2016 +0000 upstream commit - fd leaks; report Qualys Security Advisory team; ok - deraadt@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jan 31 12:31:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BDECCC9F84; Tue, 31 Jan 2017 12:31:40 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C722B1E96; Tue, 31 Jan 2017 12:31:39 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VCVcnq045240; Tue, 31 Jan 2017 12:31:38 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VCVcUi045239; Tue, 31 Jan 2017 12:31:38 GMT (envelope-from des@FreeBSD.org) Message-Id: <201701311231.v0VCVcUi045239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 31 Jan 2017 12:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313011 - vendor-crypto/openssh/7.3p1 X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 12:31:40 -0000 Author: des Date: Tue Jan 31 12:31:38 2017 New Revision: 313011 URL: https://svnweb.freebsd.org/changeset/base/313011 Log: Tag OpenSSH 7.3p1. Added: vendor-crypto/openssh/7.3p1/ - copied from r313010, vendor-crypto/openssh/dist/ From owner-svn-src-all@freebsd.org Tue Jan 31 12:33:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C39DDCC9194; Tue, 31 Jan 2017 12:33:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 73EC621B; Tue, 31 Jan 2017 12:33:46 +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 mail108.syd.optusnet.com.au (Postfix) with ESMTPS id BC1271A76F5; Tue, 31 Jan 2017 23:33:37 +1100 (AEDT) Date: Tue, 31 Jan 2017 23:33:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312702 - in head/sys: kern libkern sys In-Reply-To: <20170125050656.J2916@besplex.bde.org> Message-ID: <20170131221815.I2119@besplex.bde.org> References: <201701241805.v0OI5Tb6043549@repo.freebsd.org> <20170125050656.J2916@besplex.bde.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=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=TmtWvxBWPL09_z5EqmcA:9 a=uTqGz10Rns5fSL9v:21 a=YesT7bfhR0lfImA_:21 a=K3mnNL1lbooI8mgQ:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 12:33:47 -0000 On Wed, 25 Jan 2017, Bruce Evans wrote: > On Tue, 24 Jan 2017, Conrad E. Meyer wrote: > >> Log: >> Use time_t for intermediate values to avoid overflow in clock_ts_to_ct > > This is bogus. time_t is for storing times in seconds, not for times in > days, hours or minutes. These bugs are still present. Bounds checking for presposterous values in privileged syscalls is silly, especially it is incomplete. There are thousands of sysctls that privileged users can use to shoot themself even more easily. Just near the settimeofday() syscall, similar foot shooting can be accomplished directly using the adjkerntz sysctl. Changes to this normally update the RTC immediately. This is correct if the changes are correct. Small garbage values give garbage in the RTC and large garbage values give overflows. Bounds checking in this commit sometimes detects these overflows. Foot-shooting can also be accomplished indirectly using adjkerntz. Set it to a large (in magnitude) value that doesn't cause overflows. This augments the overflows in the next call to settimeofday(). The fix is not to add bounds checking to all sysctls. Even restricting according to securelevel wouldn't work right, since securelevel doesn't work right. In sys/kern, there are only 10 sysctls (not includinging adjkerntz) restricted by securelevel. However, settimeofday() is restricted by securelevel. You can't set the time backwards at high securelevels, but you can still set the RTC to anything using adjkerntz at high securelevels. settimeofday() gives another unsecured method with results similar to adjkerntz for panicing and corrupting the RTC. set/gettimeofday() still support timezones, and resettodr() adds both adjkerntz and (tz_minuteswest * 60) to convert the kernel time to the RTC time. Both of these additions are FreeBSD features. adjkerntz is necessary to support normal use of the RTC on x86 (it is on local time), but timezones in the kernel were deprecated 25 years ago, so why use them now? On my systems, adjkerntz is always used and I never used tz_minutewest until today to demonstrate foot shooting. The man page says that the timezone is no longer used; actually, it is used for this foot shooting. There are many bugs in the implementation of the foot-shooting: A: There are no bounds check on tz_minuteswest, so expressions like (tz_minuteswest * 60) may overflow before the foot is the target. settimeofday() tries to be careful about the order of operations, but there is no order that just works for the dependent operations of setting the time and the timezone. The new timezone should be set before setting the time, since the timezone is needed for the RTC part of setting the time, and settings should be reversible in case one part fails. In practice, the time is set first, and if this succeeds then further errors are mostly not detected, but sometimes cause panics; then the RTC is set using a non-atomic copy of the pair (adjkerntz, tz_minuteswest), where tz_minuteswest was usually set by the previous settimeofday() call. Then tz_minuteswest is set for this call. B: There is no interlocking for any of this. adjkerntz and tz_minuteswest are plain ints, so reading them is probably atomic, but any number of adjkerntz sysctls and settimeofday() syscalls can race each other. The adjkerntz sysctl claims to be MPSAFE, but does nothing special. It just overwrites the adjkerntz using a hopefully-atomic access, then calls resettodr() like settime(). kib added some locking around the hardware part of resettodr(), and did more careful things for the boottime offset for timecounters. The boottime offset is more important since it is used for every CLOCK_REALTIME timecounter call, and needs atomic accesses more since it is larger than an int. Some of the interlocking belongs in applications. E.g., after setting the time, read the time and the monotonic time to check that the (monotonic) time taken to set the time was not so long as to make the setting too out of date, and retry until it was not too out of date. Coherency between separate settings of the time and the RTC could be maintained in the same way, but since the kernel sets both it do the check. Granularity of the x86 RTC is 1 second, and accuracy is worse, so a long lag is acceptable, but this is MD. My version doesn't bother doing RTC updates for differences of less than 2 seconds. >> Add additionally safety and overflow checks to clock_ts_to_ct and the >> BCD routines while we're here. > > I also disagreed with previous versions of this fix. > >> Perform a safety check in sys_clock_settime() first to avoid easy local >> root panic, without having to propagate an error value back through >> dozens of APIs currently lacking error returns. > > I agree with not over-engineering this to check at all levels. But top-level > check needs to be more stringent and magic to work. It is easier to check > a couple of levels lower. But there is no way for lower levels to report errors, so the up-front check is of some use. It mainly needs to be much stricter so that lower levels can't fail. > ... I wrote a test program to demonstrate most of the panics reported previously, and a couple of other problems: X #include X #include X X int X main(void) X { X struct timeval tv; X struct timezone tz; X int r; X X r = gettimeofday(&tv, &tz); X if (r != 0) X err(1, "gettimeofday"); X tv.tv_usec = 0; X #ifdef NEG X tv.tv_sec = 0; X /* X * The RTC time wants to be tv_sec - adjkerntz - tz_minuteswest. X * Make this go negative (and panic) by putting a positive value X * in tz_minuteswest large enough to kill any non-perverse value X * in adjkerntz. We can get the panic (and lots of races) more X * easily using sysctl to put perverse values in adjkerntz before X * calling settimeofday. X */ X tz.tz_minuteswest = 24 * 60; /* 1 day before 1970 */ The limit checking added to the bcd functions detects bugs from this setting. If the RTC is messed up by less preposterous settings, then the error is detected on the next boot; then machdep.adjkerntz is set to 0 instead of the correct value, and machdep.disable_rtc_set is set to 1 to disable updating the RTC when adjkerntz is changed. It takes settimeofday() or the periodic update from an ntp-known-good value to update the RTC, and these don't unset machdep.disable_rtc_set. X #elif YETANOTHERBUG X /* X * With 32-bit time_t, INT_MAX is accepted, but overflows 1 second X * later. Userland then prints the year as 1901. Userland does X * avoid overflow when adding a positive timezone offset to INT_MAX. X */ X tv.tv_sec = INT_MAX; X tz.tz_minuteswest = 0; This shows that times anywhere the limit must not be allowed. The limit should be about 2034 for 32-bit time_t. The limit should be TIME_MAX, but that doesn't exist. X #elif defined(__i386__) /* XXX really 32-bit time_t */ X /* X * 32-bit time_t is easy to overflow to negative starting at any X * non-small nonnegative value. X */ X tv.tv_sec = INT_MAX; X tz.tz_minuteswest = -24 * 60; /* 1 day after end of 32-bit time_t */ X #else /* XXX really 64-bit time_t */ X /* X * Put the bogus upper value for the limit check in tv_sec to get a X * panic. We don't even need to go ~1 day higher using, X * tz_minuteswest, since 366 is ~3/4 above the length of a year so X * so the limit is already ~7499 days above the 5-digit year 10000. X * Plus the Epoch bias of 1970 years. 1990.53 years altogether. X * The panic for this gives the precise value 1989 above 10000. X */ X tv.tv_sec = 9999L * 366 * 24 * 60 * 60; X tz.tz_minuteswest = -24 * 60; X #endif X r = settimeofday(&tv, &tz); X if (r != 0) X err(1, "1st settimeofday"); X /* X * One of many bugs in settimeofday() is that its tz_minuteswest X * setting doesn't apply until the next call. Make this call. X */ X r = settimeofday(&tv, &tz); X if (r != 0) X err(1, "2nd settimeofday"); X return (0); X } Bruce From owner-svn-src-all@freebsd.org Tue Jan 31 12:33:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 349EECC919F; Tue, 31 Jan 2017 12:33:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF24521C; Tue, 31 Jan 2017 12:33:48 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VCXm2r046766; Tue, 31 Jan 2017 12:33:48 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VCXlwg046761; Tue, 31 Jan 2017 12:33:47 GMT (envelope-from des@FreeBSD.org) Message-Id: <201701311233.v0VCXlwg046761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 31 Jan 2017 12:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313012 - in vendor-crypto/openssh/dist: . contrib contrib/redhat contrib/suse openbsd-compat regress regress/misc/kexfuzz regress/unittests regress/unittests/bitmap regress/unittests/h... X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 12:33:49 -0000 Author: des Date: Tue Jan 31 12:33:47 2017 New Revision: 313012 URL: https://svnweb.freebsd.org/changeset/base/313012 Log: Vendor import of OpenSSH 7.4p1. Added: vendor-crypto/openssh/dist/openbsd-compat/strcasestr.c vendor-crypto/openssh/dist/regress/allow-deny-users.sh vendor-crypto/openssh/dist/regress/keygen-moduli.sh vendor-crypto/openssh/dist/regress/moduli.in vendor-crypto/openssh/dist/regress/unittests/match/ vendor-crypto/openssh/dist/regress/unittests/match/Makefile vendor-crypto/openssh/dist/regress/unittests/match/tests.c Deleted: vendor-crypto/openssh/dist/auth-chall.c vendor-crypto/openssh/dist/auth-rh-rsa.c vendor-crypto/openssh/dist/auth-rsa.c vendor-crypto/openssh/dist/auth1.c vendor-crypto/openssh/dist/monitor_mm.c vendor-crypto/openssh/dist/monitor_mm.h vendor-crypto/openssh/dist/openbsd-compat/xmmap.c Modified: vendor-crypto/openssh/dist/.skipped-commit-ids vendor-crypto/openssh/dist/CREDITS vendor-crypto/openssh/dist/ChangeLog vendor-crypto/openssh/dist/INSTALL vendor-crypto/openssh/dist/Makefile.in vendor-crypto/openssh/dist/PROTOCOL vendor-crypto/openssh/dist/README vendor-crypto/openssh/dist/README.platform vendor-crypto/openssh/dist/README.privsep vendor-crypto/openssh/dist/TODO vendor-crypto/openssh/dist/aclocal.m4 vendor-crypto/openssh/dist/addrmatch.c vendor-crypto/openssh/dist/atomicio.c vendor-crypto/openssh/dist/audit-bsm.c vendor-crypto/openssh/dist/audit-linux.c vendor-crypto/openssh/dist/audit.c vendor-crypto/openssh/dist/audit.h vendor-crypto/openssh/dist/auth-options.c vendor-crypto/openssh/dist/auth-options.h vendor-crypto/openssh/dist/auth-pam.c vendor-crypto/openssh/dist/auth-pam.h vendor-crypto/openssh/dist/auth-rhosts.c vendor-crypto/openssh/dist/auth.c vendor-crypto/openssh/dist/auth.h vendor-crypto/openssh/dist/auth2-pubkey.c vendor-crypto/openssh/dist/authfile.c vendor-crypto/openssh/dist/buildpkg.sh.in vendor-crypto/openssh/dist/chacha.h vendor-crypto/openssh/dist/channels.c vendor-crypto/openssh/dist/channels.h vendor-crypto/openssh/dist/cipher-3des1.c vendor-crypto/openssh/dist/cipher-bf1.c vendor-crypto/openssh/dist/cipher-chachapoly.c vendor-crypto/openssh/dist/cipher.c vendor-crypto/openssh/dist/cipher.h vendor-crypto/openssh/dist/clientloop.c vendor-crypto/openssh/dist/clientloop.h vendor-crypto/openssh/dist/config.guess vendor-crypto/openssh/dist/config.h.in vendor-crypto/openssh/dist/config.sub vendor-crypto/openssh/dist/configure vendor-crypto/openssh/dist/configure.ac vendor-crypto/openssh/dist/contrib/Makefile vendor-crypto/openssh/dist/contrib/gnome-ssh-askpass2.c vendor-crypto/openssh/dist/contrib/redhat/openssh.spec vendor-crypto/openssh/dist/contrib/suse/openssh.spec vendor-crypto/openssh/dist/defines.h vendor-crypto/openssh/dist/dh.c vendor-crypto/openssh/dist/entropy.h vendor-crypto/openssh/dist/gss-genr.c vendor-crypto/openssh/dist/hostfile.c vendor-crypto/openssh/dist/kex.c vendor-crypto/openssh/dist/kex.h vendor-crypto/openssh/dist/kexgexc.c vendor-crypto/openssh/dist/kexgexs.c vendor-crypto/openssh/dist/key.h vendor-crypto/openssh/dist/krl.c vendor-crypto/openssh/dist/mac.c vendor-crypto/openssh/dist/match.c vendor-crypto/openssh/dist/md5crypt.h vendor-crypto/openssh/dist/mdoc2man.awk vendor-crypto/openssh/dist/misc.c vendor-crypto/openssh/dist/misc.h vendor-crypto/openssh/dist/moduli vendor-crypto/openssh/dist/moduli.c vendor-crypto/openssh/dist/monitor.c vendor-crypto/openssh/dist/monitor.h vendor-crypto/openssh/dist/monitor_wrap.c vendor-crypto/openssh/dist/monitor_wrap.h vendor-crypto/openssh/dist/mux.c vendor-crypto/openssh/dist/myproposal.h vendor-crypto/openssh/dist/opacket.h vendor-crypto/openssh/dist/openbsd-compat/Makefile.in vendor-crypto/openssh/dist/openbsd-compat/base64.h vendor-crypto/openssh/dist/openbsd-compat/bsd-asprintf.c vendor-crypto/openssh/dist/openbsd-compat/bsd-cray.c vendor-crypto/openssh/dist/openbsd-compat/bsd-cray.h vendor-crypto/openssh/dist/openbsd-compat/bsd-cygwin_util.c vendor-crypto/openssh/dist/openbsd-compat/bsd-cygwin_util.h vendor-crypto/openssh/dist/openbsd-compat/bsd-misc.c vendor-crypto/openssh/dist/openbsd-compat/bsd-misc.h vendor-crypto/openssh/dist/openbsd-compat/bsd-nextstep.c vendor-crypto/openssh/dist/openbsd-compat/bsd-nextstep.h vendor-crypto/openssh/dist/openbsd-compat/bsd-openpty.c vendor-crypto/openssh/dist/openbsd-compat/bsd-poll.c vendor-crypto/openssh/dist/openbsd-compat/bsd-setres_id.c vendor-crypto/openssh/dist/openbsd-compat/bsd-setres_id.h vendor-crypto/openssh/dist/openbsd-compat/bsd-statvfs.c vendor-crypto/openssh/dist/openbsd-compat/bsd-statvfs.h vendor-crypto/openssh/dist/openbsd-compat/bsd-waitpid.c vendor-crypto/openssh/dist/openbsd-compat/bsd-waitpid.h vendor-crypto/openssh/dist/openbsd-compat/explicit_bzero.c vendor-crypto/openssh/dist/openbsd-compat/fake-rfc2553.c vendor-crypto/openssh/dist/openbsd-compat/fake-rfc2553.h vendor-crypto/openssh/dist/openbsd-compat/getcwd.c vendor-crypto/openssh/dist/openbsd-compat/getgrouplist.c vendor-crypto/openssh/dist/openbsd-compat/openbsd-compat.h vendor-crypto/openssh/dist/openbsd-compat/openssl-compat.c vendor-crypto/openssh/dist/openbsd-compat/openssl-compat.h vendor-crypto/openssh/dist/openbsd-compat/port-aix.c vendor-crypto/openssh/dist/openbsd-compat/port-aix.h vendor-crypto/openssh/dist/openbsd-compat/port-irix.c vendor-crypto/openssh/dist/openbsd-compat/port-irix.h vendor-crypto/openssh/dist/openbsd-compat/port-linux.c vendor-crypto/openssh/dist/openbsd-compat/port-linux.h vendor-crypto/openssh/dist/openbsd-compat/port-solaris.c vendor-crypto/openssh/dist/openbsd-compat/port-solaris.h vendor-crypto/openssh/dist/openbsd-compat/port-tun.c vendor-crypto/openssh/dist/openbsd-compat/readpassphrase.c vendor-crypto/openssh/dist/openbsd-compat/setproctitle.c vendor-crypto/openssh/dist/openbsd-compat/sha2.c vendor-crypto/openssh/dist/openbsd-compat/sha2.h vendor-crypto/openssh/dist/openbsd-compat/vis.c vendor-crypto/openssh/dist/openbsd-compat/xcrypt.c vendor-crypto/openssh/dist/opensshd.init.in vendor-crypto/openssh/dist/packet.c vendor-crypto/openssh/dist/packet.h vendor-crypto/openssh/dist/platform-tracing.c vendor-crypto/openssh/dist/platform.c vendor-crypto/openssh/dist/platform.h vendor-crypto/openssh/dist/readconf.c vendor-crypto/openssh/dist/regress/Makefile vendor-crypto/openssh/dist/regress/agent-getpeereid.sh vendor-crypto/openssh/dist/regress/cert-file.sh vendor-crypto/openssh/dist/regress/cert-userkey.sh vendor-crypto/openssh/dist/regress/connect-privsep.sh vendor-crypto/openssh/dist/regress/integrity.sh vendor-crypto/openssh/dist/regress/keys-command.sh vendor-crypto/openssh/dist/regress/login-timeout.sh vendor-crypto/openssh/dist/regress/misc/kexfuzz/README vendor-crypto/openssh/dist/regress/misc/kexfuzz/kexfuzz.c vendor-crypto/openssh/dist/regress/principals-command.sh vendor-crypto/openssh/dist/regress/putty-ciphers.sh vendor-crypto/openssh/dist/regress/putty-kex.sh vendor-crypto/openssh/dist/regress/putty-transfer.sh vendor-crypto/openssh/dist/regress/reexec.sh vendor-crypto/openssh/dist/regress/sftp-chroot.sh vendor-crypto/openssh/dist/regress/test-exec.sh vendor-crypto/openssh/dist/regress/unittests/Makefile vendor-crypto/openssh/dist/regress/unittests/Makefile.inc vendor-crypto/openssh/dist/regress/unittests/bitmap/Makefile vendor-crypto/openssh/dist/regress/unittests/hostkeys/Makefile vendor-crypto/openssh/dist/regress/unittests/kex/Makefile vendor-crypto/openssh/dist/regress/unittests/sshbuf/Makefile vendor-crypto/openssh/dist/regress/unittests/sshkey/Makefile vendor-crypto/openssh/dist/regress/unittests/utf8/Makefile vendor-crypto/openssh/dist/regress/unittests/utf8/tests.c vendor-crypto/openssh/dist/sandbox-darwin.c vendor-crypto/openssh/dist/sandbox-rlimit.c vendor-crypto/openssh/dist/scp.c vendor-crypto/openssh/dist/servconf.c vendor-crypto/openssh/dist/servconf.h vendor-crypto/openssh/dist/serverloop.c vendor-crypto/openssh/dist/serverloop.h vendor-crypto/openssh/dist/session.c vendor-crypto/openssh/dist/session.h vendor-crypto/openssh/dist/sftp-client.c vendor-crypto/openssh/dist/sftp-common.c vendor-crypto/openssh/dist/sftp-server.c vendor-crypto/openssh/dist/sftp.c vendor-crypto/openssh/dist/ssh-agent.0 vendor-crypto/openssh/dist/ssh-agent.1 vendor-crypto/openssh/dist/ssh-agent.c vendor-crypto/openssh/dist/ssh-keygen.c vendor-crypto/openssh/dist/ssh-pkcs11.c vendor-crypto/openssh/dist/ssh-rsa.c vendor-crypto/openssh/dist/ssh.c vendor-crypto/openssh/dist/ssh_config.0 vendor-crypto/openssh/dist/ssh_config.5 vendor-crypto/openssh/dist/sshbuf.c vendor-crypto/openssh/dist/sshbuf.h vendor-crypto/openssh/dist/sshconnect.c vendor-crypto/openssh/dist/sshconnect1.c vendor-crypto/openssh/dist/sshconnect2.c vendor-crypto/openssh/dist/sshd.0 vendor-crypto/openssh/dist/sshd.8 vendor-crypto/openssh/dist/sshd.c vendor-crypto/openssh/dist/sshd_config vendor-crypto/openssh/dist/sshd_config.0 vendor-crypto/openssh/dist/sshd_config.5 vendor-crypto/openssh/dist/sshkey.c vendor-crypto/openssh/dist/sshkey.h vendor-crypto/openssh/dist/sshpty.c vendor-crypto/openssh/dist/sshpty.h vendor-crypto/openssh/dist/utf8.c vendor-crypto/openssh/dist/utf8.h vendor-crypto/openssh/dist/version.h Modified: vendor-crypto/openssh/dist/.skipped-commit-ids ============================================================================== --- vendor-crypto/openssh/dist/.skipped-commit-ids Tue Jan 31 12:31:38 2017 (r313011) +++ vendor-crypto/openssh/dist/.skipped-commit-ids Tue Jan 31 12:33:47 2017 (r313012) @@ -9,3 +9,5 @@ edbfde98c40007b7752a4ac106095e060c25c1ef 180d84674be1344e45a63990d60349988187c1ae Update moduli f6ae971186ba68d066cd102e57d5b0b2c211a5ee systrace is dead. 96c5054e3e1f170c6276902d5bc65bb3b87a2603 remove DEBUGLIBS from Makefile +6da9a37f74aef9f9cc639004345ad893cad582d8 Update moduli file +77bcb50e47b68c7209c7f0a5a020d73761e5143b unset REGRESS_FAIL_EARLY Modified: vendor-crypto/openssh/dist/CREDITS ============================================================================== --- vendor-crypto/openssh/dist/CREDITS Tue Jan 31 12:31:38 2017 (r313011) +++ vendor-crypto/openssh/dist/CREDITS Tue Jan 31 12:33:47 2017 (r313012) @@ -100,6 +100,3 @@ Zack Weinberg - G Apologies to anyone I have missed. Damien Miller - -$Id: CREDITS,v 1.81 2006/08/30 17:24:41 djm Exp $ - Modified: vendor-crypto/openssh/dist/ChangeLog ============================================================================== --- vendor-crypto/openssh/dist/ChangeLog Tue Jan 31 12:31:38 2017 (r313011) +++ vendor-crypto/openssh/dist/ChangeLog Tue Jan 31 12:33:47 2017 (r313012) @@ -1,9202 +1,10266 @@ -commit 99522ba7ec6963a05c04a156bf20e3ba3605987c -Author: Damien Miller -Date: Thu Jul 28 08:54:27 2016 +1000 - - define _OPENBSD_SOURCE for reallocarray on NetBSD - - Report by and debugged with Hisashi T Fujinaka, dtucker nailed - the problem (lack of prototype causing return type confusion). - -commit 3e1e076550c27c6bbdddf36d8f42bd79fbaaa187 -Author: Damien Miller -Date: Wed Jul 27 08:25:42 2016 +1000 - - KNF - -commit d99ee9c4e5e217e7d05eeec84e9ce641f4675331 +commit 4a354fc231174901f2629437c2a6e924a2dd6772 Author: Damien Miller -Date: Wed Jul 27 08:25:23 2016 +1000 - - Linux auditing also needs packet.h - -commit 393bd381a45884b589baa9aed4394f1d250255ca -Author: Damien Miller -Date: Wed Jul 27 08:18:05 2016 +1000 - - fix auditing on Linux - - get_remote_ipaddr() was replaced with ssh_remote_ipaddr() - -commit 80e766fb089de4f3c92b1600eb99e9495e37c992 -Author: Damien Miller -Date: Sun Jul 24 21:50:13 2016 +1000 +Date: Mon Dec 19 15:59:26 2016 +1100 - crank version numbers + crank version numbers for release -commit b1a478792d458f2e938a302e64bab2b520edc1b3 +commit 5f8d0bb8413d4d909cc7aa3c616fb0538224c3c9 Author: djm@openbsd.org -Date: Sun Jul 24 11:45:36 2016 +0000 +Date: Mon Dec 19 04:55:51 2016 +0000 upstream commit - openssh-7.3 - - Upstream-ID: af106a7eb665f642648cf1993e162c899f358718 - -commit 353766e0881f069aeca30275ab706cd60a1a8fdd -Author: Darren Tucker -Date: Sat Jul 23 16:14:42 2016 +1000 - - Move Cygwin IPPORT_RESERVED overrride to defines.h + openssh-7.4 - Patch from vinschen at redhat.com. + Upstream-ID: 1ee404adba6bbe10ae9277cbae3a94abe2867b79 -commit 368dd977ae07afb93f4ecea23615128c95ab2b32 +commit 3a8213ea0ed843523e34e55ab9c852332bab4c7b Author: djm@openbsd.org -Date: Sat Jul 23 02:54:08 2016 +0000 +Date: Mon Dec 19 04:55:18 2016 +0000 upstream commit - fix pledge violation with ssh -f; reported by Valentin - Kozamernik ok dtucker@ + remove testcase that depends on exact output and + behaviour of snprintf(..., "%s", NULL) - Upstream-ID: a61db7988db88d9dac3c4dd70e18876a8edf84aa + Upstream-Regress-ID: cab4288531766bd9593cb556613b91a2eeefb56f -commit f00211e3c6d24d6ea2b64b4b1209f671f6c1d42e -Author: djm@openbsd.org -Date: Fri Jul 22 07:00:46 2016 +0000 +commit eae735a82d759054f6ec7b4e887fb7a5692c66d7 +Author: dtucker@openbsd.org +Date: Mon Dec 19 03:32:57 2016 +0000 upstream commit - improve wording; suggested by jmc@ + Use LOGNAME to get current user and fall back to whoami if + not set. Mainly to benefit -portable since some platforms don't have whoami. - Upstream-ID: 55cb0a24c8e0618b3ceec80998dc82c85db2d2f8 + Upstream-Regress-ID: e3a16b7836a3ae24dc8f8a4e43fdf8127a60bdfa -commit 83cbca693c3b0719270e6a0f2efe3f9ee93a65b8 +commit 0d2f88428487518eea60602bd593989013831dcf Author: dtucker@openbsd.org -Date: Fri Jul 22 05:46:11 2016 +0000 +Date: Fri Dec 16 03:51:19 2016 +0000 upstream commit - Lower loglevel for "Authenticated with partial success" - message similar to other similar level. bz#2599, patch from cgallek at - gmail.com, ok markus@ + Add regression test for AllowUsers and DenyUsers. Patch from + Zev Weiss - Upstream-ID: 3faab814e947dc7b2e292edede23e94c608cb4dd + Upstream-Regress-ID: 8f1aac24d52728398871dac14ad26ea38b533fb9 -commit 10358abd087ab228b7ce2048efc4f3854a9ab9a6 -Author: Damien Miller -Date: Fri Jul 22 14:06:36 2016 +1000 +commit 3bc8180a008929f6fe98af4a56fb37d04444b417 +Author: Darren Tucker +Date: Fri Dec 16 15:02:24 2016 +1100 - retry waitpid on EINTR failure + Add missing monitor.h include. - patch from Jakub Jelen on bz#2581; ok dtucker@ + Fixes warning pointed out by Zev Weiss -commit da88a70a89c800e74ea8e5661ffa127a3cc79a92 +commit 410681f9015d76cc7b137dd90dac897f673244a0 Author: djm@openbsd.org -Date: Fri Jul 22 03:47:36 2016 +0000 +Date: Fri Dec 16 02:48:55 2016 +0000 upstream commit - constify a few functions' arguments; patch from Jakub - Jelen bz#2581 + revert to rev1.2; the new bits in this test depend on changes + to ssh that aren't yet committed - Upstream-ID: f2043f51454ea37830ff6ad60c8b32b4220f448d + Upstream-Regress-ID: 828ffc2c7afcf65d50ff2cf3dfc47a073ad39123 -commit c36d91bd4ebf767f310f7cea88d61d1c15f53ddf -Author: djm@openbsd.org -Date: Fri Jul 22 03:39:13 2016 +0000 +commit 2f2ffa4fbe4b671bbffa0611f15ba44cff64d58e +Author: dtucker@openbsd.org +Date: Fri Dec 16 01:06:27 2016 +0000 upstream commit - move debug("%p", key) to before key is free'd; probable - undefined behaviour on strict compilers; reported by Jakub Jelen bz#2581 + Move the "stop sshd" code into its own helper function. + Patch from Zev Weiss , ok djm@ - Upstream-ID: 767f323e1f5819508a0e35e388ec241bac2f953a + Upstream-Regress-ID: a113dea77df5bd97fb4633ea31f3d72dbe356329 -commit 286f5a77c3bfec1e8892ca268087ac885ac871bf +commit e15e7152331e3976b35475fd4e9c72897ad0f074 Author: djm@openbsd.org -Date: Fri Jul 22 03:35:11 2016 +0000 +Date: Fri Dec 16 01:01:07 2016 +0000 upstream commit - reverse the order in which -J/JumpHost proxies are visited to - be more intuitive and document - - reported by and manpage bits naddy@ + regression test for certificates along with private key + with no public half. bz#2617, mostly from Adam Eijdenberg - Upstream-ID: 3a68fd6a841fd6cf8cedf6552a9607ba99df179a + Upstream-Regress-ID: 2e74dc2c726f4dc839609b3ce045466b69f01115 -commit fcd135c9df440bcd2d5870405ad3311743d78d97 +commit 9a70ec085faf6e55db311cd1a329f1a35ad2a500 Author: dtucker@openbsd.org -Date: Thu Jul 21 01:39:35 2016 +0000 +Date: Thu Dec 15 23:50:37 2016 +0000 upstream commit - Skip passwords longer than 1k in length so clients can't - easily DoS sshd by sending very long passwords, causing it to spend CPU - hashing them. feedback djm@, ok markus@. - - Brought to our attention by tomas.kuthan at oracle.com, shilei-c at - 360.cn and coredump at autistici.org + Use $SUDO to read pidfile in case root's umask is + restricted. From portable. - Upstream-ID: d0af7d4a2190b63ba1d38eec502bc4be0be9e333 + Upstream-Regress-ID: f6b1c7ffbc5a0dfb7d430adb2883344899174a98 -commit 324583e8fb3935690be58790425793df619c6d4d -Author: naddy@openbsd.org -Date: Wed Jul 20 10:45:27 2016 +0000 +commit fe06b68f824f8f55670442fb31f2c03526dd326c +Author: dtucker@openbsd.org +Date: Thu Dec 15 21:29:05 2016 +0000 upstream commit - Do not clobber the global jump_host variables when - parsing an inactive configuration. ok djm@ + Add missing braces in DenyUsers code. Patch from zev at + bewilderbeest.net, ok deraadt@ - Upstream-ID: 5362210944d91417d5976346d41ac0b244350d31 + Upstream-ID: d747ace338dcf943b077925f90f85f789714b54e -commit 32d921c323b989d28405e78d0a8923d12913d737 -Author: jmc@openbsd.org -Date: Tue Jul 19 12:59:16 2016 +0000 +commit dcc7d74242a574fd5c4afbb4224795b1644321e7 +Author: dtucker@openbsd.org +Date: Thu Dec 15 21:20:41 2016 +0000 upstream commit - tweak previous; + Fix text in error message. Patch from zev at + bewilderbeest.net. - Upstream-ID: f3c1a5b3f05dff366f60c028728a2b43f15ff534 + Upstream-ID: deb0486e175e7282f98f9a15035d76c55c84f7f6 -commit d7eabc86fa049a12ba2c3fb198bd1d51b37f7025 -Author: dtucker@openbsd.org -Date: Tue Jul 19 11:38:53 2016 +0000 +commit b737e4d7433577403a31cff6614f6a1b0b5e22f4 +Author: djm@openbsd.org +Date: Wed Dec 14 00:36:34 2016 +0000 upstream commit - Allow wildcard for PermitOpen hosts as well as ports. - bz#2582, patch from openssh at mzpqnxow.com and jjelen at redhat.com. ok - markus@ + disable Unix-domain socket forwarding when privsep is + disabled - Upstream-ID: af0294e9b9394c4e16e991424ca0a47a7cc605f2 + Upstream-ID: ab61516ae0faadad407857808517efa900a0d6d0 -commit b98a2a8348e907b3d71caafd80f0be8fdd075943 -Author: markus@openbsd.org -Date: Mon Jul 18 11:35:33 2016 +0000 +commit 08a1e7014d65c5b59416a0e138c1f73f417496eb +Author: djm@openbsd.org +Date: Fri Dec 9 03:04:29 2016 +0000 upstream commit - Reduce timing attack against obsolete CBC modes by always - computing the MAC over a fixed size of data. Reported by Jean Paul - Degabriele, Kenny Paterson, Torben Hansen and Martin Albrecht. ok djm@ + log connections dropped in excess of MaxStartups at + verbose LogLevel; bz#2613 based on diff from Tomas Kuthan; ok dtucker@ - Upstream-ID: f20a13279b00ba0afbacbcc1f04e62e9d41c2912 + Upstream-ID: 703ae690dbf9b56620a6018f8a3b2389ce76d92b -commit dbf788b4d9d9490a5fff08a7b09888272bb10fcc +commit 10e290ec00964b2bf70faab15a10a5574bb80527 Author: Darren Tucker -Date: Thu Jul 21 14:17:31 2016 +1000 +Date: Tue Dec 13 13:51:32 2016 +1100 - Search users for one with a valid salt. - - If the root account is locked (eg password "!!" or "*LK*") keep looking - until we find a user with a valid salt to use for crypting passwords of - invalid users. ok djm@ + Get default of TEST_SSH_UTF8 from environment. -commit e8b58f48fbb1b524fb4f0d4865fa0005d6a4b782 +commit b9b8ba3f9ed92c6220b58d70d1e6d8aa3eea1104 Author: Darren Tucker -Date: Mon Jul 18 17:22:49 2016 +1000 +Date: Tue Dec 13 12:56:40 2016 +1100 - Explicitly specify source files for regress tools. + Remove commented-out includes. - Since adding $(REGRESSLIBS), $? is wrong because it includes only the - changed source files. $< seems like it'd be right however it doesn't - seem to work on some non-GNU makes, so do what works everywhere. + These commented-out includes have "Still needed?" comments. Since + they've been commented out for ~13 years I assert that they're not. -commit eac1bbd06872c273f16ac0f9976b0aef026b701b +commit 25275f1c9d5f01a0877d39444e8f90521a598ea0 Author: Darren Tucker -Date: Mon Jul 18 17:12:22 2016 +1000 +Date: Tue Dec 13 12:54:23 2016 +1100 - Conditionally include err.h. + Add prototype for strcasestr in compat library. -commit 0a454147568746c503f669e1ba861f76a2e7a585 +commit afec07732aa2985142f3e0b9a01eb6391f523dec Author: Darren Tucker -Date: Mon Jul 18 16:26:26 2016 +1000 +Date: Tue Dec 13 10:23:03 2016 +1100 - Remove local implementation of err, errx. + Add strcasestr to compat library. - We now have a shared implementation in libopenbsd-compat. + Fixes build on (at least) Solaris 10. -commit eb999a4590846ba4d56ddc90bd07c23abfbab7b1 -Author: djm@openbsd.org -Date: Mon Jul 18 06:08:01 2016 +0000 +commit dda78a03af32e7994f132d923c2046e98b7c56c8 +Author: Damien Miller +Date: Mon Dec 12 13:57:10 2016 +1100 - upstream commit + Force Turkish locales back to C/POSIX; bz#2643 - Add some unsigned overflow checks for extra_pad. None of - these are reachable with the amount of padding that we use internally. - bz#2566, pointed out by Torben Hansen. ok markus@ + Turkish locales are unique in their handling of the letters 'i' and + 'I' (yes, they are different letters) and OpenSSH isn't remotely + prepared to deal with that. For now, the best we can do is to force + OpenSSH to use the C/POSIX locale and try to preserve the UTF-8 + encoding if possible. - Upstream-ID: 4d4be8450ab2fc1b852d5884339f8e8c31c3fd76 + ok dtucker@ -commit c71ba790c304545464bb494de974cdf0f4b5cf1e +commit c35995048f41239fc8895aadc3374c5f75180554 Author: Darren Tucker -Date: Mon Jul 18 15:43:25 2016 +1000 +Date: Fri Dec 9 12:52:02 2016 +1100 - Add dependency on libs for unit tests. - - Makes "./configure && make tests" work again. ok djm@ + exit is in stdlib.h not unistd.h (that's _exit). -commit 8199d0311aea3e6fd0284c9025e7a83f4ece79e8 +commit d399a8b914aace62418c0cfa20341aa37a192f98 Author: Darren Tucker -Date: Mon Jul 18 13:47:39 2016 +1000 +Date: Fri Dec 9 12:33:25 2016 +1100 - Correct location for kexfuzz in clean target. + Include for exit in utf8 locale test. -commit 01558b7b07af43da774d3a11a5c51fa9c310849d +commit 47b8c99ab3221188ad3926108dd9d36da3b528ec Author: Darren Tucker -Date: Mon Jul 18 09:33:25 2016 +1000 +Date: Thu Dec 8 15:48:34 2016 +1100 - Handle PAM_MAXTRIES from modules. + Check for utf8 local support before testing it. - bz#2249: handle the case where PAM returns PAM_MAXTRIES by ceasing to offer - password and keyboard-interative authentication methods. Should prevent - "sshd ignoring max retries" warnings in the log. ok djm@ + Check for utf8 local support and if not found, do not attempt to run the + utf8 tests. Suggested by djm@ + +commit 4089fc1885b3a2822204effbb02b74e3da58240d +Author: Darren Tucker +Date: Thu Dec 8 12:57:24 2016 +1100 + + Use AC_PATH_TOOL for krb5-config. - It probably won't trigger with keyboard-interactive in the default - configuration because the retry counter is stored in module-private - storage which goes away with the sshd PAM process (see bz#688). On the - other hand, those cases probably won't log a warning either. + This will use the host-prefixed version when cross compiling; patch from + david.michael at coreos.com. -commit 65c6c6b567ab5ab12945a5ad8e0ab3a8c26119cc +commit b4867e0712c89b93be905220c82f0a15e6865d1e Author: djm@openbsd.org -Date: Sun Jul 17 04:20:16 2016 +0000 +Date: Tue Dec 6 07:48:01 2016 +0000 upstream commit - support UTF-8 characters in ssh(1) banners using - schwarze@'s safe fmprintf printer; bz#2058 + make IdentityFile successfully load and use certificates that + have no corresponding bare public key. E.g. just a private id_rsa and + certificate id_rsa-cert.pub (and no id_rsa.pub). - feedback schwarze@ ok dtucker@ + bz#2617 ok dtucker@ - Upstream-ID: a72ce4e3644c957643c9524eea2959e41b91eea7 + Upstream-ID: c1e9699b8c0e3b63cc4189e6972e3522b6292604 -commit e4eb7d910976fbfc7ce3e90c95c11b07b483d0d7 -Author: jmc@openbsd.org -Date: Sat Jul 16 06:57:55 2016 +0000 +commit c9792783a98881eb7ed295680013ca97a958f8ac +Author: Damien Miller +Date: Fri Nov 25 14:04:21 2016 +1100 + + Add a gnome-ssh-askpass3 target for GTK+3 version + + Based on patch from Colin Watson via bz#2640 + +commit 7be85ae02b9de0993ce0a1d1e978e11329f6e763 +Author: Damien Miller +Date: Fri Nov 25 14:03:53 2016 +1100 + + Make gnome-ssh-askpass2.c GTK+3-friendly + + Patch from Colin Watson via bz#2640 + +commit b9844a45c7f0162fd1b5465683879793d4cc4aaa +Author: djm@openbsd.org +Date: Sun Dec 4 23:54:02 2016 +0000 upstream commit - - add proxyjump to the options list - formatting fixes - - update usage() + Fix public key authentication when multiple + authentication is in use. Instead of deleting and re-preparing the entire + keys list, just reset the 'used' flags; the keys list is already in a good + order (with already- tried keys at the back) - ok djm + Analysis and patch from Vincent Brillault on bz#2642; ok dtucker@ - Upstream-ID: 43d318e14ce677a2eec8f21ef5ba2f9f68a59457 + Upstream-ID: 7123f12dc2f3bcaae715853035a97923d7300176 -commit af1f084857621f14bd9391aba8033d35886c2455 +commit f2398eb774075c687b13af5bc22009eb08889abe Author: dtucker@openbsd.org -Date: Fri Jul 15 05:01:58 2016 +0000 +Date: Sun Dec 4 22:27:25 2016 +0000 upstream commit - Reduce the syslog level of some relatively common protocol - events from LOG_CRIT by replacing fatal() calls with logdie(). Part of - bz#2585, ok djm@ + Unlink PidFile on SIGHUP and always recreate it when the + new sshd starts. Regression tests (and possibly other things) depend on the + pidfile being recreated after SIGHUP, and unlinking it means it won't contain + a stale pid if sshd fails to restart. ok djm@ markus@ - Upstream-ID: 9005805227c94edf6ac02a160f0e199638d288e5 - -commit bd5f2b78b69cf38d6049a0de445a79c8595e4a1f -Author: Damien Miller -Date: Fri Jul 15 19:14:48 2016 +1000 + Upstream-ID: 132dd6dda0c77dd49d2f15b2573b5794f6160870 - missing openssl/dh.h - -commit 4a984fd342effe5f0aad874a0d538c4322d973c0 -Author: Damien Miller -Date: Fri Jul 15 18:47:07 2016 +1000 - - cast to avoid type warning in error message - -commit 5abfb15ced985c340359ae7fb65a625ed3692b3e -Author: Darren Tucker -Date: Fri Jul 15 14:48:30 2016 +1000 +commit 85aa2efeba51a96bf6834f9accf2935d96150296 +Author: djm@openbsd.org +Date: Wed Nov 30 03:01:33 2016 +0000 - Move VA_COPY macro into compat header. + upstream commit - Some AIX compilers unconditionally undefine va_copy but don't set it back - to an internal function, causing link errors. In some compat code we - already use VA_COPY instead so move the two existing instances into the - shared header and use for sshbuf-getput-basic.c too. Should fix building - with at lease some versions of AIX's compiler. bz#2589, ok djm@ - -commit 832b7443b7a8e181c95898bc5d73497b7190decd -Author: Damien Miller -Date: Fri Jul 15 14:45:34 2016 +1000 - - disable ciphers not supported by OpenSSL + test new behaviour of cert force-command restriction vs. + authorized_key/ principals - bz#2466 ok dtucker@ + Upstream-Regress-ID: 399efa7469d40c404c0b0a295064ce75d495387c -commit 5fbe93fc6fbb2fe211e035703dec759d095e3dd8 -Author: Damien Miller -Date: Fri Jul 15 13:54:31 2016 +1000 +commit 5d333131cd8519d022389cfd3236280818dae1bc +Author: jmc@openbsd.org +Date: Wed Nov 30 06:54:26 2016 +0000 - add a --disable-pkcs11 knob + upstream commit + + tweak previous; while here fix up FILES and AUTHORS; + + Upstream-ID: 93f6e54086145a75df8d8ec7d8689bdadbbac8fa -commit 679ce88ec2a8e2fe6515261c489e8c1449bb9da9 -Author: Damien Miller -Date: Fri Jul 15 13:44:38 2016 +1000 +commit 786d5994da79151180cb14a6cf157ebbba61c0cc +Author: djm@openbsd.org +Date: Wed Nov 30 03:07:37 2016 +0000 - fix newline escaping for unsupported_algorithms + upstream commit - The hmac-ripemd160 was incorrect and could lead to broken - Makefiles on systems that lacked support for it, but I made - all the others consistent too. + add a whitelist of paths from which ssh-agent will load + (via ssh-pkcs11-helper) a PKCS#11 module; ok markus@ + + Upstream-ID: fe79769469d9cd6d26fe0dc15751b83ef2a06e8f -commit ed877ef653847d056bb433975d731b7a1132a979 +commit 7844f357cdd90530eec81340847783f1f1da010b Author: djm@openbsd.org -Date: Fri Jul 15 00:24:30 2016 +0000 +Date: Wed Nov 30 03:00:05 2016 +0000 upstream commit - Add a ProxyJump ssh_config(5) option and corresponding -J - ssh(1) command-line flag to allow simplified indirection through a SSH - bastion or "jump host". - - These options construct a proxy command that connects to the - specified jump host(s) (more than one may be specified) and uses - port-forwarding to establish a connection to the next destination. - - This codifies the safest way of indirecting connections through SSH - servers and makes it easy to use. + Add a sshd_config DisableForwaring option that disables + X11, agent, TCP, tunnel and Unix domain socket forwarding, as well as + anything else we might implement in the future. - ok markus@ + This, like the 'restrict' authorized_keys flag, is intended to be a + simple and future-proof way of restricting an account. Suggested as + a complement to 'restrict' by Jann Horn; ok markus@ - Upstream-ID: fa899cb8b26d889da8f142eb9774c1ea36b04397 + Upstream-ID: 203803f66e533a474086b38a59ceb4cf2410fcf7 -commit 5c02dd126206a26785379e80f2d3848e4470b711 -Author: Darren Tucker -Date: Fri Jul 15 12:56:39 2016 +1000 +commit fd6dcef2030d23c43f986d26979f84619c10589d +Author: djm@openbsd.org +Date: Wed Nov 30 02:57:40 2016 +0000 - Map umac_ctx struct name too. + upstream commit - Prevents size mismatch linker warnings on Solaris 11. - -commit 283b97ff33ea2c641161950849931bd578de6946 -Author: Darren Tucker -Date: Fri Jul 15 13:49:44 2016 +1000 - - Mitigate timing of disallowed users PAM logins. + When a forced-command appears in both a certificate and + an authorized keys/principals command= restriction, refuse to accept the + certificate unless they are identical. - When sshd decides to not allow a login (eg PermitRootLogin=no) and - it's using PAM, it sends a fake password to PAM so that the timing for - the failure is not noticeably different whether or not the password - is correct. This behaviour can be detected by sending a very long - password string which is slower to hash than the fake password. + The previous (documented) behaviour of having the certificate forced- + command override the other could be a bit confused and more error-prone. - Mitigate by constructing an invalid password that is the same length - as the one from the client and thus takes the same time to hash. - Diff from djm@ + Pointed out by Jann Horn of Project Zero; ok dtucker@ + + Upstream-ID: 79d811b6eb6bbe1221bf146dde6928f92d2cd05f -commit 9286875a73b2de7736b5e50692739d314cd8d9dc -Author: Darren Tucker -Date: Fri Jul 15 13:32:45 2016 +1000 +commit 7fc4766ac78abae81ee75b22b7550720bfa28a33 +Author: dtucker@openbsd.org +Date: Wed Nov 30 00:28:31 2016 +0000 - Determine appropriate salt for invalid users. + upstream commit - When sshd is processing a non-PAM login for a non-existent user it uses - the string from the fakepw structure as the salt for crypt(3)ing the - password supplied by the client. That string has a Blowfish prefix, so on - systems that don't understand that crypt will fail fast due to an invalid - salt, and even on those that do it may have significantly different timing - from the hash methods used for real accounts (eg sha512). This allows - user enumeration by, eg, sending large password strings. This was noted - by EddieEzra.Harari at verint.com (CVE-2016-6210). + On startup, check to see if sshd is already daemonized + and if so, skip the call to daemon() and do not rewrite the PidFile. This + means that when sshd re-execs itself on SIGHUP the process ID will no longer + change. Should address bz#2641. ok djm@ markus@. - To mitigate, use the same hash algorithm that root uses for hashing - passwords for users that do not exist on the system. ok djm@ + Upstream-ID: 5ea0355580056fb3b25c1fd6364307d9638a37b9 -commit a162dd5e58ca5b224d7500abe35e1ef32b5de071 -Author: Darren Tucker -Date: Thu Jul 14 21:19:59 2016 +1000 - - OpenSSL 1.1.x not currently supported. - -commit 7df91b01fc558a33941c5c5f31abbcdc53a729fb -Author: Darren Tucker -Date: Thu Jul 14 12:25:24 2016 +1000 +commit c9f880c195c65f1dddcbc4ce9d6bfea7747debcc +Author: Damien Miller +Date: Wed Nov 30 13:51:49 2016 +1100 - Check for VIS_ALL. + factor out common PRNG reseed before privdrop - If we don't have it, set BROKEN_STRNVIS to activate the compat replacement. + Add a call to RAND_poll() to ensure than more than pid+time gets + stirred into child processes states. Prompted by analysis from Jann + Horn at Project Zero. ok dtucker@ -commit ee67716f61f1042d5e67f91c23707cca5dcdd7d0 +commit 79e4829ec81dead1b30999e1626eca589319a47f Author: dtucker@openbsd.org -Date: Thu Jul 14 01:24:21 2016 +0000 +Date: Fri Nov 25 03:02:01 2016 +0000 upstream commit - Correct equal in test. + Allow PuTTY interop tests to run unattended. bz#2639, + patch from cjwatson at debian.org. - Upstream-Regress-ID: 4e32f7a5c57a619c4e8766cb193be2a1327ec37a + Upstream-Regress-ID: 4345253558ac23b2082aebabccd48377433b6fe0 -commit 372807c2065c8572fdc6478b25cc5ac363743073 -Author: tb@openbsd.org -Date: Mon Jul 11 21:38:13 2016 +0000 +commit 504c3a9a1bf090f6b27260fc3e8ea7d984d163dc +Author: dtucker@openbsd.org +Date: Fri Nov 25 02:56:49 2016 +0000 upstream commit - Add missing "recvfd" pledge promise: Raf Czlonka reported - ssh coredumps when Control* keywords were set in ssh_config. This patch also - fixes similar problems with scp and sftp. - - ok deraadt, looks good to millert + Reverse args to sshd-log-wrapper. Matches change in + portable, where it allows sshd do be optionally run under Valgrind. - Upstream-ID: ca2099eade1ef3e87a79614fefa26a0297ad8a3b + Upstream-Regress-ID: b438d1c6726dc5caa2a45153e6103a0393faa906 -commit e0453f3df64bf485c61c7eb6bd12893eee9fe2cd -Author: tedu@openbsd.org -Date: Mon Jul 11 03:19:44 2016 +0000 +commit bd13017736ec2f8f9ca498fe109fb0035f322733 +Author: dtucker@openbsd.org +Date: Fri Nov 25 02:49:18 2016 +0000 upstream commit - obsolete note about fascistloggin is obsolete. ok djm - dtucker + Fix typo in trace message; from portable. - Upstream-ID: dae60df23b2bb0e89f42661ddd96a7b0d1b7215a + Upstream-Regress-ID: 4c4a2ba0d37faf5fd230a91b4c7edb5699fbd73a -commit a2333584170a565adf4f209586772ef8053b10b8 -Author: Darren Tucker -Date: Thu Jul 14 10:59:09 2016 +1000 +commit 7da751d8b007c7f3e814fd5737c2351440d78b4c +Author: tb@openbsd.org +Date: Tue Nov 1 13:43:27 2016 +0000 - Add compat code for missing wcwidth. + upstream commit - If we don't have wcwidth force fallback implementations of nl_langinfo - and mbtowc. Based on advice from Ingo Schwarze. - -commit 8aaec7050614494014c47510b7e94daf6e644c62 -Author: Damien Miller -Date: Thu Jul 14 09:48:48 2016 +1000 - - fix missing include for systems with err.h - -commit 6310ef27a2567cda66d6cf0c1ad290ee1167f243 -Author: Darren Tucker -Date: Wed Jul 13 14:42:35 2016 +1000 - - Move err.h replacements into compat lib. + Clean up MALLOC_OPTIONS. For the unittests, move + MALLOC_OPTIONS and TEST_ENV to unittets/Makefile.inc. - Move implementations of err.h replacement functions into their own file - in the libopenbsd-compat so we can use them in kexfuzz.c too. ok djm@ - -commit f3f2cc8386868f51440c45210098f65f9787449a -Author: Darren Tucker -Date: Mon Jul 11 17:23:38 2016 +1000 - - Check for wchar.h and langinfo.h + ok otto - Wrap includes in the appropriate #ifdefs. + Upstream-Regress-ID: 890d497e0a38eeddfebb11cc429098d76cf29f12 -commit b9c50614eba9d90939b2b119b6e1b7e03b462278 -Author: Damien Miller -Date: Fri Jul 8 13:59:13 2016 +1000 +commit 36f58e68221bced35e06d1cca8d97c48807a8b71 +Author: tb@openbsd.org +Date: Mon Oct 31 23:45:08 2016 +0000 - whitelist more architectures for seccomp-bpf + upstream commit - bz#2590 - testing and patch from Jakub Jelen + Remove the obsolete A and P flags from MALLOC_OPTIONS. + + ok dtucker + + Upstream-Regress-ID: 6cc25024c8174a87e5734a0dc830194be216dd59 -commit 18813a32b6fd964037e0f5e1893cb4468ac6a758 -Author: guenther@openbsd.org -Date: Mon Jul 4 18:01:44 2016 +0000 +commit b0899ee26a6630883c0f2350098b6a35e647f512 +Author: dtucker@openbsd.org +Date: Tue Nov 29 03:54:50 2016 +0000 upstream commit - DEBUGLIBS has been broken since the gcc4 switch, so delete - it. CFLAGS contains -g by default anyway - - problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com) - ok millert@ kettenis@ deraadt@ + Factor out code to disconnect from controlling terminal + into its own function. ok djm@ - Upstream-Regress-ID: 4a0bb72f95c63f2ae9daa8a040ac23914bddb542 + Upstream-ID: 39fd9e8ebd7222615a837312face5cc7ae962885 -commit 6d31193d0baa3da339c196ac49625b7ba1c2ecc7 +commit 54d022026aae4f53fa74cc636e4a032d9689b64d Author: djm@openbsd.org -Date: Fri Jul 8 03:44:42 2016 +0000 +Date: Fri Nov 25 23:24:45 2016 +0000 upstream commit - Improve crypto ordering for Encrypt-then-MAC (EtM) mode - MAC algorithms. - - Previously we were computing the MAC, decrypting the packet and then - checking the MAC. This gave rise to the possibility of creating a - side-channel oracle in the decryption step, though no such oracle has - been identified. - - This adds a mac_check() function that computes and checks the MAC in - one pass, and uses it to advance MAC checking for EtM algorithms to - before payload decryption. + use sshbuf_allocate() to pre-allocate the buffer used for + loading keys. This avoids implicit realloc inside the buffer code, which + might theoretically leave fragments of the key on the heap. This doesn't + appear to happen in practice for normal sized keys, but was observed for + novelty oversize ones. - Reported by Jean Paul Degabriele, Kenny Paterson, Torben Hansen and - Martin Albrecht. feedback and ok markus@ + Pointed out by Jann Horn of Project Zero; ok markus@ - Upstream-ID: 1999bb67cab47dda5b10b80d8155fe83d4a1867b + Upstream-ID: d620e1d46a29fdea56aeadeda120879eddc60ab1 -commit 71f5598f06941f645a451948c4a5125c83828e1c -Author: guenther@openbsd.org -Date: Mon Jul 4 18:01:44 2016 +0000 +commit a9c746088787549bb5b1ae3add7d06a1b6d93d5e +Author: djm@openbsd.org +Date: Fri Nov 25 23:22:04 2016 +0000 upstream commit - DEBUGLIBS has been broken since the gcc4 switch, so - delete it. CFLAGS contains -g by default anyway - - problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com) - ok millert@ kettenis@ deraadt@ + split allocation out of sshbuf_reserve() into a separate + sshbuf_allocate() function; ok markus@ - Upstream-ID: 96c5054e3e1f170c6276902d5bc65bb3b87a2603 + Upstream-ID: 11b8a2795afeeb1418d508a2c8095b3355577ec2 -commit e683fc6f1c8c7295648dbda679df8307786ec1ce -Author: dtucker@openbsd.org -Date: Thu Jun 30 05:17:05 2016 +0000 +commit f0ddedee460486fa0e32fefb2950548009e5026e +Author: markus@openbsd.org +Date: Wed Nov 23 23:14:15 2016 +0000 upstream commit - Explicitly check for 100% completion to avoid potential - floating point rounding error, which could cause progressmeter to report 99% - on completion. While there invert the test so the 100% case is clearer. with - & ok djm@ + allow ClientAlive{Interval,CountMax} in Match; ok dtucker, + djm - Upstream-ID: a166870c5878e422f3c71ff802e2ccd7032f715d + Upstream-ID: 8beb4c1eadd588f1080b58932281983864979f55 -commit 772e6cec0ed740fc7db618dc30b4134f5a358b43 -Author: jmc@openbsd.org -Date: Wed Jun 29 17:14:28 2016 +0000 +commit 1a6f9d2e2493d445cd9ee496e6e3c2a2f283f66a +Author: djm@openbsd.org +Date: Tue Nov 8 22:04:34 2016 +0000 upstream commit - sort the -o list; + unbreak DenyUsers; reported by henning@ - Upstream-ID: 1a97465ede8790b4d47cb618269978e07f41f8ac + Upstream-ID: 1c67d4148f5e953c35acdb62e7c08ae8e33f7cb2 -commit 46ecd19e554ccca15a7309cd1b6b44bc8e6b84af +commit 010359b32659f455fddd2bd85fd7cc4d7a3b994a Author: djm@openbsd.org -Date: Thu Jun 23 05:17:51 2016 +0000 +Date: Sun Nov 6 05:46:37 2016 +0000 upstream commit - fix AuthenticationMethods during configuration re-parse; - reported by Juan Francisco Cantero Hurtado + Validate address ranges for AllowUser/DenyUsers at + configuration load time and refuse to accept bad ones. It was previously + possible to specify invalid CIDR address ranges (e.g. djm@127.1.2.3/55) and + these would always match. - Upstream-ID: 8ffa1dac25c7577eca8238e825317ab20848f9b4 + Thanks to Laurence Parry for a detailed bug report. ok markus (for + a previous diff version) + + Upstream-ID: 9dfcdd9672b06e65233ea4434c38226680d40bfb -commit 3147e7595d0f2f842a666c844ac53e6c7a253d7e +commit efb494e81d1317209256b38b49f4280897c61e69 Author: djm@openbsd.org -Date: Sun Jun 19 07:48:02 2016 +0000 +Date: Fri Oct 28 03:33:52 2016 +0000 upstream commit - revert 1.34; causes problems loading public keys + Improve pkcs11_add_provider() logging: demote some + excessively verbose error()s to debug()s, include PKCS#11 provider name and + slot in log messages where possible. bz#2610, based on patch from Jakub Jelen - reported by semarie@ + Upstream-ID: 3223ef693cfcbff9079edfc7e89f55bf63e1973d + +commit 5ee3fb5affd7646f141749483205ade5fc54adaf +Author: Darren Tucker +Date: Tue Nov 1 08:12:33 2016 +1100 + + Use ptrace(PT_DENY_ATTACH, ..) on OS X. + +commit 315d2a4e674d0b7115574645cb51f968420ebb34 +Author: Damien Miller +Date: Fri Oct 28 14:34:07 2016 +1100 + + Unbreak AES-CTR ciphers on old (~0.9.8) OpenSSL - Upstream-ID: b393794f8935c8b15d98a407fe7721c62d2ed179 + ok dtucker@ -commit ad23a75509f4320d43f628c50f0817e3ad12bfa7 -Author: jmc@openbsd.org -Date: Fri Jun 17 06:33:30 2016 +0000 +commit a9ff3950b8e80ff971b4d44bbce96df27aed28af +Author: Darren Tucker +Date: Fri Oct 28 14:26:58 2016 +1100 - upstream commit + Move OPENSSL_NO_RIPEMD160 to compat. - grammar fix; + Move OPENSSL_NO_RIPEMD160 to compat and add ifdefs to mac.c around the + ripemd160 MACs. + +commit bce58885160e5db2adda3054c3b81fe770f7285a +Author: Darren Tucker +Date: Fri Oct 28 13:52:31 2016 +1100 + + Check if RIPEMD160 is disabled in OpenSSL. + +commit d924640d4c355d1b5eca1f4cc60146a9975dbbff +Author: Darren Tucker +Date: Fri Oct 28 13:38:19 2016 +1100 + + Skip ssh1 specfic ciphers. - Upstream-ID: 5d5b21c80f1e81db367333ce0bb3e5874fb3e463 + cipher-3des1.c and cipher-bf1.c are specific to sshv1 so don't even try + to compile them when Protocol 1 is not enabled. -commit 5e28b1a2a3757548b40018cc2493540a17c82e27 -Author: djm@openbsd.org -Date: Fri Jun 17 05:06:23 2016 +0000 +commit 79d078e7a49caef746516d9710ec369ba45feab6 +Author: jsg@openbsd.org +Date: Tue Oct 25 04:08:13 2016 +0000 upstream commit - translate OpenSSL error codes to something more - meaninful; bz#2522 reported by Jakub Jelen, ok dtucker@ + Fix logic in add_local_forward() that inverted a test + when code was refactored out into bind_permitted(). This broke ssh port + forwarding for non-priv ports as a non root user. - Upstream-ID: 4cb0795a366381724314e6515d57790c5930ffe5 + ok dtucker@ 'looks good' deraadt@ + + Upstream-ID: ddb8156ca03cc99997de284ce7777536ff9570c9 -commit b64faeb5eda7eff8210c754d00464f9fe9d23de5 -Author: djm@openbsd.org -Date: Fri Jun 17 05:03:40 2016 +0000 +commit a903e315dee483e555c8a3a02c2946937f9b4e5d +Author: dtucker@openbsd.org +Date: Mon Oct 24 01:09:17 2016 +0000 upstream commit - ban AuthenticationMethods="" and accept - AuthenticationMethods=any for the default behaviour of not requiring multiple - authentication + Remove dead breaks, found via opencoverage.net. ok + deraadt@ - bz#2398 from Jakub Jelen; ok dtucker@ + Upstream-ID: ad9cc655829d67fad219762810770787ba913069 + +commit b4e96b4c9bea4182846e4942ba2048e6d708ee54 +Author: Darren Tucker +Date: Wed Oct 26 08:43:25 2016 +1100 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jan 31 12:34:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D74ECC91F6; Tue, 31 Jan 2017 12:34:01 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B11F8329; Tue, 31 Jan 2017 12:34:00 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VCXxjH046821; Tue, 31 Jan 2017 12:33:59 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VCXxJt046820; Tue, 31 Jan 2017 12:33:59 GMT (envelope-from des@FreeBSD.org) Message-Id: <201701311233.v0VCXxJt046820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 31 Jan 2017 12:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313013 - vendor-crypto/openssh/7.4p1 X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 12:34:01 -0000 Author: des Date: Tue Jan 31 12:33:59 2017 New Revision: 313013 URL: https://svnweb.freebsd.org/changeset/base/313013 Log: Tag OpenSSH 7.4p1. Added: vendor-crypto/openssh/7.4p1/ - copied from r313012, vendor-crypto/openssh/dist/ From owner-svn-src-all@freebsd.org Tue Jan 31 14:36:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43FB1CC9832; Tue, 31 Jan 2017 14:36:08 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 135BDAAA; Tue, 31 Jan 2017 14:36:08 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VEa7gO096353; Tue, 31 Jan 2017 14:36:07 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VEa7fv096352; Tue, 31 Jan 2017 14:36:07 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201701311436.v0VEa7fv096352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Tue, 31 Jan 2017 14:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313014 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 14:36:08 -0000 Author: jmcneill Date: Tue Jan 31 14:36:06 2017 New Revision: 313014 URL: https://svnweb.freebsd.org/changeset/base/313014 Log: Add missing ephy bus gates and resets. Modified: head/sys/boot/fdt/dts/arm/h3.dtsi Modified: head/sys/boot/fdt/dts/arm/h3.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/h3.dtsi Tue Jan 31 12:33:59 2017 (r313013) +++ head/sys/boot/fdt/dts/arm/h3.dtsi Tue Jan 31 14:36:06 2017 (r313014) @@ -69,10 +69,10 @@ reg = <0x01c30000 0x104>, <0x01c00030 0x4>; reg-names = "emac", "syscon"; interrupts = ; - resets = <&ahb_rst 17>; - reset-names = "ahb"; - clocks = <&bus_gates 17>; - clock-names = "ahb"; + resets = <&ahb_rst 17>, <&ahb_rst 66>; + reset-names = "ahb", "ephy"; + clocks = <&bus_gates 17>, <&bus_gates 128>; + clock-names = "ahb", "ephy"; #address-cells = <1>; #size-cells = <0>; status = "disabled"; From owner-svn-src-all@freebsd.org Tue Jan 31 15:07:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24CF4CCA1E3; Tue, 31 Jan 2017 15:07:34 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wj0-x242.google.com (mail-wj0-x242.google.com [IPv6:2a00:1450:400c:c01::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 BDC7C1BC2; Tue, 31 Jan 2017 15:07:33 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wj0-x242.google.com with SMTP id le4so1636453wjb.0; Tue, 31 Jan 2017 07:07:33 -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:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=xbdUGizSgtNGu5czd80cq53WrOLvbEEUdJ4eona2kYg=; b=l2JMlo0BfrWFoxvSJNOT8JyHSJgtDqKEsKeO5aSQWOK4hWtcO90meKw2yAeatlJDQT bJa7McRy0weMK90b7Pm8j4vevqkkuJufT0fw+M8/+2QztxqSP9sQysIW9S2BaqYiAMVf VPFV86BGXU9P+oBBscBDk36MYa+nlODxrvs/v60aahPAQ8CgQDfmD9R23W5Jd1hVRm6K 9QMw6j8yAcHIxDbquinO4Zba9eGzwq0r4VXw11o2fyD1vXiCpAdZwqCX2rRrX+WaV5Kb zTrQSs8vbTcEpg+IFqgV8nmyFmvVo4COjTo4l3aMutavPvQDdy3r2lBm49hzV3XasSjK ruOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=xbdUGizSgtNGu5czd80cq53WrOLvbEEUdJ4eona2kYg=; b=WqXggBWgw7gkEDeShfBPU+KuRKmfDdDIjyx6803mXfKuR3KqiJoqGbjKCrxswU18NI v7/7rV4l20ekQVtgiWGxwwaVNM1wMcQWydhQuKU2di7RryIcbC7BZAHD+fkXXuXBsO+f kjE42748uzUD0b8jXbVzelH47lgGs6ddWJ4oBEVJRJzOYs5Lt8RpJ91FCrF1CcGQtKnY m9TSRa05nNzRzIUvaYo5z2Ie81ec4GHVTdqfjxwzopOz03XPMq70VvdPVX5naAbs0DKD socJaEWXu3BpJmDkCb/jlraihRvvZ5C9hpghlt7RsyO7hNm3yb5tPEO5vs5EFIZMX5OF NhQg== X-Gm-Message-State: AIkVDXIMa0g1+w2URtG+fPjPGR30S4tsSLm9nk0gqC8FhZkFB3ZIkv7M4ZOCFR/4VvELVg== X-Received: by 10.223.161.158 with SMTP id u30mr23616931wru.152.1485875250141; Tue, 31 Jan 2017 07:07:30 -0800 (PST) Received: from brick (global-5-143.nat-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id u198sm24316127wmf.9.2017.01.31.07.07.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 07:07:29 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 31 Jan 2017 15:07:27 +0000 From: Edward Tomasz Napierala To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys Message-ID: <20170131150727.GA8617@brick> Mail-Followup-To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201701301257.v0UCvNrK065993@repo.freebsd.org> <20170130230200.GD2611@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170130230200.GD2611@FreeBSD.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 15:07:34 -0000 On 0130T1502, Gleb Smirnoff wrote: > On Mon, Jan 30, 2017 at 12:57:23PM +0000, Edward Tomasz Napierala wrote: > E> Author: trasz > E> Date: Mon Jan 30 12:57:22 2017 > E> New Revision: 312988 > E> URL: https://svnweb.freebsd.org/changeset/base/312988 > E> > E> Log: > E> Add kern_listen(), kern_shutdown(), and kern_socket(), and use them > E> instead of their sys_*() counterparts in various compats. The svr4 > E> is left untouched, because there's no point. > > Btw, any good reasons to keep SVR4 support for FreeBSD 12? I don't think so. However, I seem to remember there was an attempt to remove one of the compats some time ago, and it turned out there were still some people using it. So, I don't have plans to disconnect svr4, but I don't have plans to keep it up to date either. From owner-svn-src-all@freebsd.org Tue Jan 31 15:10:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB15ACCA2EB; Tue, 31 Jan 2017 15:10:43 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x243.google.com (mail-yb0-x243.google.com [IPv6:2607:f8b0:4002:c09::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 780E81DD1; Tue, 31 Jan 2017 15:10:43 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x243.google.com with SMTP id o65so4726185ybo.3; Tue, 31 Jan 2017 07:10:43 -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=2HyIpJzFgnNuNAr2fZ6q6tUeAYdtFKoC0YOkSbyQfv4=; b=oR9eZDcCEWd+5kuTTrFNBraZl+tg5CPQqUDL4MSlMZvEOZwIjJO4wF0xzgCLKQ5nnF LmfL1qaRqvx+WRkqNZBV4KnbSonH1oMLj4nrjXYebcbmVxw0o4xhif0WOzdQWYzlIMTw 5mmlnhY76FPCSQyhtvAA97dGKZanYn0IdoBLWCSfJNG0se0+meGLBO5r0L8ETJkBg5lz TfyP4+VEfuMmX5Skdw5AolOoD3eZo8HH6Fz6TiIFVgtqEUjAPJYt/vLi0CrWPztJJOYm PaeYEB/PIRX7TeQJQkrao9eoE/lgd4l4g3YZSjxjpnOnOOhi28qviDCSidmde9YPVOVr N+uA== 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=2HyIpJzFgnNuNAr2fZ6q6tUeAYdtFKoC0YOkSbyQfv4=; b=MUnr/LLykCnfmEaQlCYJHe+wzHWgHGB3jUmufIu9dK5+ORoKUF3Z2awvVmE+K1lWDk phBxmtXmleislCJgZ23V6y9gf4WEWzVEBJJpoezpHdw2Z2qiEkq/xwsP3yuHve384CAM ApCJV8atoNUH5Izcz/HeFE47fWJF8RegI3Px7O0Q2TyBbrk+lyDoHRgKsKj0ygSiTUgA PqIjPlzKPizJvr/yaf31RjU1xo0u26yRcIJdtW40JBZEV1BiC0oFe409YzFaxIzvOlNN dsRfbwacvClZU4+2iqItBQol4ur8pks3IRSS6d3ibDMogIYXSttLu1Ju74HxJI2EYEF4 vA5Q== X-Gm-Message-State: AIkVDXK2myjztSewA3VfuQdijjWfe+PHuSdE51LOYo0MaUZccUQd8m+wxt3RH4NNvraTpoJksL6PJVOo9cEzZQ== X-Received: by 10.37.105.76 with SMTP id e73mr14051796ybc.113.1485875442424; Tue, 31 Jan 2017 07:10:42 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.38.133 with HTTP; Tue, 31 Jan 2017 07:10:41 -0800 (PST) In-Reply-To: <201701310612.v0V6CqVL093451@repo.freebsd.org> References: <201701310612.v0V6CqVL093451@repo.freebsd.org> From: Alan Somers Date: Tue, 31 Jan 2017 08:10:41 -0700 X-Google-Sender-Auth: myT_ltXr67cUqusPQLeubDQP87w Message-ID: Subject: Re: svn commit: r313008 - head/tests/sys/geom/class/gate To: Ngie Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 15:10:43 -0000 I think wait_for_ggate_device should also be used at line 32, which calls "ggatec create". -Alan On Mon, Jan 30, 2017 at 11:12 PM, Ngie Cooper wrote: > Author: ngie > Date: Tue Jan 31 06:12:51 2017 > New Revision: 313008 > URL: https://svnweb.freebsd.org/changeset/base/313008 > > Log: > Wait for /dev/ggate* to appear after calling `ggatel create` in :ggatel_{file,md} > > The test assumed that `ggatel create` created a device on completion, but that's > incorrect. This squashes the race by waiting for the device to appear, as > `ggatel create` daemonizes before issuing an ioctl to geom_gate(4) if not called > with `-v`. > > Discussed with: asomers > MFC after: 1 week > PR: 204616 > Sponsored by: Dell EMC Isilon > > Modified: > head/tests/sys/geom/class/gate/ggate_test.sh > > Modified: head/tests/sys/geom/class/gate/ggate_test.sh > ============================================================================== > --- head/tests/sys/geom/class/gate/ggate_test.sh Tue Jan 31 03:40:13 2017 (r313007) > +++ head/tests/sys/geom/class/gate/ggate_test.sh Tue Jan 31 06:12:51 2017 (r313008) > @@ -74,7 +74,11 @@ ggatel_file_body() > > atf_check ggatel create -u $us work > > - dd if=src of=/dev/ggate${us} bs=1m count=1 conv=notrunc > + ggate_dev=/dev/ggate${us} > + > + wait_for_ggate_device ${ggate_dev} > + > + dd if=src of=${ggate_dev} bs=1m count=1 conv=notrunc > > checksum src work > } > @@ -104,7 +108,11 @@ ggatel_md_body() > > atf_check ggatel create -u $us /dev/$work > > - dd if=/dev/$src of=/dev/ggate${us} bs=1m count=1 conv=notrunc > + ggate_dev=/dev/ggate${us} > + > + wait_for_ggate_device ${ggate_dev} > + > + dd if=/dev/$src of=${ggate_dev} bs=1m count=1 conv=notrunc > > checksum /dev/$src /dev/$work > } > @@ -191,3 +199,14 @@ common_cleanup() > fi > true > } > + > +# Bug 204616: ggatel(8) creates /dev/ggate* asynchronously if `ggatel create` > +# isn't called with `-v`. > +wait_for_ggate_device() > +{ > + ggate_device=$1 > + > + while [ ! -c $ggate_device ]; do > + sleep 0.5 > + done > +} > From owner-svn-src-all@freebsd.org Tue Jan 31 15:11:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99DFDCCA38C; Tue, 31 Jan 2017 15:11:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BA7E73; Tue, 31 Jan 2017 15:11:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VFBNh2012669; Tue, 31 Jan 2017 15:11:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VFBN6F012666; Tue, 31 Jan 2017 15:11:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701311511.v0VFBN6F012666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 31 Jan 2017 15:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313015 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 15:11:24 -0000 Author: trasz Date: Tue Jan 31 15:11:23 2017 New Revision: 313015 URL: https://svnweb.freebsd.org/changeset/base/313015 Log: Add kern_cpuset_getid() and kern_cpuset_setid(), and use them in compat32 instead of their sub_*() counterparts. Reviewed by: jhb@, kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9382 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_cpuset.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Jan 31 14:36:06 2017 (r313014) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Jan 31 15:11:23 2017 (r313015) @@ -2556,27 +2556,18 @@ int freebsd32_cpuset_setid(struct thread *td, struct freebsd32_cpuset_setid_args *uap) { - struct cpuset_setid_args ap; - ap.which = uap->which; - ap.id = PAIR32TO64(id_t,uap->id); - ap.setid = uap->setid; - - return (sys_cpuset_setid(td, &ap)); + return (kern_cpuset_setid(td, uap->which, + PAIR32TO64(id_t, uap->id), uap->setid)); } int freebsd32_cpuset_getid(struct thread *td, struct freebsd32_cpuset_getid_args *uap) { - struct cpuset_getid_args ap; - - ap.level = uap->level; - ap.which = uap->which; - ap.id = PAIR32TO64(id_t,uap->id); - ap.setid = uap->setid; - return (sys_cpuset_getid(td, &ap)); + return (kern_cpuset_getid(td, uap->level, uap->which, + PAIR32TO64(id_t, uap->id), uap->setid)); } int Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Tue Jan 31 14:36:06 2017 (r313014) +++ head/sys/kern/kern_cpuset.c Tue Jan 31 15:11:23 2017 (r313015) @@ -976,18 +976,26 @@ struct cpuset_setid_args { int sys_cpuset_setid(struct thread *td, struct cpuset_setid_args *uap) { + + return (kern_cpuset_setid(td, uap->which, uap->id, uap->setid)); +} + +int +kern_cpuset_setid(struct thread *td, cpuwhich_t which, + id_t id, cpusetid_t setid) +{ struct cpuset *set; int error; /* * Presently we only support per-process sets. */ - if (uap->which != CPU_WHICH_PID) + if (which != CPU_WHICH_PID) return (EINVAL); - set = cpuset_lookup(uap->setid, td); + set = cpuset_lookup(setid, td); if (set == NULL) return (ESRCH); - error = cpuset_setproc(uap->id, set, NULL); + error = cpuset_setproc(id, set, NULL); cpuset_rel(set); return (error); } @@ -1003,19 +1011,28 @@ struct cpuset_getid_args { int sys_cpuset_getid(struct thread *td, struct cpuset_getid_args *uap) { + + return (kern_cpuset_getid(td, uap->level, uap->which, uap->id, + uap->setid)); +} + +int +kern_cpuset_getid(struct thread *td, cpulevel_t level, cpuwhich_t which, + id_t id, cpusetid_t *setid) +{ struct cpuset *nset; struct cpuset *set; struct thread *ttd; struct proc *p; - cpusetid_t id; + cpusetid_t tmpid; int error; - if (uap->level == CPU_LEVEL_WHICH && uap->which != CPU_WHICH_CPUSET) + if (level == CPU_LEVEL_WHICH && which != CPU_WHICH_CPUSET) return (EINVAL); - error = cpuset_which(uap->which, uap->id, &p, &ttd, &set); + error = cpuset_which(which, id, &p, &ttd, &set); if (error) return (error); - switch (uap->which) { + switch (which) { case CPU_WHICH_TID: case CPU_WHICH_PID: thread_lock(ttd); @@ -1030,7 +1047,7 @@ sys_cpuset_getid(struct thread *td, stru case CPU_WHICH_DOMAIN: return (EINVAL); } - switch (uap->level) { + switch (level) { case CPU_LEVEL_ROOT: nset = cpuset_refroot(set); cpuset_rel(set); @@ -1041,10 +1058,10 @@ sys_cpuset_getid(struct thread *td, stru case CPU_LEVEL_WHICH: break; } - id = set->cs_id; + tmpid = set->cs_id; cpuset_rel(set); if (error == 0) - error = copyout(&id, uap->setid, sizeof(id)); + error = copyout(&tmpid, setid, sizeof(id)); return (error); } Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Tue Jan 31 14:36:06 2017 (r313014) +++ head/sys/sys/syscallsubr.h Tue Jan 31 15:11:23 2017 (r313015) @@ -86,6 +86,10 @@ int kern_clock_settime(struct thread *td int kern_close(struct thread *td, int fd); int kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); +int kern_cpuset_getid(struct thread *td, cpulevel_t level, + cpuwhich_t which, id_t id, cpusetid_t *setid); +int kern_cpuset_setid(struct thread *td, cpuwhich_t which, + id_t id, cpusetid_t setid); int kern_dup(struct thread *td, u_int mode, int flags, int old, int new); int kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p); From owner-svn-src-all@freebsd.org Tue Jan 31 15:19:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 653A4CCA8A1; Tue, 31 Jan 2017 15:19:46 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1998BA08; Tue, 31 Jan 2017 15:19:46 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VFJjke013034; Tue, 31 Jan 2017 15:19:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VFJjTI013032; Tue, 31 Jan 2017 15:19:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701311519.v0VFJjTI013032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 31 Jan 2017 15:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313016 - in head/sys: compat/freebsd32 kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 15:19:46 -0000 Author: trasz Date: Tue Jan 31 15:19:44 2017 New Revision: 313016 URL: https://svnweb.freebsd.org/changeset/base/313016 Log: Replace calls to sys_truncate() with kern_truncate(). Reviewed by: kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9371 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/vfs_syscalls.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Jan 31 15:11:23 2017 (r313015) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Jan 31 15:19:44 2017 (r313016) @@ -1500,11 +1500,9 @@ freebsd32_lseek(struct thread *td, struc int freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap) { - struct truncate_args ap; - ap.path = uap->path; - ap.length = PAIR32TO64(off_t,uap->length); - return (sys_truncate(td, &ap)); + return (kern_truncate(td, uap->path, UIO_USERSPACE, + PAIR32TO64(off_t, uap->length))); } int @@ -1600,11 +1598,9 @@ freebsd6_freebsd32_lseek(struct thread * int freebsd6_freebsd32_truncate(struct thread *td, struct freebsd6_freebsd32_truncate_args *uap) { - struct truncate_args ap; - ap.path = uap->path; - ap.length = PAIR32TO64(off_t,uap->length); - return (sys_truncate(td, &ap)); + return (kern_truncate(td, uap->path, UIO_USERSPACE, + PAIR32TO64(off_t, uap->length))); } int Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Jan 31 15:11:23 2017 (r313015) +++ head/sys/kern/vfs_syscalls.c Tue Jan 31 15:19:44 2017 (r313016) @@ -3310,22 +3310,10 @@ struct otruncate_args { }; #endif int -otruncate(td, uap) - struct thread *td; - register struct otruncate_args /* { - char *path; - long length; - } */ *uap; +otruncate(struct thread *td, struct otruncate_args *uap) { - struct truncate_args /* { - char *path; - int pad; - off_t length; - } */ nuap; - - nuap.path = uap->path; - nuap.length = uap->length; - return (sys_truncate(td, &nuap)); + + return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length)); } #endif /* COMPAT_43 */ @@ -3334,11 +3322,8 @@ otruncate(td, uap) int freebsd6_truncate(struct thread *td, struct freebsd6_truncate_args *uap) { - struct truncate_args ouap; - ouap.path = uap->path; - ouap.length = uap->length; - return (sys_truncate(td, &ouap)); + return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length)); } int From owner-svn-src-all@freebsd.org Tue Jan 31 15:22:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38EA7CCAB1F; Tue, 31 Jan 2017 15:22:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07214F47; Tue, 31 Jan 2017 15:22:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VFMq34016830; Tue, 31 Jan 2017 15:22:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VFMqna016829; Tue, 31 Jan 2017 15:22:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701311522.v0VFMqna016829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 31 Jan 2017 15:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313017 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 15:22:53 -0000 Author: trasz Date: Tue Jan 31 15:22:51 2017 New Revision: 313017 URL: https://svnweb.freebsd.org/changeset/base/313017 Log: Fix linux_getppid() to debug the actual parent, even it was reparented by debugger. Reviewed by: dchagin@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9361 Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Tue Jan 31 15:19:44 2017 (r313016) +++ head/sys/compat/linux/linux_misc.c Tue Jan 31 15:22:51 2017 (r313017) @@ -1733,9 +1733,7 @@ linux_getppid(struct thread *td, struct printf(ARGS(getppid, "")); #endif - PROC_LOCK(td->td_proc); - td->td_retval[0] = td->td_proc->p_pptr->p_pid; - PROC_UNLOCK(td->td_proc); + td->td_retval[0] = kern_getppid(td); return (0); } From owner-svn-src-all@freebsd.org Tue Jan 31 15:35:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CF3DCC81FF; Tue, 31 Jan 2017 15:35:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1B601EF9; Tue, 31 Jan 2017 15:35:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VFZJF5022193; Tue, 31 Jan 2017 15:35:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VFZIlE022189; Tue, 31 Jan 2017 15:35:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701311535.v0VFZIlE022189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 31 Jan 2017 15:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313018 - in head/sys: compat/freebsd32 compat/linux kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 15:35:20 -0000 Author: trasz Date: Tue Jan 31 15:35:18 2017 New Revision: 313018 URL: https://svnweb.freebsd.org/changeset/base/313018 Log: Add kern_pread() and kern_pwrite(), and use it in compats instead of their sys_*() counterparts. The svr4 is left unchanged. Reviewed by: kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9379 Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_file.c head/sys/kern/sys_generic.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Jan 31 15:22:51 2017 (r313017) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Jan 31 15:35:18 2017 (r313018) @@ -1452,25 +1452,17 @@ freebsd4_freebsd32_fhstatfs(struct threa int freebsd32_pread(struct thread *td, struct freebsd32_pread_args *uap) { - struct pread_args ap; - ap.fd = uap->fd; - ap.buf = uap->buf; - ap.nbyte = uap->nbyte; - ap.offset = PAIR32TO64(off_t,uap->offset); - return (sys_pread(td, &ap)); + return (kern_pread(td, uap->fd, uap->buf, uap->nbyte, + PAIR32TO64(off_t, uap->offset))); } int freebsd32_pwrite(struct thread *td, struct freebsd32_pwrite_args *uap) { - struct pwrite_args ap; - ap.fd = uap->fd; - ap.buf = uap->buf; - ap.nbyte = uap->nbyte; - ap.offset = PAIR32TO64(off_t,uap->offset); - return (sys_pwrite(td, &ap)); + return (kern_pwrite(td, uap->fd, uap->buf, uap->nbyte, + PAIR32TO64(off_t, uap->offset))); } #ifdef COMPAT_43 @@ -1559,25 +1551,17 @@ freebsd32_getdirentries(struct thread *t int freebsd6_freebsd32_pread(struct thread *td, struct freebsd6_freebsd32_pread_args *uap) { - struct pread_args ap; - ap.fd = uap->fd; - ap.buf = uap->buf; - ap.nbyte = uap->nbyte; - ap.offset = PAIR32TO64(off_t,uap->offset); - return (sys_pread(td, &ap)); + return (kern_pread(td, uap->fd, uap->buf, uap->nbyte, + PAIR32TO64(off_t, uap->offset))); } int freebsd6_freebsd32_pwrite(struct thread *td, struct freebsd6_freebsd32_pwrite_args *uap) { - struct pwrite_args ap; - ap.fd = uap->fd; - ap.buf = uap->buf; - ap.nbyte = uap->nbyte; - ap.offset = PAIR32TO64(off_t,uap->offset); - return (sys_pwrite(td, &ap)); + return (kern_pwrite(td, uap->fd, uap->buf, uap->nbyte, + PAIR32TO64(off_t, uap->offset))); } int Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Tue Jan 31 15:22:51 2017 (r313017) +++ head/sys/compat/linux/linux_file.c Tue Jan 31 15:35:18 2017 (r313018) @@ -997,20 +997,13 @@ linux_fdatasync(td, uap) } int -linux_pread(td, uap) - struct thread *td; - struct linux_pread_args *uap; +linux_pread(struct thread *td, struct linux_pread_args *uap) { - struct pread_args bsd; cap_rights_t rights; struct vnode *vp; int error; - bsd.fd = uap->fd; - bsd.buf = uap->buf; - bsd.nbyte = uap->nbyte; - bsd.offset = uap->offset; - error = sys_pread(td, &bsd); + error = kern_pread(td, uap->fd, uap->buf, uap->nbyte, uap->offset); if (error == 0) { /* This seems to violate POSIX but linux does it */ error = fgetvp(td, uap->fd, @@ -1027,17 +1020,10 @@ linux_pread(td, uap) } int -linux_pwrite(td, uap) - struct thread *td; - struct linux_pwrite_args *uap; -{ - struct pwrite_args bsd; - - bsd.fd = uap->fd; - bsd.buf = uap->buf; - bsd.nbyte = uap->nbyte; - bsd.offset = uap->offset; - return (sys_pwrite(td, &bsd)); +linux_pwrite(struct thread *td, struct linux_pwrite_args *uap) +{ + + return (kern_pwrite(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); } int Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Tue Jan 31 15:22:51 2017 (r313017) +++ head/sys/kern/sys_generic.c Tue Jan 31 15:35:18 2017 (r313018) @@ -220,39 +220,37 @@ struct pread_args { }; #endif int -sys_pread(td, uap) - struct thread *td; - struct pread_args *uap; +sys_pread(struct thread *td, struct pread_args *uap) +{ + + return (kern_pread(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); +} + +int +kern_pread(struct thread *td, int fd, void *buf, size_t nbyte, off_t offset) { struct uio auio; struct iovec aiov; int error; - if (uap->nbyte > IOSIZE_MAX) + if (nbyte > IOSIZE_MAX) return (EINVAL); - aiov.iov_base = uap->buf; - aiov.iov_len = uap->nbyte; + aiov.iov_base = buf; + aiov.iov_len = nbyte; auio.uio_iov = &aiov; auio.uio_iovcnt = 1; - auio.uio_resid = uap->nbyte; + auio.uio_resid = nbyte; auio.uio_segflg = UIO_USERSPACE; - error = kern_preadv(td, uap->fd, &auio, uap->offset); - return(error); + error = kern_preadv(td, fd, &auio, offset); + return (error); } #if defined(COMPAT_FREEBSD6) int -freebsd6_pread(td, uap) - struct thread *td; - struct freebsd6_pread_args *uap; +freebsd6_pread(struct thread *td, struct freebsd6_pread_args *uap) { - struct pread_args oargs; - oargs.fd = uap->fd; - oargs.buf = uap->buf; - oargs.nbyte = uap->nbyte; - oargs.offset = uap->offset; - return (sys_pread(td, &oargs)); + return (kern_pread(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); } #endif @@ -435,39 +433,38 @@ struct pwrite_args { }; #endif int -sys_pwrite(td, uap) - struct thread *td; - struct pwrite_args *uap; +sys_pwrite(struct thread *td, struct pwrite_args *uap) +{ + + return (kern_pwrite(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); +} + +int +kern_pwrite(struct thread *td, int fd, const void *buf, size_t nbyte, + off_t offset) { struct uio auio; struct iovec aiov; int error; - if (uap->nbyte > IOSIZE_MAX) + if (nbyte > IOSIZE_MAX) return (EINVAL); - aiov.iov_base = (void *)(uintptr_t)uap->buf; - aiov.iov_len = uap->nbyte; + aiov.iov_base = (void *)(uintptr_t)buf; + aiov.iov_len = nbyte; auio.uio_iov = &aiov; auio.uio_iovcnt = 1; - auio.uio_resid = uap->nbyte; + auio.uio_resid = nbyte; auio.uio_segflg = UIO_USERSPACE; - error = kern_pwritev(td, uap->fd, &auio, uap->offset); + error = kern_pwritev(td, fd, &auio, offset); return(error); } #if defined(COMPAT_FREEBSD6) int -freebsd6_pwrite(td, uap) - struct thread *td; - struct freebsd6_pwrite_args *uap; +freebsd6_pwrite(struct thread *td, struct freebsd6_pwrite_args *uap) { - struct pwrite_args oargs; - oargs.fd = uap->fd; - oargs.buf = uap->buf; - oargs.nbyte = uap->nbyte; - oargs.offset = uap->offset; - return (sys_pwrite(td, &oargs)); + return (kern_pwrite(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); } #endif Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Tue Jan 31 15:22:51 2017 (r313017) +++ head/sys/sys/syscallsubr.h Tue Jan 31 15:35:18 2017 (r313018) @@ -171,11 +171,15 @@ int kern_posix_fallocate(struct thread * off_t len); int kern_procctl(struct thread *td, enum idtype idtype, id_t id, int com, void *data); +int kern_pread(struct thread *td, int fd, void *buf, size_t nbyte, + off_t offset); int kern_preadv(struct thread *td, int fd, struct uio *auio, off_t offset); int kern_pselect(struct thread *td, int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tvp, sigset_t *uset, int abi_nfdbits); int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data); +int kern_pwrite(struct thread *td, int fd, const void *buf, size_t nbyte, + off_t offset); int kern_pwritev(struct thread *td, int fd, struct uio *auio, off_t offset); int kern_readlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count); From owner-svn-src-all@freebsd.org Tue Jan 31 15:37:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69150CC8288; Tue, 31 Jan 2017 15:37:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 17E5BF2; Tue, 31 Jan 2017 15:37:33 +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 mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 6BCFE104D0EB; Wed, 1 Feb 2017 02:37:02 +1100 (AEDT) Date: Wed, 1 Feb 2017 02:36:50 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern In-Reply-To: <20170131175309.N1418@besplex.bde.org> Message-ID: <20170201005009.E2504@besplex.bde.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170131153411.G1061@besplex.bde.org> <20170131175309.N1418@besplex.bde.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=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=e7l4R82dM9Md61vNAUYA:9 a=CjuIK1q_8ugA:10 a=Oa0T6EYmKFNB-xRHvYM1:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 15:37:34 -0000 On Tue, 31 Jan 2017, Bruce Evans wrote: > On Mon, 30 Jan 2017, Conrad Meyer wrote: > >> On Mon, Jan 30, 2017 at 9:26 PM, Bruce Evans wrote: >>> On Tue, 31 Jan 2017, Conrad E. Meyer wrote: >>> >>>> Log: >>>> calculate_crc32c: Add SSE4.2 implementation on x86 >>> >>> This breaks building with gcc-4.2.1, >> >> gcc-4.2.1 is an ancient compiler. Good riddance. > > I prefer it. It also works better on ordinary asms for crc32. >>>> Added: head/sys/libkern/x86/crc32_sse42.c >>>> >>>> ============================================================================== >>>> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >>>> +++ head/sys/libkern/x86/crc32_sse42.c Tue Jan 31 03:26:32 2017 >>>> (r313006) >>>> + >>>> +#include >>> >>> ... >>> >>> Inline asm is much less unportable than intrinsics. kib used the correct >>> method of .byte's in asms to avoid depending on assembler support for >>> newer >>> instructions. .byte is still used for clflush on amd64 and i386. It >>> used to be used for invpcid on amd64. I can't find where it is or was >>> used for xsave stuff. >> >> Konstantin predicted this complaint in code review (phabricator). >> Unfortunately, Clang does not automatically unroll asms, even with the >> correct mnemonic. Unrolling is essential to performance below the >> by-3 block size (768 bytes in this implementation). Hand unrolling in >> C seems to generate less efficient assembly than the compiler's >> unrolling. > > Unorolling is almost completely useless if the instruction takes 3 cycles > like you said it does. The loop calculations run much faster than that, > so they can run in parallel. However, clang generates horrible code for > inline asms instead of intrinsics. The unrolling was worse than useless (see previous reply). It is the horrible code in the non-intrinsics case that seems to be the main source of differences (see below). >> The left column below is block size. The measurements are nanoseconds >> per buf, per CLOCK_VIRTUAL, averaged over 10^5 loops. These numbers >> do not vary more than +/- 1ns run to run on my idle Sandy Bridge >> laptop. "asm" is using __asm__(), "intrins" using the _mm_crc32 >> intrinsics that Clang can unroll, and multitable is the older >> lookup-table implementation (still used on other architectures). >> >> 0x000010: asm:0 intrins:0 multitable:0 (ns per buf) >> 0x000020: asm:7 intrins:9 multitable:78 (ns per buf) >> 0x000040: asm:10 intrins:7 multitable:50 (ns per buf) >> 0x000080: asm:15 intrins:9 multitable:91 (ns per buf) >> 0x000100: asm:25 intrins:17 multitable:178 (ns per buf) >> 0x000200: asm:55 intrins:38 multitable:347 (ns per buf) >> 0x000400: asm:61 intrins:62 multitable:684 (ns per buf) >> >> Both implementations are superior to the multitable approach, so it is >> unreasonable not to make one of them standard on x86 platforms. >> >> The unrolled intrinsics are consistently better than not unrolled on >> objects 0x40-0x200 bytes large. At 0x400 bytes we pass the first >> unroll-by-3 threshold and it stops mattering as much. >> >> At 0x40 bytes, it is the difference between 6.4 GB/s and 9.1 GB/s. At >> 0x200 bytes, it is the difference between 9.3 GB/s and 13.5 GB/s. I >> think this justifies some minor ugliness. > > If it matters, which I doubt, then the compiler shouldn't be trusted > for unrolling. It can only do better than handwritten unrolling if > it has tables for the correct amount unrolling for every instruction > for thousands of CPUs (since such tables are too hard to write manually). It is the 3-way unrolling that makes the main difference. clang is clueless about unrolling in this function, but this 3-way unrolling is in the C code. It is to reduce dependencies. The timing seems to be as I suspected -- the crc32 instruction has a latency of 3 and a throughput of 3 per 3 cycles, so with 3 dependent instructions it runs 3 times slower than with 3 independent instructions. Naive unrolling gives more dependent instructions, so is equally slow to no unrolling. Test program for this: X #include X #include X X #ifndef __clang__ Change this to __clang__X to kill intrinsics for clang. X static __inline uint32_t X _mm_crc32_u8(uint32_t x, uint8_t y) X { X __asm("crc32b %1,%0" : "+r" (x) : "rm" (y)); X return (x); X } X X static __inline uint32_t __unused X _mm_crc32_u32(uint32_t x, int32_t y) X { X __asm("crc32l %1,%0" : "+r" (x) : "rm" (y)); X return (x); X } X X #ifdef __amd64__ X static __inline uint64_t X _mm_crc32_u64(uint64_t x, int64_t y) X { X __asm("crc32q %1,%0" : "+r" (x) : "rm" (y)); X return (x); X } X #endif X #else X #include X #endif X X #define MISALIGN 0 MISALIGN 1 costs about 4% (0.36 seconds instead of 0.34 seconds on freefall's Xeon). X #define SIZE 1000000 The large size of 1M is to bust at least the L1 cache. This makes little difference, since the speed is CPU-bound (0.34 seconds @ 3.3 GHz = ~34/33 cycles per crc32 instruction). Actually, I'm not sure about the speeds. freefalls's machdep.tsc_freq is 3.3GHz, but the speed could be anything due to turbo mode and frequency control (boot message give similarly useless values for the actual speed). The test accesses 10g bytes or 1.25g crc32 instructions and that if the instructions take 1 cycle each that is 0.38 seconds. I think I'm measuring the CPU speed and not L2 cache speed since SIZE 1000 fits in L1 and gives the same speed. X X uint8_t buf[MISALIGN + SIZE]; X X int X main(void) X { X uint64_t crc1, crc2, crc3, crc4, crc5, crc6, crc7, crc8; X int i, j; X X crc1 = 0; X crc2 = 0; X crc3 = 0; X for (i = 0; i < 10000; i++) X for (j = MISALIGN; j < MISALIGN SIZE; j += 24) { X crc1 = _mm_crc32_u64(crc1, *(uint64_t *)&buf[j + 0]); X crc2 = _mm_crc32_u64(crc2, *(uint64_t *)&buf[j + 8]); X crc3 = _mm_crc32_u64(crc3, *(uint64_t *)&buf[j + 16]); I tried up to 8-way unrolling, with up to 8 crcN's or 8 crc steps into crc1. 8 crcNs are no better than 3, and the common crc1 is always 3 times slower. X } X return (crc1 + crc2 + crc3 == 0 ? 0 : 1); Sloppy combination to get the result used. X } gcc generates the natural code for the inner loop and runs in 0.34 seconds: G .p2align 4,,7 G .L3: G #APP G crc32q buf(%rdx),%rsi G crc32q buf+8(%rdx),%rcx G crc32q buf+16(%rdx),%rax G #NO_APP G addq $24, %rdx G cmpq $1008, %rdx G jne .L3 clang with intrinsics unrolls twice and runs in 0.34 seconds: C .p2align 4, 0x90 C .LBB0_2: # %for.body3 C # Parent Loop BB0_1 Depth=1 C # => This Inner Loop Header: Depth=2 C crc32q buf(%rdi), %rcx C crc32q buf+8(%rdi), %rsi C crc32q buf+16(%rdi), %rdx C crc32q buf+24(%rdi), %rcx C crc32q buf+32(%rdi), %rsi C crc32q buf+40(%rdi), %rdx C addq $48, %rdi C cmpq $1000, %rdi # imm = 0x3E8 C jl .LBB0_2 clang without intrinsics generates a mess and runs in 0.43 seconds: C .p2align 4, 0x90 C .LBB0_2: # %for.body3 C # Parent Loop BB0_1 Depth=1 C # => This Inner Loop Header: Depth=2 C movq buf(%rdi), %rax C movq %rax, -24(%rbp) C #APP C crc32q -24(%rbp), %rcx C #NO_APP C movq buf+8(%rdi), %rax C movq %rax, -16(%rbp) C #APP C crc32q -16(%rbp), %rsi C #NO_APP C movq buf+16(%rdi), %rax C movq %rax, -8(%rbp) C #APP C crc32q -8(%rbp), %rdx C #NO_APP C addq $24, %rdi C cmpq $1000, %rdi # imm = 0x3E8 C jl .LBB0_2 Editing just this inner loop to the natural code gives a speed of 0.34 seconds. freefall's Xeon is just short of resources to execute the extra instructions. Using 4 independent crcN's didn't help, but using 8 gave a time of 0.36 seconds. This is very MD, but my Haswell runs at the same speed in cycles as freefall's Xeon. I just noticed that the kernel code has plenty comments about the 3/1 latency/throughput and related optimizations. Unrolling (or not) may be helpful or harmful for entry and exit code. I think there should by no alignment on entry -- just assume the buffer is aligned in the usual case, and only run 4% slower when it is misaligned. The exit code handles up to SHORT * 3 = 768 bytes, not up to 4 or 8 bytes or up to 3 times that like simpler algorithms. 768 is quite large, and the exit code is quite slow. It reduces 8 or 4 bytes at a time without any dependency reduction, and then 1 byte at a time. I don't understand the algorithm for joining crcs -- why doesn't it work to reduce to 12 or 24 bytes in the main loop? Your benchmarks mainly give results for the <= 768 bytes where most of the manual optimizations don't apply. Compiler optimizations are more likely to help there. So I looked more closely at the last 2 loop. clang indeed only unrolls the last one, only for the unreachable case with more than 8 bytes on amd64. Unrolling the previous one might be useful, but slight extra complexity apparently prevents this. In my test program, the hard-coded sizes allow the compiler to at least know that the unrolling is of reachable code. Bruce From owner-svn-src-all@freebsd.org Tue Jan 31 15:47:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C2F6CC86F2; Tue, 31 Jan 2017 15:47:23 +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 0C48F9C2; Tue, 31 Jan 2017 15:47:22 +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 v0VFlIpn082793 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 31 Jan 2017 17:47:18 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v0VFlIpn082793 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v0VFlH5i082792; Tue, 31 Jan 2017 17:47:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Jan 2017 17:47:17 +0200 From: Konstantin Belousov To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys Message-ID: <20170131154717.GV3018@kib.kiev.ua> References: <201701301257.v0UCvNrK065993@repo.freebsd.org> <20170130230200.GD2611@FreeBSD.org> <20170131150727.GA8617@brick> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170131150727.GA8617@brick> 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 15:47:23 -0000 On Tue, Jan 31, 2017 at 03:07:27PM +0000, Edward Tomasz Napierala wrote: > On 0130T1502, Gleb Smirnoff wrote: > > On Mon, Jan 30, 2017 at 12:57:23PM +0000, Edward Tomasz Napierala wrote: > > E> Author: trasz > > E> Date: Mon Jan 30 12:57:22 2017 > > E> New Revision: 312988 > > E> URL: https://svnweb.freebsd.org/changeset/base/312988 > > E> > > E> Log: > > E> Add kern_listen(), kern_shutdown(), and kern_socket(), and use them > > E> instead of their sys_*() counterparts in various compats. The svr4 > > E> is left untouched, because there's no point. > > > > Btw, any good reasons to keep SVR4 support for FreeBSD 12? > > I don't think so. However, I seem to remember there was an attempt > to remove one of the compats some time ago, and it turned out there were > still some people using it. So, I don't have plans to disconnect svr4, > but I don't have plans to keep it up to date either. > SVr4 is barely useful, but still connected to the build. iBCS2, on the other hand, was used by many people: I can claim it because I usually got more than one report for a regression in that code when core parts of the kernel change. I did some improvements for iBCS2 previous summer, both to better fit it into current kernel code, and fix outstanding bugs, biggest of which was incompatible signal frame layout. But there were concerns that the work required an approval from the SCO copyright owners, and we were unable to get a clearing. As result, iBCS2 emulator was disconnected from the build for 11 and HEAD. It would be somewhat pity to kill it because it is useful for many people, but we cannot update the code safely. There is no such concern for SVr4. From owner-svn-src-all@freebsd.org Tue Jan 31 16:12:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3717ACC8DF1; Tue, 31 Jan 2017 16:12:33 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C1C11852; Tue, 31 Jan 2017 16:12:32 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VGCWin038610; Tue, 31 Jan 2017 16:12:32 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VGCVsd038606; Tue, 31 Jan 2017 16:12:31 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201701311612.v0VGCVsd038606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Tue, 31 Jan 2017 16:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313019 - in head/sys: dev/e1000 dev/vnic net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 16:12:33 -0000 Author: stevek Date: Tue Jan 31 16:12:31 2017 New Revision: 313019 URL: https://svnweb.freebsd.org/changeset/base/313019 Log: Add the folowing set accessor functions for recently-added members of ifnet structure: if_gethwtsomax(), if_sethwtsomax() - if_hw_tsomax if_gethwtsomaxsegcount(), if_sethwtsomaxsegcount() - if_hw_tsomaxsegcount if_gethwtsomaxsegsize(), if_sethwtsomaxsegsize() - if_hw_tsomaxsegsize Update em and vnic drivers which had already been coverted to use accessor functions for the other ifnet structure members. Reviewed by: erj Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D8544 Modified: head/sys/dev/e1000/if_em.c head/sys/dev/vnic/nicvf_main.c head/sys/net/if.c head/sys/net/if_var.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Tue Jan 31 15:35:18 2017 (r313018) +++ head/sys/dev/e1000/if_em.c Tue Jan 31 16:12:31 2017 (r313019) @@ -2481,10 +2481,10 @@ em_setup_interface(if_ctx_t ctx) INIT_DEBUGOUT("em_setup_interface: begin"); /* TSO parameters */ - ifp->if_hw_tsomax = IP_MAXPACKET; + if_sethwtsomax(ifp, IP_MAXPACKET); /* Take m_pullup(9)'s in em_xmit() w/ TSO into acount. */ - ifp->if_hw_tsomaxsegcount = EM_MAX_SCATTER - 5; - ifp->if_hw_tsomaxsegsize = EM_TSO_SEG_SIZE; + if_sethwtsomaxsegcount(ifp, EM_MAX_SCATTER - 5); + if_sethwtsomaxsegsize(ifp, EM_TSO_SEG_SIZE); /* Single Queue */ if (adapter->tx_num_queues == 1) { Modified: head/sys/dev/vnic/nicvf_main.c ============================================================================== --- head/sys/dev/vnic/nicvf_main.c Tue Jan 31 15:35:18 2017 (r313018) +++ head/sys/dev/vnic/nicvf_main.c Tue Jan 31 16:12:31 2017 (r313019) @@ -370,9 +370,9 @@ nicvf_setup_ifnet(struct nicvf *nic) /* TSO */ if_setcapabilitiesbit(ifp, IFCAP_TSO4, 0); /* TSO parameters */ - ifp->if_hw_tsomax = NICVF_TSO_MAXSIZE; - ifp->if_hw_tsomaxsegcount = NICVF_TSO_NSEGS; - ifp->if_hw_tsomaxsegsize = MCLBYTES; + if_sethwtsomax(ifp, NICVF_TSO_MAXSIZE); + if_sethwtsomaxsegcount(ifp, NICVF_TSO_NSEGS); + if_sethwtsomaxsegsize(ifp, MCLBYTES); } /* IP/TCP/UDP HW checksums */ if_setcapabilitiesbit(ifp, IFCAP_HWCSUM, 0); @@ -453,7 +453,7 @@ nicvf_if_ioctl(struct ifnet *ifp, u_long #if defined(INET) || defined(INET6) /* Avoid reinitialization unless it's necessary */ if (avoid_reset) { - ifp->if_flags |= IFF_UP; + if_setflagbits(ifp, IFF_UP, 0); if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) nicvf_if_init(nic); #ifdef INET @@ -482,8 +482,8 @@ nicvf_if_ioctl(struct ifnet *ifp, u_long NICVF_CORE_LOCK(nic); if (if_getflags(ifp) & IFF_UP) { if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { - flags = ifp->if_flags ^ nic->if_flags; - if ((nic->if_flags & ifp->if_flags) & + flags = if_getflags(ifp) ^ nic->if_flags; + if ((nic->if_flags & if_getflags(ifp)) & IFF_PROMISC) { /* Change promiscous mode */ #if 0 @@ -492,7 +492,7 @@ nicvf_if_ioctl(struct ifnet *ifp, u_long #endif } - if ((nic->if_flags ^ ifp->if_flags) & + if ((nic->if_flags ^ if_getflags(ifp)) & IFF_ALLMULTI) { /* Change multicasting settings */ #if 0 @@ -506,7 +506,7 @@ nicvf_if_ioctl(struct ifnet *ifp, u_long } else if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) nicvf_stop_locked(nic); - nic->if_flags = ifp->if_flags; + nic->if_flags = if_getflags(ifp); NICVF_CORE_UNLOCK(nic); break; @@ -528,24 +528,24 @@ nicvf_if_ioctl(struct ifnet *ifp, u_long break; case SIOCSIFCAP: - mask = ifp->if_capenable ^ ifr->ifr_reqcap; + mask = if_getcapenable(ifp) ^ ifr->ifr_reqcap; if (mask & IFCAP_VLAN_MTU) { /* No work to do except acknowledge the change took. */ - ifp->if_capenable ^= IFCAP_VLAN_MTU; + if_togglecapenable(ifp, IFCAP_VLAN_MTU); } if (mask & IFCAP_TXCSUM) - ifp->if_capenable ^= IFCAP_TXCSUM; + if_togglecapenable(ifp, IFCAP_TXCSUM); if (mask & IFCAP_RXCSUM) - ifp->if_capenable ^= IFCAP_RXCSUM; + if_togglecapenable(ifp, IFCAP_RXCSUM); if ((mask & IFCAP_TSO4) && nic->hw_tso) - ifp->if_capenable ^= IFCAP_TSO4; + if_togglecapenable(ifp, IFCAP_TSO4); if (mask & IFCAP_LRO) { /* * Lock the driver for a moment to avoid * mismatch in per-queue settings. */ NICVF_CORE_LOCK(nic); - ifp->if_capenable ^= IFCAP_LRO; + if_togglecapenable(ifp, IFCAP_LRO); if ((if_getdrvflags(nic->ifp) & IFF_DRV_RUNNING) != 0) { /* * Now disable LRO for subsequent packets. Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Jan 31 15:35:18 2017 (r313018) +++ head/sys/net/if.c Tue Jan 31 16:12:31 2017 (r313019) @@ -4103,6 +4103,51 @@ if_vlancap(if_t ifh) VLAN_CAPABILITIES(ifp); } +int +if_sethwtsomax(if_t ifp, u_int if_hw_tsomax) +{ + + ((struct ifnet *)ifp)->if_hw_tsomax = if_hw_tsomax; + return (0); +} + +int +if_sethwtsomaxsegcount(if_t ifp, u_int if_hw_tsomaxsegcount) +{ + + ((struct ifnet *)ifp)->if_hw_tsomaxsegcount = if_hw_tsomaxsegcount; + return (0); +} + +int +if_sethwtsomaxsegsize(if_t ifp, u_int if_hw_tsomaxsegsize) +{ + + ((struct ifnet *)ifp)->if_hw_tsomaxsegsize = if_hw_tsomaxsegsize; + return (0); +} + +u_int +if_gethwtsomax(if_t ifp) +{ + + return (((struct ifnet *)ifp)->if_hw_tsomax); +} + +u_int +if_gethwtsomaxsegcount(if_t ifp) +{ + + return (((struct ifnet *)ifp)->if_hw_tsomaxsegcount); +} + +u_int +if_gethwtsomaxsegsize(if_t ifp) +{ + + return (((struct ifnet *)ifp)->if_hw_tsomaxsegsize); +} + void if_setinitfn(if_t ifp, void (*init_fn)(void *)) { Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Jan 31 15:35:18 2017 (r313018) +++ head/sys/net/if_var.h Tue Jan 31 16:12:31 2017 (r313019) @@ -658,6 +658,12 @@ int if_getflags(if_t ifp); int if_sendq_empty(if_t ifp); int if_setsendqready(if_t ifp); int if_setsendqlen(if_t ifp, int tx_desc_count); +int if_sethwtsomax(if_t ifp, u_int if_hw_tsomax); +int if_sethwtsomaxsegcount(if_t ifp, u_int if_hw_tsomaxsegcount); +int if_sethwtsomaxsegsize(if_t ifp, u_int if_hw_tsomaxsegsize); +u_int if_gethwtsomax(if_t ifp); +u_int if_gethwtsomaxsegcount(if_t ifp); +u_int if_gethwtsomaxsegsize(if_t ifp); int if_input(if_t ifp, struct mbuf* sendmp); int if_sendq_prepend(if_t ifp, struct mbuf *m); struct mbuf *if_dequeue(if_t ifp); From owner-svn-src-all@freebsd.org Tue Jan 31 18:48:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C09CCC9F64; Tue, 31 Jan 2017 18:48:17 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D39B1BB4; Tue, 31 Jan 2017 18:48:17 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f54.google.com with SMTP id b65so1384218wmf.0; Tue, 31 Jan 2017 10:48:17 -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:content-transfer-encoding; bh=rxudrZZz9kFFXO9BqDqkZb124+bR2aD1NiGyuvKQ9BM=; b=f9fyiVi1UaTMAct9h+H0/MgPOqovY7FHKhcN5t3nIUnLujyeU1/Z08pTbq5dtXqMtw RTd53UpI0FNYQ6skftszCTYbZUbhJ7qSvLcCKteGcYuVtT0jfzUNCjjta+ll3fxgBDob pIdHDVITwC9cBGK/2edFVk8YtVVgKIgScmMP/oDxDDsIx1/44FxKNGolQ2CKsABZcxXm kQxtlZqRNaeoAzkjEam9vYpNU7nKkPHSeKDLzd80QWeRDvLO2GHKokRGabwuZ7LI+S2w lOu+6ykXTH6E1dP72xBBKEYdN2azfzC+uQZB8oWJnK3i6YtJt1Om+KCE7+qbtY5K8jZq n/Mw== X-Gm-Message-State: AIkVDXJ0dVdGv9UzKa0kL4V11yKnkXmhw4pho3PkdlfmT4GHvLB22p0vwmVt1ykjeOkz9g== X-Received: by 10.223.148.2 with SMTP id 2mr27184251wrq.75.1485882914317; Tue, 31 Jan 2017 09:15:14 -0800 (PST) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com. [74.125.82.48]) by smtp.gmail.com with ESMTPSA id 8sm33366640wmg.1.2017.01.31.09.15.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 09:15:14 -0800 (PST) Received: by mail-wm0-f48.google.com with SMTP id c85so270054213wmi.1; Tue, 31 Jan 2017 09:15:14 -0800 (PST) X-Received: by 10.223.177.202 with SMTP id r10mr24559020wra.94.1485882913947; Tue, 31 Jan 2017 09:15:13 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.22.42 with HTTP; Tue, 31 Jan 2017 09:15:13 -0800 (PST) In-Reply-To: <20170201005009.E2504@besplex.bde.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170131153411.G1061@besplex.bde.org> <20170131175309.N1418@besplex.bde.org> <20170201005009.E2504@besplex.bde.org> From: Conrad Meyer Date: Tue, 31 Jan 2017 09:15:13 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern To: Bruce Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 18:48:17 -0000 On Tue, Jan 31, 2017 at 7:36 AM, Bruce Evans wrote: > On Tue, 31 Jan 2017, Bruce Evans wrote: > Unrolling (or not) may be helpful or harmful for entry and exit code. Helpful, per my earlier benchmarks. > I > think there should by no alignment on entry -- just assume the buffer is > aligned in the usual case, and only run 4% slower when it is misaligned. Please write such a patch and demonstrate the improvement. > The exit code handles up to SHORT * 3 =3D 768 bytes, not up to 4 or 8 > bytes or up to 3 times that like simpler algorithms. 768 is quite > large, and the exit code is quite slow. It reduces 8 or 4 bytes at a > time without any dependency reduction, and then 1 byte at a time. Yes, this is the important loop to unroll for small inputs. Somehow with the unrolling, it is only ~19% slower than the by-3 algorithm on my system =E2=80=94 not 66%. Clang 3.9.1 unrolls both of these trailing loops; here is the first: 0x0000000000401b88 <+584>: cmp $0x38,%rbx 0x0000000000401b8c <+588>: jae 0x401b93 0x0000000000401b8e <+590>: mov %rsi,%rdx 0x0000000000401b91 <+593>: jmp 0x401be1 0x0000000000401b93 <+595>: lea -0x1(%rdi),%rbx 0x0000000000401b97 <+599>: sub %rdx,%rbx 0x0000000000401b9a <+602>: mov %rsi,%rdx 0x0000000000401b9d <+605>: nopl (%rax) 0x0000000000401ba0 <+608>: crc32q (%rdx),%rax 0x0000000000401ba6 <+614>: crc32q 0x8(%rdx),%rax 0x0000000000401bad <+621>: crc32q 0x10(%rdx),%rax 0x0000000000401bb4 <+628>: crc32q 0x18(%rdx),%rax 0x0000000000401bbb <+635>: crc32q 0x20(%rdx),%rax 0x0000000000401bc2 <+642>: crc32q 0x28(%rdx),%rax 0x0000000000401bc9 <+649>: crc32q 0x30(%rdx),%rax 0x0000000000401bd0 <+656>: crc32q 0x38(%rdx),%rax 0x0000000000401bd7 <+663>: add $0x40,%rdx 0x0000000000401bdb <+667>: add $0x8,%rbx 0x0000000000401bdf <+671>: jne 0x401ba0 > I > don't understand the algorithm for joining crcs -- why doesn't it work > to reduce to 12 or 24 bytes in the main loop? It would, but I haven't implemented or tested that. You're welcome to do so and demonstrate an improvement. It does add more lookup table bloat, but perhaps we could just remove the 3x8k table =E2=80=94 I'm not su= re it adds any benefit over the 3x256 table. > Your benchmarks mainly give results for the <=3D 768 bytes where most of > the manual optimizations don't apply. 0x000400: asm:68 intrins:62 multitable:684 (ns per buf) 0x000800: asm:132 intrins:133 (ns per buf) 0x002000: asm:449 intrins:446 (ns per buf) 0x008000: asm:1501 intrins:1497 (ns per buf) 0x020000: asm:5618 intrins:5609 (ns per buf) (All routines are in a separate compilation unit with no full-program optimization, as they are in the kernel.) > Compiler optimizations are more > likely to help there. So I looked more closely at the last 2 loop. > clang indeed only unrolls the last one, Not in 3.9.1. > only for the unreachable case > with more than 8 bytes on amd64. How is it unreachable? Best, Conrad From owner-svn-src-all@freebsd.org Tue Jan 31 18:54:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 454C2CCA186; Tue, 31 Jan 2017 18:54:15 +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 EF678F0; Tue, 31 Jan 2017 18:54:14 +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 v0VIsEZV021095; Tue, 31 Jan 2017 18:54:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VIsEUO021094; Tue, 31 Jan 2017 18:54:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201701311854.v0VIsEUO021094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 31 Jan 2017 18:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313020 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 18:54:15 -0000 Author: jhb Date: Tue Jan 31 18:54:13 2017 New Revision: 313020 URL: https://svnweb.freebsd.org/changeset/base/313020 Log: Fix a couple of issues with t4iov probe and attach. - Check for Chelsio vendor ID in probe routines. - Fail attach instead of faulting if pci_find_dbsf() doesn't find a device. PR: 216539 Reported by: asomers Tested by: Dave Baukus MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_iov.c Modified: head/sys/dev/cxgbe/t4_iov.c ============================================================================== --- head/sys/dev/cxgbe/t4_iov.c Tue Jan 31 16:12:31 2017 (r313019) +++ head/sys/dev/cxgbe/t4_iov.c Tue Jan 31 18:54:13 2017 (r313020) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #endif +#include "common/common.h" #include "t4_if.h" struct t4iov_softc { @@ -106,6 +107,9 @@ t4iov_probe(device_t dev) uint16_t d; size_t i; + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + d = pci_get_device(dev); for (i = 0; i < nitems(t4iov_pciids); i++) { if (d == t4iov_pciids[i].device) { @@ -123,6 +127,9 @@ t5iov_probe(device_t dev) uint16_t d; size_t i; + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + d = pci_get_device(dev); for (i = 0; i < nitems(t5iov_pciids); i++) { if (d == t5iov_pciids[i].device) { @@ -140,6 +147,9 @@ t6iov_probe(device_t dev) uint16_t d; size_t i; + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + d = pci_get_device(dev); for (i = 0; i < nitems(t6iov_pciids); i++) { if (d == t6iov_pciids[i].device) { @@ -161,6 +171,8 @@ t4iov_attach(device_t dev) sc->sc_main = pci_find_dbsf(pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), 4); + if (sc->sc_main == NULL) + return (ENXIO); if (T4_IS_MAIN_READY(sc->sc_main) == 0) return (t4iov_attach_child(dev)); return (0); From owner-svn-src-all@freebsd.org Tue Jan 31 19:09:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B27A7CCA8CD; Tue, 31 Jan 2017 19:09:07 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82496D60; Tue, 31 Jan 2017 19:09:07 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VJ96bJ025648; Tue, 31 Jan 2017 19:09:06 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VJ964x025647; Tue, 31 Jan 2017 19:09:06 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201701311909.v0VJ964x025647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 31 Jan 2017 19:09:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313021 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 19:09:07 -0000 Author: brd (doc,ports committer) Date: Tue Jan 31 19:09:06 2017 New Revision: 313021 URL: https://svnweb.freebsd.org/changeset/base/313021 Log: Force a few variables to be upper case when they are evaulated. This allows specifying, for example: CLOUDWARE=vagrant-vmware Approved by: re (gjb) Modified: head/release/Makefile.vm Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Tue Jan 31 18:54:13 2017 (r313020) +++ head/release/Makefile.vm Tue Jan 31 19:09:06 2017 (r313021) @@ -58,8 +58,8 @@ cw-${_CW:tl}: env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ - -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW}_FORMAT} \ - -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW}IMAGE} -c ${${_CW}CONF} + -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ + -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}IMAGE} -c ${${_CW}CONF} touch ${.TARGET} cw${_CW:tl}-package: From owner-svn-src-all@freebsd.org Tue Jan 31 19:12:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9AFFCCAAC4; Tue, 31 Jan 2017 19:12:11 +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 80E9B1141; Tue, 31 Jan 2017 19:12:11 +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 v0VJCAuP028616; Tue, 31 Jan 2017 19:12:10 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VJCAb2028615; Tue, 31 Jan 2017 19:12:10 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701311912.v0VJCAb2028615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 31 Jan 2017 19:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r313022 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 19:12:11 -0000 Author: glebius Date: Tue Jan 31 19:12:10 2017 New Revision: 313022 URL: https://svnweb.freebsd.org/changeset/base/313022 Log: Add myself for tcpdump import. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Tue Jan 31 19:09:06 2017 (r313021) +++ svnadmin/conf/sizelimit.conf Tue Jan 31 19:12:10 2017 (r313022) @@ -27,3 +27,4 @@ np obrien peter rwatson +glebius From owner-svn-src-all@freebsd.org Tue Jan 31 19:12:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1AB4CCAB03; Tue, 31 Jan 2017 19:12:30 +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 6189412B1; Tue, 31 Jan 2017 19:12:30 +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 v0VJCTM9029407; Tue, 31 Jan 2017 19:12:29 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VJCTIK029405; Tue, 31 Jan 2017 19:12:29 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701311912.v0VJCTIK029405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 31 Jan 2017 19:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313023 - in vendor/tcpdump/4.9.0: . lbl missing tests win32 win32/prj win32/src X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 19:12:31 -0000 Author: glebius Date: Tue Jan 31 19:12:28 2017 New Revision: 313023 URL: https://svnweb.freebsd.org/changeset/base/313023 Log: Import tcpdump-4.9.0. Added: vendor/tcpdump/4.9.0/ vendor/tcpdump/4.9.0/CHANGES vendor/tcpdump/4.9.0/CONTRIBUTING vendor/tcpdump/4.9.0/CREDITS vendor/tcpdump/4.9.0/INSTALL.txt (contents, props changed) vendor/tcpdump/4.9.0/LICENSE vendor/tcpdump/4.9.0/Makefile-devel-adds (contents, props changed) vendor/tcpdump/4.9.0/Makefile.in (contents, props changed) vendor/tcpdump/4.9.0/PLATFORMS vendor/tcpdump/4.9.0/README (contents, props changed) vendor/tcpdump/4.9.0/README.md vendor/tcpdump/4.9.0/Readme.Win32 vendor/tcpdump/4.9.0/VERSION vendor/tcpdump/4.9.0/aclocal.m4 vendor/tcpdump/4.9.0/addrtoname.c (contents, props changed) vendor/tcpdump/4.9.0/addrtoname.h (contents, props changed) vendor/tcpdump/4.9.0/addrtostr.c (contents, props changed) vendor/tcpdump/4.9.0/addrtostr.h (contents, props changed) vendor/tcpdump/4.9.0/af.c (contents, props changed) vendor/tcpdump/4.9.0/af.h (contents, props changed) vendor/tcpdump/4.9.0/ah.h (contents, props changed) vendor/tcpdump/4.9.0/appletalk.h (contents, props changed) vendor/tcpdump/4.9.0/ascii_strcasecmp.c (contents, props changed) vendor/tcpdump/4.9.0/ascii_strcasecmp.h (contents, props changed) vendor/tcpdump/4.9.0/atime.awk (contents, props changed) vendor/tcpdump/4.9.0/atm.h (contents, props changed) vendor/tcpdump/4.9.0/bpf_dump.c (contents, props changed) vendor/tcpdump/4.9.0/chdlc.h (contents, props changed) vendor/tcpdump/4.9.0/checksum.c (contents, props changed) vendor/tcpdump/4.9.0/config.guess vendor/tcpdump/4.9.0/config.h.in (contents, props changed) vendor/tcpdump/4.9.0/config.sub vendor/tcpdump/4.9.0/configure (contents, props changed) vendor/tcpdump/4.9.0/configure.in (contents, props changed) vendor/tcpdump/4.9.0/cpack.c (contents, props changed) vendor/tcpdump/4.9.0/cpack.h (contents, props changed) vendor/tcpdump/4.9.0/ether.h (contents, props changed) vendor/tcpdump/4.9.0/ethertype.h (contents, props changed) vendor/tcpdump/4.9.0/extract.h (contents, props changed) vendor/tcpdump/4.9.0/getopt_long.h (contents, props changed) vendor/tcpdump/4.9.0/gmpls.c (contents, props changed) vendor/tcpdump/4.9.0/gmpls.h (contents, props changed) vendor/tcpdump/4.9.0/gmt2local.c (contents, props changed) vendor/tcpdump/4.9.0/gmt2local.h (contents, props changed) vendor/tcpdump/4.9.0/in_cksum.c (contents, props changed) vendor/tcpdump/4.9.0/install-sh (contents, props changed) vendor/tcpdump/4.9.0/interface.h (contents, props changed) vendor/tcpdump/4.9.0/ip.h (contents, props changed) vendor/tcpdump/4.9.0/ip6.h (contents, props changed) vendor/tcpdump/4.9.0/ipproto.c (contents, props changed) vendor/tcpdump/4.9.0/ipproto.h (contents, props changed) vendor/tcpdump/4.9.0/l2vpn.c (contents, props changed) vendor/tcpdump/4.9.0/l2vpn.h (contents, props changed) vendor/tcpdump/4.9.0/lbl/ vendor/tcpdump/4.9.0/lbl/os-osf4.h (contents, props changed) vendor/tcpdump/4.9.0/lbl/os-solaris2.h (contents, props changed) vendor/tcpdump/4.9.0/lbl/os-sunos4.h (contents, props changed) vendor/tcpdump/4.9.0/lbl/os-ultrix4.h (contents, props changed) vendor/tcpdump/4.9.0/llc.h (contents, props changed) vendor/tcpdump/4.9.0/machdep.c (contents, props changed) vendor/tcpdump/4.9.0/machdep.h (contents, props changed) vendor/tcpdump/4.9.0/makemib (contents, props changed) vendor/tcpdump/4.9.0/mib.h (contents, props changed) vendor/tcpdump/4.9.0/missing/ vendor/tcpdump/4.9.0/missing/datalinks.c (contents, props changed) vendor/tcpdump/4.9.0/missing/dlnames.c (contents, props changed) vendor/tcpdump/4.9.0/missing/getopt_long.c (contents, props changed) vendor/tcpdump/4.9.0/missing/snprintf.c (contents, props changed) vendor/tcpdump/4.9.0/missing/strdup.c (contents, props changed) vendor/tcpdump/4.9.0/missing/strlcat.c (contents, props changed) vendor/tcpdump/4.9.0/missing/strlcpy.c (contents, props changed) vendor/tcpdump/4.9.0/missing/strsep.c (contents, props changed) vendor/tcpdump/4.9.0/mkdep (contents, props changed) vendor/tcpdump/4.9.0/mpls.h (contents, props changed) vendor/tcpdump/4.9.0/nameser.h (contents, props changed) vendor/tcpdump/4.9.0/netdissect-stdinc.h (contents, props changed) vendor/tcpdump/4.9.0/netdissect.c (contents, props changed) vendor/tcpdump/4.9.0/netdissect.h (contents, props changed) vendor/tcpdump/4.9.0/nfs.h (contents, props changed) vendor/tcpdump/4.9.0/nfsfh.h (contents, props changed) vendor/tcpdump/4.9.0/nlpid.c (contents, props changed) vendor/tcpdump/4.9.0/nlpid.h (contents, props changed) vendor/tcpdump/4.9.0/openflow.h (contents, props changed) vendor/tcpdump/4.9.0/ospf.h (contents, props changed) vendor/tcpdump/4.9.0/oui.c (contents, props changed) vendor/tcpdump/4.9.0/oui.h (contents, props changed) vendor/tcpdump/4.9.0/packetdat.awk (contents, props changed) vendor/tcpdump/4.9.0/parsenfsfh.c (contents, props changed) vendor/tcpdump/4.9.0/pcap-missing.h (contents, props changed) vendor/tcpdump/4.9.0/pcap_dump_ftell.c (contents, props changed) vendor/tcpdump/4.9.0/ppp.h (contents, props changed) vendor/tcpdump/4.9.0/print-802_11.c (contents, props changed) vendor/tcpdump/4.9.0/print-802_15_4.c (contents, props changed) vendor/tcpdump/4.9.0/print-ah.c (contents, props changed) vendor/tcpdump/4.9.0/print-ahcp.c (contents, props changed) vendor/tcpdump/4.9.0/print-aodv.c (contents, props changed) vendor/tcpdump/4.9.0/print-aoe.c (contents, props changed) vendor/tcpdump/4.9.0/print-ap1394.c (contents, props changed) vendor/tcpdump/4.9.0/print-arcnet.c (contents, props changed) vendor/tcpdump/4.9.0/print-arp.c (contents, props changed) vendor/tcpdump/4.9.0/print-ascii.c (contents, props changed) vendor/tcpdump/4.9.0/print-atalk.c (contents, props changed) vendor/tcpdump/4.9.0/print-atm.c (contents, props changed) vendor/tcpdump/4.9.0/print-babel.c (contents, props changed) vendor/tcpdump/4.9.0/print-beep.c (contents, props changed) vendor/tcpdump/4.9.0/print-bfd.c (contents, props changed) vendor/tcpdump/4.9.0/print-bgp.c (contents, props changed) vendor/tcpdump/4.9.0/print-bootp.c (contents, props changed) vendor/tcpdump/4.9.0/print-bt.c (contents, props changed) vendor/tcpdump/4.9.0/print-calm-fast.c (contents, props changed) vendor/tcpdump/4.9.0/print-carp.c (contents, props changed) vendor/tcpdump/4.9.0/print-cdp.c (contents, props changed) vendor/tcpdump/4.9.0/print-cfm.c (contents, props changed) vendor/tcpdump/4.9.0/print-chdlc.c (contents, props changed) vendor/tcpdump/4.9.0/print-cip.c (contents, props changed) vendor/tcpdump/4.9.0/print-cnfp.c (contents, props changed) vendor/tcpdump/4.9.0/print-dccp.c (contents, props changed) vendor/tcpdump/4.9.0/print-decnet.c (contents, props changed) vendor/tcpdump/4.9.0/print-dhcp6.c (contents, props changed) vendor/tcpdump/4.9.0/print-domain.c (contents, props changed) vendor/tcpdump/4.9.0/print-dtp.c (contents, props changed) vendor/tcpdump/4.9.0/print-dvmrp.c (contents, props changed) vendor/tcpdump/4.9.0/print-eap.c (contents, props changed) vendor/tcpdump/4.9.0/print-egp.c (contents, props changed) vendor/tcpdump/4.9.0/print-eigrp.c (contents, props changed) vendor/tcpdump/4.9.0/print-enc.c (contents, props changed) vendor/tcpdump/4.9.0/print-esp.c (contents, props changed) vendor/tcpdump/4.9.0/print-ether.c (contents, props changed) vendor/tcpdump/4.9.0/print-fddi.c (contents, props changed) vendor/tcpdump/4.9.0/print-forces.c (contents, props changed) vendor/tcpdump/4.9.0/print-fr.c (contents, props changed) vendor/tcpdump/4.9.0/print-frag6.c (contents, props changed) vendor/tcpdump/4.9.0/print-ftp.c (contents, props changed) vendor/tcpdump/4.9.0/print-geneve.c (contents, props changed) vendor/tcpdump/4.9.0/print-geonet.c (contents, props changed) vendor/tcpdump/4.9.0/print-gre.c (contents, props changed) vendor/tcpdump/4.9.0/print-hncp.c (contents, props changed) vendor/tcpdump/4.9.0/print-hsrp.c (contents, props changed) vendor/tcpdump/4.9.0/print-http.c (contents, props changed) vendor/tcpdump/4.9.0/print-icmp.c (contents, props changed) vendor/tcpdump/4.9.0/print-icmp6.c (contents, props changed) vendor/tcpdump/4.9.0/print-igmp.c (contents, props changed) vendor/tcpdump/4.9.0/print-igrp.c (contents, props changed) vendor/tcpdump/4.9.0/print-ip.c (contents, props changed) vendor/tcpdump/4.9.0/print-ip6.c (contents, props changed) vendor/tcpdump/4.9.0/print-ip6opts.c (contents, props changed) vendor/tcpdump/4.9.0/print-ipcomp.c (contents, props changed) vendor/tcpdump/4.9.0/print-ipfc.c (contents, props changed) vendor/tcpdump/4.9.0/print-ipnet.c (contents, props changed) vendor/tcpdump/4.9.0/print-ipx.c (contents, props changed) vendor/tcpdump/4.9.0/print-isakmp.c (contents, props changed) vendor/tcpdump/4.9.0/print-isoclns.c (contents, props changed) vendor/tcpdump/4.9.0/print-juniper.c (contents, props changed) vendor/tcpdump/4.9.0/print-krb.c (contents, props changed) vendor/tcpdump/4.9.0/print-l2tp.c (contents, props changed) vendor/tcpdump/4.9.0/print-lane.c (contents, props changed) vendor/tcpdump/4.9.0/print-ldp.c (contents, props changed) vendor/tcpdump/4.9.0/print-lisp.c (contents, props changed) vendor/tcpdump/4.9.0/print-llc.c (contents, props changed) vendor/tcpdump/4.9.0/print-lldp.c (contents, props changed) vendor/tcpdump/4.9.0/print-lmp.c (contents, props changed) vendor/tcpdump/4.9.0/print-loopback.c (contents, props changed) vendor/tcpdump/4.9.0/print-lspping.c (contents, props changed) vendor/tcpdump/4.9.0/print-lwapp.c (contents, props changed) vendor/tcpdump/4.9.0/print-lwres.c (contents, props changed) vendor/tcpdump/4.9.0/print-m3ua.c (contents, props changed) vendor/tcpdump/4.9.0/print-medsa.c (contents, props changed) vendor/tcpdump/4.9.0/print-mobile.c (contents, props changed) vendor/tcpdump/4.9.0/print-mobility.c (contents, props changed) vendor/tcpdump/4.9.0/print-mpcp.c (contents, props changed) vendor/tcpdump/4.9.0/print-mpls.c (contents, props changed) vendor/tcpdump/4.9.0/print-mptcp.c (contents, props changed) vendor/tcpdump/4.9.0/print-msdp.c (contents, props changed) vendor/tcpdump/4.9.0/print-msnlb.c (contents, props changed) vendor/tcpdump/4.9.0/print-nflog.c (contents, props changed) vendor/tcpdump/4.9.0/print-nfs.c (contents, props changed) vendor/tcpdump/4.9.0/print-nsh.c (contents, props changed) vendor/tcpdump/4.9.0/print-ntp.c (contents, props changed) vendor/tcpdump/4.9.0/print-null.c (contents, props changed) vendor/tcpdump/4.9.0/print-olsr.c (contents, props changed) vendor/tcpdump/4.9.0/print-openflow-1.0.c (contents, props changed) vendor/tcpdump/4.9.0/print-openflow.c (contents, props changed) vendor/tcpdump/4.9.0/print-ospf.c (contents, props changed) vendor/tcpdump/4.9.0/print-ospf6.c (contents, props changed) vendor/tcpdump/4.9.0/print-otv.c (contents, props changed) vendor/tcpdump/4.9.0/print-pflog.c (contents, props changed) vendor/tcpdump/4.9.0/print-pgm.c (contents, props changed) vendor/tcpdump/4.9.0/print-pim.c (contents, props changed) vendor/tcpdump/4.9.0/print-pktap.c (contents, props changed) vendor/tcpdump/4.9.0/print-ppi.c (contents, props changed) vendor/tcpdump/4.9.0/print-ppp.c (contents, props changed) vendor/tcpdump/4.9.0/print-pppoe.c (contents, props changed) vendor/tcpdump/4.9.0/print-pptp.c (contents, props changed) vendor/tcpdump/4.9.0/print-radius.c (contents, props changed) vendor/tcpdump/4.9.0/print-raw.c (contents, props changed) vendor/tcpdump/4.9.0/print-resp.c (contents, props changed) vendor/tcpdump/4.9.0/print-rip.c (contents, props changed) vendor/tcpdump/4.9.0/print-ripng.c (contents, props changed) vendor/tcpdump/4.9.0/print-rpki-rtr.c (contents, props changed) vendor/tcpdump/4.9.0/print-rrcp.c (contents, props changed) vendor/tcpdump/4.9.0/print-rsvp.c (contents, props changed) vendor/tcpdump/4.9.0/print-rt6.c (contents, props changed) vendor/tcpdump/4.9.0/print-rtsp.c (contents, props changed) vendor/tcpdump/4.9.0/print-rx.c (contents, props changed) vendor/tcpdump/4.9.0/print-sctp.c (contents, props changed) vendor/tcpdump/4.9.0/print-sflow.c (contents, props changed) vendor/tcpdump/4.9.0/print-sip.c (contents, props changed) vendor/tcpdump/4.9.0/print-sl.c (contents, props changed) vendor/tcpdump/4.9.0/print-sll.c (contents, props changed) vendor/tcpdump/4.9.0/print-slow.c (contents, props changed) vendor/tcpdump/4.9.0/print-smb.c (contents, props changed) vendor/tcpdump/4.9.0/print-smtp.c (contents, props changed) vendor/tcpdump/4.9.0/print-snmp.c (contents, props changed) vendor/tcpdump/4.9.0/print-stp.c (contents, props changed) vendor/tcpdump/4.9.0/print-sunatm.c (contents, props changed) vendor/tcpdump/4.9.0/print-sunrpc.c (contents, props changed) vendor/tcpdump/4.9.0/print-symantec.c (contents, props changed) vendor/tcpdump/4.9.0/print-syslog.c (contents, props changed) vendor/tcpdump/4.9.0/print-tcp.c (contents, props changed) vendor/tcpdump/4.9.0/print-telnet.c (contents, props changed) vendor/tcpdump/4.9.0/print-tftp.c (contents, props changed) vendor/tcpdump/4.9.0/print-timed.c (contents, props changed) vendor/tcpdump/4.9.0/print-tipc.c (contents, props changed) vendor/tcpdump/4.9.0/print-token.c (contents, props changed) vendor/tcpdump/4.9.0/print-udld.c (contents, props changed) vendor/tcpdump/4.9.0/print-udp.c (contents, props changed) vendor/tcpdump/4.9.0/print-usb.c (contents, props changed) vendor/tcpdump/4.9.0/print-vjc.c (contents, props changed) vendor/tcpdump/4.9.0/print-vqp.c (contents, props changed) vendor/tcpdump/4.9.0/print-vrrp.c (contents, props changed) vendor/tcpdump/4.9.0/print-vtp.c (contents, props changed) vendor/tcpdump/4.9.0/print-vxlan-gpe.c (contents, props changed) vendor/tcpdump/4.9.0/print-vxlan.c (contents, props changed) vendor/tcpdump/4.9.0/print-wb.c (contents, props changed) vendor/tcpdump/4.9.0/print-zephyr.c (contents, props changed) vendor/tcpdump/4.9.0/print-zeromq.c (contents, props changed) vendor/tcpdump/4.9.0/print.c (contents, props changed) vendor/tcpdump/4.9.0/print.h (contents, props changed) vendor/tcpdump/4.9.0/rpc_auth.h (contents, props changed) vendor/tcpdump/4.9.0/rpc_msg.h (contents, props changed) vendor/tcpdump/4.9.0/rpl.h (contents, props changed) vendor/tcpdump/4.9.0/send-ack.awk (contents, props changed) vendor/tcpdump/4.9.0/setsignal.c (contents, props changed) vendor/tcpdump/4.9.0/setsignal.h (contents, props changed) vendor/tcpdump/4.9.0/signature.c (contents, props changed) vendor/tcpdump/4.9.0/signature.h (contents, props changed) vendor/tcpdump/4.9.0/slcompress.h (contents, props changed) vendor/tcpdump/4.9.0/smb.h (contents, props changed) vendor/tcpdump/4.9.0/smbutil.c (contents, props changed) vendor/tcpdump/4.9.0/stime.awk (contents, props changed) vendor/tcpdump/4.9.0/strtoaddr.c (contents, props changed) vendor/tcpdump/4.9.0/strtoaddr.h (contents, props changed) vendor/tcpdump/4.9.0/tcp.h (contents, props changed) vendor/tcpdump/4.9.0/tcpdump.1.in (contents, props changed) vendor/tcpdump/4.9.0/tcpdump.c (contents, props changed) vendor/tcpdump/4.9.0/tests/ vendor/tcpdump/4.9.0/tests/02-sunrise-sunset-esp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/08-sunrise-sunset-aes.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/08-sunrise-sunset-esp2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/3560_CDP.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/802.1D_spanning_tree.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/802.1w_rapid_STP.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/AoE_Linux.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/DECnet_Phone.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/DTP.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/EIGRP_adjacency.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/EIGRP_goodbye.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/EIGRP_subnet_down.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/EIGRP_subnet_up.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/HDLC.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/HSRP_coup.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/HSRP_election.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/HSRP_failover.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/IGMP_V1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/IGMP_V2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ISAKMP_sa_setup.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ISIS_external_lsp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ISIS_level1_adjacency.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ISIS_level2_adjacency.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ISIS_p2p_adjacency.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/LACP.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/LLDP_and_CDP.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/MSTP_Intra-Region_BPDUs.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/OLSRv1_HNA_sgw_1.out vendor/tcpdump/4.9.0/tests/OLSRv1_HNA_sgw_1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/OSPFv3_NBMA_adjacencies.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/OSPFv3_broadcast_adjacency.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/OSPFv3_multipoint_adjacencies.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/OSPFv3_with_AH.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/PIM-DM_pruning.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/PIM-SM_join_prune.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/PIM_register_register-stop.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/PIMv2_bootstrap.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/PIMv2_hellos.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/QinQpacket.out vendor/tcpdump/4.9.0/tests/QinQpacket.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/QinQpacketv.out vendor/tcpdump/4.9.0/tests/RADIUS-RFC4675.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/RADIUS-RFC5176.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/RADIUS-port1700.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/RADIUS.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/TESTLIST vendor/tcpdump/4.9.0/tests/TESTonce (contents, props changed) vendor/tcpdump/4.9.0/tests/TESTrun.sh (contents, props changed) vendor/tcpdump/4.9.0/tests/UDLD.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/aarp-heapoverflow-1.out vendor/tcpdump/4.9.0/tests/aarp-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/aarp-heapoverflow-2.out vendor/tcpdump/4.9.0/tests/aarp-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ahcp-vv.out vendor/tcpdump/4.9.0/tests/ahcp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/aoe_1-v.out vendor/tcpdump/4.9.0/tests/aoe_1.out vendor/tcpdump/4.9.0/tests/arp-too-long-tha.out vendor/tcpdump/4.9.0/tests/arp-too-long-tha.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/atm-heapoverflow.out vendor/tcpdump/4.9.0/tests/atm-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/atm-oam-heapoverflow.out vendor/tcpdump/4.9.0/tests/atm-oam-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/babel.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/babel1.out vendor/tcpdump/4.9.0/tests/babel1v.out vendor/tcpdump/4.9.0/tests/babel_auth.out vendor/tcpdump/4.9.0/tests/babel_auth.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/babel_pad1.out vendor/tcpdump/4.9.0/tests/babel_pad1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/babel_rtt.out vendor/tcpdump/4.9.0/tests/babel_rtt.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/bad-ipv4-version-pgm-heapoverflow.out vendor/tcpdump/4.9.0/tests/bad-ipv4-version-pgm-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/bfd-raw-auth-md5-v.out vendor/tcpdump/4.9.0/tests/bfd-raw-auth-md5.out vendor/tcpdump/4.9.0/tests/bfd-raw-auth-md5.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/bfd-raw-auth-sha1-v.out vendor/tcpdump/4.9.0/tests/bfd-raw-auth-sha1.out vendor/tcpdump/4.9.0/tests/bfd-raw-auth-sha1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/bfd-raw-auth-simple-v.out vendor/tcpdump/4.9.0/tests/bfd-raw-auth-simple.out vendor/tcpdump/4.9.0/tests/bfd-raw-auth-simple.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/bgp-aigp.out vendor/tcpdump/4.9.0/tests/bgp-aigp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/bgp-infinite-loop.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/bgp-large-community.out vendor/tcpdump/4.9.0/tests/bgp-large-community.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/bgp_infloop-v.out vendor/tcpdump/4.9.0/tests/bgp_vpn_attrset.out vendor/tcpdump/4.9.0/tests/bgp_vpn_attrset.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/calm-fast-mac-lookup-heapoverflow.out vendor/tcpdump/4.9.0/tests/calm-fast-mac-lookup-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/cdp-v.out vendor/tcpdump/4.9.0/tests/chdlc-slarp-short.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/chdlc-slarp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/crypto.sh (contents, props changed) vendor/tcpdump/4.9.0/tests/cve-2014-8767-OLSR.out vendor/tcpdump/4.9.0/tests/cve-2014-8767-OLSR.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/cve-2014-8768-Geonet.out vendor/tcpdump/4.9.0/tests/cve-2014-8768-Geonet.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/cve-2014-8769-AODV.out vendor/tcpdump/4.9.0/tests/cve-2014-8769-AODV.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/cve2015-0261-crash.out vendor/tcpdump/4.9.0/tests/cve2015-0261-crash.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/cve2015-0261-ipv6.out vendor/tcpdump/4.9.0/tests/cve2015-0261-ipv6.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dcb_ets.out vendor/tcpdump/4.9.0/tests/dcb_ets.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dcb_pfc.out vendor/tcpdump/4.9.0/tests/dcb_pfc.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dcb_qcn.out vendor/tcpdump/4.9.0/tests/dcb_qcn.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dccp_partial_csum_v4_longer.out vendor/tcpdump/4.9.0/tests/dccp_partial_csum_v4_longer.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dccp_partial_csum_v4_simple.out vendor/tcpdump/4.9.0/tests/dccp_partial_csum_v4_simple.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dccp_partial_csum_v6_longer.out vendor/tcpdump/4.9.0/tests/dccp_partial_csum_v6_longer.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dccp_partial_csum_v6_simple.out vendor/tcpdump/4.9.0/tests/dccp_partial_csum_v6_simple.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/decnet.out vendor/tcpdump/4.9.0/tests/dhcp-mud.out vendor/tcpdump/4.9.0/tests/dhcp-mud.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcp-rfc3004-v.out vendor/tcpdump/4.9.0/tests/dhcp-rfc3004.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcp-rfc5859-v.out vendor/tcpdump/4.9.0/tests/dhcp-rfc5859.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcpv6-AFTR-Name-RFC6334.out vendor/tcpdump/4.9.0/tests/dhcpv6-AFTR-Name-RFC6334.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcpv6-domain-list.out vendor/tcpdump/4.9.0/tests/dhcpv6-domain-list.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcpv6-ia-na.out vendor/tcpdump/4.9.0/tests/dhcpv6-ia-na.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcpv6-ia-pd.out vendor/tcpdump/4.9.0/tests/dhcpv6-ia-pd.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcpv6-ia-ta.out vendor/tcpdump/4.9.0/tests/dhcpv6-ia-ta.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcpv6-mud.out vendor/tcpdump/4.9.0/tests/dhcpv6-mud.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcpv6-ntp-server.out vendor/tcpdump/4.9.0/tests/dhcpv6-ntp-server.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dhcpv6-sip-server-d.out vendor/tcpdump/4.9.0/tests/dhcpv6-sip-server-d.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dnssec-vv.out vendor/tcpdump/4.9.0/tests/dnssec.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/dtp-v.out vendor/tcpdump/4.9.0/tests/dvmrp.out vendor/tcpdump/4.9.0/tests/e1000g.out vendor/tcpdump/4.9.0/tests/e1000g.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/eapon1.gdbinit vendor/tcpdump/4.9.0/tests/eapon1.out vendor/tcpdump/4.9.0/tests/eapon1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/eigrp1-v.out vendor/tcpdump/4.9.0/tests/eigrp2-v.out vendor/tcpdump/4.9.0/tests/eigrp3-v.out vendor/tcpdump/4.9.0/tests/eigrp4-v.out vendor/tcpdump/4.9.0/tests/epgm_zmtp1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/epgm_zmtp1v.out vendor/tcpdump/4.9.0/tests/epgmv.out vendor/tcpdump/4.9.0/tests/esp-secrets.txt (contents, props changed) vendor/tcpdump/4.9.0/tests/esp0.out vendor/tcpdump/4.9.0/tests/esp1.gdbinit vendor/tcpdump/4.9.0/tests/esp1.out vendor/tcpdump/4.9.0/tests/esp2.gdbinit vendor/tcpdump/4.9.0/tests/esp2.out vendor/tcpdump/4.9.0/tests/esp3.gdbinit vendor/tcpdump/4.9.0/tests/esp4.gdbinit vendor/tcpdump/4.9.0/tests/esp5.gdbinit vendor/tcpdump/4.9.0/tests/esp5.out vendor/tcpdump/4.9.0/tests/espudp1.out vendor/tcpdump/4.9.0/tests/espudp1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/evb.out vendor/tcpdump/4.9.0/tests/evb.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/forces1.out vendor/tcpdump/4.9.0/tests/forces1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/forces1vvv.out vendor/tcpdump/4.9.0/tests/forces1vvvv.out vendor/tcpdump/4.9.0/tests/forces2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/forces2v.out vendor/tcpdump/4.9.0/tests/forces2vv.out vendor/tcpdump/4.9.0/tests/forces2vvv.out vendor/tcpdump/4.9.0/tests/forces3.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/forces3vvv.out vendor/tcpdump/4.9.0/tests/frf15-heapoverflow.out vendor/tcpdump/4.9.0/tests/frf15-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/geneve-tcp.out vendor/tcpdump/4.9.0/tests/geneve-vni.out vendor/tcpdump/4.9.0/tests/geneve-vv.out vendor/tcpdump/4.9.0/tests/geneve.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/geonet-mac-lookup-heapoverflow.out vendor/tcpdump/4.9.0/tests/geonet-mac-lookup-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/geonet_and_calm_fast.out vendor/tcpdump/4.9.0/tests/geonet_and_calm_fast.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/gre-heapoverflow-1.out vendor/tcpdump/4.9.0/tests/gre-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/gre-heapoverflow-2.out vendor/tcpdump/4.9.0/tests/gre-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/hdlc1.out vendor/tcpdump/4.9.0/tests/hdlc2.out vendor/tcpdump/4.9.0/tests/hdlc3.out vendor/tcpdump/4.9.0/tests/hdlc4.out vendor/tcpdump/4.9.0/tests/hdlc_slarp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heap-overflow-1.out vendor/tcpdump/4.9.0/tests/heap-overflow-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heap-overflow-2.out vendor/tcpdump/4.9.0/tests/heap-overflow-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heapoverflow-EXTRACT_16BITS.out vendor/tcpdump/4.9.0/tests/heapoverflow-EXTRACT_16BITS.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heapoverflow-atalk_print.out vendor/tcpdump/4.9.0/tests/heapoverflow-atalk_print.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heapoverflow-in_checksum.out vendor/tcpdump/4.9.0/tests/heapoverflow-in_checksum.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heapoverflow-ip_print_demux.out vendor/tcpdump/4.9.0/tests/heapoverflow-ip_print_demux.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heapoverflow-ppp_hdlc_if_print.out vendor/tcpdump/4.9.0/tests/heapoverflow-ppp_hdlc_if_print.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heapoverflow-q933_printq.out vendor/tcpdump/4.9.0/tests/heapoverflow-q933_printq.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heapoverflow-sl_if_print.out vendor/tcpdump/4.9.0/tests/heapoverflow-sl_if_print.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/heapoverflow-tcp_print.out vendor/tcpdump/4.9.0/tests/heapoverflow-tcp_print.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/hncp.out vendor/tcpdump/4.9.0/tests/hncp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/hsrp_1-v.out vendor/tcpdump/4.9.0/tests/hsrp_1.out vendor/tcpdump/4.9.0/tests/hsrp_2-v.out vendor/tcpdump/4.9.0/tests/hsrp_3-v.out vendor/tcpdump/4.9.0/tests/icmpv6.out vendor/tcpdump/4.9.0/tests/icmpv6.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/icmpv6_opt24-v.out vendor/tcpdump/4.9.0/tests/icmpv6_opt24.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ieee802.11_exthdr.out vendor/tcpdump/4.9.0/tests/ieee802.11_exthdr.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ieee802.11_rx-stbc.out vendor/tcpdump/4.9.0/tests/ieee802.11_rx-stbc.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/igmpv1.out vendor/tcpdump/4.9.0/tests/igmpv2.out vendor/tcpdump/4.9.0/tests/igmpv3-queries.out vendor/tcpdump/4.9.0/tests/igmpv3-queries.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ikev2four.out vendor/tcpdump/4.9.0/tests/ikev2four.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ikev2fourv.out vendor/tcpdump/4.9.0/tests/ikev2fourv4.out vendor/tcpdump/4.9.0/tests/ikev2pI2-secrets.txt (contents, props changed) vendor/tcpdump/4.9.0/tests/ikev2pI2-segfault-v.out vendor/tcpdump/4.9.0/tests/ikev2pI2-segfault.out vendor/tcpdump/4.9.0/tests/ikev2pI2-segfault.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ikev2pI2.out vendor/tcpdump/4.9.0/tests/ikev2pI2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ipcomp-heapoverflow.out vendor/tcpdump/4.9.0/tests/ipcomp-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ipv6-bad-version.out vendor/tcpdump/4.9.0/tests/ipv6-bad-version.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ipv6-routing-header.out vendor/tcpdump/4.9.0/tests/ipv6-routing-header.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ipv6hdr-heapoverflow-v.out vendor/tcpdump/4.9.0/tests/ipv6hdr-heapoverflow.out vendor/tcpdump/4.9.0/tests/ipv6hdr-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isakmp-delete-segfault.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isakmp-identification-segfault.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isakmp-pointer-loop.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isakmp1.out vendor/tcpdump/4.9.0/tests/isakmp2.out vendor/tcpdump/4.9.0/tests/isakmp3.out vendor/tcpdump/4.9.0/tests/isakmp4.out vendor/tcpdump/4.9.0/tests/isakmp4500.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isakmp5-v.out vendor/tcpdump/4.9.0/tests/isis-infinite-loop.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isis-seg-fault-1-v.out vendor/tcpdump/4.9.0/tests/isis-seg-fault-1-v.sh (contents, props changed) vendor/tcpdump/4.9.0/tests/isis-seg-fault-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isis-seg-fault-2-v.out vendor/tcpdump/4.9.0/tests/isis-seg-fault-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isis-seg-fault-3-v.out vendor/tcpdump/4.9.0/tests/isis-seg-fault-3.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isis_1-v.out vendor/tcpdump/4.9.0/tests/isis_1.out vendor/tcpdump/4.9.0/tests/isis_2-v.out vendor/tcpdump/4.9.0/tests/isis_3-v.out vendor/tcpdump/4.9.0/tests/isis_4-v.out vendor/tcpdump/4.9.0/tests/isis_infloop-v.out vendor/tcpdump/4.9.0/tests/isis_poi.out vendor/tcpdump/4.9.0/tests/isis_poi.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isis_poi2.out vendor/tcpdump/4.9.0/tests/isis_poi2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isoclns-heapoverflow-2.out vendor/tcpdump/4.9.0/tests/isoclns-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isoclns-heapoverflow-3.out vendor/tcpdump/4.9.0/tests/isoclns-heapoverflow-3.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isoclns-heapoverflow.out vendor/tcpdump/4.9.0/tests/isoclns-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isup.out vendor/tcpdump/4.9.0/tests/isup.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/isupvv.out vendor/tcpdump/4.9.0/tests/juniper_header-heapoverflow.out vendor/tcpdump/4.9.0/tests/juniper_header-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/kday1.out vendor/tcpdump/4.9.0/tests/kday1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/kday2.out vendor/tcpdump/4.9.0/tests/kday2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/kday3.out vendor/tcpdump/4.9.0/tests/kday3.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/kday4.out vendor/tcpdump/4.9.0/tests/kday4.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/kday5.out vendor/tcpdump/4.9.0/tests/kday5.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/kday6.out vendor/tcpdump/4.9.0/tests/kday6.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/kday7.out vendor/tcpdump/4.9.0/tests/kday7.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/kday8.out vendor/tcpdump/4.9.0/tests/kday8.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/lacp-ev.out vendor/tcpdump/4.9.0/tests/ldp-infinite-loop.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ldp_infloop.out vendor/tcpdump/4.9.0/tests/lisp_eid_notify.out vendor/tcpdump/4.9.0/tests/lisp_eid_notify.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/lisp_eid_register.out vendor/tcpdump/4.9.0/tests/lisp_eid_register.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/lisp_ipv6.out vendor/tcpdump/4.9.0/tests/lisp_ipv6.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/llc-xid-heapoverflow.out vendor/tcpdump/4.9.0/tests/llc-xid-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/lldp_cdp-ev.out vendor/tcpdump/4.9.0/tests/lldp_mudurl-v.out vendor/tcpdump/4.9.0/tests/lldp_mudurl-vv.out vendor/tcpdump/4.9.0/tests/lldp_mudurl.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/lmp-v.out vendor/tcpdump/4.9.0/tests/lmp-v.sh (contents, props changed) vendor/tcpdump/4.9.0/tests/lmp.out vendor/tcpdump/4.9.0/tests/lmp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/loopback.out vendor/tcpdump/4.9.0/tests/loopback.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/lspping-fec-ldp-v.out vendor/tcpdump/4.9.0/tests/lspping-fec-ldp-vv.out vendor/tcpdump/4.9.0/tests/lspping-fec-ldp.out vendor/tcpdump/4.9.0/tests/lspping-fec-ldp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/lspping-fec-rsvp-v.out vendor/tcpdump/4.9.0/tests/lspping-fec-rsvp-vv.out vendor/tcpdump/4.9.0/tests/lspping-fec-rsvp.out vendor/tcpdump/4.9.0/tests/lspping-fec-rsvp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/medsa-e.out vendor/tcpdump/4.9.0/tests/medsa.out vendor/tcpdump/4.9.0/tests/medsa.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/mpbgp-linklocal-nexthop.out vendor/tcpdump/4.9.0/tests/mpbgp-linklocal-nexthop.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/mpls-label-heapoverflow.out vendor/tcpdump/4.9.0/tests/mpls-label-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/mpls-ldp-hello.out vendor/tcpdump/4.9.0/tests/mpls-ldp-hello.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/mpls-traceroute-v.out vendor/tcpdump/4.9.0/tests/mpls-traceroute.out vendor/tcpdump/4.9.0/tests/mpls-traceroute.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/mptcp-fclose.out vendor/tcpdump/4.9.0/tests/mptcp-fclose.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/mptcp.out vendor/tcpdump/4.9.0/tests/mptcp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/mrinfo_query.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/msnlb.out vendor/tcpdump/4.9.0/tests/msnlb.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/msnlb2.out vendor/tcpdump/4.9.0/tests/msnlb2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/mstp-v.out vendor/tcpdump/4.9.0/tests/mtrace.out vendor/tcpdump/4.9.0/tests/mtrace.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/nflog-e.out vendor/tcpdump/4.9.0/tests/nflog-e.sh (contents, props changed) vendor/tcpdump/4.9.0/tests/nflog.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/nfs-seg-fault-1.out vendor/tcpdump/4.9.0/tests/nfs-seg-fault-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/nsh-over-vxlan-gpe-v.out vendor/tcpdump/4.9.0/tests/nsh-over-vxlan-gpe-vv.out vendor/tcpdump/4.9.0/tests/nsh-over-vxlan-gpe-vvv.out vendor/tcpdump/4.9.0/tests/nsh-over-vxlan-gpe.out vendor/tcpdump/4.9.0/tests/nsh-over-vxlan-gpe.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/of10_7050q-v.out vendor/tcpdump/4.9.0/tests/of10_7050q.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/of10_7050sx_bsn-vv.out vendor/tcpdump/4.9.0/tests/of10_7050sx_bsn.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/of10_p3295-vv.out vendor/tcpdump/4.9.0/tests/of10_p3295.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/of10_pf5240-vv.out vendor/tcpdump/4.9.0/tests/of10_pf5240.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/of10_s4810-vvvv.out vendor/tcpdump/4.9.0/tests/of10_s4810.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ospf-gmpls.out vendor/tcpdump/4.9.0/tests/ospf-gmpls.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ospf2-seg-fault-1-v.out vendor/tcpdump/4.9.0/tests/ospf2-seg-fault-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ospf3_ah-vv.out vendor/tcpdump/4.9.0/tests/ospf3_auth-vv.out vendor/tcpdump/4.9.0/tests/ospf3_auth.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ospf3_bc-vv.out vendor/tcpdump/4.9.0/tests/ospf3_mp-vv.out vendor/tcpdump/4.9.0/tests/ospf3_nbma-vv.out vendor/tcpdump/4.9.0/tests/otv-heapoverflow-1.out vendor/tcpdump/4.9.0/tests/otv-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/otv-heapoverflow-2.out vendor/tcpdump/4.9.0/tests/otv-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/pcap-invalid-version-1.out vendor/tcpdump/4.9.0/tests/pcap-invalid-version-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/pcap-invalid-version-2.out vendor/tcpdump/4.9.0/tests/pcap-invalid-version-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/pcap-ng-invalid-vers-1.out vendor/tcpdump/4.9.0/tests/pcap-ng-invalid-vers-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/pcap-ng-invalid-vers-2.out vendor/tcpdump/4.9.0/tests/pcap-ng-invalid-vers-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/pgm_zmtp1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/pgm_zmtp1v.out vendor/tcpdump/4.9.0/tests/pgmv.out vendor/tcpdump/4.9.0/tests/pimv2_bootstrap-v.out vendor/tcpdump/4.9.0/tests/pimv2_dm-v.out vendor/tcpdump/4.9.0/tests/pimv2_hellos-v.out vendor/tcpdump/4.9.0/tests/pimv2_register-v.out vendor/tcpdump/4.9.0/tests/pimv2_sm-v.out vendor/tcpdump/4.9.0/tests/pppoe.out vendor/tcpdump/4.9.0/tests/pppoe.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/pppoes.out vendor/tcpdump/4.9.0/tests/pppoes.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/pppoes_id.out vendor/tcpdump/4.9.0/tests/print-A.out vendor/tcpdump/4.9.0/tests/print-AA.out vendor/tcpdump/4.9.0/tests/print-capX.out vendor/tcpdump/4.9.0/tests/print-capXX.out vendor/tcpdump/4.9.0/tests/print-flags.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/print-x.out vendor/tcpdump/4.9.0/tests/print-xx.out vendor/tcpdump/4.9.0/tests/q933-heapoverflow-2.out vendor/tcpdump/4.9.0/tests/q933-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/radiotap-heapoverflow.out vendor/tcpdump/4.9.0/tests/radiotap-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/radius-port1700-v.out vendor/tcpdump/4.9.0/tests/radius-rfc4675-v.out vendor/tcpdump/4.9.0/tests/radius-rfc5176-v.out vendor/tcpdump/4.9.0/tests/radius-v.out vendor/tcpdump/4.9.0/tests/relts-0x80000000.out vendor/tcpdump/4.9.0/tests/relts-0x80000000.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/resp_1.out vendor/tcpdump/4.9.0/tests/resp_1_benchmark.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/resp_2.out vendor/tcpdump/4.9.0/tests/resp_2_inline.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/resp_3.out vendor/tcpdump/4.9.0/tests/resp_3_malicious.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ripv1v2.out vendor/tcpdump/4.9.0/tests/ripv1v2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/ripv2_auth.out vendor/tcpdump/4.9.0/tests/ripv2_auth.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/rpl-14-dao.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/rpl-14-daovvv.out vendor/tcpdump/4.9.0/tests/rpl-19-pickdag.out vendor/tcpdump/4.9.0/tests/rpl-19-pickdag.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/rpl-19-pickdagvvv.out vendor/tcpdump/4.9.0/tests/rpl-26-senddaoack.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/rpl-26-senddaovv.out vendor/tcpdump/4.9.0/tests/rpvst-v.out vendor/tcpdump/4.9.0/tests/rpvstp-trunk-native-vid5.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/rstp-v.out vendor/tcpdump/4.9.0/tests/rsvp-inf-loop-2-v.out vendor/tcpdump/4.9.0/tests/rsvp-inf-loop-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/rsvp-infinite-loop.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/rsvp_infloop-v.out vendor/tcpdump/4.9.0/tests/rtp-seg-fault-1.out vendor/tcpdump/4.9.0/tests/rtp-seg-fault-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/rtp-seg-fault-2.out vendor/tcpdump/4.9.0/tests/rtp-seg-fault-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/scps_invalid.out vendor/tcpdump/4.9.0/tests/scps_invalid.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/sflow_multiple_counter_30_pdus-nv.out vendor/tcpdump/4.9.0/tests/sflow_multiple_counter_30_pdus.out vendor/tcpdump/4.9.0/tests/sflow_multiple_counter_30_pdus.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/snmp-heapoverflow-1.out vendor/tcpdump/4.9.0/tests/snmp-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/snmp-heapoverflow-2.out vendor/tcpdump/4.9.0/tests/snmp-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/spb.out vendor/tcpdump/4.9.0/tests/spb.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/spb_bpduv4-v.out vendor/tcpdump/4.9.0/tests/spb_bpduv4.out vendor/tcpdump/4.9.0/tests/spb_bpduv4.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/stp-heapoverflow-1.out vendor/tcpdump/4.9.0/tests/stp-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/stp-heapoverflow-2.out vendor/tcpdump/4.9.0/tests/stp-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/stp-heapoverflow-3.out vendor/tcpdump/4.9.0/tests/stp-heapoverflow-3.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/stp-heapoverflow-4.out vendor/tcpdump/4.9.0/tests/stp-heapoverflow-4.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/stp-heapoverflow-5.out vendor/tcpdump/4.9.0/tests/stp-heapoverflow-5.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/stp-v.out vendor/tcpdump/4.9.0/tests/syslog-v.out vendor/tcpdump/4.9.0/tests/syslog_udp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/tcp-auth-heapoverflow.out vendor/tcpdump/4.9.0/tests/tcp-auth-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/tcp_header_heapoverflow.out vendor/tcpdump/4.9.0/tests/tcp_header_heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/tfo-5c1fa7f9ae91.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/tfo.out vendor/tcpdump/4.9.0/tests/tftp-heapoverflow.out vendor/tcpdump/4.9.0/tests/tftp-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/trunc_aack.out vendor/tcpdump/4.9.0/tests/truncated-aack.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/udld-inf-loop-1-v.out vendor/tcpdump/4.9.0/tests/udld-inf-loop-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/udld-v.out vendor/tcpdump/4.9.0/tests/udp-length-heapoverflow.out vendor/tcpdump/4.9.0/tests/udp-length-heapoverflow.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/unaligned-nfs-1.out vendor/tcpdump/4.9.0/tests/unaligned-nfs-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/vrrp-v.out vendor/tcpdump/4.9.0/tests/vrrp.out vendor/tcpdump/4.9.0/tests/vrrp.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/vxlan.out vendor/tcpdump/4.9.0/tests/vxlan.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/zmtp1-inf-loop-1.out vendor/tcpdump/4.9.0/tests/zmtp1-inf-loop-1.pcap (contents, props changed) vendor/tcpdump/4.9.0/tests/zmtp1.out vendor/tcpdump/4.9.0/tests/zmtp1.pcap (contents, props changed) vendor/tcpdump/4.9.0/timeval-operations.h (contents, props changed) vendor/tcpdump/4.9.0/udp.h (contents, props changed) vendor/tcpdump/4.9.0/util-print.c (contents, props changed) vendor/tcpdump/4.9.0/vfprintf.c (contents, props changed) vendor/tcpdump/4.9.0/win32/ vendor/tcpdump/4.9.0/win32/prj/ vendor/tcpdump/4.9.0/win32/prj/GNUmakefile vendor/tcpdump/4.9.0/win32/prj/WinDump.dsp vendor/tcpdump/4.9.0/win32/prj/WinDump.dsw vendor/tcpdump/4.9.0/win32/prj/WinDump.sln vendor/tcpdump/4.9.0/win32/prj/WinDump.vcproj vendor/tcpdump/4.9.0/win32/src/ vendor/tcpdump/4.9.0/win32/src/ether_ntohost.c (contents, props changed) Added: vendor/tcpdump/4.9.0/CHANGES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tcpdump/4.9.0/CHANGES Tue Jan 31 19:12:28 2017 (r313023) @@ -0,0 +1,1320 @@ +Wednesday January 18, 2017 devel.fx.lebail@orange.fr + Summary for 4.9.0 tcpdump release + General updates: + Improve separation frontend/backend (tcpdump/libnetdissect) + Don't require IPv6 library support in order to support IPv6 addresses + Introduce data types to use for integral values in packet structures + Fix display of timestamps with -tt, -ttt and -ttttt options + Fix some heap overflows found with American Fuzzy Lop by Hanno Boeck and others + (More information in the log with CVE-2016-* and CVE-2017-*) + Change the way protocols print link-layer addresses (Fix heap overflows + in CALM-FAST and GeoNetworking printers) + Pass correct caplen value to ether_print() and some other functions + Fix lookup_nsap() to match what isonsap_string() expects + Clean up relative time stamp printing (Fix an array overflow) + Fix some alignment issues with GCC on Solaris 10 SPARC + Add some ND_TTEST_/ND_TCHECK_ macros to simplify writing bounds checks + Add a fn_printztn() which returns the number of bytes processed + Add nd_init() and nd_cleanup() functions. Improve libsmi support + Add CONTRIBUTING file + Add a summary comment in all printers + Compile with more warning options in devel mode if supported (-Wcast-qual, ...) + Fix some leaks found by Valgrind/Memcheck + Fix a bunch of de-constifications + Squelch some Coverity warnings and some compiler warnings + Update Coverity and Travis-CI setup + Update Visual Studio files + + Frontend: + Fix capsicum support to work with zerocopy buffers in bpf + Try opening interfaces by name first, then by name-as-index + Work around pcap_create() failures fetching time stamp type lists + Fix a segmentation fault with 'tcpdump -J' + Improve addrtostr6() bounds checking + Add exit_tcpdump() function + Don't drop CAP_SYS_CHROOT before chrooting + Fixes issue where statistics not reported when -G and -W options used + + New printers supporting: + Generic Protocol Extension for VXLAN (VXLAN-GPE) + Home Networking Control Protocol (HNCP), RFCs 7787 and 7788 + Locator/Identifier Separation Protocol (LISP), type 3 and type 4 packets + Marvell Extended Distributed Switch Architecture header (MEDSA) + Network Service Header (NSH) + REdis Serialization Protocol (RESP) + + Updated printers: + 802.11: Beginnings of 11ac radiotap support + 802.11: Check the Protected bit for management frames + 802.11: Do bounds checking on last_presentp before dereferencing it (Fix a heap overflow) + 802.11: Fix the radiotap printer to handle the special bits correctly + 802.11: If we have the MCS field, it's 11n + 802.11: Only print unknown frame type or subtype messages once + 802.11: Radiotap dBm values get printed as dB; Update a test output accordingly + 802.11: Source and destination addresses were backwards + AH: Add a bounds check + AH: Report to our caller that dissection failed if a bounds check fails + AP1394: Print src > dst, not dst > src + ARP: Don't assume the target hardware address is <= 6 octets long (Fix a heap overflow) + ATALK: Add bounds and length checks (Fix heap overflows) + ATM: Add some bounds checks (Fix a heap overflow) + ATM: Fix an incorrect bounds check + BFD: Update specification from draft to RFC 5880 + BFD: Update to print optional authentication field + BGP: Add decoding of ADD-PATH capability + BGP: Add support for the AIGP attribute (RFC7311) + BGP: Print LARGE_COMMUNITY Path Attribute + BGP: Update BGP numbers from IANA; Print minor values for FSM notification + BOOTP: Add a bounds check + Babel: Add decoder for source-specific extension + CDP: Filter out non-printable characters + CFM: Fixes to match the IEEE standard, additional bounds and length checks + CSLIP: Add more bounds checks (Fix a heap overflow) + ClassicalIPoATM: Add a bounds check on LLC+SNAP header (Fix a heap overflow) + DHCP: Fix MUDURL and TZ options + DHCPv6: Process MUDURL and TZ options + DHCPv6: Update Status Codes with RFCs/IANA names + DNS: Represent the "DNSSEC OK" bit as "DO" instead of "OK". Add a test case + DTP: Improve packet integrity checks + EGP: Fix bounds checks + ESP: Don't use OpenSSL_add_all_algorithms() in OpenSSL 1.1.0 or later + ESP: Handle OpenSSL 1.1.x + Ethernet: Add some bounds checking before calling isoclns_print (Fix a heap overflow) + Ethernet: Print the Length/Type field as length when needed + FDDI: Fix -e output for FDDI + FR: Add some packet-length checks and improve Q.933 printing (Fix heap overflows) + GRE: Add some bounds checks (Fix heap overflows) + Geneve: Fix error message with invalid option length; Update list option classes + HNCP: Fix incorrect time interval format. Fix handling of IPv4 prefixes + ICMP6: Fetch a 32-bit big-endian quantity with EXTRACT_32BITS() + ICMP6: dagid is always an IPv6 address, not an opaque 128-bit string + IGMP: Add a length check + IP: Add a bounds check (Fix a heap overflow) + IP: Check before fetching the protocol version (Fix a heap overflow) + IP: Don't try to dissect if IP version != 4 (Fix a heap overflow) + IP: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP + IPComp: Check whether we have the CPI before we fetch it (Fix a heap overflow) + IPoFC: Fix -e output (IP-over-Fibre Channel) + IPv6: Don't overwrite the destination IPv6 address for routing headers + IPv6: Fix header printing + IPv6: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP + ISAKMP: Clean up parsing of IKEv2 Security Associations + ISOCLNS/IS-IS: Add support for Purge Originator Identifier (RFC6232) and test cases + ISOCLNS/IS-IS: Don't overwrite packet data when checking the signature + ISOCLNS/IS-IS: Filter out non-printable characters + ISOCLNS/IS-IS: Fix segmentation faults + ISOCLNS/IS-IS: Have signature_verify() do the copying and clearing + ISOCLNS: Add some bounds checks + Juniper: Make sure a Juniper header TLV isn't bigger than what's left in the packet (Fix a heap overflow) + LLC/SNAP: With -e, print the LLC header before the SNAP header; without it, cut the SNAP header + LLC: Add a bounds check (Fix a heap overflow) + LLC: Clean up printing of LLC packets + LLC: Fix the printing of RFC 948-style IP packets + LLC: Skip the LLC and SNAP headers with -x for 802.11 and some other protocols + LLDP: Implement IANA OUI and LLDP MUD option + MPLS LSP ping: Update printing for RFC 4379, bug fixes, more bounds checks + MPLS: "length" is now the *remaining* packet length + MPLS: Add bounds and length checks (Fix a heap overflow) + NFS: Add a test that makes unaligned accesses + NFS: Don't assume the ONC RPC header is nicely aligned + NFS: Don't overflow the Opaque_Handle buffer (Fix a segmentation fault) + NFS: Don't run past the end of an NFSv3 file handle + OLSR: Add a test to cover a HNA sgw case + OLSR: Fix 'Advertised networks' count + OLSR: Fix printing of smart-gateway HNAs in IPv4 + OSPF: Add a bounds check for the Hello packet options + OSPF: Do more bounds checking + OSPF: Fix a segmentation fault + OSPF: Fix printing 'ospf_topology_values' default + OTV: Add missing bounds checks + PGM: Print the formatted IP address, not the raw binary address, as a string + PIM: Add some bounds checking (Fix a heap overflow) + PIMv2: Fix checksumming of Register messages + PPI: Pass an adjusted struct pcap_pkthdr to the sub-printer + PPP: Add some bounds checks (Fix a heap overflow) + PPP: Report invalid PAP AACK/ANAK packets + Q.933: Add a missing bounds check + RADIUS: Add Value 13 "VLAN" to Tunnel-Type attribute + RADIUS: Filter out non-printable characters + RADIUS: Translate UDP/1700 as RADIUS + RESP: Do better checking of RESP packets + RPKI-RTR: Add a return value check for "fn_printn" call + RPKI-RTR: Remove printing when truncated condition already detected + RPL: Fix 'Consistency Check' control code + RPL: Fix suboption print + RSVP: An INTEGRITY object in a submessage covers only the submessage + RSVP: Fix an infinite loop; Add bounds and length checks + RSVP: Fix some if statements missing brackets + RSVP: Have signature_verify() do the copying and clearing + RTCP: Add some bounds checks + RTP: Add some bounds checks, fix two segmentation faults + SCTP: Do more bounds checking + SFLOW: Fix bounds checking + SLOW: Fix bugs, add checks + SMB: Before fetching the flags2 field, make sure we have it + SMB: Do bounds checks on NBNS resource types and resource data lengths + SNMP: Clean up the "have libsmi but no modules loaded" case + SNMP: Clean up the object abbreviation list and fix the code to match them + SNMP: Do bounds checks when printing character and octet strings + SNMP: Improve ASN.1 bounds checks + SNMP: More bounds and length checks + STP: Add a bunch of bounds checks, and fix some printing (Fix heap overflows) + STP: Filter out non-printable characters + TCP: Add bounds and length checks for packets with TCP option 20 + TCP: Correct TCP option Kind value for TCP Auth and add SCPS-TP + TCP: Fix two bounds checks (Fix heap overflows) + TCP: Make sure we have the data offset field before fetching it (Fix a heap overflow) + TCP: Put TCP-AO option decoding right + TFTP: Don't use strchr() to scan packet data (Fix a heap overflow) + Telnet: Add some bounds checks + TokenRing: Fix -e output + UDLD: Fix an infinite loop + UDP: Add a bounds check (Fix a heap overflow) + UDP: Check against the packet length first + UDP: Don't do the DDP-over-UDP heuristic check up front + VAT: Add some bounds checks + VTP: Add a test on Mgmt Domain Name length + VTP: Add bounds checks and filter out non-printable characters + VXLAN: Add a bound check and a test case + ZeroMQ: Fix an infinite loop + +Tuesday April 14, 2015 guy@alum.mit.edu + Summary for 4.8.0 tcpdump release + Fix "-x" for Apple PKTAP and PPI packets + +Friday April 10, 2015 guy@alum.mit.edu + Summary for 4.7.4 tcpdump release + RPKI to Router Protocol: Fix Segmentation Faults and other problems + RPKI to Router Protocol: print strings with fn_printn() + wb: fix some bounds checks + +Wednesday March 11, 2015 mcr@sandelman.ca + Summary for 4.7.3 tcpdump release + Capsicum fixes for FreeBSD 10 + +Tuesday March 10, 2015 mcr@sandelman.ca + Summary for 4.7.2 tcpdump release + DCCP: update Packet Types with RFC4340/IANA names + fixes for CVE-2015-0261: IPv6 mobility header check issue + fixes for CVE-2015-2153, 2154, 2155: kday packets + +Friday Nov. 12, 2014 guy@alum.mit.edu + Summary for 4.7.0 tcpdump release + changes to hex printing of CDP packets + Fix PPI printing + Radius: update Packet Type Codes and Attribute Types with RFC/IANA names + Add a routine to print "text protocols", and add FTP/HTTP/SMTP/RTSP support. + improvements to telnet printer, even if not -v + omit length for bcp, print-tcp uses it + formatting fixes for a bunch of protocols + new bounds checks for a number of protocols + split netflow 1,6, and 6 dissector up. + added geneve dissector + CVE-2014-9140 PPP dissector fixed. + +Tuesday Sep. 2, 2014 mcr@sandelman.ca + Summary for 4.6.2 tcpdump release + fix out-of-source-tree builds: find libpcap that is out of source + better configure check for libsmi + +Saturday Jul. 19, 2014 mcr@sandelman.ca + Summary for 4.6.1 tcpdump release + added FreeBSD capsicum + add a short option '#', same as long option '--number' + +Wednesday Jul. 2, 2014 mcr@sandelman.ca + Summary for 4.6.0 tcpdump release + all of tcpdump is now using the new "NDO" code base (Thanks Denis!) + nflog, mobile, forces, pptp, AODV, AHCP, IPv6, OSPFv4, RPL, DHCPv6 enhancements/fixes + M3UA decode added. + many new test cases: 82 in 4.5.1 to 133 in 4.6.0 + many improvements to travis continuous integration system: OSX, and Coverity options + cleaned up some unnecessary header files + Added bittok2str(). + a number of unaligned access faults fixed + -A flag does not consider CR to be printable anymore + fx.lebail took over coverity baby sitting + default snapshot size increased to 256K for accomodate USB captures + WARNING: this release contains a lot of very worthwhile code churn. + +Wednesday Jan. 15, 2014 guy@alum.mit.edu + Summary for 4.5.2 tcpdump release + Man page fix + Fix crashes on SPARC + +Monday Nov. 11, 2013 mcr@sandelman.ca + Summary for 4.5.1 tcpdump release + CREDITS file fixes + +Thursday Nov. 7, 2013 mcr@sandelman.ca and guy@alum.mit.edu. + Summary for 4.5.0 tcpdump release + some NFSv4 fixes for printing + fix printing of unknown TCP options, and tcp fast-open + fixes for syslog parser + some gcc-version-specific flag tuning + adopt MacOS deprecation workarounds for openssl + improvements to babel printing + add OpenFlow 1.0 (no SSL) and test cases + GeoNet printer. + added STBC Rx support + improvements to DHCPv6 decoder + clarify which autoconf is needed + Point users to the the-tcpdump-group repository on GitHub rather + than the mcr repository + Add MSDP printer. + Fixed IPv6 check on Solaris and other OSes requiring extra + networking libraries. + Add support for VXLAN (draft-mahalingam-dutt-dcops-vxlan-03), + and add "vxlan" as an option for -T. + Add support for OTV (draft-hasmit-otv-04). + fixes for DLT_IEEE802_11_RADIO datalink types + added MPTCP decoder + +Saturday April 6, 2013 guy@alum.mit.edu. + Summary for 4.4.0 tcpdump release + RPKI-RTR (RFC6810) is now official (TCP Port 323) + Fix detection of OpenSSL libcrypto. + Add DNSSL (RFC6106) support. + Add "radius" as an option for -T. + Update Action codes for handle_action function according to + 802.11s amendment. + Decode DHCPv6 AFTR-Name option (RFC6334). + Updates for Babel. + Fix printing of infinite lifetime in ICMPv6. + Added support for SPB, SPBM Service Identifier, and Unicast + Address sub-TLV in ISIS. + Decode RIPv2 authentication up to RFC4822. + Fix RIP Request/full table decoding issues. + On Linux systems with cap-ng.h, drop root privileges + using Linux Capabilities. + Add support for reading multiple files. + Add MS NLB heartbeat printer. + Separate multiple nexthops in BGP. + +Wednesday November 28, 2012 guy@alum.mit.edu. + Summary for 4.3.1 tcpdump release + Print "LLDP, length N" for LLDP packets even when not in verbose + mode, so something is printed even if only the timestamp is + present + Document "-T carp" + Print NTP poll interval correctly (it's an exponent, so print + both its raw value and 2^value) + Document that "-e" is used to get MAC addresses + More clearly document that you need to escape or quote + backslashes in filter expressions on the command line + Fix some "the the" in the man page + Use the right maximum path length + Don't treat 192_1_2, when passed to -i, as an interface number + +Friday April 3, 2012. mcr@sandelman.ca. + Summary for 4.3.0 tcpdump release + fixes for forces: SPARSE data (per RFC 5810) + some more test cases added + updates to documentation on -l, -U and -w flags. + Fix printing of BGP optional headers. + Tried to include DLT_PFSYNC support, failed due to headers required. + added TIPC support. + Fix LLDP Network Policy bit definitions. + fixes for IGMPv3's Max Response Time: it is in units of 0.1 second. + SIGUSR1 can be used rather than SIGINFO for stats + permit -n flag to affect print-ip for protocol numbers + ND_OPT_ADVINTERVAL is in milliseconds, not seconds + Teach PPPoE parser about RFC 4638 + + +Friday December 9, 2011. guy@alum.mit.edu. + Summary for 4.2.1 tcpdump release + Only build the Babel printer if IPv6 is enabled. + Support Babel on port 6696 as well as 6697. + Include ppi.h in release tarball. + Include all the test files in the release tarball, and don't + "include" test files that no longer exist. + Don't assume we have - check for it. + Support "-T carp" as a way of dissecting IP protocol 112 as CARP + rather than VRRP. + Support Hilscher NetAnalyzer link-layer header format. + Constify some pointers and fix compiler warnings. + Get rid of never-true test. + Fix an unintended fall-through in a case statement in the ARP + printer. + Fix several cases where sizeof(sizeof(XXX)) was used when just + sizeof(XXX) was intended. + Make stricter sanity checks in the ES-IS printer. + Get rid of some GCCisms that caused builds to fai with compilers + that don't support them. + Fix typo in man page. + Added length checks to Babel printer. + +Sunday July 24, 2011. mcr@sandelman.ca. + Summary for 4.2.+ + merged 802.15.4 decoder from Dmitry Eremin-Solenikov + updates to forces for new port numbers + Use "-H", not "-h", for the 802.11s option. (-h always help) + Better ICMPv6 checksum handling. + add support for the RPKI/Router Protocol, per -ietf-sidr-rpki-rtr-12 + get rid of uuencoded pcap test files, git can do binary. + sFlow changes for 64-bit counters. + fixes for PPI packet header handling and printing. + Add DCB Exchange protocol (DCBX) version 1.01. + Babel dissector, from Juliusz Chroboczek and Grégoire Henry. + improvements to radiotap for rate values > 127. + Many improvements to ForCES decode, including fix SCTP TML port + updated RPL type code to RPL-17 draft + Improve printout of DHCPv6 options. + added support and test case for QinQ (802.1q VLAN) packets + Handle DLT_IEEE802_15_4_NOFCS like DLT_IEEE802_15_4. + Build fixes for Sparc and other machines with alignment restrictions. + Merged changes from Debian package. + PGM: Add ACK decoding and add PGMCC DATA and FEEDBACK options. + Build fixes for OSX (Snow Leopard and others) + Add support for IEEE 802.15.4 packets + +Tue. July 20, 2010. guy@alum.mit.edu. + Summary for 4.1.2 tcpdump release + If -U is specified, flush the file after creating it, so it's + not zero-length + Fix TCP flags output description, and some typoes, in the man + page + Add a -h flag, and only attempt to recognize 802.11s mesh + headers if it's set + When printing the link-layer type list, send *all* output to + stderr + Include the CFLAGS setting when configure was run in the + compiler flags + +Thu. April 1, 2010. guy@alum.mit.edu. + Summary for 4.1.1 tcpdump release + Fix build on systems with PF, such as FreeBSD and OpenBSD. + Don't blow up if a zero-length link-layer address is passed to + linkaddr_string(). + +Thu. March 11, 2010. ken@netfunctional.ca/guy@alum.mit.edu. + Summary for 4.1.0 tcpdump release + Fix printing of MAC addresses for VLAN frames with a length + field + Add some additional bounds checks and use the EXTRACT_ macros + more + Add a -b flag to print the AS number in BGP packets in ASDOT + notation rather than ASPLAIN notation + Add ICMPv6 RFC 5006 support + Decode the access flags in NFS access requests + Handle the new DLT_ for memory-mapped USB captures on Linux + Make the default snapshot (-s) the maximum + Print name of device (when -L is used) + Support for OpenSolaris (and SXCE build 125 and later) + Print new TCP flags + Add support for RPL DIO + Add support for TCP User Timeout (UTO) + Add support for non-standard Ethertypes used by 3com PPPoE gear + Add support for 802.11n and 802.11s + Add support for Transparent Ethernet Bridge ethertype in GRE + Add 4 byte AS support for BGP printer + Add support for the MDT SAFI 66 BG printer + Add basic IPv6 support to print-olsr + Add USB printer + Add printer for ForCES + Handle frames with an FCS + Handle 802.11n Control Wrapper, Block Acq Req and Block Ack frames + Fix TCP sequence number printing + Report 802.2 packets as 802.2 instead of 802.3 + Don't include -L/usr/lib in LDFLAGS + On x86_64 Linux, look in lib64 directory too + Lots of code clean ups + Autoconf clean ups + Update testcases to make output changes + Fix compiling with/out smi (--with{,out}-smi) + Fix compiling without IPv6 support (--disable-ipv6) + +Mon. October 27, 2008. ken@netfunctional.ca. Summary for 4.0.0 tcpdump release + Add support for Bluetooth Sniffing + Add support for Realtek Remote Control Protocol (openrrcp.org.ru) + Add support for 802.11 AVS + Add support for SMB over TCP + Add support for 4 byte BGP AS printing + Add support for compiling on case-insensitive file systems + Add support for ikev2 printing + Update support for decoding AFS + Update DHCPv6 printer + Use newer libpcap API's (allows -B option on all platforms) + Add -I to turn on monitor mode + Bugfixes in lldp, lspping, dccp, ESP, NFS printers + Cleanup unused files and various cruft + +Mon. September 10, 2007. ken@xelerance.com. Summary for 3.9.8 tcpdump release + Rework ARP printer + Rework OSPFv3 printer + Add support for Frame-Relay ARP + Decode DHCP Option 121 (RFC 3442 Classless Static Route) + Decode DHCP Option 249 (MS Classless Static Route) the same as Option 121 + TLV: Add support for Juniper .pcap extensions + Print EGP header in new-world-order style + Converted print-isakmp.c to NETDISSECT + Moved AF specific stuff into af.h + Test subsystem now table driven, and saves outputs and diffs to one place + Require for pf definitions - allows reading of pflog formatted + libpcap files on an OS other than where the file was generated + + +Wed. July 23, 2007. mcr@xelerance.com. Summary for 3.9.7 libpcap release + + NFS: Print unsigned values as such. + RX: parse safely. + BGP: fixes for IPv6-less builds. + 801.1ag: use standard codepoint. + use /dev/bpf on systems with such a device. + 802.11: print QoS data, avoid dissect of no-data frame, ignore padding. + smb: make sure that we haven't gone past the end of the captured data. + smb: squelch an uninitialized complaint from coverity. + NFS: from NetBSD; don't interpret the reply as a possible NFS reply + if it got MSG_DENIED. + BGP: don't print TLV values that didn't fit, from www.digit-labs.org. + revised INSTALL.txt about libpcap dependancy. + +Wed. April 25, 2007. ken@xelerance.com. Summary for 3.9.6 tcpdump release + Update man page to reflect changes to libpcap + Changes to both TCP and IP Printer Output + Fix a potential buffer overflow in the 802.11 printer + Print basic info about a few more Cisco LAN protocols. + mDNS cleanup + ICMP MPLS rework of the extension code + bugfix: use the correct codepoint for the OSPF simple text auth token + entry, and use safeputs to print the password. + Add support in pflog for additional values + Add support for OIF RSVP Extensions UNI 1.0 Rev. 2 and additional RSVP objects + Add support for the Message-id NACK c-type. + Add support for 802.3ah loopback ctrl msg + Add support for Multiple-STP as per 802.1s + Add support for rapid-SPT as per 802.1w + Add support for CFM Link-trace msg, Link-trace-Reply msg, + Sender-ID tlv, private tlv, port, interface status + Add support for unidirectional link detection as per + http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt + Add support for the olsr protocol as per RFC 3626 plus the LQ + extensions from olsr.org + Add support for variable-length checksum in DCCP, as per section 9 of + RFC 4340. + Add support for per-VLAN spanning tree and per-VLAN rapid spanning tree + Add support for Multiple-STP as per 802.1s + Add support for the cisco propriatry 'dynamic trunking protocol' + Add support for the cisco proprietary VTP protocol + Update dhcp6 options table as per IETF standardization activities + + +Tue. September 19, 2006. ken@xelerance.com. Summary for 3.9.5 tcpdump release + + Fix compiling on AIX (, at end of ENUM) + Updated list of DNS RR typecodes + Use local Ethernet defs on WIN32 + Add support for Frame-Relay ARP + Fixes for compiling under MSVC++ + Add support for parsing Juniper .pcap files + Add support for FRF.16 Multilink Frame-Relay (DLT_MFR) + Rework the OSPFv3 printer + Fix printing for 4.4BSD/NetBSD NFS Filehandles + Add support for Cisco style NLPID encapsulation + Add cisco prop. eigrp related, extended communities + Add support for BGP signaled VPLS + Cleanup the bootp printer + Add support for PPP over Frame-Relay + Add some bounds checking to the IP options code, and clean up + the options output a bit. + Add additional modp groups to ISAKMP printer + Add support for Address-Withdraw and Label-Withdraw Msgs + Add support for the BFD Discriminator TLV + Fixes for 64bit compiling + Add support for PIMv2 checksum verification + Add support for further dissection of the IPCP Compression Option + Add support for Cisco's proposed VQP protocol + Add basic support for keyed authentication TCP option + Lots of minor cosmetic changes to output printers + + +Mon. September 19, 2005. ken@xelerance.com. Summary for 3.9.4 tcpdump release + Decoder support for more Juniper link-layer types + Fix a potential buffer overflow (although it can't occur in + practice). + Fix the handling of unknown management frame types in the 802.11 + printer. + Add FRF.16 support, fix various Frame Relay bugs. + Add support for RSVP integrity objects, update fast-reroute + object printer to latest spec. + Clean up documentation of vlan filter expression, document mpls + filter expression. + Document new pppoed and pppoes filter expressions. + Update diffserver-TE codepoints as per RFC 4124. + Spelling fixes in ICMPv6. + Don't require any fields other than flags to be present in IS-IS + restart signaling TLVs, and only print the system ID in + those TLVs as system IDs, not as node IDs. + Support for DCCP. + +Tue. July 5, 2005. ken@xelerance.com. Summary for 3.9.3 tcpdump release + + Option to chroot() when dropping privs + Fixes for compiling on nearly every platform, + including improved 64bit support + Many new testcases + Support for sending packets + Many compliation fixes on most platforms + Fixes for recent version of GCC to eliminate warnings + Improved Unicode support + + Decoders & DLT Changes, Updates and New: + AES ESP support + Juniper ATM, FRF.15, FRF.16, PPPoE, + ML-FR, ML-PIC, ML-PPP, PL-PPP, LS-PIC + GGSN,ES,MONITOR,SERVICES + L2VPN + Axent Raptor/Symantec Firewall + TCP-MD5 (RFC 2385) + ESP-in-UDP (RFC 3948) + ATM OAM + LMP, LMP Service Discovery + IP over FC + IP over IEEE 1394 + BACnet MS/TP + SS7 + LDP over TCP + LACP, MARKER as per 802.3ad + PGM (RFC 3208) + LSP-PING + G.7041/Y.1303 Generic Framing Procedure + EIGRP-IP, EIGRP-IPX + ICMP6 + Radio - via radiotap + DHCPv6 + HDLC over PPP + +Tue. March 30, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.3 release + + No changes from 3.8.2. Version bumped only to maintain consistency + with libpcap 0.8.3. + +Mon. March 29, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.2 release + + Fixes for print-isakmp.c CVE: CAN-2004-0183, CAN-2004-0184 + http://www.rapid7.com/advisories/R7-0017.html + IP-over-IEEE1394 printing. + some MINGW32 changes. + updates for autoconf 2.5 + fixes for print-aodv.c - check for too short packets + formatting changes to print-ascii for hex output. + check for too short packets: print-bgp.c, print-bootp.c, print-cdp.c, + print-chdlc.c, print-domain.c, print-icmp.c, print-icmp6.c, + print-ip.c, print-lwres.c, print-ospf.c, print-pim.c, + print-ppp.c,print-pppoe.c, print-rsvp.c, print-wb.c + print-ether.c - better handling of unknown types. + print-isoclns.c - additional decoding of types. + print-llc.c - strings for LLC names added. + print-pfloc.c - various enhancements + print-radius.c - better decoding to strings. + +Wed. November 12, 2003. mcr@sandelman.ottawa.on.ca. Summary for 3.8 release + + changed syntax of -E argument so that multiple SAs can be decrypted + fixes for Digital Unix headers and Documentation + __attribute__ fixes + CDP changes from Terry Kennedy . + IPv6 mobility updates from Kazushi Sugyo + Fixes for ASN.1 decoder for 2.100.3 forms. + Added a count of packets received and processed to clarify numbers. + Incorporated WinDUMP patches for Win32 builds. + PPPoE payload length headers. + Fixes for HP C compiler builds. + Use new pcap_breakloop() and pcap_findalldevs() if we can. + BGP output split into multiple lines. + Fixes to 802.11 decoding. + Fixes to PIM decoder. + SuperH is a CPU that can't handle unaligned access. Many fixes for + unaligned access work. + Fixes to Frame-Relay decoder for Q.933/922 frames. + Clarified when Solaris can do captures as non-root. + Added tests/ subdir for examples/regression tests. + New -U flag. -flush stdout after every packet + New -A flag -print ascii only + support for decoding IS-IS inside Cisco HDLC Frames + more verbosity for tftp decoder + mDNS decoder + new BFD decoder + cross compilation patches + RFC 3561 AODV support. + UDP/TCP pseudo-checksum properly for source-route options. + sanitized all files to modified BSD license + Add support for RFC 2625 IP-over-Fibre Channel. + fixes for DECnet support. + Support RFC 2684 bridging of Ethernet, 802.5 Token Ring, and FDDI. + RFC 2684 encapsulation of BPDUs. + +Tuesday, February 25, 2003. fenner@research.att.com. 3.7.2 release + + Fixed infinite loop when parsing invalid isakmp packets. + (reported by iDefense; already fixed in CVS) + Fixed infinite loop when parsing invalid BGP packets. + Fixed buffer overflow with certain invalid NFS packets. + Pretty-print unprintable network names in 802.11 printer. + Handle truncated nbp (appletalk) packets. + Updated DHCPv6 printer to match draft-ietf-dhc-dhcpv6-22.txt + Print IP protocol name even if we don't have a printer for it. + Print IP protocol name or number for fragments. + Print the whole MPLS label stack, not just the top label. + Print request header and file handle for NFS v3 FSINFO and PATHCONF + requests. + Fix NFS packet truncation checks. + Handle "old" DR-Priority and Bidir-Capable PIM HELLO options. + Handle unknown RADIUS attributes properly. + Fix an ASN.1 parsing error that would cause e.g. the OID + 2.100.3 to be misrepresented as 4.20.3 . + +Monday, January 21, 2002. mcr@sandelman.ottawa.on.ca. Summary for 3.7 release +see http://www.tcpdump.org/cvs-log/2002-01-21.10:16:48.html for commit log. + keyword "ipx" added. + Better OSI/802.2 support on Linux. + IEEE 802.11 support, from clenahan@fortresstech.com, achirica@ttd.net. + LLC SAP support for FDDI/token ring/RFC-1483 style ATM + BXXP protocol was replaced by the BEEP protocol; + improvements to SNAP demux. + Changes to "any" interface documentation. + Documentation on pcap_stats() counters. + Fix a memory leak found by Miklos Szeredi - pcap_ether_aton(). + Added MPLS encapsulation decoding per RFC3032. + DNS dissector handles TKEY, TSIG and IXFR. + adaptive SLIP interface patch from Igor Khristophorov + SMB printing has much improved bounds checks + OUI 0x0000f8 decoded as encapsulated ethernet for Cisco-custom bridging + Zephyr support, from Nickolai Zeldovich . + Solaris - devices with digits in them. Stefan Hudson + IPX socket 0x85be is for Cisco EIGRP over IPX. + Improvements to fragmented ESP handling. + SCTP support from Armando L. Caro Jr. + Linux ARPHDR_ATM support fixed. + Added a "netbeui" keyword, which selects NetBEUI packets. + IPv6 ND improvements, MobileIP dissector, 2292bis-02 for RA option. + Handle ARPHDR_HDLC from Marcus Felipe Pereira . + Handle IPX socket 0x553 -> NetBIOS-over-IPX socket, "nwlink-dgm" + Better Linux libc5 compat. + BIND9 lwres dissector added. + MIPS and SPARC get strict alignment macros (affects print-bgp.c) + Apple LocalTalk LINKTYPE_ reserved. + New time stamp formats documented. + DHCP6 updated to draft-22.txt spec. + ICMP types/codes now accept symbolic names. + Add SIGINFO handler from LBL + encrypted CIPE tunnels in IRIX, from Franz Schaefer . + now we are -Wstrict-prototype clean. + NetBSD DLT_PPP_ETHER; adapted from Martin Husemann . + PPPoE dissector cleaned up. + Support for LocalTalk hardware, from Uns Lider . + In dissector, now the caller prints the IP addresses rather than proto. + cjclark@alum.mit.edu: print the IP proto for non-initial fragments. + LLC frames with a DSAP and LSAP of 0xe0 are IPX frames. + Linux cooked frames with a type value of LINUX_SLL_P_802_3 are IPX. + captures on the "any" device won't be done in promiscuous mode + Token Ring support on DLPI - Onno van der Linden + ARCNet support, from NetBSD. + HSRP dissector, from Julian Cowley . + Handle (GRE-encapsulated) PPTP + added -C option to rotate save file every optarg * 1,000,000 bytes. + support for "vrrp" name - NetBSD, by Klaus Klein . + PPTP support, from Motonori Shindo . + IS-IS over PPP support, from Hannes Gredler . + CNFP support for IPv6,format. Harry Raaymakers . + ESP printing updated to RFC2406. + HP-UX can now handle large number of PPAs. + MSDP printer added. + L2TP dissector improvements from Motonori Shindo. + +Tuesday January 9, 2001. mcr@sandelman.ottawa.on.ca. Summary for 3.6 release + Cleaned up documentation. + Promisc mode fixes for Linux + IPsec changes/cleanups. + Alignment fixes for picky architectures + + Removed dependency on native headers for packet dissectors. + Removed Linux specific headers that were shipped + + libpcap changes provide for exchanging capture files between + systems. Save files now have well known PACKET_ values instead of + depending upon system dependant mappings of DLT_* types. + + Support for computing/checking IP and UDP/TCP checksums. + + Updated autoconf stock files. + + IPv6 improvements: dhcp (draft-15), mobile-ip6, ppp, ospf6, + + Added dissector support for: ISOCLNS, Token Ring, IGMPv3, bxxp, + timed, vrrp, radius, chdlc, cnfp, cdp, IEEE802.1d, raw-AppleTalk + + Added filtering support for: VLANs, ESIS, ISIS + + Improvements to: print-telnet, IPTalk, bootp/dhcp, ECN, PPP, + L2TP, PPPoE + + HP-UX 11.0 -- find the right dlpi device. + Solaris 8 - IPv6 works + Linux - Added support for an "any" device to capture on all interfaces + + Security fixes: buffer overrun audit done. Strcpy replaced with + strlcpy, sprintf replaced with snprintf. + Look for lex problems, and warn about them. + + +v3.5 Fri Jan 28 18:00:00 PST 2000 + +Bill Fenner +- switch to config.h for autoconf +- unify RCSID strings +- Updated PIMv1, PIMv2, DVMRP, IGMP parsers, add Cisco Auto-RP parser +- Really fix the RIP printer +- Fix MAC address -> name translation. +- some -Wall -Wformat fixes +- update makemib to parse much of SMIv2 +- Print TCP sequence # with -vv even if you normally wouldn't +- Print as much of IP/TCP/UDP headers as possible even if truncated. + +itojun@iijlab.net +- -X will make a ascii dump. from netbsd. +- telnet command sequence decoder (ff xx xx). from netbsd. +- print-bgp.c: improve options printing. ugly code exists for + unaligned option parsing (need some fix). +- const poisoning in SMB decoder. +- -Wall -Werror clean checks. +- bring in KAME IPv6/IPsec decoding code. + +Assar Westerlund +- SNMPv2 and SNMPv3 printer +- If compiled with libsmi, tcpdump can load MIBs on the fly to decode + SNMP packets. +- Incorporate NFS parsing code from NetBSD. Adds support for nfsv3. +- portability fixes +- permit building in different directories. + +Ken Hornstein +- bring in code at + /afs/transarc.com/public/afs-contrib/tools/tcpdump for parsing + AFS3 packets + +Andrew Tridgell +- SMB printing code + +Love +- print-rx.c: add code for printing MakeDir and StoreStatus. Also + change date format to the right one. + +Michael C. Richardson +- Created tcpdump.org repository + +v3.4 Sat Jul 25 12:40:55 PDT 1998 + +- Hardwire Linux slip support since it's too hard to detect. + +- Redo configuration of "network" libraries (-lsocket and -lnsl) to + deal with IRIX. Thanks to John Hawkinson (jhawk@mit.edu) + +- Added -a which tries to translate network and broadcast addresses to + names. Suggested by Rob van Nieuwkerk (robn@verdi.et.tudelft.nl) + +- Added a configure option to disable gcc. + +- Added a "raw" packet printer. + +- Not having an interface address is no longer fatal. Requested by John + Hawkinson. + +- Rework signal setup to accommodate Linux. + +- OSPF truncation check fix. Also display the type of OSPF packets + using MD5 authentication. Thanks to Brian Wellington + (bwelling@tis.com) + +- Fix truncation check bugs in the Kerberos printer. Reported by Ezra + Peisach (epeisach@mit.edu) + +- Don't catch SIGHUP when invoked with nohup(1). Thanks to Dave Plonka + (plonka@mfa.com) + +- Specify full install target as a way of detecting if install + directory does not exist. Thanks to Dave Plonka. + +- Bit-swap FDDI addresses for BSD/OS too. Thanks to Paul Vixie + (paul@vix.com) + +- Fix off-by-one bug when testing size of ethernet packets. Thanks to + Marty Leisner (leisner@sdsp.mc.xerox.com) + +- Add a local autoconf macro to check for routines in libraries; the + autoconf version is broken (it only puts the library name in the + cache variable name). Thanks to John Hawkinson. + +- Add a local autoconf macro to check for types; the autoconf version + is broken (it uses grep instead of actually compiling a code fragment). + +- Modified to support the new BSD/OS 2.1 PPP and SLIP link layer header + formats. + +- Extend OSF ip header workaround to versions 1 and 2. + +- Fix some signed problems in the nfs printer. As reported by David + Sacerdote (davids@silence.secnet.com) + +- Detect group wheel and use it as the default since BSD/OS' install + can't hack numeric groups. Reported by David Sacerdote. + +- AIX needs special loader options. Thanks to Jonathan I. Kamens + (jik@cam.ov.com) + +- Fixed the nfs printer to print port numbers in decimal. Thanks to + Kent Vander Velden (graphix@iastate.edu) + +- Find installed libpcap in /usr/local/lib when not using gcc. + +- Disallow network masks with non-network bits set. + +- Attempt to detect "egcs" versions of gcc. + +- Add missing closing double quotes when displaying bootp strings. + Reported by Viet-Trung Luu (vluu@picard.math.uwaterloo.ca) + +v3.3 Sat Nov 30 20:56:27 PST 1996 + +- Added Linux support. + +- GRE encapsulated packet printer thanks to John Hawkinson + (jhawk@mit.edu) + +- Rewrite gmt2local() to avoid problematic os dependencies. + +- Suppress nfs truncation message on errors. + +- Add missing m4 quoting in AC_LBL_UNALIGNED_ACCESS autoconf macro. + Reported by Joachim Ott (ott@ardala.han.de) + +- Enable "ip_hl vs. ip_vhl" workaround for OSF4 too. + +- Print arp hardware type in host order. Thanks to Onno van der Linden + (onno@simplex.nl) + +- Avoid solaris compiler warnings. Thanks to Bruce Barnett + (barnett@grymoire.crd.ge.com) + +- Fix rip printer to not print one more route than is actually in the + packet. Thanks to Jean-Luc Richier (Jean-Luc.Richier@imag.fr) and + Bill Fenner (fenner@parc.xerox.com) + +- Use autoconf endian detection since BYTE_ORDER isn't defined on all systems. + +- Fix dvmrp printer truncation checks and add a dvmrp probe printer. + Thanks to Danny J. Mitzel (mitzel@ipsilon.com) + +- Rewrite ospf printer to improve truncation checks. + +- Don't parse tcp options past the EOL. As noted by David Sacerdote + (davids@secnet.com). Also, check tcp options to make sure they ar + actually in the tcp header (in addition to the normal truncation + checks). Fix the SACK code to print the N blocks (instead of the + first block N times). + +- Don't say really small UDP packets are truncated just because they + aren't big enough to be a RPC. As noted by David Sacerdote. + +v3.2.1 Sun Jul 14 03:02:26 PDT 1996 + +- Added rfc1716 icmp codes as suggested by Martin Fredriksson + (martin@msp.se) + +- Print mtu for icmp unreach need frag packets. Thanks to John + Hawkinson (jhawk@mit.edu) + +- Decode icmp router discovery messages. Thanks to Jeffrey Honig + (jch@bsdi.com) + +- Added a printer entry for DLT_IEEE802 as suggested by Tak Kushida + (kushida@trl.ibm.co.jp) + +- Check igmp checksum if possible. Thanks to John Hawkinson. + +- Made changes for SINIX. Thanks to Andrej Borsenkow + (borsenkow.msk@sni.de) + +- Use autoconf's idea of the top level directory in install targets. + Thanks to John Hawkinson. + +- Avoid infinite loop in tcp options printing code. Thanks to Jeffrey + Mogul (mogul@pa.dec.com) + +- Avoid using -lsocket in IRIX 5.2 and earlier since it breaks snoop. + Thanks to John Hawkinson. + +- Added some more packet truncation checks. + +- On systems that have it, use sigset() instead of signal() since + signal() has different semantics on these systems. + +- Fixed some more alignment problems on the alpha. + +- Add code to massage unprintable characters in the domain and ipx + printers. Thanks to John Hawkinson. + +- Added explicit netmask support. Thanks to Steve Nuchia + (steve@research.oknet.com) + +- Add "sca" keyword (for DEC cluster services) as suggested by Terry + Kennedy (terry@spcvxa.spc.edu) + +- Add "atalk" keyword as suggested by John Hawkinson. + +- Added an igrp printer. Thanks to Francis Dupont + (francis.dupont@inria.fr) + +- Print IPX net numbers in hex a la Novell Netware. Thanks to Terry + Kennedy (terry@spcvxa.spc.edu) + +- Fixed snmp extended tag field parsing bug. Thanks to Pascal Hennequin + (pascal.hennequin@hugo.int-evry.fr) + +- Added some ETHERTYPEs missing on some systems. + +- Added truncated packet macros and various checks. + +- Fixed endian problems with the DECnet printer. + +- Use $CC when checking gcc version. Thanks to Carl Lindberg + (carl_lindberg@blacksmith.com) + +- Fixes for AIX (although this system is not yet supported). Thanks to + John Hawkinson. + +- Fix bugs in the autoconf misaligned accesses code fragment. + +- Include sys/param.h to get BYTE_ORDER in a few places. Thanks to + Pavlin Ivanov Radoslavov (pavlin@cs.titech.ac.jp) + +v3.2 Sun Jun 23 02:28:10 PDT 1996 + +- Print new icmp unreachable codes as suggested by Martin Fredriksson + (martin@msp.se). Also print code value when unknown for icmp redirect + and time exceeded. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jan 31 19:17:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBE9BCCAC24; Tue, 31 Jan 2017 19:17:08 +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 702051571; Tue, 31 Jan 2017 19:17:08 +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 v0VJH7cW029652; Tue, 31 Jan 2017 19:17:07 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VJH6nc029640; Tue, 31 Jan 2017 19:17:06 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201701311917.v0VJH6nc029640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 31 Jan 2017 19:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313024 - in vendor/tcpdump/dist: . lbl missing tests win32/Include win32/prj win32/src X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 19:17:08 -0000 Author: glebius Date: Tue Jan 31 19:17:06 2017 New Revision: 313024 URL: https://svnweb.freebsd.org/changeset/base/313024 Log: Import tcpdump-4.9.0 into dist. Added: vendor/tcpdump/dist/CONTRIBUTING vendor/tcpdump/dist/PLATFORMS vendor/tcpdump/dist/README (contents, props changed) vendor/tcpdump/dist/addrtostr.c (contents, props changed) vendor/tcpdump/dist/addrtostr.h (contents, props changed) vendor/tcpdump/dist/ascii_strcasecmp.c (contents, props changed) vendor/tcpdump/dist/ascii_strcasecmp.h (contents, props changed) vendor/tcpdump/dist/netdissect-stdinc.h (contents, props changed) vendor/tcpdump/dist/netdissect.c (contents, props changed) vendor/tcpdump/dist/print-hncp.c (contents, props changed) vendor/tcpdump/dist/print-lisp.c (contents, props changed) vendor/tcpdump/dist/print-medsa.c (contents, props changed) vendor/tcpdump/dist/print-nsh.c (contents, props changed) vendor/tcpdump/dist/print-resp.c (contents, props changed) vendor/tcpdump/dist/print-vxlan-gpe.c (contents, props changed) vendor/tcpdump/dist/print.c (contents, props changed) vendor/tcpdump/dist/print.h (contents, props changed) vendor/tcpdump/dist/strtoaddr.c (contents, props changed) vendor/tcpdump/dist/strtoaddr.h (contents, props changed) vendor/tcpdump/dist/tests/OLSRv1_HNA_sgw_1.out vendor/tcpdump/dist/tests/OLSRv1_HNA_sgw_1.pcap (contents, props changed) vendor/tcpdump/dist/tests/RADIUS-port1700.pcap (contents, props changed) vendor/tcpdump/dist/tests/aarp-heapoverflow-1.out vendor/tcpdump/dist/tests/aarp-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/aarp-heapoverflow-2.out vendor/tcpdump/dist/tests/aarp-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/arp-too-long-tha.out vendor/tcpdump/dist/tests/arp-too-long-tha.pcap (contents, props changed) vendor/tcpdump/dist/tests/atm-heapoverflow.out vendor/tcpdump/dist/tests/atm-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/atm-oam-heapoverflow.out vendor/tcpdump/dist/tests/atm-oam-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/bad-ipv4-version-pgm-heapoverflow.out vendor/tcpdump/dist/tests/bad-ipv4-version-pgm-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/bfd-raw-auth-md5-v.out vendor/tcpdump/dist/tests/bfd-raw-auth-md5.out vendor/tcpdump/dist/tests/bfd-raw-auth-md5.pcap (contents, props changed) vendor/tcpdump/dist/tests/bfd-raw-auth-sha1-v.out vendor/tcpdump/dist/tests/bfd-raw-auth-sha1.out vendor/tcpdump/dist/tests/bfd-raw-auth-sha1.pcap (contents, props changed) vendor/tcpdump/dist/tests/bfd-raw-auth-simple-v.out vendor/tcpdump/dist/tests/bfd-raw-auth-simple.out vendor/tcpdump/dist/tests/bfd-raw-auth-simple.pcap (contents, props changed) vendor/tcpdump/dist/tests/bgp-aigp.out vendor/tcpdump/dist/tests/bgp-aigp.pcap (contents, props changed) vendor/tcpdump/dist/tests/bgp-large-community.out vendor/tcpdump/dist/tests/bgp-large-community.pcap (contents, props changed) vendor/tcpdump/dist/tests/calm-fast-mac-lookup-heapoverflow.out vendor/tcpdump/dist/tests/calm-fast-mac-lookup-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/cve-2014-8767-OLSR.out vendor/tcpdump/dist/tests/cve-2014-8767-OLSR.pcap (contents, props changed) vendor/tcpdump/dist/tests/cve-2014-8768-Geonet.out vendor/tcpdump/dist/tests/cve-2014-8768-Geonet.pcap (contents, props changed) vendor/tcpdump/dist/tests/cve-2014-8769-AODV.out vendor/tcpdump/dist/tests/cve-2014-8769-AODV.pcap (contents, props changed) vendor/tcpdump/dist/tests/dhcp-mud.out vendor/tcpdump/dist/tests/dhcp-mud.pcap (contents, props changed) vendor/tcpdump/dist/tests/dhcpv6-mud.out vendor/tcpdump/dist/tests/dhcpv6-mud.pcap (contents, props changed) vendor/tcpdump/dist/tests/dnssec-vv.out vendor/tcpdump/dist/tests/dnssec.pcap (contents, props changed) vendor/tcpdump/dist/tests/frf15-heapoverflow.out vendor/tcpdump/dist/tests/frf15-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/geonet-mac-lookup-heapoverflow.out vendor/tcpdump/dist/tests/geonet-mac-lookup-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/gre-heapoverflow-1.out vendor/tcpdump/dist/tests/gre-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/gre-heapoverflow-2.out vendor/tcpdump/dist/tests/gre-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/heap-overflow-1.out vendor/tcpdump/dist/tests/heap-overflow-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/heap-overflow-2.out vendor/tcpdump/dist/tests/heap-overflow-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/heapoverflow-EXTRACT_16BITS.out vendor/tcpdump/dist/tests/heapoverflow-EXTRACT_16BITS.pcap (contents, props changed) vendor/tcpdump/dist/tests/heapoverflow-atalk_print.out vendor/tcpdump/dist/tests/heapoverflow-atalk_print.pcap (contents, props changed) vendor/tcpdump/dist/tests/heapoverflow-in_checksum.out vendor/tcpdump/dist/tests/heapoverflow-in_checksum.pcap (contents, props changed) vendor/tcpdump/dist/tests/heapoverflow-ip_print_demux.out vendor/tcpdump/dist/tests/heapoverflow-ip_print_demux.pcap (contents, props changed) vendor/tcpdump/dist/tests/heapoverflow-ppp_hdlc_if_print.out vendor/tcpdump/dist/tests/heapoverflow-ppp_hdlc_if_print.pcap (contents, props changed) vendor/tcpdump/dist/tests/heapoverflow-q933_printq.out vendor/tcpdump/dist/tests/heapoverflow-q933_printq.pcap (contents, props changed) vendor/tcpdump/dist/tests/heapoverflow-sl_if_print.out vendor/tcpdump/dist/tests/heapoverflow-sl_if_print.pcap (contents, props changed) vendor/tcpdump/dist/tests/heapoverflow-tcp_print.out vendor/tcpdump/dist/tests/heapoverflow-tcp_print.pcap (contents, props changed) vendor/tcpdump/dist/tests/hncp.out vendor/tcpdump/dist/tests/hncp.pcap (contents, props changed) vendor/tcpdump/dist/tests/ikev2pI2-segfault-v.out vendor/tcpdump/dist/tests/ikev2pI2-segfault.out vendor/tcpdump/dist/tests/ikev2pI2-segfault.pcap (contents, props changed) vendor/tcpdump/dist/tests/ipcomp-heapoverflow.out vendor/tcpdump/dist/tests/ipcomp-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/ipv6hdr-heapoverflow-v.out vendor/tcpdump/dist/tests/ipv6hdr-heapoverflow.out vendor/tcpdump/dist/tests/ipv6hdr-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis-seg-fault-1-v.out vendor/tcpdump/dist/tests/isis-seg-fault-1-v.sh (contents, props changed) vendor/tcpdump/dist/tests/isis-seg-fault-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis-seg-fault-2-v.out vendor/tcpdump/dist/tests/isis-seg-fault-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis-seg-fault-3-v.out vendor/tcpdump/dist/tests/isis-seg-fault-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis_poi.out vendor/tcpdump/dist/tests/isis_poi.pcap (contents, props changed) vendor/tcpdump/dist/tests/isis_poi2.out vendor/tcpdump/dist/tests/isis_poi2.pcap (contents, props changed) vendor/tcpdump/dist/tests/isoclns-heapoverflow-2.out vendor/tcpdump/dist/tests/isoclns-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/isoclns-heapoverflow-3.out vendor/tcpdump/dist/tests/isoclns-heapoverflow-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/isoclns-heapoverflow.out vendor/tcpdump/dist/tests/isoclns-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/juniper_header-heapoverflow.out vendor/tcpdump/dist/tests/juniper_header-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/lisp_eid_notify.out vendor/tcpdump/dist/tests/lisp_eid_notify.pcap (contents, props changed) vendor/tcpdump/dist/tests/lisp_eid_register.out vendor/tcpdump/dist/tests/lisp_eid_register.pcap (contents, props changed) vendor/tcpdump/dist/tests/lisp_ipv6.out vendor/tcpdump/dist/tests/lisp_ipv6.pcap (contents, props changed) vendor/tcpdump/dist/tests/llc-xid-heapoverflow.out vendor/tcpdump/dist/tests/llc-xid-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/lldp_mudurl-v.out vendor/tcpdump/dist/tests/lldp_mudurl-vv.out vendor/tcpdump/dist/tests/lldp_mudurl.pcap (contents, props changed) vendor/tcpdump/dist/tests/lspping-fec-ldp-v.out vendor/tcpdump/dist/tests/lspping-fec-ldp-vv.out vendor/tcpdump/dist/tests/lspping-fec-ldp.out vendor/tcpdump/dist/tests/lspping-fec-rsvp-v.out vendor/tcpdump/dist/tests/lspping-fec-rsvp-vv.out vendor/tcpdump/dist/tests/lspping-fec-rsvp.out vendor/tcpdump/dist/tests/medsa-e.out vendor/tcpdump/dist/tests/medsa.out vendor/tcpdump/dist/tests/medsa.pcap (contents, props changed) vendor/tcpdump/dist/tests/mpls-label-heapoverflow.out vendor/tcpdump/dist/tests/mpls-label-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/mpls-traceroute-v.out vendor/tcpdump/dist/tests/mpls-traceroute.out vendor/tcpdump/dist/tests/nfs-seg-fault-1.out vendor/tcpdump/dist/tests/nfs-seg-fault-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/nsh-over-vxlan-gpe-v.out vendor/tcpdump/dist/tests/nsh-over-vxlan-gpe-vv.out vendor/tcpdump/dist/tests/nsh-over-vxlan-gpe-vvv.out vendor/tcpdump/dist/tests/nsh-over-vxlan-gpe.out vendor/tcpdump/dist/tests/nsh-over-vxlan-gpe.pcap (contents, props changed) vendor/tcpdump/dist/tests/ospf2-seg-fault-1-v.out vendor/tcpdump/dist/tests/ospf2-seg-fault-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/otv-heapoverflow-1.out vendor/tcpdump/dist/tests/otv-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/otv-heapoverflow-2.out vendor/tcpdump/dist/tests/otv-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/pcap-invalid-version-1.out vendor/tcpdump/dist/tests/pcap-invalid-version-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/pcap-invalid-version-2.out vendor/tcpdump/dist/tests/pcap-invalid-version-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/pcap-ng-invalid-vers-1.out vendor/tcpdump/dist/tests/pcap-ng-invalid-vers-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/pcap-ng-invalid-vers-2.out vendor/tcpdump/dist/tests/pcap-ng-invalid-vers-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/q933-heapoverflow-2.out vendor/tcpdump/dist/tests/q933-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/radiotap-heapoverflow.out vendor/tcpdump/dist/tests/radiotap-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/radius-port1700-v.out vendor/tcpdump/dist/tests/relts-0x80000000.out vendor/tcpdump/dist/tests/relts-0x80000000.pcap (contents, props changed) vendor/tcpdump/dist/tests/resp_1.out vendor/tcpdump/dist/tests/resp_1_benchmark.pcap (contents, props changed) vendor/tcpdump/dist/tests/resp_2.out vendor/tcpdump/dist/tests/resp_2_inline.pcap (contents, props changed) vendor/tcpdump/dist/tests/resp_3.out vendor/tcpdump/dist/tests/resp_3_malicious.pcap (contents, props changed) vendor/tcpdump/dist/tests/rsvp-inf-loop-2-v.out vendor/tcpdump/dist/tests/rsvp-inf-loop-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/rtp-seg-fault-1.out vendor/tcpdump/dist/tests/rtp-seg-fault-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/rtp-seg-fault-2.out vendor/tcpdump/dist/tests/rtp-seg-fault-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/scps_invalid.out vendor/tcpdump/dist/tests/scps_invalid.pcap (contents, props changed) vendor/tcpdump/dist/tests/snmp-heapoverflow-1.out vendor/tcpdump/dist/tests/snmp-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/snmp-heapoverflow-2.out vendor/tcpdump/dist/tests/snmp-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/spb_bpduv4-v.out vendor/tcpdump/dist/tests/stp-heapoverflow-1.out vendor/tcpdump/dist/tests/stp-heapoverflow-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/stp-heapoverflow-2.out vendor/tcpdump/dist/tests/stp-heapoverflow-2.pcap (contents, props changed) vendor/tcpdump/dist/tests/stp-heapoverflow-3.out vendor/tcpdump/dist/tests/stp-heapoverflow-3.pcap (contents, props changed) vendor/tcpdump/dist/tests/stp-heapoverflow-4.out vendor/tcpdump/dist/tests/stp-heapoverflow-4.pcap (contents, props changed) vendor/tcpdump/dist/tests/stp-heapoverflow-5.out vendor/tcpdump/dist/tests/stp-heapoverflow-5.pcap (contents, props changed) vendor/tcpdump/dist/tests/tcp-auth-heapoverflow.out vendor/tcpdump/dist/tests/tcp-auth-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/tcp_header_heapoverflow.out vendor/tcpdump/dist/tests/tcp_header_heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/tftp-heapoverflow.out vendor/tcpdump/dist/tests/tftp-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/trunc_aack.out vendor/tcpdump/dist/tests/truncated-aack.pcap (contents, props changed) vendor/tcpdump/dist/tests/udld-inf-loop-1-v.out vendor/tcpdump/dist/tests/udld-inf-loop-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/udp-length-heapoverflow.out vendor/tcpdump/dist/tests/udp-length-heapoverflow.pcap (contents, props changed) vendor/tcpdump/dist/tests/unaligned-nfs-1.out vendor/tcpdump/dist/tests/unaligned-nfs-1.pcap (contents, props changed) vendor/tcpdump/dist/tests/vxlan.out vendor/tcpdump/dist/tests/vxlan.pcap (contents, props changed) vendor/tcpdump/dist/tests/zmtp1-inf-loop-1.out vendor/tcpdump/dist/tests/zmtp1-inf-loop-1.pcap (contents, props changed) vendor/tcpdump/dist/timeval-operations.h (contents, props changed) vendor/tcpdump/dist/util-print.c (contents, props changed) vendor/tcpdump/dist/win32/prj/WinDump.sln vendor/tcpdump/dist/win32/prj/WinDump.vcproj vendor/tcpdump/dist/win32/src/ vendor/tcpdump/dist/win32/src/ether_ntohost.c (contents, props changed) Deleted: vendor/tcpdump/dist/atmuni31.h vendor/tcpdump/dist/missing/addrinfo.h vendor/tcpdump/dist/missing/getnameinfo.c vendor/tcpdump/dist/missing/inet_aton.c vendor/tcpdump/dist/missing/inet_ntop.c vendor/tcpdump/dist/missing/inet_pton.c vendor/tcpdump/dist/strcasecmp.c vendor/tcpdump/dist/tcpdump-stdinc.h vendor/tcpdump/dist/tests/failure-outputs.txt vendor/tcpdump/dist/util.c vendor/tcpdump/dist/win32/Include/ Modified: vendor/tcpdump/dist/CHANGES vendor/tcpdump/dist/CREDITS vendor/tcpdump/dist/INSTALL.txt (contents, props changed) vendor/tcpdump/dist/Makefile.in vendor/tcpdump/dist/VERSION vendor/tcpdump/dist/aclocal.m4 vendor/tcpdump/dist/addrtoname.c vendor/tcpdump/dist/addrtoname.h vendor/tcpdump/dist/af.c vendor/tcpdump/dist/af.h vendor/tcpdump/dist/bpf_dump.c vendor/tcpdump/dist/checksum.c (contents, props changed) vendor/tcpdump/dist/config.h.in vendor/tcpdump/dist/configure vendor/tcpdump/dist/configure.in vendor/tcpdump/dist/cpack.c vendor/tcpdump/dist/cpack.h vendor/tcpdump/dist/ether.h vendor/tcpdump/dist/ethertype.h vendor/tcpdump/dist/extract.h vendor/tcpdump/dist/gmpls.c vendor/tcpdump/dist/gmt2local.c vendor/tcpdump/dist/in_cksum.c (contents, props changed) vendor/tcpdump/dist/interface.h vendor/tcpdump/dist/ip.h vendor/tcpdump/dist/ip6.h vendor/tcpdump/dist/ipproto.c vendor/tcpdump/dist/l2vpn.c vendor/tcpdump/dist/l2vpn.h vendor/tcpdump/dist/lbl/os-solaris2.h vendor/tcpdump/dist/lbl/os-sunos4.h vendor/tcpdump/dist/lbl/os-ultrix4.h vendor/tcpdump/dist/machdep.c vendor/tcpdump/dist/machdep.h vendor/tcpdump/dist/mib.h vendor/tcpdump/dist/missing/datalinks.c vendor/tcpdump/dist/missing/dlnames.c vendor/tcpdump/dist/missing/snprintf.c vendor/tcpdump/dist/missing/strdup.c vendor/tcpdump/dist/missing/strlcat.c vendor/tcpdump/dist/missing/strlcpy.c vendor/tcpdump/dist/missing/strsep.c vendor/tcpdump/dist/nameser.h vendor/tcpdump/dist/netdissect.h vendor/tcpdump/dist/nfsfh.h vendor/tcpdump/dist/nlpid.c vendor/tcpdump/dist/oui.c vendor/tcpdump/dist/oui.h vendor/tcpdump/dist/parsenfsfh.c vendor/tcpdump/dist/pcap-missing.h vendor/tcpdump/dist/print-802_11.c vendor/tcpdump/dist/print-802_15_4.c (contents, props changed) vendor/tcpdump/dist/print-ah.c vendor/tcpdump/dist/print-ahcp.c (contents, props changed) vendor/tcpdump/dist/print-aodv.c vendor/tcpdump/dist/print-aoe.c (contents, props changed) vendor/tcpdump/dist/print-ap1394.c vendor/tcpdump/dist/print-arcnet.c vendor/tcpdump/dist/print-arp.c vendor/tcpdump/dist/print-ascii.c vendor/tcpdump/dist/print-atalk.c vendor/tcpdump/dist/print-atm.c vendor/tcpdump/dist/print-babel.c (contents, props changed) vendor/tcpdump/dist/print-beep.c vendor/tcpdump/dist/print-bfd.c vendor/tcpdump/dist/print-bgp.c vendor/tcpdump/dist/print-bootp.c vendor/tcpdump/dist/print-bt.c (contents, props changed) vendor/tcpdump/dist/print-calm-fast.c (contents, props changed) vendor/tcpdump/dist/print-carp.c (contents, props changed) vendor/tcpdump/dist/print-cdp.c vendor/tcpdump/dist/print-cfm.c (contents, props changed) vendor/tcpdump/dist/print-chdlc.c vendor/tcpdump/dist/print-cip.c vendor/tcpdump/dist/print-cnfp.c vendor/tcpdump/dist/print-dccp.c vendor/tcpdump/dist/print-decnet.c vendor/tcpdump/dist/print-dhcp6.c vendor/tcpdump/dist/print-domain.c vendor/tcpdump/dist/print-dtp.c (contents, props changed) vendor/tcpdump/dist/print-dvmrp.c vendor/tcpdump/dist/print-eap.c vendor/tcpdump/dist/print-egp.c vendor/tcpdump/dist/print-eigrp.c vendor/tcpdump/dist/print-enc.c vendor/tcpdump/dist/print-esp.c vendor/tcpdump/dist/print-ether.c vendor/tcpdump/dist/print-fddi.c vendor/tcpdump/dist/print-forces.c (contents, props changed) vendor/tcpdump/dist/print-fr.c vendor/tcpdump/dist/print-frag6.c vendor/tcpdump/dist/print-ftp.c (contents, props changed) vendor/tcpdump/dist/print-geneve.c (contents, props changed) vendor/tcpdump/dist/print-geonet.c (contents, props changed) vendor/tcpdump/dist/print-gre.c vendor/tcpdump/dist/print-hsrp.c vendor/tcpdump/dist/print-http.c (contents, props changed) vendor/tcpdump/dist/print-icmp.c vendor/tcpdump/dist/print-icmp6.c vendor/tcpdump/dist/print-igmp.c vendor/tcpdump/dist/print-igrp.c vendor/tcpdump/dist/print-ip.c vendor/tcpdump/dist/print-ip6.c vendor/tcpdump/dist/print-ip6opts.c vendor/tcpdump/dist/print-ipcomp.c vendor/tcpdump/dist/print-ipfc.c vendor/tcpdump/dist/print-ipnet.c (contents, props changed) vendor/tcpdump/dist/print-ipx.c vendor/tcpdump/dist/print-isakmp.c vendor/tcpdump/dist/print-isoclns.c vendor/tcpdump/dist/print-juniper.c vendor/tcpdump/dist/print-krb.c vendor/tcpdump/dist/print-l2tp.c vendor/tcpdump/dist/print-lane.c vendor/tcpdump/dist/print-ldp.c vendor/tcpdump/dist/print-llc.c vendor/tcpdump/dist/print-lldp.c (contents, props changed) vendor/tcpdump/dist/print-lmp.c vendor/tcpdump/dist/print-loopback.c (contents, props changed) vendor/tcpdump/dist/print-lspping.c vendor/tcpdump/dist/print-lwapp.c (contents, props changed) vendor/tcpdump/dist/print-lwres.c vendor/tcpdump/dist/print-m3ua.c (contents, props changed) vendor/tcpdump/dist/print-mobile.c vendor/tcpdump/dist/print-mobility.c vendor/tcpdump/dist/print-mpcp.c (contents, props changed) vendor/tcpdump/dist/print-mpls.c vendor/tcpdump/dist/print-mptcp.c (contents, props changed) vendor/tcpdump/dist/print-msdp.c vendor/tcpdump/dist/print-msnlb.c vendor/tcpdump/dist/print-nflog.c (contents, props changed) vendor/tcpdump/dist/print-nfs.c vendor/tcpdump/dist/print-ntp.c vendor/tcpdump/dist/print-null.c vendor/tcpdump/dist/print-olsr.c vendor/tcpdump/dist/print-openflow-1.0.c (contents, props changed) vendor/tcpdump/dist/print-openflow.c (contents, props changed) vendor/tcpdump/dist/print-ospf.c vendor/tcpdump/dist/print-ospf6.c vendor/tcpdump/dist/print-otv.c vendor/tcpdump/dist/print-pflog.c vendor/tcpdump/dist/print-pgm.c vendor/tcpdump/dist/print-pim.c vendor/tcpdump/dist/print-pktap.c (contents, props changed) vendor/tcpdump/dist/print-ppi.c (contents, props changed) vendor/tcpdump/dist/print-ppp.c vendor/tcpdump/dist/print-pppoe.c vendor/tcpdump/dist/print-pptp.c vendor/tcpdump/dist/print-radius.c vendor/tcpdump/dist/print-raw.c vendor/tcpdump/dist/print-rip.c vendor/tcpdump/dist/print-ripng.c vendor/tcpdump/dist/print-rpki-rtr.c (contents, props changed) vendor/tcpdump/dist/print-rrcp.c (contents, props changed) vendor/tcpdump/dist/print-rsvp.c vendor/tcpdump/dist/print-rt6.c vendor/tcpdump/dist/print-rtsp.c (contents, props changed) vendor/tcpdump/dist/print-rx.c vendor/tcpdump/dist/print-sctp.c vendor/tcpdump/dist/print-sflow.c (contents, props changed) vendor/tcpdump/dist/print-sip.c vendor/tcpdump/dist/print-sl.c vendor/tcpdump/dist/print-sll.c vendor/tcpdump/dist/print-slow.c vendor/tcpdump/dist/print-smb.c vendor/tcpdump/dist/print-smtp.c (contents, props changed) vendor/tcpdump/dist/print-snmp.c vendor/tcpdump/dist/print-stp.c vendor/tcpdump/dist/print-sunatm.c vendor/tcpdump/dist/print-sunrpc.c vendor/tcpdump/dist/print-symantec.c vendor/tcpdump/dist/print-syslog.c vendor/tcpdump/dist/print-tcp.c vendor/tcpdump/dist/print-telnet.c vendor/tcpdump/dist/print-tftp.c vendor/tcpdump/dist/print-timed.c vendor/tcpdump/dist/print-tipc.c vendor/tcpdump/dist/print-token.c vendor/tcpdump/dist/print-udld.c (contents, props changed) vendor/tcpdump/dist/print-udp.c vendor/tcpdump/dist/print-usb.c (contents, props changed) vendor/tcpdump/dist/print-vjc.c vendor/tcpdump/dist/print-vqp.c (contents, props changed) vendor/tcpdump/dist/print-vrrp.c vendor/tcpdump/dist/print-vtp.c (contents, props changed) vendor/tcpdump/dist/print-vxlan.c vendor/tcpdump/dist/print-wb.c vendor/tcpdump/dist/print-zephyr.c vendor/tcpdump/dist/print-zeromq.c vendor/tcpdump/dist/rpl.h (contents, props changed) vendor/tcpdump/dist/setsignal.c vendor/tcpdump/dist/signature.c (contents, props changed) vendor/tcpdump/dist/signature.h (contents, props changed) vendor/tcpdump/dist/smb.h vendor/tcpdump/dist/smbutil.c vendor/tcpdump/dist/tcp.h vendor/tcpdump/dist/tcpdump.1.in (contents, props changed) vendor/tcpdump/dist/tcpdump.c vendor/tcpdump/dist/tests/TESTLIST vendor/tcpdump/dist/tests/TESTonce vendor/tcpdump/dist/tests/crypto.sh (contents, props changed) vendor/tcpdump/dist/tests/cve2015-0261-crash.pcap vendor/tcpdump/dist/tests/cve2015-0261-ipv6.out vendor/tcpdump/dist/tests/dtp-v.out vendor/tcpdump/dist/tests/evb.out vendor/tcpdump/dist/tests/ieee802.11_exthdr.out vendor/tcpdump/dist/tests/ieee802.11_rx-stbc.out vendor/tcpdump/dist/tests/kday1.out vendor/tcpdump/dist/tests/kday2.out vendor/tcpdump/dist/tests/kday3.out vendor/tcpdump/dist/tests/kday4.out vendor/tcpdump/dist/tests/kday5.out vendor/tcpdump/dist/tests/kday6.out vendor/tcpdump/dist/tests/kday7.out vendor/tcpdump/dist/tests/kday8.out vendor/tcpdump/dist/tests/lldp_cdp-ev.out vendor/tcpdump/dist/tests/lmp-v.sh (contents, props changed) vendor/tcpdump/dist/tests/mstp-v.out vendor/tcpdump/dist/tests/nflog-e.sh (contents, props changed) vendor/tcpdump/dist/tests/of10_p3295-vv.out vendor/tcpdump/dist/tests/of10_s4810-vvvv.out vendor/tcpdump/dist/tests/radius-rfc4675-v.out vendor/tcpdump/dist/tests/rpl-14-daovvv.out vendor/tcpdump/dist/tests/rpl-19-pickdag.out vendor/tcpdump/dist/tests/rpl-19-pickdagvvv.out vendor/tcpdump/dist/tests/rpl-26-senddaovv.out vendor/tcpdump/dist/tests/udld-v.out vendor/tcpdump/dist/udp.h vendor/tcpdump/dist/vfprintf.c vendor/tcpdump/dist/win32/prj/WinDump.dsp Directory Properties: vendor/tcpdump/dist/Makefile-devel-adds (props changed) vendor/tcpdump/dist/getopt_long.h (props changed) vendor/tcpdump/dist/missing/getopt_long.c (props changed) vendor/tcpdump/dist/openflow.h (props changed) vendor/tcpdump/dist/tests/TESTrun.sh (props changed) vendor/tcpdump/dist/tests/esp-secrets.txt (props changed) vendor/tcpdump/dist/tests/ikev2pI2-secrets.txt (props changed) Modified: vendor/tcpdump/dist/CHANGES ============================================================================== --- vendor/tcpdump/dist/CHANGES Tue Jan 31 19:12:28 2017 (r313023) +++ vendor/tcpdump/dist/CHANGES Tue Jan 31 19:17:06 2017 (r313024) @@ -1,3 +1,187 @@ +Wednesday January 18, 2017 devel.fx.lebail@orange.fr + Summary for 4.9.0 tcpdump release + General updates: + Improve separation frontend/backend (tcpdump/libnetdissect) + Don't require IPv6 library support in order to support IPv6 addresses + Introduce data types to use for integral values in packet structures + Fix display of timestamps with -tt, -ttt and -ttttt options + Fix some heap overflows found with American Fuzzy Lop by Hanno Boeck and others + (More information in the log with CVE-2016-* and CVE-2017-*) + Change the way protocols print link-layer addresses (Fix heap overflows + in CALM-FAST and GeoNetworking printers) + Pass correct caplen value to ether_print() and some other functions + Fix lookup_nsap() to match what isonsap_string() expects + Clean up relative time stamp printing (Fix an array overflow) + Fix some alignment issues with GCC on Solaris 10 SPARC + Add some ND_TTEST_/ND_TCHECK_ macros to simplify writing bounds checks + Add a fn_printztn() which returns the number of bytes processed + Add nd_init() and nd_cleanup() functions. Improve libsmi support + Add CONTRIBUTING file + Add a summary comment in all printers + Compile with more warning options in devel mode if supported (-Wcast-qual, ...) + Fix some leaks found by Valgrind/Memcheck + Fix a bunch of de-constifications + Squelch some Coverity warnings and some compiler warnings + Update Coverity and Travis-CI setup + Update Visual Studio files + + Frontend: + Fix capsicum support to work with zerocopy buffers in bpf + Try opening interfaces by name first, then by name-as-index + Work around pcap_create() failures fetching time stamp type lists + Fix a segmentation fault with 'tcpdump -J' + Improve addrtostr6() bounds checking + Add exit_tcpdump() function + Don't drop CAP_SYS_CHROOT before chrooting + Fixes issue where statistics not reported when -G and -W options used + + New printers supporting: + Generic Protocol Extension for VXLAN (VXLAN-GPE) + Home Networking Control Protocol (HNCP), RFCs 7787 and 7788 + Locator/Identifier Separation Protocol (LISP), type 3 and type 4 packets + Marvell Extended Distributed Switch Architecture header (MEDSA) + Network Service Header (NSH) + REdis Serialization Protocol (RESP) + + Updated printers: + 802.11: Beginnings of 11ac radiotap support + 802.11: Check the Protected bit for management frames + 802.11: Do bounds checking on last_presentp before dereferencing it (Fix a heap overflow) + 802.11: Fix the radiotap printer to handle the special bits correctly + 802.11: If we have the MCS field, it's 11n + 802.11: Only print unknown frame type or subtype messages once + 802.11: Radiotap dBm values get printed as dB; Update a test output accordingly + 802.11: Source and destination addresses were backwards + AH: Add a bounds check + AH: Report to our caller that dissection failed if a bounds check fails + AP1394: Print src > dst, not dst > src + ARP: Don't assume the target hardware address is <= 6 octets long (Fix a heap overflow) + ATALK: Add bounds and length checks (Fix heap overflows) + ATM: Add some bounds checks (Fix a heap overflow) + ATM: Fix an incorrect bounds check + BFD: Update specification from draft to RFC 5880 + BFD: Update to print optional authentication field + BGP: Add decoding of ADD-PATH capability + BGP: Add support for the AIGP attribute (RFC7311) + BGP: Print LARGE_COMMUNITY Path Attribute + BGP: Update BGP numbers from IANA; Print minor values for FSM notification + BOOTP: Add a bounds check + Babel: Add decoder for source-specific extension + CDP: Filter out non-printable characters + CFM: Fixes to match the IEEE standard, additional bounds and length checks + CSLIP: Add more bounds checks (Fix a heap overflow) + ClassicalIPoATM: Add a bounds check on LLC+SNAP header (Fix a heap overflow) + DHCP: Fix MUDURL and TZ options + DHCPv6: Process MUDURL and TZ options + DHCPv6: Update Status Codes with RFCs/IANA names + DNS: Represent the "DNSSEC OK" bit as "DO" instead of "OK". Add a test case + DTP: Improve packet integrity checks + EGP: Fix bounds checks + ESP: Don't use OpenSSL_add_all_algorithms() in OpenSSL 1.1.0 or later + ESP: Handle OpenSSL 1.1.x + Ethernet: Add some bounds checking before calling isoclns_print (Fix a heap overflow) + Ethernet: Print the Length/Type field as length when needed + FDDI: Fix -e output for FDDI + FR: Add some packet-length checks and improve Q.933 printing (Fix heap overflows) + GRE: Add some bounds checks (Fix heap overflows) + Geneve: Fix error message with invalid option length; Update list option classes + HNCP: Fix incorrect time interval format. Fix handling of IPv4 prefixes + ICMP6: Fetch a 32-bit big-endian quantity with EXTRACT_32BITS() + ICMP6: dagid is always an IPv6 address, not an opaque 128-bit string + IGMP: Add a length check + IP: Add a bounds check (Fix a heap overflow) + IP: Check before fetching the protocol version (Fix a heap overflow) + IP: Don't try to dissect if IP version != 4 (Fix a heap overflow) + IP: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP + IPComp: Check whether we have the CPI before we fetch it (Fix a heap overflow) + IPoFC: Fix -e output (IP-over-Fibre Channel) + IPv6: Don't overwrite the destination IPv6 address for routing headers + IPv6: Fix header printing + IPv6: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP + ISAKMP: Clean up parsing of IKEv2 Security Associations + ISOCLNS/IS-IS: Add support for Purge Originator Identifier (RFC6232) and test cases + ISOCLNS/IS-IS: Don't overwrite packet data when checking the signature + ISOCLNS/IS-IS: Filter out non-printable characters + ISOCLNS/IS-IS: Fix segmentation faults + ISOCLNS/IS-IS: Have signature_verify() do the copying and clearing + ISOCLNS: Add some bounds checks + Juniper: Make sure a Juniper header TLV isn't bigger than what's left in the packet (Fix a heap overflow) + LLC/SNAP: With -e, print the LLC header before the SNAP header; without it, cut the SNAP header + LLC: Add a bounds check (Fix a heap overflow) + LLC: Clean up printing of LLC packets + LLC: Fix the printing of RFC 948-style IP packets + LLC: Skip the LLC and SNAP headers with -x for 802.11 and some other protocols + LLDP: Implement IANA OUI and LLDP MUD option + MPLS LSP ping: Update printing for RFC 4379, bug fixes, more bounds checks + MPLS: "length" is now the *remaining* packet length + MPLS: Add bounds and length checks (Fix a heap overflow) + NFS: Add a test that makes unaligned accesses + NFS: Don't assume the ONC RPC header is nicely aligned + NFS: Don't overflow the Opaque_Handle buffer (Fix a segmentation fault) + NFS: Don't run past the end of an NFSv3 file handle + OLSR: Add a test to cover a HNA sgw case + OLSR: Fix 'Advertised networks' count + OLSR: Fix printing of smart-gateway HNAs in IPv4 + OSPF: Add a bounds check for the Hello packet options + OSPF: Do more bounds checking + OSPF: Fix a segmentation fault + OSPF: Fix printing 'ospf_topology_values' default + OTV: Add missing bounds checks + PGM: Print the formatted IP address, not the raw binary address, as a string + PIM: Add some bounds checking (Fix a heap overflow) + PIMv2: Fix checksumming of Register messages + PPI: Pass an adjusted struct pcap_pkthdr to the sub-printer + PPP: Add some bounds checks (Fix a heap overflow) + PPP: Report invalid PAP AACK/ANAK packets + Q.933: Add a missing bounds check + RADIUS: Add Value 13 "VLAN" to Tunnel-Type attribute + RADIUS: Filter out non-printable characters + RADIUS: Translate UDP/1700 as RADIUS + RESP: Do better checking of RESP packets + RPKI-RTR: Add a return value check for "fn_printn" call + RPKI-RTR: Remove printing when truncated condition already detected + RPL: Fix 'Consistency Check' control code + RPL: Fix suboption print + RSVP: An INTEGRITY object in a submessage covers only the submessage + RSVP: Fix an infinite loop; Add bounds and length checks + RSVP: Fix some if statements missing brackets + RSVP: Have signature_verify() do the copying and clearing + RTCP: Add some bounds checks + RTP: Add some bounds checks, fix two segmentation faults + SCTP: Do more bounds checking + SFLOW: Fix bounds checking + SLOW: Fix bugs, add checks + SMB: Before fetching the flags2 field, make sure we have it + SMB: Do bounds checks on NBNS resource types and resource data lengths + SNMP: Clean up the "have libsmi but no modules loaded" case + SNMP: Clean up the object abbreviation list and fix the code to match them + SNMP: Do bounds checks when printing character and octet strings + SNMP: Improve ASN.1 bounds checks + SNMP: More bounds and length checks + STP: Add a bunch of bounds checks, and fix some printing (Fix heap overflows) + STP: Filter out non-printable characters + TCP: Add bounds and length checks for packets with TCP option 20 + TCP: Correct TCP option Kind value for TCP Auth and add SCPS-TP + TCP: Fix two bounds checks (Fix heap overflows) + TCP: Make sure we have the data offset field before fetching it (Fix a heap overflow) + TCP: Put TCP-AO option decoding right + TFTP: Don't use strchr() to scan packet data (Fix a heap overflow) + Telnet: Add some bounds checks + TokenRing: Fix -e output + UDLD: Fix an infinite loop + UDP: Add a bounds check (Fix a heap overflow) + UDP: Check against the packet length first + UDP: Don't do the DDP-over-UDP heuristic check up front + VAT: Add some bounds checks + VTP: Add a test on Mgmt Domain Name length + VTP: Add bounds checks and filter out non-printable characters + VXLAN: Add a bound check and a test case + ZeroMQ: Fix an infinite loop + +Tuesday April 14, 2015 guy@alum.mit.edu + Summary for 4.8.0 tcpdump release + Fix "-x" for Apple PKTAP and PPI packets + Friday April 10, 2015 guy@alum.mit.edu Summary for 4.7.4 tcpdump release RPKI to Router Protocol: Fix Segmentation Faults and other problems @@ -464,10 +648,10 @@ Wed. November 12, 2003. mcr@sandelman. Tuesday, February 25, 2003. fenner@research.att.com. 3.7.2 release - Fixed infinite loop when parsing malformed isakmp packets. + Fixed infinite loop when parsing invalid isakmp packets. (reported by iDefense; already fixed in CVS) - Fixed infinite loop when parsing malformed BGP packets. - Fixed buffer overflow with certain malformed NFS packets. + Fixed infinite loop when parsing invalid BGP packets. + Fixed buffer overflow with certain invalid NFS packets. Pretty-print unprintable network names in 802.11 printer. Handle truncated nbp (appletalk) packets. Updated DHCPv6 printer to match draft-ietf-dhc-dhcpv6-22.txt Added: vendor/tcpdump/dist/CONTRIBUTING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tcpdump/dist/CONTRIBUTING Tue Jan 31 19:17:06 2017 (r313024) @@ -0,0 +1,103 @@ +Some Information for Contributors +--------------------------------- +You want to contribute to Tcpdump, Thanks! +Please, read these lines. + +1) Fork the Tcpdump repository on GitHub from + https://github.com/the-tcpdump-group/tcpdump + (See https://help.github.com/articles/fork-a-repo/) + +2) Setup an optional Travis-CI build + You can setup a travis build for your fork. So, you can test your changes + on Linux and OSX before sending pull requests. + (See http://docs.travis-ci.com/user/getting-started/) + +3) Clone your repository + git clone https://github.com//tcpdump.git + +4) Do a 'touch .devel' in your working directory. + Currently, the effect is + a) add (via configure, in Makefile) some warnings options ( -Wall + -Wmissing-prototypes -Wstrict-prototypes, ...) to the compiler if it + supports these options, + b) have the Makefile support "make depend" and the configure script run it. + +5) Configure and build + ./configure && make -s && make check + +6) Add/update sample.pcap files + We use tests directory to do regression tests on the dissection of captured + packets, by running tcpdump against a savefile sample.pcap, created with -w + option and comparing the results with a text file sample.out giving the + expected results. + + Any new/updated fields in a dissector must be present in a sample.pcap file + and the corresponding output file. + + Configuration is set in tests/TESTLIST. + Each line in this file has the following format: + test-name sample.pcap sample.out tcpdump-options + + the sample.out file can be build by: + (cd tests && ../tcpdump -n -r sample.pcap tcpdump-options > sample.out) + + It is often useful to have test outputs with different verbosity levels + (none, -v, -vv, -vvv, etc.) depending on the code. + +7) Test with 'make check' + Don't send a pull request if 'make check' gives failed tests. + +8) Rebase your commits against upstream/master + (To keep linearity) + +9) Initiate and send a pull request + (See https://help.github.com/articles/using-pull-requests/) + +Some remarks +------------ +a) A thorough reading of some other printers code is useful. + +b) Put the normative reference if any as comments (RFC, etc.). + +c) Put the format of packets/headers/options as comments. + +d) The printer may receive incomplete packet in the buffer, truncated at any + random position, for example by capturing with '-s size' option. + Thus use ND_TTEST, ND_TTEST2, ND_TCHECK or ND_TCHECK2 for bound checking. + For ND_TCHECK2: + Define : static const char tstr[] = " [|protocol]"; + Define a label: trunc + Print with: ND_PRINT((ndo, "%s", tstr)); + You can test the code via: + sudo ./tcpdump -s snaplen [-v][v][...] -i lo # in a terminal + sudo tcpreplay -i lo sample.pcap # in another terminal + You should try several values for snaplen to do various truncation. + +e) Do invalid packet checks in code: Think that your code can receive in input + not only a valid packet but any arbitrary random sequence of octets (packet + - built malformed originally by the sender or by a fuzz tester, + - became corrupted in transit). + Print with: ND_PRINT((ndo, "%s", istr)); /* to print " (invalid)" */ + +f) Use 'struct tok' for indexed strings and print them with + tok2str() or bittok2str() (for flags). + +g) Avoid empty lines in output of printers. + +h) A commit message must have: + First line: Capitalized short summary in the imperative (70 chars or less) + + Body: Detailed explanatory text, if necessary. Fold it to approximately + 72 characters. There must be an empty line separating the summary from + the body. + +i) Avoid non-ASCII characters in code and commit messages. + +j) Use the style of the modified sources. + +k) Don't mix declarations and code + +l) Don't use // for comments + Not all C compilers accept C++/C99 comments by default. + +m) Avoid trailing tabs/spaces Modified: vendor/tcpdump/dist/CREDITS ============================================================================== --- vendor/tcpdump/dist/CREDITS Tue Jan 31 19:12:28 2017 (r313023) +++ vendor/tcpdump/dist/CREDITS Tue Jan 31 19:17:06 2017 (r313024) @@ -20,11 +20,13 @@ Additional people who have contributed p Andrea Bittau Andrew Brown Andrew Church + Andrew Darqui Andrew Hintz Andrew Nording Andrew Tridgell Andy Heffernan Anton Bernal + Antonin Décimo Arkadiusz Miskiewicz Armando L. Caro Jr. Arnaldo Carvalho de Melo @@ -33,6 +35,7 @@ Additional people who have contributed p Ben Byer Ben Smithurst Bert Vermeulen + Bill Parker Bjoern A. Zeeb Bram Brent L. Bates @@ -95,6 +98,7 @@ Additional people who have contributed p Jason R. Thorpe Jefferson Ogata Jeffrey Hutzelman + Jean-Raphaël Gaglione Jesper Peterson Jesse Gross Jim Hutchins @@ -119,7 +123,7 @@ Additional people who have contributed p Larry Lile Lennert Buytenhek Loganaden Velvindron - Longinus00 + Daniel Lee Loris Degioanni Love Hörnquist-Åstrand Lucas C. Villa Real @@ -134,6 +138,7 @@ Additional people who have contributed p Markus Schöpflin Marshall Rose Martin Husemann + Matthieu Boutier Max Laier Michael A. Meffie III Michael Madore Modified: vendor/tcpdump/dist/INSTALL.txt ============================================================================== --- vendor/tcpdump/dist/INSTALL.txt Tue Jan 31 19:12:28 2017 (r313023) +++ vendor/tcpdump/dist/INSTALL.txt Tue Jan 31 19:17:06 2017 (r313024) @@ -49,9 +49,10 @@ addrtoname.c - address to hostname routi addrtoname.h - address to hostname definitions ah.h - IPSEC Authentication Header definitions appletalk.h - AppleTalk definitions +ascii_strcasecmp.c - locale-independent case-independent string comparison + routines atime.awk - TCP ack awk script atm.h - ATM traffic type definitions -atmuni31.h - ATM Q.2931 definitions bpf_dump.c - BPF program printing routines, in case libpcap doesn't have them chdlc.h - Cisco HDLC definitions @@ -100,100 +101,8 @@ pcap_dump_ftell.c - pcap_dump_ftell() im doesn't have it pcap-missing.h - declarations of functions possibly missing from libpcap ppp.h - Point to Point Protocol definitions -print-802_11.c - IEEE 802.11 printer routines -print-ap1394.c - Apple IP-over-IEEE 1394 printer routines -print-ah.c - IPSEC Authentication Header printer routines -print-aodv.c - AODV printer routines -print-arcnet.c - ARCNET printer routines -print-arp.c - Address Resolution Protocol printer routines -print-ascii.c - ASCII packet dump routines -print-atalk.c - AppleTalk printer routines -print-atm.c - ATM printer routines -print-beep.c - BEEP printer routines -print-bgp.c - Border Gateway Protocol printer routines -print-bootp.c - BOOTP and IPv4 DHCP printer routines -print-bt.c - Bluetooth printer routines -print-cdp.c - Cisco Discovery Protocol printer routines -print-chdlc.c - Cisco HDLC printer routines -print-cip.c - Classical-IP over ATM routines -print-cnfp.c - Cisco NetFlow printer routines -print-dccp.c - DCCP printer routines -print-decnet.c - DECnet printer routines -print-dhcp6.c - IPv6 DHCP printer routines -print-domain.c - Domain Name System printer routines -print-dvmrp.c - Distance Vector Multicast Routing Protocol printer routines -print-eap.c - EAP printer routines -print-enc.c - OpenBSD IPsec encapsulation BPF layer printer routines -print-egp.c - External Gateway Protocol printer routines -print-esp.c - IPSEC Encapsulating Security Payload printer routines -print-ether.c - Ethernet printer routines -print-fddi.c - Fiber Distributed Data Interface printer routines -print-fr.c - Frame Relay printer routines -print-frag6.c - IPv6 fragmentation header printer routines -print-gre.c - Generic Routing Encapsulation printer routines -print-hsrp.c - Cisco Hot Standby Router Protocol printer routines -print-icmp.c - Internet Control Message Protocol printer routines -print-icmp6.c - IPv6 Internet Control Message Protocol printer routines -print-igmp.c - Internet Group Management Protocol printer routines -print-igrp.c - Interior Gateway Routing Protocol printer routines -print-ip.c - IP printer routines -print-ip6.c - IPv6 printer routines -print-ip6opts.c - IPv6 header option printer routines -print-ipcomp.c - IP Payload Compression Protocol printer routines -print-ipx.c - IPX printer routines -print-isakmp.c - Internet Security Association and Key Management Protocol -print-isoclns.c - ISO CLNS, ESIS, and ISIS printer routines -print-krb.c - Kerberos printer routines -print-l2tp.c - Layer Two Tunneling Protocol printer routines -print-lane.c - ATM LANE printer routines -print-llc.c - IEEE 802.2 LLC printer routines -print-lspping.c - LSPPING printer routines -print-lwres.c - Lightweight Resolver protocol printer routines -print-mobile.c - IPv4 mobility printer routines -print-mobility.c - IPv6 mobility printer routines -print-mpls.c - Multi-Protocol Label Switching printer routines -print-msdp.c - Multicast Source Discovery Protocol printer routines -print-nfs.c - Network File System printer routines -print-ntp.c - Network Time Protocol printer routines -print-null.c - BSD loopback device printer routines -print-ospf.c - Open Shortest Path First printer routines -print-ospf6.c - IPv6 Open Shortest Path First printer routines -print-pflog.c - OpenBSD packet filter log file printer routines -print-pgm.c - Pragmatic General Multicast printer routines -print-pim.c - Protocol Independent Multicast printer routines -print-ppp.c - Point to Point Protocol printer routines -print-pppoe.c - PPP-over-Ethernet printer routines -print-pptp.c - Point-to-Point Tunnelling Protocol printer routines -print-radius.c - Radius protocol printer routines -print-raw.c - Raw IP printer routines -print-rip.c - Routing Information Protocol printer routines -print-ripng.c - IPv6 Routing Information Protocol printer routines -print-rrcp.c - Realtek Remote Control Protocol routines -print-rsvp.c - Resource reSerVation Protocol (RSVP) printer routines -print-rt6.c - IPv6 routing header printer routines -print-rx.c - AFS RX printer routines -print-sctp.c - Stream Control Transmission Protocol printer routines -print-sip.c - SIP printer routines -print-sl.c - Compressed Serial Line Internet Protocol printer routines -print-sll.c - Linux "cooked" capture printer routines -print-slow.c - IEEE "slow protocol" (802.3ad) printer routines -print-smb.c - SMB/CIFS printer routines -print-snmp.c - Simple Network Management Protocol printer routines -print-stp.c - IEEE 802.1d spanning tree protocol printer routines -print-sunatm.c - SunATM DLPI capture printer routines -print-sunrpc.c - Sun Remote Procedure Call printer routines -print-symantec.c - Symantec Enterprise Firewall printer routines -print-tcp.c - TCP printer routines -print-telnet.c - Telnet option printer routines -print-tftp.c - Trivial File Transfer Protocol printer routines -print-timed.c - BSD time daemon protocol printer routines -print-token.c - Token Ring printer routines -print-udp.c - UDP printer routines -print-usb.c - USB printer routines -print-vjc.c - PPP Van Jacobson compression (RFC1144) printer routines -print-vrrp.c - Virtual Router Redundancy Protocol -print-wb.c - White Board printer routines -print-zephyr.c - Zephyr printer routines +print.c - Top-level routines for protocol printing +print-*.c - The netdissect printers rpc_auth.h - definitions for ONC RPC authentication rpc_msg.h - definitions for ONC RPC messages send-ack.awk - unidirectional tcp send/ack awk script @@ -203,11 +112,11 @@ slcompress.h - SLIP/PPP Van Jacobson com smb.h - SMB/CIFS definitions smbutil.c - SMB/CIFS utility routines stime.awk - TCP send awk script -strcasecmp.c - missing routine tcp.h - TCP definitions tcpdump.1 - manual entry tcpdump.c - main program +timeval-operations.h - timeval operations macros udp.h - UDP definitions -util.c - utility routines +util-print.c - utility routines for protocol printers vfprintf.c - emulation routine win32 - headers and routines for building on Win32 systems Modified: vendor/tcpdump/dist/Makefile.in ============================================================================== --- vendor/tcpdump/dist/Makefile.in Tue Jan 31 19:12:28 2017 (r313023) +++ vendor/tcpdump/dist/Makefile.in Tue Jan 31 19:17:06 2017 (r313024) @@ -74,7 +74,9 @@ CSRC = setsignal.c tcpdump.c LIBNETDISSECT_SRC=\ addrtoname.c \ + addrtostr.c \ af.c \ + ascii_strcasecmp.c \ checksum.c \ cpack.c \ gmpls.c \ @@ -86,6 +88,7 @@ LIBNETDISSECT_SRC=\ nlpid.c \ oui.c \ parsenfsfh.c \ + print.c \ print-802_11.c \ print-802_15_4.c \ print-ah.c \ @@ -98,6 +101,7 @@ LIBNETDISSECT_SRC=\ print-ascii.c \ print-atalk.c \ print-atm.c \ + print-babel.c \ print-beep.c \ print-bfd.c \ print-bgp.c \ @@ -112,6 +116,7 @@ LIBNETDISSECT_SRC=\ print-cnfp.c \ print-dccp.c \ print-decnet.c \ + print-dhcp6.c \ print-domain.c \ print-dtp.c \ print-dvmrp.c \ @@ -124,17 +129,21 @@ LIBNETDISSECT_SRC=\ print-fddi.c \ print-forces.c \ print-fr.c \ + print-frag6.c \ print-ftp.c \ print-geneve.c \ print-geonet.c \ print-gre.c \ + print-hncp.c \ print-hsrp.c \ print-http.c \ print-icmp.c \ + print-icmp6.c \ print-igmp.c \ print-igrp.c \ print-ip.c \ print-ip6.c \ + print-ip6opts.c \ print-ipcomp.c \ print-ipfc.c \ print-ipnet.c \ @@ -146,6 +155,7 @@ LIBNETDISSECT_SRC=\ print-l2tp.c \ print-lane.c \ print-ldp.c \ + print-lisp.c \ print-llc.c \ print-lldp.c \ print-lmp.c \ @@ -154,7 +164,9 @@ LIBNETDISSECT_SRC=\ print-lwapp.c \ print-lwres.c \ print-m3ua.c \ + print-medsa.c \ print-mobile.c \ + print-mobility.c \ print-mpcp.c \ print-mpls.c \ print-mptcp.c \ @@ -162,12 +174,14 @@ LIBNETDISSECT_SRC=\ print-msnlb.c \ print-nflog.c \ print-nfs.c \ + print-nsh.c \ print-ntp.c \ print-null.c \ print-olsr.c \ print-openflow-1.0.c \ print-openflow.c \ print-ospf.c \ + print-ospf6.c \ print-otv.c \ print-pgm.c \ print-pim.c \ @@ -178,10 +192,13 @@ LIBNETDISSECT_SRC=\ print-pptp.c \ print-radius.c \ print-raw.c \ + print-resp.c \ print-rip.c \ + print-ripng.c \ print-rpki-rtr.c \ print-rrcp.c \ print-rsvp.c \ + print-rt6.c \ print-rtsp.c \ print-rx.c \ print-sctp.c \ @@ -211,11 +228,14 @@ LIBNETDISSECT_SRC=\ print-vrrp.c \ print-vtp.c \ print-vxlan.c \ + print-vxlan-gpe.c \ print-wb.c \ print-zephyr.c \ print-zeromq.c \ + netdissect.c \ signature.c \ - util.c + strtoaddr.c \ + util-print.c LOCALSRC = @LOCALSRC@ GENSRC = version.c @@ -232,11 +252,12 @@ SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LI OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LIBNETDISSECT_OBJ) HDR = \ addrtoname.h \ + addrtostr.h \ af.h \ ah.h \ appletalk.h \ + ascii_strcasecmp.h \ atm.h \ - atmuni31.h \ chdlc.h \ cpack.h \ ether.h \ @@ -264,6 +285,7 @@ HDR = \ oui.h \ pcap-missing.h \ ppp.h \ + print.h \ rpc_auth.h \ rpc_msg.h \ rpl.h \ @@ -271,14 +293,15 @@ HDR = \ signature.h \ slcompress.h \ smb.h \ + strtoaddr.h \ tcp.h \ - tcpdump-stdinc.h \ + netdissect-stdinc.h \ + timeval-operations.h \ udp.h TAGHDR = \ /usr/include/arpa/tftp.h \ /usr/include/net/if_arp.h \ - /usr/include/net/slip.h \ /usr/include/netinet/if_ether.h \ /usr/include/netinet/in.h \ /usr/include/netinet/ip_icmp.h \ @@ -292,11 +315,14 @@ CLEANFILES = $(PROG) $(OBJ) $(GENSRC) EXTRA_DIST = \ CHANGES \ + CONTRIBUTING \ CREDITS \ INSTALL.txt \ LICENSE \ Makefile.in \ Makefile-devel-adds \ + PLATFORMS \ + README \ README.md \ Readme.Win32 \ VERSION \ @@ -314,14 +340,9 @@ EXTRA_DIST = \ lbl/os-sunos4.h \ lbl/os-ultrix4.h \ makemib \ - missing/addrinfo.h \ missing/dlnames.c \ missing/datalinks.c \ - missing/getnameinfo.c \ missing/getopt_long.c \ - missing/inet_aton.c \ - missing/inet_ntop.c \ - missing/inet_pton.c \ missing/snprintf.c \ missing/strdup.c \ missing/strlcat.c \ @@ -330,27 +351,19 @@ EXTRA_DIST = \ mkdep \ packetdat.awk \ pcap_dump_ftell.c \ - print-babel.c \ - print-dhcp6.c \ - print-frag6.c \ - print-icmp6.c \ - print-ip6opts.c \ - print-mobility.c \ - print-ospf6.c \ print-pflog.c \ - print-ripng.c \ - print-rt6.c \ print-smb.c \ send-ack.awk \ smbutil.c \ stime.awk \ - strcasecmp.c \ tcpdump.1.in \ vfprintf.c \ - win32/Include/w32_fzs.h \ win32/prj/GNUmakefile \ win32/prj/WinDump.dsp \ - win32/prj/WinDump.dsw + win32/prj/WinDump.dsw \ + win32/prj/WinDump.sln \ + win32/prj/WinDump.vcproj \ + win32/src/ether_ntohost.c TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print` @@ -369,16 +382,8 @@ datalinks.o: $(srcdir)/missing/datalinks $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c dlnames.o: $(srcdir)/missing/dlnames.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c -getnameinfo.o: $(srcdir)/missing/getnameinfo.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c getopt_long.o: $(srcdir)/missing/getopt_long.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c -inet_pton.o: $(srcdir)/missing/inet_pton.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c -inet_ntop.o: $(srcdir)/missing/inet_ntop.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c -inet_aton.o: $(srcdir)/missing/inet_aton.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c snprintf.o: $(srcdir)/missing/snprintf.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c strdup.o: $(srcdir)/missing/strdup.c @@ -434,6 +439,9 @@ distclean: check: tcpdump (cd tests && ./TESTrun.sh) +extags: $(TAGFILES) + ctags $(TAGFILES) + tags: $(TAGFILES) ctags -wtd $(TAGFILES) Added: vendor/tcpdump/dist/PLATFORMS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tcpdump/dist/PLATFORMS Tue Jan 31 19:17:06 2017 (r313024) @@ -0,0 +1,9 @@ +== Tested platforms == +NetBSD 5.1/i386 (mcr - 2012/4/1) +Debian Linux (squeeze/i386) (mcr - 2012/4/1) + +--- +RedHat Linux 6.1/i386 (assar) +FreeBSD 2.2.8/i386 (itojun) + + Added: vendor/tcpdump/dist/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tcpdump/dist/README Tue Jan 31 19:17:06 2017 (r313024) @@ -0,0 +1 @@ +link README.md \ No newline at end of file Modified: vendor/tcpdump/dist/VERSION ============================================================================== --- vendor/tcpdump/dist/VERSION Tue Jan 31 19:12:28 2017 (r313023) +++ vendor/tcpdump/dist/VERSION Tue Jan 31 19:17:06 2017 (r313024) @@ -1 +1 @@ -4.7.4 +4.9.0 Modified: vendor/tcpdump/dist/aclocal.m4 ============================================================================== --- vendor/tcpdump/dist/aclocal.m4 Tue Jan 31 19:12:28 2017 (r313023) +++ vendor/tcpdump/dist/aclocal.m4 Tue Jan 31 19:17:06 2017 (r313024) @@ -219,6 +219,36 @@ AC_DEFUN(AC_LBL_C_INIT, ]) dnl +dnl Check whether, if you pass an unknown warning option to the +dnl compiler, it fails or just prints a warning message and succeeds. +dnl Set ac_lbl_unknown_warning_option_error to the appropriate flag +dnl to force an error if it would otherwise just print a warning message +dnl and succeed. +dnl +AC_DEFUN(AC_LBL_CHECK_UNKNOWN_WARNING_OPTION_ERROR, + [ + AC_MSG_CHECKING([whether the compiler fails when given an unknown warning option]) + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy" + AC_TRY_COMPILE( + [], + [return 0], + [ + AC_MSG_RESULT([no]) + # + # We're assuming this is clang, where + # -Werror=unknown-warning-option is the appropriate + # option to force the compiler to fail. + # + ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option" + ], + [ + AC_MSG_RESULT([yes]) + ]) + CFLAGS="$save_CFLAGS" + ]) + +dnl dnl Check whether the compiler option specified as the second argument dnl is supported by the compiler and, if so, add it to the macro dnl specified as the first argument @@ -227,7 +257,18 @@ AC_DEFUN(AC_LBL_CHECK_COMPILER_OPT, [ AC_MSG_CHECKING([whether the compiler supports the $2 option]) save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors $2" + if expr "x$2" : "x-W.*" >/dev/null + then + CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error $2" + elif expr "x$2" : "x-f.*" >/dev/null + then + CFLAGS="$CFLAGS -Werror $2" + elif expr "x$2" : "x-m.*" >/dev/null + then + CFLAGS="$CFLAGS -Werror $2" + else + CFLAGS="$CFLAGS $2" + fi AC_TRY_COMPILE( [], [return 0], @@ -942,11 +983,18 @@ AC_DEFUN(AC_LBL_DEVEL, # Skip all the warning option stuff on some compilers. # if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then + AC_LBL_CHECK_UNKNOWN_WARNING_OPTION_ERROR() AC_LBL_CHECK_COMPILER_OPT($1, -Wall) AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-prototypes) AC_LBL_CHECK_COMPILER_OPT($1, -Wstrict-prototypes) AC_LBL_CHECK_COMPILER_OPT($1, -Wwrite-strings) AC_LBL_CHECK_COMPILER_OPT($1, -Wpointer-arith) + AC_LBL_CHECK_COMPILER_OPT($1, -Wcast-qual) + AC_LBL_CHECK_COMPILER_OPT($1, -Wshadow) + AC_LBL_CHECK_COMPILER_OPT($1, -Wdeclaration-after-statement) + AC_LBL_CHECK_COMPILER_OPT($1, -Wpedantic) + AC_LBL_CHECK_COMPILER_OPT($1, -Wold-style-definition) + AC_LBL_CHECK_COMPILER_OPT($1, -Wused-but-marked-unused) AC_LBL_CHECK_COMPILER_OPT($1, -W) fi AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT() @@ -1114,131 +1162,6 @@ dnl OUT OF THE USE OF THIS SOFTWARE, EVE dnl SUCH DAMAGE. dnl -dnl Checks to see if AF_INET6 is defined -AC_DEFUN(AC_CHECK_AF_INET6, [ - AC_MSG_CHECKING(for AF_INET6) - AC_CACHE_VAL($1, - AC_TRY_COMPILE([ -# include -# include ], - [int a = AF_INET6], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 = yes ; then - AC_DEFINE(HAVE_AF_INET6) - fi -]) - -dnl -dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member -dnl borrowed from LBL libpcap -AC_DEFUN(AC_CHECK_SA_LEN, [ - AC_MSG_CHECKING(if sockaddr struct has sa_len member) - AC_CACHE_VAL($1, - AC_TRY_COMPILE([ -# include -# include ], - [u_int i = sizeof(((struct sockaddr *)0)->sa_len)], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 = yes ; then - AC_DEFINE(HAVE_SOCKADDR_SA_LEN) - fi -]) - -dnl -dnl Checks for addrinfo structure -AC_DEFUN(AC_STRUCT_ADDRINFO, [ - AC_MSG_CHECKING(for addrinfo) - AC_CACHE_VAL($1, - AC_TRY_COMPILE([ -# include ], - [struct addrinfo a], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 = yes; then - AC_DEFINE(HAVE_ADDRINFO, 1, - [define if you have the addrinfo function]) - else - AC_DEFINE(NEED_ADDRINFO_H, 1, - [define if you need to include missing/addrinfo.h]) - fi -]) - -dnl -dnl Checks for NI_MAXSERV -AC_DEFUN(AC_NI_MAXSERV, [ - AC_MSG_CHECKING(for NI_MAXSERV) - AC_CACHE_VAL($1, - AC_EGREP_CPP(yes, [#include -#ifdef NI_MAXSERV -yes -#endif], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 != yes; then - AC_DEFINE(NEED_ADDRINFO_H) - fi -]) - -dnl -dnl Checks for NI_NAMEREQD -AC_DEFUN(AC_NI_NAMEREQD, [ - AC_MSG_CHECKING(for NI_NAMEREQD) - AC_CACHE_VAL($1, - AC_EGREP_CPP(yes, [#include -#ifdef NI_NOFQDN -yes -#endif], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 != yes; then - AC_DEFINE(NEED_ADDRINFO_H) - fi -]) - -dnl -dnl Checks for sockaddr_storage structure -AC_DEFUN(AC_STRUCT_SA_STORAGE, [ - AC_MSG_CHECKING(for sockaddr_storage) - AC_CACHE_VAL($1, - AC_TRY_COMPILE([ -# include -# include ], - [struct sockaddr_storage s], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 = yes; then - AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, - [define if you have struct sockaddr_storage]) - fi -]) - -dnl -dnl check for h_errno -AC_DEFUN(AC_VAR_H_ERRNO, [ - AC_MSG_CHECKING(for h_errno) - AC_CACHE_VAL(ac_cv_var_h_errno, - AC_TRY_COMPILE([ -# include -# include ], - [int foo = h_errno;], - ac_cv_var_h_errno=yes, - ac_cv_var_h_errno=no)) - AC_MSG_RESULT($ac_cv_var_h_errno) - if test "$ac_cv_var_h_errno" = "yes"; then - AC_DEFINE(HAVE_H_ERRNO, 1, - [define if you have the h_errno variable]) - fi -]) - -dnl dnl Test for __attribute__ dnl Modified: vendor/tcpdump/dist/addrtoname.c ============================================================================== --- vendor/tcpdump/dist/addrtoname.c Tue Jan 31 19:12:28 2017 (r313023) +++ vendor/tcpdump/dist/addrtoname.c Tue Jan 31 19:17:06 2017 (r313024) @@ -22,12 +22,11 @@ * and address to string conversion routines */ -#define NETDISSECT_REWORKED #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include +#include #ifdef USE_ETHER_NTOHOST #ifdef HAVE_NETINET_IF_ETHER_H @@ -58,8 +57,10 @@ extern int ether_ntohost(char *, const s #include #include -#include "interface.h" +#include "netdissect.h" #include "addrtoname.h" +#include "addrtostr.h" +#include "ethertype.h" #include "llc.h" #include "setsignal.h" #include "extract.h" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jan 31 20:13:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA5D3CCAFEB; Tue, 31 Jan 2017 20:13:51 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E291E56; Tue, 31 Jan 2017 20:13:51 +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 v0VKDoXh055370; Tue, 31 Jan 2017 20:13:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VKDocD055369; Tue, 31 Jan 2017 20:13:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201701312013.v0VKDocD055369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 31 Jan 2017 20:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313025 - head/tests/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 20:13:52 -0000 Author: asomers Date: Tue Jan 31 20:13:50 2017 New Revision: 313025 URL: https://svnweb.freebsd.org/changeset/base/313025 Log: Add tests for multi-fib IPv6 routing PR: 196361 Submitted by: jhujhiti@adjectivism.org Reported by: Jason Healy MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/tests/sys/netinet/fibs_test.sh Modified: head/tests/sys/netinet/fibs_test.sh ============================================================================== --- head/tests/sys/netinet/fibs_test.sh Tue Jan 31 19:17:06 2017 (r313024) +++ head/tests/sys/netinet/fibs_test.sh Tue Jan 31 20:13:50 2017 (r313025) @@ -75,9 +75,9 @@ arpresolve_checks_interface_fib_body() get_fibs 2 # Configure TAP interfaces - setup_tap "$FIB0" ${ADDR0} ${MASK0} + setup_tap "$FIB0" inet ${ADDR0} ${MASK0} TAP0=$TAP - setup_tap "$FIB1" ${ADDR1} ${MASK1} + setup_tap "$FIB1" inet ${ADDR1} ${MASK1} TAP1=$TAP # Simulate a crossover cable @@ -112,7 +112,7 @@ arpresolve_checks_interface_fib_cleanup( atf_test_case loopback_and_network_routes_on_nondefault_fib cleanup loopback_and_network_routes_on_nondefault_fib_head() { - atf_set "descr" "When creating and deleting loopback routes, use the interface's fib" + atf_set "descr" "When creating and deleting loopback IPv4 routes, use the interface's fib" atf_set "require.user" "root" atf_set "require.config" "fibs" } @@ -132,7 +132,7 @@ loopback_and_network_routes_on_nondefaul get_fibs 1 # Configure a TAP interface - setup_tap ${FIB0} ${ADDR} ${MASK} + setup_tap ${FIB0} inet ${ADDR} ${MASK} # Check whether the host route exists in only the correct FIB setfib ${FIB0} netstat -rn -f inet | grep -q "^${ADDR}.*UHS.*lo0" @@ -156,7 +156,7 @@ loopback_and_network_routes_on_nondefaul setfib 0 netstat -rn -f inet | \ grep -q "^${SUBNET}/${MASK}.*${TAPD}" if [ 0 -eq $? ]; then - setfib ${FIB0} netstat -rn -f inet + setfib 0 netstat -rn -f inet atf_fail "Network route appeared in the wrong FIB" fi } @@ -166,12 +166,70 @@ loopback_and_network_routes_on_nondefaul cleanup_tap } +atf_test_case loopback_and_network_routes_on_nondefault_fib_inet6 cleanup +loopback_and_network_routes_on_nondefault_fib_inet6_head() +{ + atf_set "descr" "When creating and deleting loopback IPv6 routes, use the interface's fib" + atf_set "require.user" "root" + atf_set "require.config" "fibs" +} + +loopback_and_network_routes_on_nondefault_fib_inet6_body() +{ + atf_expect_fail "PR196361 IPv6 network routes don't respect net.add_addr_allfibs=0" + # Configure the TAP interface to use a nonrouteable RFC3849 + # address and a non-default fib + ADDR="2001:db8::2" + SUBNET="2001:db8::" + MASK="64" + + # Check system configuration + if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then + atf_skip "This test requires net.add_addr_allfibs=0" + fi + get_fibs 1 + + # Configure a TAP interface + setup_tap ${FIB0} inet6 ${ADDR} ${MASK} + + # Check whether the host route exists in only the correct FIB + setfib ${FIB0} netstat -rn -f inet6 | grep -q "^${ADDR}.*UHS.*lo0" + if [ 0 -ne $? ]; then + setfib ${FIB0} netstat -rn -f inet6 + atf_fail "Host route did not appear in the correct FIB" + fi + setfib 0 netstat -rn -f inet6 | grep -q "^${ADDR}.*UHS.*lo0" + if [ 0 -eq $? ]; then + setfib 0 netstat -rn -f inet6 + atf_fail "Host route appeared in the wrong FIB" + fi + + # Check whether the network route exists in only the correct FIB + setfib ${FIB0} netstat -rn -f inet6 | \ + grep -q "^${SUBNET}/${MASK}.*${TAPD}" + if [ 0 -ne $? ]; then + setfib ${FIB0} netstat -rn -f inet6 + atf_fail "Network route did not appear in the correct FIB" + fi + setfib 0 netstat -rn -f inet6 | \ + grep -q "^${SUBNET}/${MASK}.*${TAPD}" + if [ 0 -eq $? ]; then + setfib 0 netstat -rn -f inet6 + atf_fail "Network route appeared in the wrong FIB" + fi +} + +loopback_and_network_routes_on_nondefault_fib_inet6_cleanup() +{ + cleanup_tap +} + # Regression test for kern/187552 atf_test_case default_route_with_multiple_fibs_on_same_subnet cleanup default_route_with_multiple_fibs_on_same_subnet_head() { - atf_set "descr" "Multiple interfaces on the same subnet but with different fibs can both have default routes" + atf_set "descr" "Multiple interfaces on the same subnet but with different fibs can both have default IPv4 routes" atf_set "require.user" "root" atf_set "require.config" "fibs" } @@ -193,9 +251,9 @@ default_route_with_multiple_fibs_on_same get_fibs 2 # Configure TAP interfaces - setup_tap "$FIB0" ${ADDR0} ${MASK} + setup_tap "$FIB0" inet ${ADDR0} ${MASK} TAP0=$TAP - setup_tap "$FIB1" ${ADDR1} ${MASK} + setup_tap "$FIB1" inet ${ADDR1} ${MASK} TAP1=$TAP # Attempt to add default routes @@ -215,6 +273,53 @@ default_route_with_multiple_fibs_on_same cleanup_tap } +atf_test_case default_route_with_multiple_fibs_on_same_subnet_inet6 cleanup +default_route_with_multiple_fibs_on_same_subnet_inet6_head() +{ + atf_set "descr" "Multiple interfaces on the same subnet but with different fibs can both have default IPv6 routes" + atf_set "require.user" "root" + atf_set "require.config" "fibs" +} + +default_route_with_multiple_fibs_on_same_subnet_inet6_body() +{ + # Configure the TAP interfaces to use nonrouteable RFC3849 + # addresses and non-default FIBs + ADDR0="2001:db8::2" + ADDR1="2001:db8::3" + GATEWAY="2001:db8::1" + SUBNET="2001:db8::" + MASK="64" + + # Check system configuration + if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then + atf_skip "This test requires net.add_addr_allfibs=0" + fi + get_fibs 2 + + # Configure TAP interfaces + setup_tap "$FIB0" inet6 ${ADDR0} ${MASK} + TAP0=$TAP + setup_tap "$FIB1" inet6 ${ADDR1} ${MASK} + TAP1=$TAP + + # Attempt to add default routes + setfib ${FIB0} route -6 add default ${GATEWAY} + setfib ${FIB1} route -6 add default ${GATEWAY} + + # Verify that the default route exists for both fibs, with their + # respective interfaces. + atf_check -o match:"^default.*${TAP0}$" \ + setfib ${FIB0} netstat -rn -f inet6 + atf_check -o match:"^default.*${TAP1}$" \ + setfib ${FIB1} netstat -rn -f inet6 +} + +default_route_with_multiple_fibs_on_same_subnet_inet6_cleanup() +{ + cleanup_tap +} + # Regression test for PR kern/189089 # Create two tap interfaces and assign them both the same IP address but with @@ -223,7 +328,7 @@ default_route_with_multiple_fibs_on_same atf_test_case same_ip_multiple_ifaces_fib0 cleanup same_ip_multiple_ifaces_fib0_head() { - atf_set "descr" "Can remove an IP alias from an interface when the same IP is also assigned to another interface." + atf_set "descr" "Can remove an IPv4 alias from an interface when the same IPv4 is also assigned to another interface." atf_set "require.user" "root" atf_set "require.config" "fibs" } @@ -237,16 +342,16 @@ same_ip_multiple_ifaces_fib0_body() # of net.add_addr_allfibs # Setup the interfaces, then remove one alias. It should not panic. - setup_tap 0 ${ADDR} ${MASK0} + setup_tap 0 inet ${ADDR} ${MASK0} TAP0=${TAP} - setup_tap 0 ${ADDR} ${MASK1} + setup_tap 0 inet ${ADDR} ${MASK1} TAP1=${TAP} ifconfig ${TAP1} -alias ${ADDR} # Do it again, in the opposite order. It should not panic. - setup_tap 0 ${ADDR} ${MASK0} + setup_tap 0 inet ${ADDR} ${MASK0} TAP0=${TAP} - setup_tap 0 ${ADDR} ${MASK1} + setup_tap 0 inet ${ADDR} ${MASK1} TAP1=${TAP} ifconfig ${TAP0} -alias ${ADDR} } @@ -266,7 +371,7 @@ same_ip_multiple_ifaces_fib0_cleanup() atf_test_case same_ip_multiple_ifaces cleanup same_ip_multiple_ifaces_head() { - atf_set "descr" "Can remove an IP alias from an interface when the same IP is also assigned to another interface, on non-default FIBs." + atf_set "descr" "Can remove an IPv4 alias from an interface when the same address is also assigned to another interface, on non-default FIBs." atf_set "require.user" "root" atf_set "require.config" "fibs" } @@ -282,18 +387,18 @@ same_ip_multiple_ifaces_body() get_fibs 2 # Setup the interfaces, then remove one alias. It should not panic. - setup_tap ${FIB0} ${ADDR} ${MASK0} + setup_tap ${FIB0} inet ${ADDR} ${MASK0} TAP0=${TAP} - setup_tap ${FIB1} ${ADDR} ${MASK1} + setup_tap ${FIB1} inet ${ADDR} ${MASK1} TAP1=${TAP} ifconfig ${TAP1} -alias ${ADDR} atf_check -o not-match:"^${ADDR}[[:space:]]" \ setfib ${FIB1} netstat -rn -f inet # Do it again, in the opposite order. It should not panic. - setup_tap ${FIB0} ${ADDR} ${MASK0} + setup_tap ${FIB0} inet ${ADDR} ${MASK0} TAP0=${TAP} - setup_tap ${FIB1} ${ADDR} ${MASK1} + setup_tap ${FIB1} inet ${ADDR} ${MASK1} TAP1=${TAP} ifconfig ${TAP0} -alias ${ADDR} atf_check -o not-match:"^${ADDR}[[:space:]]" \ @@ -304,15 +409,58 @@ same_ip_multiple_ifaces_cleanup() # Due to PR kern/189088, we must destroy the interfaces in LIFO order # in order for the routes to be correctly cleaned up. for TAPD in `tail -r "tap_devices_to_cleanup"`; do + echo ifconfig ${TAPD} destroy ifconfig ${TAPD} destroy done } +atf_test_case same_ip_multiple_ifaces_inet6 cleanup +same_ip_multiple_ifaces_inet6_head() +{ + atf_set "descr" "Can remove an IPv6 alias from an interface when the same address is also assigned to another interface, on non-default FIBs." + atf_set "require.user" "root" + atf_set "require.config" "fibs" +} +same_ip_multiple_ifaces_inet6_body() +{ + ADDR="2001:db8::2" + MASK0="64" + MASK1="128" + + # Unlike most of the tests in this file, this is applicable regardless + # of net.add_addr_allfibs + get_fibs 2 + + # Setup the interfaces, then remove one alias. It should not panic. + setup_tap ${FIB0} inet6 ${ADDR} ${MASK0} + TAP0=${TAP} + setup_tap ${FIB1} inet6 ${ADDR} ${MASK1} + TAP1=${TAP} + atf_check -s exit:0 ifconfig ${TAP1} inet6 ${ADDR} -alias + atf_check -o not-match:"^${ADDR}[[:space:]]" \ + setfib ${FIB1} netstat -rn -f inet6 + ifconfig ${TAP1} destroy + ifconfig ${TAP0} destroy + + # Do it again, in the opposite order. It should not panic. + setup_tap ${FIB0} inet6 ${ADDR} ${MASK0} + TAP0=${TAP} + setup_tap ${FIB1} inet6 ${ADDR} ${MASK1} + TAP1=${TAP} + atf_check -s exit:0 ifconfig ${TAP0} inet6 ${ADDR} -alias + atf_check -o not-match:"^${ADDR}[[:space:]]" \ + setfib ${FIB0} netstat -rn -f inet6 +} +same_ip_multiple_ifaces_inet6_cleanup() +{ + cleanup_tap +} + # Regression test for kern/187550 atf_test_case subnet_route_with_multiple_fibs_on_same_subnet cleanup subnet_route_with_multiple_fibs_on_same_subnet_head() { - atf_set "descr" "Multiple FIBs can have subnet routes for the same subnet" + atf_set "descr" "Multiple FIBs can have IPv4 subnet routes for the same subnet" atf_set "require.user" "root" atf_set "require.config" "fibs" } @@ -333,8 +481,8 @@ subnet_route_with_multiple_fibs_on_same_ get_fibs 2 # Configure TAP interfaces - setup_tap "$FIB0" ${ADDR0} ${MASK} - setup_tap "$FIB1" ${ADDR1} ${MASK} + setup_tap "$FIB0" inet ${ADDR0} ${MASK} + setup_tap "$FIB1" inet ${ADDR1} ${MASK} # Check that a subnet route exists on both fibs atf_check -o ignore setfib "$FIB0" route get $ADDR1 @@ -346,6 +494,43 @@ subnet_route_with_multiple_fibs_on_same_ cleanup_tap } +atf_test_case subnet_route_with_multiple_fibs_on_same_subnet_inet6 cleanup +subnet_route_with_multiple_fibs_on_same_subnet_inet6_head() +{ + atf_set "descr" "Multiple FIBs can have IPv6 subnet routes for the same subnet" + atf_set "require.user" "root" + atf_set "require.config" "fibs" +} + +subnet_route_with_multiple_fibs_on_same_subnet_inet6_body() +{ + # Configure the TAP interfaces to use a RFC3849 nonrouteable addresses + # and a non-default fib + ADDR0="2001:db8::2" + ADDR1="2001:db8::3" + SUBNET="2001:db8::" + MASK="64" + + # Check system configuration + if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then + atf_skip "This test requires net.add_addr_allfibs=0" + fi + get_fibs 2 + + # Configure TAP interfaces + setup_tap "$FIB0" inet6 ${ADDR0} ${MASK} + setup_tap "$FIB1" inet6 ${ADDR1} ${MASK} + + # Check that a subnet route exists on both fibs + atf_check -o ignore setfib "$FIB0" route -6 get $ADDR1 + atf_check -o ignore setfib "$FIB1" route -6 get $ADDR0 +} + +subnet_route_with_multiple_fibs_on_same_subnet_inet6_cleanup() +{ + cleanup_tap +} + # Test that source address selection works correctly for UDP packets with # SO_DONTROUTE set that are sent on non-default FIBs. # This bug was discovered with "setfib 1 netperf -t UDP_STREAM -H some_host" @@ -386,9 +571,9 @@ udp_dontroute_body() get_fibs 2 # Configure the TAP interfaces - setup_tap ${FIB0} ${ADDR0} ${MASK} + setup_tap ${FIB0} inet ${ADDR0} ${MASK} TARGET_TAP=${TAP} - setup_tap ${FIB1} ${ADDR1} ${MASK} + setup_tap ${FIB1} inet ${ADDR1} ${MASK} # Send a UDP packet with SO_DONTROUTE. In the failure case, it will # return ENETUNREACH, or send the packet to the wrong tap @@ -397,8 +582,8 @@ udp_dontroute_body() cleanup_tap # Repeat, but this time target the other tap - setup_tap ${FIB0} ${ADDR0} ${MASK} - setup_tap ${FIB1} ${ADDR1} ${MASK} + setup_tap ${FIB0} inet ${ADDR0} ${MASK} + setup_tap ${FIB1} inet ${ADDR1} ${MASK} TARGET_TAP=${TAP} atf_check -o ignore setfib ${FIB1} \ @@ -415,10 +600,14 @@ atf_init_test_cases() { atf_add_test_case arpresolve_checks_interface_fib atf_add_test_case loopback_and_network_routes_on_nondefault_fib + atf_add_test_case loopback_and_network_routes_on_nondefault_fib_inet6 atf_add_test_case default_route_with_multiple_fibs_on_same_subnet + atf_add_test_case default_route_with_multiple_fibs_on_same_subnet_inet6 atf_add_test_case same_ip_multiple_ifaces_fib0 atf_add_test_case same_ip_multiple_ifaces + atf_add_test_case same_ip_multiple_ifaces_inet6 atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet + atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet_inet6 atf_add_test_case udp_dontroute } @@ -464,24 +653,27 @@ get_tap() # Create a tap(4) interface, configure it, and register it for cleanup. # parameters: # fib +# Protocol (inet or inet6) # IP address # Netmask in number of bits (eg 24 or 8) # Return: the tap interface name as the env variable TAP setup_tap() { local FIB=$1 - local ADDR=$2 - local MASK=$3 + local PROTO=$2 + local ADDR=$3 + local MASK=$4 get_tap - echo setfib ${FIB} ifconfig $TAP ${ADDR}/${MASK} fib $FIB - setfib ${FIB} ifconfig $TAP ${ADDR}/${MASK} fib $FIB + echo setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB + setfib ${FIB} ifconfig $TAP ${PROTO} ${ADDR}/${MASK} fib $FIB } cleanup_tap() { if [ -f tap_devices_to_cleanup ]; then for tap_device in $(cat tap_devices_to_cleanup); do - ifconfig "${tap_device}" destroy + echo ifconfig "${tap_device}" destroy + ifconfig "${tap_device}" destroy 2>/dev/null || true done rm -f tap_devices_to_cleanup fi From owner-svn-src-all@freebsd.org Tue Jan 31 20:57:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B187ACCAE7C; Tue, 31 Jan 2017 20:57:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78CA01A8C; Tue, 31 Jan 2017 20:57:41 +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 v0VKveS4073637; Tue, 31 Jan 2017 20:57:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VKvehU073636; Tue, 31 Jan 2017 20:57:40 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201701312057.v0VKvehU073636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 31 Jan 2017 20:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313026 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 20:57:41 -0000 Author: adrian Date: Tue Jan 31 20:57:40 2017 New Revision: 313026 URL: https://svnweb.freebsd.org/changeset/base/313026 Log: [ath] log seqno, type and subtype when assigning sequence numbers for A-MPDU. This is just to improve adrian-debugging. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue Jan 31 20:13:50 2017 (r313025) +++ head/sys/dev/ath/if_ath_tx.c Tue Jan 31 20:57:40 2017 (r313026) @@ -2979,7 +2979,9 @@ ath_tx_tid_seqno_assign(struct ath_softc M_SEQNO_SET(m0, seqno); /* Return so caller can do something with it if needed */ - DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: -> seqno=%d\n", __func__, seqno); + DPRINTF(sc, ATH_DEBUG_SW_TX, + "%s: -> subtype=0x%x, tid=%d, seqno=%d\n", + __func__, subtype, tid, seqno); return seqno; } From owner-svn-src-all@freebsd.org Tue Jan 31 21:59:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2627CCA77F; Tue, 31 Jan 2017 21:59:11 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9750D617; Tue, 31 Jan 2017 21:59:11 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VLxAuK099751; Tue, 31 Jan 2017 21:59:10 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VLxAUs099750; Tue, 31 Jan 2017 21:59:10 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201701312159.v0VLxAUs099750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 31 Jan 2017 21:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313027 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 21:59:11 -0000 Author: brd (doc,ports committer) Date: Tue Jan 31 21:59:10 2017 New Revision: 313027 URL: https://svnweb.freebsd.org/changeset/base/313027 Log: Add a new vagrant-box target, to make it easier and less redundant to only produce the Vagrant box and not upload it. Approved by: re (gjb) Modified: head/release/Makefile.vagrant Modified: head/release/Makefile.vagrant ============================================================================== --- head/release/Makefile.vagrant Tue Jan 31 20:57:40 2017 (r313026) +++ head/release/Makefile.vagrant Tue Jan 31 21:59:10 2017 (r313027) @@ -24,8 +24,8 @@ VAGRANT_VERSION!= date +%Y.%m.%d VAGRANT_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE} .if !empty(CLOUDWARE) . for _PROVIDER in ${CLOUDWARE} -. if ${_PROVIDER:MVAGRANT*} -VAGRANT_PROVIDERS+= ${_PROVIDER:S/VAGRANT-//:tl} +. if ${_PROVIDER:tu:MVAGRANT*} +VAGRANT_PROVIDERS+= ${_PROVIDER:tu:S/VAGRANT-//:tl} . endif . endfor .endif @@ -70,13 +70,16 @@ ${VAGRANT_TARGET}.${PROVIDER}.box: ${PRO . endif CLEANFILES+= vagrant-do-upload-${PROVIDER} -vagrant-do-upload-${PROVIDER}: ${VAGRANT_TARGET}.${PROVIDER}.box +vagrant-do-upload-${PROVIDER}: vagrant-box . if ${PROVIDER} == "virtualbox" ${.CURDIR}/scripts/atlas-upload.sh -b ${TYPE}-${REVISION}-${BRANCH} -f ${VAGRANT_TARGET}.${PROVIDER}.box -p ${PROVIDER} -k ${VAGRANT_KEY} -u ${VAGRANT_USERNAME} -v ${VAGRANT_VERSION} . elif ${PROVIDER} == "vmware" ${.CURDIR}/scripts/atlas-upload.sh -b ${TYPE}-${REVISION}-${BRANCH} -f ${VAGRANT_TARGET}.${PROVIDER}.box -p ${PROVIDER}_desktop -k ${VAGRANT_KEY} -u ${VAGRANT_USERNAME} -v ${VAGRANT_VERSION} . endif touch ${.OBJDIR}/${.TARGET} + +vagrant-box: ${VAGRANT_TARGET}.${PROVIDER}.box + .endfor vagrant-upload: ${VAGRANT_UPLOAD_TGTS} From owner-svn-src-all@freebsd.org Tue Jan 31 22:21:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38ECCCCAE13; Tue, 31 Jan 2017 22:21:10 +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 13A0C11BC; Tue, 31 Jan 2017 22:21:10 +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 v0VML9Cg011682; Tue, 31 Jan 2017 22:21:09 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VML9wj011680; Tue, 31 Jan 2017 22:21:09 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701312221.v0VML9wj011680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 31 Jan 2017 22:21:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313028 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 22:21:10 -0000 Author: avos Date: Tue Jan 31 22:21:08 2017 New Revision: 313028 URL: https://svnweb.freebsd.org/changeset/base/313028 Log: net80211: cleanup ic_flags / iv_flags Flags - IEEE80211_F_ASCAN - IEEE80211_F_SIBSS - IEEE80211_F_IBSSON are not used since r170530 (old WI compatibility ioctls removal) and r178354 (removed from other places). IEEE80211_F_TXPOW_FIXED was never utilized; initially added with IEEE80211_F_TXPOW_AUTO / IEEE80211_F_TXPOW_OFF flags, which were replaced with IEEE80211_C_TXPMGT capability check in r138568. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D9369 Modified: head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Tue Jan 31 21:59:10 2017 (r313027) +++ head/sys/net80211/ieee80211_node.c Tue Jan 31 22:21:08 2017 (r313028) @@ -349,7 +349,6 @@ ieee80211_create_ibss(struct ieee80211va ni->ni_fhindex = 1; } if (vap->iv_opmode == IEEE80211_M_IBSS) { - vap->iv_flags |= IEEE80211_F_SIBSS; ni->ni_capinfo |= IEEE80211_CAPINFO_IBSS; /* XXX */ if (vap->iv_flags & IEEE80211_F_DESBSSID) IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_des_bssid); Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Tue Jan 31 21:59:10 2017 (r313027) +++ head/sys/net80211/ieee80211_var.h Tue Jan 31 22:21:08 2017 (r313028) @@ -572,8 +572,7 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_F_PRIVACY 0x00000010 /* CONF: privacy enabled */ #define IEEE80211_F_PUREG 0x00000020 /* CONF: 11g w/o 11b sta's */ #define IEEE80211_F_SCAN 0x00000080 /* STATUS: scanning */ -#define IEEE80211_F_ASCAN 0x00000100 /* STATUS: active scan */ -#define IEEE80211_F_SIBSS 0x00000200 /* STATUS: start IBSS */ +/* 0x00000300 reserved */ /* NB: this is intentionally setup to be IEEE80211_CAPINFO_SHORT_SLOTTIME */ #define IEEE80211_F_SHSLOT 0x00000400 /* STATUS: use short slot time*/ #define IEEE80211_F_PMGTON 0x00000800 /* CONF: Power mgmt enable */ @@ -581,8 +580,7 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_F_WME 0x00002000 /* CONF: enable WME use */ #define IEEE80211_F_BGSCAN 0x00004000 /* CONF: bg scan enabled (???)*/ #define IEEE80211_F_SWRETRY 0x00008000 /* CONF: sw tx retry enabled */ -#define IEEE80211_F_TXPOW_FIXED 0x00010000 /* TX Power: fixed rate */ -#define IEEE80211_F_IBSSON 0x00020000 /* CONF: IBSS creation enable */ +/* 0x00030000 reserved */ #define IEEE80211_F_SHPREAMBLE 0x00040000 /* STATUS: use short preamble */ #define IEEE80211_F_DATAPAD 0x00080000 /* CONF: do alignment pad */ #define IEEE80211_F_USEPROT 0x00100000 /* STATUS: protection enabled */ @@ -600,9 +598,9 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_F_DWDS 0x80000000 /* CONF: Dynamic WDS enabled */ #define IEEE80211_F_BITS \ - "\20\1TURBOP\2COMP\3FF\4BURST\5PRIVACY\6PUREG\10SCAN\11ASCAN\12SIBSS" \ - "\13SHSLOT\14PMGTON\15DESBSSID\16WME\17BGSCAN\20SWRETRY\21TXPOW_FIXED" \ - "\22IBSSON\23SHPREAMBLE\24DATAPAD\25USEPROT\26USERBARKER\27CSAPENDING" \ + "\20\1TURBOP\2COMP\3FF\4BURST\5PRIVACY\6PUREG\10SCAN" \ + "\13SHSLOT\14PMGTON\15DESBSSID\16WME\17BGSCAN\20SWRETRY" \ + "\23SHPREAMBLE\24DATAPAD\25USEPROT\26USERBARKER\27CSAPENDING" \ "\30WPA1\31WPA2\32DROPUNENC\33COUNTERM\34HIDESSID\35NOBRIDG\36PCF" \ "\37DOTH\40DWDS" From owner-svn-src-all@freebsd.org Tue Jan 31 22:26:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BDA3CCAFC9; Tue, 31 Jan 2017 22:26:41 +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 4CA401551; Tue, 31 Jan 2017 22:26:41 +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 1D04010A7DB; Tue, 31 Jan 2017 17:26:40 -0500 (EST) From: John Baldwin To: Takahashi Yoshihiro Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Date: Tue, 31 Jan 2017 14:20:17 -0800 Message-ID: <2911087.bbEsWibF87@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201701280222.v0S2MFSR022477@repo.freebsd.org> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 31 Jan 2017 17:26:40 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 22:26:41 -0000 On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote: > Author: nyan > Date: Sat Jan 28 02:22:15 2017 > New Revision: 312910 > URL: https://svnweb.freebsd.org/changeset/base/312910 > > Log: > Remove pc98 support completely. > I thank all developers and contributors for pc98. > > Relnotes: yes BTW, my impression was that there are some other device drivers that are effectively PC-98 only (e.g. everything that uses scsi_low.c) but they might have pccard attachments for use with PC-98 laptops? Perhaps Warner might know? It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4) all came from NetBSD/pc98 via PAO. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Jan 31 22:26:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 155F9CCAFF8; Tue, 31 Jan 2017 22:26:49 +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 E820315C3; Tue, 31 Jan 2017 22:26:48 +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 6B9AB10A7FA; Tue, 31 Jan 2017 17:26:41 -0500 (EST) From: John Baldwin To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys Date: Tue, 31 Jan 2017 14:13:36 -0800 Message-ID: <3349880.lYJPXOWCO7@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201701301257.v0UCvNrK065993@repo.freebsd.org> References: <201701301257.v0UCvNrK065993@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 31 Jan 2017 17:26:41 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 22:26:49 -0000 On Monday, January 30, 2017 12:57:23 PM Edward Tomasz Napierala wrote: > Author: trasz > Date: Mon Jan 30 12:57:22 2017 > New Revision: 312988 > URL: https://svnweb.freebsd.org/changeset/base/312988 > > Log: > Add kern_listen(), kern_shutdown(), and kern_socket(), and use them > instead of their sys_*() counterparts in various compats. The svr4 > is left untouched, because there's no point. Note that you can compile test svr4 since it is still in the tree. If we want to remove svr4, then we should remove it. However, we should maintain code that is in the tree if it is still there. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Jan 31 22:33:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BB1ACCA54C for ; Tue, 31 Jan 2017 22:33:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42FFC1D13 for ; Tue, 31 Jan 2017 22:33:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22f.google.com with SMTP id v96so47181305ioi.0 for ; Tue, 31 Jan 2017 14:33:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4fv1ZJZmUQ3oSWjRlKxMM/UX1OJhE4PRw0R8XPY4Gg8=; b=WbYhJjXhxWwceFfYqc9cTc2YxrlLkbkAMWyAA5tQfUG0UjlisMtrqX3kYa1BWIszCW xz2ZP9rQphcC3uAQQ3FGAII+E+sQ85g02AOo/qxgCqENx6I9ivqIYzsBfeM57/CIGqMo eHYpEnnZjVlwlEuC0maK8DWumaL28GsrOUFK3i0Mwbem4CgikmQQ4ocIa3pca+I8bUIA VVmxDQmmlQ8Lr7y++X+XKJQZI0lai4uPxhsn4b1RP4bwpMbnvu3D1CxCwn0PBSdTJ8Y/ S3cRGjOOeX+XtPuHoUjPnRtVBBqdNCioLQfOLCFqUIJQZkxkQKS8hFO/Vlv2oDErmNR5 lbcg== 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=4fv1ZJZmUQ3oSWjRlKxMM/UX1OJhE4PRw0R8XPY4Gg8=; b=cWlEC9HLuDQIZZytRczVtGh8UveSgqoSNXzjBag6KU1ZxDYvrZG4XWPZuUAayrbFAG YiNrkIhxzptRuHn6qeOlfo/k/O55GWnKF65Igo+o21c9dit5IMzOQQrTT+795XemBGxB Rao+9ATjd0njp0bS+QSzHzp0/424OPtVTBCdjODFKoayjBIWzTH63ZPDx061FhtSeONC jIZ0Qe/vboOdkAGB5cB8Kcy39dRsU/kwECHQMRvGD8fMsyTXhwM0Te1QZeDLY50h936M VvOJETm4GGT+aZTjCDwbfbmDK5ukR9aLL+mrG1+LiDtqilt6jpWPY0klDNXJ25kg09QE Fspg== X-Gm-Message-State: AIkVDXJGmZS+urZG0WyQXZVH0DVec63sgqhQ2/VeRlHt+TYY0/A3CRmTbz7zLHtfuIl8GiB1+VxLhV2DDFJzxQ== X-Received: by 10.107.20.13 with SMTP id 13mr182944iou.0.1485902035593; Tue, 31 Jan 2017 14:33:55 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Tue, 31 Jan 2017 14:33:55 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <2911087.bbEsWibF87@ralph.baldwin.cx> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <2911087.bbEsWibF87@ralph.baldwin.cx> From: Warner Losh Date: Tue, 31 Jan 2017 15:33:55 -0700 X-Google-Sender-Auth: QzaWJ_bqte2BLVAcCXMQ6MUOIRw Message-ID: Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... To: John Baldwin Cc: Takahashi Yoshihiro , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 22:33:57 -0000 On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin wrote: > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote: >> Author: nyan >> Date: Sat Jan 28 02:22:15 2017 >> New Revision: 312910 >> URL: https://svnweb.freebsd.org/changeset/base/312910 >> >> Log: >> Remove pc98 support completely. >> I thank all developers and contributors for pc98. >> >> Relnotes: yes > > BTW, my impression was that there are some other device drivers > that are effectively PC-98 only (e.g. everything that uses scsi_low.c) > but they might have pccard attachments for use with PC-98 laptops? > > Perhaps Warner might know? > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4) > all came from NetBSD/pc98 via PAO. These all work correctly on any PC Card machine. The only reason they came in this way was because these devices were original marketed only in Japan. I've used all these cards with external SCSI drives in the past. As far as I know, only the if_snc driver, which was removed, is truly pc98 specific. It is wired in such a way that cannot be used in ibm-at compatible laptops. IIRC, it had hard-wired memory decode lines that landed in the middle of the VGA graphics pages or BIOS low memory areas. I have one of these cards still, and it will be detected on my laptops, but can't work due to the required mappings. Now, there's an different question about whether it is time to retire some of the now-ancient SCSI cards from the system, but that's a different kettle of fish that's larger than just nsp, ncv and stg. Warner From owner-svn-src-all@freebsd.org Tue Jan 31 22:43:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A046ACCA960; Tue, 31 Jan 2017 22:43:36 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 750BE3C8; Tue, 31 Jan 2017 22:43:36 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0VMhZKT019974; Tue, 31 Jan 2017 22:43:35 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VMhZKJ019972; Tue, 31 Jan 2017 22:43:35 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201701312243.v0VMhZKJ019972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Tue, 31 Jan 2017 22:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r313029 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 22:43:36 -0000 Author: matthew (ports committer) Date: Tue Jan 31 22:43:35 2017 New Revision: 313029 URL: https://svnweb.freebsd.org/changeset/base/313029 Log: The Grim Reaper calls. Take in the commit bits for the following people who have neither made a src commit for at least 18 months, nor have they responded to multiple emails about their status as committers. This is clearing up a backlog of about 3 years where the grim reaper process has not been happening. agc Alistair Crooks akiyama Shunsuke Akiyama andre Andre Oppermann charnier Philippe Charnier cherry Cherry Mathew das David Schultz davidch David Christensen edavis Eric Davis fjoe Max Khon iwasaki Mitsuru IWASAKI kuriyama Jun Kuriyama monthadar Monthadar Jaberi ps Paul Saab rnoland Robert Noland sanpei MIHIRA Yoshiro simon Simon Nielsen stefanf Stefan Farfeleder syuu Takuya ASADA torek Chris Torek venkat Venkat Duvvuru Core would like to thank all of these people for their contributions to the project, and wishes them well in any future endeavours. While here, tidy up the mentors file. In addition to certain of the above who were still technically under mentorship, remove entries for carl, miwi and snb who had previously given up their commit bits. Approved by: core (implicit) Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Tue Jan 31 22:21:08 2017 (r313028) +++ svnadmin/conf/access Tue Jan 31 22:43:35 2017 (r313029) @@ -21,13 +21,10 @@ ache achim adrian ae -agc -akiyama allanjude alc alfred ambrisko -andre andreast andrew anish @@ -50,16 +47,12 @@ brueffer bryanv bz cem -charnier -cherry cognet cperciva cracauer csjp cy dab -das -davidch davidcs dchagin def @@ -74,14 +67,12 @@ dumbbell dwmalone dwmalone=freebsd-committers@maths.tcd.ie eadler ed -edavis emaste emax eri erj fabient fanf -fjoe gabor gad gallatin @@ -102,7 +93,6 @@ hselasky ian imp ivadasz -iwasaki jah jamie jasone @@ -135,7 +125,6 @@ ken kevlo kib kp -kuriyama landonf lidl loos @@ -155,7 +144,6 @@ mizhka mjg mm mmel -monthadar mp mr n_hibma devnull @@ -178,13 +166,11 @@ pho pjd pkelsey pluknet -ps pstef qingli ray remko rmacklem -rnoland roberto rodrigc royger @@ -194,7 +180,6 @@ rrs rstone ru rwatson bb+lists.freebsd.cvs-committers@cyrus.watson.org -sanpei sbruno scf schweikh @@ -203,23 +188,19 @@ se sephe sgalabov silby -simon sjg skra slm smh sobomax stas -stefanf stevek syrinx -syuu takawata theraven thomas thompsa tijl -torek trasz truckman tsoome @@ -228,7 +209,6 @@ tychon ume uqs vangyzen -venkat whu will wma Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue Jan 31 22:21:08 2017 (r313028) +++ svnadmin/conf/mentors Tue Jan 31 22:43:35 2017 (r313029) @@ -12,10 +12,7 @@ # Mentee Mentor Optional comment achim scottl Co-mentor: emaste anish neel Co-mentor: grehan -agc scottl Co-mentor: emax badger kib Co-mentor: vangyzen -carl jimharris -cherry gibbs dab vangyzen def pjd dexuan sephe @@ -27,14 +24,9 @@ jwd rmacklem kadesai ken Co-mentor: scottl, ambrisko karels gnn mahrens mckusick -miwi rwatson -monthadar adrian peterj jhb Co-mentor: grog phil theraven Co-mentor: sjg pstef pfg slm ken Co-mentor: scottl, ambrisko -snb dwmalone stevek sjg -torek rpaulo tsoome allanjude Co-mentor: imp -venkat delphij Co-mentor: luigi, jhb From owner-svn-src-all@freebsd.org Tue Jan 31 23:22:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C6CCCCA253; Tue, 31 Jan 2017 23:22:45 +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 471F6161E; Tue, 31 Jan 2017 23:22:44 +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 BD89C10A7FA; Tue, 31 Jan 2017 18:22:42 -0500 (EST) From: John Baldwin To: Warner Losh Cc: Takahashi Yoshihiro , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Date: Tue, 31 Jan 2017 14:46:23 -0800 Message-ID: <3458844.3oruRKbrzH@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <2911087.bbEsWibF87@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 31 Jan 2017 18:22:42 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 23:22:45 -0000 On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote: > On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin wrote: > > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote: > >> Author: nyan > >> Date: Sat Jan 28 02:22:15 2017 > >> New Revision: 312910 > >> URL: https://svnweb.freebsd.org/changeset/base/312910 > >> > >> Log: > >> Remove pc98 support completely. > >> I thank all developers and contributors for pc98. > >> > >> Relnotes: yes > > > > BTW, my impression was that there are some other device drivers > > that are effectively PC-98 only (e.g. everything that uses scsi_low.c) > > but they might have pccard attachments for use with PC-98 laptops? > > > > Perhaps Warner might know? > > > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4) > > all came from NetBSD/pc98 via PAO. > > These all work correctly on any PC Card machine. The only reason they > came in this way was because these devices were original marketed only > in Japan. I've used all these cards with external SCSI drives in the > past. > > As far as I know, only the if_snc driver, which was removed, is truly > pc98 specific. It is wired in such a way that cannot be used in ibm-at > compatible laptops. IIRC, it had hard-wired memory decode lines that > landed in the middle of the VGA graphics pages or BIOS low memory > areas. I have one of these cards still, and it will be detected on my > laptops, but can't work due to the required mappings. > > Now, there's an different question about whether it is time to retire > some of the now-ancient SCSI cards from the system, but that's a > different kettle of fish that's larger than just nsp, ncv and stg. Fair enough. I haven't fully put away my 12 axe and am toying with dropping any ISA-only storage and NIC drivers (and perhaps pccard-only as well in that case). Hardware that wants to use ISA/pccard for storage is probably happier running 4.x anyway. One question is if we should drop ISA attachments in that case for drivers that support PCI and ISA. However, there's a fair list of ISA-only adapters that would be a good place to start anyway. One concern is to not drop any drivers that are commonly used in emulators or hypervisors (ed(4) comes to mind though I think em(4) is probably available in any modern emulators or hypervisors). -- John Baldwin From owner-svn-src-all@freebsd.org Tue Jan 31 23:34:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61D03CCA789; Tue, 31 Jan 2017 23:34:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30E631DD0; Tue, 31 Jan 2017 23:34:03 +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 v0VNY2B2040366; Tue, 31 Jan 2017 23:34:02 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VNY22N040365; Tue, 31 Jan 2017 23:34:02 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201701312334.v0VNY22N040365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 31 Jan 2017 23:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313030 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 23:34:03 -0000 Author: tuexen Date: Tue Jan 31 23:34:02 2017 New Revision: 313030 URL: https://svnweb.freebsd.org/changeset/base/313030 Log: Remove a duplicate debug statement. MFC after: 1 week Modified: head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Tue Jan 31 22:43:35 2017 (r313029) +++ head/sys/netinet/sctp_timer.c Tue Jan 31 23:34:02 2017 (r313030) @@ -719,13 +719,9 @@ start_again: if (num_mk) { SCTPDBG(SCTP_DEBUG_TIMER1, "LAST TSN marked was %x\n", tsnlast); - SCTPDBG(SCTP_DEBUG_TIMER1, "Num marked for retransmission was %d peer-rwd:%ld\n", - num_mk, (u_long)stcb->asoc.peers_rwnd); - SCTPDBG(SCTP_DEBUG_TIMER1, "LAST TSN marked was %x\n", - tsnlast); - SCTPDBG(SCTP_DEBUG_TIMER1, "Num marked for retransmission was %d peer-rwd:%d\n", + SCTPDBG(SCTP_DEBUG_TIMER1, "Num marked for retransmission was %d peer-rwd:%u\n", num_mk, - (int)stcb->asoc.peers_rwnd); + stcb->asoc.peers_rwnd); } #endif *num_marked = num_mk; From owner-svn-src-all@freebsd.org Tue Jan 31 23:36:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93148CCA82B for ; Tue, 31 Jan 2017 23:36:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61AB01F33 for ; Tue, 31 Jan 2017 23:36:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x241.google.com with SMTP id 203so846990ith.2 for ; Tue, 31 Jan 2017 15:36:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=2RREsjn7TH45S1/B+ZE7OZk4ySxto7JnHQ+He85FEZM=; b=g57LSMoZoXPQGGQ73DbedEI7gqe1d/OoufBglhlV9D5qzP1//uj6oEvYNYZiZLrayz 15KsmwOpuYiMMdsvoaFhm0T5Rbgq3D0RN65hC2X1cOpDi3swUl7KVXCxL3IyiJ5fQbwE 3NicV1+v2tPxqG9FpkoJTuhqTFPE8crMPePUJC7A7dkJlrHnvtbszCmiljuCMjuIA414 1MK4lFT/9LKFCBFWbiYKZ4N4IppBniu5wIp13HCIwEDB2dXVndeFpCX6nzTr3AHQcE7P ofwFsEB4UAQaWbSnA0lxjSVUgI0WWfPv0g8mGPPoPgmmo2XaRImxVO/lHsgpbullC87l 0omQ== 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=2RREsjn7TH45S1/B+ZE7OZk4ySxto7JnHQ+He85FEZM=; b=R3kwOuum6FpGtuQZe2Qn6C9TyB0LNwOzBBwWVL/cxMGEZNB8Kb9KgdjXWv04OXSbzs OImffWnZTiwnjKNeSZuY5kS3Clz38EhX0/+to4trM+uvUZ/J7212GksZTCBe86G+d16o MwI4F1O7NIEWAOBtK0K3RrkY6/07XKwb4jS+pfkxD2pie7+T5VojViRQIv5CEiiPZ95p Bwuh7waWCcYsK3Lrypn65AmD0QXhRe4V+fieAKG9VtF9654BuL+ydb/e8NlSRh+s3IUK gkEQ1iDfmdp7wITOW34mVv1Uo7rRJ+rW44ZoQyEYc6jPvSFfJkpif8aVzs7xbv2she0T rJSA== X-Gm-Message-State: AIkVDXIVzhKmzT4dUGFyr5eSUPQnaKwFuVRhyZWPOcKyigxxjmBKvsy66ocyeJcEgIySa5EdR1aeeX8LtqqsGg== X-Received: by 10.36.135.194 with SMTP id f185mr330095ite.85.1485905765528; Tue, 31 Jan 2017 15:36:05 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Tue, 31 Jan 2017 15:36:04 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <3458844.3oruRKbrzH@ralph.baldwin.cx> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <2911087.bbEsWibF87@ralph.baldwin.cx> <3458844.3oruRKbrzH@ralph.baldwin.cx> From: Warner Losh Date: Tue, 31 Jan 2017 16:36:04 -0700 X-Google-Sender-Auth: H8Uhf5cb_jHxnVFtcHb_LBb1uko Message-ID: Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... To: John Baldwin Cc: Takahashi Yoshihiro , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 23:36:06 -0000 On Tue, Jan 31, 2017 at 3:46 PM, John Baldwin wrote: > On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote: >> On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin wrote: >> > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote: >> >> Author: nyan >> >> Date: Sat Jan 28 02:22:15 2017 >> >> New Revision: 312910 >> >> URL: https://svnweb.freebsd.org/changeset/base/312910 >> >> >> >> Log: >> >> Remove pc98 support completely. >> >> I thank all developers and contributors for pc98. >> >> >> >> Relnotes: yes >> > >> > BTW, my impression was that there are some other device drivers >> > that are effectively PC-98 only (e.g. everything that uses scsi_low.c) >> > but they might have pccard attachments for use with PC-98 laptops? >> > >> > Perhaps Warner might know? >> > >> > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4) >> > all came from NetBSD/pc98 via PAO. >> >> These all work correctly on any PC Card machine. The only reason they >> came in this way was because these devices were original marketed only >> in Japan. I've used all these cards with external SCSI drives in the >> past. >> >> As far as I know, only the if_snc driver, which was removed, is truly >> pc98 specific. It is wired in such a way that cannot be used in ibm-at >> compatible laptops. IIRC, it had hard-wired memory decode lines that >> landed in the middle of the VGA graphics pages or BIOS low memory >> areas. I have one of these cards still, and it will be detected on my >> laptops, but can't work due to the required mappings. >> >> Now, there's an different question about whether it is time to retire >> some of the now-ancient SCSI cards from the system, but that's a >> different kettle of fish that's larger than just nsp, ncv and stg. > > Fair enough. I haven't fully put away my 12 axe and am toying with > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only > as well in that case). Hardware that wants to use ISA/pccard for > storage is probably happier running 4.x anyway. One question is if we > should drop ISA attachments in that case for drivers that support PCI > and ISA. However, there's a fair list of ISA-only adapters that would > be a good place to start anyway. One concern is to not drop any drivers > that are commonly used in emulators or hypervisors (ed(4) comes to mind > though I think em(4) is probably available in any modern emulators or > hypervisors). ISA-only attachments would be a good place to start. My quick glance shows this would be le(4), aha(4), cm(4), mse(4), and joy(4). There's maybe half a dozen EISA-only drivers in the tree that I was planning on retiring in 12, along with EISA. Likewise with the MCA attachments. I know that ed, ep, ex, sn, fe and cs PC Card attachments still work, or did fairly recently. All of those also have ISA attachments. I have no clue if the ISA attachments work, though I still have some ISA systems, I got rid of all my SCSI and Network ISA cards some time ago. I had hoped to get all the pnp autoloading code going so we could remove them from GENERIC before the 11 branch, but keep them as modules. I ran out of time. However, there's still time for 12 though. Warner From owner-svn-src-all@freebsd.org Tue Jan 31 23:36:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0B78CCA8B4; Tue, 31 Jan 2017 23:36:32 +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 C0523122; Tue, 31 Jan 2017 23:36:32 +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 v0VNaVUo040529; Tue, 31 Jan 2017 23:36:31 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0VNaVhv040528; Tue, 31 Jan 2017 23:36:31 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201701312336.v0VNaVhv040528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 31 Jan 2017 23:36:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313031 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 23:36:33 -0000 Author: tuexen Date: Tue Jan 31 23:36:31 2017 New Revision: 313031 URL: https://svnweb.freebsd.org/changeset/base/313031 Log: Take the SCTP common header into account when computing the space available for chunks. This unbreaks the handling of ICMPV6 packets indicating "packet too big". It just worked for IPv4 since we are overbooking for IPv4. MFC after: 1 week Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Jan 31 23:34:02 2017 (r313030) +++ head/sys/netinet/sctp_usrreq.c Tue Jan 31 23:36:31 2017 (r313031) @@ -108,7 +108,7 @@ sctp_pathmtu_adjustment(struct sctp_tcb /* Adjust that too */ stcb->asoc.smallest_mtu = nxtsz; /* now off to subtract IP_DF flag if needed */ - overhead = IP_HDR_SIZE; + overhead = IP_HDR_SIZE + sizeof(struct sctphdr); if (sctp_auth_is_required_chunk(SCTP_DATA, stcb->asoc.peer_auth_chunks)) { overhead += sctp_get_auth_chunk_len(stcb->asoc.peer_hmac_id); } From owner-svn-src-all@freebsd.org Wed Feb 1 00:10:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB535CCAA9C; Wed, 1 Feb 2017 00:10:30 +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 7B15516D7; Wed, 1 Feb 2017 00:10:30 +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 v110AT1k052946; Wed, 1 Feb 2017 00:10:29 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v110ATTA052945; Wed, 1 Feb 2017 00:10:29 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201702010010.v110ATTA052945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Feb 2017 00:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313032 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 00:10:30 -0000 Author: tuexen Date: Wed Feb 1 00:10:29 2017 New Revision: 313032 URL: https://svnweb.freebsd.org/changeset/base/313032 Log: Ensure that the variable bail is always initialized before used. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Tue Jan 31 23:36:31 2017 (r313031) +++ head/sys/netinet/sctp_output.c Wed Feb 1 00:10:29 2017 (r313032) @@ -7730,9 +7730,9 @@ sctp_fill_outqueue(struct sctp_tcb *stcb /* must make even word boundary */ space_left &= 0xfffffffc; strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc); + giveup = 0; + bail = 0; while ((space_left > 0) && (strq != NULL)) { - giveup = 0; - bail = 0; moved = sctp_move_to_outqueue(stcb, strq, space_left, frag_point, &giveup, eeor_mode, &bail, so_locked); stcb->asoc.ss_functions.sctp_ss_scheduled(stcb, net, asoc, strq, moved); From owner-svn-src-all@freebsd.org Wed Feb 1 00:45:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAB62CC64F7; Wed, 1 Feb 2017 00:45:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4ACD7927; Wed, 1 Feb 2017 00:45:01 +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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id DBBAF3D0FC6; Wed, 1 Feb 2017 11:44:58 +1100 (AEDT) Date: Wed, 1 Feb 2017 11:44:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Conrad Meyer cc: Bruce Evans , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern In-Reply-To: Message-ID: <20170201101029.R1617@besplex.bde.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170131153411.G1061@besplex.bde.org> <20170131175309.N1418@besplex.bde.org> <20170201005009.E2504@besplex.bde.org> MIME-Version: 1.0 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=nlC_4_pT8q9DhB4Ho9EA:9 a=PO7r1zJSAAAA:8 a=ia-mcPF_aGBLiXcymHcA:9 a=45ClL6m2LaAA:10 a=Oa0T6EYmKFNB-xRHvYM1:22 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 00:45:02 -0000 On Tue, 31 Jan 2017, Conrad Meyer wrote: > On Tue, Jan 31, 2017 at 7:36 AM, Bruce Evans wrote= : >> On Tue, 31 Jan 2017, Bruce Evans wrote: >> Unrolling (or not) may be helpful or harmful for entry and exit code. > > Helpful, per my earlier benchmarks. > >> I >> think there should by no alignment on entry -- just assume the buffer is >> aligned in the usual case, and only run 4% slower when it is misaligned. > > Please write such a patch and demonstrate the improvement. I now understand the algorithm. The division into 3 has to keep sequentiality (since CRC input is a bit string), so it doesn't work to separate the memory acces of the 3 crc32's by 8 bytes as in my simple test -- they have to be separated by large amounts. Then recombining requires multiplying the polynomials associated with the CRCs of the higher 2 blocks by X^N and reducing again, where N is large an related to the block size. This is done using a large table for each N needed, and to keep things reasonably simple, only 2 N's are used. >> The exit code handles up to SHORT * 3 =3D 768 bytes, not up to 4 or 8 >> bytes or up to 3 times that like simpler algorithms. 768 is quite >> large, and the exit code is quite slow. It reduces 8 or 4 bytes at a >> time without any dependency reduction, and then 1 byte at a time. > > Yes, this is the important loop to unroll for small inputs. Somehow Not like clang does it. Unrolling is useless without the 3-way blocking. > with the unrolling, it is only ~19% slower than the by-3 algorithm on > my system =E2=80=94 not 66%. Clang 3.9.1 unrolls both of these trailing > loops; here is the first: Maybe 3.9.1 pessimizes the 3-way loop by unrolling it. This would be fairly easy to do. Just replicate the 3 crc32q's a few times, say 8, and do them in a bad order (3 blocks of 8 dependent ones instead of 8 blocks of 3 independent ones). With enough replication, the code would be too large for the hardware to reorder. Inline asm has another advantage here -- volatile on it prevents reordering and might prevent unrolling. Maybe 3.9.1 unpessimizes the inline asms. But I suspect not getting the 3 times speedup is for another reason. > > 0x0000000000401b88 <+584>: cmp $0x38,%rbx > 0x0000000000401b8c <+588>: jae 0x401b93 > 0x0000000000401b8e <+590>: mov %rsi,%rdx > 0x0000000000401b91 <+593>: jmp 0x401be1 > 0x0000000000401b93 <+595>: lea -0x1(%rdi),%rbx > 0x0000000000401b97 <+599>: sub %rdx,%rbx > 0x0000000000401b9a <+602>: mov %rsi,%rdx > 0x0000000000401b9d <+605>: nopl (%rax) > 0x0000000000401ba0 <+608>: crc32q (%rdx),%rax > 0x0000000000401ba6 <+614>: crc32q 0x8(%rdx),%rax > 0x0000000000401bad <+621>: crc32q 0x10(%rdx),%rax > 0x0000000000401bb4 <+628>: crc32q 0x18(%rdx),%rax > 0x0000000000401bbb <+635>: crc32q 0x20(%rdx),%rax > 0x0000000000401bc2 <+642>: crc32q 0x28(%rdx),%rax > 0x0000000000401bc9 <+649>: crc32q 0x30(%rdx),%rax > 0x0000000000401bd0 <+656>: crc32q 0x38(%rdx),%rax > 0x0000000000401bd7 <+663>: add $0x40,%rdx > 0x0000000000401bdb <+667>: add $0x8,%rbx > 0x0000000000401bdf <+671>: jne 0x401ba0 No, this unrolling is useless. The crc32q's are dependent on each other, so they take 3 cycles each. There are spare resources to run about 12 instructions during that time. Loop control only takes 3. >> I >> don't understand the algorithm for joining crcs -- why doesn't it work >> to reduce to 12 or 24 bytes in the main loop? > > It would, but I haven't implemented or tested that. You're welcome to > do so and demonstrate an improvement. It does add more lookup table > bloat, but perhaps we could just remove the 3x8k table =E2=80=94 I'm not = sure > it adds any benefit over the 3x256 table. > >> Your benchmarks mainly give results for the <=3D 768 bytes where most of >> the manual optimizations don't apply. Actually, they test only the large buffer case. They used buffer size of 1M and 1k and didn't do the entry and exit code that usually dominates for small buffers. I re-tested with the correct blocking. This was about 10% slower (0.34 -> 0.37 seconds for 10GB), except for clang without intrinsics it was 20% slower (0.43 -> 0.51) seconds. > 0x000400: asm:68 intrins:62 multitable:684 (ns per buf) I don't see any signs of this in my test: - a single crc32q in a (C) loop doesn't benefit from unrolling or lose to the extra clang instructions without intrinsics. clang-3.9.0 unrolls this 8-way in the simpler environment of my test program, but this makes no difference. - similarly for a single crc32b in a loop, except when I forgot to change the type of the crc accumulator from uint64_t to uint32_t, gcc was 1 cycle slower in the loop (3 instead of 4). gcc generates an extra instruction to zero-extend the crc, and this is more expensive than usual since it gives gives another dependency. clang optimizes this away. > 0x000800: asm:132 intrins:133 (ns per buf) > 0x002000: asm:449 intrins:446 (ns per buf) > 0x008000: asm:1501 intrins:1497 (ns per buf) > 0x020000: asm:5618 intrins:5609 (ns per buf) Now it is mostly in the 3-way optimized case and the differences are in the noise. > (All routines are in a separate compilation unit with no full-program > optimization, as they are in the kernel.) > >> Compiler optimizations are more >> likely to help there. So I looked more closely at the last 2 loop. >> clang indeed only unrolls the last one, > > Not in 3.9.1. 3.9.1 seems to only extend the useless unrolling. >> only for the unreachable case >> with more than 8 bytes on amd64. > > How is it unreachable? Because the loop doing 8-byte words at a time reduces the count below 8. Bruce From owner-svn-src-all@freebsd.org Wed Feb 1 01:25:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 363DFCCB437; Wed, 1 Feb 2017 01:25:32 +0000 (UTC) (envelope-from jmd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05C89275; Wed, 1 Feb 2017 01:25:31 +0000 (UTC) (envelope-from jmd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v111PVTZ087790; Wed, 1 Feb 2017 01:25:31 GMT (envelope-from jmd@FreeBSD.org) Received: (from jmd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v111PVR7087789; Wed, 1 Feb 2017 01:25:31 GMT (envelope-from jmd@FreeBSD.org) Message-Id: <201702010125.v111PVR7087789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmd set sender to jmd@FreeBSD.org using -f From: Johannes M Dieterich Date: Wed, 1 Feb 2017 01:25:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313033 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 01:25:32 -0000 Author: jmd (ports committer) Date: Wed Feb 1 01:25:30 2017 New Revision: 313033 URL: https://svnweb.freebsd.org/changeset/base/313033 Log: Add myself (jmd) to committers-ports.dot. Document rene and swills as my mentors. Reviewed by: rene (mentor) Approved by: rene (mentor) Differential Revision: https://reviews.freebsd.org/D9393 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Feb 1 00:10:29 2017 (r313032) +++ head/share/misc/committers-ports.dot Wed Feb 1 01:25:30 2017 (r313033) @@ -125,6 +125,7 @@ jgh [label="Jason Helfman\njgh@FreeBSD.o jhale [label="Jason E. Hale\njhale@FreeBSD.org\n2012/09/10"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12"] jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"] +jmd [label="Johannes M. Dieterich\njmd@FreeBSD.org\n2017/01/09"] jmelo [label="Jean Milanez Melo\njmelo@FreeBSD.org\n2006/03/31"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1994/08/22"] johans [label="Johan Selst\njohans@FreeBSD.org\n2006/04/01"] @@ -562,6 +563,7 @@ rene -> bar rene -> cmt rene -> crees rene -> jgh +rene -> jmd rene -> ler rene -> olivierd @@ -594,6 +596,7 @@ stas -> araujo steve -> netchild swills -> feld +swills -> jmd swills -> jrm swills -> milki swills -> pclin From owner-svn-src-all@freebsd.org Wed Feb 1 02:00:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11CC7CCBCC7; Wed, 1 Feb 2017 02:00:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0A3714A2; Wed, 1 Feb 2017 02:00:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1120J5H000400; Wed, 1 Feb 2017 02:00:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1120JOt000399; Wed, 1 Feb 2017 02:00:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702010200.v1120JOt000399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 1 Feb 2017 02:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313034 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 02:00:20 -0000 Author: imp Date: Wed Feb 1 02:00:18 2017 New Revision: 313034 URL: https://svnweb.freebsd.org/changeset/base/313034 Log: Add USB IDs supported by TI / Intel USB 3410 family (modems of various flavors). This includes both the release products (from Honeywell, Moxa and Multitech) as well as development kits. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Feb 1 01:25:30 2017 (r313033) +++ head/sys/dev/usb/usbdevs Wed Feb 1 02:00:18 2017 (r313034) @@ -587,6 +587,7 @@ vendor CCYU 0x1065 CCYU Technology vendor CURITEL 0x106c Curitel Communications Inc vendor SILABS2 0x10a6 SILABS2 vendor USI 0x10ab USI +vendor HONEYWELL 0x10ac Honeywell vendor LIEBERT2 0x10af Liebert vendor PLX 0x10b5 PLX vendor ASANTE 0x10bd Asante @@ -594,6 +595,7 @@ vendor SILABS 0x10c4 Silicon Labs vendor SILABS3 0x10c5 Silicon Labs vendor SILABS4 0x10ce Silicon Labs vendor ACTIONS 0x10d6 Actions +vendor MOXA 0x110a Moxa vendor ANALOG 0x1110 Analog Devices vendor TENX 0x1130 Ten X Technology, Inc. vendor ISSC 0x1131 Integrated System Solution Corp. @@ -698,6 +700,7 @@ vendor ELV 0x18ef ELV vendor LINKSYS3 0x1915 Linksys vendor QUALCOMMINC 0x19d2 Qualcomm, Incorporated vendor QUALCOMM3 0x19f5 Qualcomm, Inc. +vendor ABBOTT 0x1a61 Abbott Diabetics vendor BAYER 0x1a79 Bayer vendor WCH2 0x1a86 QinHeng Electronics vendor STELERA 0x1a8d Stelera Wireless @@ -806,6 +809,10 @@ product 3COMUSR USRISDN 0x008f 3Com U.S product 3COMUSR HOMECONN 0x009d 3Com HomeConnect Camera product 3COMUSR USR56K 0x3021 U.S. Robotics 56000 Voice FaxModem Pro +/* Abbott Diabetics */ +product ABBOTT STEREO_PLUG 0x3410 Abbott Diabetics Stereo Plug +product ABBOTT STRIP_PORT 0x3420 Abbott Diabetics Strip Port + /* AboCom products */ product ABOCOM XX1 0x110c XX1 product ABOCOM XX2 0x200c XX2 @@ -2290,6 +2297,9 @@ product HITACHI DVDCAM_USB 0x001e DVDCAM /* Holtek products */ product HOLTEK F85 0xa030 Holtek USB gaming keyboard +/* Honeywell */ +product HONEYWELL HGI80 0x0102 Honeywell HGI80 Wireless USB Gateway + /* HP products */ product HP 895C 0x0004 DeskJet 895C product HP 4100C 0x0101 Scanjet 4100C @@ -2448,6 +2458,9 @@ product HUAWEI3COM WUB320G 0x0009 Aolynk /* IBM Corporation */ product IBM USBCDROMDRIVE 0x4427 USB CD-ROM Drive +product IBM USB4543 0x4543 TI IBM USB 4543 Modem +product IBM USB454B 0x454b TI IBM USB 454B Modem +product IBM USB454C 0x454c TI IBM USB 454C Modem /* Icom products */ product ICOM SP1 0x0004 FTDI compatible adapter @@ -3222,12 +3235,27 @@ product MOTOROLA2 MB886 0x710f MB886 Mo product MOTOROLA4 RT2770 0x9031 RT2770 product MOTOROLA4 RT3070 0x9032 RT3070 +/* Moxa */ +product MOXA MXU1_1110 0x1110 Moxa Uport 1110 +product MOXA MXU1_1130 0x1130 Moxa Uport 1130 +product MOXA MXU1_1131 0x1131 Moxa Uport 1131 +product MOXA MXU1_1150 0x1150 Moxa Uport 1150 +product MOXA MXU1_1151 0x1151 Moxa Uport 1151 + /* MpMan products */ product MPMAN MPF400_2 0x25a8 MPF400 Music Player 2Go product MPMAN MPF400_1 0x36d0 MPF400 Music Player 1Go /* MultiTech products */ +product MULTITECH MT9234ZBA_2 0x0319 MT9234ZBA USB modem (alt) product MULTITECH ATLAS 0xf101 MT5634ZBA-USB modem +product MULTITECH GSM 0xf108 GSM USB Modem +product MULTITECH CDMA 0xf109 CDMA USB Modem +product MULTITECH CDMA_FW 0xf110 CDMA USB Modem firmware running +product MULTITECH GSM_FW 0xf111 GSM USB Modem firmware running +product MULTITECH EDGE 0xf112 Edge USB Modem +product MULTITECH MT9234MU 0xf114 MT9234 MU +product MULTITECH MT9234ZBA 0xf115 MT9234 ZBA /* Mustek products */ product MUSTEK 1200CU 0x0001 1200 CU scanner @@ -4466,6 +4494,13 @@ product TENX UAUDIO0 0xf211 USB audio h /* Texas Intel products */ product TI UTUSB41 0x1446 UT-USB41 hub product TI TUSB2046 0x2046 TUSB2046 hub +product TI USB3410 0x3410 TI USB 3410 Modem +product TI USB5052 0x5052 TI USB 5250 Modem +product TI FRI2 0x5053 TI Fish River Island II +product TI USB5052_EEPROM 0x505a TI USB 5250 Modem w/Eeprom +product TI USB5052_FW 0x505f TI USB 5250 Modme w/Firmware running +product TI USB5152 0x5152 TI USB 5152 Modem +product TI EZ430 0xf430 TI ex430 development tool /* Thrustmaster products */ product THRUST FUSION_PAD 0xa0a3 Fusion Digital Gamepad From owner-svn-src-all@freebsd.org Wed Feb 1 02:42:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6868CCB837; Wed, 1 Feb 2017 02:42:46 +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 75E2FC67; Wed, 1 Feb 2017 02:42:46 +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 v112gjnT020240; Wed, 1 Feb 2017 02:42:45 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v112gjoP020239; Wed, 1 Feb 2017 02:42:45 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201702010242.v112gjoP020239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 1 Feb 2017 02:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313035 - head/contrib/binutils/opcodes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 02:42:46 -0000 Author: jhibbits Date: Wed Feb 1 02:42:45 2017 New Revision: 313035 URL: https://svnweb.freebsd.org/changeset/base/313035 Log: Add rfdi opcode to binutils The rfdi instruction is part of the e500mc and derivative cores. It came into binutils in a GPLv3 patch, along with the rest of the e500mc instruction set. Currently only rfdi is planned to be used, so rather than attempt to backport the full patch, take a surgical route and add instructions as needed. MFC after: 2 weeks Modified: head/contrib/binutils/opcodes/ppc-opc.c Modified: head/contrib/binutils/opcodes/ppc-opc.c ============================================================================== --- head/contrib/binutils/opcodes/ppc-opc.c Wed Feb 1 02:00:18 2017 (r313034) +++ head/contrib/binutils/opcodes/ppc-opc.c Wed Feb 1 02:42:45 2017 (r313035) @@ -2789,6 +2789,7 @@ const struct powerpc_opcode powerpc_opco { "crnor", XL(19,33), XL_MASK, COM, { BT, BA, BB } }, { "rfmci", X(19,38), 0xffffffff, PPCRFMCI, { 0 } }, +{ "rfdi", XL(19,39), 0xffffffff, BOOKE, { 0 } }, { "rfi", XL(19,50), 0xffffffff, COM, { 0 } }, { "rfci", XL(19,51), 0xffffffff, PPC403 | BOOKE, { 0 } }, From owner-svn-src-all@freebsd.org Wed Feb 1 03:16:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D0F5CC9058; Wed, 1 Feb 2017 03:16:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id B4C871E96; Wed, 1 Feb 2017 03:16:53 +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 mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 633A31050504; Wed, 1 Feb 2017 14:16:48 +1100 (AEDT) Date: Wed, 1 Feb 2017 14:16:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Conrad Meyer cc: Bruce Evans , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern In-Reply-To: Message-ID: <20170201123838.X1974@besplex.bde.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170131153411.G1061@besplex.bde.org> <20170131175309.N1418@besplex.bde.org> <20170201005009.E2504@besplex.bde.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=c+HbeV1l c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=nlC_4_pT8q9DhB4Ho9EA:9 a=PO7r1zJSAAAA:8 a=rmU_qhSHxxD-BSzR1V0A:9 a=45ClL6m2LaAA:10 a=Oa0T6EYmKFNB-xRHvYM1:22 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 03:16:54 -0000 Another reply to this... On Tue, 31 Jan 2017, Conrad Meyer wrote: > On Tue, Jan 31, 2017 at 7:36 AM, Bruce Evans wrote= : >> On Tue, 31 Jan 2017, Bruce Evans wrote: >> Unrolling (or not) may be helpful or harmful for entry and exit code. > > Helpful, per my earlier benchmarks. > >> I >> think there should by no alignment on entry -- just assume the buffer is >> aligned in the usual case, and only run 4% slower when it is misaligned. > > Please write such a patch and demonstrate the improvement. It is easy to demonstrate. I just put #if 0 around the early alignment code. The result seem too good to be true, so maybe I missed some later dependency on alignment of the addresses: - for 128-byte buffers and misalignment of 3, 10g takes 1.48 seconds with alignment and 1.02 seconds without alignment. This actually makes sense, 128 bytes can be done with 16 8-byte unaligned crc32q's. The alignment code makes it do 15 * 8-but and (5 + 3) * 1-byte. 7 more 3-cycle instructions and overhead too is far more than the cost of letting the CPU do read-combining. - for 4096-byte buffers, the difference is insignificant (0.47 seconds for 10g. >> I >> don't understand the algorithm for joining crcs -- why doesn't it work >> to reduce to 12 or 24 bytes in the main loop? > >It would, but I haven't implemented or tested that. You're welcome to >do so and demonstrate an improvement. It does add more lookup table >bloat, but perhaps we could just remove the 3x8k table =E2=80=94 I'm not s= ure >it adds any benefit over the 3x256 table. Good idea, but the big table is useful. Ifdefing out the LONG case reduces the speed for large buffers from ~0.35 seconds to ~0.43 seconds in the setup below. Ifdefing out the SHORT case only reduces to ~0.39 seconds. I hoped that an even shorter SHORT case would work. I think it now handles 768 bytes (3 * SHORT) in the inner loop. That is 32 sets of 3 crc32q's, and I would have thought that update at the end would take about as long as 1 iteration (3%), but it apparently takes 33%. >> ... >> Your benchmarks mainly give results for the <=3D 768 bytes where most of >> the manual optimizations don't apply. > > 0x000400: asm:68 intrins:62 multitable:684 (ns per buf) > 0x000800: asm:132 intrins:133 (ns per buf) > 0x002000: asm:449 intrins:446 (ns per buf) > 0x008000: asm:1501 intrins:1497 (ns per buf) > 0x020000: asm:5618 intrins:5609 (ns per buf) > > (All routines are in a separate compilation unit with no full-program > optimization, as they are in the kernel.) These seem slow. I modified my program to test the actual kernel code, and get for 10gB on freefall's Xeon (main times in seconds): 0x000008: asm(rm):3.41 asm(r):3.07 intrins:6.01 gcc:3.74 (3S =3D 2.4ns/buf= ) 0x000010: asm(rm):2.05 asm(r):1.70 intrins:2.92 gcc:2.62 (2S =3D 3/2ns/buf= ) 0x000020: asm(rm):1.63 asm(r):1.58 intrins:1.62 gcc:1.61 (1.6S =3D 5.12ns/= buf) 0x000040: asm(rm):1.07 asm(r):1.11 intrins:1.06 gcc:1.14 (1.1S =3D 7.04ns/= buf) 0x000080: asm(rm):1.02 asm(r):1.04 intrins:1.03 gcc:1.04 (1.02S =3D 13.06n= s/buf) 0x000100: asm(rm):1.02 asm(r):1.02 intrins:1.02 gcc:1.08 (1.02S =3D 52.22n= s/buf) 0x000200: asm(rm):1.02 asm(r):1.02 intrins:1.02 gcc:1.02 (1.02S =3D 104.45= ns/buf) 0x000400: asm(rm):0.58 asm(r):0.57 intrins:0.57 gcc:0.57 (.57S =3D 116.43n= s/buf) 0x001000: asm(rm):0.62 asm(r):0.57 intrins:0.57 gcc:0.57 (.57S =3D 233.44n= s/buf) 0x002000: asm(rm):0.48 asm(r):0.46 intrins:0.46 gcc:0.46 (.46S =3D 376.83n= s/buf) 0x004000: asm(rm):0.49 asm(r):0.46 intrins:0.46 gcc:0.46 (.46S =3D 753.66n= s/buf) 0x008000: asm(rm):0.49 asm(r):0.38 intrins:0.38 gcc:0.38 (.38S =3D 1245.18= ns/buf) 0x010000: asm(rm):0.47 asm(r):0.38 intrins:0.36 gcc:0.38 (.36S =3D 2359.30= ns/buf) 0x020000: asm(rm):0.43 asm(r):1.05 intrins:0.35 gcc:0.36 (.35S =3D 4587.52= ns/buf) asm(r) is a fix for clang's slownes with inline asms. Just change the constraint from "rm" to "r". This takes an extra register, but no more uops. This is for the aligned case with no hacks. intrins does something bad for small buffers. Probably just the branch ove= r the dead unrolling. Twice 2.4ns/buf for 8-byte buffers is still very fast. This is 16 cycles. 3 cycles to do 1 crc32q and the rest mainly for 1 funct= ion call and too many branches. Bruce From owner-svn-src-all@freebsd.org Wed Feb 1 03:29:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 549DFCC93A4; Wed, 1 Feb 2017 03:29:15 +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 2F3D43C2; Wed, 1 Feb 2017 03:29:15 +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 v113TE4h037476; Wed, 1 Feb 2017 03:29:14 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v113TEPn037471; Wed, 1 Feb 2017 03:29:14 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201702010329.v113TEPn037471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 1 Feb 2017 03:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313036 - in head/sys/powerpc: booke include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 03:29:15 -0000 Author: jhibbits Date: Wed Feb 1 03:29:13 2017 New Revision: 313036 URL: https://svnweb.freebsd.org/changeset/base/313036 Log: Add Book-E Enhanced Debug (E.D) profile debug support Freescale added the E.D profile to e500mc and derivative cores. From Freescale's EREF reference manual this is enabled by a bit in HID0 and should otherwise default to traditional debug. However, none of the Freescale cores support that bit, and instead always use E.D. This results in kernel panics using the standard debug on e500mc+ cores. Enhanced debug allows debugging of interrupts, including critical interrupts, as it uses a different save/restore registers (srr*). At this time we don't use this ability, so instead share the core of the debug handler code between both handlers. MFC after: 3 weeks Modified: head/sys/powerpc/booke/booke_machdep.c head/sys/powerpc/booke/trap_subr.S head/sys/powerpc/include/spr.h Modified: head/sys/powerpc/booke/booke_machdep.c ============================================================================== --- head/sys/powerpc/booke/booke_machdep.c Wed Feb 1 02:42:45 2017 (r313035) +++ head/sys/powerpc/booke/booke_machdep.c Wed Feb 1 03:29:13 2017 (r313036) @@ -187,6 +187,7 @@ extern void *int_watchdog; extern void *int_data_tlb_error; extern void *int_inst_tlb_error; extern void *int_debug; +extern void *int_debug_ed; extern void *int_vec; extern void *int_vecast; #ifdef HWPMC_HOOKS @@ -242,6 +243,7 @@ ivor_setup(void) case FSL_E500mc: case FSL_E5500: SET_TRAP(SPR_IVOR7, int_fpu); + SET_TRAP(SPR_IVOR15, int_debug_ed); break; case FSL_E500v1: case FSL_E500v2: Modified: head/sys/powerpc/booke/trap_subr.S ============================================================================== --- head/sys/powerpc/booke/trap_subr.S Wed Feb 1 02:42:45 2017 (r313035) +++ head/sys/powerpc/booke/trap_subr.S Wed Feb 1 03:29:13 2017 (r313036) @@ -794,6 +794,22 @@ interrupt_vector_top: INTERRUPT(int_debug) STANDARD_CRIT_PROLOG(SPR_SPRG2, PC_BOOKE_CRITSAVE, SPR_CSRR0, SPR_CSRR1) FRAME_SETUP(SPR_SPRG2, PC_BOOKE_CRITSAVE, EXC_DEBUG) + bl int_debug_int + FRAME_LEAVE(SPR_CSRR0, SPR_CSRR1) + rfci + +INTERRUPT(int_debug_ed) + STANDARD_CRIT_PROLOG(SPR_SPRG2, PC_BOOKE_CRITSAVE, SPR_DSRR0, SPR_DSRR1) + FRAME_SETUP(SPR_SPRG2, PC_BOOKE_CRITSAVE, EXC_DEBUG) + bl int_debug_int + FRAME_LEAVE(SPR_DSRR0, SPR_DSRR1) + rfdi + /* .long 0x4c00004e */ + +/* Internal helper for debug interrupt handling. */ +/* Common code between e500v1/v2 and e500mc-based cores. */ +int_debug_int: + mflr %r14 GET_CPUINFO(%r3) lwz %r3, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR0)(%r3) bl 0f @@ -819,7 +835,8 @@ INTERRUPT(int_debug) mtspr SPR_SRR0, %r3 lwz %r4, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR1+8)(%r4); mtspr SPR_SRR1, %r4 - b 9f + mtlr %r14 + blr 1: addi %r3, %r1, 8 bl CNAME(trap) @@ -828,10 +845,6 @@ INTERRUPT(int_debug) * We actually need to return to the process with an rfi. */ b trapexit -9: - FRAME_LEAVE(SPR_CSRR0, SPR_CSRR1) - rfci - /***************************************************************************** * Common trap code Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Wed Feb 1 02:42:45 2017 (r313035) +++ head/sys/powerpc/include/spr.h Wed Feb 1 03:29:13 2017 (r313036) @@ -671,6 +671,8 @@ #define SPR_CSRR1 0x03b /* ..8 59 Critical SRR1 */ #define SPR_MCSRR0 0x23a /* ..8 570 Machine check SRR0 */ #define SPR_MCSRR1 0x23b /* ..8 571 Machine check SRR1 */ +#define SPR_DSRR0 0x23e /* ..8 574 Debug SRR0 */ +#define SPR_DSRR1 0x23f /* ..8 575 Debug SRR1 */ #define SPR_MMUCR 0x3b2 /* 4.. MMU Control Register */ #define MMUCR_SWOA (0x80000000 >> 7) From owner-svn-src-all@freebsd.org Wed Feb 1 03:32:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71BE2CC9573; Wed, 1 Feb 2017 03:32:51 +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 4BB259F7; Wed, 1 Feb 2017 03:32:51 +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 v113Wovs041369; Wed, 1 Feb 2017 03:32:50 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v113WnYf041362; Wed, 1 Feb 2017 03:32:49 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201702010332.v113WnYf041362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Wed, 1 Feb 2017 03:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 03:32:51 -0000 Author: jah Date: Wed Feb 1 03:32:49 2017 New Revision: 313037 URL: https://svnweb.freebsd.org/changeset/base/313037 Log: Implement get_pcpu() for the remaining architectures and use it to replace pcpu_find(curcpu) in MI code. Modified: head/sys/amd64/include/pcpu.h head/sys/kern/kern_rmlock.c head/sys/mips/include/pcpu.h head/sys/net/netisr.c head/sys/powerpc/include/cpufunc.h head/sys/powerpc/include/pcpu.h head/sys/sparc64/include/pcpu.h Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Wed Feb 1 03:29:13 2017 (r313036) +++ head/sys/amd64/include/pcpu.h Wed Feb 1 03:32:49 2017 (r313037) @@ -78,6 +78,7 @@ extern struct pcpu *pcpup; +#define get_pcpu() (pcpup) #define PCPU_GET(member) (pcpup->pc_ ## member) #define PCPU_ADD(member, val) (pcpup->pc_ ## member += (val)) #define PCPU_INC(member) PCPU_ADD(member, 1) @@ -203,6 +204,15 @@ extern struct pcpu *pcpup; } \ } +#define get_pcpu() __extension__ ({ \ + struct pcpu *__pc; \ + \ + __asm __volatile("movq %%gs:%1,%0" \ + : "=r" (__pc) \ + : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace)))); \ + __pc; \ +}) + #define PCPU_GET(member) __PCPU_GET(pc_ ## member) #define PCPU_ADD(member, val) __PCPU_ADD(pc_ ## member, val) #define PCPU_INC(member) __PCPU_INC(pc_ ## member) Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Wed Feb 1 03:29:13 2017 (r313036) +++ head/sys/kern/kern_rmlock.c Wed Feb 1 03:32:49 2017 (r313037) @@ -156,7 +156,7 @@ unlock_rm(struct lock_object *lock) */ critical_enter(); td = curthread; - pc = pcpu_find(curcpu); + pc = get_pcpu(); for (queue = pc->pc_rm_queue.rmq_next; queue != &pc->pc_rm_queue; queue = queue->rmq_next) { tracker = (struct rm_priotracker *)queue; @@ -258,7 +258,7 @@ rm_cleanIPI(void *arg) struct rmlock *rm = arg; struct rm_priotracker *tracker; struct rm_queue *queue; - pc = pcpu_find(curcpu); + pc = get_pcpu(); for (queue = pc->pc_rm_queue.rmq_next; queue != &pc->pc_rm_queue; queue = queue->rmq_next) { @@ -355,7 +355,7 @@ _rm_rlock_hard(struct rmlock *rm, struct struct pcpu *pc; critical_enter(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); /* Check if we just need to do a proper critical_exit. */ if (!CPU_ISSET(pc->pc_cpuid, &rm->rm_writecpus)) { @@ -416,7 +416,7 @@ _rm_rlock_hard(struct rmlock *rm, struct } critical_enter(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); CPU_CLR(pc->pc_cpuid, &rm->rm_writecpus); rm_tracker_add(pc, tracker); sched_pin(); @@ -641,7 +641,7 @@ _rm_rlock_debug(struct rmlock *rm, struc #ifdef INVARIANTS if (!(rm->lock_object.lo_flags & LO_RECURSABLE) && !trylock) { critical_enter(); - KASSERT(rm_trackers_present(pcpu_find(curcpu), rm, + KASSERT(rm_trackers_present(get_pcpu(), rm, curthread) == 0, ("rm_rlock: recursed on non-recursive rmlock %s @ %s:%d\n", rm->lock_object.lo_name, file, line)); @@ -771,7 +771,7 @@ _rm_assert(const struct rmlock *rm, int } critical_enter(); - count = rm_trackers_present(pcpu_find(curcpu), rm, curthread); + count = rm_trackers_present(get_pcpu(), rm, curthread); critical_exit(); if (count == 0) @@ -797,7 +797,7 @@ _rm_assert(const struct rmlock *rm, int rm->lock_object.lo_name, file, line); critical_enter(); - count = rm_trackers_present(pcpu_find(curcpu), rm, curthread); + count = rm_trackers_present(get_pcpu(), rm, curthread); critical_exit(); if (count != 0) Modified: head/sys/mips/include/pcpu.h ============================================================================== --- head/sys/mips/include/pcpu.h Wed Feb 1 03:29:13 2017 (r313036) +++ head/sys/mips/include/pcpu.h Wed Feb 1 03:32:49 2017 (r313037) @@ -65,6 +65,7 @@ extern char pcpu_space[MAXCPU][PAGE_SIZE extern struct pcpu *pcpup; #define PCPUP pcpup +#define get_pcpu() (pcpup) #define PCPU_ADD(member, value) (PCPUP->pc_ ## member += (value)) #define PCPU_GET(member) (PCPUP->pc_ ## member) #define PCPU_INC(member) PCPU_ADD(member, 1) Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Wed Feb 1 03:29:13 2017 (r313036) +++ head/sys/net/netisr.c Wed Feb 1 03:32:49 2017 (r313037) @@ -1268,9 +1268,7 @@ netisr_start_swi(u_int cpuid, struct pcp static void netisr_init(void *arg) { -#ifdef EARLY_AP_STARTUP struct pcpu *pc; -#endif NETISR_LOCK_INIT(); if (netisr_maxthreads == 0 || netisr_maxthreads < -1 ) @@ -1308,7 +1306,8 @@ netisr_init(void *arg) netisr_start_swi(pc->pc_cpuid, pc); } #else - netisr_start_swi(curcpu, pcpu_find(curcpu)); + pc = get_pcpu(); + netisr_start_swi(pc->pc_cpuid, pc); #endif } SYSINIT(netisr_init, SI_SUB_SOFTINTR, SI_ORDER_FIRST, netisr_init, NULL); Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Wed Feb 1 03:29:13 2017 (r313036) +++ head/sys/powerpc/include/cpufunc.h Wed Feb 1 03:32:49 2017 (r313037) @@ -201,7 +201,7 @@ intr_restore(register_t msr) } static __inline struct pcpu * -powerpc_get_pcpup(void) +get_pcpu(void) { struct pcpu *ret; Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Wed Feb 1 03:29:13 2017 (r313036) +++ head/sys/powerpc/include/pcpu.h Wed Feb 1 03:32:49 2017 (r313037) @@ -142,7 +142,7 @@ struct pvo_entry; #ifdef _KERNEL -#define pcpup ((struct pcpu *) powerpc_get_pcpup()) +#define pcpup (get_pcpu()) static __inline __pure2 struct thread * __curthread(void) Modified: head/sys/sparc64/include/pcpu.h ============================================================================== --- head/sys/sparc64/include/pcpu.h Wed Feb 1 03:29:13 2017 (r313036) +++ head/sys/sparc64/include/pcpu.h Wed Feb 1 03:32:49 2017 (r313037) @@ -74,6 +74,7 @@ struct pcpu; register struct pcb *curpcb __asm__(__XSTRING(PCB_REG)); register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG)); +#define get_pcpu() (pcpup) #define PCPU_GET(member) (pcpup->pc_ ## member) static __inline __pure2 struct thread * From owner-svn-src-all@freebsd.org Wed Feb 1 03:48:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DB61CC9886; Wed, 1 Feb 2017 03:48:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) (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 C1B44E71; Wed, 1 Feb 2017 03:48:01 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f66.google.com with SMTP id u63so2759024wmu.2; Tue, 31 Jan 2017 19:48:01 -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:content-transfer-encoding; bh=WWiyHxt5HVthivQqQ/DK2Et9fAgy86UG3XdpnRvUvt0=; b=JjNYEpMdJsxAraZZWJY6hhtGpfkXS5p9rmDm7iMINUSai1TAvj+8wSzNIfhojBnD6p UibOjcAz8X7G1q7sdb9ePsgCTc25kRcQKNJrBxWJCbvkIj3+rhRFcqMpIKDOv7aiMJc5 1jEqb4yi7RYT90+fvmhqcmS+B2PxhqRoA2tptVIp2q7DxnM1/XeTB6PoLDHy/OfaG9Zt R/YdFbZV4t8qMXJjocJNMk6pDgWJQi9B+p0zIHKJO2z5pffc0hHXKqO6DbfT6ZkFTcXK n5/rBHTBHbVzaCJJXLfisaKVv1Lwcwdd7HZYYdCXn6gMxcnXTGNStRy/Cnjw0+cHM3Hz CUog== X-Gm-Message-State: AIkVDXLtgPTXxy0ZLun9fhFnvlGm8Ck3jQGwHhG43EoIeUu8xPNmMC/DO2e/+A30R5XV6w== X-Received: by 10.223.165.1 with SMTP id i1mr517215wrb.82.1485920873992; Tue, 31 Jan 2017 19:47:53 -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 k70sm27194589wmc.3.2017.01.31.19.47.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 19:47:53 -0800 (PST) Received: by mail-wm0-f53.google.com with SMTP id v77so18495256wmv.0; Tue, 31 Jan 2017 19:47:53 -0800 (PST) X-Received: by 10.223.174.183 with SMTP id y52mr592705wrc.112.1485920873590; Tue, 31 Jan 2017 19:47:53 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.194.22.42 with HTTP; Tue, 31 Jan 2017 19:47:53 -0800 (PST) In-Reply-To: <20170201123838.X1974@besplex.bde.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170131153411.G1061@besplex.bde.org> <20170131175309.N1418@besplex.bde.org> <20170201005009.E2504@besplex.bde.org> <20170201123838.X1974@besplex.bde.org> From: Conrad Meyer Date: Tue, 31 Jan 2017 19:47:53 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern To: Bruce Evans Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 03:48:02 -0000 On Tue, Jan 31, 2017 at 7:16 PM, Bruce Evans wrote: > Another reply to this... > > On Tue, 31 Jan 2017, Conrad Meyer wrote: > >> On Tue, Jan 31, 2017 at 7:36 AM, Bruce Evans wrot= e: >>> >>> On Tue, 31 Jan 2017, Bruce Evans wrote: >>> I >>> think there should by no alignment on entry -- just assume the buffer i= s >>> aligned in the usual case, and only run 4% slower when it is misaligned= . >> >> >> Please write such a patch and demonstrate the improvement. > > > It is easy to demonstrate. I just put #if 0 around the early alignment > code. The result seem too good to be true, so maybe I missed some > later dependency on alignment of the addresses: > - for 128-byte buffers and misalignment of 3, 10g takes 1.48 seconds with > alignment and 1.02 seconds without alignment. > This actually makes sense, 128 bytes can be done with 16 8-byte unaligned > crc32q's. The alignment code makes it do 15 * 8-but and (5 + 3) * 1-byte= . > 7 more 3-cycle instructions and overhead too is far more than the cost > of letting the CPU do read-combining. > - for 4096-byte buffers, the difference is insignificant (0.47 seconds fo= r > 10g. I believe it, especially for newer amd64. I seem to recall that older x86 machines had a higher misalignment penalty, but it was largely reduced in (?)Nehalem. Why don't you go ahead and commit that change? >> perhaps we could just remove the 3x8k table =E2=80=94 I'm not sure >> it adds any benefit over the 3x256 table. > > > Good idea, but the big table is useful. Ifdefing out the LONG case reduc= es > the speed for large buffers from ~0.35 seconds to ~0.43 seconds in the > setup below. Ifdefing out the SHORT case only reduces to ~0.39 seconds. Interesting. > I hoped that an even shorter SHORT case would work. I think it now handl= es > 768 bytes (3 * SHORT) in the inner loop. Right. > That is 32 sets of 3 crc32q's, > and I would have thought that update at the end would take about as long > as 1 iteration (3%), but it apparently takes 33%. The update at the end may be faster with PCLMULQDQ. There are versions of this algorithm that use that in place of the lookup-table combine (for example, Linux has a permissively licensed implementation here: http://lxr.free-electrons.com/source/arch/x86/crypto/crc32c-pcl-intel= -asm_64.S ). Unfortunately, PCLMULQDQ uses FPU state, which is inappropriate most of the time in kernel mode. It could be used opportunistically if the thread is already in FPU-save mode or if the input is "big enough" to make it worth it. >>> Your benchmarks mainly give results for the <=3D 768 bytes where most o= f >>> the manual optimizations don't apply. >> >> >> 0x000400: asm:68 intrins:62 multitable:684 (ns per buf) >> 0x000800: asm:132 intrins:133 (ns per buf) >> 0x002000: asm:449 intrins:446 (ns per buf) >> 0x008000: asm:1501 intrins:1497 (ns per buf) >> 0x020000: asm:5618 intrins:5609 (ns per buf) >> >> (All routines are in a separate compilation unit with no full-program >> optimization, as they are in the kernel.) > > > These seem slow. I modified my program to test the actual kernel code, > and get for 10gB on freefall's Xeon (main times in seconds): Freefall has a Haswell Xeon @ 3.3GHz. My laptop is a Sandy Bridge Core i5 @ 2.6 GHz. That may help explain the difference. Best, Conrad From owner-svn-src-all@freebsd.org Wed Feb 1 04:02:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5EDECC9C54; Wed, 1 Feb 2017 04:02:01 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "StartCom Class 2 IV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BC5F164C; Wed, 1 Feb 2017 04:02:01 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 39085E5; Tue, 31 Jan 2017 22:01:55 -0600 (CST) Date: Tue, 31 Jan 2017 22:01:54 -0600 From: Mark Linimon To: Warner Losh Cc: John Baldwin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170201040153.GB32398@lonesome.com> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <2911087.bbEsWibF87@ralph.baldwin.cx> <3458844.3oruRKbrzH@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 04:02:01 -0000 On Tue, Jan 31, 2017 at 04:36:04PM -0700, Warner Losh wrote: > ISA-only attachments would be a good place to start. My quick glance > shows this would be le(4), aha(4), cm(4), mse(4), and joy(4). There's > maybe half a dozen EISA-only drivers in the tree that I was planning > on retiring in 12, along with EISA. Likewise with the MCA attachments. I can join the list of people threatening to send ISA cards to anyone who objects. This should scare them into not objecting :-) (Yes, there is still at least one aha(4) card here in the house. Somewhere.) mcl From owner-svn-src-all@freebsd.org Wed Feb 1 04:53:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4221CCA8CE; Wed, 1 Feb 2017 04:53:53 +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 78D21C0D; Wed, 1 Feb 2017 04:53:53 +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 v114rq3e073903; Wed, 1 Feb 2017 04:53:52 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v114rqdG073902; Wed, 1 Feb 2017 04:53:52 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201702010453.v114rqdG073902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 1 Feb 2017 04:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313038 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 04:53:53 -0000 Author: rpokala Date: Wed Feb 1 04:53:52 2017 New Revision: 313038 URL: https://svnweb.freebsd.org/changeset/base/313038 Log: MFC r312678: Eliminate misleading comments and dead code in lacp_port_create() Variables "fast" and "active" are both constant in lacp_port_create(), but comments mispleadingly suggest that "fast" can be changed via ioctl. The constant values control the value of "lp->lp_state", so it too is constant, and the code for assigning different value to it is essentially dead. Remove both "fast" and "active", and set "lp->lp_state" unconditionally; that gets rid of the dead code and misleading comments. Modified: stable/11/sys/net/ieee8023ad_lacp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/11/sys/net/ieee8023ad_lacp.c Wed Feb 1 03:32:49 2017 (r313037) +++ stable/11/sys/net/ieee8023ad_lacp.c Wed Feb 1 04:53:52 2017 (r313038) @@ -526,9 +526,6 @@ lacp_port_create(struct lagg_port *lgp) struct ifmultiaddr *rifma = NULL; int error; - boolean_t active = TRUE; /* XXX should be configurable */ - boolean_t fast = FALSE; /* Configurable via ioctl */ - link_init_sdl(ifp, (struct sockaddr *)&sdl, IFT_ETHER); sdl.sdl_alen = ETHER_ADDR_LEN; @@ -557,9 +554,7 @@ lacp_port_create(struct lagg_port *lgp) lacp_fill_actorinfo(lp, &lp->lp_actor); lacp_fill_markerinfo(lp, &lp->lp_marker); - lp->lp_state = - (active ? LACP_STATE_ACTIVITY : 0) | - (fast ? LACP_STATE_TIMEOUT : 0); + lp->lp_state = LACP_STATE_ACTIVITY; lp->lp_aggregator = NULL; lacp_sm_rx_set_expired(lp); LACP_UNLOCK(lsc); From owner-svn-src-all@freebsd.org Wed Feb 1 04:54:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EA21CCA94D; Wed, 1 Feb 2017 04:54:24 +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 3DECBD32; Wed, 1 Feb 2017 04:54:24 +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 v114sNqr073970; Wed, 1 Feb 2017 04:54:23 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v114sNZH073969; Wed, 1 Feb 2017 04:54:23 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201702010454.v114sNZH073969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 1 Feb 2017 04:54:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313039 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 04:54:24 -0000 Author: rpokala Date: Wed Feb 1 04:54:23 2017 New Revision: 313039 URL: https://svnweb.freebsd.org/changeset/base/313039 Log: MFC r312678: Eliminate misleading comments and dead code in lacp_port_create() Variables "fast" and "active" are both constant in lacp_port_create(), but comments mispleadingly suggest that "fast" can be changed via ioctl. The constant values control the value of "lp->lp_state", so it too is constant, and the code for assigning different value to it is essentially dead. Remove both "fast" and "active", and set "lp->lp_state" unconditionally; that gets rid of the dead code and misleading comments. Modified: stable/10/sys/net/ieee8023ad_lacp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/10/sys/net/ieee8023ad_lacp.c Wed Feb 1 04:53:52 2017 (r313038) +++ stable/10/sys/net/ieee8023ad_lacp.c Wed Feb 1 04:54:23 2017 (r313039) @@ -523,9 +523,6 @@ lacp_port_create(struct lagg_port *lgp) struct ifmultiaddr *rifma = NULL; int error; - boolean_t active = TRUE; /* XXX should be configurable */ - boolean_t fast = FALSE; /* Configurable via ioctl */ - bzero((char *)&sdl, sizeof(sdl)); sdl.sdl_len = sizeof(sdl); sdl.sdl_family = AF_LINK; @@ -557,9 +554,7 @@ lacp_port_create(struct lagg_port *lgp) lacp_fill_actorinfo(lp, &lp->lp_actor); lacp_fill_markerinfo(lp, &lp->lp_marker); - lp->lp_state = - (active ? LACP_STATE_ACTIVITY : 0) | - (fast ? LACP_STATE_TIMEOUT : 0); + lp->lp_state = LACP_STATE_ACTIVITY; lp->lp_aggregator = NULL; lacp_sm_rx_set_expired(lp); LACP_UNLOCK(lsc); From owner-svn-src-all@freebsd.org Wed Feb 1 05:00:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1338CD4A89; Wed, 1 Feb 2017 05:00:35 +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 CB635190D; Wed, 1 Feb 2017 05:00:35 +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 v1150Ygw075052; Wed, 1 Feb 2017 05:00:34 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1150YLR075051; Wed, 1 Feb 2017 05:00:34 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201702010500.v1150YLR075051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Wed, 1 Feb 2017 05:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313040 - head/sys/mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 05:00:36 -0000 Author: kan Date: Wed Feb 1 05:00:34 2017 New Revision: 313040 URL: https://svnweb.freebsd.org/changeset/base/313040 Log: Add atomic_fcmpset_*() inlines for MIPS atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the read value from the target memory location into the 'old' pointer. Reviewed by: imp, brooks Requested by: mjg Differential Revision: https://reviews.freebsd.org/D9391 Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Wed Feb 1 04:54:23 2017 (r313039) +++ head/sys/mips/include/atomic.h Wed Feb 1 05:00:34 2017 (r313040) @@ -362,7 +362,7 @@ atomic_load_64(__volatile uint64_t *p, u * zero if the compare failed, nonzero otherwise. */ static __inline uint32_t -atomic_cmpset_32(__volatile uint32_t* p, uint32_t cmpval, uint32_t newval) +atomic_cmpset_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) { uint32_t ret; @@ -405,6 +405,46 @@ atomic_cmpset_rel_32(__volatile uint32_t return (atomic_cmpset_32(p, cmpval, newval)); } +static __inline uint32_t +atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + uint32_t ret; + + __asm __volatile ( + "1:\n\t" + "ll %0, %1\n\t" /* load old value */ + "bne %0, %4, 2f\n\t" /* compare */ + "move %0, %3\n\t" /* value to store */ + "sc %0, %1\n\t" /* attempt to store */ + "beqz %0, 1b\n\t" /* if it failed, spin */ + "j 3f\n\t" + "2:\n\t" + "sw %0, %2\n\t" /* save old value */ + "li %0, 0\n\t" + "3:\n" + : "=&r" (ret), "+m" (*p), "=m" (*cmpval) + : "r" (newval), "r" (*cmpval) + : "memory"); + return ret; +} + +static __inline uint32_t +atomic_fcmpset_acq_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + int retval; + + retval = atomic_fcmpset_32(p, cmpval, newval); + mips_sync(); + return (retval); +} + +static __inline uint32_t +atomic_fcmpset_rel_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + mips_sync(); + return (atomic_fcmpset_32(p, cmpval, newval)); +} + /* * Atomically add the value of v to the integer pointed to by p and return * the previous value of *p. @@ -431,7 +471,7 @@ atomic_fetchadd_32(__volatile uint32_t * * zero if the compare failed, nonzero otherwise. */ static __inline uint64_t -atomic_cmpset_64(__volatile uint64_t* p, uint64_t cmpval, uint64_t newval) +atomic_cmpset_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) { uint64_t ret; @@ -475,6 +515,47 @@ atomic_cmpset_rel_64(__volatile uint64_t return (atomic_cmpset_64(p, cmpval, newval)); } +static __inline uint32_t +atomic_fcmpset_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + uint32_t ret; + + __asm __volatile ( + "1:\n\t" + "lld %0, %1\n\t" /* load old value */ + "bne %0, %4, 2f\n\t" /* compare */ + "move %0, %3\n\t" /* value to store */ + "scd %0, %1\n\t" /* attempt to store */ + "beqz %0, 1b\n\t" /* if it failed, spin */ + "j 3f\n\t" + "2:\n\t" + "sw %0, %2\n\t" /* save old value */ + "li %0, 0\n\t" + "3:\n" + : "=&r" (ret), "+m" (*p), "=m" (*cmpval) + : "r" (newval), "r" (*cmpval) + : "memory"); + + return ret; +} + +static __inline uint64_t +atomic_fcmpset_acq_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + int retval; + + retval = atomic_fcmpset_64(p, cmpval, newval); + mips_sync(); + return (retval); +} + +static __inline uint64_t +atomic_fcmpset_rel_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + mips_sync(); + return (atomic_fcmpset_64(p, cmpval, newval)); +} + /* * Atomically add the value of v to the integer pointed to by p and return * the previous value of *p. @@ -568,6 +649,9 @@ atomic_thread_fence_seq_cst(void) #define atomic_cmpset_int atomic_cmpset_32 #define atomic_cmpset_acq_int atomic_cmpset_acq_32 #define atomic_cmpset_rel_int atomic_cmpset_rel_32 +#define atomic_fcmpset_int atomic_fcmpset_32 +#define atomic_fcmpset_acq_int atomic_fcmpset_acq_32 +#define atomic_fcmpset_rel_int atomic_fcmpset_rel_32 #define atomic_load_acq_int atomic_load_acq_32 #define atomic_store_rel_int atomic_store_rel_32 #define atomic_readandclear_int atomic_readandclear_32 @@ -597,6 +681,9 @@ atomic_thread_fence_seq_cst(void) #define atomic_cmpset_long atomic_cmpset_64 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 #define atomic_cmpset_rel_long atomic_cmpset_rel_64 +#define atomic_fcmpset_long atomic_fcmpset_64 +#define atomic_fcmpset_acq_long atomic_fcmpset_acq_64 +#define atomic_fcmpset_rel_long atomic_fcmpset_rel_64 #define atomic_load_acq_long atomic_load_acq_64 #define atomic_store_rel_long atomic_store_rel_64 #define atomic_fetchadd_long atomic_fetchadd_64 @@ -638,6 +725,15 @@ atomic_thread_fence_seq_cst(void) #define atomic_cmpset_rel_long(p, cmpval, newval) \ atomic_cmpset_rel_32((volatile u_int *)(p), (u_int)(cmpval), \ (u_int)(newval)) +#define atomic_fcmpset_long(p, cmpval, newval) \ + atomic_fcmpset_32((volatile u_int *)(p), (u_int *)(cmpval), \ + (u_int)(newval)) +#define atomic_fcmpset_acq_long(p, cmpval, newval) \ + atomic_fcmpset_acq_32((volatile u_int *)(p), (u_int *)(cmpval), \ + (u_int)(newval)) +#define atomic_fcmpset_rel_long(p, cmpval, newval) \ + atomic_fcmpset_rel_32((volatile u_int *)(p), (u_int *)(cmpval), \ + (u_int)(newval)) #define atomic_load_acq_long(p) \ (u_long)atomic_load_acq_32((volatile u_int *)(p)) #define atomic_store_rel_long(p, v) \ @@ -665,6 +761,9 @@ atomic_thread_fence_seq_cst(void) #define atomic_cmpset_ptr atomic_cmpset_long #define atomic_cmpset_acq_ptr atomic_cmpset_acq_long #define atomic_cmpset_rel_ptr atomic_cmpset_rel_long +#define atomic_fcmpset_ptr atomic_fcmpset_long +#define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_long +#define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_long #define atomic_load_acq_ptr atomic_load_acq_long #define atomic_store_rel_ptr atomic_store_rel_long #define atomic_readandclear_ptr atomic_readandclear_long From owner-svn-src-all@freebsd.org Wed Feb 1 05:24:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FE1CCCEF65; Wed, 1 Feb 2017 05:24:18 +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 3F4B266D; Wed, 1 Feb 2017 05:24:18 +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 v115OH9D086101; Wed, 1 Feb 2017 05:24:17 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v115OH0n086100; Wed, 1 Feb 2017 05:24:17 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201702010524.v115OH0n086100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 1 Feb 2017 05:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313041 - head/gnu/usr.bin/cc/cc_tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 05:24:18 -0000 Author: emaste Date: Wed Feb 1 05:24:17 2017 New Revision: 313041 URL: https://svnweb.freebsd.org/changeset/base/313041 Log: Bump GCC FBSD_CC_VER for r312899 (-march=octeon+ support) Reported by: lidl MFC after: 1 month MFC with: r312899 Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Wed Feb 1 05:00:34 2017 (r313040) +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Wed Feb 1 05:24:17 2017 (r313041) @@ -8,7 +8,7 @@ /* Fake out gcc/config/freebsd.h. */ #define FBSD_MAJOR 12 -#define FBSD_CC_VER 1200000 /* form like __FreeBSD_version */ +#define FBSD_CC_VER 1200001 /* form like __FreeBSD_version */ #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ #undef TOOL_INCLUDE_DIR /* We don't need one for now. */ From owner-svn-src-all@freebsd.org Wed Feb 1 08:47:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4F74CCA8E1; Wed, 1 Feb 2017 08:47:00 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 839DD1056; Wed, 1 Feb 2017 08:47:00 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v118kxth070782; Wed, 1 Feb 2017 08:46:59 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v118kxNk070776; Wed, 1 Feb 2017 08:46:59 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702010846.v118kxNk070776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 1 Feb 2017 08:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313042 - in head/sys/boot: efi/include efi/libefi efi/loader forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 08:47:00 -0000 Author: tsoome Date: Wed Feb 1 08:46:59 2017 New Revision: 313042 URL: https://svnweb.freebsd.org/changeset/base/313042 Log: loader.efi environment related cleanups Since we have dedicated libefi/env.c file for variable support, the following changes are done: Simple cstyle changes in env.c Moved efi variable related commands from loader/main.c to libefi/env.c Did create function to set "efi-version" environment variable in env.c. This function does serve two purposes: for first a small clean up of the loader main(), and for second, it does replace the otherwise unused efi_variable_support hack. A bit of cleanup of ficl backend functions. The TEST_MAIN has no meaning, and removed few memory leaks. The forth code is updated to use "efi-version" variable, instead of ficl environment check. Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D9165 Added: head/sys/boot/efi/libefi/wchar.c (contents, props changed) Modified: head/sys/boot/efi/include/efilib.h head/sys/boot/efi/libefi/Makefile head/sys/boot/efi/libefi/env.c head/sys/boot/efi/loader/main.c head/sys/boot/forth/loader.4th Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Wed Feb 1 05:24:17 2017 (r313041) +++ head/sys/boot/efi/include/efilib.h Wed Feb 1 08:46:59 2017 (r313042) @@ -65,4 +65,12 @@ EFI_STATUS main(int argc, CHAR16 *argv[] void exit(EFI_STATUS status); void delay(int usecs); +/* EFI environment initialization. */ +void efi_init_environment(void); + +/* CHAR16 utility functions. */ +int wcscmp(CHAR16 *, CHAR16 *); +void cpy8to16(const char *, CHAR16 *, size_t); +void cpy16to8(const CHAR16 *, char *, size_t); + #endif /* _LOADER_EFILIB_H */ Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Wed Feb 1 05:24:17 2017 (r313041) +++ head/sys/boot/efi/libefi/Makefile Wed Feb 1 08:46:59 2017 (r313042) @@ -3,6 +3,7 @@ .include .if ${MK_FORTH} != "no" +CFLAGS+= -DBOOT_FORTH .include "${.CURDIR}/../../Makefile.ficl" .endif @@ -10,17 +11,14 @@ LIB= efi INTERNALLIB= WARNS?= 2 -SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c errno.c \ - handles.c libefi.c +SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \ + handles.c wchar.c libefi.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= time.c .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" SRCS+= time_event.c .endif -.if ${MK_FORTH} != "no" -SRCS+= env.c -.endif # We implement a slightly non-standard %S in that it always takes a # CHAR16 that's common in UEFI-land instead of a wchar_t. This only Modified: head/sys/boot/efi/libefi/env.c ============================================================================== --- head/sys/boot/efi/libefi/env.c Wed Feb 1 05:24:17 2017 (r313041) +++ head/sys/boot/efi/libefi/env.c Wed Feb 1 08:46:59 2017 (r313042) @@ -26,15 +26,17 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include #include #include +#include #include "bootstrap.h" +#ifdef BOOT_FORTH #include "ficl.h" - -int efi_variable_support = 1; +#endif /* * Simple wrappers to the underlying UEFI functions. @@ -42,36 +44,348 @@ int efi_variable_support = 1; * for details. */ EFI_STATUS -efi_get_next_variable_name(UINTN *variable_name_size, CHAR16 *variable_name, EFI_GUID *vendor_guid) +efi_get_next_variable_name(UINTN *variable_name_size, CHAR16 *variable_name, + EFI_GUID *vendor_guid) { - return RS->GetNextVariableName(variable_name_size, variable_name, vendor_guid); + return (RS->GetNextVariableName(variable_name_size, variable_name, + vendor_guid)); } EFI_STATUS -efi_get_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, UINT32 *attributes, UINTN *data_size, - void *data) +efi_get_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, + UINT32 *attributes, UINTN *data_size, void *data) { - return RS->GetVariable(variable_name, vendor_guid, attributes, data_size, data); + return (RS->GetVariable(variable_name, vendor_guid, attributes, + data_size, data)); } EFI_STATUS -efi_set_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, UINT32 attributes, UINTN data_size, - void *data) +efi_set_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, + UINT32 attributes, UINTN data_size, void *data) +{ + return (RS->SetVariable(variable_name, vendor_guid, attributes, + data_size, data)); +} + +void +efi_init_environment(void) +{ + char var[128]; + + snprintf(var, sizeof(var), "%d.%02d", ST->Hdr.Revision >> 16, + ST->Hdr.Revision & 0xffff); + env_setenv("efi-version", EV_VOLATILE, var, env_noset, env_nounset); +} + +COMMAND_SET(efishow, "efi-show", "print some or all EFI variables", command_efi_show); + +static int +efi_print_var(CHAR16 *varnamearg, EFI_GUID *matchguid, int lflag) { - return RS->SetVariable(variable_name, vendor_guid, attributes, data_size, data); + UINTN datasz, i; + EFI_STATUS status; + UINT32 attr; + CHAR16 *data; + char *str; + uint32_t uuid_status; + int is_ascii; + + datasz = 0; + status = RS->GetVariable(varnamearg, matchguid, &attr, + &datasz, NULL); + if (status != EFI_BUFFER_TOO_SMALL) { + printf("Can't get the variable: error %#lx\n", status); + return (CMD_ERROR); + } + data = malloc(datasz); + status = RS->GetVariable(varnamearg, matchguid, &attr, + &datasz, data); + if (status != EFI_SUCCESS) { + printf("Can't get the variable: error %#lx\n", status); + return (CMD_ERROR); + } + uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); + if (lflag) { + printf("%s 0x%x %S", str, attr, varnamearg); + } else { + printf("%s 0x%x %S=", str, attr, varnamearg); + is_ascii = 1; + free(str); + str = (char *)data; + for (i = 0; i < datasz - 1; i++) { + /* Quick hack to see if this ascii-ish string printable range plus tab, cr and lf */ + if ((str[i] < 32 || str[i] > 126) && str[i] != 9 && str[i] != 10 && str[i] != 13) { + is_ascii = 0; + break; + } + } + if (str[datasz - 1] != '\0') + is_ascii = 0; + if (is_ascii) + printf("%s", str); + else { + for (i = 0; i < datasz / 2; i++) { + if (isalnum(data[i]) || isspace(data[i])) + printf("%c", data[i]); + else + printf("\\x%02x", data[i]); + } + } + } + free(data); + if (pager_output("\n")) + return (CMD_WARN); + return (CMD_OK); } +static int +command_efi_show(int argc, char *argv[]) +{ + /* + * efi-show [-a] + * print all the env + * efi-show -u UUID + * print all the env vars tagged with UUID + * efi-show -v var + * search all the env vars and print the ones matching var + * eif-show -u UUID -v var + * eif-show UUID var + * print all the env vars that match UUID and var + */ + /* NB: We assume EFI_GUID is the same as uuid_t */ + int aflag = 0, gflag = 0, lflag = 0, vflag = 0; + int ch, rv; + unsigned i; + EFI_STATUS status; + EFI_GUID varguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; + EFI_GUID matchguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; + uint32_t uuid_status; + CHAR16 *varname; + CHAR16 *newnm; + CHAR16 varnamearg[128]; + UINTN varalloc; + UINTN varsz; + + while ((ch = getopt(argc, argv, "ag:lv:")) != -1) { + switch (ch) { + case 'a': + aflag = 1; + break; + case 'g': + gflag = 1; + uuid_from_string(optarg, (uuid_t *)&matchguid, + &uuid_status); + if (uuid_status != uuid_s_ok) { + printf("uid %s could not be parsed\n", optarg); + return (CMD_ERROR); + } + break; + case 'l': + lflag = 1; + break; + case 'v': + vflag = 1; + if (strlen(optarg) >= nitems(varnamearg)) { + printf("Variable %s is longer than %zd characters\n", + optarg, nitems(varnamearg)); + return (CMD_ERROR); + } + for (i = 0; i < strlen(optarg); i++) + varnamearg[i] = optarg[i]; + varnamearg[i] = 0; + break; + default: + printf("Invalid argument %c\n", ch); + return (CMD_ERROR); + } + } + + if (aflag && (gflag || vflag)) { + printf("-a isn't compatible with -v or -u\n"); + return (CMD_ERROR); + } + + if (aflag && optind < argc) { + printf("-a doesn't take any args\n"); + return (CMD_ERROR); + } + + if (optind == argc) + aflag = 1; + + argc -= optind; + argv += optind; + + pager_open(); + if (vflag && gflag) { + rv = efi_print_var(varnamearg, &matchguid, lflag); + pager_close(); + return (rv); + } + + if (argc == 2) { + optarg = argv[0]; + if (strlen(optarg) >= nitems(varnamearg)) { + printf("Variable %s is longer than %zd characters\n", + optarg, nitems(varnamearg)); + pager_close(); + return (CMD_ERROR); + } + for (i = 0; i < strlen(optarg); i++) + varnamearg[i] = optarg[i]; + varnamearg[i] = 0; + optarg = argv[1]; + uuid_from_string(optarg, (uuid_t *)&matchguid, + &uuid_status); + if (uuid_status != uuid_s_ok) { + printf("uid %s could not be parsed\n", optarg); + pager_close(); + return (CMD_ERROR); + } + rv = efi_print_var(varnamearg, &matchguid, lflag); + pager_close(); + return (rv); + } + + if (argc > 0) { + printf("Too many args %d\n", argc); + pager_close(); + return (CMD_ERROR); + } + + /* + * Initiate the search -- note the standard takes pain + * to specify the initial call must be a poiner to a NULL + * character. + */ + varalloc = 1024; + varname = malloc(varalloc); + if (varname == NULL) { + printf("Can't allocate memory to get variables\n"); + pager_close(); + return (CMD_ERROR); + } + varname[0] = 0; + while (1) { + varsz = varalloc; + status = RS->GetNextVariableName(&varsz, varname, &varguid); + if (status == EFI_BUFFER_TOO_SMALL) { + varalloc = varsz; + newnm = realloc(varname, varalloc); + if (newnm == NULL) { + printf("Can't allocate memory to get variables\n"); + free(varname); + pager_close(); + return (CMD_ERROR); + } + varname = newnm; + continue; /* Try again with bigger buffer */ + } + if (status != EFI_SUCCESS) + break; + if (aflag) { + if (efi_print_var(varname, &varguid, lflag) != CMD_OK) + break; + continue; + } + if (vflag) { + if (wcscmp(varnamearg, varname) == 0) { + if (efi_print_var(varname, &varguid, lflag) != CMD_OK) + break; + continue; + } + } + if (gflag) { + if (memcmp(&varguid, &matchguid, sizeof(varguid)) == 0) { + if (efi_print_var(varname, &varguid, lflag) != CMD_OK) + break; + continue; + } + } + } + free(varname); + pager_close(); + + return (CMD_OK); +} + +COMMAND_SET(efiset, "efi-set", "set EFI variables", command_efi_set); + +static int +command_efi_set(int argc, char *argv[]) +{ + char *uuid, *var, *val; + CHAR16 wvar[128]; + EFI_GUID guid; + uint32_t status; + EFI_STATUS err; + + if (argc != 4) { + printf("efi-set uuid var new-value\n"); + return (CMD_ERROR); + } + uuid = argv[1]; + var = argv[2]; + val = argv[3]; + uuid_from_string(uuid, (uuid_t *)&guid, &status); + if (status != uuid_s_ok) { + printf("Invalid uuid %s %d\n", uuid, status); + return (CMD_ERROR); + } + cpy8to16(var, wvar, sizeof(wvar)); + err = RS->SetVariable(wvar, &guid, + EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS, + strlen(val) + 1, val); + if (EFI_ERROR(err)) { + printf("Failed to set variable: error %lu\n", EFI_ERROR_CODE(err)); + return (CMD_ERROR); + } + return (CMD_OK); +} + +COMMAND_SET(efiunset, "efi-unset", "delete / unset EFI variables", command_efi_unset); + +static int +command_efi_unset(int argc, char *argv[]) +{ + char *uuid, *var; + CHAR16 wvar[128]; + EFI_GUID guid; + uint32_t status; + EFI_STATUS err; + + if (argc != 3) { + printf("efi-unset uuid var\n"); + return (CMD_ERROR); + } + uuid = argv[1]; + var = argv[2]; + uuid_from_string(uuid, (uuid_t *)&guid, &status); + if (status != uuid_s_ok) { + printf("Invalid uuid %s\n", uuid); + return (CMD_ERROR); + } + cpy8to16(var, wvar, sizeof(wvar)); + err = RS->SetVariable(wvar, &guid, 0, 0, NULL); + if (EFI_ERROR(err)) { + printf("Failed to unset variable: error %lu\n", EFI_ERROR_CODE(err)); + return (CMD_ERROR); + } + return (CMD_OK); +} + +#ifdef BOOT_FORTH /* - * FreeBSD's loader interaction words and extras + * FreeBSD's loader interaction words and extras * - * efi-setenv ( value n name n guid n attr -- 0 | -1) - * efi-getenv ( guid n addr n -- addr' n' | -1 ) - * efi-unsetenv ( name n guid n'' -- ) + * efi-setenv ( value n name n guid n attr -- 0 | -1) + * efi-getenv ( guid n addr n -- addr' n' | -1 ) + * efi-unsetenv ( name n guid n'' -- ) */ /* * efi-setenv - * efi-setenv ( value n name n guid n attr -- 0 | -1) + * efi-setenv ( value n name n guid n attr -- 0 | -1) * * Set environment variables using the SetVariable EFI runtime service. * @@ -87,19 +401,18 @@ efi_set_variable(CHAR16 *variable_name, * 4 Run time access * (corresponding to the same bits in the UEFI spec). */ -void +static void ficlEfiSetenv(FICL_VM *pVM) { -#ifndef TESTMAIN char *value = NULL, *guid = NULL; CHAR16 *name = NULL; int i; -#endif char *namep, *valuep, *guidp; int names, values, guids, attr; - int status; + EFI_STATUS status; uuid_t u; uint32_t ustatus; + bool error = true; #if FICL_ROBUST > 1 vmCheckStack(pVM, 6, 0); @@ -112,10 +425,9 @@ ficlEfiSetenv(FICL_VM *pVM) values = stackPopINT(pVM->pStack); valuep = (char*)stackPopPtr(pVM->pStack); -#ifndef TESTMAIN guid = (char*)ficlMalloc(guids); if (guid == NULL) - vmThrowErr(pVM, "Error: out of memory"); + goto out; memcpy(guid, guidp, guids); uuid_from_string(guid, &u, &ustatus); if (ustatus != uuid_s_ok) { @@ -123,16 +435,16 @@ ficlEfiSetenv(FICL_VM *pVM) goto out; } - name = (CHAR16 *)ficlMalloc((names + 1) * sizeof(CHAR16)); + name = ficlMalloc((names + 1) * sizeof(CHAR16)); if (name == NULL) - vmThrowErr(pVM, "Error: out of memory"); + goto out; for (i = 0; i < names; i++) name[i] = namep[i]; - name[names] = (CHAR16)0; + name[names] = 0; - value = (char*)ficlMalloc(values + 1); + value = ficlMalloc(values + 1); if (value == NULL) - vmThrowErr(pVM, "Error: out of memory"); + goto out; memcpy(value, valuep, values); status = efi_set_variable(name, (EFI_GUID *)&u, attr, values, value); @@ -140,21 +452,20 @@ ficlEfiSetenv(FICL_VM *pVM) stackPushINT(pVM->pStack, 0); else stackPushINT(pVM->pStack, -1); + error = false; out: ficlFree(name); ficlFree(value); ficlFree(guid); -#endif - return; + if (error == true) + vmThrowErr(pVM, "Error: out of memory"); } -void +static void ficlEfiGetenv(FICL_VM *pVM) { -#ifndef TESTMAIN char *name, *value; -#endif char *namep; int names; @@ -164,7 +475,6 @@ ficlEfiGetenv(FICL_VM *pVM) names = stackPopINT(pVM->pStack); namep = (char*) stackPopPtr(pVM->pStack); -#ifndef TESTMAIN name = (char*) ficlMalloc(names+1); if (name == NULL) vmThrowErr(pVM, "Error: out of memory"); @@ -178,18 +488,13 @@ ficlEfiGetenv(FICL_VM *pVM) stackPushPtr(pVM->pStack, value); stackPushINT(pVM->pStack, strlen(value)); } else -#endif stackPushINT(pVM->pStack, -1); - - return; } -void +static void ficlEfiUnsetenv(FICL_VM *pVM) { -#ifndef TESTMAIN char *name; -#endif char *namep; int names; @@ -199,7 +504,6 @@ ficlEfiUnsetenv(FICL_VM *pVM) names = stackPopINT(pVM->pStack); namep = (char*) stackPopPtr(pVM->pStack); -#ifndef TESTMAIN name = (char*) ficlMalloc(names+1); if (name == NULL) vmThrowErr(pVM, "Error: out of memory"); @@ -208,9 +512,6 @@ ficlEfiUnsetenv(FICL_VM *pVM) unsetenv(name); ficlFree(name); -#endif - - return; } /************************************************************************** @@ -218,17 +519,14 @@ ficlEfiUnsetenv(FICL_VM *pVM) **************************************************************************/ void ficlEfiCompilePlatform(FICL_SYSTEM *pSys) { - FICL_DICT *dp = pSys->dp; - assert (dp); - - dictAppendWord(dp, "efi-setenv", ficlEfiSetenv, FW_DEFAULT); - dictAppendWord(dp, "efi-getenv", ficlEfiGetenv, FW_DEFAULT); - dictAppendWord(dp, "efi-unsetenv", ficlEfiUnsetenv, FW_DEFAULT); + FICL_DICT *dp = pSys->dp; + assert (dp); - /* Would like to export the EFI version, but this will do for now */ - ficlSetEnv(pSys, "efi-boot", 1); - - return; + dictAppendWord(dp, "efi-setenv", ficlEfiSetenv, FW_DEFAULT); + dictAppendWord(dp, "efi-getenv", ficlEfiGetenv, FW_DEFAULT); + dictAppendWord(dp, "efi-unsetenv", ficlEfiUnsetenv, FW_DEFAULT); } FICL_COMPILE_SET(ficlEfiCompilePlatform); + +#endif /* BOOT_FORTH */ Added: head/sys/boot/efi/libefi/wchar.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/libefi/wchar.c Wed Feb 1 08:46:59 2017 (r313042) @@ -0,0 +1,73 @@ +/*- + * Copyright 2016 Netflix, Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +/* + * CHAR16 related functions moved from loader. + * Perhaps we should move those to libstand afterall, but they are + * needed only by UEFI. + */ + +int +wcscmp(CHAR16 *a, CHAR16 *b) +{ + + while (*a && *b && *a == *b) { + a++; + b++; + } + return *a - *b; +} + +/* + * cpy8to16 copies a traditional C string into a CHAR16 string and + * 0 terminates it. len is the size of *dst in bytes. + */ +void +cpy8to16(const char *src, CHAR16 *dst, size_t len) +{ + len <<= 1; /* Assume CHAR16 is 2 bytes */ + while (len > 0 && *src) { + *dst++ = *src++; + len--; + } + *dst++ = (CHAR16)0; +} + +void +cpy16to8(const CHAR16 *src, char *dst, size_t len) +{ + size_t i; + + for (i = 0; i < len && src[i]; i++) + dst[i] = (char)src[i]; + if (i < len) + dst[i] = '\0'; +} Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Wed Feb 1 05:24:17 2017 (r313041) +++ head/sys/boot/efi/loader/main.c Wed Feb 1 08:46:59 2017 (r313042) @@ -52,22 +52,6 @@ __FBSDID("$FreeBSD$"); extern char bootprog_info[]; -#ifdef BOOT_FORTH -/* - * Normally, efi.o from libefi.a would be brought in due to a function we call - * there that's defined there. However, none of its functions are callable from - * here since it just adds words to the FORTH environment or implement those - * words. So, add a reference to a symbol in efi.o to force it to be be brought - * in so the init function there gets added to the "compile" linker set happens - * correctly. - * - * This assumes there's no global analysys that notices dummy1 isn't used - * anywhere and tries to eliminate it. - */ -extern int efi_variable_support; -int *dummy1 = &efi_variable_support; -#endif - struct arch_switch archsw; /* MI/MD interface boundary */ EFI_GUID acpi = ACPI_TABLE_GUID; @@ -88,32 +72,6 @@ EFI_GUID inputid = SIMPLE_TEXT_INPUT_PRO static void efi_zfs_probe(void); #endif -/* - * cpy8to16 copies a traditional C string into a CHAR16 string and - * 0 terminates it. len is the size of *dst in bytes. - */ -static void -cpy8to16(const char *src, CHAR16 *dst, size_t len) -{ - len <<= 1; /* Assume CHAR16 is 2 bytes */ - while (len > 0 && *src) { - *dst++ = *src++; - len--; - } - *dst++ = (CHAR16)0; -} - -static void -cpy16to8(const CHAR16 *src, char *dst, size_t len) -{ - size_t i; - - for (i = 0; i < len && src[i]; i++) - dst[i] = (char)src[i]; - if (i < len) - dst[i] = '\0'; -} - static int has_keyboard(void) { @@ -455,9 +413,7 @@ main(int argc, CHAR16 *argv[]) } } - snprintf(var, sizeof(var), "%d.%02d", ST->Hdr.Revision >> 16, - ST->Hdr.Revision & 0xffff); - env_setenv("efi-version", EV_VOLATILE, var, env_noset, env_nounset); + efi_init_environment(); setenv("LINES", "24", 1); /* optional */ for (k = 0; k < ST->NumberOfTableEntries; k++) { @@ -476,19 +432,6 @@ main(int argc, CHAR16 *argv[]) return (EFI_SUCCESS); /* keep compiler happy */ } -/* XXX move to lib stand ? */ -static int -wcscmp(CHAR16 *a, CHAR16 *b) -{ - - while (*a && *b && *a == *b) { - a++; - b++; - } - return *a - *b; -} - - COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot); static int @@ -770,305 +713,6 @@ command_reloadbe(int argc, char *argv[]) } #endif -COMMAND_SET(efishow, "efi-show", "print some or all EFI variables", command_efi_show); - -static int -efi_print_var(CHAR16 *varnamearg, EFI_GUID *matchguid, int lflag) -{ - UINTN datasz, i; - EFI_STATUS status; - UINT32 attr; - CHAR16 *data; - char *str; - uint32_t uuid_status; - int is_ascii; - - datasz = 0; - status = RS->GetVariable(varnamearg, matchguid, &attr, - &datasz, NULL); - if (status != EFI_BUFFER_TOO_SMALL) { - printf("Can't get the variable: error %#lx\n", status); - return (CMD_ERROR); - } - data = malloc(datasz); - status = RS->GetVariable(varnamearg, matchguid, &attr, - &datasz, data); - if (status != EFI_SUCCESS) { - printf("Can't get the variable: error %#lx\n", status); - return (CMD_ERROR); - } - uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); - if (lflag) { - printf("%s 0x%x %S", str, attr, varnamearg); - } else { - printf("%s 0x%x %S=", str, attr, varnamearg); - is_ascii = 1; - free(str); - str = (char *)data; - for (i = 0; i < datasz - 1; i++) { - /* Quick hack to see if this ascii-ish string printable range plus tab, cr and lf */ - if ((str[i] < 32 || str[i] > 126) && str[i] != 9 && str[i] != 10 && str[i] != 13) { - is_ascii = 0; - break; - } - } - if (str[datasz - 1] != '\0') - is_ascii = 0; - if (is_ascii) - printf("%s", str); - else { - for (i = 0; i < datasz / 2; i++) { - if (isalnum(data[i]) || isspace(data[i])) - printf("%c", data[i]); - else - printf("\\x%02x", data[i]); - } - } - } - free(data); - if (pager_output("\n")) - return (CMD_WARN); - return (CMD_OK); -} - -static int -command_efi_show(int argc, char *argv[]) -{ - /* - * efi-show [-a] - * print all the env - * efi-show -u UUID - * print all the env vars tagged with UUID - * efi-show -v var - * search all the env vars and print the ones matching var - * eif-show -u UUID -v var - * eif-show UUID var - * print all the env vars that match UUID and var - */ - /* NB: We assume EFI_GUID is the same as uuid_t */ - int aflag = 0, gflag = 0, lflag = 0, vflag = 0; - int ch, rv; - unsigned i; - EFI_STATUS status; - EFI_GUID varguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; - EFI_GUID matchguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; - uint32_t uuid_status; - CHAR16 *varname; - CHAR16 *newnm; - CHAR16 varnamearg[128]; - UINTN varalloc; - UINTN varsz; - - while ((ch = getopt(argc, argv, "ag:lv:")) != -1) { - switch (ch) { - case 'a': - aflag = 1; - break; - case 'g': - gflag = 1; - uuid_from_string(optarg, (uuid_t *)&matchguid, - &uuid_status); - if (uuid_status != uuid_s_ok) { - printf("uid %s could not be parsed\n", optarg); - return (CMD_ERROR); - } - break; - case 'l': - lflag = 1; - break; - case 'v': - vflag = 1; - if (strlen(optarg) >= nitems(varnamearg)) { - printf("Variable %s is longer than %zd characters\n", - optarg, nitems(varnamearg)); - return (CMD_ERROR); - } - for (i = 0; i < strlen(optarg); i++) - varnamearg[i] = optarg[i]; - varnamearg[i] = 0; - break; - default: - printf("Invalid argument %c\n", ch); - return (CMD_ERROR); - } - } - - if (aflag && (gflag || vflag)) { - printf("-a isn't compatible with -v or -u\n"); - return (CMD_ERROR); - } - - if (aflag && optind < argc) { - printf("-a doesn't take any args"); - return (CMD_ERROR); - } - - if (optind == argc) - aflag = 1; - - argc -= optind; - argv += optind; - - pager_open(); - if (vflag && gflag) { - rv = efi_print_var(varnamearg, &matchguid, lflag); - pager_close(); - return (rv); - } - - if (argc == 2) { - optarg = argv[0]; - if (strlen(optarg) >= nitems(varnamearg)) { - printf("Variable %s is longer than %zd characters\n", - optarg, nitems(varnamearg)); - pager_close(); - return (CMD_ERROR); - } - for (i = 0; i < strlen(optarg); i++) - varnamearg[i] = optarg[i]; - varnamearg[i] = 0; - optarg = argv[1]; - uuid_from_string(optarg, (uuid_t *)&matchguid, - &uuid_status); - if (uuid_status != uuid_s_ok) { - printf("uid %s could not be parsed\n", optarg); - pager_close(); - return (CMD_ERROR); - } - rv = efi_print_var(varnamearg, &matchguid, lflag); - pager_close(); - return (rv); - } - - if (argc > 0) { - printf("Too many args %d\n", argc); - pager_close(); - return (CMD_ERROR); - } - - /* - * Initiate the search -- note the standard takes pain - * to specify the initial call must be a poiner to a NULL - * character. - */ - varalloc = 1024; - varname = malloc(varalloc); - if (varname == NULL) { - printf("Can't allocate memory to get variables\n"); - pager_close(); - return (CMD_ERROR); - } - varname[0] = 0; - while (1) { - varsz = varalloc; - status = RS->GetNextVariableName(&varsz, varname, &varguid); - if (status == EFI_BUFFER_TOO_SMALL) { - varalloc = varsz; - newnm = malloc(varalloc); - if (newnm == NULL) { - printf("Can't allocate memory to get variables\n"); - free(varname); - pager_close(); - return (CMD_ERROR); - } - memcpy(newnm, varname, varsz); - free(varname); - varname = newnm; - continue; /* Try again with bigger buffer */ - } - if (status != EFI_SUCCESS) - break; - if (aflag) { - if (efi_print_var(varname, &varguid, lflag) != CMD_OK) - break; - continue; - } - if (vflag) { - if (wcscmp(varnamearg, varname) == 0) { - if (efi_print_var(varname, &varguid, lflag) != CMD_OK) - break; - continue; - } - } - if (gflag) { - if (memcmp(&varguid, &matchguid, sizeof(varguid)) == 0) { - if (efi_print_var(varname, &varguid, lflag) != CMD_OK) - break; - continue; - } - } - } - free(varname); - pager_close(); - - return (CMD_OK); -} - -COMMAND_SET(efiset, "efi-set", "set EFI variables", command_efi_set); - -static int -command_efi_set(int argc, char *argv[]) -{ - char *uuid, *var, *val; - CHAR16 wvar[128]; - EFI_GUID guid; - uint32_t status; - EFI_STATUS err; - - if (argc != 4) { - printf("efi-set uuid var new-value\n"); - return (CMD_ERROR); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 1 10:35:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 210BBCC9891; Wed, 1 Feb 2017 10:35:59 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C860D122B; Wed, 1 Feb 2017 10:35:58 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cYsGa-0000U0-17; Wed, 01 Feb 2017 13:35:56 +0300 Date: Wed, 1 Feb 2017 13:35:56 +0300 From: Slawa Olhovchenkov To: John Baldwin Cc: Warner Losh , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170201103555.GA79121@zxy.spb.ru> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <2911087.bbEsWibF87@ralph.baldwin.cx> <3458844.3oruRKbrzH@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3458844.3oruRKbrzH@ralph.baldwin.cx> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 10:35:59 -0000 On Tue, Jan 31, 2017 at 02:46:23PM -0800, John Baldwin wrote: > On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote: > > On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin wrote: > > > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote: > > >> Author: nyan > > >> Date: Sat Jan 28 02:22:15 2017 > > >> New Revision: 312910 > > >> URL: https://svnweb.freebsd.org/changeset/base/312910 > > >> > > >> Log: > > >> Remove pc98 support completely. > > >> I thank all developers and contributors for pc98. > > >> > > >> Relnotes: yes > > > > > > BTW, my impression was that there are some other device drivers > > > that are effectively PC-98 only (e.g. everything that uses scsi_low.c) > > > but they might have pccard attachments for use with PC-98 laptops? > > > > > > Perhaps Warner might know? > > > > > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4) > > > all came from NetBSD/pc98 via PAO. > > > > These all work correctly on any PC Card machine. The only reason they > > came in this way was because these devices were original marketed only > > in Japan. I've used all these cards with external SCSI drives in the > > past. > > > > As far as I know, only the if_snc driver, which was removed, is truly > > pc98 specific. It is wired in such a way that cannot be used in ibm-at > > compatible laptops. IIRC, it had hard-wired memory decode lines that > > landed in the middle of the VGA graphics pages or BIOS low memory > > areas. I have one of these cards still, and it will be detected on my > > laptops, but can't work due to the required mappings. > > > > Now, there's an different question about whether it is time to retire > > some of the now-ancient SCSI cards from the system, but that's a > > different kettle of fish that's larger than just nsp, ncv and stg. > > Fair enough. I haven't fully put away my 12 axe and am toying with > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only > as well in that case). Hardware that wants to use ISA/pccard for > storage is probably happier running 4.x anyway. One question is if we > should drop ISA attachments in that case for drivers that support PCI > and ISA. However, there's a fair list of ISA-only adapters that would > be a good place to start anyway. One concern is to not drop any drivers ps/2 keyboard, mouse, touchpads, lm sensors, etc?... From owner-svn-src-all@freebsd.org Wed Feb 1 10:42:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FC75CC9A80; Wed, 1 Feb 2017 10:42:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 998CA16D1; Wed, 1 Feb 2017 10:42:40 +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 mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 1FCEE1046AD9; Wed, 1 Feb 2017 21:42:36 +1100 (AEDT) Date: Wed, 1 Feb 2017 21:42:35 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Conrad Meyer cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern In-Reply-To: Message-ID: <20170201203814.O953@besplex.bde.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170131153411.G1061@besplex.bde.org> <20170131175309.N1418@besplex.bde.org> <20170201005009.E2504@besplex.bde.org> <20170201123838.X1974@besplex.bde.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=PO7r1zJSAAAA:8 a=uP1ucDPQAAAA:8 a=sAtkCSKGeD0KkG_lp3sA:9 a=CjuIK1q_8ugA:10 a=Oa0T6EYmKFNB-xRHvYM1:22 a=9a9ggB8z3XFZH39hjkD6:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 10:42:41 -0000 On Tue, 31 Jan 2017, Conrad Meyer wrote: > On Tue, Jan 31, 2017 at 7:16 PM, Bruce Evans wrote: >> Another reply to this... >> >> On Tue, 31 Jan 2017, Conrad Meyer wrote: >> >>> On Tue, Jan 31, 2017 at 7:36 AM, Bruce Evans wrote: >>>> >>>> On Tue, 31 Jan 2017, Bruce Evans wrote: >>>> I >>>> think there should by no alignment on entry -- just assume the buffer is >>>> aligned in the usual case, and only run 4% slower when it is misaligned. >>> >>> Please write such a patch and demonstrate the improvement. >> >> It is easy to demonstrate. I just put #if 0 around the early alignment >> code. The result seem too good to be true, so maybe I missed some >> later dependency on alignment of the addresses: >> - for 128-byte buffers and misalignment of 3, 10g takes 1.48 seconds with >> alignment and 1.02 seconds without alignment. >> This actually makes sense, 128 bytes can be done with 16 8-byte unaligned >> crc32q's. The alignment code makes it do 15 * 8-but and (5 + 3) * 1-byte. >> 7 more 3-cycle instructions and overhead too is far more than the cost >> of letting the CPU do read-combining. >> - for 4096-byte buffers, the difference is insignificant (0.47 seconds for >> 10g. > > I believe it, especially for newer amd64. I seem to recall that older > x86 machines had a higher misalignment penalty, but it was largely > reduced in (?)Nehalem. Why don't you go ahead and commit that change? Needs more work. Here are fairly clean patches for the unportabilities. I can't really test these in the kernel. Merge the asms with yours if yours are better in parts. X Index: conf/files.amd64 X =================================================================== X --- conf/files.amd64 (revision 313007) X +++ conf/files.amd64 (working copy) X @@ -536,6 +536,9 @@ X isa/vga_isa.c optional vga X kern/kern_clocksource.c standard X kern/link_elf_obj.c standard X +libkern/x86/crc32_sse42.c standard X +libkern/memmove.c standard X +libkern/memset.c standard X # X # IA32 binary support X # X @@ -593,14 +596,6 @@ X compat/ndis/subr_usbd.c optional ndisapi pci X compat/ndis/winx64_wrap.S optional ndisapi pci X # X -crc32_sse42.o standard \ X - dependency "$S/libkern/x86/crc32_sse42.c" \ X - compile-with "${CC} -c ${CFLAGS:N-nostdinc} ${WERROR} ${PROF} -msse4 ${.IMPSRC}" \ X - no-implicit-rule \ X - clean "crc32_sse42.o" X -libkern/memmove.c standard X -libkern/memset.c standard X -# X # x86 real mode BIOS emulator, required by dpms/pci/vesa X # X compat/x86bios/x86bios.c optional x86bios | dpms | pci | vesa This also fixes unsorting by crc32_sse42.o and nearby unsorting by all other libkern lines (just 2) in files.amd64. This file is still grossly unsorted near the end. X Index: conf/files.i386 X =================================================================== X --- conf/files.i386 (revision 313007) X +++ conf/files.i386 (working copy) X @@ -554,11 +554,6 @@ X kern/imgact_aout.c optional compat_aout X kern/imgact_gzip.c optional gzip X kern/subr_sfbuf.c standard X -crc32_sse42.o standard \ X - dependency "$S/libkern/x86/crc32_sse42.c" \ X - compile-with "${CC} -c ${CFLAGS:N-nostdinc} ${WERROR} ${PROF} -msse4 ${.IMPSRC}" \ X - no-implicit-rule \ X - clean "crc32_sse42.o" X libkern/divdi3.c standard X libkern/ffsll.c standard X libkern/flsll.c standard X @@ -569,6 +564,7 @@ X libkern/ucmpdi2.c standard X libkern/udivdi3.c standard X libkern/umoddi3.c standard X +libkern/x86/crc32_sse42.c standard X i386/xbox/xbox.c optional xbox X i386/xbox/xboxfb.c optional xboxfb X dev/fb/boot_font.c optional xboxfb This also fixes unsorting by crc32_sse42.o. files.i386 is not as unsorted as files.i386. The rules for sorting generated files are unclear. They are not in source directories so are nor naturally grouped. Old ones are mostly placed near the beginning. Some are sorted on a pathname of the source file(s) in scattered places in the make rules. crc32_sse42.o is partly like that. It was sorted with libkern sources but not by the x86 part. X Index: libkern/x86/crc32_sse42.c X =================================================================== X --- libkern/x86/crc32_sse42.c (revision 313007) X +++ libkern/x86/crc32_sse42.c (working copy) X @@ -31,15 +31,41 @@ X */ X #ifdef USERSPACE_TESTING X #include X +#include Fix dependency on namespace pollution in for at least size_t. X #else X #include X +#include X #include X -#include X -#include X #endif Fix order of systm.h and not using its standard pollution. X X -#include X +static __inline uint32_t X +_mm_crc32_u8(uint32_t x, uint8_t y) X +{ X + /* X + * clang (at least 3.9.[0-1]) pessimizes "rm" (y) and "m" (y) X + * significantly and "r" (y) a lot by copying y to a different X + * local variable (on the stack or in a register), so only use X + * the latter. This costs a register and an instruction but X + * not a uop. X + */ X + __asm("crc32b %1,%0" : "+r" (x) : "r" (y)); X + return (x); X +} X X +static __inline uint32_t X +_mm_crc32_u32(uint32_t x, int32_t y) X +{ X + __asm("crc32l %1,%0" : "+r" (x) : "r" (y)); X + return (x); X +} X + X +static __inline uint64_t X +_mm_crc32_u64(uint64_t x, int64_t y) X +{ X + __asm("crc32q %1,%0" : "+r" (x) : "r" (y)); X + return (x); X +} X + X /* CRC-32C (iSCSI) polynomial in reversed bit order. */ X #define POLY 0x82f63b78 X >> I hoped that an even shorter SHORT case would work. I think it now handles >> 768 bytes (3 * SHORT) in the inner loop. > > Right. > >> That is 32 sets of 3 crc32q's, >> and I would have thought that update at the end would take about as long >> as 1 iteration (3%), but it apparently takes 33%. > > The update at the end may be faster with PCLMULQDQ. There are > versions of this algorithm that use that in place of the lookup-table > combine (for example, Linux has a permissively licensed implementation > here: http://lxr.free-electrons.com/source/arch/x86/crypto/crc32c-pcl-intel-asm_64.S > ). > > Unfortunately, PCLMULQDQ uses FPU state, which is inappropriate most > of the time in kernel mode. It could be used opportunistically if the > thread is already in FPU-save mode or if the input is "big enough" to > make it worth it. That rules it out for most kernel purposes. I will try to optimize the multiplication. >>> 0x000400: asm:68 intrins:62 multitable:684 (ns per buf) >>> 0x000800: asm:132 intrins:133 (ns per buf) >>> 0x002000: asm:449 intrins:446 (ns per buf) >>> 0x008000: asm:1501 intrins:1497 (ns per buf) >>> 0x020000: asm:5618 intrins:5609 (ns per buf) >>> >>> (All routines are in a separate compilation unit with no full-program >>> optimization, as they are in the kernel.) >> >> These seem slow. I modified my program to test the actual kernel code, >> and get for 10gB on freefall's Xeon (main times in seconds): > > Freefall has a Haswell Xeon @ 3.3GHz. My laptop is a Sandy Bridge > Core i5 @ 2.6 GHz. That may help explain the difference. I thought that Sandy Bridge would be almost as fast here. ref11-i386's lesser Xeon is 5.5 times slower in cycles for a block size of 128K and 3.7 times slower for a block size of 128. i386 is naturally twice as slow. ref11-amd64's lesser Xeon has the same speed as freefall. So there must be a bug in the i386 code... it is simply that gcc doesn't optimize the buggy uint64_t type for the crcs in the 32-bit case, but clang does. After fixing this, the i386 case is only slightly more than twice as slow. Untested fix: Y Index: libkern/x86/crc32_sse42.c Y =================================================================== Y --- libkern/x86/crc32_sse42.c (revision 313007) Y +++ libkern/x86/crc32_sse42.c (working copy) Y @@ -190,7 +216,11 @@ Y const size_t align = 4; Y #endif Y const unsigned char *next, *end; Y - uint64_t crc0, crc1, crc2; /* need to be 64 bits for crc32q */ Y +#ifdef __amd64__ Y + uint64_t crc0, crc1, crc2; Y +#else Y + uint32_t crc0, crc1, crc2; Y +#endif Y Y next = buf; Y crc0 = crc; Bruce From owner-svn-src-all@freebsd.org Wed Feb 1 11:13:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2D92CCA5EB; Wed, 1 Feb 2017 11:13:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0BC830; Wed, 1 Feb 2017 11:13:06 +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 mail109.syd.optusnet.com.au (Postfix) with ESMTPS id ABB43D6424E; Wed, 1 Feb 2017 22:12:58 +1100 (AEDT) Date: Wed, 1 Feb 2017 22:12:57 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312975 - head/sys/i386/include In-Reply-To: <20170130142123.V953@besplex.bde.org> Message-ID: <20170201214349.H1136@besplex.bde.org> References: <201701300224.v0U2Osj1010421@repo.freebsd.org> <20170130142123.V953@besplex.bde.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=c6f6VvGJeq85lbJT2RsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 11:13:07 -0000 On Mon, 30 Jan 2017, Bruce Evans wrote: > On Mon, 30 Jan 2017, Mateusz Guzik wrote: > >> Log: >> i386: add atomic_fcmpset >> >> Tested by: pho > > This is has some bugs and style bugs. This is still broken. The invalid asm breaks building at least atomic.o with gcc-4.2.1. Tested fix: X Index: i386/include/atomic.h X =================================================================== X --- i386/include/atomic.h (revision 313007) X +++ i386/include/atomic.h (working copy) X @@ -225,9 +225,9 @@ X " cmpxchgl %3,%1 ; " X " sete %0 ; " X "# atomic_cmpset_int" X - : "=r" (res), /* 0 */ X + : "=q" (res), /* 0 */ X "+m" (*dst), /* 1 */ X - "+a" (*expect) /* 2 */ X + "+a" (*expect) /* 2 */ X : "r" (src) /* 3 */ X : "memory", "cc"); X return (res); The semantics of fcmpset seem to be undocumented. On x86, *expect is updated non-atomically by a store in the output parameter. I think cmpxchg updates the "a" register atomically, but then the output parameter causes this to be stored non-atomically to *expect. A better API would somehow return the "a" register and let the caller store it if it wants. Ordinary cmpset can be built on this by not storing, and the caller can do the store atomically to a different place if *expect is too volatile to be atomic. Maybe just decouple the input parameter from the output parameter. The following works right (for an amd64 API): Y static __inline int Y atomic_xfcmpset_long(volatile u_long *dst, u_long *expect_out, u_long expect_in, Y u_long src) Y { Y u_long expect; Y u_char res; Y Y expect = expect_in; Y __asm __volatile( Y " " MPLOCKED " " Y " cmpxchgq %3,%1 ; " Y " sete %0 ; " Y "# atomic_fcmpset_long" Y : "=r" (res), /* 0 */ Y "+m" (*dst), /* 1 */ Y "+a" (expect) /* 2 */ Y : "r" (src) /* 3 */ Y : "memory", "cc"); Y *expect_out = expect; If the caller doesn't want to use *expect_out, it passes a pointer to an unused local variable. The compiler can then optimize away the store since it is not hidden in the asm. Y return (res); Y } Bruce From owner-svn-src-all@freebsd.org Wed Feb 1 13:12:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B8B0CC226B; Wed, 1 Feb 2017 13:12:09 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6FCAF59; Wed, 1 Feb 2017 13:12:08 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11DC7HA085026; Wed, 1 Feb 2017 13:12:07 GMT (envelope-from harti@FreeBSD.org) Received: (from harti@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11DC7WJ085025; Wed, 1 Feb 2017 13:12:07 GMT (envelope-from harti@FreeBSD.org) Message-Id: <201702011312.v11DC7WJ085025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: harti set sender to harti@FreeBSD.org using -f From: Hartmut Brandt Date: Wed, 1 Feb 2017 13:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313043 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 13:12:09 -0000 Author: harti Date: Wed Feb 1 13:12:07 2017 New Revision: 313043 URL: https://svnweb.freebsd.org/changeset/base/313043 Log: Merge filt_soread and filt_solisten and decide what to do when checking for EVFILT_READ at the point of the check not when the event is registers. This fixes a problem with asio when accepting a connection. Reviewed by: kib@, Scott Mitchell Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Wed Feb 1 08:46:59 2017 (r313042) +++ head/sys/kern/uipc_socket.c Wed Feb 1 13:12:07 2017 (r313043) @@ -159,16 +159,10 @@ static void filt_sordetach(struct knote static int filt_soread(struct knote *kn, long hint); static void filt_sowdetach(struct knote *kn); static int filt_sowrite(struct knote *kn, long hint); -static int filt_solisten(struct knote *kn, long hint); static int inline hhook_run_socket(struct socket *so, void *hctx, int32_t h_id); static int filt_soempty(struct knote *kn, long hint); fo_kqfilter_t soo_kqfilter; -static struct filterops solisten_filtops = { - .f_isfd = 1, - .f_detach = filt_sordetach, - .f_event = filt_solisten, -}; static struct filterops soread_filtops = { .f_isfd = 1, .f_detach = filt_sordetach, @@ -3107,10 +3101,7 @@ soo_kqfilter(struct file *fp, struct kno switch (kn->kn_filter) { case EVFILT_READ: - if (so->so_options & SO_ACCEPTCONN) - kn->kn_fop = &solisten_filtops; - else - kn->kn_fop = &soread_filtops; + kn->kn_fop = &soread_filtops; sb = &so->so_rcv; break; case EVFILT_WRITE: @@ -3321,6 +3312,11 @@ filt_soread(struct knote *kn, long hint) struct socket *so; so = kn->kn_fp->f_data; + if (so->so_options & SO_ACCEPTCONN) { + kn->kn_data = so->so_qlen; + return (!TAILQ_EMPTY(&so->so_comp)); + + } SOCKBUF_LOCK_ASSERT(&so->so_rcv); kn->kn_data = sbavail(&so->so_rcv) - so->so_rcv.sb_ctl; @@ -3333,11 +3329,9 @@ filt_soread(struct knote *kn, long hint) if (kn->kn_sfflags & NOTE_LOWAT) { if (kn->kn_data >= kn->kn_sdata) - return 1; - } else { - if (sbavail(&so->so_rcv) >= so->so_rcv.sb_lowat) - return 1; - } + return (1); + } else if (sbavail(&so->so_rcv) >= so->so_rcv.sb_lowat) + return (1); /* This hook returning non-zero indicates an event, not error */ return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); @@ -3397,16 +3391,6 @@ filt_soempty(struct knote *kn, long hint return (0); } -/*ARGSUSED*/ -static int -filt_solisten(struct knote *kn, long hint) -{ - struct socket *so = kn->kn_fp->f_data; - - kn->kn_data = so->so_qlen; - return (!TAILQ_EMPTY(&so->so_comp)); -} - int socheckuid(struct socket *so, uid_t uid) { From owner-svn-src-all@freebsd.org Wed Feb 1 14:17:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BF2BCCB8C4; Wed, 1 Feb 2017 14:17:34 +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 CF45819C2; Wed, 1 Feb 2017 14:17:33 +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 v11EHLgs016000 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Feb 2017 16:17:21 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v11EHLgs016000 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v11EHL2r015999; Wed, 1 Feb 2017 16:17:21 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Feb 2017 16:17:21 +0200 From: Konstantin Belousov To: Alexander Kabaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313040 - head/sys/mips/include Message-ID: <20170201141721.GB2092@kib.kiev.ua> References: <201702010500.v1150YLR075051@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702010500.v1150YLR075051@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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 14:17:34 -0000 On Wed, Feb 01, 2017 at 05:00:34AM +0000, Alexander Kabaev wrote: > Author: kan > Date: Wed Feb 1 05:00:34 2017 > New Revision: 313040 > URL: https://svnweb.freebsd.org/changeset/base/313040 > > Log: > Add atomic_fcmpset_*() inlines for MIPS > > atomic_fcmpset_*() is analogous to atomic_cmpset(), but saves off the > read value from the target memory location into the 'old' pointer. > > Reviewed by: imp, brooks > Requested by: mjg > Differential Revision: https://reviews.freebsd.org/D9391 > > Modified: > head/sys/mips/include/atomic.h > > Modified: head/sys/mips/include/atomic.h > ============================================================================== > --- head/sys/mips/include/atomic.h Wed Feb 1 04:54:23 2017 (r313039) > +++ head/sys/mips/include/atomic.h Wed Feb 1 05:00:34 2017 (r313040) > @@ -362,7 +362,7 @@ atomic_load_64(__volatile uint64_t *p, u > * zero if the compare failed, nonzero otherwise. > */ > static __inline uint32_t > -atomic_cmpset_32(__volatile uint32_t* p, uint32_t cmpval, uint32_t newval) > +atomic_cmpset_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) > { > uint32_t ret; > > @@ -405,6 +405,46 @@ atomic_cmpset_rel_32(__volatile uint32_t > return (atomic_cmpset_32(p, cmpval, newval)); > } > > +static __inline uint32_t > +atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) > +{ > + uint32_t ret; > + > + __asm __volatile ( > + "1:\n\t" > + "ll %0, %1\n\t" /* load old value */ > + "bne %0, %4, 2f\n\t" /* compare */ > + "move %0, %3\n\t" /* value to store */ > + "sc %0, %1\n\t" /* attempt to store */ > + "beqz %0, 1b\n\t" /* if it failed, spin */ Please do not retry on sc failure, return the error to upper layer. See also r313007 and preceeding discussion after r312973. > + "j 3f\n\t" > + "2:\n\t" > + "sw %0, %2\n\t" /* save old value */ > + "li %0, 0\n\t" > + "3:\n" > + : "=&r" (ret), "+m" (*p), "=m" (*cmpval) > + : "r" (newval), "r" (*cmpval) > + : "memory"); > + return ret; > +} > + From owner-svn-src-all@freebsd.org Wed Feb 1 15:38:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09B0ECCB87F; Wed, 1 Feb 2017 15:38:54 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-yb0-x241.google.com (mail-yb0-x241.google.com [IPv6:2607:f8b0:4002:c09::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 AF0D51468; Wed, 1 Feb 2017 15:38:53 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by mail-yb0-x241.google.com with SMTP id j82so26577461ybg.2; Wed, 01 Feb 2017 07:38:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=NIXzNjbSDfhoC5MPB6K7GN2yu067E7HszP1pn1eVEnU=; b=cBWTjGj6+/Avx8arHdJkgmU0NLWueQ+ozZFkjijkorwMPzb0agECq1uhvtoZRGLpH1 A55odRWokbPyVH/Bj6EEBbsaD4tFHTyLsrCBptV8rUzON0jMKEO2mulgudC3xCfgO2gR 6tijkwtUugbaHgfHJj+4rHWQ00r39r7Ah7xQCeO33tnIOd+IZuSptlh+xCDvZZ1P2tp9 bQIncOoJ7MlFxjJPsstTr3x97182MiFbZ0+G6rZ/5h+Muw+PBbygz1TZjDtGhYgNi4d3 54VCU9okVkbRQEAvpX9pnwHbQrOPB7D89NR408VcXc9eOKOpBbTQyHfKGrqCuR+oaOzX FSUQ== 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:in-reply-to :references:mime-version; bh=NIXzNjbSDfhoC5MPB6K7GN2yu067E7HszP1pn1eVEnU=; b=LZn6fZHMl4GUrVm4paVS+ZXAxyQEo7Y1/B9ShOh7hDeu6CJhrdtGEt/QpK/7TETx3t JN2q9Cms3tAuoK5EBlKQyarhL6znGezlfO1Rb23Uul87BZ4eAz7J46NS9Kqh/H2qd++c wh/vSnSQrQjrHu+FgKy9oXiJd1WGcXx4HHdwzp2keEZ8BdityeM0328hQVoLvJxFFIYN JgDZMw7kisfvmvBv0ghzUzkgsA0R6VsspXcQvEemE0hzM20N8IG9GQY4icmOkmZu/2oM 90XF5ncXDSx0M4LUqLTevbjX3U67ahswjm5nl6q+qvH3cKliT5cKcnh6XuKBpTZQ8rfL gfmQ== X-Gm-Message-State: AIkVDXKvaK5XvrQ2YOHhc2NhcaK6tklpQNspQGtvFrXYivKi5ffcEVAaEunmHaCZ7ZMI3Q== X-Received: by 10.55.143.71 with SMTP id r68mr3197422qkd.84.1485963532822; Wed, 01 Feb 2017 07:38:52 -0800 (PST) Received: from kan ([2601:18f:802:4680:226:18ff:fe00:232e]) by smtp.gmail.com with ESMTPSA id r131sm18889096qke.14.2017.02.01.07.38.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Feb 2017 07:38:51 -0800 (PST) Date: Wed, 1 Feb 2017 10:38:42 -0500 From: Alexander Kabaev To: Konstantin Belousov Cc: Alexander Kabaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313040 - head/sys/mips/include Message-ID: <20170201103842.1ad0989f@kan> In-Reply-To: <20170201141721.GB2092@kib.kiev.ua> References: <201702010500.v1150YLR075051@repo.freebsd.org> <20170201141721.GB2092@kib.kiev.ua> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/m8ArkRYN54mNwE1R3WI.e8f"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 15:38:54 -0000 --Sig_/m8ArkRYN54mNwE1R3WI.e8f Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 1 Feb 2017 16:17:21 +0200 Konstantin Belousov wrote: > Please do not retry on sc failure, return the error to upper layer. > See also r313007 and preceeding discussion after r312973. There was not much a discussion there, do you mind expanding a bit on why one behavior is more desired than other? I am not against the change, but I need to understand the reasoning behind it better. Since atomic_cmpset retries too, it will have to be adjusted as well. --=20 Alexander Kabaev --Sig_/m8ArkRYN54mNwE1R3WI.e8f Content-Type: application/pgp-signature Content-Description: Цифровая подпись OpenPGP -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEExffZlZm2QeE8UVaRBxMimZJ5Ln4FAliSAQNfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEM1 RjdEOTk1OTlCNjQxRTEzQzUxNTY5MTA3MTMyMjk5OTI3OTJFN0UACgkQBxMimZJ5 Ln5iOA//Yc/PREWGTSo0jIPmbBFD5dXbp52HAIeL8b1YKQb9oKrTyecfmcGd1tR3 L/C5XrVYe2LfLjQtpkCUsSxtrws6/rNqHNG2KlZV63Cbj+DZ5UW+eBee0ebf8m6X sLWlWa+YkB4ufrOHg+2Z0X//XTNJC+5bFe1NS7h3zFzI8a3m3u+yJ609tEeYNUcB fSTCBBc56sU4FHJUIn5myicYIZ+Md5dpe7u/eEe7qccFw1JsdHBztXecVO9uhQq5 bjD7F3I7j4N12aqNBZDEXs0U1zDpp9YaABfUlcwaDqPT1Fc5t8hFP8/O+QKdwp80 XlLgp0EP70ExtCtVVkHfuGnS5OlsZ2uJ3BPQxmG3oEMi4Fi02eSQuq9w58BawmSi C3hOzaaPngtKGKfdzI05oT4v3/bIKCIk63Uge3FdGd+hZQJMYyT49A0wLElj32Sr vturltcCVNuOJ/dKrcdM6TMk1sODGAD8a4Umq+w0QcJ1Ho9pF4nKIildomViQKEg PunabH4g0jf3Q7uMOKSpbYNDg3CPCtAqkLjb3X+PDG5TOglLpIK9a2yXUBTBFbYe dCGMjXNw8xA/HJU5T8jDFeO37u+1OwBxqHN/hX50nNF5hp29++kbOJbm8zbpRzfy u4PN7Ot7lnyr25SJZWe6XJXyiFsPcaK0OcLf96WvYMgFvZiVlRE= =A/bQ -----END PGP SIGNATURE----- --Sig_/m8ArkRYN54mNwE1R3WI.e8f-- From owner-svn-src-all@freebsd.org Wed Feb 1 16:13:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FBF9CCB79B; Wed, 1 Feb 2017 16:13:59 +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 1E1ACE3C; Wed, 1 Feb 2017 16:13:58 +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 v11GDsYK036613 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Feb 2017 18:13:54 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v11GDsYK036613 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v11GDs2l036612; Wed, 1 Feb 2017 18:13:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Feb 2017 18:13:54 +0200 From: Konstantin Belousov To: Alexander Kabaev Cc: Alexander Kabaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313040 - head/sys/mips/include Message-ID: <20170201161354.GF2092@kib.kiev.ua> References: <201702010500.v1150YLR075051@repo.freebsd.org> <20170201141721.GB2092@kib.kiev.ua> <20170201103842.1ad0989f@kan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170201103842.1ad0989f@kan> 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 16:13:59 -0000 On Wed, Feb 01, 2017 at 10:38:42AM -0500, Alexander Kabaev wrote: > On Wed, 1 Feb 2017 16:17:21 +0200 > Konstantin Belousov wrote: > > > Please do not retry on sc failure, return the error to upper layer. > > See also r313007 and preceeding discussion after r312973. > > There was not much a discussion there, do you mind expanding a bit on > why one behavior is more desired than other? I am not against the > change, but I need to understand the reasoning behind it better. Since > atomic_cmpset retries too, it will have to be adjusted as well. atomic_cmpset() cannot avoid retry on the ll/sc architectures, because sc might fail even if the old and the new values are same. One of the points of the fcmpset API design is to avoid nested loops: this is a microoptimization to put less pressure on the CPUs frontend. The caller of (f)cmpset must check for failure anyway, so not doing this inside the function reduces number of branches. Less branches makes code shorter, and reduces utilization of some CPU resources, like branch predictor state. From owner-svn-src-all@freebsd.org Wed Feb 1 16:15:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCF95CCB817; Wed, 1 Feb 2017 16:15:24 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACD1AF81; Wed, 1 Feb 2017 16:15:24 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11GFNUV060305; Wed, 1 Feb 2017 16:15:23 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11GFNGl060304; Wed, 1 Feb 2017 16:15:23 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201702011615.v11GFNGl060304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Wed, 1 Feb 2017 16:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313044 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 16:15:25 -0000 Author: brd (doc,ports committer) Date: Wed Feb 1 16:15:23 2017 New Revision: 313044 URL: https://svnweb.freebsd.org/changeset/base/313044 Log: Add some comments with examples on how to build Vagrant images. Approved by: re (gjb) Modified: head/release/Makefile.vagrant Modified: head/release/Makefile.vagrant ============================================================================== --- head/release/Makefile.vagrant Wed Feb 1 13:12:07 2017 (r313043) +++ head/release/Makefile.vagrant Wed Feb 1 16:15:23 2017 (r313044) @@ -1,8 +1,20 @@ # # $FreeBSD$ # +# Makefile for producing and uploading Vagrant boxes to Hashicorp Atlas # -# Makefile for uploading Vagrant boxes to Hashicorp Atlas +# Usage Example: +# Create a Vagrant image for VirtualBox: +# make vagrant-box WITH_VMIMAGES=y WITH_CLOUDWARE=y \ +# CLOUDWARE=vagrant-virtualbox VMFORMATS=vmdk +# +# To create a Vagrant image for VMWare and Upload it to Atlas: +# VAGRANT_KEY is your Atlas API Token +# VAGRANT_USERNAME is your Atlas Username +# env VAGRANT_KEY=foo VAGRANT_USERNAME=bar make vagrant-upload \ +# WITH_VMIMAGES=y WITH_CLOUDWARE=y CLOUDWARE=vagrant-vmware \ +# VMFORMATS=vmdk +# For more info: https://www.vagrantup.com/docs/other/atlas.html # VAGRANT_IMG?= ${.OBJDIR}/vagrant.vmdk From owner-svn-src-all@freebsd.org Wed Feb 1 16:44:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2F41CCB2C9; Wed, 1 Feb 2017 16:44:14 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90413805; Wed, 1 Feb 2017 16:44:13 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [172.20.13.195] ([72.165.49.2]) (authenticated bits=0) by theravensnest.org (8.15.2/8.15.2) with ESMTPSA id v11Gd5TE060987 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Feb 2017 16:39:08 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host [72.165.49.2] claimed to be [172.20.13.195] Content-Type: multipart/signed; boundary="Apple-Mail=_6EFDB1DE-38E6-4B6F-A040-DCE2AAF02419"; protocol="application/pkcs7-signature"; micalg=sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r313040 - head/sys/mips/include From: David Chisnall In-Reply-To: <20170201161354.GF2092@kib.kiev.ua> Date: Wed, 1 Feb 2017 08:39:05 -0800 Cc: Alexander Kabaev , Alexander Kabaev , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <191141D2-4665-4E24-AA4F-A34127C15953@FreeBSD.org> References: <201702010500.v1150YLR075051@repo.freebsd.org> <20170201141721.GB2092@kib.kiev.ua> <20170201103842.1ad0989f@kan> <20170201161354.GF2092@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 16:44:14 -0000 --Apple-Mail=_6EFDB1DE-38E6-4B6F-A040-DCE2AAF02419 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 1 Feb 2017, at 08:13, Konstantin Belousov = wrote: >=20 > On Wed, Feb 01, 2017 at 10:38:42AM -0500, Alexander Kabaev wrote: >> On Wed, 1 Feb 2017 16:17:21 +0200 >> Konstantin Belousov wrote: >>=20 >>> Please do not retry on sc failure, return the error to upper layer. >>> See also r313007 and preceeding discussion after r312973. >>=20 >> There was not much a discussion there, do you mind expanding a bit on >> why one behavior is more desired than other? I am not against the >> change, but I need to understand the reasoning behind it better. = Since >> atomic_cmpset retries too, it will have to be adjusted as well. >=20 > atomic_cmpset() cannot avoid retry on the ll/sc architectures, because > sc might fail even if the old and the new values are same. One of the > points of the fcmpset API design is to avoid nested loops: this is a > microoptimization to put less pressure on the CPUs frontend. The = caller > of (f)cmpset must check for failure anyway, so not doing this inside = the > function reduces number of branches. Less branches makes code shorter, > and reduces utilization of some CPU resources, like branch predictor > state. C[++]11 addresses this by having a weak and a strong variant of compare = and exchange. The strong version may only fail if the comparison fails, = we weak version is permitted to fail spuriously. Given that most uses = of compare and exchange use a loop, and most ll/sc architectures = guarantee forward process after a few attempts, you almost always want = to use the weak version. The weak version also has the advantage that the compiler is free to = fold the initial load into the load linked, as long as the target = architecture would permit it, so you end up with more idiomatic ll, op, = sc, branch sequences, rather than l, op, ll, branch, sc, branch = sequences. David --Apple-Mail=_6EFDB1DE-38E6-4B6F-A040-DCE2AAF02419 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIK5jCCBPww ggPkoAMCAQICECJrrb9nBol9MHok/UZg/AYwDQYJKoZIhvcNAQELBQAwdTELMAkGA1UEBhMCSUwx FjAUBgNVBAoTDVN0YXJ0Q29tIEx0ZC4xKTAnBgNVBAsTIFN0YXJ0Q29tIENlcnRpZmljYXRpb24g QXV0aG9yaXR5MSMwIQYDVQQDExpTdGFydENvbSBDbGFzcyAxIENsaWVudCBDQTAeFw0xNjA0MTkw OTI3NDJaFw0xNzA0MTkwOTI3NDJaMEQxHTAbBgNVBAMMFHRoZXJhdmVuQGZyZWVic2Qub3JnMSMw IQYJKoZIhvcNAQkBFhR0aGVyYXZlbkBmcmVlYnNkLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEP ADCCAQoCggEBALsL5pEhrGjrswHVdMHWhgxb8ARKDYRePSqpDLmjJ40bpx+n1zrvIwjC2Vk2IpoD 04rg5Pog2IrhnX+Qk2NSXzBXWj2JAaTc9OtSeAY0BtgJYXONGONQbRKVy97QBdzd1SbMEzDrOgH5 UDI+5sF1PboOTmLyTAPI9273XdfZ0BnstUXs8NXr/7p9E5CWJOsO1iQcINbm4XiwC1PLNMeWUknE Nji/hFKwcE8IFtaUe1ymbw6yA3rBpDu3KewIRD1T66FPTZJeIzvUoBIqWd+GAOfCBG2QYmbc3y/x K2hCtcXThcB1uVFA2q39koLKA8wHyqv4Jhm3wzhAqKDsWK4bGW0CAwEAAaOCAbcwggGzMA4GA1Ud DwEB/wQEAwIEsDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwCQYDVR0TBAIwADAdBgNV HQ4EFgQU5J3Kc8GeW8pEGxBkcMoA7eUOPRwwHwYDVR0jBBgwFoAUJIFsOWG+SQ+PtxtGK8kotSdI bWgwbwYIKwYBBQUHAQEEYzBhMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5zdGFydHNzbC5jb20w OQYIKwYBBQUHMAKGLWh0dHA6Ly9haWEuc3RhcnRzc2wuY29tL2NlcnRzL3NjYS5jbGllbnQxLmNy dDA4BgNVHR8EMTAvMC2gK6AphidodHRwOi8vY3JsLnN0YXJ0c3NsLmNvbS9zY2EtY2xpZW50MS5j cmwwHwYDVR0RBBgwFoEUdGhlcmF2ZW5AZnJlZWJzZC5vcmcwIwYDVR0SBBwwGoYYaHR0cDovL3d3 dy5zdGFydHNzbC5jb20vMEYGA1UdIAQ/MD0wOwYLKwYBBAGBtTcBAgUwLDAqBggrBgEFBQcCARYe aHR0cDovL3d3dy5zdGFydHNzbC5jb20vcG9saWN5MA0GCSqGSIb3DQEBCwUAA4IBAQBSBDH+kZf5 bZkNFcMSPdfnGC7F8utBIxs2bi3JQjsBoQTm1vnXdwgINSfO9At6iQZHoEyj8ZE6PcMFuEU0+bk0 aE8aYcW59WnxfWx943upZoMhX0YVaJcFK01EHFrddRAP44sh7Eu6JtdFuAG+6btDReMcg35Qm65X 7/280aVm7awadJ+IQs8r9qBVk2NFqkvHCETtJjNWXd7M6mcsfXstvykbubPQH/VNW/zrX6yzIcI4 aoz+Sn8RJmHNkk6cImqe1KvsdDLXmqCoeoMwos62pT18RaI//jwTdmnf5EHFMlevnxOr7rzA++71 OSZfdYf6+nvHOod1F721rNuy6lxFMIIF4jCCA8qgAwIBAgIQa6eKfQrXiNZRCvlZ5Oe04TANBgkq hkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UE CxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20g Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTUxMjE2MDEwMDA1WhcNMzAxMjE2MDEwMDA1WjB1 MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjEpMCcGA1UECxMgU3RhcnRDb20g Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkxIzAhBgNVBAMTGlN0YXJ0Q29tIENsYXNzIDEgQ2xpZW50 IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvX3a98OifYP2W4L921tfrh4bdcC1 Ga+YJKy7V3nYNewJHnzMlBsK0Hb8Dm4Wo3FZpylcYa1MJGT10QMGWaLER3xCIuRR+8eklf/EqeZW RLojJ7zBRtjMywPOCelrOU+DX12dKp+Ez4J6919rz1UudTO1GvZyCYJ/I7062uHsskM8b7gPxmcC oO1UHwwpgkvpCArJWGFoFzjLdsZbErJcS3HtAhlkbE/BKTMrdYg35Uo12SLBO5tbk8h2imbKTC8i Ms+pskrvI/AVlh6QoTTXk6xboVX6zgMgzxSVVLymQiygYYm0y5aMsvi2raFhC643SOGvErWWPPnS EfbeAD1xswIDAQABo4IBZDCCAWAwDgYDVR0PAQH/BAQDAgEGMB0GA1UdJQQWMBQGCCsGAQUFBwMC BggrBgEFBQcDBDASBgNVHRMBAf8ECDAGAQH/AgEAMDIGA1UdHwQrMCkwJ6AloCOGIWh0dHA6Ly9j cmwuc3RhcnRzc2wuY29tL3Nmc2NhLmNybDBmBggrBgEFBQcBAQRaMFgwJAYIKwYBBQUHMAGGGGh0 dHA6Ly9vY3NwLnN0YXJ0c3NsLmNvbTAwBggrBgEFBQcwAoYkaHR0cDovL2FpYS5zdGFydHNzbC5j b20vY2VydHMvY2EuY3J0MB0GA1UdDgQWBBQkgWw5Yb5JD4+3G0YrySi1J0htaDAfBgNVHSMEGDAW gBROC+8apEBbpRdphzDKNGhD0EGu8jA/BgNVHSAEODA2MDQGBFUdIAAwLDAqBggrBgEFBQcCARYe aHR0cDovL3d3dy5zdGFydHNzbC5jb20vcG9saWN5MA0GCSqGSIb3DQEBCwUAA4ICAQCL4/eH7AGL hK0PAQJbnOEjJyMEvTTwcAJuUh/bodjQl06u4putYOxdSyIjSP/sKt+31LmjG8+IO1WqykE4H/Lm 7NKezWVnCHuwb3ptgFmlwbMbGkU2MOZBtwzfKXdYUhFLhaE2uw5jXhXvLYitQay962wP5uPI6eAI hV4L8aaya1u4s7MnrTq0Rz25FuGNO79vTHYWj797tSRC8rM16js4yGKOLFpQvIg0F8IElv57b1st p+C7omqM5Qn15dePbSnqr8Jb65WtmJJbnv6rlqfY/aLuE/zmNAlzLmPgfMDStKIXdg+EoYBZTEo8 wBUaBxihfNbJ069ndQOxMNNqBelEMgpAtmjTbCuXFjqIwWq+XOx6ZV/Wh2FAmaLsSHlNvEjjSQMZ wE4EeHCdo66ZmEs/5JYlCeOkulKVQ6P3m5/XOj2jP17Q2AgmjP+11+sHN7PvrG0OwrQp9QMe3X+r n0G8MjtFfqBWvR9CgLIxzM3MJNxFdgdjS2rYnShP5uxvqwfZvhZVYCIkqdJhpYON0DvSodfiar0w iM79mySZJjzC0CTbiisBzS/BeBhqeo2wFfli/iw3hn1XKvAx0ty6w/scmBF0AYqmRHYj1TjMSw0l Al7AztLglqWjUPI+sukvadMRPxmtKXlS2nVR4an/Z16imsZ69+fFYH68c1CK7zmjozGCA04wggNK AgEBMIGJMHUxCzAJBgNVBAYTAklMMRYwFAYDVQQKEw1TdGFydENvbSBMdGQuMSkwJwYDVQQLEyBT dGFydENvbSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEjMCEGA1UEAxMaU3RhcnRDb20gQ2xhc3Mg MSBDbGllbnQgQ0ECECJrrb9nBol9MHok/UZg/AYwCQYFKw4DAhoFAKCCAZkwGAYJKoZIhvcNAQkD MQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwMjAxMTYzOTA2WjAjBgkqhkiG9w0BCQQx FgQUOZv5K02bXP5SCPleRwpS/a8djGMwgZoGCSsGAQQBgjcQBDGBjDCBiTB1MQswCQYDVQQGEwJJ TDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjEpMCcGA1UECxMgU3RhcnRDb20gQ2VydGlmaWNhdGlv biBBdXRob3JpdHkxIzAhBgNVBAMTGlN0YXJ0Q29tIENsYXNzIDEgQ2xpZW50IENBAhAia62/ZwaJ fTB6JP1GYPwGMIGcBgsqhkiG9w0BCRACCzGBjKCBiTB1MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN U3RhcnRDb20gTHRkLjEpMCcGA1UECxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx IzAhBgNVBAMTGlN0YXJ0Q29tIENsYXNzIDEgQ2xpZW50IENBAhAia62/ZwaJfTB6JP1GYPwGMA0G CSqGSIb3DQEBAQUABIIBAK9uD7/8le+Em4vmnqyQCEfT6oJfHQXQCpZZS/J4BKQNb7ZcYBn+J6SP YqJIB1DvEVMr/1+RHJJCKt+vu1AUh2b045eRimotarSgX01TXC0RyTIS/BsIj6vB7VsjK07BcEoC mt4ujpOlq+QPPmxE5pU0SkS0vhy2vJYIozPIqw+hMOySC9qNPikB7MTeM8I+gVHfquAoaAHARcMM acVtmLRxE2RcEV1xrNzdzXzwKNRxFlpMQ9rRVO3YuS5DPhkUBGh52fUWTm6pT1xmf+BiSGdh+9HA d0hQ98BhhSeqd/HHJGX45PK7QKcpvDhyUF9HfnKDgtyl0EaxewT9h2aUvqsAAAAAAAA= --Apple-Mail=_6EFDB1DE-38E6-4B6F-A040-DCE2AAF02419-- From owner-svn-src-all@freebsd.org Wed Feb 1 16:44:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4F84CCB332; Wed, 1 Feb 2017 16:44:50 +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 ADA0C94D; Wed, 1 Feb 2017 16:44:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id 19so32119260pfo.3; Wed, 01 Feb 2017 08:44: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=W84HHGNiJj8ntgbZiS4vhaV3h0eaFeUEOAAfycvZFFY=; b=aWGN4F2zMn1Sdgag55OKiymMATJpzeWirG5+JajIGGZdRf/EcoOo+8gVtpztaQpH8t 8gbKlKJGkpK9DO+ywQdT0ncGo2ZFytPBLqj/e4Ta64rSf/r7Yxq81hm4VDc+K3R3p0Qr aXzIXOC36VqEyhwdnNlf1N8BSeKcicWGR9XOZwV/E8x5EQNA9gDdzHTmB3mL4BiNI78F MzZ0nOSqVPOAYtUWT9pRyObnz5yHrXMyC/SxPNunmgAk1VcYNw583zg4vJ8Or+gDgj3I tWEwT8CyYGHJoIPopz7p+UTf3/uQuORpvk1bhC4He2S4GkEzEfR0pePuyNxlxcHrbKDr fw6w== 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=W84HHGNiJj8ntgbZiS4vhaV3h0eaFeUEOAAfycvZFFY=; b=KAL+Sf9vsmAw+kJxUZe/rE7MFysLrLF14dLDf9100ALZsnx64shl1W414/OPDevnTK j2HMA64GbdkBOveWntVqjOU4dDjMAEItvZKH/LaudD+wrHGtuCFRSKTXDBBNqAxWesi4 jJjsGqA3Za4fxHapjiK3rLO+huLR1Df7t1aPGtv5q+ff4cgvbVefMOdjyQN8RgPDL3J/ 9MLBD74KFIq+cbWfRoLALE3Djzg4gQQvJ9YpWrJ58DZeRt9442kwSiL0tqmHcBgQnStg 1sTD+nrm8DE01j1FutaIIg+VVsMC60YyNRy1+o1OVi/1ppZG6+FmxiCCiRhRvxPG+M9Z qQFA== X-Gm-Message-State: AIkVDXJ9/jMYc12a3xU3RIPXg7Xf4r6xHutY05v0b9Q8tptDg+B3T3G4Fh+Q5qghrAj63A== X-Received: by 10.98.19.145 with SMTP id 17mr4809041pft.26.1485967490120; Wed, 01 Feb 2017 08:44:50 -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 a1sm51377616pgc.14.2017.02.01.08.44.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Feb 2017 08:44:49 -0800 (PST) Subject: Re: svn commit: r313008 - head/tests/sys/geom/class/gate Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_5FA9B4B6-035E-4824-B9C7-716FE054267F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Wed, 1 Feb 2017 08:44:48 -0800 Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <88DF0C02-3CA8-416F-8438-8C9410DCEF81@gmail.com> References: <201701310612.v0V6CqVL093451@repo.freebsd.org> To: Alan Somers X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 16:44:51 -0000 --Apple-Mail=_5FA9B4B6-035E-4824-B9C7-716FE054267F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 31, 2017, at 07:10, Alan Somers wrote: >=20 > I think wait_for_ggate_device should also be used at line 32, which > calls "ggatec create". > -Alan Yes, you=E2=80=99re right. If I add in the wait_for_ggate_device = call, then I can get rid of the other for loops with retry logic in = them. I=E2=80=99m testing out a change and will add you to a CR if = successful. Thanks! -Ngie --Apple-Mail=_5FA9B4B6-035E-4824-B9C7-716FE054267F 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 iQIcBAEBCgAGBQJYkhCAAAoJEPWDqSZpMIYVdA0QAKnte9iQ+xxntKjfG0VDlhM5 qGcWO1TFPOVbKI041KkRMSxECFx0ZcZ8eKNcTXsDtkb0piyDXM/7ub5W+yZIFj/L gmfHw8EnLLa5OG9OJ46cNW6hoj7VfjIr2BhJHmbzmhuObT6jP/28kf4kzBS2iGOX cwW/jTtinsV33I3Gtwxs6bMXc4K0NpWm6G8gsXLVfX4KBowiNxCALpKSEAQv5VGD DQXh29wbCojNzZJzx/D2BGVfyki5dn+EJIfYytAjlRJcCWUh0BrExNnDIFOGJ7C4 SJu7yDWzshtkL3TVTv1NC9FC61J95ZcT3ugKQ/wdihpy6WAxUqvk2mBl0nprW8HZ exy2Rv6+jqj7NBnYJE9nbU2rCzIIYJ8MOjH15ebrmf3rSxhHOQrEteRj36NAUPqe jfFvt5f8UKmI6xIpUnNKAj6A7V4AJwWxdoZe773zO9WWQO+VM+ERqgAJI5oqHnKy /ANtDY0O7g7vbpzZOHVrMKjHtz8l077XOFvz2NB3PyQ+XxuHG/xhaQMP3sVdA54X bX9V5VA/oiqpcO2Ddmbct+J4Sb1+pdR/fmCVIkknKRVLq0MZd2LBN+Srp5cHHbOd 7vYv5Nc2woDR503XIgUOnjAf1wOK4WE3b6hV/EYtEaNmAs+lgzKgJubuHEsdgoBa L1zGyfgwKPpoKbrPvxH1 =Y9Un -----END PGP SIGNATURE----- --Apple-Mail=_5FA9B4B6-035E-4824-B9C7-716FE054267F-- From owner-svn-src-all@freebsd.org Wed Feb 1 16:59:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CC03CCB83C; Wed, 1 Feb 2017 16:59:48 +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 6731B12F8; Wed, 1 Feb 2017 16:59:48 +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 ECF5B10A791; Wed, 1 Feb 2017 11:59:46 -0500 (EST) From: John Baldwin To: Slawa Olhovchenkov Cc: Warner Losh , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Date: Wed, 01 Feb 2017 08:59:40 -0800 Message-ID: <12386326.7GSpFTXsMZ@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170201103555.GA79121@zxy.spb.ru> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> 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, 01 Feb 2017 11:59:47 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 16:59:48 -0000 On Wednesday, February 01, 2017 01:35:56 PM Slawa Olhovchenkov wrote: > On Tue, Jan 31, 2017 at 02:46:23PM -0800, John Baldwin wrote: > > > On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote: > > > On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin wrote: > > > > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote: > > > >> Author: nyan > > > >> Date: Sat Jan 28 02:22:15 2017 > > > >> New Revision: 312910 > > > >> URL: https://svnweb.freebsd.org/changeset/base/312910 > > > >> > > > >> Log: > > > >> Remove pc98 support completely. > > > >> I thank all developers and contributors for pc98. > > > >> > > > >> Relnotes: yes > > > > > > > > BTW, my impression was that there are some other device drivers > > > > that are effectively PC-98 only (e.g. everything that uses scsi_low.c) > > > > but they might have pccard attachments for use with PC-98 laptops? > > > > > > > > Perhaps Warner might know? > > > > > > > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4) > > > > all came from NetBSD/pc98 via PAO. > > > > > > These all work correctly on any PC Card machine. The only reason they > > > came in this way was because these devices were original marketed only > > > in Japan. I've used all these cards with external SCSI drives in the > > > past. > > > > > > As far as I know, only the if_snc driver, which was removed, is truly > > > pc98 specific. It is wired in such a way that cannot be used in ibm-at > > > compatible laptops. IIRC, it had hard-wired memory decode lines that > > > landed in the middle of the VGA graphics pages or BIOS low memory > > > areas. I have one of these cards still, and it will be detected on my > > > laptops, but can't work due to the required mappings. > > > > > > Now, there's an different question about whether it is time to retire > > > some of the now-ancient SCSI cards from the system, but that's a > > > different kettle of fish that's larger than just nsp, ncv and stg. > > > > Fair enough. I haven't fully put away my 12 axe and am toying with > > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only > > as well in that case). Hardware that wants to use ISA/pccard for > > storage is probably happier running 4.x anyway. One question is if we > > should drop ISA attachments in that case for drivers that support PCI > > and ISA. However, there's a fair list of ISA-only adapters that would > > be a good place to start anyway. One concern is to not drop any drivers > > ps/2 keyboard, mouse, touchpads, lm sensors, etc?... Those aren't storage or NICs. There are many "legacy" device still present in modern systems that we obviously have to support. However, if you have an ISA Adapter SCSI HBA in an ISA slot, the machine running that is probably happier running 4.x than 12.0. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Feb 1 17:06:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BABB2CCBC15; Wed, 1 Feb 2017 17:06:41 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79C751B3B; Wed, 1 Feb 2017 17:06:41 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cYyMh-000Amd-Ad; Wed, 01 Feb 2017 20:06:39 +0300 Date: Wed, 1 Feb 2017 20:06:39 +0300 From: Slawa Olhovchenkov To: John Baldwin Cc: Warner Losh , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170201170639.GY37974@zxy.spb.ru> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12386326.7GSpFTXsMZ@ralph.baldwin.cx> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 17:06:41 -0000 On Wed, Feb 01, 2017 at 08:59:40AM -0800, John Baldwin wrote: > On Wednesday, February 01, 2017 01:35:56 PM Slawa Olhovchenkov wrote: > > On Tue, Jan 31, 2017 at 02:46:23PM -0800, John Baldwin wrote: > > > > > On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote: > > > > On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin wrote: > > > > > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote: > > > > >> Author: nyan > > > > >> Date: Sat Jan 28 02:22:15 2017 > > > > >> New Revision: 312910 > > > > >> URL: https://svnweb.freebsd.org/changeset/base/312910 > > > > >> > > > > >> Log: > > > > >> Remove pc98 support completely. > > > > >> I thank all developers and contributors for pc98. > > > > >> > > > > >> Relnotes: yes > > > > > > > > > > BTW, my impression was that there are some other device drivers > > > > > that are effectively PC-98 only (e.g. everything that uses scsi_low.c) > > > > > but they might have pccard attachments for use with PC-98 laptops? > > > > > > > > > > Perhaps Warner might know? > > > > > > > > > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4) > > > > > all came from NetBSD/pc98 via PAO. > > > > > > > > These all work correctly on any PC Card machine. The only reason they > > > > came in this way was because these devices were original marketed only > > > > in Japan. I've used all these cards with external SCSI drives in the > > > > past. > > > > > > > > As far as I know, only the if_snc driver, which was removed, is truly > > > > pc98 specific. It is wired in such a way that cannot be used in ibm-at > > > > compatible laptops. IIRC, it had hard-wired memory decode lines that > > > > landed in the middle of the VGA graphics pages or BIOS low memory > > > > areas. I have one of these cards still, and it will be detected on my > > > > laptops, but can't work due to the required mappings. > > > > > > > > Now, there's an different question about whether it is time to retire > > > > some of the now-ancient SCSI cards from the system, but that's a > > > > different kettle of fish that's larger than just nsp, ncv and stg. > > > > > > Fair enough. I haven't fully put away my 12 axe and am toying with > > > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only > > > as well in that case). Hardware that wants to use ISA/pccard for > > > storage is probably happier running 4.x anyway. One question is if we > > > should drop ISA attachments in that case for drivers that support PCI > > > and ISA. However, there's a fair list of ISA-only adapters that would > > > be a good place to start anyway. One concern is to not drop any drivers > > > > ps/2 keyboard, mouse, touchpads, lm sensors, etc?... > > Those aren't storage or NICs. There are many "legacy" device still present > in modern systems that we obviously have to support. However, if you have > an ISA Adapter SCSI HBA in an ISA slot, the machine running that is probably > happier running 4.x than 12.0. My be I am missread, I think removed ISA bus and all devices attached to ISA bus. From owner-svn-src-all@freebsd.org Wed Feb 1 17:09:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C957CCBCED; Wed, 1 Feb 2017 17:09:53 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF0F91DFD; Wed, 1 Feb 2017 17:09:52 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cYyPm-000ArC-SH; Wed, 01 Feb 2017 20:09:50 +0300 Date: Wed, 1 Feb 2017 20:09:50 +0300 From: Slawa Olhovchenkov To: John Baldwin Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170201170950.GF79121@zxy.spb.ru> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12386326.7GSpFTXsMZ@ralph.baldwin.cx> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 17:09:53 -0000 On Wed, Feb 01, 2017 at 08:59:40AM -0800, John Baldwin wrote: > > > Fair enough. I haven't fully put away my 12 axe and am toying with > > > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only > > > as well in that case). Hardware that wants to use ISA/pccard for > > > storage is probably happier running 4.x anyway. One question is if we > > > should drop ISA attachments in that case for drivers that support PCI > > > and ISA. However, there's a fair list of ISA-only adapters that would > > > be a good place to start anyway. One concern is to not drop any drivers > > > > ps/2 keyboard, mouse, touchpads, lm sensors, etc?... > > Those aren't storage or NICs. There are many "legacy" device still present > in modern systems that we obviously have to support. However, if you have > an ISA Adapter SCSI HBA in an ISA slot, the machine running that is probably > happier running 4.x than 12.0. Also, I am think current ports don't build on 4.x. I am got complains about using ports on 8.x. From owner-svn-src-all@freebsd.org Wed Feb 1 17:33:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC422CC4380; Wed, 1 Feb 2017 17:33:16 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id DEA19DBA; Wed, 1 Feb 2017 17:33:16 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 9F10B177B0; Wed, 1 Feb 2017 09:33:11 -0800 (PST) Date: Wed, 1 Feb 2017 09:33:11 -0800 From: hiren panchasara To: Hartmut Brandt Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313043 - head/sys/kern Message-ID: <20170201173311.GY84308@strugglingcoder.info> References: <201702011312.v11DC7WJ085025@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yTwVabqJa5IUz21H" Content-Disposition: inline In-Reply-To: <201702011312.v11DC7WJ085025@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 17:33:17 -0000 --yTwVabqJa5IUz21H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/01/17 at 01:12P, Hartmut Brandt wrote: > Author: harti > Date: Wed Feb 1 13:12:07 2017 > New Revision: 313043 > URL: https://svnweb.freebsd.org/changeset/base/313043 >=20 > Log: > Merge filt_soread and filt_solisten and decide what to do when checking > for EVFILT_READ at the point of the check not when the event is registe= rs. > This fixes a problem with asio when accepting a connection. > =20 > Reviewed by: kib@, Scott Mitchell >=20 > Modified: > head/sys/kern/uipc_socket.c Is it possible to MFC this back to 11? Cheers, Hiren --yTwVabqJa5IUz21H Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJYkhvXXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lNt4H/2Pco3hjAGlBRda8Y4rgPhn4 ufFbWf0/Pohm7jE1rHgVqTQyYkcXJjFQSdnWFtESPW/SIsICiK7uxZ9j1uTTBxi8 uSA0V+WlfOf65hwqEEY+O3d+3pMXqR65HhL4txSDqlmqudpY2+38LbrENOiotSPB B05jVuEu2dQKfmF3OOD6gDZjPb0/t78391Di1PUhxuB56P4kpIB+IaJcrCyxfMyn q7k05Iuf74CA1b25egA4mK9N73OkOXzeZIK0rzLMmi4FAMP6WahpmNzwvSW84cr1 SiNGHlzce+6cAOjeYRrjxUcdAUUCU71YgGxKaZ+V52VdgSEjGrMUa3nIbahXBLY= =oOlo -----END PGP SIGNATURE----- --yTwVabqJa5IUz21H-- From owner-svn-src-all@freebsd.org Wed Feb 1 17:56:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ED6BCC49E1 for ; Wed, 1 Feb 2017 17:56:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::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 D87551E39 for ; Wed, 1 Feb 2017 17:56:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x242.google.com with SMTP id m98so21692419iod.2 for ; Wed, 01 Feb 2017 09:56:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=1LtDJwqZABJ3q8A8J1AJnRwytRlqe4F0Zsmz3yI6MwI=; b=OKIgTUy4g0ijnY1S1YxREvVlMBrUxkqcAm6ZEjlsL+Z8LeaF27SAPzjGOA/K9NY86S BUTeONLpJwZN5NMK56GA+R6kCAf3rZejFbJ+ydF5o/w6d0PO8SJS9pVpvr4DauyjCklY byYTOMHQ5hmLntRIJtKpIP0XKNmv2gMujZ8h7X0y+C8NtcgTCGudxcG3mW0/rM37wbVa 5v64eeQfH29/YjWYN8xXUhJufm40EmVh+oxaQtHpmL57RfZaVkdrAm5S+C/lA0Rt6R7M sinPf8UjCUIH5tl0m7tANswneD5+esxNHOLe6Ty5/HeMTwnbNhMwCppSsgcg44Nt58aB lbpQ== 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=1LtDJwqZABJ3q8A8J1AJnRwytRlqe4F0Zsmz3yI6MwI=; b=hjjODaIjmQJnPnJo+vaEwI1C+69KMhybhyBrQs4/Z0nWlCFhBPa9DI2HlbWWcFN9eu 6SdWmSefx6lwnKn2QIUUb4/euwowbRrGfFpSNELNEMngqZ1CL2GcDzsH9sEyoRgo3YiC tGkNVPC0aBk3m6OUHVYugUnLI9a4c/4i/DyRkGNS0hLEyNfn53rEffLPTf9/rQKPKb/2 8wdhUz9FCHkd5jbfEE8c67cf9mZILr2bvPCWhZwqikQKKnELMal1wr7XNNNohoA8KXAE 6L6rOSg9+SsODMLCfmYWfbSL9wA64nCvcGU0M4KZp7iepNVeK4nzTDqPC4nKtV9jsKxc RsGw== X-Gm-Message-State: AIkVDXIYb93DiAailu/6iZo+FDq3iOx/uuJdyukMyjaFXh0B1cyoOD2vRkxu3QTYnU5stbYSsc/kU5suRK7w/g== X-Received: by 10.107.139.131 with SMTP id n125mr3520929iod.166.1485971784983; Wed, 01 Feb 2017 09:56:24 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Wed, 1 Feb 2017 09:56:24 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <20170201170639.GY37974@zxy.spb.ru> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> <20170201170639.GY37974@zxy.spb.ru> From: Warner Losh Date: Wed, 1 Feb 2017 10:56:24 -0700 X-Google-Sender-Auth: Osfctzr9wgV7sdoK218dyhFpUGo Message-ID: Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... To: Slawa Olhovchenkov Cc: John Baldwin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Takahashi Yoshihiro Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 17:56:26 -0000 On Wed, Feb 1, 2017 at 10:06 AM, Slawa Olhovchenkov wrote: > On Wed, Feb 01, 2017 at 08:59:40AM -0800, John Baldwin wrote: > >> On Wednesday, February 01, 2017 01:35:56 PM Slawa Olhovchenkov wrote: >> > On Tue, Jan 31, 2017 at 02:46:23PM -0800, John Baldwin wrote: >> > >> > > On Tuesday, January 31, 2017 03:33:55 PM Warner Losh wrote: >> > > > On Tue, Jan 31, 2017 at 3:20 PM, John Baldwin wrote: >> > > > > On Saturday, January 28, 2017 02:22:15 AM Takahashi Yoshihiro wrote: >> > > > >> Author: nyan >> > > > >> Date: Sat Jan 28 02:22:15 2017 >> > > > >> New Revision: 312910 >> > > > >> URL: https://svnweb.freebsd.org/changeset/base/312910 >> > > > >> >> > > > >> Log: >> > > > >> Remove pc98 support completely. >> > > > >> I thank all developers and contributors for pc98. >> > > > >> >> > > > >> Relnotes: yes >> > > > > >> > > > > BTW, my impression was that there are some other device drivers >> > > > > that are effectively PC-98 only (e.g. everything that uses scsi_low.c) >> > > > > but they might have pccard attachments for use with PC-98 laptops? >> > > > > >> > > > > Perhaps Warner might know? >> > > > > >> > > > > It seems stg(4) had PCI variants, but nsp(4), ncv(4), and stg(4) >> > > > > all came from NetBSD/pc98 via PAO. >> > > > >> > > > These all work correctly on any PC Card machine. The only reason they >> > > > came in this way was because these devices were original marketed only >> > > > in Japan. I've used all these cards with external SCSI drives in the >> > > > past. >> > > > >> > > > As far as I know, only the if_snc driver, which was removed, is truly >> > > > pc98 specific. It is wired in such a way that cannot be used in ibm-at >> > > > compatible laptops. IIRC, it had hard-wired memory decode lines that >> > > > landed in the middle of the VGA graphics pages or BIOS low memory >> > > > areas. I have one of these cards still, and it will be detected on my >> > > > laptops, but can't work due to the required mappings. >> > > > >> > > > Now, there's an different question about whether it is time to retire >> > > > some of the now-ancient SCSI cards from the system, but that's a >> > > > different kettle of fish that's larger than just nsp, ncv and stg. >> > > >> > > Fair enough. I haven't fully put away my 12 axe and am toying with >> > > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only >> > > as well in that case). Hardware that wants to use ISA/pccard for >> > > storage is probably happier running 4.x anyway. One question is if we >> > > should drop ISA attachments in that case for drivers that support PCI >> > > and ISA. However, there's a fair list of ISA-only adapters that would >> > > be a good place to start anyway. One concern is to not drop any drivers >> > >> > ps/2 keyboard, mouse, touchpads, lm sensors, etc?... >> >> Those aren't storage or NICs. There are many "legacy" device still present >> in modern systems that we obviously have to support. However, if you have >> an ISA Adapter SCSI HBA in an ISA slot, the machine running that is probably >> happier running 4.x than 12.0. > > My be I am missread, I think removed ISA bus and all devices attached > to ISA bus. We will never ever ever remove the ISA bus on the i386 or amd64 ports. That's simply not possible due to the legacy busses and the fact that many devices are logically attached to the address space used by the ISA bus even if there aren't physical plastic ISA slots. Ps/2 keyboards, mice, etc usually also have ACPI attachments. lm sensors might not, but those are still used and useful. If you have an ISA system, you are limited to about 16-32MB of RAM. That's what John is talking about. These systems will barely boot a modern FreeBSD. However, there are many people that have ISA cards in a PCI system to do things. Those systems can still run FreeBSD decently well if they aren't running X11. However, performance of ISA SCSI and ISA Networking cards for those boxes is horrible and there are many PCI-based alternatives that should drop in. I have a friend that has several of these systems he's not going to ever upgrade the hardware since they work just fine for what he needs. He does want to run the latest software to pickup security fixes. But AFAIK, none of these systems is using ISA SCSI. There may be the odd NE-2000 compatible ISA card, but even those have been upgraded a long time ago when his DSL speeds started to exceed 10Mbps. John's point is there's little practical value to keeping the old ISA SCSI cards in the tree. And there's some benefit to removing them since there are a few CAM features that are used only on one or two of these systems. ISA Networking cards are limited to 10Mbps (even if they have PHYs that do 100Mbps) because of the ISA bus. These cards aren't installed in modern systems, and it is quite doubtful they are in systems that will be upgraded to 12. And they are untested. Since there's a non-zero cost in keeping them, there needs to be some benefit. John is making the case that finding that benefit is increasingly difficult and we've passed the point where even the relatively low cost we have to keep the drivers in the system outweighs the benefit. For many, if not most, of these devices, I'm inclined to agree with him. Warner From owner-svn-src-all@freebsd.org Wed Feb 1 18:08:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37492CC4C71; Wed, 1 Feb 2017 18:08:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 20A7C61F; Wed, 1 Feb 2017 18:08:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v11I8Gow012883 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Feb 2017 10:08:16 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v11I8GFa012882; Wed, 1 Feb 2017 10:08:16 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 1 Feb 2017 10:08:16 -0800 From: Gleb Smirnoff To: Hartmut Brandt Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313043 - head/sys/kern Message-ID: <20170201180816.GF3334@FreeBSD.org> References: <201702011312.v11DC7WJ085025@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702011312.v11DC7WJ085025@repo.freebsd.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 18:08:23 -0000 On Wed, Feb 01, 2017 at 01:12:07PM +0000, Hartmut Brandt wrote: H> Author: harti H> Date: Wed Feb 1 13:12:07 2017 H> New Revision: 313043 H> URL: https://svnweb.freebsd.org/changeset/base/313043 H> H> Log: H> Merge filt_soread and filt_solisten and decide what to do when checking H> for EVFILT_READ at the point of the check not when the event is registers. H> This fixes a problem with asio when accepting a connection. H> H> Reviewed by: kib@, Scott Mitchell This goes into opposite direction with what I am doing: https://reviews.freebsd.org/D9356 Can you please explain the problem with asio when accepting a connection? -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Wed Feb 1 18:23:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6209FCCB461; Wed, 1 Feb 2017 18:23:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BBD11150; Wed, 1 Feb 2017 18:23:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v11INbCp013008 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Feb 2017 10:23:38 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v11INboo013007; Wed, 1 Feb 2017 10:23:37 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 1 Feb 2017 10:23:37 -0800 From: Gleb Smirnoff To: John Baldwin Cc: Edward Tomasz Napierala , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys Message-ID: <20170201182337.GG3334@FreeBSD.org> References: <201701301257.v0UCvNrK065993@repo.freebsd.org> <3349880.lYJPXOWCO7@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3349880.lYJPXOWCO7@ralph.baldwin.cx> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 18:23:39 -0000 On Tue, Jan 31, 2017 at 02:13:36PM -0800, John Baldwin wrote: J> On Monday, January 30, 2017 12:57:23 PM Edward Tomasz Napierala wrote: J> > Author: trasz J> > Date: Mon Jan 30 12:57:22 2017 J> > New Revision: 312988 J> > URL: https://svnweb.freebsd.org/changeset/base/312988 J> > J> > Log: J> > Add kern_listen(), kern_shutdown(), and kern_socket(), and use them J> > instead of their sys_*() counterparts in various compats. The svr4 J> > is left untouched, because there's no point. J> J> Note that you can compile test svr4 since it is still in the tree. J> If we want to remove svr4, then we should remove it. However, we J> should maintain code that is in the tree if it is still there. All we can do right now is maintain it as compilable. My example with COMPAT_OLDSOCK shows that SVR4 simply doesn't work as kld, and nobody complains. Okay, what if I say on freebsd-arch/freebsd-current that I am going to remove it and wait for any objections for a month, and then do it? -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Wed Feb 1 19:33:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9023BCCC67D; Wed, 1 Feb 2017 19:33:01 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A8041272; Wed, 1 Feb 2017 19:33:01 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11JX0JQ044412; Wed, 1 Feb 2017 19:33:00 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11JX0rA044409; Wed, 1 Feb 2017 19:33:00 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201702011933.v11JX0rA044409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 1 Feb 2017 19:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313045 - in head: cddl/lib/libdtrace sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 19:33:01 -0000 Author: gnn Date: Wed Feb 1 19:33:00 2017 New Revision: 313045 URL: https://svnweb.freebsd.org/changeset/base/313045 Log: Add an mbuf to ipinfo_t translator to finish cleanup of mbuf passing to TCP probes. Reviewed by: markj MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9401 Modified: head/cddl/lib/libdtrace/ip.d head/sys/netinet/in_kdtrace.c Modified: head/cddl/lib/libdtrace/ip.d ============================================================================== --- head/cddl/lib/libdtrace/ip.d Wed Feb 1 16:15:23 2017 (r313044) +++ head/cddl/lib/libdtrace/ip.d Wed Feb 1 19:33:00 2017 (r313045) @@ -238,6 +238,24 @@ translator ipinfo_t < uint8_t *p > { inet_ntoa6(&((struct ip6_hdr *)p)->ip6_dst); }; +#pragma D binding "1.13" translator +translator ipinfo_t < struct mbuf *m > { + ip_ver = m == NULL ? 0 : ((struct ip *)m->m_data)->ip_v; + ip_plength = m == NULL ? 0 : + ((struct ip *)m->m_data)->ip_v == 4 ? + ntohs(((struct ip *)m->m_data)->ip_len) - + (((struct ip *)m->m_data)->ip_hl << 2): + ntohs(((struct ip6_hdr *)m->m_data)->ip6_ctlun.ip6_un1.ip6_un1_plen); + ip_saddr = m == NULL ? 0 : + ((struct ip *)m->m_data)->ip_v == 4 ? + inet_ntoa(&((struct ip *)m->m_data)->ip_src.s_addr) : + inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_src); + ip_daddr = m == NULL ? 0 : + ((struct ip *)m->m_data)->ip_v == 4 ? + inet_ntoa(&((struct ip *)m->m_data)->ip_dst.s_addr) : + inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_dst); +}; + #pragma D binding "1.5" IFF_LOOPBACK inline int IFF_LOOPBACK = 0x8; Modified: head/sys/netinet/in_kdtrace.c ============================================================================== --- head/sys/netinet/in_kdtrace.c Wed Feb 1 16:15:23 2017 (r313044) +++ head/sys/netinet/in_kdtrace.c Wed Feb 1 19:33:00 2017 (r313045) @@ -56,28 +56,28 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , send, SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "uint8_t *", "ipinfo_t *", + "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "uint8_t *", "ipinfo_t *", + "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "uint8_t *", "ipinfo_t *", + "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "uint8_t *", "ipinfo_t *", + "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); @@ -91,7 +91,7 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , connect SDT_PROBE_DEFINE5_XLATE(tcp, , , receive, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "uint8_t *", "ipinfo_t *", + "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); @@ -113,7 +113,7 @@ SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__ SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__output, "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *", - "uint8_t *", "ipinfo_t *"); + "struct mbuf *", "ipinfo_t *"); SDT_PROBE_DEFINE2_XLATE(tcp, , , debug__user, "struct tcpcb *", "tcpsinfo_t *" , @@ -122,7 +122,7 @@ SDT_PROBE_DEFINE2_XLATE(tcp, , , debug__ SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__drop, "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *", - "uint8_t *", "ipinfo_t *"); + "struct mbuf *", "ipinfo_t *"); SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change, "void *", "void *", From owner-svn-src-all@freebsd.org Wed Feb 1 20:10:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62358CCC10C; Wed, 1 Feb 2017 20:10:58 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 233741A4E; Wed, 1 Feb 2017 20:10:58 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11KAvtN062012; Wed, 1 Feb 2017 20:10:57 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11KAu3B062003; Wed, 1 Feb 2017 20:10:56 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702012010.v11KAu3B062003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 1 Feb 2017 20:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313047 - in head/sys/boot: common i386/libi386 uboot/lib usb/storage zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 20:10:58 -0000 Author: tsoome Date: Wed Feb 1 20:10:56 2017 New Revision: 313047 URL: https://svnweb.freebsd.org/changeset/base/313047 Log: loader: disk/part api needs to use uint64_t offsets The disk_* and part_* api is using 64bit values for media size and offsets. However, the current api is using off_t type, which is signed 64-bit int. In this context the signed media size does not make any sense, and the offsets are used to mark absolute, not relative locations. Also, the data from GPT partition table and some other sources is already using uint64_t data type, so using signed off_t can cause sign issues. Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D8710 Modified: head/sys/boot/common/disk.c head/sys/boot/common/disk.h head/sys/boot/common/part.c head/sys/boot/common/part.h head/sys/boot/i386/libi386/biosdisk.c head/sys/boot/uboot/lib/disk.c head/sys/boot/usb/storage/umass_loader.c head/sys/boot/zfs/zfs.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Wed Feb 1 19:36:33 2017 (r313046) +++ head/sys/boot/common/disk.c Wed Feb 1 20:10:56 2017 (r313047) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); struct open_disk { struct ptable *table; - off_t mediasize; + uint64_t mediasize; u_int sectorsize; u_int flags; int rcnt; @@ -64,7 +64,7 @@ struct dentry { int d_partition; struct open_disk *od; - off_t d_offset; + uint64_t d_offset; STAILQ_ENTRY(dentry) entry; #ifdef DISK_DEBUG uint32_t count; @@ -171,7 +171,7 @@ display_size(uint64_t size, u_int sector } int -ptblread(void *d, void *buf, size_t blocks, off_t offset) +ptblread(void *d, void *buf, size_t blocks, uint64_t offset) { struct disk_devdesc *dev; struct open_disk *od; @@ -238,7 +238,7 @@ disk_print(struct disk_devdesc *dev, cha } int -disk_read(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks) +disk_read(struct disk_devdesc *dev, void *buf, uint64_t offset, u_int blocks) { struct open_disk *od; int ret; @@ -251,7 +251,7 @@ disk_read(struct disk_devdesc *dev, void } int -disk_write(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks) +disk_write(struct disk_devdesc *dev, void *buf, uint64_t offset, u_int blocks) { struct open_disk *od; int ret; @@ -274,7 +274,7 @@ disk_ioctl(struct disk_devdesc *dev, u_l } int -disk_open(struct disk_devdesc *dev, off_t mediasize, u_int sectorsize, +disk_open(struct disk_devdesc *dev, uint64_t mediasize, u_int sectorsize, u_int flags) { struct open_disk *od; Modified: head/sys/boot/common/disk.h ============================================================================== --- head/sys/boot/common/disk.h Wed Feb 1 19:36:33 2017 (r313046) +++ head/sys/boot/common/disk.h Wed Feb 1 20:10:56 2017 (r313047) @@ -86,7 +86,7 @@ struct disk_devdesc void *d_opendata; int d_slice; int d_partition; - off_t d_offset; + uint64_t d_offset; }; enum disk_ioctl { @@ -97,17 +97,17 @@ enum disk_ioctl { /* * Parse disk metadata and initialise dev->d_offset. */ -extern int disk_open(struct disk_devdesc *dev, off_t mediasize, +extern int disk_open(struct disk_devdesc *dev, uint64_t mediasize, u_int sectorsize, u_int flags); #define DISK_F_NOCACHE 0x0001 /* Do not use metadata caching */ extern int disk_close(struct disk_devdesc *dev); extern void disk_cleanup(const struct devsw *d_dev); extern int disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *buf); -extern int disk_read(struct disk_devdesc *dev, void *buf, off_t offset, +extern int disk_read(struct disk_devdesc *dev, void *buf, uint64_t offset, u_int blocks); -extern int disk_write(struct disk_devdesc *dev, void *buf, off_t offset, +extern int disk_write(struct disk_devdesc *dev, void *buf, uint64_t offset, u_int blocks); -extern int ptblread(void *d, void *buf, size_t blocks, off_t offset); +extern int ptblread(void *d, void *buf, size_t blocks, uint64_t offset); /* * Print information about slices on a disk. Modified: head/sys/boot/common/part.c ============================================================================== --- head/sys/boot/common/part.c Wed Feb 1 19:36:33 2017 (r313046) +++ head/sys/boot/common/part.c Wed Feb 1 20:10:56 2017 (r313047) @@ -584,7 +584,7 @@ out: #endif /* LOADER_VTOC8_SUPPORT */ struct ptable* -ptable_open(void *dev, off_t sectors, uint16_t sectorsize, +ptable_open(void *dev, uint64_t sectors, uint16_t sectorsize, diskread_t *dread) { struct dos_partition *dp; Modified: head/sys/boot/common/part.h ============================================================================== --- head/sys/boot/common/part.h Wed Feb 1 19:36:33 2017 (r313046) +++ head/sys/boot/common/part.h Wed Feb 1 20:10:56 2017 (r313047) @@ -62,11 +62,11 @@ struct ptable_entry { }; /* The offset and size are in sectors */ -typedef int (diskread_t)(void *arg, void *buf, size_t blocks, off_t offset); +typedef int (diskread_t)(void *arg, void *buf, size_t blocks, uint64_t offset); typedef int (ptable_iterate_t)(void *arg, const char *partname, const struct ptable_entry *part); -struct ptable *ptable_open(void *dev, off_t sectors, uint16_t sectorsize, +struct ptable *ptable_open(void *dev, uint64_t sectors, uint16_t sectorsize, diskread_t *dread); void ptable_close(struct ptable *table); enum ptable_type ptable_gettype(const struct ptable *table); Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Wed Feb 1 19:36:33 2017 (r313046) +++ head/sys/boot/i386/libi386/biosdisk.c Wed Feb 1 20:10:56 2017 (r313047) @@ -493,7 +493,7 @@ bd_ioctl(struct open_file *f, u_long cmd *(u_int *)data = BD(dev).bd_sectorsize; break; case DIOCGMEDIASIZE: - *(off_t *)data = BD(dev).bd_sectors * BD(dev).bd_sectorsize; + *(uint64_t *)data = BD(dev).bd_sectors * BD(dev).bd_sectorsize; break; default: return (ENOTTY); Modified: head/sys/boot/uboot/lib/disk.c ============================================================================== --- head/sys/boot/uboot/lib/disk.c Wed Feb 1 19:36:33 2017 (r313046) +++ head/sys/boot/uboot/lib/disk.c Wed Feb 1 20:10:56 2017 (r313047) @@ -282,7 +282,7 @@ stor_ioctl(struct open_file *f, u_long c *(u_int *)data = SI(dev).bsize; break; case DIOCGMEDIASIZE: - *(off_t *)data = SI(dev).bsize * SI(dev).blocks; + *(uint64_t *)data = SI(dev).bsize * SI(dev).blocks; break; default: return (ENOTTY); Modified: head/sys/boot/usb/storage/umass_loader.c ============================================================================== --- head/sys/boot/usb/storage/umass_loader.c Wed Feb 1 19:36:33 2017 (r313046) +++ head/sys/boot/usb/storage/umass_loader.c Wed Feb 1 20:10:56 2017 (r313047) @@ -143,14 +143,14 @@ umass_disk_ioctl(struct open_file *f __u uint32_t blocksize; switch (cmd) { - case IOCTL_GET_BLOCK_SIZE: - case IOCTL_GET_BLOCKS: + case DIOCGSECTORSIZE: + case DIOCGMEDIASIZE: if (usb_msc_read_capacity(umass_uaa.device, 0, &nblock, &blocksize) != 0) return (EINVAL); - if (cmd == IOCTL_GET_BLOCKS) - *(uint32_t*)buf = nblock; + if (cmd == DIOCGMEDIASIZE) + *(uint64_t*)buf = nblock; else *(uint32_t*)buf = blocksize; Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Wed Feb 1 19:36:33 2017 (r313046) +++ head/sys/boot/zfs/zfs.c Wed Feb 1 20:10:56 2017 (r313047) @@ -417,7 +417,7 @@ struct zfs_probe_args { }; static int -zfs_diskread(void *arg, void *buf, size_t blocks, off_t offset) +zfs_diskread(void *arg, void *buf, size_t blocks, uint64_t offset) { struct zfs_probe_args *ppa; From owner-svn-src-all@freebsd.org Wed Feb 1 20:26:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EDC8CCC9A9; Wed, 1 Feb 2017 20:26:45 +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 B67971666; Wed, 1 Feb 2017 20:26:44 +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 v11KQhs3069943; Wed, 1 Feb 2017 20:26:43 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11KQgS3069932; Wed, 1 Feb 2017 20:26:42 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702012026.v11KQgS3069932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 1 Feb 2017 20:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313048 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 20:26:45 -0000 Author: glebius Date: Wed Feb 1 20:26:42 2017 New Revision: 313048 URL: https://svnweb.freebsd.org/changeset/base/313048 Log: Update tcpdump to 4.9.0. It fixes many buffer overflow in different protocol parsers, but none of them are critical, even in absense of Capsicum. Security: CVE-2016-7922, CVE-2016-7923, CVE-2016-7924, CVE-2016-7925 Security: CVE-2016-7926, CVE-2016-7927, CVE-2016-7928, CVE-2016-7929 Security: CVE-2016-7930, CVE-2016-7931, CVE-2016-7932, CVE-2016-7933 Security: CVE-2016-7934, CVE-2016-7935, CVE-2016-7936, CVE-2016-7937 Security: CVE-2016-7938, CVE-2016-7939, CVE-2016-7940, CVE-2016-7973 Security: CVE-2016-7974, CVE-2016-7975, CVE-2016-7983, CVE-2016-7984 Security: CVE-2016-7985, CVE-2016-7986, CVE-2016-7992, CVE-2016-7993 Security: CVE-2016-8574, CVE-2016-8575, CVE-2017-5202, CVE-2017-5203 Security: CVE-2017-5204, CVE-2017-5205, CVE-2017-5341, CVE-2017-5342 Security: CVE-2017-5482, CVE-2017-5483, CVE-2017-5484, CVE-2017-5485 Security: CVE-2017-5486 Added: head/contrib/tcpdump/CONTRIBUTING - copied unchanged from r313024, vendor/tcpdump/dist/CONTRIBUTING head/contrib/tcpdump/PLATFORMS - copied unchanged from r313024, vendor/tcpdump/dist/PLATFORMS head/contrib/tcpdump/README - copied unchanged from r313024, vendor/tcpdump/dist/README head/contrib/tcpdump/addrtostr.c - copied, changed from r313024, vendor/tcpdump/dist/addrtostr.c head/contrib/tcpdump/addrtostr.h - copied unchanged from r313024, vendor/tcpdump/dist/addrtostr.h head/contrib/tcpdump/ascii_strcasecmp.c - copied unchanged from r313024, vendor/tcpdump/dist/ascii_strcasecmp.c head/contrib/tcpdump/ascii_strcasecmp.h - copied unchanged from r313024, vendor/tcpdump/dist/ascii_strcasecmp.h head/contrib/tcpdump/netdissect-stdinc.h - copied unchanged from r313024, vendor/tcpdump/dist/netdissect-stdinc.h head/contrib/tcpdump/netdissect.c - copied unchanged from r313024, vendor/tcpdump/dist/netdissect.c head/contrib/tcpdump/print-hncp.c - copied unchanged from r313024, vendor/tcpdump/dist/print-hncp.c head/contrib/tcpdump/print-lisp.c - copied unchanged from r313024, vendor/tcpdump/dist/print-lisp.c head/contrib/tcpdump/print-medsa.c - copied unchanged from r313024, vendor/tcpdump/dist/print-medsa.c head/contrib/tcpdump/print-nsh.c - copied unchanged from r313024, vendor/tcpdump/dist/print-nsh.c head/contrib/tcpdump/print-resp.c - copied unchanged from r313024, vendor/tcpdump/dist/print-resp.c head/contrib/tcpdump/print-vxlan-gpe.c - copied unchanged from r313024, vendor/tcpdump/dist/print-vxlan-gpe.c head/contrib/tcpdump/print.c - copied unchanged from r313024, vendor/tcpdump/dist/print.c head/contrib/tcpdump/print.h - copied unchanged from r313024, vendor/tcpdump/dist/print.h head/contrib/tcpdump/strtoaddr.c - copied unchanged from r313024, vendor/tcpdump/dist/strtoaddr.c head/contrib/tcpdump/strtoaddr.h - copied unchanged from r313024, vendor/tcpdump/dist/strtoaddr.h head/contrib/tcpdump/timeval-operations.h - copied unchanged from r313024, vendor/tcpdump/dist/timeval-operations.h head/contrib/tcpdump/util-print.c - copied unchanged from r313024, vendor/tcpdump/dist/util-print.c Deleted: head/contrib/tcpdump/.cvsignore head/contrib/tcpdump/atmuni31.h head/contrib/tcpdump/missing/addrinfo.h head/contrib/tcpdump/missing/getnameinfo.c head/contrib/tcpdump/missing/inet_aton.c head/contrib/tcpdump/missing/inet_ntop.c head/contrib/tcpdump/missing/inet_pton.c head/contrib/tcpdump/strcasecmp.c head/contrib/tcpdump/tcpdump-stdinc.h head/contrib/tcpdump/util.c Modified: head/contrib/tcpdump/CHANGES (contents, props changed) head/contrib/tcpdump/CREDITS (contents, props changed) head/contrib/tcpdump/INSTALL.txt (contents, props changed) head/contrib/tcpdump/Makefile.in (contents, props changed) head/contrib/tcpdump/VERSION (contents, props changed) head/contrib/tcpdump/addrtoname.c (contents, props changed) head/contrib/tcpdump/addrtoname.h (contents, props changed) head/contrib/tcpdump/af.c (contents, props changed) head/contrib/tcpdump/af.h (contents, props changed) head/contrib/tcpdump/bpf_dump.c (contents, props changed) head/contrib/tcpdump/checksum.c (contents, props changed) head/contrib/tcpdump/config.h.in (contents, props changed) head/contrib/tcpdump/configure (contents, props changed) head/contrib/tcpdump/configure.in (contents, props changed) head/contrib/tcpdump/cpack.c (contents, props changed) head/contrib/tcpdump/cpack.h (contents, props changed) head/contrib/tcpdump/ether.h (contents, props changed) head/contrib/tcpdump/ethertype.h (contents, props changed) head/contrib/tcpdump/extract.h (contents, props changed) head/contrib/tcpdump/gmpls.c (contents, props changed) head/contrib/tcpdump/gmt2local.c (contents, props changed) head/contrib/tcpdump/in_cksum.c (contents, props changed) head/contrib/tcpdump/interface.h (contents, props changed) head/contrib/tcpdump/ip.h (contents, props changed) head/contrib/tcpdump/ip6.h (contents, props changed) head/contrib/tcpdump/ipproto.c (contents, props changed) head/contrib/tcpdump/ipproto.h (contents, props changed) head/contrib/tcpdump/l2vpn.c (contents, props changed) head/contrib/tcpdump/l2vpn.h (contents, props changed) head/contrib/tcpdump/lbl/os-solaris2.h (contents, props changed) head/contrib/tcpdump/lbl/os-sunos4.h (contents, props changed) head/contrib/tcpdump/lbl/os-ultrix4.h (contents, props changed) head/contrib/tcpdump/machdep.c (contents, props changed) head/contrib/tcpdump/machdep.h (contents, props changed) head/contrib/tcpdump/mib.h (contents, props changed) head/contrib/tcpdump/missing/datalinks.c (contents, props changed) head/contrib/tcpdump/missing/dlnames.c (contents, props changed) head/contrib/tcpdump/missing/snprintf.c (contents, props changed) head/contrib/tcpdump/missing/strdup.c (contents, props changed) head/contrib/tcpdump/missing/strlcat.c (contents, props changed) head/contrib/tcpdump/missing/strlcpy.c (contents, props changed) head/contrib/tcpdump/missing/strsep.c (contents, props changed) head/contrib/tcpdump/nameser.h (contents, props changed) head/contrib/tcpdump/netdissect.h (contents, props changed) head/contrib/tcpdump/nfs.h (contents, props changed) head/contrib/tcpdump/nfsfh.h (contents, props changed) head/contrib/tcpdump/nlpid.c (contents, props changed) head/contrib/tcpdump/oui.c (contents, props changed) head/contrib/tcpdump/oui.h (contents, props changed) head/contrib/tcpdump/parsenfsfh.c (contents, props changed) head/contrib/tcpdump/pcap-missing.h (contents, props changed) head/contrib/tcpdump/ppp.h (contents, props changed) head/contrib/tcpdump/print-802_11.c (contents, props changed) head/contrib/tcpdump/print-802_15_4.c (contents, props changed) head/contrib/tcpdump/print-ah.c (contents, props changed) head/contrib/tcpdump/print-ahcp.c (contents, props changed) head/contrib/tcpdump/print-aodv.c (contents, props changed) head/contrib/tcpdump/print-aoe.c (contents, props changed) head/contrib/tcpdump/print-ap1394.c (contents, props changed) head/contrib/tcpdump/print-arcnet.c (contents, props changed) head/contrib/tcpdump/print-arp.c (contents, props changed) head/contrib/tcpdump/print-ascii.c (contents, props changed) head/contrib/tcpdump/print-atalk.c (contents, props changed) head/contrib/tcpdump/print-atm.c (contents, props changed) head/contrib/tcpdump/print-babel.c (contents, props changed) head/contrib/tcpdump/print-beep.c (contents, props changed) head/contrib/tcpdump/print-bfd.c (contents, props changed) head/contrib/tcpdump/print-bgp.c (contents, props changed) head/contrib/tcpdump/print-bootp.c (contents, props changed) head/contrib/tcpdump/print-bt.c (contents, props changed) head/contrib/tcpdump/print-calm-fast.c (contents, props changed) head/contrib/tcpdump/print-carp.c (contents, props changed) head/contrib/tcpdump/print-cdp.c (contents, props changed) head/contrib/tcpdump/print-cfm.c (contents, props changed) head/contrib/tcpdump/print-chdlc.c (contents, props changed) head/contrib/tcpdump/print-cip.c (contents, props changed) head/contrib/tcpdump/print-cnfp.c (contents, props changed) head/contrib/tcpdump/print-dccp.c (contents, props changed) head/contrib/tcpdump/print-decnet.c (contents, props changed) head/contrib/tcpdump/print-dhcp6.c (contents, props changed) head/contrib/tcpdump/print-domain.c (contents, props changed) head/contrib/tcpdump/print-dtp.c (contents, props changed) head/contrib/tcpdump/print-dvmrp.c (contents, props changed) head/contrib/tcpdump/print-eap.c (contents, props changed) head/contrib/tcpdump/print-egp.c (contents, props changed) head/contrib/tcpdump/print-eigrp.c (contents, props changed) head/contrib/tcpdump/print-enc.c (contents, props changed) head/contrib/tcpdump/print-esp.c (contents, props changed) head/contrib/tcpdump/print-ether.c (contents, props changed) head/contrib/tcpdump/print-fddi.c (contents, props changed) head/contrib/tcpdump/print-forces.c (contents, props changed) head/contrib/tcpdump/print-fr.c (contents, props changed) head/contrib/tcpdump/print-frag6.c (contents, props changed) head/contrib/tcpdump/print-ftp.c (contents, props changed) head/contrib/tcpdump/print-geneve.c (contents, props changed) head/contrib/tcpdump/print-geonet.c (contents, props changed) head/contrib/tcpdump/print-gre.c (contents, props changed) head/contrib/tcpdump/print-hsrp.c (contents, props changed) head/contrib/tcpdump/print-http.c (contents, props changed) head/contrib/tcpdump/print-icmp.c (contents, props changed) head/contrib/tcpdump/print-icmp6.c (contents, props changed) head/contrib/tcpdump/print-igmp.c (contents, props changed) head/contrib/tcpdump/print-igrp.c (contents, props changed) head/contrib/tcpdump/print-ip.c (contents, props changed) head/contrib/tcpdump/print-ip6.c (contents, props changed) head/contrib/tcpdump/print-ip6opts.c (contents, props changed) head/contrib/tcpdump/print-ipcomp.c (contents, props changed) head/contrib/tcpdump/print-ipfc.c (contents, props changed) head/contrib/tcpdump/print-ipnet.c (contents, props changed) head/contrib/tcpdump/print-ipx.c (contents, props changed) head/contrib/tcpdump/print-isakmp.c (contents, props changed) head/contrib/tcpdump/print-isoclns.c (contents, props changed) head/contrib/tcpdump/print-juniper.c (contents, props changed) head/contrib/tcpdump/print-krb.c (contents, props changed) head/contrib/tcpdump/print-l2tp.c (contents, props changed) head/contrib/tcpdump/print-lane.c (contents, props changed) head/contrib/tcpdump/print-ldp.c (contents, props changed) head/contrib/tcpdump/print-llc.c (contents, props changed) head/contrib/tcpdump/print-lldp.c (contents, props changed) head/contrib/tcpdump/print-lmp.c (contents, props changed) head/contrib/tcpdump/print-loopback.c (contents, props changed) head/contrib/tcpdump/print-lspping.c (contents, props changed) head/contrib/tcpdump/print-lwapp.c (contents, props changed) head/contrib/tcpdump/print-lwres.c (contents, props changed) head/contrib/tcpdump/print-m3ua.c (contents, props changed) head/contrib/tcpdump/print-mobile.c (contents, props changed) head/contrib/tcpdump/print-mobility.c (contents, props changed) head/contrib/tcpdump/print-mpcp.c (contents, props changed) head/contrib/tcpdump/print-mpls.c (contents, props changed) head/contrib/tcpdump/print-mptcp.c (contents, props changed) head/contrib/tcpdump/print-msdp.c (contents, props changed) head/contrib/tcpdump/print-msnlb.c head/contrib/tcpdump/print-nflog.c (contents, props changed) head/contrib/tcpdump/print-nfs.c (contents, props changed) head/contrib/tcpdump/print-ntp.c (contents, props changed) head/contrib/tcpdump/print-null.c (contents, props changed) head/contrib/tcpdump/print-olsr.c (contents, props changed) head/contrib/tcpdump/print-openflow-1.0.c (contents, props changed) head/contrib/tcpdump/print-openflow.c (contents, props changed) head/contrib/tcpdump/print-ospf.c (contents, props changed) head/contrib/tcpdump/print-ospf6.c (contents, props changed) head/contrib/tcpdump/print-otv.c head/contrib/tcpdump/print-pflog.c (contents, props changed) head/contrib/tcpdump/print-pfsync.c (contents, props changed) head/contrib/tcpdump/print-pgm.c (contents, props changed) head/contrib/tcpdump/print-pim.c (contents, props changed) head/contrib/tcpdump/print-pktap.c (contents, props changed) head/contrib/tcpdump/print-ppi.c (contents, props changed) head/contrib/tcpdump/print-ppp.c (contents, props changed) head/contrib/tcpdump/print-pppoe.c (contents, props changed) head/contrib/tcpdump/print-pptp.c (contents, props changed) head/contrib/tcpdump/print-radius.c (contents, props changed) head/contrib/tcpdump/print-raw.c (contents, props changed) head/contrib/tcpdump/print-rip.c (contents, props changed) head/contrib/tcpdump/print-ripng.c (contents, props changed) head/contrib/tcpdump/print-rpki-rtr.c (contents, props changed) head/contrib/tcpdump/print-rrcp.c (contents, props changed) head/contrib/tcpdump/print-rsvp.c (contents, props changed) head/contrib/tcpdump/print-rt6.c (contents, props changed) head/contrib/tcpdump/print-rtsp.c (contents, props changed) head/contrib/tcpdump/print-rx.c (contents, props changed) head/contrib/tcpdump/print-sctp.c (contents, props changed) head/contrib/tcpdump/print-sflow.c (contents, props changed) head/contrib/tcpdump/print-sip.c (contents, props changed) head/contrib/tcpdump/print-sl.c (contents, props changed) head/contrib/tcpdump/print-sll.c (contents, props changed) head/contrib/tcpdump/print-slow.c (contents, props changed) head/contrib/tcpdump/print-smb.c (contents, props changed) head/contrib/tcpdump/print-smtp.c (contents, props changed) head/contrib/tcpdump/print-snmp.c (contents, props changed) head/contrib/tcpdump/print-stp.c (contents, props changed) head/contrib/tcpdump/print-sunatm.c (contents, props changed) head/contrib/tcpdump/print-sunrpc.c (contents, props changed) head/contrib/tcpdump/print-symantec.c (contents, props changed) head/contrib/tcpdump/print-syslog.c (contents, props changed) head/contrib/tcpdump/print-tcp.c (contents, props changed) head/contrib/tcpdump/print-telnet.c (contents, props changed) head/contrib/tcpdump/print-tftp.c (contents, props changed) head/contrib/tcpdump/print-timed.c (contents, props changed) head/contrib/tcpdump/print-tipc.c head/contrib/tcpdump/print-token.c (contents, props changed) head/contrib/tcpdump/print-udld.c (contents, props changed) head/contrib/tcpdump/print-udp.c (contents, props changed) head/contrib/tcpdump/print-usb.c (contents, props changed) head/contrib/tcpdump/print-vjc.c (contents, props changed) head/contrib/tcpdump/print-vqp.c (contents, props changed) head/contrib/tcpdump/print-vrrp.c (contents, props changed) head/contrib/tcpdump/print-vtp.c (contents, props changed) head/contrib/tcpdump/print-vxlan.c head/contrib/tcpdump/print-wb.c (contents, props changed) head/contrib/tcpdump/print-zephyr.c (contents, props changed) head/contrib/tcpdump/print-zeromq.c head/contrib/tcpdump/rpc_auth.h (contents, props changed) head/contrib/tcpdump/rpc_msg.h (contents, props changed) head/contrib/tcpdump/rpl.h (contents, props changed) head/contrib/tcpdump/setsignal.c (contents, props changed) head/contrib/tcpdump/signature.c (contents, props changed) head/contrib/tcpdump/signature.h (contents, props changed) head/contrib/tcpdump/smb.h (contents, props changed) head/contrib/tcpdump/smbutil.c (contents, props changed) head/contrib/tcpdump/tcp.h (contents, props changed) head/contrib/tcpdump/tcpdump.1.in (contents, props changed) head/contrib/tcpdump/tcpdump.c (contents, props changed) head/contrib/tcpdump/udp.h (contents, props changed) head/contrib/tcpdump/vfprintf.c (contents, props changed) head/usr.sbin/tcpdump/tcpdump/Makefile head/usr.sbin/tcpdump/tcpdump/config.h Directory Properties: head/contrib/tcpdump/ (props changed) head/contrib/tcpdump/LICENSE (props changed) head/contrib/tcpdump/Makefile-devel-adds (props changed) head/contrib/tcpdump/ah.h (props changed) head/contrib/tcpdump/appletalk.h (props changed) head/contrib/tcpdump/atime.awk (props changed) head/contrib/tcpdump/atm.h (props changed) head/contrib/tcpdump/chdlc.h (props changed) head/contrib/tcpdump/config.guess (props changed) head/contrib/tcpdump/config.sub (props changed) head/contrib/tcpdump/getopt_long.h (props changed) head/contrib/tcpdump/gmpls.h (props changed) head/contrib/tcpdump/gmt2local.h (props changed) head/contrib/tcpdump/install-sh (props changed) head/contrib/tcpdump/lbl/os-osf4.h (props changed) head/contrib/tcpdump/llc.h (props changed) head/contrib/tcpdump/makemib (props changed) head/contrib/tcpdump/missing/getopt_long.c (props changed) head/contrib/tcpdump/mkdep (props changed) head/contrib/tcpdump/mpls.h (props changed) head/contrib/tcpdump/nlpid.h (props changed) head/contrib/tcpdump/openflow.h (props changed) head/contrib/tcpdump/ospf.h (props changed) head/contrib/tcpdump/packetdat.awk (props changed) head/contrib/tcpdump/pcap_dump_ftell.c (props changed) head/contrib/tcpdump/send-ack.awk (props changed) head/contrib/tcpdump/setsignal.h (props changed) head/contrib/tcpdump/slcompress.h (props changed) head/contrib/tcpdump/stime.awk (props changed) Modified: head/contrib/tcpdump/CHANGES ============================================================================== --- head/contrib/tcpdump/CHANGES Wed Feb 1 20:10:56 2017 (r313047) +++ head/contrib/tcpdump/CHANGES Wed Feb 1 20:26:42 2017 (r313048) @@ -1,3 +1,187 @@ +Wednesday January 18, 2017 devel.fx.lebail@orange.fr + Summary for 4.9.0 tcpdump release + General updates: + Improve separation frontend/backend (tcpdump/libnetdissect) + Don't require IPv6 library support in order to support IPv6 addresses + Introduce data types to use for integral values in packet structures + Fix display of timestamps with -tt, -ttt and -ttttt options + Fix some heap overflows found with American Fuzzy Lop by Hanno Boeck and others + (More information in the log with CVE-2016-* and CVE-2017-*) + Change the way protocols print link-layer addresses (Fix heap overflows + in CALM-FAST and GeoNetworking printers) + Pass correct caplen value to ether_print() and some other functions + Fix lookup_nsap() to match what isonsap_string() expects + Clean up relative time stamp printing (Fix an array overflow) + Fix some alignment issues with GCC on Solaris 10 SPARC + Add some ND_TTEST_/ND_TCHECK_ macros to simplify writing bounds checks + Add a fn_printztn() which returns the number of bytes processed + Add nd_init() and nd_cleanup() functions. Improve libsmi support + Add CONTRIBUTING file + Add a summary comment in all printers + Compile with more warning options in devel mode if supported (-Wcast-qual, ...) + Fix some leaks found by Valgrind/Memcheck + Fix a bunch of de-constifications + Squelch some Coverity warnings and some compiler warnings + Update Coverity and Travis-CI setup + Update Visual Studio files + + Frontend: + Fix capsicum support to work with zerocopy buffers in bpf + Try opening interfaces by name first, then by name-as-index + Work around pcap_create() failures fetching time stamp type lists + Fix a segmentation fault with 'tcpdump -J' + Improve addrtostr6() bounds checking + Add exit_tcpdump() function + Don't drop CAP_SYS_CHROOT before chrooting + Fixes issue where statistics not reported when -G and -W options used + + New printers supporting: + Generic Protocol Extension for VXLAN (VXLAN-GPE) + Home Networking Control Protocol (HNCP), RFCs 7787 and 7788 + Locator/Identifier Separation Protocol (LISP), type 3 and type 4 packets + Marvell Extended Distributed Switch Architecture header (MEDSA) + Network Service Header (NSH) + REdis Serialization Protocol (RESP) + + Updated printers: + 802.11: Beginnings of 11ac radiotap support + 802.11: Check the Protected bit for management frames + 802.11: Do bounds checking on last_presentp before dereferencing it (Fix a heap overflow) + 802.11: Fix the radiotap printer to handle the special bits correctly + 802.11: If we have the MCS field, it's 11n + 802.11: Only print unknown frame type or subtype messages once + 802.11: Radiotap dBm values get printed as dB; Update a test output accordingly + 802.11: Source and destination addresses were backwards + AH: Add a bounds check + AH: Report to our caller that dissection failed if a bounds check fails + AP1394: Print src > dst, not dst > src + ARP: Don't assume the target hardware address is <= 6 octets long (Fix a heap overflow) + ATALK: Add bounds and length checks (Fix heap overflows) + ATM: Add some bounds checks (Fix a heap overflow) + ATM: Fix an incorrect bounds check + BFD: Update specification from draft to RFC 5880 + BFD: Update to print optional authentication field + BGP: Add decoding of ADD-PATH capability + BGP: Add support for the AIGP attribute (RFC7311) + BGP: Print LARGE_COMMUNITY Path Attribute + BGP: Update BGP numbers from IANA; Print minor values for FSM notification + BOOTP: Add a bounds check + Babel: Add decoder for source-specific extension + CDP: Filter out non-printable characters + CFM: Fixes to match the IEEE standard, additional bounds and length checks + CSLIP: Add more bounds checks (Fix a heap overflow) + ClassicalIPoATM: Add a bounds check on LLC+SNAP header (Fix a heap overflow) + DHCP: Fix MUDURL and TZ options + DHCPv6: Process MUDURL and TZ options + DHCPv6: Update Status Codes with RFCs/IANA names + DNS: Represent the "DNSSEC OK" bit as "DO" instead of "OK". Add a test case + DTP: Improve packet integrity checks + EGP: Fix bounds checks + ESP: Don't use OpenSSL_add_all_algorithms() in OpenSSL 1.1.0 or later + ESP: Handle OpenSSL 1.1.x + Ethernet: Add some bounds checking before calling isoclns_print (Fix a heap overflow) + Ethernet: Print the Length/Type field as length when needed + FDDI: Fix -e output for FDDI + FR: Add some packet-length checks and improve Q.933 printing (Fix heap overflows) + GRE: Add some bounds checks (Fix heap overflows) + Geneve: Fix error message with invalid option length; Update list option classes + HNCP: Fix incorrect time interval format. Fix handling of IPv4 prefixes + ICMP6: Fetch a 32-bit big-endian quantity with EXTRACT_32BITS() + ICMP6: dagid is always an IPv6 address, not an opaque 128-bit string + IGMP: Add a length check + IP: Add a bounds check (Fix a heap overflow) + IP: Check before fetching the protocol version (Fix a heap overflow) + IP: Don't try to dissect if IP version != 4 (Fix a heap overflow) + IP: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP + IPComp: Check whether we have the CPI before we fetch it (Fix a heap overflow) + IPoFC: Fix -e output (IP-over-Fibre Channel) + IPv6: Don't overwrite the destination IPv6 address for routing headers + IPv6: Fix header printing + IPv6: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP + ISAKMP: Clean up parsing of IKEv2 Security Associations + ISOCLNS/IS-IS: Add support for Purge Originator Identifier (RFC6232) and test cases + ISOCLNS/IS-IS: Don't overwrite packet data when checking the signature + ISOCLNS/IS-IS: Filter out non-printable characters + ISOCLNS/IS-IS: Fix segmentation faults + ISOCLNS/IS-IS: Have signature_verify() do the copying and clearing + ISOCLNS: Add some bounds checks + Juniper: Make sure a Juniper header TLV isn't bigger than what's left in the packet (Fix a heap overflow) + LLC/SNAP: With -e, print the LLC header before the SNAP header; without it, cut the SNAP header + LLC: Add a bounds check (Fix a heap overflow) + LLC: Clean up printing of LLC packets + LLC: Fix the printing of RFC 948-style IP packets + LLC: Skip the LLC and SNAP headers with -x for 802.11 and some other protocols + LLDP: Implement IANA OUI and LLDP MUD option + MPLS LSP ping: Update printing for RFC 4379, bug fixes, more bounds checks + MPLS: "length" is now the *remaining* packet length + MPLS: Add bounds and length checks (Fix a heap overflow) + NFS: Add a test that makes unaligned accesses + NFS: Don't assume the ONC RPC header is nicely aligned + NFS: Don't overflow the Opaque_Handle buffer (Fix a segmentation fault) + NFS: Don't run past the end of an NFSv3 file handle + OLSR: Add a test to cover a HNA sgw case + OLSR: Fix 'Advertised networks' count + OLSR: Fix printing of smart-gateway HNAs in IPv4 + OSPF: Add a bounds check for the Hello packet options + OSPF: Do more bounds checking + OSPF: Fix a segmentation fault + OSPF: Fix printing 'ospf_topology_values' default + OTV: Add missing bounds checks + PGM: Print the formatted IP address, not the raw binary address, as a string + PIM: Add some bounds checking (Fix a heap overflow) + PIMv2: Fix checksumming of Register messages + PPI: Pass an adjusted struct pcap_pkthdr to the sub-printer + PPP: Add some bounds checks (Fix a heap overflow) + PPP: Report invalid PAP AACK/ANAK packets + Q.933: Add a missing bounds check + RADIUS: Add Value 13 "VLAN" to Tunnel-Type attribute + RADIUS: Filter out non-printable characters + RADIUS: Translate UDP/1700 as RADIUS + RESP: Do better checking of RESP packets + RPKI-RTR: Add a return value check for "fn_printn" call + RPKI-RTR: Remove printing when truncated condition already detected + RPL: Fix 'Consistency Check' control code + RPL: Fix suboption print + RSVP: An INTEGRITY object in a submessage covers only the submessage + RSVP: Fix an infinite loop; Add bounds and length checks + RSVP: Fix some if statements missing brackets + RSVP: Have signature_verify() do the copying and clearing + RTCP: Add some bounds checks + RTP: Add some bounds checks, fix two segmentation faults + SCTP: Do more bounds checking + SFLOW: Fix bounds checking + SLOW: Fix bugs, add checks + SMB: Before fetching the flags2 field, make sure we have it + SMB: Do bounds checks on NBNS resource types and resource data lengths + SNMP: Clean up the "have libsmi but no modules loaded" case + SNMP: Clean up the object abbreviation list and fix the code to match them + SNMP: Do bounds checks when printing character and octet strings + SNMP: Improve ASN.1 bounds checks + SNMP: More bounds and length checks + STP: Add a bunch of bounds checks, and fix some printing (Fix heap overflows) + STP: Filter out non-printable characters + TCP: Add bounds and length checks for packets with TCP option 20 + TCP: Correct TCP option Kind value for TCP Auth and add SCPS-TP + TCP: Fix two bounds checks (Fix heap overflows) + TCP: Make sure we have the data offset field before fetching it (Fix a heap overflow) + TCP: Put TCP-AO option decoding right + TFTP: Don't use strchr() to scan packet data (Fix a heap overflow) + Telnet: Add some bounds checks + TokenRing: Fix -e output + UDLD: Fix an infinite loop + UDP: Add a bounds check (Fix a heap overflow) + UDP: Check against the packet length first + UDP: Don't do the DDP-over-UDP heuristic check up front + VAT: Add some bounds checks + VTP: Add a test on Mgmt Domain Name length + VTP: Add bounds checks and filter out non-printable characters + VXLAN: Add a bound check and a test case + ZeroMQ: Fix an infinite loop + +Tuesday April 14, 2015 guy@alum.mit.edu + Summary for 4.8.0 tcpdump release + Fix "-x" for Apple PKTAP and PPI packets + Friday April 10, 2015 guy@alum.mit.edu Summary for 4.7.4 tcpdump release RPKI to Router Protocol: Fix Segmentation Faults and other problems @@ -464,10 +648,10 @@ Wed. November 12, 2003. mcr@sandelman. Tuesday, February 25, 2003. fenner@research.att.com. 3.7.2 release - Fixed infinite loop when parsing malformed isakmp packets. + Fixed infinite loop when parsing invalid isakmp packets. (reported by iDefense; already fixed in CVS) - Fixed infinite loop when parsing malformed BGP packets. - Fixed buffer overflow with certain malformed NFS packets. + Fixed infinite loop when parsing invalid BGP packets. + Fixed buffer overflow with certain invalid NFS packets. Pretty-print unprintable network names in 802.11 printer. Handle truncated nbp (appletalk) packets. Updated DHCPv6 printer to match draft-ietf-dhc-dhcpv6-22.txt Copied: head/contrib/tcpdump/CONTRIBUTING (from r313024, vendor/tcpdump/dist/CONTRIBUTING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/tcpdump/CONTRIBUTING Wed Feb 1 20:26:42 2017 (r313048, copy of r313024, vendor/tcpdump/dist/CONTRIBUTING) @@ -0,0 +1,103 @@ +Some Information for Contributors +--------------------------------- +You want to contribute to Tcpdump, Thanks! +Please, read these lines. + +1) Fork the Tcpdump repository on GitHub from + https://github.com/the-tcpdump-group/tcpdump + (See https://help.github.com/articles/fork-a-repo/) + +2) Setup an optional Travis-CI build + You can setup a travis build for your fork. So, you can test your changes + on Linux and OSX before sending pull requests. + (See http://docs.travis-ci.com/user/getting-started/) + +3) Clone your repository + git clone https://github.com//tcpdump.git + +4) Do a 'touch .devel' in your working directory. + Currently, the effect is + a) add (via configure, in Makefile) some warnings options ( -Wall + -Wmissing-prototypes -Wstrict-prototypes, ...) to the compiler if it + supports these options, + b) have the Makefile support "make depend" and the configure script run it. + +5) Configure and build + ./configure && make -s && make check + +6) Add/update sample.pcap files + We use tests directory to do regression tests on the dissection of captured + packets, by running tcpdump against a savefile sample.pcap, created with -w + option and comparing the results with a text file sample.out giving the + expected results. + + Any new/updated fields in a dissector must be present in a sample.pcap file + and the corresponding output file. + + Configuration is set in tests/TESTLIST. + Each line in this file has the following format: + test-name sample.pcap sample.out tcpdump-options + + the sample.out file can be build by: + (cd tests && ../tcpdump -n -r sample.pcap tcpdump-options > sample.out) + + It is often useful to have test outputs with different verbosity levels + (none, -v, -vv, -vvv, etc.) depending on the code. + +7) Test with 'make check' + Don't send a pull request if 'make check' gives failed tests. + +8) Rebase your commits against upstream/master + (To keep linearity) + +9) Initiate and send a pull request + (See https://help.github.com/articles/using-pull-requests/) + +Some remarks +------------ +a) A thorough reading of some other printers code is useful. + +b) Put the normative reference if any as comments (RFC, etc.). + +c) Put the format of packets/headers/options as comments. + +d) The printer may receive incomplete packet in the buffer, truncated at any + random position, for example by capturing with '-s size' option. + Thus use ND_TTEST, ND_TTEST2, ND_TCHECK or ND_TCHECK2 for bound checking. + For ND_TCHECK2: + Define : static const char tstr[] = " [|protocol]"; + Define a label: trunc + Print with: ND_PRINT((ndo, "%s", tstr)); + You can test the code via: + sudo ./tcpdump -s snaplen [-v][v][...] -i lo # in a terminal + sudo tcpreplay -i lo sample.pcap # in another terminal + You should try several values for snaplen to do various truncation. + +e) Do invalid packet checks in code: Think that your code can receive in input + not only a valid packet but any arbitrary random sequence of octets (packet + - built malformed originally by the sender or by a fuzz tester, + - became corrupted in transit). + Print with: ND_PRINT((ndo, "%s", istr)); /* to print " (invalid)" */ + +f) Use 'struct tok' for indexed strings and print them with + tok2str() or bittok2str() (for flags). + +g) Avoid empty lines in output of printers. + +h) A commit message must have: + First line: Capitalized short summary in the imperative (70 chars or less) + + Body: Detailed explanatory text, if necessary. Fold it to approximately + 72 characters. There must be an empty line separating the summary from + the body. + +i) Avoid non-ASCII characters in code and commit messages. + +j) Use the style of the modified sources. + +k) Don't mix declarations and code + +l) Don't use // for comments + Not all C compilers accept C++/C99 comments by default. + +m) Avoid trailing tabs/spaces Modified: head/contrib/tcpdump/CREDITS ============================================================================== --- head/contrib/tcpdump/CREDITS Wed Feb 1 20:10:56 2017 (r313047) +++ head/contrib/tcpdump/CREDITS Wed Feb 1 20:26:42 2017 (r313048) @@ -20,11 +20,13 @@ Additional people who have contributed p Andrea Bittau Andrew Brown Andrew Church + Andrew Darqui Andrew Hintz Andrew Nording Andrew Tridgell Andy Heffernan Anton Bernal + Antonin Décimo Arkadiusz Miskiewicz Armando L. Caro Jr. Arnaldo Carvalho de Melo @@ -33,6 +35,7 @@ Additional people who have contributed p Ben Byer Ben Smithurst Bert Vermeulen + Bill Parker Bjoern A. Zeeb Bram Brent L. Bates @@ -95,6 +98,7 @@ Additional people who have contributed p Jason R. Thorpe Jefferson Ogata Jeffrey Hutzelman + Jean-Raphaël Gaglione Jesper Peterson Jesse Gross Jim Hutchins @@ -119,7 +123,7 @@ Additional people who have contributed p Larry Lile Lennert Buytenhek Loganaden Velvindron - Longinus00 + Daniel Lee Loris Degioanni Love Hörnquist-Åstrand Lucas C. Villa Real @@ -134,6 +138,7 @@ Additional people who have contributed p Markus Schöpflin Marshall Rose Martin Husemann + Matthieu Boutier Max Laier Michael A. Meffie III Michael Madore Modified: head/contrib/tcpdump/INSTALL.txt ============================================================================== --- head/contrib/tcpdump/INSTALL.txt Wed Feb 1 20:10:56 2017 (r313047) +++ head/contrib/tcpdump/INSTALL.txt Wed Feb 1 20:26:42 2017 (r313048) @@ -49,9 +49,10 @@ addrtoname.c - address to hostname routi addrtoname.h - address to hostname definitions ah.h - IPSEC Authentication Header definitions appletalk.h - AppleTalk definitions +ascii_strcasecmp.c - locale-independent case-independent string comparison + routines atime.awk - TCP ack awk script atm.h - ATM traffic type definitions -atmuni31.h - ATM Q.2931 definitions bpf_dump.c - BPF program printing routines, in case libpcap doesn't have them chdlc.h - Cisco HDLC definitions @@ -100,100 +101,8 @@ pcap_dump_ftell.c - pcap_dump_ftell() im doesn't have it pcap-missing.h - declarations of functions possibly missing from libpcap ppp.h - Point to Point Protocol definitions -print-802_11.c - IEEE 802.11 printer routines -print-ap1394.c - Apple IP-over-IEEE 1394 printer routines -print-ah.c - IPSEC Authentication Header printer routines -print-aodv.c - AODV printer routines -print-arcnet.c - ARCNET printer routines -print-arp.c - Address Resolution Protocol printer routines -print-ascii.c - ASCII packet dump routines -print-atalk.c - AppleTalk printer routines -print-atm.c - ATM printer routines -print-beep.c - BEEP printer routines -print-bgp.c - Border Gateway Protocol printer routines -print-bootp.c - BOOTP and IPv4 DHCP printer routines -print-bt.c - Bluetooth printer routines -print-cdp.c - Cisco Discovery Protocol printer routines -print-chdlc.c - Cisco HDLC printer routines -print-cip.c - Classical-IP over ATM routines -print-cnfp.c - Cisco NetFlow printer routines -print-dccp.c - DCCP printer routines -print-decnet.c - DECnet printer routines -print-dhcp6.c - IPv6 DHCP printer routines -print-domain.c - Domain Name System printer routines -print-dvmrp.c - Distance Vector Multicast Routing Protocol printer routines -print-eap.c - EAP printer routines -print-enc.c - OpenBSD IPsec encapsulation BPF layer printer routines -print-egp.c - External Gateway Protocol printer routines -print-esp.c - IPSEC Encapsulating Security Payload printer routines -print-ether.c - Ethernet printer routines -print-fddi.c - Fiber Distributed Data Interface printer routines -print-fr.c - Frame Relay printer routines -print-frag6.c - IPv6 fragmentation header printer routines -print-gre.c - Generic Routing Encapsulation printer routines -print-hsrp.c - Cisco Hot Standby Router Protocol printer routines -print-icmp.c - Internet Control Message Protocol printer routines -print-icmp6.c - IPv6 Internet Control Message Protocol printer routines -print-igmp.c - Internet Group Management Protocol printer routines -print-igrp.c - Interior Gateway Routing Protocol printer routines -print-ip.c - IP printer routines -print-ip6.c - IPv6 printer routines -print-ip6opts.c - IPv6 header option printer routines -print-ipcomp.c - IP Payload Compression Protocol printer routines -print-ipx.c - IPX printer routines -print-isakmp.c - Internet Security Association and Key Management Protocol -print-isoclns.c - ISO CLNS, ESIS, and ISIS printer routines -print-krb.c - Kerberos printer routines -print-l2tp.c - Layer Two Tunneling Protocol printer routines -print-lane.c - ATM LANE printer routines -print-llc.c - IEEE 802.2 LLC printer routines -print-lspping.c - LSPPING printer routines -print-lwres.c - Lightweight Resolver protocol printer routines -print-mobile.c - IPv4 mobility printer routines -print-mobility.c - IPv6 mobility printer routines -print-mpls.c - Multi-Protocol Label Switching printer routines -print-msdp.c - Multicast Source Discovery Protocol printer routines -print-nfs.c - Network File System printer routines -print-ntp.c - Network Time Protocol printer routines -print-null.c - BSD loopback device printer routines -print-ospf.c - Open Shortest Path First printer routines -print-ospf6.c - IPv6 Open Shortest Path First printer routines -print-pflog.c - OpenBSD packet filter log file printer routines -print-pgm.c - Pragmatic General Multicast printer routines -print-pim.c - Protocol Independent Multicast printer routines -print-ppp.c - Point to Point Protocol printer routines -print-pppoe.c - PPP-over-Ethernet printer routines -print-pptp.c - Point-to-Point Tunnelling Protocol printer routines -print-radius.c - Radius protocol printer routines -print-raw.c - Raw IP printer routines -print-rip.c - Routing Information Protocol printer routines -print-ripng.c - IPv6 Routing Information Protocol printer routines -print-rrcp.c - Realtek Remote Control Protocol routines -print-rsvp.c - Resource reSerVation Protocol (RSVP) printer routines -print-rt6.c - IPv6 routing header printer routines -print-rx.c - AFS RX printer routines -print-sctp.c - Stream Control Transmission Protocol printer routines -print-sip.c - SIP printer routines -print-sl.c - Compressed Serial Line Internet Protocol printer routines -print-sll.c - Linux "cooked" capture printer routines -print-slow.c - IEEE "slow protocol" (802.3ad) printer routines -print-smb.c - SMB/CIFS printer routines -print-snmp.c - Simple Network Management Protocol printer routines -print-stp.c - IEEE 802.1d spanning tree protocol printer routines -print-sunatm.c - SunATM DLPI capture printer routines -print-sunrpc.c - Sun Remote Procedure Call printer routines -print-symantec.c - Symantec Enterprise Firewall printer routines -print-tcp.c - TCP printer routines -print-telnet.c - Telnet option printer routines -print-tftp.c - Trivial File Transfer Protocol printer routines -print-timed.c - BSD time daemon protocol printer routines -print-token.c - Token Ring printer routines -print-udp.c - UDP printer routines -print-usb.c - USB printer routines -print-vjc.c - PPP Van Jacobson compression (RFC1144) printer routines -print-vrrp.c - Virtual Router Redundancy Protocol -print-wb.c - White Board printer routines -print-zephyr.c - Zephyr printer routines +print.c - Top-level routines for protocol printing +print-*.c - The netdissect printers rpc_auth.h - definitions for ONC RPC authentication rpc_msg.h - definitions for ONC RPC messages send-ack.awk - unidirectional tcp send/ack awk script @@ -203,11 +112,11 @@ slcompress.h - SLIP/PPP Van Jacobson com smb.h - SMB/CIFS definitions smbutil.c - SMB/CIFS utility routines stime.awk - TCP send awk script -strcasecmp.c - missing routine tcp.h - TCP definitions tcpdump.1 - manual entry tcpdump.c - main program +timeval-operations.h - timeval operations macros udp.h - UDP definitions -util.c - utility routines +util-print.c - utility routines for protocol printers vfprintf.c - emulation routine win32 - headers and routines for building on Win32 systems Modified: head/contrib/tcpdump/Makefile.in ============================================================================== --- head/contrib/tcpdump/Makefile.in Wed Feb 1 20:10:56 2017 (r313047) +++ head/contrib/tcpdump/Makefile.in Wed Feb 1 20:26:42 2017 (r313048) @@ -74,7 +74,9 @@ CSRC = setsignal.c tcpdump.c LIBNETDISSECT_SRC=\ addrtoname.c \ + addrtostr.c \ af.c \ + ascii_strcasecmp.c \ checksum.c \ cpack.c \ gmpls.c \ @@ -86,6 +88,7 @@ LIBNETDISSECT_SRC=\ nlpid.c \ oui.c \ parsenfsfh.c \ + print.c \ print-802_11.c \ print-802_15_4.c \ print-ah.c \ @@ -98,6 +101,7 @@ LIBNETDISSECT_SRC=\ print-ascii.c \ print-atalk.c \ print-atm.c \ + print-babel.c \ print-beep.c \ print-bfd.c \ print-bgp.c \ @@ -112,6 +116,7 @@ LIBNETDISSECT_SRC=\ print-cnfp.c \ print-dccp.c \ print-decnet.c \ + print-dhcp6.c \ print-domain.c \ print-dtp.c \ print-dvmrp.c \ @@ -124,17 +129,21 @@ LIBNETDISSECT_SRC=\ print-fddi.c \ print-forces.c \ print-fr.c \ + print-frag6.c \ print-ftp.c \ print-geneve.c \ print-geonet.c \ print-gre.c \ + print-hncp.c \ print-hsrp.c \ print-http.c \ print-icmp.c \ + print-icmp6.c \ print-igmp.c \ print-igrp.c \ print-ip.c \ print-ip6.c \ + print-ip6opts.c \ print-ipcomp.c \ print-ipfc.c \ print-ipnet.c \ @@ -146,6 +155,7 @@ LIBNETDISSECT_SRC=\ print-l2tp.c \ print-lane.c \ print-ldp.c \ + print-lisp.c \ print-llc.c \ print-lldp.c \ print-lmp.c \ @@ -154,7 +164,9 @@ LIBNETDISSECT_SRC=\ print-lwapp.c \ print-lwres.c \ print-m3ua.c \ + print-medsa.c \ print-mobile.c \ + print-mobility.c \ print-mpcp.c \ print-mpls.c \ print-mptcp.c \ @@ -162,12 +174,14 @@ LIBNETDISSECT_SRC=\ print-msnlb.c \ print-nflog.c \ print-nfs.c \ + print-nsh.c \ print-ntp.c \ print-null.c \ print-olsr.c \ print-openflow-1.0.c \ print-openflow.c \ print-ospf.c \ + print-ospf6.c \ print-otv.c \ print-pgm.c \ print-pim.c \ @@ -178,10 +192,13 @@ LIBNETDISSECT_SRC=\ print-pptp.c \ print-radius.c \ print-raw.c \ + print-resp.c \ print-rip.c \ + print-ripng.c \ print-rpki-rtr.c \ print-rrcp.c \ print-rsvp.c \ + print-rt6.c \ print-rtsp.c \ print-rx.c \ print-sctp.c \ @@ -211,11 +228,14 @@ LIBNETDISSECT_SRC=\ print-vrrp.c \ print-vtp.c \ print-vxlan.c \ + print-vxlan-gpe.c \ print-wb.c \ print-zephyr.c \ print-zeromq.c \ + netdissect.c \ signature.c \ - util.c + strtoaddr.c \ + util-print.c LOCALSRC = @LOCALSRC@ GENSRC = version.c @@ -232,11 +252,12 @@ SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LI OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LIBNETDISSECT_OBJ) HDR = \ addrtoname.h \ + addrtostr.h \ af.h \ ah.h \ appletalk.h \ + ascii_strcasecmp.h \ atm.h \ - atmuni31.h \ chdlc.h \ cpack.h \ ether.h \ @@ -264,6 +285,7 @@ HDR = \ oui.h \ pcap-missing.h \ ppp.h \ + print.h \ rpc_auth.h \ rpc_msg.h \ rpl.h \ @@ -271,14 +293,15 @@ HDR = \ signature.h \ slcompress.h \ smb.h \ + strtoaddr.h \ tcp.h \ - tcpdump-stdinc.h \ + netdissect-stdinc.h \ + timeval-operations.h \ udp.h TAGHDR = \ /usr/include/arpa/tftp.h \ /usr/include/net/if_arp.h \ - /usr/include/net/slip.h \ /usr/include/netinet/if_ether.h \ /usr/include/netinet/in.h \ /usr/include/netinet/ip_icmp.h \ @@ -292,11 +315,14 @@ CLEANFILES = $(PROG) $(OBJ) $(GENSRC) EXTRA_DIST = \ CHANGES \ + CONTRIBUTING \ CREDITS \ INSTALL.txt \ LICENSE \ Makefile.in \ Makefile-devel-adds \ + PLATFORMS \ + README \ README.md \ Readme.Win32 \ VERSION \ @@ -314,14 +340,9 @@ EXTRA_DIST = \ lbl/os-sunos4.h \ lbl/os-ultrix4.h \ makemib \ - missing/addrinfo.h \ missing/dlnames.c \ missing/datalinks.c \ - missing/getnameinfo.c \ missing/getopt_long.c \ - missing/inet_aton.c \ - missing/inet_ntop.c \ - missing/inet_pton.c \ missing/snprintf.c \ missing/strdup.c \ missing/strlcat.c \ @@ -330,27 +351,19 @@ EXTRA_DIST = \ mkdep \ packetdat.awk \ pcap_dump_ftell.c \ - print-babel.c \ - print-dhcp6.c \ - print-frag6.c \ - print-icmp6.c \ - print-ip6opts.c \ - print-mobility.c \ - print-ospf6.c \ print-pflog.c \ - print-ripng.c \ - print-rt6.c \ print-smb.c \ send-ack.awk \ smbutil.c \ stime.awk \ - strcasecmp.c \ tcpdump.1.in \ vfprintf.c \ - win32/Include/w32_fzs.h \ win32/prj/GNUmakefile \ win32/prj/WinDump.dsp \ - win32/prj/WinDump.dsw + win32/prj/WinDump.dsw \ + win32/prj/WinDump.sln \ + win32/prj/WinDump.vcproj \ + win32/src/ether_ntohost.c TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print` @@ -362,23 +375,15 @@ $(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) @rm -f $@ - $(AR) $(ARFLAGS) $@ $(LIBNETDISSECT_OBJ) + $(AR) cr $@ $(LIBNETDISSECT_OBJ) $(RANLIB) $@ datalinks.o: $(srcdir)/missing/datalinks.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c dlnames.o: $(srcdir)/missing/dlnames.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c -getnameinfo.o: $(srcdir)/missing/getnameinfo.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c getopt_long.o: $(srcdir)/missing/getopt_long.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c -inet_pton.o: $(srcdir)/missing/inet_pton.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c -inet_ntop.o: $(srcdir)/missing/inet_ntop.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c -inet_aton.o: $(srcdir)/missing/inet_aton.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c snprintf.o: $(srcdir)/missing/snprintf.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c strdup.o: $(srcdir)/missing/strdup.c @@ -434,6 +439,9 @@ distclean: check: tcpdump (cd tests && ./TESTrun.sh) +extags: $(TAGFILES) + ctags $(TAGFILES) + tags: $(TAGFILES) ctags -wtd $(TAGFILES) Copied: head/contrib/tcpdump/PLATFORMS (from r313024, vendor/tcpdump/dist/PLATFORMS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/tcpdump/PLATFORMS Wed Feb 1 20:26:42 2017 (r313048, copy of r313024, vendor/tcpdump/dist/PLATFORMS) @@ -0,0 +1,9 @@ +== Tested platforms == +NetBSD 5.1/i386 (mcr - 2012/4/1) +Debian Linux (squeeze/i386) (mcr - 2012/4/1) + +--- +RedHat Linux 6.1/i386 (assar) +FreeBSD 2.2.8/i386 (itojun) + + Copied: head/contrib/tcpdump/README (from r313024, vendor/tcpdump/dist/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/tcpdump/README Wed Feb 1 20:26:42 2017 (r313048, copy of r313024, vendor/tcpdump/dist/README) @@ -0,0 +1 @@ +link README.md \ No newline at end of file Modified: head/contrib/tcpdump/VERSION ============================================================================== --- head/contrib/tcpdump/VERSION Wed Feb 1 20:10:56 2017 (r313047) +++ head/contrib/tcpdump/VERSION Wed Feb 1 20:26:42 2017 (r313048) @@ -1 +1 @@ -4.7.4 +4.9.0 Modified: head/contrib/tcpdump/addrtoname.c ============================================================================== --- head/contrib/tcpdump/addrtoname.c Wed Feb 1 20:10:56 2017 (r313047) +++ head/contrib/tcpdump/addrtoname.c Wed Feb 1 20:26:42 2017 (r313048) @@ -20,11 +20,8 @@ * * Internet, ethernet, port, and protocol string to address * and address to string conversion routines - * - * $FreeBSD$ */ -#define NETDISSECT_REWORKED #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -33,7 +30,8 @@ #include #include #endif /* HAVE_CASPER */ -#include + +#include #ifdef USE_ETHER_NTOHOST #ifdef HAVE_NETINET_IF_ETHER_H @@ -64,8 +62,10 @@ extern int ether_ntohost(char *, const s #include #include -#include "interface.h" +#include "netdissect.h" #include "addrtoname.h" +#include "addrtostr.h" +#include "ethertype.h" #include "llc.h" #include "setsignal.h" #include "extract.h" @@ -78,7 +78,7 @@ extern int ether_ntohost(char *, const s /* * hash tables for whatever-to-name translations * - * XXX there has to be error checks against strdup(3) failure + * ndo_error() called on strdup(3) failure */ #define HASHNAMESIZE 4096 @@ -96,7 +96,7 @@ static struct hnamemem eprototable[HASHN static struct hnamemem dnaddrtable[HASHNAMESIZE]; static struct hnamemem ipxsaptable[HASHNAMESIZE]; -#if defined(INET6) && defined(WIN32) +#ifdef _WIN32 /* * fake gethostbyaddr for Win2k/XP * gethostbyaddr() returns incorrect value when AF_INET6 is passed @@ -134,9 +134,8 @@ win32_gethostbyaddr(const char *addr, in } } #define gethostbyaddr win32_gethostbyaddr -#endif /* INET6 & WIN32 */ +#endif /* _WIN32 */ -#ifdef INET6 struct h6namemem { struct in6_addr addr; char *name; @@ -144,7 +143,6 @@ struct h6namemem { }; static struct h6namemem h6nametable[HASHNAMESIZE]; -#endif /* INET6 */ struct enamemem { u_short e_addr0; @@ -214,7 +212,7 @@ extern cap_channel_t *capdns; * * NOTE: ap is *NOT* necessarily part of the packet data (not even if * this is being called with the "ipaddr_string()" macro), so you - * *CANNOT* use the TCHECK{2}/TTEST{2} macros on it. Furthermore, + * *CANNOT* use the ND_TCHECK{2}/ND_TTEST{2} macros on it. Furthermore, * even in cases where it *is* part of the packet data, the caller * would still have to check for a null return value, even if it's * just printing the return value with "%s" - not all versions of @@ -232,7 +230,7 @@ getname(netdissect_options *ndo, const u { register struct hostent *hp; uint32_t addr; - static struct hnamemem *p; /* static for longjmp() */ + struct hnamemem *p; memcpy(&addr, ap, sizeof(addr)); p = &hnametable[addr & (HASHNAMESIZE-1)]; @@ -241,7 +239,7 @@ getname(netdissect_options *ndo, const u return (p->name); } p->addr = addr; - p->nxt = newhnamemem(); + p->nxt = newhnamemem(ndo); /* * Print names unless: @@ -263,6 +261,9 @@ getname(netdissect_options *ndo, const u char *dotp; p->name = strdup(hp->h_name); + if (p->name == NULL) + (*ndo->ndo_error)(ndo, + "getname: strdup(hp->h_name)"); if (ndo->ndo_Nflag) { /* Remove domain qualifications */ dotp = strchr(p->name, '.'); @@ -273,10 +274,11 @@ getname(netdissect_options *ndo, const u } } p->name = strdup(intoa(addr)); + if (p->name == NULL) + (*ndo->ndo_error)(ndo, "getname: strdup(intoa(addr))"); return (p->name); } -#ifdef INET6 /* * Return a name for the IP6 address pointed to by ap. This address * is assumed to be in network byte order. @@ -292,7 +294,7 @@ getname6(netdissect_options *ndo, const uint16_t d; } addra; } addr; - static struct h6namemem *p; /* static for longjmp() */ + struct h6namemem *p; register const char *cp; char ntop_buf[INET6_ADDRSTRLEN]; @@ -303,7 +305,7 @@ getname6(netdissect_options *ndo, const return (p->name); } p->addr = addr.addr; - p->nxt = newh6namemem(); + p->nxt = newh6namemem(ndo); /* * Do not print names if -n was given. @@ -315,11 +317,15 @@ getname6(netdissect_options *ndo, const sizeof(addr), AF_INET6); } else #endif - hp = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET6); + hp = gethostbyaddr((char *)&addr, sizeof(addr), + AF_INET6); if (hp) { char *dotp; p->name = strdup(hp->h_name); + if (p->name == NULL) + (*ndo->ndo_error)(ndo, + "getname6: strdup(hp->h_name)"); if (ndo->ndo_Nflag) { /* Remove domain qualifications */ dotp = strchr(p->name, '.'); @@ -329,11 +335,12 @@ getname6(netdissect_options *ndo, const return (p->name); } } - cp = inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf)); + cp = addrtostr6(ap, ntop_buf, sizeof(ntop_buf)); p->name = strdup(cp); + if (p->name == NULL) + (*ndo->ndo_error)(ndo, "getname6: strdup(cp)"); return (p->name); } -#endif /* INET6 */ static const char hex[] = "0123456789abcdef"; @@ -341,7 +348,7 @@ static const char hex[] = "0123456789abc /* Find the hash node that corresponds the ether address 'ep' */ static inline struct enamemem * -lookup_emem(const u_char *ep) +lookup_emem(netdissect_options *ndo, const u_char *ep) { register u_int i, j, k; struct enamemem *tp; @@ -363,7 +370,7 @@ lookup_emem(const u_char *ep) tp->e_addr2 = k; tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); if (tp->e_nxt == NULL) - error("lookup_emem: calloc"); + (*ndo->ndo_error)(ndo, "lookup_emem: calloc"); return tp; } @@ -374,7 +381,8 @@ lookup_emem(const u_char *ep) */ static inline struct enamemem * -lookup_bytestring(register const u_char *bs, const unsigned int nlen) +lookup_bytestring(netdissect_options *ndo, register const u_char *bs, + const unsigned int nlen) { struct enamemem *tp; register u_int i, j, k; @@ -406,12 +414,12 @@ lookup_bytestring(register const u_char tp->e_bs = (u_char *) calloc(1, nlen + 1); if (tp->e_bs == NULL) - error("lookup_bytestring: calloc"); + (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc"); memcpy(tp->e_bs, bs, nlen); tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); if (tp->e_nxt == NULL) - error("lookup_bytestring: calloc"); + (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc"); return tp; } @@ -419,14 +427,15 @@ lookup_bytestring(register const u_char /* Find the hash node that corresponds the NSAP 'nsap' */ static inline struct enamemem * -lookup_nsap(register const u_char *nsap) +lookup_nsap(netdissect_options *ndo, register const u_char *nsap, + register u_int nsap_length) { register u_int i, j, k; - unsigned int nlen = *nsap; struct enamemem *tp; - const u_char *ensap = nsap + nlen - 6; + const u_char *ensap; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 1 20:27:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57333CCCA16; Wed, 1 Feb 2017 20:27:09 +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 0CCA717C3; Wed, 1 Feb 2017 20:27:08 +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 v11KR86Y070007; Wed, 1 Feb 2017 20:27:08 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11KR8Ex070006; Wed, 1 Feb 2017 20:27:08 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702012027.v11KR8Ex070006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 1 Feb 2017 20:27:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r313049 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 20:27:09 -0000 Author: glebius Date: Wed Feb 1 20:27:07 2017 New Revision: 313049 URL: https://svnweb.freebsd.org/changeset/base/313049 Log: Remove me from sizelimit.conf Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Feb 1 20:26:42 2017 (r313048) +++ svnadmin/conf/sizelimit.conf Wed Feb 1 20:27:07 2017 (r313049) @@ -27,4 +27,3 @@ np obrien peter rwatson -glebius From owner-svn-src-all@freebsd.org Wed Feb 1 20:27:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFC6CCCCA85; Wed, 1 Feb 2017 20:27:39 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 653E21925; Wed, 1 Feb 2017 20:27:39 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11KRcXl070069; Wed, 1 Feb 2017 20:27:38 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11KRciL070067; Wed, 1 Feb 2017 20:27:38 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201702012027.v11KRciL070067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 1 Feb 2017 20:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313050 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 20:27:39 -0000 Author: kp Date: Wed Feb 1 20:27:38 2017 New Revision: 313050 URL: https://svnweb.freebsd.org/changeset/base/313050 Log: MFC 312782 bridge: Release the bridge lock when calling bridge_set_ifcap() This calls ioctl() handlers for the different interfaces in the bridge. These handlers expect to get called in an ioctl context where it's safe for them to sleep. We may not sleep with the bridge lock held. However, we still need to protect the interface list, to ensure it doesn't get changed while we iterate over it. Use BRIDGE_XLOCK(), which prevents bridge members from being removed. Adding bridge members is safe, because it uses LIST_INSERT_HEAD(). This caused panics when adding xen interfaces to a bridge. PR: 216304 Reviewed by: ae Sponsored by: RootBSD Differential Revision: https://reviews.freebsd.org/D9290 Modified: stable/11/sys/net/if_bridge.c stable/11/sys/net/if_bridgevar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_bridge.c ============================================================================== --- stable/11/sys/net/if_bridge.c Wed Feb 1 20:27:07 2017 (r313049) +++ stable/11/sys/net/if_bridge.c Wed Feb 1 20:27:38 2017 (r313050) @@ -909,14 +909,18 @@ bridge_mutecaps(struct bridge_softc *sc) mask &= bif->bif_savedcaps; } + BRIDGE_XLOCK(sc); LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { enabled = bif->bif_ifp->if_capenable; enabled &= ~BRIDGE_IFCAPS_STRIP; /* strip off mask bits and enable them again if allowed */ enabled &= ~BRIDGE_IFCAPS_MASK; enabled |= mask; + BRIDGE_UNLOCK(sc); bridge_set_ifcap(sc, bif, enabled); + BRIDGE_LOCK(sc); } + BRIDGE_XDROP(sc); } @@ -927,6 +931,8 @@ bridge_set_ifcap(struct bridge_softc *sc struct ifreq ifr; int error; + BRIDGE_UNLOCK_ASSERT(sc); + bzero(&ifr, sizeof(ifr)); ifr.ifr_reqcap = set; Modified: stable/11/sys/net/if_bridgevar.h ============================================================================== --- stable/11/sys/net/if_bridgevar.h Wed Feb 1 20:27:07 2017 (r313049) +++ stable/11/sys/net/if_bridgevar.h Wed Feb 1 20:27:38 2017 (r313050) @@ -280,6 +280,7 @@ struct ifbpstpconf { #define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) #define BRIDGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) +#define BRIDGE_UNLOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) #define BRIDGE_LOCK2REF(_sc, _err) do { \ mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ if ((_sc)->sc_iflist_xcnt > 0) \ From owner-svn-src-all@freebsd.org Wed Feb 1 20:41:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2871CCCF4E; Wed, 1 Feb 2017 20:41:10 +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 83CED652; Wed, 1 Feb 2017 20:41:10 +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 v11Kf9xK074454; Wed, 1 Feb 2017 20:41:09 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11Kf9m6074450; Wed, 1 Feb 2017 20:41:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012041.v11Kf9m6074450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 20:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313052 - in head/contrib/compiler-rt/lib: asan lsan sanitizer_common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 20:41:10 -0000 Author: dim Date: Wed Feb 1 20:41:09 2017 New Revision: 313052 URL: https://svnweb.freebsd.org/changeset/base/313052 Log: Pull in r293536 from upstream compiler-rt trunk: Recommit: Stop intercepting some malloc-related functions on FreeBSD and macOS Summary: In https://bugs.freebsd.org/215125 I was notified that some configure scripts attempt to test for the Linux-specific `mallinfo` and `mallopt` functions by compiling and linking small programs which references the functions, and observing whether that results in errors. FreeBSD and macOS do not have the `mallinfo` and `mallopt` functions, so normally these tests would fail, but when sanitizers are enabled, they incorrectly succeed, because the sanitizers define interceptors for these functions. This also applies to some other malloc-related functions, such as `memalign`, `pvalloc` and `cfree`. Fix this by not intercepting `mallinfo`, `mallopt`, `memalign`, `pvalloc` and `cfree` for FreeBSD and macOS, in all sanitizers. Also delete the non-functional `cfree` wrapper for Windows, to fix the test cases on that platform. Reviewers: emaste, kcc, rnk Subscribers: timurrrr, eugenis, hans, joerg, llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D27654 This prevents autoconf scripts from incorrectly detecting that functions like mallinfo, mallopt, memalign, pvalloc and cfree are supported. PR: 215125, 215455 MFC after: 1 week Modified: head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc head/contrib/compiler-rt/lib/asan/asan_malloc_win.cc head/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h Modified: head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc Wed Feb 1 20:28:48 2017 (r313051) +++ head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc Wed Feb 1 20:41:09 2017 (r313052) @@ -50,12 +50,14 @@ INTERCEPTOR(void, free, void *ptr) { asan_free(ptr, &stack, FROM_MALLOC); } +#if SANITIZER_INTERCEPT_CFREE INTERCEPTOR(void, cfree, void *ptr) { GET_STACK_TRACE_FREE; if (UNLIKELY(IsInDlsymAllocPool(ptr))) return; asan_free(ptr, &stack, FROM_MALLOC); } +#endif // SANITIZER_INTERCEPT_CFREE INTERCEPTOR(void*, malloc, uptr size) { if (UNLIKELY(!asan_inited)) @@ -85,22 +87,24 @@ INTERCEPTOR(void*, realloc, void *ptr, u return asan_realloc(ptr, size, &stack); } +#if SANITIZER_INTERCEPT_MEMALIGN INTERCEPTOR(void*, memalign, uptr boundary, uptr size) { GET_STACK_TRACE_MALLOC; return asan_memalign(boundary, size, &stack, FROM_MALLOC); } -INTERCEPTOR(void*, aligned_alloc, uptr boundary, uptr size) { - GET_STACK_TRACE_MALLOC; - return asan_memalign(boundary, size, &stack, FROM_MALLOC); -} - INTERCEPTOR(void*, __libc_memalign, uptr boundary, uptr size) { GET_STACK_TRACE_MALLOC; void *res = asan_memalign(boundary, size, &stack, FROM_MALLOC); DTLS_on_libc_memalign(res, size); return res; } +#endif // SANITIZER_INTERCEPT_MEMALIGN + +INTERCEPTOR(void*, aligned_alloc, uptr boundary, uptr size) { + GET_STACK_TRACE_MALLOC; + return asan_memalign(boundary, size, &stack, FROM_MALLOC); +} INTERCEPTOR(uptr, malloc_usable_size, void *ptr) { GET_CURRENT_PC_BP_SP; @@ -108,6 +112,7 @@ INTERCEPTOR(uptr, malloc_usable_size, vo return asan_malloc_usable_size(ptr, pc, bp); } +#if SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO // We avoid including malloc.h for portability reasons. // man mallinfo says the fields are "long", but the implementation uses int. // It doesn't matter much -- we just need to make sure that the libc's mallinfo @@ -125,6 +130,7 @@ INTERCEPTOR(struct fake_mallinfo, mallin INTERCEPTOR(int, mallopt, int cmd, int value) { return -1; } +#endif // SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO INTERCEPTOR(int, posix_memalign, void **memptr, uptr alignment, uptr size) { GET_STACK_TRACE_MALLOC; @@ -137,10 +143,12 @@ INTERCEPTOR(void*, valloc, uptr size) { return asan_valloc(size, &stack); } +#if SANITIZER_INTERCEPT_PVALLOC INTERCEPTOR(void*, pvalloc, uptr size) { GET_STACK_TRACE_MALLOC; return asan_pvalloc(size, &stack); } +#endif // SANITIZER_INTERCEPT_PVALLOC INTERCEPTOR(void, malloc_stats, void) { __asan_print_accumulated_stats(); Modified: head/contrib/compiler-rt/lib/asan/asan_malloc_win.cc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_malloc_win.cc Wed Feb 1 20:28:48 2017 (r313051) +++ head/contrib/compiler-rt/lib/asan/asan_malloc_win.cc Wed Feb 1 20:41:09 2017 (r313052) @@ -56,11 +56,6 @@ void _free_base(void *ptr) { } ALLOCATION_FUNCTION_ATTRIBUTE -void cfree(void *ptr) { - CHECK(!"cfree() should not be used on Windows"); -} - -ALLOCATION_FUNCTION_ATTRIBUTE void *malloc(size_t size) { GET_STACK_TRACE_MALLOC; return asan_malloc(size, &stack); Modified: head/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc ============================================================================== --- head/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc Wed Feb 1 20:28:48 2017 (r313051) +++ head/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc Wed Feb 1 20:41:09 2017 (r313052) @@ -19,6 +19,7 @@ #include "sanitizer_common/sanitizer_flags.h" #include "sanitizer_common/sanitizer_internal_defs.h" #include "sanitizer_common/sanitizer_linux.h" +#include "sanitizer_common/sanitizer_platform_interceptors.h" #include "sanitizer_common/sanitizer_platform_limits_posix.h" #include "sanitizer_common/sanitizer_tls_get_addr.h" #include "lsan.h" @@ -86,11 +87,26 @@ INTERCEPTOR(void*, realloc, void *q, upt return Reallocate(stack, q, size, 1); } +#if SANITIZER_INTERCEPT_MEMALIGN INTERCEPTOR(void*, memalign, uptr alignment, uptr size) { ENSURE_LSAN_INITED; GET_STACK_TRACE_MALLOC; return Allocate(stack, size, alignment, kAlwaysClearMemory); } +#define LSAN_MAYBE_INTERCEPT_MEMALIGN INTERCEPT_FUNCTION(memalign) + +INTERCEPTOR(void *, __libc_memalign, uptr alignment, uptr size) { + ENSURE_LSAN_INITED; + GET_STACK_TRACE_MALLOC; + void *res = Allocate(stack, size, alignment, kAlwaysClearMemory); + DTLS_on_libc_memalign(res, size); + return res; +} +#define LSAN_MAYBE_INTERCEPT___LIBC_MEMALIGN INTERCEPT_FUNCTION(__libc_memalign) +#else +#define LSAN_MAYBE_INTERCEPT_MEMALIGN +#define LSAN_MAYBE_INTERCEPT___LIBC_MEMALIGN +#endif // SANITIZER_INTERCEPT_MEMALIGN INTERCEPTOR(void*, aligned_alloc, uptr alignment, uptr size) { ENSURE_LSAN_INITED; @@ -106,14 +122,6 @@ INTERCEPTOR(int, posix_memalign, void ** return 0; } -INTERCEPTOR(void *, __libc_memalign, uptr alignment, uptr size) { - ENSURE_LSAN_INITED; - GET_STACK_TRACE_MALLOC; - void *res = Allocate(stack, size, alignment, kAlwaysClearMemory); - DTLS_on_libc_memalign(res, size); - return res; -} - INTERCEPTOR(void*, valloc, uptr size) { ENSURE_LSAN_INITED; GET_STACK_TRACE_MALLOC; @@ -127,6 +135,7 @@ INTERCEPTOR(uptr, malloc_usable_size, vo return GetMallocUsableSize(ptr); } +#if SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO struct fake_mallinfo { int x[10]; }; @@ -136,11 +145,18 @@ INTERCEPTOR(struct fake_mallinfo, mallin internal_memset(&res, 0, sizeof(res)); return res; } +#define LSAN_MAYBE_INTERCEPT_MALLINFO INTERCEPT_FUNCTION(mallinfo) INTERCEPTOR(int, mallopt, int cmd, int value) { return -1; } +#define LSAN_MAYBE_INTERCEPT_MALLOPT INTERCEPT_FUNCTION(mallopt) +#else +#define LSAN_MAYBE_INTERCEPT_MALLINFO +#define LSAN_MAYBE_INTERCEPT_MALLOPT +#endif // SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO +#if SANITIZER_INTERCEPT_PVALLOC INTERCEPTOR(void*, pvalloc, uptr size) { ENSURE_LSAN_INITED; GET_STACK_TRACE_MALLOC; @@ -152,8 +168,17 @@ INTERCEPTOR(void*, pvalloc, uptr size) { } return Allocate(stack, size, GetPageSizeCached(), kAlwaysClearMemory); } +#define LSAN_MAYBE_INTERCEPT_PVALLOC INTERCEPT_FUNCTION(pvalloc) +#else +#define LSAN_MAYBE_INTERCEPT_PVALLOC +#endif // SANITIZER_INTERCEPT_PVALLOC +#if SANITIZER_INTERCEPT_CFREE INTERCEPTOR(void, cfree, void *p) ALIAS(WRAPPER_NAME(free)); +#define LSAN_MAYBE_INTERCEPT_CFREE INTERCEPT_FUNCTION(cfree) +#else +#define LSAN_MAYBE_INTERCEPT_CFREE +#endif // SANITIZER_INTERCEPT_CFREE #define OPERATOR_NEW_BODY \ ENSURE_LSAN_INITED; \ @@ -277,17 +302,18 @@ namespace __lsan { void InitializeInterceptors() { INTERCEPT_FUNCTION(malloc); INTERCEPT_FUNCTION(free); - INTERCEPT_FUNCTION(cfree); + LSAN_MAYBE_INTERCEPT_CFREE; INTERCEPT_FUNCTION(calloc); INTERCEPT_FUNCTION(realloc); - INTERCEPT_FUNCTION(memalign); + LSAN_MAYBE_INTERCEPT_MEMALIGN; + LSAN_MAYBE_INTERCEPT___LIBC_MEMALIGN; + INTERCEPT_FUNCTION(aligned_alloc); INTERCEPT_FUNCTION(posix_memalign); - INTERCEPT_FUNCTION(__libc_memalign); INTERCEPT_FUNCTION(valloc); - INTERCEPT_FUNCTION(pvalloc); + LSAN_MAYBE_INTERCEPT_PVALLOC; INTERCEPT_FUNCTION(malloc_usable_size); - INTERCEPT_FUNCTION(mallinfo); - INTERCEPT_FUNCTION(mallopt); + LSAN_MAYBE_INTERCEPT_MALLINFO; + LSAN_MAYBE_INTERCEPT_MALLOPT; INTERCEPT_FUNCTION(pthread_create); INTERCEPT_FUNCTION(pthread_join); Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h Wed Feb 1 20:28:48 2017 (r313051) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h Wed Feb 1 20:41:09 2017 (r313052) @@ -318,4 +318,10 @@ #define SANITIZER_INTERCEPT___XSTAT64 SI_LINUX_NOT_ANDROID #define SANITIZER_INTERCEPT___LXSTAT SANITIZER_INTERCEPT___XSTAT #define SANITIZER_INTERCEPT___LXSTAT64 SI_LINUX_NOT_ANDROID + +#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO (!SI_FREEBSD && !SI_MAC) +#define SANITIZER_INTERCEPT_MEMALIGN (!SI_FREEBSD && !SI_MAC) +#define SANITIZER_INTERCEPT_PVALLOC (!SI_FREEBSD && !SI_MAC) +#define SANITIZER_INTERCEPT_CFREE (!SI_FREEBSD && !SI_MAC) + #endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H From owner-svn-src-all@freebsd.org Wed Feb 1 20:50:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2AB1CCC1D6; Wed, 1 Feb 2017 20:50:45 +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 BF3B8C39; Wed, 1 Feb 2017 20:50: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 v11KoiNV079339; Wed, 1 Feb 2017 20:50:44 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11KoinW079338; Wed, 1 Feb 2017 20:50:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702012050.v11KoinW079338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 1 Feb 2017 20:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313053 - vendor/tcpdump X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 20:50:46 -0000 Author: glebius Date: Wed Feb 1 20:50:44 2017 New Revision: 313053 URL: https://svnweb.freebsd.org/changeset/base/313053 Log: Document tcpdump update procedure used. Added: vendor/tcpdump/FreeBSD-upgrade Added: vendor/tcpdump/FreeBSD-upgrade ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tcpdump/FreeBSD-upgrade Wed Feb 1 20:50:44 2017 (r313053) @@ -0,0 +1,40 @@ +The last import of tcpdump 4.9.0 documentation. + +In vendor/tcpdump checkout: + +# tar xzvf tcpdump-4.9.0.tar.gz +# mv tcpdump-4.9.0 4.9.0 +# svn add 4.9.0/ +# svn propdel -R svn:keywords 4.9.0 +# svn commit 4.9.0 +# cd 4.9.0 +# rsync --archive --delete . ../dist/ +# cd ../dist/ +# svn rm $(svn stat | awk '$1 == "!" { print $2 }') +# svn add $(svn stat | awk '$1 == "?" { print $2 }') +# svn propdel -R svn:keywords . +# svn commit + +Get revision from the last command. + +In head checkout: +# cd contrib/tcpdump +# svn merge -c ${rev} svn+ssh://repo.freebsd.org/base/vendor/tcpdump/dist + +Resolve conflicts. + +Our exclusion list is: + +aclocal.m4 +Readme.Win32 +tests +win32 + +In head checkout: + +# cd usr.sbin/tcpdump + +Update Makefile if needed, and config.h. Compare to config.h generated by +configure. + +Run 'make worlds' to test that everything is compilable. Commit. From owner-svn-src-all@freebsd.org Wed Feb 1 21:34:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A37A4CCCDEB; Wed, 1 Feb 2017 21:34:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5944BC11; Wed, 1 Feb 2017 21:34:56 +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 v11LYt7b099822; Wed, 1 Feb 2017 21:34:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LYtmk099821; Wed, 1 Feb 2017 21:34:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012134.v11LYtmk099821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313057 - vendor/llvm/llvm-release_40-r293807 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:34:56 -0000 Author: dim Date: Wed Feb 1 21:34:55 2017 New Revision: 313057 URL: https://svnweb.freebsd.org/changeset/base/313057 Log: Tag llvm release_40 branch r293807. Added: vendor/llvm/llvm-release_40-r293807/ - copied from r313056, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Wed Feb 1 21:34:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 423A2CCCDDE; Wed, 1 Feb 2017 21:34:52 +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 ECAA7C0D; Wed, 1 Feb 2017 21:34:51 +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 v11LYpub099774; Wed, 1 Feb 2017 21:34:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LYl2C099741; Wed, 1 Feb 2017 21:34:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012134.v11LYl2C099741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313056 - in vendor/llvm/dist: cmake/modules include/llvm/CodeGen lib/CodeGen lib/CodeGen/AsmPrinter lib/CodeGen/SelectionDAG lib/MC lib/Target/Mips lib/Target/Mips/AsmParser lib/Target... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:34:52 -0000 Author: dim Date: Wed Feb 1 21:34:47 2017 New Revision: 313056 URL: https://svnweb.freebsd.org/changeset/base/313056 Log: Vendor import of llvm release_40 branch r293807: https://llvm.org/svn/llvm-project/llvm/branches/release_40@293807 Added: vendor/llvm/dist/test/CodeGen/SystemZ/pr31710.ll vendor/llvm/dist/test/DebugInfo/Mips/tls.ll vendor/llvm/dist/test/MC/MachO/ARM/no-tls-assert.ll vendor/llvm/dist/test/Transforms/IPConstantProp/naked-return.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/ vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/interleaved-accesses-extract-user.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/interleaved-accesses.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/AArch64/lit.local.cfg vendor/llvm/dist/test/Transforms/InterleavedAccess/ARM/ vendor/llvm/dist/test/Transforms/InterleavedAccess/ARM/interleaved-accesses-extract-user.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/ARM/interleaved-accesses.ll vendor/llvm/dist/test/Transforms/InterleavedAccess/ARM/lit.local.cfg Deleted: vendor/llvm/dist/test/CodeGen/AArch64/aarch64-interleaved-accesses-extract-user.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-interleaved-accesses.ll vendor/llvm/dist/test/CodeGen/ARM/arm-interleaved-accesses-extract-user.ll vendor/llvm/dist/test/CodeGen/ARM/arm-interleaved-accesses.ll vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/valid-xfail-mips4.txt vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips4-wrong-error.s Modified: vendor/llvm/dist/cmake/modules/DetermineGCCCompatible.cmake vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/InterleavedAccessPass.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFormats.td vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.h vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrFormats.td vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCSchedule.td vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE500mc.td vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE5500.td vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt vendor/llvm/dist/test/MC/Mips/micromips/valid.s vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips4-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips4.s vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips5-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips5.s vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips32.s vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips32r2.s vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips4-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips4.s vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips5.s vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips4.s vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips5-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips5.s vendor/llvm/dist/test/MC/Mips/mips32/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips32/valid.s vendor/llvm/dist/test/MC/Mips/mips32r2/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips32r2/valid.s vendor/llvm/dist/test/MC/Mips/mips32r3/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips32r3/valid.s vendor/llvm/dist/test/MC/Mips/mips32r5/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips32r5/valid.s vendor/llvm/dist/test/MC/Mips/mips4/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips4/valid.s vendor/llvm/dist/test/MC/Mips/mips5/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips5/valid.s vendor/llvm/dist/test/MC/Mips/mips64/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips64/valid.s vendor/llvm/dist/test/MC/Mips/mips64r2/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips64r2/valid.s vendor/llvm/dist/test/MC/Mips/mips64r3/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips64r3/valid.s vendor/llvm/dist/test/MC/Mips/mips64r5/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips64r5/valid.s vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-bookIII.s vendor/llvm/dist/test/Transforms/InstCombine/indexed-gep-compares.ll vendor/llvm/dist/test/Transforms/InstCombine/load.ll vendor/llvm/dist/test/tools/llvm-symbolizer/coff-exports.test Modified: vendor/llvm/dist/cmake/modules/DetermineGCCCompatible.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/DetermineGCCCompatible.cmake Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/cmake/modules/DetermineGCCCompatible.cmake Wed Feb 1 21:34:47 2017 (r313056) @@ -7,5 +7,7 @@ if(NOT DEFINED LLVM_COMPILER_IS_GCC_COMP set(LLVM_COMPILER_IS_GCC_COMPATIBLE OFF) elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON) + elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" ) + set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON) endif() endif() Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Wed Feb 1 21:34:47 2017 (r313056) @@ -480,6 +480,12 @@ public: /// Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified. virtual unsigned getISAEncoding() { return 0; } + /// Emit the directive and value for debug thread local expression + /// + /// \p Value - The value to emit. + /// \p Size - The size of the integer (in bytes) to emit. + virtual void EmitDebugValue(const MCExpr *Value, unsigned Size) const; + //===------------------------------------------------------------------===// // Dwarf Lowering Routines //===------------------------------------------------------------------===// Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h Wed Feb 1 21:34:47 2017 (r313056) @@ -305,7 +305,7 @@ private: std::vector OpcodeOffset; void UpdateChains(SDNode *NodeToMatch, SDValue InputChain, - const SmallVectorImpl &ChainNodesMatched, + SmallVectorImpl &ChainNodesMatched, bool isMorphNodeTo); }; Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -567,6 +567,15 @@ void AsmPrinter::EmitGlobalVariable(cons OutStreamer->AddBlankLine(); } +/// Emit the directive and value for debug thread local expression +/// +/// \p Value - The value to emit. +/// \p Size - The size of the integer (in bytes) to emit. +void AsmPrinter::EmitDebugValue(const MCExpr *Value, + unsigned Size) const { + OutStreamer->EmitValue(Value, Size); +} + /// EmitFunctionHeader - This method emits the header for the current /// function. void AsmPrinter::EmitFunctionHeader() { Modified: vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -484,7 +484,7 @@ void DIEInteger::print(raw_ostream &O) c /// EmitValue - Emit expression value. /// void DIEExpr::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const { - AP->OutStreamer->EmitValue(Expr, SizeOf(AP, Form)); + AP->EmitDebugValue(Expr, SizeOf(AP, Form)); } /// SizeOf - Determine size of expression value in bytes. Modified: vendor/llvm/dist/lib/CodeGen/InterleavedAccessPass.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/InterleavedAccessPass.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/CodeGen/InterleavedAccessPass.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -174,7 +174,7 @@ static bool isDeInterleaveMask(ArrayRef< /// I.e. <0, LaneLen, ... , LaneLen*(Factor - 1), 1, LaneLen + 1, ...> /// E.g. For a Factor of 2 (LaneLen=4): <0, 4, 1, 5, 2, 6, 3, 7> static bool isReInterleaveMask(ArrayRef Mask, unsigned &Factor, - unsigned MaxFactor) { + unsigned MaxFactor, unsigned OpNumElts) { unsigned NumElts = Mask.size(); if (NumElts < 4) return false; @@ -246,6 +246,9 @@ static bool isReInterleaveMask(ArrayRef< if (StartMask < 0) break; + // We must stay within the vectors; This case can happen with undefs. + if (StartMask + LaneLen > OpNumElts*2) + break; } // Found an interleaved mask of current factor. @@ -406,7 +409,8 @@ bool InterleavedAccess::lowerInterleaved // Check if the shufflevector is RE-interleave shuffle. unsigned Factor; - if (!isReInterleaveMask(SVI->getShuffleMask(), Factor, MaxFactor)) + unsigned OpNumElts = SVI->getOperand(0)->getType()->getVectorNumElements(); + if (!isReInterleaveMask(SVI->getShuffleMask(), Factor, MaxFactor, OpNumElts)) return false; DEBUG(dbgs() << "IA: Found an interleaved store: " << *SI << "\n"); Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -2248,7 +2248,7 @@ GetVBR(uint64_t Val, const unsigned char /// to use the new results. void SelectionDAGISel::UpdateChains( SDNode *NodeToMatch, SDValue InputChain, - const SmallVectorImpl &ChainNodesMatched, bool isMorphNodeTo) { + SmallVectorImpl &ChainNodesMatched, bool isMorphNodeTo) { SmallVector NowDeadNodes; // Now that all the normal results are replaced, we replace the chain and @@ -2260,6 +2260,11 @@ void SelectionDAGISel::UpdateChains( // Replace all the chain results with the final chain we ended up with. for (unsigned i = 0, e = ChainNodesMatched.size(); i != e; ++i) { SDNode *ChainNode = ChainNodesMatched[i]; + // If ChainNode is null, it's because we replaced it on a previous + // iteration and we cleared it out of the map. Just skip it. + if (!ChainNode) + continue; + assert(ChainNode->getOpcode() != ISD::DELETED_NODE && "Deleted node left in chain"); @@ -2272,6 +2277,11 @@ void SelectionDAGISel::UpdateChains( if (ChainVal.getValueType() == MVT::Glue) ChainVal = ChainVal.getValue(ChainVal->getNumValues()-2); assert(ChainVal.getValueType() == MVT::Other && "Not a chain?"); + SelectionDAG::DAGNodeDeletedListener NDL( + *CurDAG, [&](SDNode *N, SDNode *E) { + std::replace(ChainNodesMatched.begin(), ChainNodesMatched.end(), N, + static_cast(nullptr)); + }); CurDAG->ReplaceAllUsesOfValueWith(ChainVal, InputChain); // If the node became dead and we haven't already seen it, delete it. Modified: vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp ============================================================================== --- vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -142,7 +142,8 @@ static bool canGoAfterDWARF(const MCSect if (SegName == "__TEXT" && SecName == "__eh_frame") return true; - if (SegName == "__DATA" && SecName == "__nl_symbol_ptr") + if (SegName == "__DATA" && (SecName == "__nl_symbol_ptr" || + SecName == "__thread_ptr")) return true; return false; Modified: vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -413,6 +413,7 @@ public: Match_RequiresDifferentOperands, Match_RequiresNoZeroRegister, Match_RequiresSameSrcAndDst, + Match_NoFCCRegisterForCurrentISA, Match_NonZeroOperandForSync, #define GET_OPERAND_DIAGNOSTIC_TYPES #include "MipsGenAsmMatcher.inc" @@ -1461,8 +1462,6 @@ public: bool isFCCAsmReg() const { if (!(isRegIdx() && RegIdx.Kind & RegKind_FCC)) return false; - if (!AsmParser.hasEightFccRegisters()) - return RegIdx.Index == 0; return RegIdx.Index <= 7; } bool isACCAsmReg() const { @@ -4053,6 +4052,7 @@ MipsAsmParser::checkEarlyTargetMatchPred return Match_RequiresSameSrcAndDst; } } + unsigned MipsAsmParser::checkTargetMatchPredicate(MCInst &Inst) { switch (Inst.getOpcode()) { // As described by the MIPSR6 spec, daui must not use the zero operand for @@ -4131,9 +4131,15 @@ unsigned MipsAsmParser::checkTargetMatch if (Inst.getOperand(0).getReg() == Inst.getOperand(1).getReg()) return Match_RequiresDifferentOperands; return Match_Success; - default: - return Match_Success; } + + uint64_t TSFlags = getInstDesc(Inst.getOpcode()).TSFlags; + if ((TSFlags & MipsII::HasFCCRegOperand) && + (Inst.getOperand(0).getReg() != Mips::FCC0) && !hasEightFccRegisters()) + return Match_NoFCCRegisterForCurrentISA; + + return Match_Success; + } static SMLoc RefineErrorLoc(const SMLoc Loc, const OperandVector &Operands, @@ -4191,6 +4197,9 @@ bool MipsAsmParser::MatchAndEmitInstruct return Error(IDLoc, "invalid operand ($zero) for instruction"); case Match_RequiresSameSrcAndDst: return Error(IDLoc, "source and destination must match"); + case Match_NoFCCRegisterForCurrentISA: + return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), + "non-zero fcc register doesn't exist in current ISA level"); case Match_Immz: return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo), "expected '0'"); case Match_UImm1_0: Modified: vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h Wed Feb 1 21:34:47 2017 (r313056) @@ -123,7 +123,9 @@ namespace MipsII { HasForbiddenSlot = 1 << 5, /// IsPCRelativeLoad - A Load instruction with implicit source register /// ($pc) with explicit offset and destination register - IsPCRelativeLoad = 1 << 6 + IsPCRelativeLoad = 1 << 6, + /// HasFCCRegOperand - Instruction uses an $fcc register. + HasFCCRegOperand = 1 << 7 }; } Modified: vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFPU.td ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFPU.td Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFPU.td Wed Feb 1 21:34:47 2017 (r313056) @@ -27,9 +27,20 @@ def SUXC1_MM : MMRel, SWXC1_FT<"suxc1", SWXC1_FM_MM<0x188>, INSN_MIPS5_32R2_NOT_32R6_64R6; def FCMP_S32_MM : MMRel, CEQS_FT<"s", FGR32, II_C_CC_S, MipsFPCmp>, - CEQS_FM_MM<0>; + CEQS_FM_MM<0> { + // FIXME: This is a required to work around the fact that these instructions + // only use $fcc0. Ideally, MipsFPCmp nodes could be removed and the + // fcc register set is used directly. + bits<3> fcc = 0; +} + def FCMP_D32_MM : MMRel, CEQS_FT<"d", AFGR64, II_C_CC_D, MipsFPCmp>, - CEQS_FM_MM<1>; + CEQS_FM_MM<1> { + // FIXME: This is a required to work around the fact that these instructions + // only use $fcc0. Ideally, MipsFPCmp nodes could be removed and the + // fcc register set is used directly. + bits<3> fcc = 0; +} def BC1F_MM : MMRel, BC1F_FT<"bc1f", brtarget_mm, II_BC1F, MIPS_BRANCH_F>, BC1F_FM_MM<0x1c>, ISA_MIPS1_NOT_32R6_64R6; @@ -164,6 +175,98 @@ let AdditionalPredicates = [InMicroMips] def SWC1_MM : MMRel, SW_FT<"swc1", FGR32Opnd, mem_mm_16, II_SWC1, store>, LW_FM_MM<0x26>; } + + multiclass C_COND_MM fmt, + InstrItinClass itin> { + def C_F_#NAME#_MM : MMRel, C_COND_FT<"f", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.f."#NAME; + let isCommutable = 1; + } + def C_UN_#NAME#_MM : MMRel, C_COND_FT<"un", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.un."#NAME; + let isCommutable = 1; + } + def C_EQ_#NAME#_MM : MMRel, C_COND_FT<"eq", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.eq."#NAME; + let isCommutable = 1; + } + def C_UEQ_#NAME#_MM : MMRel, C_COND_FT<"ueq", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.ueq."#NAME; + let isCommutable = 1; + } + def C_OLT_#NAME#_MM : MMRel, C_COND_FT<"olt", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.olt."#NAME; + } + def C_ULT_#NAME#_MM : MMRel, C_COND_FT<"ult", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.ult."#NAME; + } + def C_OLE_#NAME#_MM : MMRel, C_COND_FT<"ole", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.ole."#NAME; + } + def C_ULE_#NAME#_MM : MMRel, C_COND_FT<"ule", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.ule."#NAME; + } + def C_SF_#NAME#_MM : MMRel, C_COND_FT<"sf", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.sf."#NAME; + let isCommutable = 1; + } + def C_NGLE_#NAME#_MM : MMRel, C_COND_FT<"ngle", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.ngle."#NAME; + } + def C_SEQ_#NAME#_MM : MMRel, C_COND_FT<"seq", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.seq."#NAME; + let isCommutable = 1; + } + def C_NGL_#NAME#_MM : MMRel, C_COND_FT<"ngl", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.ngl."#NAME; + } + def C_LT_#NAME#_MM : MMRel, C_COND_FT<"lt", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.lt."#NAME; + } + def C_NGE_#NAME#_MM : MMRel, C_COND_FT<"nge", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.nge."#NAME; + } + def C_LE_#NAME#_MM : MMRel, C_COND_FT<"le", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.le."#NAME; + } + def C_NGT_#NAME#_MM : MMRel, C_COND_FT<"ngt", TypeStr, RC, itin>, + C_COND_FM_MM { + let BaseOpcode = "c.ngt."#NAME; + } + } + + defm S : C_COND_MM<"s", FGR32Opnd, 0b00, II_C_CC_S>, + ISA_MIPS1_NOT_32R6_64R6; + defm D32 : C_COND_MM<"d", AFGR64Opnd, 0b01, II_C_CC_D>, + ISA_MIPS1_NOT_32R6_64R6, FGR_32; + let DecoderNamespace = "Mips64" in + defm D64 : C_COND_MM<"d", FGR64Opnd, 0b01, II_C_CC_D>, + ISA_MIPS1_NOT_32R6_64R6, FGR_64; + + defm S_MM : C_COND_ALIASES<"s", FGR32Opnd>, HARDFLOAT, + ISA_MIPS1_NOT_32R6_64R6; + defm D32_MM : C_COND_ALIASES<"d", AFGR64Opnd>, HARDFLOAT, + ISA_MIPS1_NOT_32R6_64R6, FGR_32; + defm D64_MM : C_COND_ALIASES<"d", FGR64Opnd>, HARDFLOAT, + ISA_MIPS1_NOT_32R6_64R6, FGR_64; + + defm : BC1_ALIASES, + ISA_MIPS1_NOT_32R6_64R6, HARDFLOAT; } //===----------------------------------------------------------------------===// Modified: vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFormats.td ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFormats.td Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFormats.td Wed Feb 1 21:34:47 2017 (r313056) @@ -766,6 +766,7 @@ class SWXC1_FM_MM funct> : MMArc class CEQS_FM_MM fmt> : MMArch { bits<5> fs; bits<5> ft; + bits<3> fcc; bits<4> cond; bits<32> Inst; @@ -773,13 +774,17 @@ class CEQS_FM_MM fmt> : MMArch { let Inst{31-26} = 0x15; let Inst{25-21} = ft; let Inst{20-16} = fs; - let Inst{15-13} = 0x0; // cc + let Inst{15-13} = fcc; let Inst{12} = 0; let Inst{11-10} = fmt; let Inst{9-6} = cond; let Inst{5-0} = 0x3c; } +class C_COND_FM_MM fmt, bits<4> c> : CEQS_FM_MM { + let cond = c; +} + class BC1F_FM_MM tf> : MMArch { bits<16> offset; Modified: vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -1037,6 +1037,22 @@ void MipsAsmPrinter::PrintDebugValueComm // TODO: implement } +// Emit .dtprelword or .dtpreldword directive +// and value for debug thread local expression. +void MipsAsmPrinter::EmitDebugValue(const MCExpr *Value, + unsigned Size) const { + switch (Size) { + case 4: + OutStreamer->EmitDTPRel32Value(Value); + break; + case 8: + OutStreamer->EmitDTPRel64Value(Value); + break; + default: + llvm_unreachable("Unexpected size of expression value."); + } +} + // Align all targets of indirect branches on bundle size. Used only if target // is NaCl. void MipsAsmPrinter::NaClAlignIndirectJumpTargets(MachineFunction &MF) { Modified: vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.h ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.h Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.h Wed Feb 1 21:34:47 2017 (r313056) @@ -140,6 +140,7 @@ public: void EmitStartOfAsmFile(Module &M) override; void EmitEndOfAsmFile(Module &M) override; void PrintDebugValueComment(const MachineInstr *MI, raw_ostream &OS); + void EmitDebugValue(const MCExpr *Value, unsigned Size) const override; }; } Modified: vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -698,8 +698,8 @@ bool MipsFastISel::emitCmp(unsigned Resu unsigned RegWithOne = createResultReg(&Mips::GPR32RegClass); emitInst(Mips::ADDiu, RegWithZero).addReg(Mips::ZERO).addImm(0); emitInst(Mips::ADDiu, RegWithOne).addReg(Mips::ZERO).addImm(1); - emitInst(Opc).addReg(LeftReg).addReg(RightReg).addReg( - Mips::FCC0, RegState::ImplicitDefine); + emitInst(Opc).addReg(Mips::FCC0, RegState::Define).addReg(LeftReg) + .addReg(RightReg); emitInst(CondMovOpc, ResultReg) .addReg(RegWithOne) .addReg(Mips::FCC0) Modified: vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td Wed Feb 1 21:34:47 2017 (r313056) @@ -219,6 +219,7 @@ class BC1F_FT, HARDFLOAT { let Defs = [FCC0]; let isCodeGenOnly = 1; + let hasFCCRegOperand = 1; } + +// Note: MIPS-IV introduced $fcc1-$fcc7 and renamed FCSR31[23] $fcc0. Rather +// duplicating the instruction definition for MIPS1 - MIPS3, we expand +// c.cond.ft if necessary, and reject it after constructing the +// instruction if the ISA doesn't support it. class C_COND_FT : - InstSE<(outs), (ins RC:$fs, RC:$ft), - !strconcat("c.", CondStr, ".", Typestr, "\t$fs, $ft"), [], itin, - FrmFR>, HARDFLOAT; + InstSE<(outs FCCRegsOpnd:$fcc), (ins RC:$fs, RC:$ft), + !strconcat("c.", CondStr, ".", Typestr, "\t$fcc, $fs, $ft"), [], itin, + FrmFR>, HARDFLOAT { + let isCompare = 1; + let hasFCCRegOperand = 1; +} + multiclass C_COND_M fmt, InstrItinClass itin> { - def C_F_#NAME : C_COND_FT<"f", TypeStr, RC, itin>, C_COND_FM; - def C_UN_#NAME : C_COND_FT<"un", TypeStr, RC, itin>, C_COND_FM; - def C_EQ_#NAME : C_COND_FT<"eq", TypeStr, RC, itin>, C_COND_FM; - def C_UEQ_#NAME : C_COND_FT<"ueq", TypeStr, RC, itin>, C_COND_FM; - def C_OLT_#NAME : C_COND_FT<"olt", TypeStr, RC, itin>, C_COND_FM; - def C_ULT_#NAME : C_COND_FT<"ult", TypeStr, RC, itin>, C_COND_FM; - def C_OLE_#NAME : C_COND_FT<"ole", TypeStr, RC, itin>, C_COND_FM; - def C_ULE_#NAME : C_COND_FT<"ule", TypeStr, RC, itin>, C_COND_FM; - def C_SF_#NAME : C_COND_FT<"sf", TypeStr, RC, itin>, C_COND_FM; - def C_NGLE_#NAME : C_COND_FT<"ngle", TypeStr, RC, itin>, C_COND_FM; - def C_SEQ_#NAME : C_COND_FT<"seq", TypeStr, RC, itin>, C_COND_FM; - def C_NGL_#NAME : C_COND_FT<"ngl", TypeStr, RC, itin>, C_COND_FM; - def C_LT_#NAME : C_COND_FT<"lt", TypeStr, RC, itin>, C_COND_FM; - def C_NGE_#NAME : C_COND_FT<"nge", TypeStr, RC, itin>, C_COND_FM; - def C_LE_#NAME : C_COND_FT<"le", TypeStr, RC, itin>, C_COND_FM; - def C_NGT_#NAME : C_COND_FT<"ngt", TypeStr, RC, itin>, C_COND_FM; + def C_F_#NAME : MMRel, C_COND_FT<"f", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.f."#NAME; + let isCommutable = 1; + } + def C_UN_#NAME : MMRel, C_COND_FT<"un", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.un."#NAME; + let isCommutable = 1; + } + def C_EQ_#NAME : MMRel, C_COND_FT<"eq", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.eq."#NAME; + let isCommutable = 1; + } + def C_UEQ_#NAME : MMRel, C_COND_FT<"ueq", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.ueq."#NAME; + let isCommutable = 1; + } + def C_OLT_#NAME : MMRel, C_COND_FT<"olt", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.olt."#NAME; + } + def C_ULT_#NAME : MMRel, C_COND_FT<"ult", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.ult."#NAME; + } + def C_OLE_#NAME : MMRel, C_COND_FT<"ole", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.ole."#NAME; + } + def C_ULE_#NAME : MMRel, C_COND_FT<"ule", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.ule."#NAME; + } + def C_SF_#NAME : MMRel, C_COND_FT<"sf", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.sf."#NAME; + let isCommutable = 1; + } + def C_NGLE_#NAME : MMRel, C_COND_FT<"ngle", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.ngle."#NAME; + } + def C_SEQ_#NAME : MMRel, C_COND_FT<"seq", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.seq."#NAME; + let isCommutable = 1; + } + def C_NGL_#NAME : MMRel, C_COND_FT<"ngl", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.ngl."#NAME; + } + def C_LT_#NAME : MMRel, C_COND_FT<"lt", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.lt."#NAME; + } + def C_NGE_#NAME : MMRel, C_COND_FT<"nge", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.nge."#NAME; + } + def C_LE_#NAME : MMRel, C_COND_FT<"le", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.le."#NAME; + } + def C_NGT_#NAME : MMRel, C_COND_FT<"ngt", TypeStr, RC, itin>, + C_COND_FM { + let BaseOpcode = "c.ngt."#NAME; + } } +let AdditionalPredicates = [NotInMicroMips] in { defm S : C_COND_M<"s", FGR32Opnd, 16, II_C_CC_S>, ISA_MIPS1_NOT_32R6_64R6; defm D32 : C_COND_M<"d", AFGR64Opnd, 17, II_C_CC_D>, ISA_MIPS1_NOT_32R6_64R6, FGR_32; let DecoderNamespace = "Mips64" in defm D64 : C_COND_M<"d", FGR64Opnd, 17, II_C_CC_D>, ISA_MIPS1_NOT_32R6_64R6, FGR_64; - +} //===----------------------------------------------------------------------===// // Floating Point Instructions //===----------------------------------------------------------------------===// @@ -549,13 +615,29 @@ def BC1TL : MMRel, BC1F_FT<"bc1tl", brta /// Floating Point Compare let AdditionalPredicates = [NotInMicroMips] in { def FCMP_S32 : MMRel, CEQS_FT<"s", FGR32, II_C_CC_S, MipsFPCmp>, CEQS_FM<16>, - ISA_MIPS1_NOT_32R6_64R6; + ISA_MIPS1_NOT_32R6_64R6 { + + // FIXME: This is a required to work around the fact that these instructions + // only use $fcc0. Ideally, MipsFPCmp nodes could be removed and the + // fcc register set is used directly. + bits<3> fcc = 0; + } def FCMP_D32 : MMRel, CEQS_FT<"d", AFGR64, II_C_CC_D, MipsFPCmp>, CEQS_FM<17>, - ISA_MIPS1_NOT_32R6_64R6, FGR_32; + ISA_MIPS1_NOT_32R6_64R6, FGR_32 { + // FIXME: This is a required to work around the fact that these instructions + // only use $fcc0. Ideally, MipsFPCmp nodes could be removed and the + // fcc register set is used directly. + bits<3> fcc = 0; + } } let DecoderNamespace = "Mips64" in def FCMP_D64 : CEQS_FT<"d", FGR64, II_C_CC_D, MipsFPCmp>, CEQS_FM<17>, - ISA_MIPS1_NOT_32R6_64R6, FGR_64; + ISA_MIPS1_NOT_32R6_64R6, FGR_64 { + // FIXME: This is a required to work around the fact that thiese instructions + // only use $fcc0. Ideally, MipsFPCmp nodes could be removed and the + // fcc register set is used directly. + bits<3> fcc = 0; +} //===----------------------------------------------------------------------===// // Floating Point Pseudo-Instructions @@ -602,15 +684,6 @@ def PseudoTRUNC_W_D : MipsAsmPseudoInst< //===----------------------------------------------------------------------===// // InstAliases. //===----------------------------------------------------------------------===// -def : MipsInstAlias<"bc1t $offset", (BC1T FCC0, brtarget:$offset)>, - ISA_MIPS1_NOT_32R6_64R6, HARDFLOAT; -def : MipsInstAlias<"bc1tl $offset", (BC1TL FCC0, brtarget:$offset)>, - ISA_MIPS2_NOT_32R6_64R6, HARDFLOAT; -def : MipsInstAlias<"bc1f $offset", (BC1F FCC0, brtarget:$offset)>, - ISA_MIPS1_NOT_32R6_64R6, HARDFLOAT; -def : MipsInstAlias<"bc1fl $offset", (BC1FL FCC0, brtarget:$offset)>, - ISA_MIPS2_NOT_32R6_64R6, HARDFLOAT; - def : MipsInstAlias <"s.s $fd, $addr", (SWC1 FGR32Opnd:$fd, mem_simm16:$addr), 0>, ISA_MIPS2, HARDFLOAT; @@ -630,6 +703,80 @@ def : MipsInstAlias def : MipsInstAlias <"l.d $fd, $addr", (LDC164 FGR64Opnd:$fd, mem_simm16:$addr), 0>, FGR_64, ISA_MIPS2, HARDFLOAT; + +multiclass C_COND_ALIASES { + def : MipsInstAlias("C_F_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_UN_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_EQ_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_UEQ_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_OLT_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_ULT_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_OLE_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_ULE_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_SF_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_NGLE_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_SEQ_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_NGL_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_LT_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_NGE_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_LE_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; + def : MipsInstAlias("C_NGT_"#NAME) FCC0, + RC:$fs, RC:$ft), 1>; +} + +multiclass BC1_ALIASES { + def : MipsInstAlias; + + def : MipsInstAlias; +} + +let AdditionalPredicates = [NotInMicroMips] in { + defm S : C_COND_ALIASES<"s", FGR32Opnd>, HARDFLOAT, + ISA_MIPS1_NOT_32R6_64R6; + defm D32 : C_COND_ALIASES<"d", AFGR64Opnd>, HARDFLOAT, + ISA_MIPS1_NOT_32R6_64R6, FGR_32; + defm D64 : C_COND_ALIASES<"d", FGR64Opnd>, HARDFLOAT, + ISA_MIPS1_NOT_32R6_64R6, FGR_64; + + defm : BC1_ALIASES, ISA_MIPS1_NOT_32R6_64R6, + HARDFLOAT; + defm : BC1_ALIASES, ISA_MIPS2_NOT_32R6_64R6, + HARDFLOAT; +} //===----------------------------------------------------------------------===// // Floating Point Patterns //===----------------------------------------------------------------------===// Modified: vendor/llvm/dist/lib/Target/Mips/MipsInstrFormats.td ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MipsInstrFormats.td Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MipsInstrFormats.td Wed Feb 1 21:34:47 2017 (r313056) @@ -101,12 +101,15 @@ class MipsInst register and is + // present in MIPS-I to MIPS-III. - // TSFlags layout should be kept in sync with MipsInstrInfo.h. + // TSFlags layout should be kept in sync with MCTargetDesc/MipsBaseInfo.h. let TSFlags{3-0} = FormBits; let TSFlags{4} = isCTI; let TSFlags{5} = hasForbiddenSlot; let TSFlags{6} = IsPCRelativeLoad; + let TSFlags{7} = hasFCCRegOperand; let DecoderNamespace = "Mips"; @@ -829,6 +832,7 @@ class BC1F_FM : StdArch class CEQS_FM fmt> : StdArch { bits<5> fs; bits<5> ft; + bits<3> fcc; bits<4> cond; bits<32> Inst; @@ -837,7 +841,7 @@ class CEQS_FM fmt> : StdArch { let Inst{25-21} = fmt; let Inst{20-16} = ft; let Inst{15-11} = fs; - let Inst{10-8} = 0; // cc + let Inst{10-8} = fcc; let Inst{7-4} = 0x3; let Inst{3-0} = cond; } Modified: vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -148,3 +148,11 @@ MCSection *MipsTargetObjectFile::getSect // Otherwise, we work the same as ELF. return TargetLoweringObjectFileELF::getSectionForConstant(DL, Kind, C, Align); } + +const MCExpr * +MipsTargetObjectFile::getDebugThreadLocalSymbol(const MCSymbol *Sym) const { + const MCExpr *Expr = + MCSymbolRefExpr::create(Sym, MCSymbolRefExpr::VK_None, getContext()); + return MCBinaryExpr::createAdd( + Expr, MCConstantExpr::create(0x8000, getContext()), getContext()); +} Modified: vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.h ============================================================================== --- vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.h Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.h Wed Feb 1 21:34:47 2017 (r313056) @@ -42,6 +42,8 @@ class MipsTargetMachine; MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, unsigned &Align) const override; + /// Describe a TLS variable address within debug info. + const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override; }; } // end namespace llvm Modified: vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td ============================================================================== --- vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td Wed Feb 1 21:34:47 2017 (r313056) @@ -1508,8 +1508,14 @@ def DCBTST : DCB_Form_hint<246, (outs), PPC970_DGroup_Single; } // hasSideEffects = 0 +def ICBLC : XForm_icbt<31, 230, (outs), (ins u4imm:$CT, memrr:$src), + "icblc $CT, $src", IIC_LdStStore>, Requires<[HasICBT]>; +def ICBLQ : XForm_icbt<31, 198, (outs), (ins u4imm:$CT, memrr:$src), + "icblq. $CT, $src", IIC_LdStLoad>, Requires<[HasICBT]>; def ICBT : XForm_icbt<31, 22, (outs), (ins u4imm:$CT, memrr:$src), "icbt $CT, $src", IIC_LdStLoad>, Requires<[HasICBT]>; +def ICBTLS : XForm_icbt<31, 486, (outs), (ins u4imm:$CT, memrr:$src), + "icbtls $CT, $src", IIC_LdStLoad>, Requires<[HasICBT]>; def : Pat<(int_ppc_dcbt xoaddr:$dst), (DCBT 0, xoaddr:$dst)>; @@ -2381,6 +2387,13 @@ def MTSPR : XFXForm_1<31, 467, (outs), ( def MFTB : XFXForm_1<31, 371, (outs gprc:$RT), (ins i32imm:$SPR), "mftb $RT, $SPR", IIC_SprMFTB>; +def MFPMR : XFXForm_1<31, 334, (outs gprc:$RT), (ins i32imm:$SPR), + "mfpmr $RT, $SPR", IIC_SprMFPMR>; + +def MTPMR : XFXForm_1<31, 462, (outs), (ins i32imm:$SPR, gprc:$RT), + "mtpmr $SPR, $RT", IIC_SprMTPMR>; + + // A pseudo-instruction used to implement the read of the 64-bit cycle counter // on a 32-bit target. let hasSideEffects = 1, usesCustomInserter = 1 in Modified: vendor/llvm/dist/lib/Target/PowerPC/PPCSchedule.td ============================================================================== --- vendor/llvm/dist/lib/Target/PowerPC/PPCSchedule.td Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/PowerPC/PPCSchedule.td Wed Feb 1 21:34:47 2017 (r313056) @@ -118,6 +118,8 @@ def IIC_SprTLBIE : InstrItinClass; def IIC_SprABORT : InstrItinClass; def IIC_SprMSGSYNC : InstrItinClass; def IIC_SprSTOP : InstrItinClass; +def IIC_SprMFPMR : InstrItinClass; +def IIC_SprMTPMR : InstrItinClass; //===----------------------------------------------------------------------===// // Processor instruction itineraries. Modified: vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE500mc.td ============================================================================== --- vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE500mc.td Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE500mc.td Wed Feb 1 21:34:47 2017 (r313056) @@ -249,6 +249,10 @@ def PPCE500mcItineraries : ProcessorItin InstrStage<5, [E500_SFX0]>], [8, 1], [E500_GPR_Bypass, E500_CR_Bypass]>, + InstrItinData, + InstrStage<4, [E500_SFX0]>], + [7, 1], // Latency = 4, Repeat rate = 4 + [E500_GPR_Bypass, E500_GPR_Bypass]>, InstrItinData, InstrStage<4, [E500_SFX0]>], [7, 1], // Latency = 4, Repeat rate = 4 @@ -257,6 +261,10 @@ def PPCE500mcItineraries : ProcessorItin InstrStage<1, [E500_SFX0, E500_SFX1]>], [4, 1], // Latency = 1, Repeat rate = 1 [E500_GPR_Bypass, E500_CR_Bypass]>, + InstrItinData, + InstrStage<1, [E500_SFX0]>], + [4, 1], // Latency = 1, Repeat rate = 1 + [E500_CR_Bypass, E500_GPR_Bypass]>, InstrItinData, InstrStage<4, [E500_SFX0]>], [7, 1], // Latency = 4, Repeat rate = 4 Modified: vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE5500.td ============================================================================== --- vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE5500.td Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleE5500.td Wed Feb 1 21:34:47 2017 (r313056) @@ -313,20 +313,24 @@ def PPCE5500Itineraries : ProcessorItine InstrStage<5, [E5500_CFX_0]>], [9, 2], // Latency = 5, Repeat rate = 5 [E5500_GPR_Bypass, E5500_CR_Bypass]>, - InstrItinData, - InstrStage<4, [E5500_SFX0]>], + InstrItinData, + InstrStage<4, [E5500_CFX_0]>], [8, 2], // Latency = 4, Repeat rate = 4 [E5500_GPR_Bypass, E5500_GPR_Bypass]>, InstrItinData, InstrStage<1, [E5500_CFX_0]>], [5], // Latency = 1, Repeat rate = 1 [E5500_GPR_Bypass]>, + InstrItinData, + InstrStage<1, [E5500_CFX_0]>], + [5], // Latency = 1, Repeat rate = 1 + [E5500_GPR_Bypass]>, InstrItinData, InstrStage<4, [E5500_CFX_0]>], [8, 2], // Latency = 4, Repeat rate = 4 [NoBypass, E5500_GPR_Bypass]>, InstrItinData, - InstrStage<1, [E5500_SFX0, E5500_SFX1]>], + InstrStage<1, [E5500_CFX_0]>], [5], // Latency = 1, Repeat rate = 1 [E5500_GPR_Bypass]>, InstrItinData, Modified: vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -884,6 +884,10 @@ static Instruction *transformToIndexedCo if (!GEPLHS->hasAllConstantIndices()) return nullptr; + // Make sure the pointers have the same type. + if (GEPLHS->getType() != RHS->getType()) + return nullptr; + Value *PtrBase, *Index; std::tie(PtrBase, Index) = getAsConstantIndexedAddress(GEPLHS, DL); Modified: vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -502,7 +502,8 @@ static Instruction *combineLoadToOperati !DL.isNonIntegralPointerType(Ty)) { if (all_of(LI.users(), [&LI](User *U) { auto *SI = dyn_cast(U); - return SI && SI->getPointerOperand() != &LI; + return SI && SI->getPointerOperand() != &LI && + !SI->getPointerOperand()->isSwiftError(); })) { LoadInst *NewLoad = combineLoadToNewType( IC, LI, Modified: vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp Wed Feb 1 21:34:47 2017 (r313056) @@ -1705,7 +1705,10 @@ static bool runIPSCCP(Module &M, const D // If this is an exact definition of this function, then we can propagate // information about its result into callsites of it. - if (F.hasExactDefinition()) + // Don't touch naked functions. They may contain asm returning a + // value we don't see, so we may end up interprocedurally propagating + // the return value incorrectly. + if (F.hasExactDefinition() && !F.hasFnAttribute(Attribute::Naked)) Solver.AddTrackedFunction(&F); // If this function only has direct calls that we can see, we can track its Added: vendor/llvm/dist/test/CodeGen/SystemZ/pr31710.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/CodeGen/SystemZ/pr31710.ll Wed Feb 1 21:34:47 2017 (r313056) @@ -0,0 +1,39 @@ +; RUN: llc < %s -mtriple=s390x-redhat-linux | FileCheck %s +; +; Triggers a path in SelectionDAG's UpdateChains where a node is +; deleted but we try to read it later (pr31710), invoking UB in +; release mode or hitting an assert if they're enabled. + +; CHECK: btldata: +define void @btldata(i64* %u0, i32** %p0, i32** %p1, i32** %p3, i32** %p5, i32** %p7) { +entry: + %x0 = load i32*, i32** %p0, align 8, !tbaa !0 + store i64 0, i64* %u0, align 8, !tbaa !4 + %x1 = load i32*, i32** %p1, align 8, !tbaa !0 + %x2 = load i32, i32* %x1, align 4, !tbaa !6 + %x2ext = sext i32 %x2 to i64 + store i32 %x2, i32* %x1, align 4, !tbaa !6 + %x3 = load i32*, i32** %p3, align 8, !tbaa !0 + %ptr = getelementptr inbounds i32, i32* %x3, i64 %x2ext + %x4 = load i32, i32* %ptr, align 4, !tbaa !6 + %x4inc = add nsw i32 %x4, 1 + store i32 %x4inc, i32* %ptr, align 4, !tbaa !6 + store i64 undef, i64* %u0, align 8, !tbaa !4 + %x5 = load i32*, i32** %p5, align 8, !tbaa !0 + %x6 = load i32, i32* %x5, align 4, !tbaa !6 + store i32 %x6, i32* %x5, align 4, !tbaa !6 + %x7 = load i32*, i32** %p7, align 8, !tbaa !0 + %x8 = load i32, i32* %x7, align 4, !tbaa !6 + %x8inc = add nsw i32 %x8, 1 + store i32 %x8inc, i32* %x7, align 4, !tbaa !6 + ret void +} + +!0 = !{!1, !1, i64 0} +!1 = !{!"any pointer", !2, i64 0} +!2 = !{!"omnipotent char", !3, i64 0} +!3 = !{!"Simple C/C++ TBAA"} +!4 = !{!5, !5, i64 0} +!5 = !{!"long", !2, i64 0} +!6 = !{!7, !7, i64 0} +!7 = !{!"int", !2, i64 0} Added: vendor/llvm/dist/test/DebugInfo/Mips/tls.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/DebugInfo/Mips/tls.ll Wed Feb 1 21:34:47 2017 (r313056) @@ -0,0 +1,22 @@ +; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=asm < %s | FileCheck %s -check-prefix=CHECK-WORD +; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=asm < %s | FileCheck %s -check-prefix=CHECK-DWORD + +@x = thread_local global i32 5, align 4, !dbg !0 + +; CHECK-WORD: .dtprelword x+32768 +; CHECK-DWORD: .dtpreldword x+32768 + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!7, !8} +!llvm.ident = !{!9} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 4.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) +!3 = !DIFile(filename: "tls.c", directory: "/tmp") +!4 = !{} +!5 = !{!0} +!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!7 = !{i32 2, !"Dwarf Version", i32 4} +!8 = !{i32 2, !"Debug Info Version", i32 3} +!9 = !{!"clang version 4.0.0"} Modified: vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt ============================================================================== --- vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt Wed Feb 1 21:34:47 2017 (r313056) @@ -134,3 +134,12 @@ 0x7c 0x0b 0x66 0x24 # CHECK: tlbsx 11, 12 0x7c 0x0b 0x67 0x24 + +# CHECK: mfpmr 5, 400 +0x7c 0xb0 0x62 0x9c +# CHECK: mtpmr 400, 6 +0x7c 0xd0 0x63 0x9c +# CHECK: icblc 0, 0, 8 +0x7c 0x00 0x41 0xcc +# CHECK: icbtls 0, 0, 9 +0x7c 0x00 0x4b 0xcc Added: vendor/llvm/dist/test/MC/MachO/ARM/no-tls-assert.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/MC/MachO/ARM/no-tls-assert.ll Wed Feb 1 21:34:47 2017 (r313056) @@ -0,0 +1,28 @@ +; RUN: llc -filetype=obj -o - %s | llvm-objdump -section-headers - | FileCheck %s +; This should not trigger the "Creating regular section after DWARF" assert. +; CHECK: __text +; CHECK: __thread_ptr 00000004 +target triple = "thumbv7-apple-ios9.0.0" + +@b = external thread_local global i32 +define i32* @func(i32 %a) !dbg !9 { + ret i32* @b +} + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4, !5, !6, !7} + +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +!1 = !DIFile(filename: "r.ii", directory: "/") +!2 = !{} +!3 = !{i32 2, !"Dwarf Version", i32 4} +!4 = !{i32 2, !"Debug Info Version", i32 3} +!5 = !{i32 1, !"wchar_size", i32 4} +!6 = !{i32 1, !"min_enum_size", i32 4} +!7 = !{i32 1, !"PIC Level", i32 2} +!9 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 4, type: !10, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) +!10 = !DISubroutineType(types: !11) +!11 = !{null, !12} +!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!13 = !DILocalVariable(name: "a", arg: 1, scope: !9, file: !1, line: 4, type: !12) +!14 = !DIExpression() Modified: vendor/llvm/dist/test/MC/Mips/micromips/valid.s ============================================================================== --- vendor/llvm/dist/test/MC/Mips/micromips/valid.s Wed Feb 1 21:21:01 2017 (r313055) +++ vendor/llvm/dist/test/MC/Mips/micromips/valid.s Wed Feb 1 21:34:47 2017 (r313056) @@ -210,6 +210,42 @@ recip.s $f2, $f4 # CHECK: rec recip.d $f2, $f4 # CHECK: recip.d $f2, $f4 # encoding: [0x54,0x44,0x52,0x3b] rsqrt.s $f3, $f5 # CHECK: rsqrt.s $f3, $f5 # encoding: [0x54,0x65,0x02,0x3b] rsqrt.d $f2, $f4 # CHECK: rsqrt.d $f2, $f4 # encoding: [0x54,0x44,0x42,0x3b] +c.eq.d $fcc1, $f14, $f14 # CHECK: c.eq.d $fcc1, $f14, $f14 # encoding: [0x55,0xce,0x24,0xbc] +c.eq.s $fcc5, $f24, $f17 # CHECK: c.eq.s $fcc5, $f24, $f17 # encoding: [0x56,0x38,0xa0,0xbc] +c.f.d $fcc4, $f10, $f20 # CHECK: c.f.d $fcc4, $f10, $f20 # encoding: [0x56,0x8a,0x84,0x3c] +c.f.s $fcc4, $f30, $f7 # CHECK: c.f.s $fcc4, $f30, $f7 # encoding: [0x54,0xfe,0x80,0x3c] +c.le.d $fcc4, $f18, $f0 # CHECK: c.le.d $fcc4, $f18, $f0 # encoding: [0x54,0x12,0x87,0xbc] +c.le.s $fcc6, $f24, $f4 # CHECK: c.le.s $fcc6, $f24, $f4 # encoding: [0x54,0x98,0xc3,0xbc] *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 1 21:35:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C021CCCCE4E; Wed, 1 Feb 2017 21:35:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7346CCEE; Wed, 1 Feb 2017 21:35:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11LZ6cV099954; Wed, 1 Feb 2017 21:35:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LZ6VF099953; Wed, 1 Feb 2017 21:35:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012135.v11LZ6VF099953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313059 - vendor/clang/clang-release_40-r293807 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:35:07 -0000 Author: dim Date: Wed Feb 1 21:35:06 2017 New Revision: 313059 URL: https://svnweb.freebsd.org/changeset/base/313059 Log: Tag clang release_40 branch r293807. Added: vendor/clang/clang-release_40-r293807/ - copied from r313058, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Wed Feb 1 21:35:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 052A6CCCE43; Wed, 1 Feb 2017 21:35:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFE18CAA; Wed, 1 Feb 2017 21:35:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11LZ2Z1099907; Wed, 1 Feb 2017 21:35:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LZ1XP099890; Wed, 1 Feb 2017 21:35:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012135.v11LZ1XP099890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:35:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313058 - in vendor/clang/dist: include/clang/AST include/clang/Basic include/clang/Sema lib/AST lib/CodeGen lib/Sema test/CodeGenCXX test/CodeGenObjC test/Sema test/Sema/Inputs test/Se... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:35:04 -0000 Author: dim Date: Wed Feb 1 21:35:00 2017 New Revision: 313058 URL: https://svnweb.freebsd.org/changeset/base/313058 Log: Vendor import of clang release_40 branch r293807: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293807 Added: vendor/clang/dist/test/CodeGenObjC/block-ptr-type-crash.m vendor/clang/dist/test/Sema/Inputs/diagnose-if-warn-system-header.h (contents, props changed) Modified: vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Sema/Overload.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/CodeGenCXX/microsoft-abi-default-cc.cpp vendor/clang/dist/test/CodeGenObjC/encode-test.m vendor/clang/dist/test/Sema/diagnose_if.c vendor/clang/dist/test/SemaCXX/destructor.cpp vendor/clang/dist/test/SemaCXX/diagnose_if.cpp Modified: vendor/clang/dist/include/clang/AST/Type.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Type.h Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/include/clang/AST/Type.h Wed Feb 1 21:35:00 2017 (r313058) @@ -3827,13 +3827,13 @@ private: friend class ASTContext; // creates these - AttributedType(QualType canon, Kind attrKind, - QualType modified, QualType equivalent) - : Type(Attributed, canon, canon->isDependentType(), - canon->isInstantiationDependentType(), - canon->isVariablyModifiedType(), - canon->containsUnexpandedParameterPack()), - ModifiedType(modified), EquivalentType(equivalent) { + AttributedType(QualType canon, Kind attrKind, QualType modified, + QualType equivalent) + : Type(Attributed, canon, equivalent->isDependentType(), + equivalent->isInstantiationDependentType(), + equivalent->isVariablyModifiedType(), + equivalent->containsUnexpandedParameterPack()), + ModifiedType(modified), EquivalentType(equivalent) { AttributedTypeBits.AttrKind = attrKind; } Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Wed Feb 1 21:35:00 2017 (r313058) @@ -3373,7 +3373,8 @@ def note_ovl_candidate_has_pass_object_s "candidate address cannot be taken because parameter %0 has " "pass_object_size attribute">; def err_diagnose_if_succeeded : Error<"%0">; -def warn_diagnose_if_succeeded : Warning<"%0">, InGroup; +def warn_diagnose_if_succeeded : Warning<"%0">, InGroup, + ShowInSystemHeader; def note_ovl_candidate_disabled_by_function_cond_attr : Note< "candidate disabled: %0">; def note_ovl_candidate_disabled_by_extension : Note< Modified: vendor/clang/dist/include/clang/Sema/Overload.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Overload.h Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/include/clang/Sema/Overload.h Wed Feb 1 21:35:00 2017 (r313058) @@ -675,26 +675,6 @@ namespace clang { /// to be used while performing partial ordering of function templates. unsigned ExplicitCallArguments; - /// The number of diagnose_if attributes that this overload triggered. - /// If any of the triggered attributes are errors, this won't count - /// diagnose_if warnings. - unsigned NumTriggeredDiagnoseIfs = 0; - - /// Basically a TinyPtrVector that doesn't own the vector: - /// If NumTriggeredDiagnoseIfs is 0 or 1, this is a DiagnoseIfAttr *, - /// otherwise it's a pointer to an array of `NumTriggeredDiagnoseIfs` - /// DiagnoseIfAttr *s. - llvm::PointerUnion DiagnoseIfInfo; - - /// Gets an ArrayRef for the data at DiagnoseIfInfo. Note that this may give - /// you a pointer into DiagnoseIfInfo. - ArrayRef getDiagnoseIfInfo() const { - auto *Ptr = NumTriggeredDiagnoseIfs <= 1 - ? DiagnoseIfInfo.getAddrOfPtr1() - : DiagnoseIfInfo.get(); - return {Ptr, NumTriggeredDiagnoseIfs}; - } - union { DeductionFailureInfo DeductionFailure; @@ -759,9 +739,8 @@ namespace clang { SmallVector Candidates; llvm::SmallPtrSet Functions; - // Allocator for ConversionSequenceLists and DiagnoseIfAttr* arrays. - // We store the first few of each of these inline to avoid allocation for - // small sets. + // Allocator for ConversionSequenceLists. We store the first few of these + // inline to avoid allocation for small sets. llvm::BumpPtrAllocator SlabAllocator; SourceLocation Loc; @@ -776,6 +755,8 @@ namespace clang { /// from the slab allocator. /// FIXME: It would probably be nice to have a SmallBumpPtrAllocator /// instead. + /// FIXME: Now that this only allocates ImplicitConversionSequences, do we + /// want to un-generalize this? template T *slabAllocate(unsigned N) { // It's simpler if this doesn't need to consider alignment. @@ -809,11 +790,6 @@ namespace clang { SourceLocation getLocation() const { return Loc; } CandidateSetKind getKind() const { return Kind; } - /// Make a DiagnoseIfAttr* array in a block of memory that will live for - /// as long as this OverloadCandidateSet. Returns a pointer to the start - /// of that array. - DiagnoseIfAttr **addDiagnoseIfComplaints(ArrayRef CA); - /// \brief Determine when this overload candidate will be new to the /// overload set. bool isNewCandidate(Decl *F) { Modified: vendor/clang/dist/include/clang/Sema/Sema.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Sema.h Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/include/clang/Sema/Sema.h Wed Feb 1 21:35:00 2017 (r313058) @@ -2532,14 +2532,14 @@ public: void AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, - Expr *ThisArg, ArrayRef Args, + ArrayRef Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversion = false); void AddMethodCandidate(CXXMethodDecl *Method, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, - Expr *ThisArg, ArrayRef Args, + ArrayRef Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false, bool PartialOverloading = false, @@ -2550,7 +2550,6 @@ public: TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, - Expr *ThisArg, ArrayRef Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false, @@ -2624,37 +2623,27 @@ public: EnableIfAttr *CheckEnableIf(FunctionDecl *Function, ArrayRef Args, bool MissingImplicitThis = false); - /// Check the diagnose_if attributes on the given function. Returns the - /// first succesful fatal attribute, or null if calling Function(Args) isn't - /// an error. - /// - /// This only considers ArgDependent DiagnoseIfAttrs. - /// - /// This will populate Nonfatal with all non-error DiagnoseIfAttrs that - /// succeed. If this function returns non-null, the contents of Nonfatal are - /// unspecified. - DiagnoseIfAttr * - checkArgDependentDiagnoseIf(FunctionDecl *Function, ArrayRef Args, - SmallVectorImpl &Nonfatal, - bool MissingImplicitThis = false, - Expr *ThisArg = nullptr); - - /// Check the diagnose_if expressions on the given function. Returns the - /// first succesful fatal attribute, or null if using Function isn't - /// an error. - /// - /// This ignores all ArgDependent DiagnoseIfAttrs. - /// - /// This will populate Nonfatal with all non-error DiagnoseIfAttrs that - /// succeed. If this function returns non-null, the contents of Nonfatal are - /// unspecified. - DiagnoseIfAttr * - checkArgIndependentDiagnoseIf(FunctionDecl *Function, - SmallVectorImpl &Nonfatal); - - /// Emits the diagnostic contained in the given DiagnoseIfAttr at Loc. Also - /// emits a note about the location of said attribute. - void emitDiagnoseIfDiagnostic(SourceLocation Loc, const DiagnoseIfAttr *DIA); + /// Emit diagnostics for the diagnose_if attributes on Function, ignoring any + /// non-ArgDependent DiagnoseIfAttrs. + /// + /// Argument-dependent diagnose_if attributes should be checked each time a + /// function is used as a direct callee of a function call. + /// + /// Returns true if any errors were emitted. + bool diagnoseArgDependentDiagnoseIfAttrs(const FunctionDecl *Function, + const Expr *ThisArg, + ArrayRef Args, + SourceLocation Loc); + + /// Emit diagnostics for the diagnose_if attributes on Function, ignoring any + /// ArgDependent DiagnoseIfAttrs. + /// + /// Argument-independent diagnose_if attributes should be checked on every use + /// of a function. + /// + /// Returns true if any errors were emitted. + bool diagnoseArgIndependentDiagnoseIfAttrs(const FunctionDecl *Function, + SourceLocation Loc); /// Returns whether the given function's address can be taken or not, /// optionally emitting a diagnostic if the address can't be taken. @@ -9914,8 +9903,8 @@ private: SourceLocation Loc); void checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, - ArrayRef Args, bool IsMemberFunction, - SourceLocation Loc, SourceRange Range, + const Expr *ThisArg, ArrayRef Args, + bool IsMemberFunction, SourceLocation Loc, SourceRange Range, VariadicCallType CallType); bool CheckObjCString(Expr *Arg); Modified: vendor/clang/dist/lib/AST/ExprConstant.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ExprConstant.cpp Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/lib/AST/ExprConstant.cpp Wed Feb 1 21:35:00 2017 (r313058) @@ -2362,7 +2362,14 @@ static unsigned getBaseIndex(const CXXRe /// Extract the value of a character from a string literal. static APSInt extractStringLiteralCharacter(EvalInfo &Info, const Expr *Lit, uint64_t Index) { - // FIXME: Support ObjCEncodeExpr, MakeStringConstant + // FIXME: Support MakeStringConstant + if (const auto *ObjCEnc = dyn_cast(Lit)) { + std::string Str; + Info.Ctx.getObjCEncodingForType(ObjCEnc->getEncodedType(), Str); + assert(Index <= Str.size() && "Index too large"); + return APSInt::getUnsigned(Str.c_str()[Index]); + } + if (auto PE = dyn_cast(Lit)) Lit = PE->getFunctionName(); const StringLiteral *S = cast(Lit); Modified: vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp Wed Feb 1 21:35:00 2017 (r313058) @@ -737,7 +737,7 @@ CodeGenTypes::getCGRecordLayout(const Re } bool CodeGenTypes::isPointerZeroInitializable(QualType T) { - assert (T->isAnyPointerType() && "Invalid type"); + assert((T->isAnyPointerType() || T->isBlockPointerType()) && "Invalid type"); return isZeroInitializable(T); } Modified: vendor/clang/dist/lib/Sema/SemaChecking.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaChecking.cpp Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/lib/Sema/SemaChecking.cpp Wed Feb 1 21:35:00 2017 (r313058) @@ -2426,11 +2426,12 @@ static void CheckNonNullArguments(Sema & } /// Handles the checks for format strings, non-POD arguments to vararg -/// functions, and NULL arguments passed to non-NULL parameters. +/// functions, NULL arguments passed to non-NULL parameters, and diagnose_if +/// attributes. void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, - ArrayRef Args, bool IsMemberFunction, - SourceLocation Loc, SourceRange Range, - VariadicCallType CallType) { + const Expr *ThisArg, ArrayRef Args, + bool IsMemberFunction, SourceLocation Loc, + SourceRange Range, VariadicCallType CallType) { // FIXME: We should check as much as we can in the template definition. if (CurContext->isDependentContext()) return; @@ -2477,6 +2478,9 @@ void Sema::checkCall(NamedDecl *FDecl, c CheckArgumentWithTypeTag(I, Args.data()); } } + + if (FD) + diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc); } /// CheckConstructorCall - Check a constructor call for correctness and safety @@ -2487,8 +2491,8 @@ void Sema::CheckConstructorCall(Function SourceLocation Loc) { VariadicCallType CallType = Proto->isVariadic() ? VariadicConstructor : VariadicDoesNotApply; - checkCall(FDecl, Proto, Args, /*IsMemberFunction=*/true, Loc, SourceRange(), - CallType); + checkCall(FDecl, Proto, /*ThisArg=*/nullptr, Args, /*IsMemberFunction=*/true, + Loc, SourceRange(), CallType); } /// CheckFunctionCall - Check a direct function call for various correctness @@ -2503,14 +2507,20 @@ bool Sema::CheckFunctionCall(FunctionDec TheCall->getCallee()); Expr** Args = TheCall->getArgs(); unsigned NumArgs = TheCall->getNumArgs(); + + Expr *ImplicitThis = nullptr; if (IsMemberOperatorCall) { // If this is a call to a member operator, hide the first argument // from checkCall. // FIXME: Our choice of AST representation here is less than ideal. + ImplicitThis = Args[0]; ++Args; --NumArgs; - } - checkCall(FDecl, Proto, llvm::makeArrayRef(Args, NumArgs), + } else if (IsMemberFunction) + ImplicitThis = + cast(TheCall)->getImplicitObjectArgument(); + + checkCall(FDecl, Proto, ImplicitThis, llvm::makeArrayRef(Args, NumArgs), IsMemberFunction, TheCall->getRParenLoc(), TheCall->getCallee()->getSourceRange(), CallType); @@ -2546,8 +2556,8 @@ bool Sema::CheckObjCMethodCall(ObjCMetho VariadicCallType CallType = Method->isVariadic() ? VariadicMethod : VariadicDoesNotApply; - checkCall(Method, nullptr, Args, - /*IsMemberFunction=*/false, lbrac, Method->getSourceRange(), + checkCall(Method, nullptr, /*ThisArg=*/nullptr, Args, + /*IsMemberFunction=*/false, lbrac, Method->getSourceRange(), CallType); return false; @@ -2576,7 +2586,7 @@ bool Sema::CheckPointerCall(NamedDecl *N CallType = VariadicFunction; } - checkCall(NDecl, Proto, + checkCall(NDecl, Proto, /*ThisArg=*/nullptr, llvm::makeArrayRef(TheCall->getArgs(), TheCall->getNumArgs()), /*IsMemberFunction=*/false, TheCall->getRParenLoc(), TheCall->getCallee()->getSourceRange(), CallType); @@ -2589,7 +2599,7 @@ bool Sema::CheckPointerCall(NamedDecl *N bool Sema::CheckOtherCall(CallExpr *TheCall, const FunctionProtoType *Proto) { VariadicCallType CallType = getVariadicCallType(/*FDecl=*/nullptr, Proto, TheCall->getCallee()); - checkCall(/*FDecl=*/nullptr, Proto, + checkCall(/*FDecl=*/nullptr, Proto, /*ThisArg=*/nullptr, llvm::makeArrayRef(TheCall->getArgs(), TheCall->getNumArgs()), /*IsMemberFunction=*/false, TheCall->getRParenLoc(), TheCall->getCallee()->getSourceRange(), CallType); Modified: vendor/clang/dist/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExpr.cpp Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/lib/Sema/SemaExpr.cpp Wed Feb 1 21:35:00 2017 (r313058) @@ -342,7 +342,6 @@ bool Sema::DiagnoseUseOfDecl(NamedDecl * } // See if this is a deleted function. - SmallVector DiagnoseIfWarnings; if (FunctionDecl *FD = dyn_cast(D)) { if (FD->isDeleted()) { auto *Ctor = dyn_cast(FD); @@ -365,11 +364,8 @@ bool Sema::DiagnoseUseOfDecl(NamedDecl * if (getLangOpts().CUDA && !CheckCUDACall(Loc, FD)) return true; - if (const DiagnoseIfAttr *A = - checkArgIndependentDiagnoseIf(FD, DiagnoseIfWarnings)) { - emitDiagnoseIfDiagnostic(Loc, A); + if (diagnoseArgIndependentDiagnoseIfAttrs(FD, Loc)) return true; - } } // [OpenMP 4.0], 2.15 declare reduction Directive, Restrictions @@ -385,9 +381,6 @@ bool Sema::DiagnoseUseOfDecl(NamedDecl * return true; } - for (const auto *W : DiagnoseIfWarnings) - emitDiagnoseIfDiagnostic(Loc, W); - DiagnoseAvailabilityOfDecl(*this, D, Loc, UnknownObjCClass, ObjCPropertyAccess); @@ -5189,16 +5182,6 @@ static void checkDirectCallValidity(Sema << Attr->getCond()->getSourceRange() << Attr->getMessage(); return; } - - SmallVector Nonfatal; - if (const DiagnoseIfAttr *Attr = S.checkArgDependentDiagnoseIf( - Callee, ArgExprs, Nonfatal, /*MissingImplicitThis=*/true)) { - S.emitDiagnoseIfDiagnostic(Fn->getLocStart(), Attr); - return; - } - - for (const auto *W : Nonfatal) - S.emitDiagnoseIfDiagnostic(Fn->getLocStart(), W); } /// ActOnCallExpr - Handle a call to Fn with the specified array of arguments. Modified: vendor/clang/dist/lib/Sema/SemaExprCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Wed Feb 1 21:35:00 2017 (r313058) @@ -6712,6 +6712,11 @@ ExprResult Sema::BuildCXXMemberCallExpr( CXXMemberCallExpr *CE = new (Context) CXXMemberCallExpr(Context, ME, None, ResultType, VK, Exp.get()->getLocEnd()); + + if (CheckFunctionCall(Method, CE, + Method->getType()->castAs())) + return ExprError(); + return CE; } Modified: vendor/clang/dist/lib/Sema/SemaLookup.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaLookup.cpp Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/lib/Sema/SemaLookup.cpp Wed Feb 1 21:35:00 2017 (r313058) @@ -2960,7 +2960,6 @@ Sema::SpecialMemberOverloadResult *Sema: if (CXXMethodDecl *M = dyn_cast(Cand->getUnderlyingDecl())) { if (SM == CXXCopyAssignment || SM == CXXMoveAssignment) AddMethodCandidate(M, Cand, RD, ThisTy, Classification, - /*ThisArg=*/nullptr, llvm::makeArrayRef(&Arg, NumArgs), OCS, true); else if (CtorInfo) AddOverloadCandidate(CtorInfo.Constructor, CtorInfo.FoundDecl, @@ -2973,7 +2972,7 @@ Sema::SpecialMemberOverloadResult *Sema: if (SM == CXXCopyAssignment || SM == CXXMoveAssignment) AddMethodTemplateCandidate( Tmpl, Cand, RD, nullptr, ThisTy, Classification, - /*ThisArg=*/nullptr, llvm::makeArrayRef(&Arg, NumArgs), OCS, true); + llvm::makeArrayRef(&Arg, NumArgs), OCS, true); else if (CtorInfo) AddTemplateOverloadCandidate( CtorInfo.ConstructorTmpl, CtorInfo.FoundDecl, nullptr, Modified: vendor/clang/dist/lib/Sema/SemaOverload.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaOverload.cpp Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/lib/Sema/SemaOverload.cpp Wed Feb 1 21:35:00 2017 (r313058) @@ -839,20 +839,12 @@ void OverloadCandidateSet::destroyCandid void OverloadCandidateSet::clear() { destroyCandidates(); - // DiagnoseIfAttrs are just pointers, so we don't need to destroy them. SlabAllocator.Reset(); NumInlineBytesUsed = 0; Candidates.clear(); Functions.clear(); } -DiagnoseIfAttr ** -OverloadCandidateSet::addDiagnoseIfComplaints(ArrayRef CA) { - auto *DIA = slabAllocate(CA.size()); - std::uninitialized_copy(CA.begin(), CA.end(), DIA); - return DIA; -} - namespace { class UnbridgedCastsSet { struct Entry { @@ -5831,28 +5823,6 @@ static bool IsAcceptableNonMemberOperato return false; } -static void initDiagnoseIfComplaint(Sema &S, OverloadCandidateSet &CandidateSet, - OverloadCandidate &Candidate, - FunctionDecl *Function, - ArrayRef Args, - bool MissingImplicitThis = false, - Expr *ExplicitThis = nullptr) { - SmallVector Results; - if (DiagnoseIfAttr *DIA = S.checkArgDependentDiagnoseIf( - Function, Args, Results, MissingImplicitThis, ExplicitThis)) { - Results.clear(); - Results.push_back(DIA); - } - - Candidate.NumTriggeredDiagnoseIfs = Results.size(); - if (Results.empty()) - Candidate.DiagnoseIfInfo = nullptr; - else if (Results.size() == 1) - Candidate.DiagnoseIfInfo = Results[0]; - else - Candidate.DiagnoseIfInfo = CandidateSet.addDiagnoseIfComplaints(Results); -} - /// AddOverloadCandidate - Adds the given function to the set of /// candidate functions, using the given function call arguments. If /// @p SuppressUserConversions, then don't allow user-defined @@ -5886,10 +5856,9 @@ Sema::AddOverloadCandidate(FunctionDecl // object argument (C++ [over.call.func]p3), and the acting context // is irrelevant. AddMethodCandidate(Method, FoundDecl, Method->getParent(), QualType(), - Expr::Classification::makeSimpleLValue(), - /*ThisArg=*/nullptr, Args, CandidateSet, - SuppressUserConversions, PartialOverloading, - EarlyConversions); + Expr::Classification::makeSimpleLValue(), Args, + CandidateSet, SuppressUserConversions, + PartialOverloading, EarlyConversions); return; } // We treat a constructor like a non-member function, since its object @@ -6050,8 +6019,6 @@ Sema::AddOverloadCandidate(FunctionDecl Candidate.FailureKind = ovl_fail_ext_disabled; return; } - - initDiagnoseIfComplaint(*this, CandidateSet, Candidate, Function, Args); } ObjCMethodDecl * @@ -6260,85 +6227,73 @@ EnableIfAttr *Sema::CheckEnableIf(Functi return nullptr; } -static bool gatherDiagnoseIfAttrs(FunctionDecl *Function, bool ArgDependent, - SmallVectorImpl &Errors, - SmallVectorImpl &Nonfatal) { - for (auto *DIA : Function->specific_attrs()) - if (ArgDependent == DIA->getArgDependent()) { - if (DIA->isError()) - Errors.push_back(DIA); - else - Nonfatal.push_back(DIA); - } - - return !Errors.empty() || !Nonfatal.empty(); -} - template -static DiagnoseIfAttr * -checkDiagnoseIfAttrsWith(const SmallVectorImpl &Errors, - SmallVectorImpl &Nonfatal, - CheckFn &&IsSuccessful) { +static bool diagnoseDiagnoseIfAttrsWith(Sema &S, const FunctionDecl *FD, + bool ArgDependent, SourceLocation Loc, + CheckFn &&IsSuccessful) { + SmallVector Attrs; + for (const auto *DIA : FD->specific_attrs()) { + if (ArgDependent == DIA->getArgDependent()) + Attrs.push_back(DIA); + } + + // Common case: No diagnose_if attributes, so we can quit early. + if (Attrs.empty()) + return false; + + auto WarningBegin = std::stable_partition( + Attrs.begin(), Attrs.end(), + [](const DiagnoseIfAttr *DIA) { return DIA->isError(); }); + // Note that diagnose_if attributes are late-parsed, so they appear in the // correct order (unlike enable_if attributes). - auto ErrAttr = llvm::find_if(Errors, IsSuccessful); - if (ErrAttr != Errors.end()) - return *ErrAttr; - - llvm::erase_if(Nonfatal, [&](DiagnoseIfAttr *A) { return !IsSuccessful(A); }); - return nullptr; -} - -DiagnoseIfAttr * -Sema::checkArgDependentDiagnoseIf(FunctionDecl *Function, ArrayRef Args, - SmallVectorImpl &Nonfatal, - bool MissingImplicitThis, - Expr *ThisArg) { - SmallVector Errors; - if (!gatherDiagnoseIfAttrs(Function, /*ArgDependent=*/true, Errors, Nonfatal)) - return nullptr; + auto ErrAttr = llvm::find_if(llvm::make_range(Attrs.begin(), WarningBegin), + IsSuccessful); + if (ErrAttr != WarningBegin) { + const DiagnoseIfAttr *DIA = *ErrAttr; + S.Diag(Loc, diag::err_diagnose_if_succeeded) << DIA->getMessage(); + S.Diag(DIA->getLocation(), diag::note_from_diagnose_if) + << DIA->getParent() << DIA->getCond()->getSourceRange(); + return true; + } - SFINAETrap Trap(*this); - SmallVector ConvertedArgs; - Expr *ConvertedThis; - if (!convertArgsForAvailabilityChecks(*this, Function, ThisArg, Args, Trap, - MissingImplicitThis, ConvertedThis, - ConvertedArgs)) - return nullptr; + for (const auto *DIA : llvm::make_range(WarningBegin, Attrs.end())) + if (IsSuccessful(DIA)) { + S.Diag(Loc, diag::warn_diagnose_if_succeeded) << DIA->getMessage(); + S.Diag(DIA->getLocation(), diag::note_from_diagnose_if) + << DIA->getParent() << DIA->getCond()->getSourceRange(); + } - return checkDiagnoseIfAttrsWith(Errors, Nonfatal, [&](DiagnoseIfAttr *DIA) { - APValue Result; - // It's sane to use the same ConvertedArgs for any redecl of this function, - // since EvaluateWithSubstitution only cares about the position of each - // argument in the arg list, not the ParmVarDecl* it maps to. - if (!DIA->getCond()->EvaluateWithSubstitution( - Result, Context, DIA->getParent(), ConvertedArgs, ConvertedThis)) - return false; - return Result.isInt() && Result.getInt().getBoolValue(); - }); + return false; } -DiagnoseIfAttr *Sema::checkArgIndependentDiagnoseIf( - FunctionDecl *Function, SmallVectorImpl &Nonfatal) { - SmallVector Errors; - if (!gatherDiagnoseIfAttrs(Function, /*ArgDependent=*/false, Errors, - Nonfatal)) - return nullptr; - - return checkDiagnoseIfAttrsWith(Errors, Nonfatal, [&](DiagnoseIfAttr *DIA) { - bool Result; - return DIA->getCond()->EvaluateAsBooleanCondition(Result, Context) && - Result; - }); +bool Sema::diagnoseArgDependentDiagnoseIfAttrs(const FunctionDecl *Function, + const Expr *ThisArg, + ArrayRef Args, + SourceLocation Loc) { + return diagnoseDiagnoseIfAttrsWith( + *this, Function, /*ArgDependent=*/true, Loc, + [&](const DiagnoseIfAttr *DIA) { + APValue Result; + // It's sane to use the same Args for any redecl of this function, since + // EvaluateWithSubstitution only cares about the position of each + // argument in the arg list, not the ParmVarDecl* it maps to. + if (!DIA->getCond()->EvaluateWithSubstitution( + Result, Context, DIA->getParent(), Args, ThisArg)) + return false; + return Result.isInt() && Result.getInt().getBoolValue(); + }); } -void Sema::emitDiagnoseIfDiagnostic(SourceLocation Loc, - const DiagnoseIfAttr *DIA) { - auto Code = DIA->isError() ? diag::err_diagnose_if_succeeded - : diag::warn_diagnose_if_succeeded; - Diag(Loc, Code) << DIA->getMessage(); - Diag(DIA->getLocation(), diag::note_from_diagnose_if) - << DIA->getParent() << DIA->getCond()->getSourceRange(); +bool Sema::diagnoseArgIndependentDiagnoseIfAttrs(const FunctionDecl *Function, + SourceLocation Loc) { + return diagnoseDiagnoseIfAttrsWith( + *this, Function, /*ArgDependent=*/false, Loc, + [&](const DiagnoseIfAttr *DIA) { + bool Result; + return DIA->getCond()->EvaluateAsBooleanCondition(Result, Context) && + Result; + }); } /// \brief Add all of the function declarations in the given function set to @@ -6356,8 +6311,8 @@ void Sema::AddFunctionCandidates(const U AddMethodCandidate(cast(FD), F.getPair(), cast(FD)->getParent(), Args[0]->getType(), Args[0]->Classify(Context), - Args[0], Args.slice(1), CandidateSet, - SuppressUserConversions, PartialOverloading); + Args.slice(1), CandidateSet, SuppressUserConversions, + PartialOverloading); else AddOverloadCandidate(FD, F.getPair(), Args, CandidateSet, SuppressUserConversions, PartialOverloading); @@ -6369,7 +6324,7 @@ void Sema::AddFunctionCandidates(const U FunTmpl, F.getPair(), cast(FunTmpl->getDeclContext()), ExplicitTemplateArgs, Args[0]->getType(), - Args[0]->Classify(Context), Args[0], Args.slice(1), CandidateSet, + Args[0]->Classify(Context), Args.slice(1), CandidateSet, SuppressUserConversions, PartialOverloading); else AddTemplateOverloadCandidate(FunTmpl, F.getPair(), @@ -6385,7 +6340,6 @@ void Sema::AddFunctionCandidates(const U void Sema::AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, - Expr *ThisArg, ArrayRef Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions) { @@ -6399,15 +6353,13 @@ void Sema::AddMethodCandidate(DeclAccess assert(isa(TD->getTemplatedDecl()) && "Expected a member function template"); AddMethodTemplateCandidate(TD, FoundDecl, ActingContext, - /*ExplicitArgs*/ nullptr, - ObjectType, ObjectClassification, - ThisArg, Args, CandidateSet, + /*ExplicitArgs*/ nullptr, ObjectType, + ObjectClassification, Args, CandidateSet, SuppressUserConversions); } else { AddMethodCandidate(cast(Decl), FoundDecl, ActingContext, - ObjectType, ObjectClassification, - ThisArg, Args, - CandidateSet, SuppressUserConversions); + ObjectType, ObjectClassification, Args, CandidateSet, + SuppressUserConversions); } } @@ -6422,7 +6374,7 @@ void Sema::AddMethodCandidate(CXXMethodDecl *Method, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, - Expr *ThisArg, ArrayRef Args, + ArrayRef Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions, bool PartialOverloading, @@ -6544,9 +6496,6 @@ Sema::AddMethodCandidate(CXXMethodDecl * Candidate.DeductionFailure.Data = FailedAttr; return; } - - initDiagnoseIfComplaint(*this, CandidateSet, Candidate, Method, Args, - /*MissingImplicitThis=*/!ThisArg, ThisArg); } /// \brief Add a C++ member function template as a candidate to the candidate @@ -6559,7 +6508,6 @@ Sema::AddMethodTemplateCandidate(Functio TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, - Expr *ThisArg, ArrayRef Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions, @@ -6613,9 +6561,9 @@ Sema::AddMethodTemplateCandidate(Functio assert(isa(Specialization) && "Specialization is not a member function?"); AddMethodCandidate(cast(Specialization), FoundDecl, - ActingContext, ObjectType, ObjectClassification, - /*ThisArg=*/ThisArg, Args, CandidateSet, - SuppressUserConversions, PartialOverloading, Conversions); + ActingContext, ObjectType, ObjectClassification, Args, + CandidateSet, SuppressUserConversions, PartialOverloading, + Conversions); } /// \brief Add a C++ function template specialization as a candidate @@ -6942,8 +6890,6 @@ Sema::AddConversionCandidate(CXXConversi Candidate.DeductionFailure.Data = FailedAttr; return; } - - initDiagnoseIfComplaint(*this, CandidateSet, Candidate, Conversion, None, false, From); } /// \brief Adds a conversion function template specialization @@ -7096,8 +7042,6 @@ void Sema::AddSurrogateCandidate(CXXConv Candidate.DeductionFailure.Data = FailedAttr; return; } - - initDiagnoseIfComplaint(*this, CandidateSet, Candidate, Conversion, None); } /// \brief Add overload candidates for overloaded operators that are @@ -7146,7 +7090,7 @@ void Sema::AddMemberOperatorCandidates(O Oper != OperEnd; ++Oper) AddMethodCandidate(Oper.getPair(), Args[0]->getType(), - Args[0]->Classify(Context), Args[0], Args.slice(1), + Args[0]->Classify(Context), Args.slice(1), CandidateSet, /*SuppressUserConversions=*/false); } } @@ -9178,17 +9122,6 @@ void Sema::diagnoseEquivalentInternalLin } } -static bool isCandidateUnavailableDueToDiagnoseIf(const OverloadCandidate &OC) { - ArrayRef Info = OC.getDiagnoseIfInfo(); - if (!Info.empty() && Info[0]->isError()) - return true; - - assert(llvm::all_of(Info, - [](const DiagnoseIfAttr *A) { return !A->isError(); }) && - "DiagnoseIf info shouldn't have mixed warnings and errors."); - return false; -} - /// \brief Computes the best viable function (C++ 13.3.3) /// within an overload candidate set. /// @@ -9267,19 +9200,13 @@ OverloadCandidateSet::BestViableFunction // Best is the best viable function. if (Best->Function && (Best->Function->isDeleted() || - S.isFunctionConsideredUnavailable(Best->Function) || - isCandidateUnavailableDueToDiagnoseIf(*Best))) + S.isFunctionConsideredUnavailable(Best->Function))) return OR_Deleted; if (!EquivalentCands.empty()) S.diagnoseEquivalentInternalLinkageDeclarations(Loc, Best->Function, EquivalentCands); - for (const auto *W : Best->getDiagnoseIfInfo()) { - assert(W->isWarning() && "Errors should've been caught earlier!"); - S.emitDiagnoseIfDiagnostic(Loc, W); - } - return OR_Success; } @@ -10162,14 +10089,6 @@ static void NoteFunctionCandidate(Sema & MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); return; } - if (isCandidateUnavailableDueToDiagnoseIf(*Cand)) { - auto *A = Cand->DiagnoseIfInfo.get(); - assert(A->isError() && "Non-error diagnose_if disables a candidate?"); - S.Diag(Cand->Function->getLocation(), - diag::note_ovl_candidate_disabled_by_function_cond_attr) - << A->getCond()->getSourceRange() << A->getMessage(); - return; - } // We don't really have anything else to say about viable candidates. S.NoteOverloadCandidate(Cand->FoundDecl, Fn); @@ -12113,6 +12032,10 @@ Sema::CreateOverloadedUnaryOp(SourceLoca if (CheckCallReturnType(FnDecl->getReturnType(), OpLoc, TheCall, FnDecl)) return ExprError(); + if (CheckFunctionCall(FnDecl, TheCall, + FnDecl->getType()->castAs())) + return ExprError(); + return MaybeBindToTemporary(TheCall); } else { // We matched a built-in operator. Convert the arguments, then @@ -12343,16 +12266,20 @@ Sema::CreateOverloadedBinOp(SourceLocati return ExprError(); ArrayRef ArgsArray(Args, 2); + const Expr *ImplicitThis = nullptr; // Cut off the implicit 'this'. - if (isa(FnDecl)) + if (isa(FnDecl)) { + ImplicitThis = ArgsArray[0]; ArgsArray = ArgsArray.slice(1); + } // Check for a self move. if (Op == OO_Equal) DiagnoseSelfMove(Args[0], Args[1], OpLoc); - checkCall(FnDecl, nullptr, ArgsArray, isa(FnDecl), OpLoc, - TheCall->getSourceRange(), VariadicDoesNotApply); + checkCall(FnDecl, nullptr, ImplicitThis, ArgsArray, + isa(FnDecl), OpLoc, TheCall->getSourceRange(), + VariadicDoesNotApply); return MaybeBindToTemporary(TheCall); } else { @@ -12561,6 +12488,10 @@ Sema::CreateOverloadedArraySubscriptExpr if (CheckCallReturnType(FnDecl->getReturnType(), LLoc, TheCall, FnDecl)) return ExprError(); + if (CheckFunctionCall(Method, TheCall, + Method->getType()->castAs())) + return ExprError(); + return MaybeBindToTemporary(TheCall); } else { // We matched a built-in operator. Convert the arguments, then @@ -12727,16 +12658,6 @@ Sema::BuildCallToMemberFunction(Scope *S TemplateArgs = &TemplateArgsBuffer; } - // Poor-programmer's Lazy; isImplicitAccess requires stripping - // parens/casts, which would be nice to avoid potentially doing multiple - // times. - llvm::Optional UnresolvedBase; - auto GetUnresolvedBase = [&] { - if (!UnresolvedBase.hasValue()) - UnresolvedBase = - UnresExpr->isImplicitAccess() ? nullptr : UnresExpr->getBase(); - return *UnresolvedBase; - }; for (UnresolvedMemberExpr::decls_iterator I = UnresExpr->decls_begin(), E = UnresExpr->decls_end(); I != E; ++I) { @@ -12757,14 +12678,12 @@ Sema::BuildCallToMemberFunction(Scope *S continue; AddMethodCandidate(Method, I.getPair(), ActingDC, ObjectType, - ObjectClassification, - /*ThisArg=*/GetUnresolvedBase(), Args, CandidateSet, + ObjectClassification, Args, CandidateSet, /*SuppressUserConversions=*/false); } else { AddMethodTemplateCandidate( cast(Func), I.getPair(), ActingDC, - TemplateArgs, ObjectType, ObjectClassification, - /*ThisArg=*/GetUnresolvedBase(), Args, CandidateSet, + TemplateArgs, ObjectType, ObjectClassification, Args, CandidateSet, /*SuppressUsedConversions=*/false); } } @@ -12882,16 +12801,6 @@ Sema::BuildCallToMemberFunction(Scope *S << Attr->getCond()->getSourceRange() << Attr->getMessage(); return ExprError(); } - - SmallVector Nonfatal; - if (const DiagnoseIfAttr *Attr = checkArgDependentDiagnoseIf( - Method, Args, Nonfatal, false, MemE->getBase())) { - emitDiagnoseIfDiagnostic(MemE->getMemberLoc(), Attr); - return ExprError(); - } - - for (const auto *Attr : Nonfatal) - emitDiagnoseIfDiagnostic(MemE->getMemberLoc(), Attr); } if ((isa(CurContext) || @@ -12970,9 +12879,8 @@ Sema::BuildCallToObjectOfClassType(Scope for (LookupResult::iterator Oper = R.begin(), OperEnd = R.end(); Oper != OperEnd; ++Oper) { AddMethodCandidate(Oper.getPair(), Object.get()->getType(), - Object.get()->Classify(Context), - Object.get(), Args, CandidateSet, - /*SuppressUserConversions=*/ false); + Object.get()->Classify(Context), Args, CandidateSet, + /*SuppressUserConversions=*/false); } // C++ [over.call.object]p2: @@ -13247,8 +13155,7 @@ Sema::BuildOverloadedArrowExpr(Scope *S, for (LookupResult::iterator Oper = R.begin(), OperEnd = R.end(); Oper != OperEnd; ++Oper) { AddMethodCandidate(Oper.getPair(), Base->getType(), Base->Classify(Context), - Base, None, CandidateSet, - /*SuppressUserConversions=*/false); + None, CandidateSet, /*SuppressUserConversions=*/false); } bool HadMultipleCandidates = (CandidateSet.size() > 1); @@ -13322,7 +13229,11 @@ Sema::BuildOverloadedArrowExpr(Scope *S, Base, ResultTy, VK, OpLoc, false); if (CheckCallReturnType(Method->getReturnType(), OpLoc, TheCall, Method)) - return ExprError(); + return ExprError(); + + if (CheckFunctionCall(Method, TheCall, + Method->getType()->castAs())) + return ExprError(); return MaybeBindToTemporary(TheCall); } Modified: vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp Wed Feb 1 21:35:00 2017 (r313058) @@ -4996,8 +4996,12 @@ NamedDecl *Sema::FindInstantiatedDecl(So NamedDecl *Result = nullptr; // FIXME: If the name is a dependent name, this lookup won't necessarily // find it. Does that ever matter? - if (D->getDeclName()) { - DeclContext::lookup_result Found = ParentDC->lookup(D->getDeclName()); + if (auto Name = D->getDeclName()) { + DeclarationNameInfo NameInfo(Name, D->getLocation()); + Name = SubstDeclarationNameInfo(NameInfo, TemplateArgs).getName(); + if (!Name) + return nullptr; + DeclContext::lookup_result Found = ParentDC->lookup(Name); Result = findInstantiationOf(Context, D, Found.begin(), Found.end()); } else { // Since we don't have a name for the entity we're looking for, Modified: vendor/clang/dist/lib/Sema/TreeTransform.h ============================================================================== --- vendor/clang/dist/lib/Sema/TreeTransform.h Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/lib/Sema/TreeTransform.h Wed Feb 1 21:35:00 2017 (r313058) @@ -8818,12 +8818,18 @@ TreeTransform::TransformMemberE // base (and therefore couldn't do the check) and a // nested-name-qualifier (and therefore could do the lookup). NamedDecl *FirstQualifierInScope = nullptr; + DeclarationNameInfo MemberNameInfo = E->getMemberNameInfo(); + if (MemberNameInfo.getName()) { + MemberNameInfo = getDerived().TransformDeclarationNameInfo(MemberNameInfo); + if (!MemberNameInfo.getName()) + return ExprError(); + } return getDerived().RebuildMemberExpr(Base.get(), FakeOperatorLoc, E->isArrow(), QualifierLoc, TemplateKWLoc, - E->getMemberNameInfo(), + MemberNameInfo, Member, FoundDecl, (E->hasExplicitTemplateArgs() Modified: vendor/clang/dist/test/CodeGenCXX/microsoft-abi-default-cc.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/microsoft-abi-default-cc.cpp Wed Feb 1 21:34:55 2017 (r313057) +++ vendor/clang/dist/test/CodeGenCXX/microsoft-abi-default-cc.cpp Wed Feb 1 21:35:00 2017 (r313058) @@ -45,3 +45,12 @@ void __cdecl static_baz() {} void static_qux() {} // GCABI-LABEL: define void @_Z10static_quxv // MSABI: define void @"\01?static_qux@@YAXXZ" + +namespace PR31656 { +template +void __cdecl callee(int args[I]); +// GCABI-LABEL: declare void @_ZN7PR316566calleeILi1EEEvPi( +// MSABI: declare void @"\01??$callee@$00@PR31656@@YAXQAH@Z"( + +void caller() { callee<1>(0); } +} Added: vendor/clang/dist/test/CodeGenObjC/block-ptr-type-crash.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/CodeGenObjC/block-ptr-type-crash.m Wed Feb 1 21:35:00 2017 (r313058) @@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -Wno-objc-root-class -fblocks -o /dev/null -triple x86_64-- -emit-llvm %s +// REQUIRES: asserts +// Verify there is no assertion. + +// rdar://30111891 + +typedef unsigned long long uint64_t; +typedef enum AnEnum : uint64_t AnEnum; +enum AnEnum: uint64_t { + AnEnumA +}; + +typedef void (^BlockType)(); +@interface MyClass +@end +@implementation MyClass +- (void)_doStuff { + struct { + int identifier; + AnEnum type; + BlockType handler; + } var = { + "hello", + AnEnumA, + ((void *)0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Feb 1 21:35:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65BCCCCCEAE; Wed, 1 Feb 2017 21:35:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32EE8DAF; Wed, 1 Feb 2017 21:35:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11LZCAZ000164; Wed, 1 Feb 2017 21:35:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LZCh4000163; Wed, 1 Feb 2017 21:35:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012135.v11LZCh4000163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313061 - vendor/libc++/dist/include X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:35:13 -0000 Author: dim Date: Wed Feb 1 21:35:12 2017 New Revision: 313061 URL: https://svnweb.freebsd.org/changeset/base/313061 Log: Vendor import of libc++ release_40 branch r293807: https://llvm.org/svn/llvm-project/libcxx/branches/release_40@293807 Modified: vendor/libc++/dist/include/mutex Modified: vendor/libc++/dist/include/mutex ============================================================================== --- vendor/libc++/dist/include/mutex Wed Feb 1 21:35:09 2017 (r313060) +++ vendor/libc++/dist/include/mutex Wed Feb 1 21:35:12 2017 (r313061) @@ -559,7 +559,6 @@ public: #endif template -inline _LIBCPP_INLINE_VISIBILITY void __call_once_proxy(void* __vp) { From owner-svn-src-all@freebsd.org Wed Feb 1 21:35:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA8F3CCCE81; Wed, 1 Feb 2017 21:35:10 +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 60CEBD4A; Wed, 1 Feb 2017 21:35:10 +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 v11LZ9eI000111; Wed, 1 Feb 2017 21:35:09 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LZ9g4000110; Wed, 1 Feb 2017 21:35:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012135.v11LZ9g4000110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313060 - vendor/compiler-rt/compiler-rt-release_40-r293807 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:35:10 -0000 Author: dim Date: Wed Feb 1 21:35:09 2017 New Revision: 313060 URL: https://svnweb.freebsd.org/changeset/base/313060 Log: Tag compiler-rt release_40 branch r293807. Added: vendor/compiler-rt/compiler-rt-release_40-r293807/ - copied from r313059, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Wed Feb 1 21:35:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41A43CCCF06; Wed, 1 Feb 2017 21:35:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19699E68; Wed, 1 Feb 2017 21:35:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11LZIWi000269; Wed, 1 Feb 2017 21:35:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LZH7A000260; Wed, 1 Feb 2017 21:35:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012135.v11LZH7A000260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313063 - in vendor/lld/dist: ELF test/ELF test/ELF/Inputs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:35:19 -0000 Author: dim Date: Wed Feb 1 21:35:17 2017 New Revision: 313063 URL: https://svnweb.freebsd.org/changeset/base/313063 Log: Vendor import of lld release_40 branch r293807: https://llvm.org/svn/llvm-project/lld/branches/release_40@293807 Added: vendor/lld/dist/test/ELF/Inputs/dtrace-r.o (contents, props changed) vendor/lld/dist/test/ELF/aarch64-relro.s (contents, props changed) vendor/lld/dist/test/ELF/dtrace-r.test Modified: vendor/lld/dist/ELF/InputFiles.h vendor/lld/dist/ELF/InputSection.cpp vendor/lld/dist/ELF/SyntheticSections.cpp vendor/lld/dist/ELF/SyntheticSections.h vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/test/ELF/basic-mips.s vendor/lld/dist/test/ELF/basic-ppc.s Modified: vendor/lld/dist/ELF/InputFiles.h ============================================================================== --- vendor/lld/dist/ELF/InputFiles.h Wed Feb 1 21:35:14 2017 (r313062) +++ vendor/lld/dist/ELF/InputFiles.h Wed Feb 1 21:35:17 2017 (r313063) @@ -180,10 +180,6 @@ public: // R_MIPS_GPREL16 / R_MIPS_GPREL32 relocations. uint32_t MipsGp0 = 0; - // The number is the offset in the string table. It will be used as the - // st_name of the symbol. - std::vector *, unsigned>> KeptLocalSyms; - // Name of source file obtained from STT_FILE symbol value, // or empty string if there is no such symbol in object file // symbol table. Modified: vendor/lld/dist/ELF/InputSection.cpp ============================================================================== --- vendor/lld/dist/ELF/InputSection.cpp Wed Feb 1 21:35:14 2017 (r313062) +++ vendor/lld/dist/ELF/InputSection.cpp Wed Feb 1 21:35:17 2017 (r313063) @@ -246,7 +246,8 @@ void InputSection::copyRelocations if (Config->Rela) P->r_addend = getAddend(Rel); P->r_offset = RelocatedSection->getOffset(Rel.r_offset); - P->setSymbolAndType(Body.DynsymIndex, Type, Config->Mips64EL); + P->setSymbolAndType(In::SymTab->getSymbolIndex(&Body), Type, + Config->Mips64EL); } } Modified: vendor/lld/dist/ELF/SyntheticSections.cpp ============================================================================== --- vendor/lld/dist/ELF/SyntheticSections.cpp Wed Feb 1 21:35:14 2017 (r313062) +++ vendor/lld/dist/ELF/SyntheticSections.cpp Wed Feb 1 21:35:17 2017 (r313063) @@ -1065,22 +1065,21 @@ template void SymbolTableSe this->OutSec->Info = this->Info = NumLocals + 1; this->OutSec->Entsize = this->Entsize; - if (Config->Relocatable) { - size_t I = NumLocals; - for (const SymbolTableEntry &S : Symbols) - S.Symbol->DynsymIndex = ++I; + if (Config->Relocatable) return; - } if (!StrTabSec.isDynamic()) { - std::stable_sort( - Symbols.begin(), Symbols.end(), - [](const SymbolTableEntry &L, const SymbolTableEntry &R) { - return L.Symbol->symbol()->computeBinding() == STB_LOCAL && - R.Symbol->symbol()->computeBinding() != STB_LOCAL; + auto GlobBegin = Symbols.begin() + NumLocals; + auto It = std::stable_partition( + GlobBegin, Symbols.end(), [](const SymbolTableEntry &S) { + return S.Symbol->symbol()->computeBinding() == STB_LOCAL; }); + // update sh_info with number of Global symbols output with computed + // binding of STB_LOCAL + this->OutSec->Info = this->Info = 1 + It - Symbols.begin(); return; } + if (In::GnuHashTab) // NB: It also sorts Symbols to meet the GNU hash table requirements. In::GnuHashTab->addSymbols(Symbols); @@ -1094,10 +1093,25 @@ template void SymbolTableSe S.Symbol->DynsymIndex = ++I; } -template void SymbolTableSection::addSymbol(SymbolBody *B) { +template void SymbolTableSection::addGlobal(SymbolBody *B) { Symbols.push_back({B, StrTabSec.addString(B->getName(), false)}); } +template void SymbolTableSection::addLocal(SymbolBody *B) { + assert(!StrTabSec.isDynamic()); + ++NumLocals; + Symbols.push_back({B, StrTabSec.addString(B->getName())}); +} + +template +size_t SymbolTableSection::getSymbolIndex(SymbolBody *Body) { + auto I = llvm::find_if( + Symbols, [&](const SymbolTableEntry &E) { return E.Symbol == Body; }); + if (I == Symbols.end()) + return 0; + return I - Symbols.begin() + 1; +} + template void SymbolTableSection::writeTo(uint8_t *Buf) { Buf += sizeof(Elf_Sym); @@ -1113,26 +1127,24 @@ template void SymbolTableSection::writeLocalSymbols(uint8_t *&Buf) { // Iterate over all input object files to copy their local symbols // to the output symbol table pointed by Buf. - for (ObjectFile *File : Symtab::X->getObjectFiles()) { - for (const std::pair *, size_t> &P : - File->KeptLocalSyms) { - const DefinedRegular &Body = *P.first; - InputSectionBase *Section = Body.Section; - auto *ESym = reinterpret_cast(Buf); - - if (!Section) { - ESym->st_shndx = SHN_ABS; - ESym->st_value = Body.Value; - } else { - const OutputSectionBase *OutSec = Section->OutSec; - ESym->st_shndx = OutSec->SectionIndex; - ESym->st_value = OutSec->Addr + Section->getOffset(Body); - } - ESym->st_name = P.second; - ESym->st_size = Body.template getSize(); - ESym->setBindingAndType(STB_LOCAL, Body.Type); - Buf += sizeof(*ESym); + + for (auto I = Symbols.begin(); I != Symbols.begin() + NumLocals; ++I) { + const DefinedRegular &Body = *cast>(I->Symbol); + InputSectionBase *Section = Body.Section; + auto *ESym = reinterpret_cast(Buf); + + if (!Section) { + ESym->st_shndx = SHN_ABS; + ESym->st_value = Body.Value; + } else { + const OutputSectionBase *OutSec = Section->OutSec; + ESym->st_shndx = OutSec->SectionIndex; + ESym->st_value = OutSec->Addr + Section->getOffset(Body); } + ESym->st_name = I->StrTabOffset; + ESym->st_size = Body.template getSize(); + ESym->setBindingAndType(STB_LOCAL, Body.Type); + Buf += sizeof(*ESym); } } @@ -1141,7 +1153,9 @@ void SymbolTableSection::writeGlob // Write the internal symbol table contents to the output symbol table // pointed by Buf. auto *ESym = reinterpret_cast(Buf); - for (const SymbolTableEntry &S : Symbols) { + + for (auto I = Symbols.begin() + NumLocals; I != Symbols.end(); ++I) { + const SymbolTableEntry &S = *I; SymbolBody *Body = S.Symbol; size_t StrOff = S.StrTabOffset; Modified: vendor/lld/dist/ELF/SyntheticSections.h ============================================================================== --- vendor/lld/dist/ELF/SyntheticSections.h Wed Feb 1 21:35:14 2017 (r313062) +++ vendor/lld/dist/ELF/SyntheticSections.h Wed Feb 1 21:35:17 2017 (r313063) @@ -366,23 +366,26 @@ public: void finalize() override; void writeTo(uint8_t *Buf) override; size_t getSize() const override { return getNumSymbols() * sizeof(Elf_Sym); } - void addSymbol(SymbolBody *Body); + void addGlobal(SymbolBody *Body); + void addLocal(SymbolBody *Body); StringTableSection &getStrTabSec() const { return StrTabSec; } - unsigned getNumSymbols() const { return NumLocals + Symbols.size() + 1; } + unsigned getNumSymbols() const { return Symbols.size() + 1; } + size_t getSymbolIndex(SymbolBody *Body); ArrayRef getSymbols() const { return Symbols; } static const OutputSectionBase *getOutputSection(SymbolBody *Sym); - unsigned NumLocals = 0; - StringTableSection &StrTabSec; - private: void writeLocalSymbols(uint8_t *&Buf); void writeGlobalSymbols(uint8_t *Buf); // A vector of symbols and their string table offsets. std::vector Symbols; + + StringTableSection &StrTabSec; + + unsigned NumLocals = 0; }; // Outputs GNU Hash section. For detailed explanation see: Modified: vendor/lld/dist/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist/ELF/Writer.cpp Wed Feb 1 21:35:14 2017 (r313062) +++ vendor/lld/dist/ELF/Writer.cpp Wed Feb 1 21:35:17 2017 (r313063) @@ -455,11 +455,7 @@ template void Writer: InputSectionBase *Sec = DR->Section; if (!shouldKeepInSymtab(Sec, B->getName(), *B)) continue; - ++In::SymTab->NumLocals; - if (Config->Relocatable) - B->DynsymIndex = In::SymTab->NumLocals; - F->KeptLocalSyms.push_back(std::make_pair( - DR, In::SymTab->StrTabSec.addString(B->getName()))); + In::SymTab->addLocal(B); } } } @@ -1024,10 +1020,10 @@ template void Writer: if (!includeInSymtab(*Body)) continue; if (In::SymTab) - In::SymTab->addSymbol(Body); + In::SymTab->addGlobal(Body); if (In::DynSymTab && S->includeInDynsym()) { - In::DynSymTab->addSymbol(Body); + In::DynSymTab->addGlobal(Body); if (auto *SS = dyn_cast>(Body)) if (SS->file()->isNeeded()) In::VerNeed->addSymbol(SS); @@ -1466,7 +1462,7 @@ template void Writer: // The glibc dynamic loader rounds the size down, so we need to round up // to protect the last page. This is a no-op on FreeBSD which always // rounds up. - P.p_memsz = alignTo(P.p_memsz, Config->MaxPageSize); + P.p_memsz = alignTo(P.p_memsz, Target->PageSize); } // The TLS pointer goes after PT_TLS. At least glibc will align it, Added: vendor/lld/dist/test/ELF/Inputs/dtrace-r.o ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/test/ELF/aarch64-relro.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/ELF/aarch64-relro.s Wed Feb 1 21:35:17 2017 (r313063) @@ -0,0 +1,14 @@ +# REQUIRES: aarch64 +# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t +# RUN: ld.lld %t -o %t2 +# RUN: llvm-readobj -program-headers %t2 | FileCheck %s + +# CHECK: Type: PT_GNU_RELRO +# CHECK-NEXT: Offset: +# CHECK-NEXT: VirtualAddress: +# CHECK-NEXT: PhysicalAddress: +# CHECK-NEXT: FileSize: +# CHECK-NEXT: MemSize: 4096 + +.section .data.rel.ro,"aw",%progbits +.byte 1 Modified: vendor/lld/dist/test/ELF/basic-mips.s ============================================================================== --- vendor/lld/dist/test/ELF/basic-mips.s Wed Feb 1 21:35:14 2017 (r313062) +++ vendor/lld/dist/test/ELF/basic-mips.s Wed Feb 1 21:35:17 2017 (r313063) @@ -176,7 +176,7 @@ __start: # CHECK-NEXT: Offset: 0x20010 # CHECK-NEXT: Size: 48 # CHECK-NEXT: Link: 10 -# CHECK-NEXT: Info: 1 +# CHECK-NEXT: Info: 2 # CHECK-NEXT: AddressAlignment: 4 # CHECK-NEXT: EntrySize: 16 # CHECK-NEXT: } Modified: vendor/lld/dist/test/ELF/basic-ppc.s ============================================================================== --- vendor/lld/dist/test/ELF/basic-ppc.s Wed Feb 1 21:35:14 2017 (r313062) +++ vendor/lld/dist/test/ELF/basic-ppc.s Wed Feb 1 21:35:17 2017 (r313063) @@ -178,7 +178,7 @@ // CHECK-NEXT: Offset: 0x2038 // CHECK-NEXT: Size: 32 // CHECK-NEXT: Link: 9 -// CHECK-NEXT: Info: 1 +// CHECK-NEXT: Info: 2 // CHECK-NEXT: AddressAlignment: 4 // CHECK-NEXT: EntrySize: 16 // CHECK-NEXT: SectionData ( Added: vendor/lld/dist/test/ELF/dtrace-r.test ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/ELF/dtrace-r.test Wed Feb 1 21:35:17 2017 (r313063) @@ -0,0 +1,8 @@ +RUN: ld.lld -r -o %t.o %p/Inputs/dtrace-r.o +RUN: llvm-readobj -r %t.o | FileCheck %s + +CHECK: Relocations [ +CHECK-NEXT: Section ({{.*}}) .rela.text { +CHECK-NEXT: 0x0 R_X86_64_NONE - 0x0 +CHECK-NEXT: } +CHECK-NEXT: ] From owner-svn-src-all@freebsd.org Wed Feb 1 21:35:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0DB1CCCF4F; Wed, 1 Feb 2017 21:35:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97DA6EF9; Wed, 1 Feb 2017 21:35:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11LZMUE000315; Wed, 1 Feb 2017 21:35:22 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LZM2a000314; Wed, 1 Feb 2017 21:35:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012135.v11LZM2a000314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:35:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313064 - vendor/lld/lld-release_40-r293807 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:35:24 -0000 Author: dim Date: Wed Feb 1 21:35:22 2017 New Revision: 313064 URL: https://svnweb.freebsd.org/changeset/base/313064 Log: Tag lld release_40 branch r293807. Added: vendor/lld/lld-release_40-r293807/ - copied from r313063, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Wed Feb 1 21:35:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30709CCCED8; Wed, 1 Feb 2017 21:35:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB4D4E05; Wed, 1 Feb 2017 21:35:15 +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 v11LZEWY000210; Wed, 1 Feb 2017 21:35:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LZEOt000209; Wed, 1 Feb 2017 21:35:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012135.v11LZEOt000209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313062 - vendor/libc++/libc++-release_40-r293807 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:35:16 -0000 Author: dim Date: Wed Feb 1 21:35:14 2017 New Revision: 313062 URL: https://svnweb.freebsd.org/changeset/base/313062 Log: Tag libc++ release_40 branch r293807. Added: vendor/libc++/libc++-release_40-r293807/ - copied from r313061, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Wed Feb 1 21:35:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41CA1CCCF97; Wed, 1 Feb 2017 21:35:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D98C2F67; Wed, 1 Feb 2017 21:35:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11LZPfP000366; Wed, 1 Feb 2017 21:35:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11LZPj9000365; Wed, 1 Feb 2017 21:35:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702012135.v11LZPj9000365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 1 Feb 2017 21:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313065 - vendor/lldb/lldb-release_40-r293807 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:35:27 -0000 Author: dim Date: Wed Feb 1 21:35:25 2017 New Revision: 313065 URL: https://svnweb.freebsd.org/changeset/base/313065 Log: Tag lldb release_40 branch r293807. Added: vendor/lldb/lldb-release_40-r293807/ - copied from r313064, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Wed Feb 1 21:40:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAE88CCB1A6; Wed, 1 Feb 2017 21:40:00 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "StartCom Class 2 IV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EED01924; Wed, 1 Feb 2017 21:40:00 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 5BD75312; Wed, 1 Feb 2017 15:39:58 -0600 (CST) Date: Wed, 1 Feb 2017 15:39:57 -0600 From: Mark Linimon To: Slawa Olhovchenkov Cc: John Baldwin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170201213956.GA3765@lonesome.com> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> <20170201170950.GF79121@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170201170950.GF79121@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:40:00 -0000 On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote: > Also, I am think current ports don't build on 4.x. I will personally guarantee, in writing, that current ports do not build on 4.x, nor have they done so for years. I personally removed the legacy cruft when 4.11 finally went EOL. > I am got complains about using ports on 8.x. I am 99% certain that ports will not work on either 8.x or 9.x. Legacy cruft was removed at the EOL in each of those cases. Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x, 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical attention at once. At the absolute least, that era spans 3 major versions of make(1) and two completely different package implementations. mcl From owner-svn-src-all@freebsd.org Wed Feb 1 21:44:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE841CCB57D; Wed, 1 Feb 2017 21:44:51 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F8221E41; Wed, 1 Feb 2017 21:44:51 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11LioKF004373; Wed, 1 Feb 2017 21:44:50 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11Liooa004371; Wed, 1 Feb 2017 21:44:50 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201702012144.v11Liooa004371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 1 Feb 2017 21:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313066 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:44:52 -0000 Author: kp Date: Wed Feb 1 21:44:50 2017 New Revision: 313066 URL: https://svnweb.freebsd.org/changeset/base/313066 Log: MFC 312782 bridge: Release the bridge lock when calling bridge_set_ifcap() This calls ioctl() handlers for the different interfaces in the bridge. These handlers expect to get called in an ioctl context where it's safe for them to sleep. We may not sleep with the bridge lock held. However, we still need to protect the interface list, to ensure it doesn't get changed while we iterate over it. Use BRIDGE_XLOCK(), which prevents bridge members from being removed. Adding bridge members is safe, because it uses LIST_INSERT_HEAD(). This caused panics when adding xen interfaces to a bridge. PR: 216304 Reviewed by: ae Sponsored by: RootBSD Differential Revision: https://reviews.freebsd.org/D9290 Modified: stable/10/sys/net/if_bridge.c stable/10/sys/net/if_bridgevar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_bridge.c ============================================================================== --- stable/10/sys/net/if_bridge.c Wed Feb 1 21:35:25 2017 (r313065) +++ stable/10/sys/net/if_bridge.c Wed Feb 1 21:44:50 2017 (r313066) @@ -860,14 +860,18 @@ bridge_mutecaps(struct bridge_softc *sc) mask &= bif->bif_savedcaps; } + BRIDGE_XLOCK(sc); LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { enabled = bif->bif_ifp->if_capenable; enabled &= ~BRIDGE_IFCAPS_STRIP; /* strip off mask bits and enable them again if allowed */ enabled &= ~BRIDGE_IFCAPS_MASK; enabled |= mask; + BRIDGE_UNLOCK(sc); bridge_set_ifcap(sc, bif, enabled); + BRIDGE_LOCK(sc); } + BRIDGE_XDROP(sc); } @@ -878,6 +882,8 @@ bridge_set_ifcap(struct bridge_softc *sc struct ifreq ifr; int error; + BRIDGE_UNLOCK_ASSERT(sc); + bzero(&ifr, sizeof(ifr)); ifr.ifr_reqcap = set; Modified: stable/10/sys/net/if_bridgevar.h ============================================================================== --- stable/10/sys/net/if_bridgevar.h Wed Feb 1 21:35:25 2017 (r313065) +++ stable/10/sys/net/if_bridgevar.h Wed Feb 1 21:44:50 2017 (r313066) @@ -280,6 +280,7 @@ struct ifbpstpconf { #define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) #define BRIDGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) +#define BRIDGE_UNLOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) #define BRIDGE_LOCK2REF(_sc, _err) do { \ mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ if ((_sc)->sc_iflist_xcnt > 0) \ From owner-svn-src-all@freebsd.org Wed Feb 1 21:48:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1CCECCB799; Wed, 1 Feb 2017 21:48:01 +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 90E7E7BA; Wed, 1 Feb 2017 21:48:01 +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 6268310A7B9; Wed, 1 Feb 2017 16:48:00 -0500 (EST) From: John Baldwin To: Gleb Smirnoff Cc: Edward Tomasz Napierala , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r312988 - in head/sys: compat/cloudabi compat/linux kern sys Date: Wed, 01 Feb 2017 12:36:31 -0800 Message-ID: <148601396.h8ndg2hV6R@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170201182337.GG3334@FreeBSD.org> References: <201701301257.v0UCvNrK065993@repo.freebsd.org> <3349880.lYJPXOWCO7@ralph.baldwin.cx> <20170201182337.GG3334@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, 01 Feb 2017 16:48:00 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:48:01 -0000 On Wednesday, February 01, 2017 10:23:37 AM Gleb Smirnoff wrote: > On Tue, Jan 31, 2017 at 02:13:36PM -0800, John Baldwin wrote: > J> On Monday, January 30, 2017 12:57:23 PM Edward Tomasz Napierala wrote: > J> > Author: trasz > J> > Date: Mon Jan 30 12:57:22 2017 > J> > New Revision: 312988 > J> > URL: https://svnweb.freebsd.org/changeset/base/312988 > J> > > J> > Log: > J> > Add kern_listen(), kern_shutdown(), and kern_socket(), and use them > J> > instead of their sys_*() counterparts in various compats. The svr4 > J> > is left untouched, because there's no point. > J> > J> Note that you can compile test svr4 since it is still in the tree. > J> If we want to remove svr4, then we should remove it. However, we > J> should maintain code that is in the tree if it is still there. > > All we can do right now is maintain it as compilable. My example with > COMPAT_OLDSOCK shows that SVR4 simply doesn't work as kld, and nobody > complains. > > Okay, what if I say on freebsd-arch/freebsd-current that I am going > to remove it and wait for any objections for a month, and then do it? I would rather remove it than start skipping it in tree sweeps. We should strive to maintain code that is in our tree. If you can't get things tested, then we are better off removing the code instead of having it rot in the tree (cf the discussion on old ISA drivers). -- John Baldwin From owner-svn-src-all@freebsd.org Wed Feb 1 21:48:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8F88CCB79A; Wed, 1 Feb 2017 21:48:01 +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 95B6B7BB; Wed, 1 Feb 2017 21:48:01 +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 08D1B10A791; Wed, 1 Feb 2017 16:47:59 -0500 (EST) From: John Baldwin To: Mark Linimon Cc: Slawa Olhovchenkov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Date: Wed, 01 Feb 2017 13:45:14 -0800 Message-ID: <1893823.eZvhe4dRmn@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170201213956.GA3765@lonesome.com> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <20170201170950.GF79121@zxy.spb.ru> <20170201213956.GA3765@lonesome.com> 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, 01 Feb 2017 16:47:59 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:48:01 -0000 On Wednesday, February 01, 2017 03:39:57 PM Mark Linimon wrote: > On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote: > > Also, I am think current ports don't build on 4.x. > > I will personally guarantee, in writing, that current ports do not build > on 4.x, nor have they done so for years. I personally removed the legacy > cruft when 4.11 finally went EOL. > > > I am got complains about using ports on 8.x. > > I am 99% certain that ports will not work on either 8.x or 9.x. Legacy > cruft was removed at the EOL in each of those cases. > > Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x, > 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical > attention at once. At the absolute least, that era spans 3 major versions > of make(1) and two completely different package implementations. I think Slawa's point was that my suggestion that people with old hardware should run old releases means that they cannot use a modern ports checkout with those older systems. That point is correct, but you probably don't want to run newer, more bloated 3rd party software on such gear either. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Feb 1 21:50:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C276CCBB4D; Wed, 1 Feb 2017 21:50:15 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09D6C1215; Wed, 1 Feb 2017 21:50:15 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cZ2n1-000Ifb-5k; Thu, 02 Feb 2017 00:50:07 +0300 Date: Thu, 2 Feb 2017 00:50:07 +0300 From: Slawa Olhovchenkov To: Mark Linimon Cc: John Baldwin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170201215007.GA37974@zxy.spb.ru> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> <20170201170950.GF79121@zxy.spb.ru> <20170201213956.GA3765@lonesome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170201213956.GA3765@lonesome.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:50:15 -0000 On Wed, Feb 01, 2017 at 03:39:57PM -0600, Mark Linimon wrote: > On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote: > > Also, I am think current ports don't build on 4.x. > > I will personally guarantee, in writing, that current ports do not build > on 4.x, nor have they done so for years. I personally removed the legacy > cruft when 4.11 finally went EOL. > > > I am got complains about using ports on 8.x. > > I am 99% certain that ports will not work on either 8.x or 9.x. Legacy > cruft was removed at the EOL in each of those cases. > > Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x, > 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical > attention at once. At the absolute least, that era spans 3 major versions > of make(1) and two completely different package implementations. I am assume no problem to use new make on old system. May be posible use pkg too (not sure about pkg requirements to syscalls). From owner-svn-src-all@freebsd.org Wed Feb 1 21:54:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64DE7CCC036; Wed, 1 Feb 2017 21:54:58 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 245261C0E; Wed, 1 Feb 2017 21:54:58 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cZ2rg-000Io5-1w; Thu, 02 Feb 2017 00:54:56 +0300 Date: Thu, 2 Feb 2017 00:54:56 +0300 From: Slawa Olhovchenkov To: John Baldwin Cc: Mark Linimon , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170201215455.GB37974@zxy.spb.ru> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <20170201170950.GF79121@zxy.spb.ru> <20170201213956.GA3765@lonesome.com> <1893823.eZvhe4dRmn@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1893823.eZvhe4dRmn@ralph.baldwin.cx> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:54:58 -0000 On Wed, Feb 01, 2017 at 01:45:14PM -0800, John Baldwin wrote: > On Wednesday, February 01, 2017 03:39:57 PM Mark Linimon wrote: > > On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote: > > > Also, I am think current ports don't build on 4.x. > > > > I will personally guarantee, in writing, that current ports do not build > > on 4.x, nor have they done so for years. I personally removed the legacy > > cruft when 4.11 finally went EOL. > > > > > I am got complains about using ports on 8.x. > > > > I am 99% certain that ports will not work on either 8.x or 9.x. Legacy > > cruft was removed at the EOL in each of those cases. > > > > Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x, > > 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical > > attention at once. At the absolute least, that era spans 3 major versions > > of make(1) and two completely different package implementations. > > I think Slawa's point was that my suggestion that people with old hardware > should run old releases means that they cannot use a modern ports checkout Yes. > with those older systems. That point is correct, but you probably don't > want to run newer, more bloated 3rd party software on such gear either. Not all software bloated, some software need to updated (for example, not sure about sshd in 4.x system. Or openssl). From owner-svn-src-all@freebsd.org Wed Feb 1 21:55:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86677CCC096 for ; Wed, 1 Feb 2017 21:55:54 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DEDF1D62 for ; Wed, 1 Feb 2017 21:55:53 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 2d40e750-e8c9-11e6-95b5-6dfd7dbb0ee5 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.eu.mailhop.org (Halon) with ESMTPSA id 2d40e750-e8c9-11e6-95b5-6dfd7dbb0ee5; Wed, 01 Feb 2017 21:55:44 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v11Ltavn019737; Wed, 1 Feb 2017 14:55:36 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1485986136.3017.89.camel@freebsd.org> Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... From: Ian Lepore To: Slawa Olhovchenkov , Mark Linimon Cc: John Baldwin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Takahashi Yoshihiro Date: Wed, 01 Feb 2017 14:55:36 -0700 In-Reply-To: <20170201215007.GA37974@zxy.spb.ru> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> <20170201170950.GF79121@zxy.spb.ru> <20170201213956.GA3765@lonesome.com> <20170201215007.GA37974@zxy.spb.ru> 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 21:55:54 -0000 On Thu, 2017-02-02 at 00:50 +0300, Slawa Olhovchenkov wrote: > On Wed, Feb 01, 2017 at 03:39:57PM -0600, Mark Linimon wrote: > > > > > On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote: > > > > > > Also, I am think current ports don't build on 4.x. > > I will personally guarantee, in writing, that current ports do not > > build > > on 4.x, nor have they done so for years.I personally removed the > > legacy > > cruft when 4.11 finally went EOL. > > > > > > > > I am got complains about using ports on 8.x. > > I am 99% certain that ports will not work on either 8.x or > > 9.x.Legacy > > cruft was removed at the EOL in each of those cases. > > > > Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, > > 8.x, > > 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek > > medical > > attention at once.At the absolute least, that era spans 3 major > > versions > > of make(1) and two completely different package implementations. > I am assume no problem to use new make on old system. > May be posible use pkg too (not sure about pkg requirements to > syscalls). > I can't say anything about 4.x, but I have no problems building current ports on 8.2. I have backported a few crucial changes to make, like handling :tl and :tu, and that's about it. It may not be officially supported, but it's not hard to make it work for those who have a need. I also still support systems that use true ISA-slot hardware, but that doesn't include any storage or network controllers. Mostly the ISA cards are proprietary things, plus one ancient 8-port uart expansion card that amazingly still works and can still be purchased. -- Ian From owner-svn-src-all@freebsd.org Wed Feb 1 22:04:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 250F0CCC2D6; Wed, 1 Feb 2017 22:04:01 +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 C325A784; Wed, 1 Feb 2017 22:04:00 +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 v11M3xBu013914; Wed, 1 Feb 2017 22:03:59 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11M3xs2013913; Wed, 1 Feb 2017 22:03:59 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201702012203.v11M3xs2013913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 1 Feb 2017 22:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313068 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 22:04:01 -0000 Author: gonzo Date: Wed Feb 1 22:03:59 2017 New Revision: 313068 URL: https://svnweb.freebsd.org/changeset/base/313068 Log: [am335x] Fallback to standard video interface bindings when using Linux dts Historically AM335x LCDC driver used non-standard "hdmi" property to refer to HDMI framer. There is no such thing in upstream DTS, so to handle both cases fallback to bindings described in bindings/media/video-interfaces.txt in Linux documentation. We still make some assumptions that are not universally true: we assume that if remote endpoint is available it's going to be HDMI framer. Which is true for AM335x-based devices currently supported but may be not true for some custom hardware. MFC after: 1 week Modified: head/sys/arm/ti/am335x/am335x_lcd.c Modified: head/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_lcd.c Wed Feb 1 21:57:07 2017 (r313067) +++ head/sys/arm/ti/am335x/am335x_lcd.c Wed Feb 1 22:03:59 2017 (r313068) @@ -343,15 +343,46 @@ static void am335x_read_hdmi_property(device_t dev) { phandle_t node; + phandle_t endpoint; phandle_t hdmi_xref; struct am335x_lcd_softc *sc; sc = device_get_softc(dev); node = ofw_bus_get_node(dev); - if (OF_getencprop(node, "hdmi", &hdmi_xref, sizeof(hdmi_xref)) == -1) - sc->sc_hdmi_framer = 0; - else - sc->sc_hdmi_framer = hdmi_xref; + sc->sc_hdmi_framer = 0; + + /* + * Old FreeBSD way of referencing to HDMI framer + */ + if (OF_getencprop(node, "hdmi", &hdmi_xref, sizeof(hdmi_xref)) != -1) { + sc->sc_hdmi_framer = hdmi_xref; + return; + } + + /* + * Use bindings described in Linux docs: + * bindings/media/video-interfaces.txt + * We assume that the only endpoint in LCDC node + * is HDMI framer. + */ + node = ofw_bus_find_child(node, "port"); + + /* No media bindings */ + if (node == 0) + return; + + for (endpoint = OF_child(node); endpoint != 0; endpoint = OF_peer(endpoint)) { + if (OF_getencprop(endpoint, "remote-endpoint", &node, sizeof(node)) != -1) { + /* port node of remote endpoint */ + node = OF_node_from_xref(node); + /* port/ node */ + node = OF_parent(node); + /* actual owner of port/endpoint, in our case HDMI framer */ + sc->sc_hdmi_framer = OF_parent(node); + if (sc->sc_hdmi_framer != 0) + return; + } + } } static int From owner-svn-src-all@freebsd.org Wed Feb 1 22:08:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58105CCC352; Wed, 1 Feb 2017 22:08:21 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16E17AAC; Wed, 1 Feb 2017 22:08:21 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cZ34d-000JCx-1S; Thu, 02 Feb 2017 01:08:19 +0300 Date: Thu, 2 Feb 2017 01:08:19 +0300 From: Slawa Olhovchenkov To: Warner Losh Cc: John Baldwin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Takahashi Yoshihiro Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170201220818.GC37974@zxy.spb.ru> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> <20170201170639.GY37974@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 22:08:21 -0000 On Wed, Feb 01, 2017 at 10:56:24AM -0700, Warner Losh wrote: > >> > > Fair enough. I haven't fully put away my 12 axe and am toying with > >> > > dropping any ISA-only storage and NIC drivers (and perhaps pccard-only > >> > > as well in that case). Hardware that wants to use ISA/pccard for > >> > > storage is probably happier running 4.x anyway. One question is if we > >> > > should drop ISA attachments in that case for drivers that support PCI > >> > > and ISA. However, there's a fair list of ISA-only adapters that would > >> > > be a good place to start anyway. One concern is to not drop any drivers > >> > > >> > ps/2 keyboard, mouse, touchpads, lm sensors, etc?... > >> > >> Those aren't storage or NICs. There are many "legacy" device still present > >> in modern systems that we obviously have to support. However, if you have > >> an ISA Adapter SCSI HBA in an ISA slot, the machine running that is probably > >> happier running 4.x than 12.0. > > > > My be I am missread, I think removed ISA bus and all devices attached > > to ISA bus. > > We will never ever ever remove the ISA bus on the i386 or amd64 ports. > That's simply not possible due to the legacy busses and the fact that > many devices are logically attached to the address space used by the > ISA bus even if there aren't physical plastic ISA slots. Ah, sorry, this is my missread. I am don't have any ISA cards in use many years. Only some ISA COM/LPT/sound cards in far-away box. PS: again, may be time to move all drivers to modules and load all GENERIC's devices from loader.conf? /boot/loader have good performance now. From owner-svn-src-all@freebsd.org Wed Feb 1 23:22:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0AD2CCC715; Wed, 1 Feb 2017 23:22:55 +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 6616615AF; Wed, 1 Feb 2017 23:22:55 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v11NMsq4046864; Wed, 1 Feb 2017 23:22:54 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v11NMspn046862; Wed, 1 Feb 2017 23:22:54 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702012322.v11NMspn046862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 1 Feb 2017 23:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313069 - in head/etc/periodic: daily monthly weekly X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 23:22:55 -0000 Author: asomers Date: Wed Feb 1 23:22:54 2017 New Revision: 313069 URL: https://svnweb.freebsd.org/changeset/base/313069 Log: Allow 999.local to run scripts in any language If one of the scripts listed in (daily|weekly|monthly)_local is executable, 999.local should simply execute it. Only if the script isn't executable should 999.local assume it needs /bin/sh. Reviewed by: brian MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/etc/periodic/daily/999.local head/etc/periodic/monthly/999.local head/etc/periodic/weekly/999.local Modified: head/etc/periodic/daily/999.local ============================================================================== --- head/etc/periodic/daily/999.local Wed Feb 1 22:03:59 2017 (r313068) +++ head/etc/periodic/daily/999.local Wed Feb 1 23:22:54 2017 (r313069) @@ -20,7 +20,12 @@ do echo '' case "$script" in /*) - if [ -f "$script" ] + if [ -x "$script" ] + then + echo "Running $script:" + + $script || rc=3 + elif [ -f "$script" ] then echo "Running $script:" Modified: head/etc/periodic/monthly/999.local ============================================================================== --- head/etc/periodic/monthly/999.local Wed Feb 1 22:03:59 2017 (r313068) +++ head/etc/periodic/monthly/999.local Wed Feb 1 23:22:54 2017 (r313069) @@ -17,7 +17,12 @@ do echo '' case "$script" in /*) - if [ -f "$script" ] + if [ -x "$script" ] + then + echo "Running $script:" + + $script || rc=3 + elif [ -f "$script" ] then echo "Running $script:" Modified: head/etc/periodic/weekly/999.local ============================================================================== --- head/etc/periodic/weekly/999.local Wed Feb 1 22:03:59 2017 (r313068) +++ head/etc/periodic/weekly/999.local Wed Feb 1 23:22:54 2017 (r313069) @@ -17,7 +17,12 @@ do echo '' case "$script" in /*) - if [ -f "$script" ] + if [ -x "$script" ] + then + echo "Running $script:" + + $script || rc=3 + elif [ -f "$script" ] then echo "Running $script:" From owner-svn-src-all@freebsd.org Wed Feb 1 23:26:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36E95CCC7B5; Wed, 1 Feb 2017 23:26:22 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13C751747; Wed, 1 Feb 2017 23:26:22 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 5E93E39E0; Wed, 1 Feb 2017 23:26:21 +0000 (UTC) Date: Wed, 1 Feb 2017 23:26:21 +0000 From: Alexey Dokuchaev To: Mark Linimon Cc: Slawa Olhovchenkov , src-committers , John Baldwin , "svn-src-all@freebsd.org" , Takahashi Yoshihiro , "svn-src-head@freebsd.org" , Warner Losh Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170201232621.GA20035@FreeBSD.org> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> <20170201170950.GF79121@zxy.spb.ru> <20170201213956.GA3765@lonesome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170201213956.GA3765@lonesome.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 23:26:22 -0000 On Wed, Feb 01, 2017 at 03:39:57PM -0600, Mark Linimon wrote: > On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote: > > Also, I am think current ports don't build on 4.x. > > I will personally guarantee, in writing, that current ports do not build > on 4.x, nor have they done so for years. I personally removed the legacy > cruft when 4.11 finally went EOL. They don't build as is, but they still can be tamed (patched) to build and install nicely on 4.x with some effort. Most remaining 4.x installations are server ones which typically carry a well known selection of ports that are not hard to maintain locally for 4.x compatibility. One does not have to have *entire* tree to build flawlessly on 4.x. > > I am got complains about using ports on 8.x. > > I am 99% certain that ports will not work on either 8.x or 9.x. Legacy > cruft was removed at the EOL in each of those cases. That's quite wrong actually: most ports build and run just fine on 8.x (X.org stack is one major exception), with some fairly trivial changes. > Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, 8.x, > 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek medical > attention at once. Well, we're doing something more than devoid any support claims: we're deliberately breaking it, often for little to no reason. Things like r431746 are disgrace to FreeBSD and utter disrespect to our users. :-( > At the absolute least, that era spans 3 major versions of make(1) and > two completely different package implementations. That's largely irrelevant and hardly ever causing problems. All needed make(1) implementations are available in ports; I can still build modern ports in 8.x tinderbox with WITH_PKGNG=yes/PKGSUFFIX=.txz. ./danfe From owner-svn-src-all@freebsd.org Thu Feb 2 00:12:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3142DCCC899; Thu, 2 Feb 2017 00:12:26 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDCC911CB; Thu, 2 Feb 2017 00:12:25 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v120CPXF067551; Thu, 2 Feb 2017 00:12:25 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v120COwV067543; Thu, 2 Feb 2017 00:12:24 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201702020012.v120COwV067543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 2 Feb 2017 00:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313070 - stable/11/sys/dev/qlxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 00:12:26 -0000 Author: davidcs Date: Thu Feb 2 00:12:24 2017 New Revision: 313070 URL: https://svnweb.freebsd.org/changeset/base/313070 Log: MFC r312728 Added support for if_transmit and if_qflush Removed if_start updated version to 3.10.33 Modified: stable/11/sys/dev/qlxgbe/ql_def.h stable/11/sys/dev/qlxgbe/ql_glbl.h stable/11/sys/dev/qlxgbe/ql_hw.c stable/11/sys/dev/qlxgbe/ql_hw.h stable/11/sys/dev/qlxgbe/ql_isr.c stable/11/sys/dev/qlxgbe/ql_os.c stable/11/sys/dev/qlxgbe/ql_os.h stable/11/sys/dev/qlxgbe/ql_ver.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlxgbe/ql_def.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_def.h Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_def.h Thu Feb 2 00:12:24 2017 (r313070) @@ -112,6 +112,16 @@ typedef struct _qla_tx_ring { uint64_t count; } qla_tx_ring_t; +typedef struct _qla_tx_fp { + struct mtx tx_mtx; + char tx_mtx_name[32]; + struct buf_ring *tx_br; + struct task fp_task; + struct taskqueue *fp_taskqueue; + void *ha; + uint32_t txr_idx; +} qla_tx_fp_t; + /* * Adapter structure contains the hardware independent information of the * pci function. @@ -178,10 +188,9 @@ struct qla_host { qla_tx_ring_t tx_ring[NUM_TX_RINGS]; bus_dma_tag_t tx_tag; - struct task tx_task; - struct taskqueue *tx_tq; struct callout tx_callout; - struct mtx tx_lock; + + qla_tx_fp_t tx_fp[MAX_SDS_RINGS]; qla_rx_ring_t rx_ring[MAX_RDS_RINGS]; bus_dma_tag_t rx_tag; Modified: stable/11/sys/dev/qlxgbe/ql_glbl.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_glbl.h Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_glbl.h Thu Feb 2 00:12:24 2017 (r313070) @@ -39,6 +39,7 @@ */ extern void ql_mbx_isr(void *arg); extern void ql_isr(void *arg); +extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count); /* * from ql_os.c @@ -66,7 +67,7 @@ extern void qla_reset_promisc(qla_host_t extern int ql_set_allmulti(qla_host_t *ha); extern void qla_reset_allmulti(qla_host_t *ha); extern void ql_update_link_state(qla_host_t *ha); -extern void ql_hw_tx_done(qla_host_t *ha); +extern void ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx); extern int ql_set_max_mtu(qla_host_t *ha, uint32_t mtu, uint16_t cntxt_id); extern void ql_hw_stop_rcv(qla_host_t *ha); extern void ql_get_stats(qla_host_t *ha); @@ -76,7 +77,7 @@ extern void qla_hw_async_event(qla_host_ extern int qla_get_nic_partition(qla_host_t *ha, uint32_t *supports_9kb, uint32_t *num_rcvq); -extern int qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp); +extern int ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp); extern void ql_minidump(qla_host_t *ha); extern int ql_minidump_init(qla_host_t *ha); Modified: stable/11/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_hw.c Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_hw.c Thu Feb 2 00:12:24 2017 (r313070) @@ -51,7 +51,6 @@ static void qla_del_rcv_cntxt(qla_host_t static int qla_init_rcv_cntxt(qla_host_t *ha); static void qla_del_xmt_cntxt(qla_host_t *ha); static int qla_init_xmt_cntxt(qla_host_t *ha); -static void qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx); static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox, uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause); static int qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_idx, @@ -2047,7 +2046,7 @@ ql_hw_send(qla_host_t *ha, bus_dma_segme ha->hw.iscsi_pkt_count++; if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) { - qla_hw_tx_done_locked(ha, txr_idx); + ql_hw_tx_done_locked(ha, txr_idx); if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) { QL_DPRINT8(ha, (dev, "%s: (hw->txr_free <= " @@ -2552,15 +2551,8 @@ qla_init_rcv_cntxt(qla_host_t *ha) qla_host_to_le64(hw->dma_buf.sds_ring[i].dma_addr); rcntxt->sds[i].size = qla_host_to_le32(NUM_STATUS_DESCRIPTORS); - if (ha->msix_count == 2) { - rcntxt->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[0]); - rcntxt->sds[i].intr_src_bit = qla_host_to_le16((i)); - } else { - rcntxt->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[i]); - rcntxt->sds[i].intr_src_bit = qla_host_to_le16(0); - } + rcntxt->sds[i].intr_id = qla_host_to_le16(hw->intr_id[i]); + rcntxt->sds[i].intr_src_bit = qla_host_to_le16(0); } for (i = 0; i < rcntxt_rds_rings; i++) { @@ -2672,17 +2664,11 @@ qla_add_rcv_rings(qla_host_t *ha, uint32 add_rcv->sds[i].size = qla_host_to_le32(NUM_STATUS_DESCRIPTORS); - if (ha->msix_count == 2) { - add_rcv->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[0]); - add_rcv->sds[i].intr_src_bit = qla_host_to_le16(j); - } else { - add_rcv->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[j]); - add_rcv->sds[i].intr_src_bit = qla_host_to_le16(0); - } + add_rcv->sds[i].intr_id = qla_host_to_le16(hw->intr_id[j]); + add_rcv->sds[i].intr_src_bit = qla_host_to_le16(0); } + for (i = 0; (i < nsds); i++) { j = i + sds_idx; @@ -2803,6 +2789,7 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin q80_rsp_tx_cntxt_t *tcntxt_rsp; uint32_t err; qla_hw_tx_cntxt_t *hw_tx_cntxt; + uint32_t intr_idx; hw_tx_cntxt = &hw->tx_cntxt[txr_idx]; @@ -2818,6 +2805,8 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin tcntxt->count_version = (sizeof (q80_rq_tx_cntxt_t) >> 2); tcntxt->count_version |= Q8_MBX_CMD_VERSION; + intr_idx = txr_idx; + #ifdef QL_ENABLE_ISCSI_TLV tcntxt->cap0 = Q8_TX_CNTXT_CAP0_BASEFW | Q8_TX_CNTXT_CAP0_LSO | @@ -2827,8 +2816,9 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin tcntxt->traffic_class = 1; } -#else + intr_idx = txr_idx % (ha->hw.num_tx_rings >> 1); +#else tcntxt->cap0 = Q8_TX_CNTXT_CAP0_BASEFW | Q8_TX_CNTXT_CAP0_LSO; #endif /* #ifdef QL_ENABLE_ISCSI_TLV */ @@ -2841,10 +2831,9 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin qla_host_to_le64(hw_tx_cntxt->tx_cons_paddr); tcntxt->tx_ring[0].nentries = qla_host_to_le16(NUM_TX_DESCRIPTORS); - tcntxt->tx_ring[0].intr_id = qla_host_to_le16(hw->intr_id[0]); + tcntxt->tx_ring[0].intr_id = qla_host_to_le16(hw->intr_id[intr_idx]); tcntxt->tx_ring[0].intr_src_bit = qla_host_to_le16(0); - hw_tx_cntxt->txr_free = NUM_TX_DESCRIPTORS; hw_tx_cntxt->txr_next = hw_tx_cntxt->txr_comp = 0; @@ -3166,11 +3155,11 @@ ql_hw_set_multi(qla_host_t *ha, uint8_t } /* - * Name: qla_hw_tx_done_locked + * Name: ql_hw_tx_done_locked * Function: Handle Transmit Completions */ -static void -qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) +void +ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) { qla_tx_buf_t *txb; qla_hw_t *hw = &ha->hw; @@ -3208,34 +3197,6 @@ qla_hw_tx_done_locked(qla_host_t *ha, ui return; } -/* - * Name: ql_hw_tx_done - * Function: Handle Transmit Completions - */ -void -ql_hw_tx_done(qla_host_t *ha) -{ - int i; - uint32_t flag = 0; - - if (!mtx_trylock(&ha->tx_lock)) { - QL_DPRINT8(ha, (ha->pci_dev, - "%s: !mtx_trylock(&ha->tx_lock)\n", __func__)); - return; - } - for (i = 0; i < ha->hw.num_tx_rings; i++) { - qla_hw_tx_done_locked(ha, i); - if (ha->hw.tx_cntxt[i].txr_free <= (NUM_TX_DESCRIPTORS >> 1)) - flag = 1; - } - - if (!flag) - ha->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - - QLA_TX_UNLOCK(ha); - return; -} - void ql_update_link_state(qla_host_t *ha) { @@ -3655,7 +3616,7 @@ qla_get_port_config(qla_host_t *ha, uint } int -qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) +ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) { struct ether_vlan_header *eh; uint16_t etype; Modified: stable/11/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_hw.h Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_hw.h Thu Feb 2 00:12:24 2017 (r313070) @@ -1543,7 +1543,6 @@ typedef struct _qla_hw_tx_cntxt { uint32_t tx_prod_reg; uint16_t tx_cntxt_id; - uint8_t frame_hdr[QL_FRAME_HDR_SIZE]; } qla_hw_tx_cntxt_t; Modified: stable/11/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_isr.c Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_isr.c Thu Feb 2 00:12:24 2017 (r313070) @@ -159,7 +159,12 @@ qla_rx_intr(qla_host_t *ha, qla_sgl_rcv_ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); mpf->m_pkthdr.flowid = sgc->rss_hash; + +#if __FreeBSD_version >= 1100000 M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE_HASH); +#else + M_HASHTYPE_SET(mpf, M_HASHTYPE_NONE); +#endif /* #if __FreeBSD_version >= 1100000 */ (*ifp->if_input)(ifp, mpf); @@ -449,11 +454,11 @@ qla_rcv_cont_sds(qla_host_t *ha, uint32_ } /* - * Name: qla_rcv_isr + * Name: ql_rcv_isr * Function: Main Interrupt Service Routine */ -static uint32_t -qla_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count) +uint32_t +ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count) { device_t dev; qla_hw_t *hw; @@ -703,7 +708,7 @@ qla_rcv_isr(qla_host_t *ha, uint32_t sds } if (ha->flags.stop_rcv) - goto qla_rcv_isr_exit; + goto ql_rcv_isr_exit; if (hw->sds[sds_idx].sdsr_next != comp_idx) { QL_UPDATE_SDS_CONSUMER_INDEX(ha, sds_idx, comp_idx); @@ -726,7 +731,7 @@ qla_rcv_isr(qla_host_t *ha, uint32_t sds if (opcode) ret = -1; -qla_rcv_isr_exit: +ql_rcv_isr_exit: hw->sds[sds_idx].rcv_active = 0; return (ret); @@ -930,7 +935,7 @@ ql_isr(void *arg) int idx; qla_hw_t *hw; struct ifnet *ifp; - uint32_t ret = 0; + qla_tx_fp_t *fp; ha = ivec->ha; hw = &ha->hw; @@ -939,17 +944,12 @@ ql_isr(void *arg) if ((idx = ivec->sds_idx) >= ha->hw.num_sds_rings) return; - if (idx == 0) - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); - - ret = qla_rcv_isr(ha, idx, -1); - if (idx == 0) - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); + fp = &ha->tx_fp[idx]; + + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); - if (!ha->flags.stop_rcv) { - QL_ENABLE_INTERRUPTS(ha, idx); - } return; } Modified: stable/11/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_os.c Wed Feb 1 23:22:54 2017 (r313069) +++ stable/11/sys/dev/qlxgbe/ql_os.c Thu Feb 2 00:12:24 2017 (r313070) @@ -76,11 +76,11 @@ static void qla_release(qla_host_t *ha); static void qla_dmamap_callback(void *arg, bus_dma_segment_t *segs, int nsegs, int error); static void qla_stop(qla_host_t *ha); -static int qla_send(qla_host_t *ha, struct mbuf **m_headp); -static void qla_tx_done(void *context, int pending); static void qla_get_peer(qla_host_t *ha); static void qla_error_recovery(void *context, int pending); static void qla_async_event(void *context, int pending); +static int qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, + uint32_t iscsi_pdu); /* * Hooks to the Operating Systems @@ -93,7 +93,14 @@ static void qla_init(void *arg); static int qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static int qla_media_change(struct ifnet *ifp); static void qla_media_status(struct ifnet *ifp, struct ifmediareq *ifmr); -static void qla_start(struct ifnet *ifp); + +static int qla_transmit(struct ifnet *ifp, struct mbuf *mp); +static void qla_qflush(struct ifnet *ifp); +static int qla_alloc_tx_br(qla_host_t *ha, qla_tx_fp_t *tx_fp); +static void qla_free_tx_br(qla_host_t *ha, qla_tx_fp_t *tx_fp); +static int qla_create_fp_taskqueues(qla_host_t *ha); +static void qla_destroy_fp_taskqueues(qla_host_t *ha); +static void qla_drain_fp_taskqueues(qla_host_t *ha); static device_method_t qla_pci_methods[] = { /* Device interface */ @@ -225,7 +232,6 @@ qla_watchdog(void *arg) qla_hw_t *hw; struct ifnet *ifp; uint32_t i; - qla_hw_tx_cntxt_t *hw_tx_cntxt; hw = &ha->hw; ifp = ha->ifp; @@ -254,19 +260,14 @@ qla_watchdog(void *arg) &ha->async_event_task); } - for (i = 0; i < ha->hw.num_tx_rings; i++) { - hw_tx_cntxt = &hw->tx_cntxt[i]; - if (qla_le32_to_host(*(hw_tx_cntxt->tx_cons)) != - hw_tx_cntxt->txr_comp) { - taskqueue_enqueue(ha->tx_tq, - &ha->tx_task); - break; - } - } + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp = &ha->tx_fp[i]; - if ((ifp->if_snd.ifq_head != NULL) && QL_RUNNING(ifp)) { - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, + &fp->fp_task); } + ha->qla_watchdog_paused = 0; } else { ha->qla_watchdog_paused = 0; @@ -322,9 +323,7 @@ qla_pci_attach(device_t dev) rsrc_len = (uint32_t) bus_get_resource_count(dev, SYS_RES_MEMORY, ha->reg_rid); - mtx_init(&ha->hw_lock, "qla83xx_hw_lock", MTX_NETWORK_LOCK, MTX_SPIN); - - mtx_init(&ha->tx_lock, "qla83xx_tx_lock", MTX_NETWORK_LOCK, MTX_DEF); + mtx_init(&ha->hw_lock, "qla83xx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF); qla_add_sysctls(ha); ql_hw_add_sysctls(ha); @@ -344,8 +343,9 @@ qla_pci_attach(device_t dev) } QL_DPRINT2(ha, (dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" - " msix_count 0x%x pci_reg %p\n", __func__, ha, - ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg)); + " msix_count 0x%x pci_reg %p pci_reg1 %p\n", __func__, ha, + ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg, + ha->pci_reg1)); /* initialize hardware */ if (ql_init_hw(ha)) { @@ -366,14 +366,15 @@ qla_pci_attach(device_t dev) goto qla_pci_attach_err; } device_printf(dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" - " msix_count 0x%x pci_reg %p num_rcvq = %d\n", __func__, ha, - ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg, num_rcvq); + " msix_count 0x%x pci_reg %p pci_reg1 %p num_rcvq = %d\n", + __func__, ha, ha->pci_func, rsrc_len, ha->msix_count, + ha->pci_reg, ha->pci_reg1, num_rcvq); #ifdef QL_ENABLE_ISCSI_TLV if ((ha->msix_count < 64) || (num_rcvq != 32)) { ha->hw.num_sds_rings = 15; - ha->hw.num_tx_rings = 32; + ha->hw.num_tx_rings = ha->hw.num_sds_rings * 2; } #endif /* #ifdef QL_ENABLE_ISCSI_TLV */ ha->hw.num_rds_rings = ha->hw.num_sds_rings; @@ -421,8 +422,20 @@ qla_pci_attach(device_t dev) device_printf(dev, "could not setup interrupt\n"); goto qla_pci_attach_err; } + + ha->tx_fp[i].ha = ha; + ha->tx_fp[i].txr_idx = i; + + if (qla_alloc_tx_br(ha, &ha->tx_fp[i])) { + device_printf(dev, "%s: could not allocate tx_br[%d]\n", + __func__, i); + goto qla_pci_attach_err; + } } + if (qla_create_fp_taskqueues(ha) != 0) + goto qla_pci_attach_err; + printf("%s: mp__ncpus %d sds %d rds %d msi-x %d\n", __func__, mp_ncpus, ha->hw.num_sds_rings, ha->hw.num_rds_rings, ha->msix_count); @@ -452,13 +465,6 @@ qla_pci_attach(device_t dev) ha->flags.qla_watchdog_active = 1; ha->flags.qla_watchdog_pause = 0; - - TASK_INIT(&ha->tx_task, 0, qla_tx_done, ha); - ha->tx_tq = taskqueue_create("qla_txq", M_NOWAIT, - taskqueue_thread_enqueue, &ha->tx_tq); - taskqueue_start_threads(&ha->tx_tq, 1, PI_NET, "%s txq", - device_get_nameunit(ha->pci_dev)); - callout_init(&ha->tx_callout, TRUE); ha->flags.qla_callout_init = 1; @@ -584,11 +590,6 @@ qla_release(qla_host_t *ha) taskqueue_free(ha->err_tq); } - if (ha->tx_tq) { - taskqueue_drain(ha->tx_tq, &ha->tx_task); - taskqueue_free(ha->tx_tq); - } - ql_del_cdev(ha); if (ha->flags.qla_watchdog_active) { @@ -626,13 +627,15 @@ qla_release(qla_host_t *ha) ha->irq_vec[i].irq_rid, ha->irq_vec[i].irq); } + + qla_free_tx_br(ha, &ha->tx_fp[i]); } + qla_destroy_fp_taskqueues(ha); if (ha->msix_count) pci_release_msi(dev); if (ha->flags.lock_init) { - mtx_destroy(&ha->tx_lock); mtx_destroy(&ha->hw_lock); } @@ -807,7 +810,9 @@ qla_init_ifnet(device_t dev, qla_host_t ifp->if_softc = ha; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = qla_ioctl; - ifp->if_start = qla_start; + + ifp->if_transmit = qla_transmit; + ifp->if_qflush = qla_qflush; IFQ_SET_MAXLEN(&ifp->if_snd, qla_get_ifq_snd_maxlen(ha)); ifp->if_snd.ifq_drv_maxlen = qla_get_ifq_snd_maxlen(ha); @@ -817,12 +822,13 @@ qla_init_ifnet(device_t dev, qla_host_t ether_ifattach(ifp, qla_get_mac_addr(ha)); - ifp->if_capabilities = IFCAP_HWCSUM | + ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_TSO4 | - IFCAP_JUMBO_MTU; - - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; - ifp->if_capabilities |= IFCAP_VLAN_HWTSO; + IFCAP_JUMBO_MTU | + IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_MTU | + IFCAP_VLAN_HWTSO | + IFCAP_LRO; ifp->if_capenable = ifp->if_capabilities; @@ -917,10 +923,13 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); - if (QLA_LOCK(ha, __func__, 1) == 0) { - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - QLA_UNLOCK(ha, __func__); - } + //if (QLA_LOCK(ha, __func__, 1) == 0) { + // ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + // QLA_UNLOCK(ha, __func__); + //} + QLA_LOCK(ha, __func__, 1); + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + QLA_UNLOCK(ha, __func__); return (ret); } @@ -1125,64 +1134,10 @@ qla_media_status(struct ifnet *ifp, stru return; } -static void -qla_start(struct ifnet *ifp) -{ - struct mbuf *m_head; - qla_host_t *ha = (qla_host_t *)ifp->if_softc; - - QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); - - if (!mtx_trylock(&ha->tx_lock)) { - QL_DPRINT8(ha, (ha->pci_dev, - "%s: mtx_trylock(&ha->tx_lock) failed\n", __func__)); - return; - } - - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) { - QL_DPRINT8(ha, - (ha->pci_dev, "%s: !IFF_DRV_RUNNING\n", __func__)); - QLA_TX_UNLOCK(ha); - return; - } - - if (!ha->hw.link_up || !ha->watchdog_ticks) - ql_update_link_state(ha); - - if (!ha->hw.link_up) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: link down\n", __func__)); - QLA_TX_UNLOCK(ha); - return; - } - - while (ifp->if_snd.ifq_head != NULL) { - IF_DEQUEUE(&ifp->if_snd, m_head); - - if (m_head == NULL) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: m_head == NULL\n", - __func__)); - break; - } - - if (qla_send(ha, &m_head)) { - if (m_head == NULL) - break; - QL_DPRINT8(ha, (ha->pci_dev, "%s: PREPEND\n", __func__)); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - IF_PREPEND(&ifp->if_snd, m_head); - break; - } - /* Send a copy of the frame to the BPF listener */ - ETHER_BPF_MTAP(ifp, m_head); - } - QLA_TX_UNLOCK(ha); - QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__)); - return; -} static int -qla_send(qla_host_t *ha, struct mbuf **m_headp) +qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, + uint32_t iscsi_pdu) { bus_dma_segment_t segs[QLA_MAX_SEGMENTS]; bus_dmamap_t map; @@ -1190,29 +1145,9 @@ qla_send(qla_host_t *ha, struct mbuf **m int ret = -1; uint32_t tx_idx; struct mbuf *m_head = *m_headp; - uint32_t txr_idx = ha->txr_idx; - uint32_t iscsi_pdu = 0; QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); - /* check if flowid is set */ - - if (M_HASHTYPE_GET(m_head) != M_HASHTYPE_NONE) { -#ifdef QL_ENABLE_ISCSI_TLV - if (qla_iscsi_pdu(ha, m_head) == 0) { - iscsi_pdu = 1; - txr_idx = m_head->m_pkthdr.flowid & - ((ha->hw.num_tx_rings >> 1) - 1); - } else { - txr_idx = m_head->m_pkthdr.flowid & - (ha->hw.num_tx_rings - 1); - } -#else - txr_idx = m_head->m_pkthdr.flowid & (ha->hw.num_tx_rings - 1); -#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ - } - - tx_idx = ha->hw.tx_cntxt[txr_idx].txr_next; map = ha->tx_ring[txr_idx].tx_buf[tx_idx].map; @@ -1290,16 +1225,302 @@ qla_send(qla_host_t *ha, struct mbuf **m return (ret); } +static int +qla_alloc_tx_br(qla_host_t *ha, qla_tx_fp_t *fp) +{ + snprintf(fp->tx_mtx_name, sizeof(fp->tx_mtx_name), + "qla%d_fp%d_tx_mq_lock", ha->pci_func, fp->txr_idx); + + mtx_init(&fp->tx_mtx, fp->tx_mtx_name, NULL, MTX_DEF); + + fp->tx_br = buf_ring_alloc(NUM_TX_DESCRIPTORS, M_DEVBUF, + M_NOWAIT, &fp->tx_mtx); + if (fp->tx_br == NULL) { + QL_DPRINT1(ha, (ha->pci_dev, "buf_ring_alloc failed for " + " fp[%d, %d]\n", ha->pci_func, fp->txr_idx)); + return (-ENOMEM); + } + return 0; +} + +static void +qla_free_tx_br(qla_host_t *ha, qla_tx_fp_t *fp) +{ + struct mbuf *mp; + struct ifnet *ifp = ha->ifp; + + if (mtx_initialized(&fp->tx_mtx)) { + + if (fp->tx_br != NULL) { + + mtx_lock(&fp->tx_mtx); + + while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) { + m_freem(mp); + } + + mtx_unlock(&fp->tx_mtx); + + buf_ring_free(fp->tx_br, M_DEVBUF); + fp->tx_br = NULL; + } + mtx_destroy(&fp->tx_mtx); + } + return; +} + +static void +qla_fp_taskqueue(void *context, int pending) +{ + qla_tx_fp_t *fp; + qla_host_t *ha; + struct ifnet *ifp; + struct mbuf *mp; + int ret; + uint32_t txr_idx; + uint32_t iscsi_pdu = 0; + uint32_t rx_pkts_left; + + fp = context; + + if (fp == NULL) + return; + + ha = (qla_host_t *)fp->ha; + + ifp = ha->ifp; + + txr_idx = fp->txr_idx; + + mtx_lock(&fp->tx_mtx); + + if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) || (!ha->hw.link_up)) { + mtx_unlock(&fp->tx_mtx); + goto qla_fp_taskqueue_exit; + } + + rx_pkts_left = ql_rcv_isr(ha, fp->txr_idx, 64); + +#ifdef QL_ENABLE_ISCSI_TLV + ql_hw_tx_done_locked(ha, fp->txr_idx); + ql_hw_tx_done_locked(ha, (fp->txr_idx + (ha->hw.num_tx_rings >> 1))); + txr_idx = txr_idx + (ha->hw.num_tx_rings >> 1); +#else + ql_hw_tx_done_locked(ha, fp->txr_idx); +#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ + + mp = drbr_peek(ifp, fp->tx_br); + + while (mp != NULL) { + + if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) { +#ifdef QL_ENABLE_ISCSI_TLV + if (ql_iscsi_pdu(ha, mp) == 0) { + iscsi_pdu = 1; + } +#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ + } + + ret = qla_send(ha, &mp, txr_idx, iscsi_pdu); + + if (ret) { + if (mp != NULL) + drbr_putback(ifp, fp->tx_br, mp); + else { + drbr_advance(ifp, fp->tx_br); + } + + mtx_unlock(&fp->tx_mtx); + + goto qla_fp_taskqueue_exit0; + } else { + drbr_advance(ifp, fp->tx_br); + } + + mp = drbr_peek(ifp, fp->tx_br); + } + + mtx_unlock(&fp->tx_mtx); + +qla_fp_taskqueue_exit0: + + if (rx_pkts_left || ((mp != NULL) && ret)) { + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + } else { + if (!ha->flags.stop_rcv) { + QL_ENABLE_INTERRUPTS(ha, fp->txr_idx); + } + } + +qla_fp_taskqueue_exit: + + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + return; +} + +static int +qla_create_fp_taskqueues(qla_host_t *ha) +{ + int i; + uint8_t tq_name[32]; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + bzero(tq_name, sizeof (tq_name)); + snprintf(tq_name, sizeof (tq_name), "ql_fp_tq_%d", i); + + TASK_INIT(&fp->fp_task, 0, qla_fp_taskqueue, fp); + + fp->fp_taskqueue = taskqueue_create_fast(tq_name, M_NOWAIT, + taskqueue_thread_enqueue, + &fp->fp_taskqueue); + + if (fp->fp_taskqueue == NULL) + return (-1); + + taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s", + tq_name); + + QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, + fp->fp_taskqueue)); + } + + return (0); +} + +static void +qla_destroy_fp_taskqueues(qla_host_t *ha) +{ + int i; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + if (fp->fp_taskqueue != NULL) { + taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + taskqueue_free(fp->fp_taskqueue); + fp->fp_taskqueue = NULL; + } + } + return; +} + +static void +qla_drain_fp_taskqueues(qla_host_t *ha) +{ + int i; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + if (fp->fp_taskqueue != NULL) { + taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + } + } + return; +} + +static int +qla_transmit(struct ifnet *ifp, struct mbuf *mp) +{ + qla_host_t *ha = (qla_host_t *)ifp->if_softc; + qla_tx_fp_t *fp; + int rss_id = 0; + int ret = 0; + + QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + +#if __FreeBSD_version >= 1100000 + if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) +#else + if (mp->m_flags & M_FLOWID) +#endif + rss_id = (mp->m_pkthdr.flowid & Q8_RSS_IND_TBL_MAX_IDX) % + ha->hw.num_sds_rings; + fp = &ha->tx_fp[rss_id]; + + if (fp->tx_br == NULL) { + ret = EINVAL; + goto qla_transmit_exit; + } + + if (mp != NULL) { + ret = drbr_enqueue(ifp, fp->tx_br, mp); + } + + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + + ret = 0; + +qla_transmit_exit: + + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + return ret; +} + +static void +qla_qflush(struct ifnet *ifp) +{ + int i; + qla_tx_fp_t *fp; + struct mbuf *mp; + qla_host_t *ha; + + ha = (qla_host_t *)ifp->if_softc; + + QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br) { + mtx_lock(&fp->tx_mtx); + + while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) { + m_freem(mp); + } + mtx_unlock(&fp->tx_mtx); + } + } + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + + return; +} + + static void qla_stop(qla_host_t *ha) { struct ifnet *ifp = ha->ifp; device_t dev; + int i = 0; dev = ha->pci_dev; ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QLA_TX_LOCK(ha); QLA_TX_UNLOCK(ha); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp; + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br != NULL) { + mtx_lock(&fp->tx_mtx); + mtx_unlock(&fp->tx_mtx); + } + } ha->flags.qla_watchdog_pause = 1; @@ -1308,6 +1529,8 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + qla_drain_fp_taskqueues(ha); + ql_hw_stop_rcv(ha); ql_del_hw_if(ha); @@ -1648,25 +1871,6 @@ exit_ql_get_mbuf: return (ret); } -static void -qla_tx_done(void *context, int pending) -{ - qla_host_t *ha = context; - struct ifnet *ifp; - - ifp = ha->ifp; - - if (!ifp) - return; - - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: !IFF_DRV_RUNNING\n", __func__)); - return; - } - ql_hw_tx_done(ha); - - qla_start(ha->ifp); -} static void qla_get_peer(qla_host_t *ha) @@ -1709,18 +1913,32 @@ qla_error_recovery(void *context, int pe qla_host_t *ha = context; uint32_t msecs_100 = 100; struct ifnet *ifp = ha->ifp; + int i = 0; (void)QLA_LOCK(ha, __func__, 0); if (ha->flags.qla_interface_up) { - ha->hw.imd_compl = 1; - qla_mdelay(__func__, 300); + ha->hw.imd_compl = 1; + qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); + ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QLA_TX_LOCK(ha); QLA_TX_UNLOCK(ha); + ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp; + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br != NULL) { + mtx_lock(&fp->tx_mtx); + mtx_unlock(&fp->tx_mtx); + } + } } QLA_UNLOCK(ha, __func__); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 2 00:20:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18364CCC9E1; Thu, 2 Feb 2017 00:20:21 +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 A8BB215A8; Thu, 2 Feb 2017 00:20:20 +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 v120KJ2V067991; Thu, 2 Feb 2017 00:20:19 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v120KIk3067968; Thu, 2 Feb 2017 00:20:18 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201702020020.v120KIk3067968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 2 Feb 2017 00:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313071 - in vendor/libarchive/dist: . build build/cmake libarchive libarchive/test tar tar/test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 00:20:21 -0000 Author: mm Date: Thu Feb 2 00:20:18 2017 New Revision: 313071 URL: https://svnweb.freebsd.org/changeset/base/313071 Log: Update vendor/libarchive to git d77b577b2d5aa259fca06313c4940e1e61ab1e0e Vendor changes (relevant to FreeBSD): - bugfixes, improvemens and optimizations in ACL code - NFSv4 ACLs can now be extracted from Solaris tar archives Security fixes: - cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335) - LHA reader: heap-buffer-overflow in lha_read_file_header_1() (CVE-2017-5601) - LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream() (OSS-Fuzz 453) - mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443) - WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458) Memory leak fixes: - ACL support: free memory allocated by acl_get_qualifier() - disk writer: missing free in create_filesystem_object() - file reader: fd leak (Coverity 1016755) - gnutar writer: fix free in archive_write_gnutar_header() (Coverity 1016752) - iso 9660 reader: missing free in parse_file_info() (part. Coverity 1016754) - program reader: missing free in __archive_read_program() - program writer: missing free in __archive_write_program_free() - xar reader: missing free in xar_cleanup() - xar reader: missing frees in expat_xmlattr_setup() (Coverity 1229979-1229981) - xar writer: missing free in file_free() - zip reader: missing free in zip_read_locazip_read_local_file_header() Added: vendor/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c - copied, changed from r313070, vendor/libarchive/dist/libarchive/test/test_acl_freebsd_nfs4.c vendor/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c - copied, changed from r313070, vendor/libarchive/dist/libarchive/test/test_acl_freebsd_posix1e.c Deleted: vendor/libarchive/dist/libarchive/test/test_acl_freebsd_nfs4.c vendor/libarchive/dist/libarchive/test/test_acl_freebsd_posix1e.c Modified: vendor/libarchive/dist/.travis.yml vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/NEWS vendor/libarchive/dist/build/ci_build.sh vendor/libarchive/dist/build/ci_test_driver vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/dist/configure.ac vendor/libarchive/dist/libarchive/CMakeLists.txt vendor/libarchive/dist/libarchive/archive_acl.c vendor/libarchive/dist/libarchive/archive_acl_private.h vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_entry_strmode.c vendor/libarchive/dist/libarchive/archive_platform.h vendor/libarchive/dist/libarchive/archive_random.c vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_open_filename.c vendor/libarchive/dist/libarchive/archive_read_support_filter_lz4.c vendor/libarchive/dist/libarchive/archive_read_support_filter_program.c vendor/libarchive/dist/libarchive/archive_read_support_format_cab.c vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_windows.c vendor/libarchive/dist/libarchive/archive_windows.h vendor/libarchive/dist/libarchive/archive_write_add_filter_program.c vendor/libarchive/dist/libarchive/archive_write_disk_acl.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_open.3 vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/dist/libarchive/test/main.c vendor/libarchive/dist/libarchive/test/test.h vendor/libarchive/dist/libarchive/test/test_acl_text.c vendor/libarchive/dist/libarchive/test/test_archive_string.c vendor/libarchive/dist/libarchive/test/test_compat_gtar.c vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.c vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.tar.uu vendor/libarchive/dist/libarchive/test/test_fuzz.c vendor/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c vendor/libarchive/dist/libarchive/test/test_read_filter_lzop.c vendor/libarchive/dist/libarchive/test/test_read_filter_lzop_multiple_parts.c vendor/libarchive/dist/libarchive/test/test_read_format_zip.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_comment_stored.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_mac_metadata.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_malformed.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_nested.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_padded.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_sfx.c vendor/libarchive/dist/libarchive/test/test_write_disk_secure746.c vendor/libarchive/dist/libarchive/test/test_write_filter_lz4.c vendor/libarchive/dist/libarchive/test/test_write_filter_lzop.c vendor/libarchive/dist/libarchive/test/test_write_format_zip_large.c vendor/libarchive/dist/libarchive/test/test_write_format_zip_zip64.c vendor/libarchive/dist/tar/test/test_option_uid_uname.c vendor/libarchive/dist/tar/util.c Modified: vendor/libarchive/dist/.travis.yml ============================================================================== --- vendor/libarchive/dist/.travis.yml Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/.travis.yml Thu Feb 2 00:20:18 2017 (r313071) @@ -1,6 +1,14 @@ language: C -sudo: required +sudo: false dist: trusty +addons: + apt: + packages: + - libacl1-dev + - libbz2-dev + - liblzma-dev + - libzip-dev + - lzop os: - linux - osx @@ -16,8 +24,7 @@ matrix: compiler: gcc before_install: - if [ `uname` = "Darwin" ]; then brew update; fi - - if [ `uname` = "Linux" ]; then sudo apt-get install -y libbz2-dev libzip-dev liblzma-dev liblzo2-dev; fi install: - - if [ `uname` = "Darwin" ]; then brew install xz lzo lz4; fi + - if [ `uname` = "Darwin" ]; then brew install xz lzop lz4; fi script: - build/ci_build.sh Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/CMakeLists.txt Thu Feb 2 00:20:18 2017 (r313071) @@ -179,13 +179,15 @@ include(CTest) OPTION(ENABLE_NETTLE "Enable use of Nettle" ON) OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON) -OPTION(ENABLE_LZMA "Enable the use of the system found LZMA library if found" ON) -OPTION(ENABLE_ZLIB "Enable the use of the system found ZLIB library if found" ON) -OPTION(ENABLE_BZip2 "Enable the use of the system found BZip2 library if found" ON) -OPTION(ENABLE_LIBXML2 "Enable the use of the system found libxml2 library if found" ON) -OPTION(ENABLE_EXPAT "Enable the use of the system found EXPAT library if found" ON) -OPTION(ENABLE_PCREPOSIX "Enable the use of the system found PCREPOSIX library if found" ON) -OPTION(ENABLE_LibGCC "Enable the use of the system found LibGCC library if found" ON) +OPTION(ENABLE_LZO "Enable the use of the system LZO library if found" OFF) +OPTION(ENABLE_LZMA "Enable the use of the system LZMA library if found" ON) + +OPTION(ENABLE_ZLIB "Enable the use of the system ZLIB library if found" ON) +OPTION(ENABLE_BZip2 "Enable the use of the system BZip2 library if found" ON) +OPTION(ENABLE_LIBXML2 "Enable the use of the system libxml2 library if found" ON) +OPTION(ENABLE_EXPAT "Enable the use of the system EXPAT library if found" ON) +OPTION(ENABLE_PCREPOSIX "Enable the use of the system PCREPOSIX library if found" ON) +OPTION(ENABLE_LibGCC "Enable the use of the system LibGCC library if found" ON) # CNG is used for encrypt/decrypt Zip archives on Windows. OPTION(ENABLE_CNG "Enable the use of CNG(Crypto Next Generation)" ON) @@ -477,15 +479,19 @@ ENDIF(LIBLZMA_FOUND) # # Find LZO2 # -IF (LZO2_INCLUDE_DIR) - # Already in cache, be silent - SET(LZO2_FIND_QUIETLY TRUE) -ENDIF (LZO2_INCLUDE_DIR) - -FIND_PATH(LZO2_INCLUDE_DIR lzo/lzoconf.h) -FIND_LIBRARY(LZO2_LIBRARY NAMES lzo2 liblzo2) -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO2 DEFAULT_MSG LZO2_LIBRARY LZO2_INCLUDE_DIR) +IF(ENABLE_LZO) + IF (LZO2_INCLUDE_DIR) + # Already in cache, be silent + SET(LZO2_FIND_QUIETLY TRUE) + ENDIF (LZO2_INCLUDE_DIR) + + FIND_PATH(LZO2_INCLUDE_DIR lzo/lzoconf.h) + FIND_LIBRARY(LZO2_LIBRARY NAMES lzo2 liblzo2) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO2 DEFAULT_MSG LZO2_LIBRARY LZO2_INCLUDE_DIR) +ELSE(ENABLE_LZO) + SET(LIBZMA_FOUND FALSE) # Override cached value +ENDIF(ENABLE_LZO) IF(LZO2_FOUND) SET(HAVE_LIBLZO2 1) SET(HAVE_LZO_LZOCONF_H 1) @@ -608,7 +614,7 @@ IF(ENABLE_CNG) ELSE(ENABLE_CNG) UNSET(HAVE_BCRYPT_H CACHE) ENDIF(ENABLE_CNG) -# Following files need windwos.h, so we should test it after windows.h test. +# Following files need windows.h, so we should test it after windows.h test. LA_CHECK_INCLUDE_FILE("wincrypt.h" HAVE_WINCRYPT_H) LA_CHECK_INCLUDE_FILE("winioctl.h" HAVE_WINIOCTL_H) @@ -1605,10 +1611,29 @@ IF(ENABLE_ACL) CHECK_FUNCTION_EXISTS(acl_get_link_np HAVE_ACL_GET_LINK_NP) CHECK_FUNCTION_EXISTS(acl_is_trivial_np HAVE_ACL_IS_TRIVIAL_NP) CHECK_FUNCTION_EXISTS(acl_set_link_np HAVE_ACL_SET_LINK_NP) + CHECK_SYMBOL_EXISTS(ACL_TYPE_NFS4 "${INCLUDES}" HAVE_ACL_TYPE_NFS4) # MacOS has an acl.h that isn't POSIX. It can be detected by # checking for ACL_USER CHECK_SYMBOL_EXISTS(ACL_USER "${INCLUDES}" HAVE_ACL_USER) + CHECK_C_SOURCE_COMPILES("#include +#include +int main(void) { return ACL_TYPE_EXTENDED; }" HAVE_ACL_TYPE_EXTENDED) + + # Solaris and derivates ACLs + CHECK_LIBRARY_EXISTS(sec "acl_get" "" HAVE_LIBSEC) + IF(HAVE_LIBSEC) + SET(CMAKE_REQUIRED_LIBRARIES "sec") + FIND_LIBRARY(SEC_LIBRARY NAMES sec) + LIST(APPEND ADDITIONAL_LIBS ${SEC_LIBRARY}) + ENDIF(HAVE_LIBSEC) + # + CHECK_TYPE_EXISTS(aclent_t "${INCLUDES}" HAVE_ACLENT_T) + CHECK_TYPE_EXISTS(ace_t "${INCLUDES}" HAVE_ACE_T) + CHECK_FUNCTION_EXISTS(acl_get HAVE_FACL_GET) + CHECK_FUNCTION_EXISTS(facl_get HAVE_FACL_GET) + CHECK_FUNCTION_EXISTS(acl_set HAVE_FACL_SET) + CHECK_FUNCTION_EXISTS(facl_set HAVE_FACL_SET) ELSE(ENABLE_ACL) # If someone runs cmake, then disables ACL support, we need # to forcibly override the cached values for these. @@ -1623,7 +1648,15 @@ ELSE(ENABLE_ACL) SET(HAVE_ACL_SET_FD FALSE) SET(HAVE_ACL_SET_FD_NP FALSE) SET(HAVE_ACL_SET_FILE FALSE) + SET(HAVE_ACL_TYPE_NFS4 FALSE) SET(HAVE_ACL_USER FALSE) + SET(HAVE_ACL_TYPE_EXTENDED FALSE) + SET(HAVE_ACL_GET FALSE) + SET(HAVE_ACLENT_T FALSE) + SET(HAVE_ACE_T FALSE) + SET(HAVE_FACL_GET FALSE) + SET(HAVE_ACL_SET FALSE) + SET(HAVE_FACL_SET FALSE) ENDIF(ENABLE_ACL) # Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/Makefile.am Thu Feb 2 00:20:18 2017 (r313071) @@ -323,10 +323,10 @@ libarchive_test_SOURCES= \ libarchive/test/main.c \ libarchive/test/read_open_memory.c \ libarchive/test/test.h \ - libarchive/test/test_acl_freebsd_posix1e.c \ - libarchive/test/test_acl_freebsd_nfs4.c \ libarchive/test/test_acl_nfs4.c \ libarchive/test/test_acl_pax.c \ + libarchive/test/test_acl_platform_nfs4.c \ + libarchive/test/test_acl_platform_posix1e.c \ libarchive/test/test_acl_posix1e.c \ libarchive/test/test_acl_text.c \ libarchive/test/test_archive_api_feature.c \ Modified: vendor/libarchive/dist/NEWS ============================================================================== --- vendor/libarchive/dist/NEWS Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/NEWS Thu Feb 2 00:20:18 2017 (r313071) @@ -1,3 +1,7 @@ +Jan 29, 2017: Limited NFSv4 ACL support for Mac OS (Darwin) + +Jan 10, 2017: POSIX.1e and NFSv4 ACL support for Solaris and derivates + Dec 27, 2016: NFSv4 ACL read and write support for pax Deprecated functions: archive_entry_acl_text(), archive_entry_acl_text_w() Modified: vendor/libarchive/dist/build/ci_build.sh ============================================================================== --- vendor/libarchive/dist/build/ci_build.sh Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/build/ci_build.sh Thu Feb 2 00:20:18 2017 (r313071) @@ -12,6 +12,8 @@ ACTIONS= BUILD_SYSTEM="${BUILD_SYSTEM:-autotools}" +MAKE="${MAKE:-make}" +CMAKE="${CMAKE:-cmake}" CURDIR=`pwd` SRCDIR="${SRCDIR:-`pwd`}" RET=0 @@ -79,21 +81,21 @@ for action in ${ACTIONS}; do configure) case "${BUILD_SYSTEM}" in autotools) "${SRCDIR}/configure" ${CONFIGURE_ARGS} ;; - cmake) cmake ${CONFIGURE_ARGS} "${SRCDIR}" ;; + cmake) ${CMAKE} ${CONFIGURE_ARGS} "${SRCDIR}" ;; esac RET="$?" ;; build) - make ${MAKE_ARGS} + ${MAKE} ${MAKE_ARGS} RET="$?" ;; test) case "${BUILD_SYSTEM}" in autotools) - make ${MAKE_ARGS} check LOG_DRIVER="${SRCDIR}/build/ci_test_driver" + ${MAKE} ${MAKE_ARGS} check LOG_DRIVER="${SRCDIR}/build/ci_test_driver" ;; cmake) - make ${MAKE_ARGS} test + ${MAKE} ${MAKE_ARGS} test ;; esac RET="$?" Modified: vendor/libarchive/dist/build/ci_test_driver ============================================================================== --- vendor/libarchive/dist/build/ci_test_driver Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/build/ci_test_driver Thu Feb 2 00:20:18 2017 (r313071) @@ -104,8 +104,8 @@ trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 # Test script is run here. -"$@" | tee $log_file 2>&1 -estatus=$? +( "$@"; echo "$?" > $log_file.s ) | tee $log_file 2>&1 +estatus=`cat $log_file.s` if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 Modified: vendor/libarchive/dist/build/cmake/config.h.in ============================================================================== --- vendor/libarchive/dist/build/cmake/config.h.in Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/build/cmake/config.h.in Thu Feb 2 00:20:18 2017 (r313071) @@ -326,6 +326,12 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `acl_set_file' function. */ #cmakedefine HAVE_ACL_SET_FILE 1 +/* True for FreeBSD with NFSv4 ACL support */ +#cmakedefine HAVE_ACL_TYPE_NFS4 1 + +/* True for MacOS ACL support */ +#cmakedefine HAVE_ACL_TYPE_EXTENDED 1 + /* True for systems with POSIX ACL support */ #cmakedefine HAVE_ACL_USER 1 Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/configure.ac Thu Feb 2 00:20:18 2017 (r313071) @@ -379,9 +379,9 @@ if test "x$with_lzma" != "xno"; then fi AC_ARG_WITH([lzo2], - AS_HELP_STRING([--without-lzo2], [Don't build support for lzop through liblzo2])) + AS_HELP_STRING([--with-lzo2], [Build with LZO support from liblzo2])) -if test "x$with_lzo2" != "xno"; then +if test "x$with_lzo2" == "xyes"; then AC_CHECK_HEADERS([lzo/lzoconf.h lzo/lzo1x.h]) AC_CHECK_LIB(lzo2,lzo1x_decompress_safe) fi @@ -724,12 +724,31 @@ if test "x$enable_acl" != "xno"; then #endif ]) + # Check for ACL_TYPE_NFS4 + AC_CHECK_DECL([ACL_TYPE_NFS4], + [AC_DEFINE(HAVE_ACL_TYPE_NFS4, 1, [True for FreeBSD with NFSv4 ACL support])], + [], + [#include ]) + # MacOS has an acl.h that isn't POSIX. It can be detected by # checking for ACL_USER AC_CHECK_DECL([ACL_USER], [AC_DEFINE(HAVE_ACL_USER, 1, [True for systems with POSIX ACL support])], [], [#include ]) + + # MacOS has ACL_TYPE_EXTENDED instead + AC_CHECK_DECL([ACL_TYPE_EXTENDED], + [AC_DEFINE(HAVE_ACL_TYPE_EXTENDED, 1, [True for MacOS ACL support])], + [], + [#include + #include ]) + + # Solaris and derivates ACLs + AC_CHECK_LIB([sec], [acl_get]) + AC_CHECK_TYPES([aclent_t], [], [], [[#include ]]) + AC_CHECK_TYPES([ace_t], [], [], [[#include ]]) + AC_CHECK_FUNCS(acl_get facl_get acl_set facl_set) fi # Additional requirements Modified: vendor/libarchive/dist/libarchive/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/libarchive/CMakeLists.txt Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/libarchive/CMakeLists.txt Thu Feb 2 00:20:18 2017 (r313071) @@ -168,15 +168,33 @@ SET(libarchive_MANS archive_entry_time.3 archive_read.3 archive_read_add_passphrase.3 + archive_read_data.3 archive_read_disk.3 + archive_read_extract.3 + archive_read_filter.3 + archive_read_format.3 + archive_read_free.3 + archive_read_header.3 + archive_read_new.3 + archive_read_open.3 archive_read_set_options.3 archive_util.3 archive_write.3 + archive_write_blocksize.3 + archive_write_data.3 archive_write_disk.3 + archive_write_filter.3 + archive_write_finish_entry.3 + archive_write_format.3 + archive_write_free.3 + archive_write_header.3 + archive_write_new.3 + archive_write_open.3 archive_write_set_options.3 archive_write_set_passphrase.3 cpio.5 libarchive.3 + libarchive_changes.3 libarchive_internals.3 libarchive-formats.5 mtree.5 Modified: vendor/libarchive/dist/libarchive/archive_acl.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_acl.c Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/libarchive/archive_acl.c Thu Feb 2 00:20:18 2017 (r313071) @@ -349,6 +349,15 @@ archive_acl_count(struct archive_acl *ac } /* + * Return a bitmask of stored ACL types in an ACL list + */ +int +archive_acl_types(struct archive_acl *acl) +{ + return (acl->acl_types); +} + +/* * Prepare for reading entries from the ACL data. Returns a count * of entries matching "want_type", or zero if there are no * non-extended ACL entries of that type. @@ -1144,7 +1153,7 @@ archive_acl_from_text_w(struct archive_a const wchar_t *s, *st; - int numfields, fields, n, r, ret; + int numfields, fields, n, r, sol, ret; int type, types, tag, permset, id; size_t len; wchar_t sep; @@ -1192,6 +1201,7 @@ archive_acl_from_text_w(struct archive_a } n = 0; + sol = 0; id = -1; permset = 0; name.start = name.end = NULL; @@ -1263,6 +1273,7 @@ archive_acl_from_text_w(struct archive_a && ismode_w(field[n + 1].start, field[n + 1].end, &permset)) { /* This is Solaris-style "other:rwx" */ + sol = 1; } else if (fields == (n + 3) && field[n + 1].start < field[n + 1].end) { /* Invalid mask or other field */ @@ -1287,9 +1298,12 @@ archive_acl_from_text_w(struct archive_a continue; } - /* Without "default:" we expect mode in field 2 */ - if (permset == 0 && !ismode_w(field[n + 2].start, - field[n + 2].end, &permset)) { + /* + * Without "default:" we expect mode in field 2 + * Exception: Solaris other and mask fields + */ + if (permset == 0 && !ismode_w(field[n + 2 - sol].start, + field[n + 2 - sol].end, &permset)) { /* Invalid mode, skip entry */ ret = ARCHIVE_WARN; continue; @@ -1615,7 +1629,7 @@ archive_acl_from_text_l(struct archive_a } field[6], name; const char *s, *st; - int numfields, fields, n, r, ret; + int numfields, fields, n, r, sol, ret; int type, types, tag, permset, id; size_t len; char sep; @@ -1663,6 +1677,7 @@ archive_acl_from_text_l(struct archive_a } n = 0; + sol = 0; id = -1; permset = 0; name.start = name.end = NULL; @@ -1734,6 +1749,7 @@ archive_acl_from_text_l(struct archive_a && ismode(field[n + 1].start, field[n + 1].end, &permset)) { /* This is Solaris-style "other:rwx" */ + sol = 1; } else if (fields == (n + 3) && field[n + 1].start < field[n + 1].end) { /* Invalid mask or other field */ @@ -1758,9 +1774,12 @@ archive_acl_from_text_l(struct archive_a continue; } - /* Without "default:" we expect mode in field 2 */ - if (permset == 0 && !ismode(field[n + 2].start, - field[n + 2].end, &permset)) { + /* + * Without "default:" we expect mode in field 3 + * Exception: Solaris other and mask fields + */ + if (permset == 0 && !ismode(field[n + 2 - sol].start, + field[n + 2 - sol].end, &permset)) { /* Invalid mode, skip entry */ ret = ARCHIVE_WARN; continue; Modified: vendor/libarchive/dist/libarchive/archive_acl_private.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_acl_private.h Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/libarchive/archive_acl_private.h Thu Feb 2 00:20:18 2017 (r313071) @@ -56,6 +56,7 @@ struct archive_acl { void archive_acl_clear(struct archive_acl *); void archive_acl_copy(struct archive_acl *, struct archive_acl *); int archive_acl_count(struct archive_acl *, int); +int archive_acl_types(struct archive_acl *); int archive_acl_reset(struct archive_acl *, int); int archive_acl_next(struct archive *, struct archive_acl *, int, int *, int *, int *, int *, const char **); Modified: vendor/libarchive/dist/libarchive/archive_entry.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.c Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/libarchive/archive_entry.c Thu Feb 2 00:20:18 2017 (r313071) @@ -1447,7 +1447,7 @@ archive_entry_acl_add_entry_w(struct arc int archive_entry_acl_types(struct archive_entry *entry) { - return ((&entry->acl)->acl_types); + return (archive_acl_types(&entry->acl)); } /* Modified: vendor/libarchive/dist/libarchive/archive_entry_strmode.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry_strmode.c Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/libarchive/archive_entry_strmode.c Thu Feb 2 00:20:18 2017 (r313071) @@ -80,7 +80,7 @@ archive_entry_strmode(struct archive_ent if (mode & 0001) bp[9] = 't'; else bp[9] = 'T'; } - if (archive_entry_acl_count(entry, ARCHIVE_ENTRY_ACL_TYPE_ACCESS)) + if (archive_entry_acl_types(entry) != 0) bp[10] = '+'; return (bp); Modified: vendor/libarchive/dist/libarchive/archive_platform.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_platform.h Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/libarchive/archive_platform.h Thu Feb 2 00:20:18 2017 (r313071) @@ -147,8 +147,25 @@ * acl_set_file(), and ACL_USER, we assume it has the rest of the * POSIX.1e draft functions used in archive_read_extract.c. */ -#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE && HAVE_ACL_USER +#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE +#if HAVE_ACL_USER #define HAVE_POSIX_ACL 1 +#elif HAVE_ACL_TYPE_EXTENDED +#define HAVE_DARWIN_ACL 1 +#endif +#endif + +/* + * If this platform has , acl_get(), facl_get(), acl_set(), + * facl_set() and types aclent_t and ace_t it uses Solaris-style ACL functions + */ +#if HAVE_SYS_ACL_H && HAVE_ACL_GET && HAVE_FACL_GET && HAVE_ACL_SET && HAVE_FACL_SET && HAVE_ACLENT_T && HAVE_ACE_T +#define HAVE_SUN_ACL 1 +#endif + +/* Define if platform supports NFSv4 ACLs */ +#if (HAVE_POSIX_ACL && HAVE_ACL_TYPE_NFS4) || HAVE_SUN_ACL || HAVE_DARWIN_ACL +#define HAVE_NFS4_ACL 1 #endif /* Modified: vendor/libarchive/dist/libarchive/archive_random.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_random.c Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/libarchive/archive_random.c Thu Feb 2 00:20:18 2017 (r313071) @@ -80,7 +80,7 @@ archive_random(void *buf, size_t nbytes) success = CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - if (!success && GetLastError() == NTE_BAD_KEYSET) { + if (!success && GetLastError() == (DWORD)NTE_BAD_KEYSET) { success = CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); } Modified: vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Thu Feb 2 00:12:24 2017 (r313070) +++ vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Thu Feb 2 00:20:18 2017 (r313071) @@ -38,6 +38,11 @@ __FBSDID("$FreeBSD: head/lib/libarchive/ #ifdef HAVE_SYS_ACL_H #include #endif +#ifdef HAVE_DARWIN_ACL +#include +#include +#include +#endif #ifdef HAVE_SYS_EXTATTR_H #include #endif @@ -118,6 +123,15 @@ __FBSDID("$FreeBSD: head/lib/libarchive/ #define ACL_GET_PERM acl_get_perm_np #endif +/* NFSv4 platform ACL type */ +#if HAVE_SUN_ACL +#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACE_T +#elif HAVE_DARWIN_ACL +#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_EXTENDED +#elif HAVE_ACL_TYPE_NFS4 +#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_NFS4 +#endif + static int setup_acls(struct archive_read_disk *, struct archive_entry *, int *fd); static int setup_mac_metadata(struct archive_read_disk *, @@ -405,17 +419,38 @@ setup_mac_metadata(struct archive_read_d } #endif +#if HAVE_DARWIN_ACL +static int translate_guid(struct archive *, acl_entry_t, + int *, int *, const char **); + +static void add_trivial_nfs4_acl(struct archive_entry *); +#endif + +#if HAVE_SUN_ACL +static int +sun_acl_is_trivial(acl_t *, mode_t, int *trivialp); +#endif -#ifdef HAVE_POSIX_ACL +#if HAVE_POSIX_ACL || HAVE_NFS4_ACL static int translate_acl(struct archive_read_disk *a, - struct archive_entry *entry, acl_t acl, int archive_entry_acl_type); + struct archive_entry *entry, +#if HAVE_SUN_ACL + acl_t *acl, +#else + acl_t acl, +#endif + int archive_entry_acl_type); static int setup_acls(struct archive_read_disk *a, struct archive_entry *entry, int *fd) { const char *accpath; - acl_t acl; +#if HAVE_SUN_ACL + acl_t *acl; +#else + acl_t acl; +#endif int r; accpath = archive_entry_sourcepath(entry); @@ -440,17 +475,20 @@ setup_acls(struct archive_read_disk *a, acl = NULL; -#ifdef ACL_TYPE_NFS4 +#if HAVE_NFS4_ACL /* Try NFSv4 ACL first. */ if (*fd >= 0) -#if HAVE_ACL_GET_FD_NP - acl = acl_get_fd_np(*fd, ACL_TYPE_NFS4); +#if HAVE_SUN_ACL + /* Solaris reads both POSIX.1e and NFSv4 ACL here */ + facl_get(*fd, 0, &acl); +#elif HAVE_ACL_GET_FD_NP + acl = acl_get_fd_np(*fd, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); #else acl = acl_get_fd(*fd); #endif #if HAVE_ACL_GET_LINK_NP else if (!a->follow_symlinks) - acl = acl_get_link_np(accpath, ACL_TYPE_NFS4); + acl = acl_get_link_np(accpath, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); #else else if ((!a->follow_symlinks) && (archive_entry_filetype(entry) == AE_IFLNK)) @@ -459,12 +497,24 @@ setup_acls(struct archive_read_disk *a, acl = NULL; #endif else - acl = acl_get_file(accpath, ACL_TYPE_NFS4); +#if HAVE_SUN_ACL + /* Solaris reads both POSIX.1e and NFSv4 ACLs here */ + acl_get(accpath, 0, &acl); +#else + acl = acl_get_file(accpath, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); +#endif -#if HAVE_ACL_IS_TRIVIAL_NP - if (acl != NULL && acl_is_trivial_np(acl, &r) == 0) { - /* Ignore "trivial" ACLs that just mirror the file mode. */ - if (r) { + +#if HAVE_ACL_IS_TRIVIAL_NP || HAVE_SUN_ACL + /* Ignore "trivial" ACLs that just mirror the file mode. */ + if (acl != NULL) { +#if HAVE_SUN_ACL + if (sun_acl_is_trivial(acl, archive_entry_mode(entry), + &r) == 0 && r == 1) +#elif HAVE_ACL_IS_TRIVIAL_NP + if (acl_is_trivial_np(acl, &r) == 0 && r == 1) +#endif + { acl_free(acl); acl = NULL; /* @@ -474,17 +524,35 @@ setup_acls(struct archive_read_disk *a, return (ARCHIVE_OK); } } -#endif +#endif /* HAVE_ACL_IS_TRIVIAL_NP || HAVE_SUN_ACL */ if (acl != NULL) { r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); acl_free(acl); if (r != ARCHIVE_OK) { archive_set_error(&a->archive, errno, +#if HAVE_SUN_ACL + "Couldn't translate ACLs: %s", accpath); +#else "Couldn't translate NFSv4 ACLs: %s", accpath); +#endif } +#if HAVE_DARWIN_ACL + /* + * Because Mac OS doesn't support owner@, group@ and everyone@ + * ACLs we need to add NFSv4 ACLs mirroring the file mode to + * the archive entry. Otherwise extraction on non-Mac platforms + * would lead to an invalid file mode. + */ + if (archive_entry_acl_count(entry, + ARCHIVE_ENTRY_ACL_TYPE_NFS4) > 0) + add_trivial_nfs4_acl(entry); +#endif return (r); } -#endif /* ACL_TYPE_NFS4 */ +#endif /* HAVE_NFS4_ACL */ + +#if HAVE_POSIX_ACL + /* This code path is skipped on MacOS and Solaris */ /* Retrieve access ACL from file. */ if (*fd >= 0) @@ -513,8 +581,7 @@ setup_acls(struct archive_read_disk *a, #endif if (acl != NULL) { - r = translate_acl(a, entry, acl, - ARCHIVE_ENTRY_ACL_TYPE_ACCESS); + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_ACCESS); acl_free(acl); acl = NULL; if (r != ARCHIVE_OK) { @@ -544,72 +611,560 @@ setup_acls(struct archive_read_disk *a, } } } +#endif /* HAVE_POSIX_ACL */ return (ARCHIVE_OK); } /* - * Translate system ACL into libarchive internal structure. + * Translate system ACL permissions into libarchive internal structure */ - static struct { - int archive_perm; - int platform_perm; + int archive_perm; + int platform_perm; } acl_perm_map[] = { - {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, - {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, - {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, -#ifdef ACL_TYPE_NFS4 - {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, - {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, - {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, - {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, - {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_NAMED_ATTRS}, - {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_NAMED_ATTRS}, - {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, - {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, - {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, - {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} +#if HAVE_SUN_ACL /* Solaris NFSv4 ACL permissions */ + {ARCHIVE_ENTRY_ACL_EXECUTE, ACE_EXECUTE}, + {ARCHIVE_ENTRY_ACL_READ_DATA, ACE_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACE_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACE_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACE_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACE_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACE_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACE_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACE_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACE_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACE_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACE_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, ACE_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACE_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACE_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACE_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACE_SYNCHRONIZE} +#elif HAVE_DARWIN_ACL /* MacOS ACL permissions */ + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_EXTATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_EXTATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_SECURITY}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_SECURITY}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_CHANGE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} +#else /* POSIX.1e ACL permissions */ + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, + {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, +#if HAVE_ACL_TYPE_NFS4 /* FreeBSD NFSv4 ACL permissions */ + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} #endif +#endif /* !HAVE_SUN_ACL && !HAVE_DARWIN_ACL */ }; -#ifdef ACL_TYPE_NFS4 +#if HAVE_NFS4_ACL +/* + * Translate system NFSv4 inheritance flags into libarchive internal structure + */ static struct { - int archive_inherit; - int platform_inherit; + int archive_inherit; + int platform_inherit; } acl_inherit_map[] = { - {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, +#if HAVE_SUN_ACL /* Solaris ACL inheritance flags */ + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACE_FILE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACE_DIRECTORY_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACE_NO_PROPAGATE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACE_INHERIT_ONLY_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACE_SUCCESSFUL_ACCESS_ACE_FLAG}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACE_FAILED_ACCESS_ACE_FLAG}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACE_INHERITED_ACE} +#elif HAVE_DARWIN_ACL /* MacOS NFSv4 inheritance flags */ + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}, + {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_LIMIT_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_ONLY_INHERIT} +#else /* FreeBSD NFSv4 ACL inheritance flags */ + {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_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 /* !HAVE_SUN_ACL && !HAVE_DARWIN_ACL */ }; -#endif +#endif /* HAVE_NFS4_ACL */ + +#if HAVE_DARWIN_ACL +static int translate_guid(struct archive *a, acl_entry_t acl_entry, + int *ae_id, int *ae_tag, const char **ae_name) +{ + void *q; + uid_t ugid; + int r, idtype; + struct passwd *pwd; + struct group *grp; + + q = acl_get_qualifier(acl_entry); + if (q == NULL) + return (1); + r = mbr_uuid_to_id((const unsigned char *)q, &ugid, &idtype); + if (r != 0) { + acl_free(q); + return (1); + } + if (idtype == ID_TYPE_UID) { + *ae_tag = ARCHIVE_ENTRY_ACL_USER; + pwd = getpwuuid(q); + if (pwd == NULL) { + *ae_id = ugid; + *ae_name = NULL; + } else { + *ae_id = pwd->pw_uid; + *ae_name = archive_read_disk_uname(a, *ae_id); + } + } else if (idtype == ID_TYPE_GID) { + *ae_tag = ARCHIVE_ENTRY_ACL_GROUP; + grp = getgruuid(q); + if (grp == NULL) { + *ae_id = ugid; + *ae_name = NULL; + } else { + *ae_id = grp->gr_gid; + *ae_name = archive_read_disk_gname(a, *ae_id); + } + } else + r = 1; + + acl_free(q); + return (r); +} + +/* + * Add trivial NFSv4 ACL entries from mode + */ +static void +add_trivial_nfs4_acl(struct archive_entry *entry) +{ + mode_t mode; + int i; + const int rperm = ARCHIVE_ENTRY_ACL_READ_DATA; + const int wperm = ARCHIVE_ENTRY_ACL_WRITE_DATA | + ARCHIVE_ENTRY_ACL_APPEND_DATA; + const int eperm = ARCHIVE_ENTRY_ACL_EXECUTE; + const int pubset = ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES | + ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS | + ARCHIVE_ENTRY_ACL_READ_ACL | + ARCHIVE_ENTRY_ACL_SYNCHRONIZE; + const int ownset = pubset | ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES | + ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS | + ARCHIVE_ENTRY_ACL_WRITE_ACL | + ARCHIVE_ENTRY_ACL_WRITE_OWNER; + + struct { + const int type; + const int tag; + int permset; + } tacl_entry[] = { + {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_USER_OBJ, 0}, + {ARCHIVE_ENTRY_ACL_TYPE_DENY, ARCHIVE_ENTRY_ACL_USER_OBJ, 0}, + {ARCHIVE_ENTRY_ACL_TYPE_DENY, ARCHIVE_ENTRY_ACL_GROUP_OBJ, 0}, + {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_USER_OBJ, ownset}, + {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_GROUP_OBJ, pubset}, + {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_EVERYONE, pubset} + }; + + mode = archive_entry_mode(entry); + + /* Permissions for everyone@ */ + if (mode & 0004) + tacl_entry[5].permset |= rperm; + if (mode & 0002) + tacl_entry[5].permset |= wperm; + if (mode & 0001) + tacl_entry[5].permset |= eperm; + + /* Permissions for group@ */ + if (mode & 0040) + tacl_entry[4].permset |= rperm; + else if (mode & 0004) + tacl_entry[2].permset |= rperm; + if (mode & 0020) + tacl_entry[4].permset |= wperm; + else if (mode & 0002) + tacl_entry[2].permset |= wperm; + if (mode & 0010) + tacl_entry[4].permset |= eperm; + else if (mode & 0001) + tacl_entry[2].permset |= eperm; + + /* Permissions for owner@ */ + if (mode & 0400) { + tacl_entry[3].permset |= rperm; + if (!(mode & 0040) && (mode & 0004)) + tacl_entry[0].permset |= rperm; + } else if ((mode & 0040) || (mode & 0004)) + tacl_entry[1].permset |= rperm; + if (mode & 0200) { + tacl_entry[3].permset |= wperm; + if (!(mode & 0020) && (mode & 0002)) + tacl_entry[0].permset |= wperm; + } else if ((mode & 0020) || (mode & 0002)) + tacl_entry[1].permset |= wperm; + if (mode & 0100) { + tacl_entry[3].permset |= eperm; + if (!(mode & 0010) && (mode & 0001)) + tacl_entry[0].permset |= eperm; + } else if ((mode & 0010) || (mode & 0001)) + tacl_entry[1].permset |= eperm; + + for (i = 0; i < 6; i++) { + if (tacl_entry[i].permset != 0) { + archive_entry_acl_add_entry(entry, + tacl_entry[i].type, tacl_entry[i].permset, + tacl_entry[i].tag, -1, NULL); + } + } + + return; +} +#elif HAVE_SUN_ACL +/* + * Check if acl is trivial + * This is a FreeBSD acl_is_trivial_np() implementation for Solaris + */ +static int +sun_acl_is_trivial(acl_t *acl, mode_t mode, int *trivialp) +{ + int i, p; + const uint32_t rperm = ACE_READ_DATA; + const uint32_t wperm = ACE_WRITE_DATA | ACE_APPEND_DATA; + const uint32_t eperm = ACE_EXECUTE; + const uint32_t pubset = ACE_READ_ATTRIBUTES | ACE_READ_NAMED_ATTRS | + ACE_READ_ACL | ACE_SYNCHRONIZE; + const uint32_t ownset = pubset | ACE_WRITE_ATTRIBUTES | + ACE_WRITE_NAMED_ATTRS | ACE_WRITE_ACL | ACE_WRITE_OWNER; + + ace_t *ace; + ace_t tace[6]; + + if (acl == NULL || trivialp == NULL) + return (-1); + + *trivialp = 0; + + /* ACL_IS_TRIVIAL flag must be set for both POSIX.1e and NFSv4 ACLs */ + if ((acl->acl_flags & ACL_IS_TRIVIAL) == 0) + return (0); + + /* + * POSIX.1e ACLs marked with ACL_IS_TRIVIAL are compatible with + * FreeBSD acl_is_trivial_np(). On Solaris they have 4 entries, + * incuding mask. + */ + if (acl->acl_type == ACLENT_T) { + if (acl->acl_cnt == 4) + *trivialp = 1; + return (0); + } + + if (acl->acl_type != ACE_T || acl->acl_entry_size != sizeof(ace_t)) + return (-1); + + /* + * Continue with checking NFSv4 ACLs + * + * Create list of trivial ace's to be compared + */ + + /* owner@ allow pre */ + tace[0].a_flags = ACE_OWNER; + tace[0].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; + tace[0].a_access_mask = 0; + + /* owner@ deny */ + tace[1].a_flags = ACE_OWNER; + tace[1].a_type = ACE_ACCESS_DENIED_ACE_TYPE; + tace[1].a_access_mask = 0; + + /* group@ deny */ + tace[2].a_flags = ACE_GROUP | ACE_IDENTIFIER_GROUP; + tace[2].a_type = ACE_ACCESS_DENIED_ACE_TYPE; + tace[2].a_access_mask = 0; + + /* owner@ allow */ + tace[3].a_flags = ACE_OWNER; + tace[3].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; + tace[3].a_access_mask = ownset; + + /* group@ allow */ + tace[4].a_flags = ACE_GROUP | ACE_IDENTIFIER_GROUP; + tace[4].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 2 00:20:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BB4BCCCA59; Thu, 2 Feb 2017 00:20:55 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44417182C; Thu, 2 Feb 2017 00:20:55 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v120Ksbr068070; Thu, 2 Feb 2017 00:20:54 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v120KrDY068063; Thu, 2 Feb 2017 00:20:53 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201702020020.v120KrDY068063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 2 Feb 2017 00:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313072 - stable/10/sys/dev/qlxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 00:20:55 -0000 Author: davidcs Date: Thu Feb 2 00:20:53 2017 New Revision: 313072 URL: https://svnweb.freebsd.org/changeset/base/313072 Log: MFC r312728 Added support for if_transmit and if_qflush Removed if_start updated version to 3.10.33 Modified: stable/10/sys/dev/qlxgbe/ql_def.h stable/10/sys/dev/qlxgbe/ql_glbl.h stable/10/sys/dev/qlxgbe/ql_hw.c stable/10/sys/dev/qlxgbe/ql_hw.h stable/10/sys/dev/qlxgbe/ql_isr.c stable/10/sys/dev/qlxgbe/ql_os.c stable/10/sys/dev/qlxgbe/ql_os.h stable/10/sys/dev/qlxgbe/ql_ver.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_def.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_def.h Thu Feb 2 00:20:18 2017 (r313071) +++ stable/10/sys/dev/qlxgbe/ql_def.h Thu Feb 2 00:20:53 2017 (r313072) @@ -112,6 +112,16 @@ typedef struct _qla_tx_ring { uint64_t count; } qla_tx_ring_t; +typedef struct _qla_tx_fp { + struct mtx tx_mtx; + char tx_mtx_name[32]; + struct buf_ring *tx_br; + struct task fp_task; + struct taskqueue *fp_taskqueue; + void *ha; + uint32_t txr_idx; +} qla_tx_fp_t; + /* * Adapter structure contains the hardware independant information of the * pci function. @@ -178,10 +188,9 @@ struct qla_host { qla_tx_ring_t tx_ring[NUM_TX_RINGS]; bus_dma_tag_t tx_tag; - struct task tx_task; - struct taskqueue *tx_tq; struct callout tx_callout; - struct mtx tx_lock; + + qla_tx_fp_t tx_fp[MAX_SDS_RINGS]; qla_rx_ring_t rx_ring[MAX_RDS_RINGS]; bus_dma_tag_t rx_tag; Modified: stable/10/sys/dev/qlxgbe/ql_glbl.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_glbl.h Thu Feb 2 00:20:18 2017 (r313071) +++ stable/10/sys/dev/qlxgbe/ql_glbl.h Thu Feb 2 00:20:53 2017 (r313072) @@ -39,6 +39,7 @@ */ extern void ql_mbx_isr(void *arg); extern void ql_isr(void *arg); +extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count); /* * from ql_os.c @@ -66,7 +67,7 @@ extern void qla_reset_promisc(qla_host_t extern int ql_set_allmulti(qla_host_t *ha); extern void qla_reset_allmulti(qla_host_t *ha); extern void ql_update_link_state(qla_host_t *ha); -extern void ql_hw_tx_done(qla_host_t *ha); +extern void ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx); extern int ql_set_max_mtu(qla_host_t *ha, uint32_t mtu, uint16_t cntxt_id); extern void ql_hw_stop_rcv(qla_host_t *ha); extern void ql_get_stats(qla_host_t *ha); @@ -76,7 +77,7 @@ extern void qla_hw_async_event(qla_host_ extern int qla_get_nic_partition(qla_host_t *ha, uint32_t *supports_9kb, uint32_t *num_rcvq); -extern int qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp); +extern int ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp); extern void ql_minidump(qla_host_t *ha); extern int ql_minidump_init(qla_host_t *ha); Modified: stable/10/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.c Thu Feb 2 00:20:18 2017 (r313071) +++ stable/10/sys/dev/qlxgbe/ql_hw.c Thu Feb 2 00:20:53 2017 (r313072) @@ -51,7 +51,6 @@ static void qla_del_rcv_cntxt(qla_host_t static int qla_init_rcv_cntxt(qla_host_t *ha); static void qla_del_xmt_cntxt(qla_host_t *ha); static int qla_init_xmt_cntxt(qla_host_t *ha); -static void qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx); static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox, uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause); static int qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_idx, @@ -2047,7 +2046,7 @@ ql_hw_send(qla_host_t *ha, bus_dma_segme ha->hw.iscsi_pkt_count++; if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) { - qla_hw_tx_done_locked(ha, txr_idx); + ql_hw_tx_done_locked(ha, txr_idx); if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) { QL_DPRINT8(ha, (dev, "%s: (hw->txr_free <= " @@ -2552,15 +2551,8 @@ qla_init_rcv_cntxt(qla_host_t *ha) qla_host_to_le64(hw->dma_buf.sds_ring[i].dma_addr); rcntxt->sds[i].size = qla_host_to_le32(NUM_STATUS_DESCRIPTORS); - if (ha->msix_count == 2) { - rcntxt->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[0]); - rcntxt->sds[i].intr_src_bit = qla_host_to_le16((i)); - } else { - rcntxt->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[i]); - rcntxt->sds[i].intr_src_bit = qla_host_to_le16(0); - } + rcntxt->sds[i].intr_id = qla_host_to_le16(hw->intr_id[i]); + rcntxt->sds[i].intr_src_bit = qla_host_to_le16(0); } for (i = 0; i < rcntxt_rds_rings; i++) { @@ -2672,17 +2664,11 @@ qla_add_rcv_rings(qla_host_t *ha, uint32 add_rcv->sds[i].size = qla_host_to_le32(NUM_STATUS_DESCRIPTORS); - if (ha->msix_count == 2) { - add_rcv->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[0]); - add_rcv->sds[i].intr_src_bit = qla_host_to_le16(j); - } else { - add_rcv->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[j]); - add_rcv->sds[i].intr_src_bit = qla_host_to_le16(0); - } + add_rcv->sds[i].intr_id = qla_host_to_le16(hw->intr_id[j]); + add_rcv->sds[i].intr_src_bit = qla_host_to_le16(0); } + for (i = 0; (i < nsds); i++) { j = i + sds_idx; @@ -2803,6 +2789,7 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin q80_rsp_tx_cntxt_t *tcntxt_rsp; uint32_t err; qla_hw_tx_cntxt_t *hw_tx_cntxt; + uint32_t intr_idx; hw_tx_cntxt = &hw->tx_cntxt[txr_idx]; @@ -2818,6 +2805,8 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin tcntxt->count_version = (sizeof (q80_rq_tx_cntxt_t) >> 2); tcntxt->count_version |= Q8_MBX_CMD_VERSION; + intr_idx = txr_idx; + #ifdef QL_ENABLE_ISCSI_TLV tcntxt->cap0 = Q8_TX_CNTXT_CAP0_BASEFW | Q8_TX_CNTXT_CAP0_LSO | @@ -2827,8 +2816,9 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin tcntxt->traffic_class = 1; } -#else + intr_idx = txr_idx % (ha->hw.num_tx_rings >> 1); +#else tcntxt->cap0 = Q8_TX_CNTXT_CAP0_BASEFW | Q8_TX_CNTXT_CAP0_LSO; #endif /* #ifdef QL_ENABLE_ISCSI_TLV */ @@ -2841,10 +2831,9 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin qla_host_to_le64(hw_tx_cntxt->tx_cons_paddr); tcntxt->tx_ring[0].nentries = qla_host_to_le16(NUM_TX_DESCRIPTORS); - tcntxt->tx_ring[0].intr_id = qla_host_to_le16(hw->intr_id[0]); + tcntxt->tx_ring[0].intr_id = qla_host_to_le16(hw->intr_id[intr_idx]); tcntxt->tx_ring[0].intr_src_bit = qla_host_to_le16(0); - hw_tx_cntxt->txr_free = NUM_TX_DESCRIPTORS; hw_tx_cntxt->txr_next = hw_tx_cntxt->txr_comp = 0; @@ -3166,11 +3155,11 @@ ql_hw_set_multi(qla_host_t *ha, uint8_t } /* - * Name: qla_hw_tx_done_locked + * Name: ql_hw_tx_done_locked * Function: Handle Transmit Completions */ -static void -qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) +void +ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) { qla_tx_buf_t *txb; qla_hw_t *hw = &ha->hw; @@ -3208,34 +3197,6 @@ qla_hw_tx_done_locked(qla_host_t *ha, ui return; } -/* - * Name: ql_hw_tx_done - * Function: Handle Transmit Completions - */ -void -ql_hw_tx_done(qla_host_t *ha) -{ - int i; - uint32_t flag = 0; - - if (!mtx_trylock(&ha->tx_lock)) { - QL_DPRINT8(ha, (ha->pci_dev, - "%s: !mtx_trylock(&ha->tx_lock)\n", __func__)); - return; - } - for (i = 0; i < ha->hw.num_tx_rings; i++) { - qla_hw_tx_done_locked(ha, i); - if (ha->hw.tx_cntxt[i].txr_free <= (NUM_TX_DESCRIPTORS >> 1)) - flag = 1; - } - - if (!flag) - ha->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - - QLA_TX_UNLOCK(ha); - return; -} - void ql_update_link_state(qla_host_t *ha) { @@ -3655,7 +3616,7 @@ qla_get_port_config(qla_host_t *ha, uint } int -qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) +ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) { struct ether_vlan_header *eh; uint16_t etype; Modified: stable/10/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.h Thu Feb 2 00:20:18 2017 (r313071) +++ stable/10/sys/dev/qlxgbe/ql_hw.h Thu Feb 2 00:20:53 2017 (r313072) @@ -1543,7 +1543,6 @@ typedef struct _qla_hw_tx_cntxt { uint32_t tx_prod_reg; uint16_t tx_cntxt_id; - uint8_t frame_hdr[QL_FRAME_HDR_SIZE]; } qla_hw_tx_cntxt_t; Modified: stable/10/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_isr.c Thu Feb 2 00:20:18 2017 (r313071) +++ stable/10/sys/dev/qlxgbe/ql_isr.c Thu Feb 2 00:20:53 2017 (r313072) @@ -159,7 +159,12 @@ qla_rx_intr(qla_host_t *ha, qla_sgl_rcv_ ifp->if_ipackets++; mpf->m_pkthdr.flowid = sgc->rss_hash; - M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE); + +#if __FreeBSD_version >= 1100000 + M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE_HASH); +#else + M_HASHTYPE_SET(mpf, M_HASHTYPE_NONE); +#endif /* #if __FreeBSD_version >= 1100000 */ (*ifp->if_input)(ifp, mpf); @@ -450,11 +455,11 @@ qla_rcv_cont_sds(qla_host_t *ha, uint32_ } /* - * Name: qla_rcv_isr + * Name: ql_rcv_isr * Function: Main Interrupt Service Routine */ -static uint32_t -qla_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count) +uint32_t +ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count) { device_t dev; qla_hw_t *hw; @@ -704,7 +709,7 @@ qla_rcv_isr(qla_host_t *ha, uint32_t sds } if (ha->flags.stop_rcv) - goto qla_rcv_isr_exit; + goto ql_rcv_isr_exit; if (hw->sds[sds_idx].sdsr_next != comp_idx) { QL_UPDATE_SDS_CONSUMER_INDEX(ha, sds_idx, comp_idx); @@ -727,7 +732,7 @@ qla_rcv_isr(qla_host_t *ha, uint32_t sds if (opcode) ret = -1; -qla_rcv_isr_exit: +ql_rcv_isr_exit: hw->sds[sds_idx].rcv_active = 0; return (ret); @@ -931,7 +936,7 @@ ql_isr(void *arg) int idx; qla_hw_t *hw; struct ifnet *ifp; - uint32_t ret = 0; + qla_tx_fp_t *fp; ha = ivec->ha; hw = &ha->hw; @@ -940,17 +945,12 @@ ql_isr(void *arg) if ((idx = ivec->sds_idx) >= ha->hw.num_sds_rings) return; - if (idx == 0) - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); - - ret = qla_rcv_isr(ha, idx, -1); - if (idx == 0) - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); + fp = &ha->tx_fp[idx]; + + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); - if (!ha->flags.stop_rcv) { - QL_ENABLE_INTERRUPTS(ha, idx); - } return; } Modified: stable/10/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_os.c Thu Feb 2 00:20:18 2017 (r313071) +++ stable/10/sys/dev/qlxgbe/ql_os.c Thu Feb 2 00:20:53 2017 (r313072) @@ -76,11 +76,11 @@ static void qla_release(qla_host_t *ha); static void qla_dmamap_callback(void *arg, bus_dma_segment_t *segs, int nsegs, int error); static void qla_stop(qla_host_t *ha); -static int qla_send(qla_host_t *ha, struct mbuf **m_headp); -static void qla_tx_done(void *context, int pending); static void qla_get_peer(qla_host_t *ha); static void qla_error_recovery(void *context, int pending); static void qla_async_event(void *context, int pending); +static int qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, + uint32_t iscsi_pdu); /* * Hooks to the Operating Systems @@ -93,7 +93,14 @@ static void qla_init(void *arg); static int qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static int qla_media_change(struct ifnet *ifp); static void qla_media_status(struct ifnet *ifp, struct ifmediareq *ifmr); -static void qla_start(struct ifnet *ifp); + +static int qla_transmit(struct ifnet *ifp, struct mbuf *mp); +static void qla_qflush(struct ifnet *ifp); +static int qla_alloc_tx_br(qla_host_t *ha, qla_tx_fp_t *tx_fp); +static void qla_free_tx_br(qla_host_t *ha, qla_tx_fp_t *tx_fp); +static int qla_create_fp_taskqueues(qla_host_t *ha); +static void qla_destroy_fp_taskqueues(qla_host_t *ha); +static void qla_drain_fp_taskqueues(qla_host_t *ha); static device_method_t qla_pci_methods[] = { /* Device interface */ @@ -225,7 +232,6 @@ qla_watchdog(void *arg) qla_hw_t *hw; struct ifnet *ifp; uint32_t i; - qla_hw_tx_cntxt_t *hw_tx_cntxt; hw = &ha->hw; ifp = ha->ifp; @@ -254,19 +260,14 @@ qla_watchdog(void *arg) &ha->async_event_task); } - for (i = 0; i < ha->hw.num_tx_rings; i++) { - hw_tx_cntxt = &hw->tx_cntxt[i]; - if (qla_le32_to_host(*(hw_tx_cntxt->tx_cons)) != - hw_tx_cntxt->txr_comp) { - taskqueue_enqueue(ha->tx_tq, - &ha->tx_task); - break; - } - } + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp = &ha->tx_fp[i]; - if ((ifp->if_snd.ifq_head != NULL) && QL_RUNNING(ifp)) { - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, + &fp->fp_task); } + ha->qla_watchdog_paused = 0; } else { ha->qla_watchdog_paused = 0; @@ -322,9 +323,7 @@ qla_pci_attach(device_t dev) rsrc_len = (uint32_t) bus_get_resource_count(dev, SYS_RES_MEMORY, ha->reg_rid); - mtx_init(&ha->hw_lock, "qla83xx_hw_lock", MTX_NETWORK_LOCK, MTX_SPIN); - - mtx_init(&ha->tx_lock, "qla83xx_tx_lock", MTX_NETWORK_LOCK, MTX_DEF); + mtx_init(&ha->hw_lock, "qla83xx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF); qla_add_sysctls(ha); ql_hw_add_sysctls(ha); @@ -344,8 +343,9 @@ qla_pci_attach(device_t dev) } QL_DPRINT2(ha, (dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" - " msix_count 0x%x pci_reg %p\n", __func__, ha, - ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg)); + " msix_count 0x%x pci_reg %p pci_reg1 %p\n", __func__, ha, + ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg, + ha->pci_reg1)); /* initialize hardware */ if (ql_init_hw(ha)) { @@ -366,14 +366,15 @@ qla_pci_attach(device_t dev) goto qla_pci_attach_err; } device_printf(dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" - " msix_count 0x%x pci_reg %p num_rcvq = %d\n", __func__, ha, - ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg, num_rcvq); + " msix_count 0x%x pci_reg %p pci_reg1 %p num_rcvq = %d\n", + __func__, ha, ha->pci_func, rsrc_len, ha->msix_count, + ha->pci_reg, ha->pci_reg1, num_rcvq); #ifdef QL_ENABLE_ISCSI_TLV if ((ha->msix_count < 64) || (num_rcvq != 32)) { ha->hw.num_sds_rings = 15; - ha->hw.num_tx_rings = 32; + ha->hw.num_tx_rings = ha->hw.num_sds_rings * 2; } #endif /* #ifdef QL_ENABLE_ISCSI_TLV */ ha->hw.num_rds_rings = ha->hw.num_sds_rings; @@ -421,8 +422,20 @@ qla_pci_attach(device_t dev) device_printf(dev, "could not setup interrupt\n"); goto qla_pci_attach_err; } + + ha->tx_fp[i].ha = ha; + ha->tx_fp[i].txr_idx = i; + + if (qla_alloc_tx_br(ha, &ha->tx_fp[i])) { + device_printf(dev, "%s: could not allocate tx_br[%d]\n", + __func__, i); + goto qla_pci_attach_err; + } } + if (qla_create_fp_taskqueues(ha) != 0) + goto qla_pci_attach_err; + printf("%s: mp__ncpus %d sds %d rds %d msi-x %d\n", __func__, mp_ncpus, ha->hw.num_sds_rings, ha->hw.num_rds_rings, ha->msix_count); @@ -452,13 +465,6 @@ qla_pci_attach(device_t dev) ha->flags.qla_watchdog_active = 1; ha->flags.qla_watchdog_pause = 0; - - TASK_INIT(&ha->tx_task, 0, qla_tx_done, ha); - ha->tx_tq = taskqueue_create("qla_txq", M_NOWAIT, - taskqueue_thread_enqueue, &ha->tx_tq); - taskqueue_start_threads(&ha->tx_tq, 1, PI_NET, "%s txq", - device_get_nameunit(ha->pci_dev)); - callout_init(&ha->tx_callout, TRUE); ha->flags.qla_callout_init = 1; @@ -584,11 +590,6 @@ qla_release(qla_host_t *ha) taskqueue_free(ha->err_tq); } - if (ha->tx_tq) { - taskqueue_drain(ha->tx_tq, &ha->tx_task); - taskqueue_free(ha->tx_tq); - } - ql_del_cdev(ha); if (ha->flags.qla_watchdog_active) { @@ -626,13 +627,15 @@ qla_release(qla_host_t *ha) ha->irq_vec[i].irq_rid, ha->irq_vec[i].irq); } + + qla_free_tx_br(ha, &ha->tx_fp[i]); } + qla_destroy_fp_taskqueues(ha); if (ha->msix_count) pci_release_msi(dev); if (ha->flags.lock_init) { - mtx_destroy(&ha->tx_lock); mtx_destroy(&ha->hw_lock); } @@ -812,7 +815,9 @@ qla_init_ifnet(device_t dev, qla_host_t ifp->if_softc = ha; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = qla_ioctl; - ifp->if_start = qla_start; + + ifp->if_transmit = qla_transmit; + ifp->if_qflush = qla_qflush; IFQ_SET_MAXLEN(&ifp->if_snd, qla_get_ifq_snd_maxlen(ha)); ifp->if_snd.ifq_drv_maxlen = qla_get_ifq_snd_maxlen(ha); @@ -822,12 +827,13 @@ qla_init_ifnet(device_t dev, qla_host_t ether_ifattach(ifp, qla_get_mac_addr(ha)); - ifp->if_capabilities = IFCAP_HWCSUM | + ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_TSO4 | - IFCAP_JUMBO_MTU; - - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; - ifp->if_capabilities |= IFCAP_VLAN_HWTSO; + IFCAP_JUMBO_MTU | + IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_MTU | + IFCAP_VLAN_HWTSO | + IFCAP_LRO; ifp->if_capenable = ifp->if_capabilities; @@ -922,10 +928,13 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); - if (QLA_LOCK(ha, __func__, 1) == 0) { - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - QLA_UNLOCK(ha, __func__); - } + //if (QLA_LOCK(ha, __func__, 1) == 0) { + // ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + // QLA_UNLOCK(ha, __func__); + //} + QLA_LOCK(ha, __func__, 1); + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + QLA_UNLOCK(ha, __func__); return (ret); } @@ -1130,64 +1139,10 @@ qla_media_status(struct ifnet *ifp, stru return; } -static void -qla_start(struct ifnet *ifp) -{ - struct mbuf *m_head; - qla_host_t *ha = (qla_host_t *)ifp->if_softc; - - QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); - - if (!mtx_trylock(&ha->tx_lock)) { - QL_DPRINT8(ha, (ha->pci_dev, - "%s: mtx_trylock(&ha->tx_lock) failed\n", __func__)); - return; - } - - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) { - QL_DPRINT8(ha, - (ha->pci_dev, "%s: !IFF_DRV_RUNNING\n", __func__)); - QLA_TX_UNLOCK(ha); - return; - } - - if (!ha->hw.link_up || !ha->watchdog_ticks) - ql_update_link_state(ha); - - if (!ha->hw.link_up) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: link down\n", __func__)); - QLA_TX_UNLOCK(ha); - return; - } - - while (ifp->if_snd.ifq_head != NULL) { - IF_DEQUEUE(&ifp->if_snd, m_head); - - if (m_head == NULL) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: m_head == NULL\n", - __func__)); - break; - } - - if (qla_send(ha, &m_head)) { - if (m_head == NULL) - break; - QL_DPRINT8(ha, (ha->pci_dev, "%s: PREPEND\n", __func__)); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - IF_PREPEND(&ifp->if_snd, m_head); - break; - } - /* Send a copy of the frame to the BPF listener */ - ETHER_BPF_MTAP(ifp, m_head); - } - QLA_TX_UNLOCK(ha); - QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__)); - return; -} static int -qla_send(qla_host_t *ha, struct mbuf **m_headp) +qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, + uint32_t iscsi_pdu) { bus_dma_segment_t segs[QLA_MAX_SEGMENTS]; bus_dmamap_t map; @@ -1195,29 +1150,9 @@ qla_send(qla_host_t *ha, struct mbuf **m int ret = -1; uint32_t tx_idx; struct mbuf *m_head = *m_headp; - uint32_t txr_idx = ha->txr_idx; - uint32_t iscsi_pdu = 0; QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); - /* check if flowid is set */ - - if (M_HASHTYPE_GET(m_head) != M_HASHTYPE_NONE) { -#ifdef QL_ENABLE_ISCSI_TLV - if (qla_iscsi_pdu(ha, m_head) == 0) { - iscsi_pdu = 1; - txr_idx = m_head->m_pkthdr.flowid & - ((ha->hw.num_tx_rings >> 1) - 1); - } else { - txr_idx = m_head->m_pkthdr.flowid & - (ha->hw.num_tx_rings - 1); - } -#else - txr_idx = m_head->m_pkthdr.flowid & (ha->hw.num_tx_rings - 1); -#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ - } - - tx_idx = ha->hw.tx_cntxt[txr_idx].txr_next; map = ha->tx_ring[txr_idx].tx_buf[tx_idx].map; @@ -1295,16 +1230,302 @@ qla_send(qla_host_t *ha, struct mbuf **m return (ret); } +static int +qla_alloc_tx_br(qla_host_t *ha, qla_tx_fp_t *fp) +{ + snprintf(fp->tx_mtx_name, sizeof(fp->tx_mtx_name), + "qla%d_fp%d_tx_mq_lock", ha->pci_func, fp->txr_idx); + + mtx_init(&fp->tx_mtx, fp->tx_mtx_name, NULL, MTX_DEF); + + fp->tx_br = buf_ring_alloc(NUM_TX_DESCRIPTORS, M_DEVBUF, + M_NOWAIT, &fp->tx_mtx); + if (fp->tx_br == NULL) { + QL_DPRINT1(ha, (ha->pci_dev, "buf_ring_alloc failed for " + " fp[%d, %d]\n", ha->pci_func, fp->txr_idx)); + return (-ENOMEM); + } + return 0; +} + +static void +qla_free_tx_br(qla_host_t *ha, qla_tx_fp_t *fp) +{ + struct mbuf *mp; + struct ifnet *ifp = ha->ifp; + + if (mtx_initialized(&fp->tx_mtx)) { + + if (fp->tx_br != NULL) { + + mtx_lock(&fp->tx_mtx); + + while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) { + m_freem(mp); + } + + mtx_unlock(&fp->tx_mtx); + + buf_ring_free(fp->tx_br, M_DEVBUF); + fp->tx_br = NULL; + } + mtx_destroy(&fp->tx_mtx); + } + return; +} + +static void +qla_fp_taskqueue(void *context, int pending) +{ + qla_tx_fp_t *fp; + qla_host_t *ha; + struct ifnet *ifp; + struct mbuf *mp; + int ret; + uint32_t txr_idx; + uint32_t iscsi_pdu = 0; + uint32_t rx_pkts_left; + + fp = context; + + if (fp == NULL) + return; + + ha = (qla_host_t *)fp->ha; + + ifp = ha->ifp; + + txr_idx = fp->txr_idx; + + mtx_lock(&fp->tx_mtx); + + if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) || (!ha->hw.link_up)) { + mtx_unlock(&fp->tx_mtx); + goto qla_fp_taskqueue_exit; + } + + rx_pkts_left = ql_rcv_isr(ha, fp->txr_idx, 64); + +#ifdef QL_ENABLE_ISCSI_TLV + ql_hw_tx_done_locked(ha, fp->txr_idx); + ql_hw_tx_done_locked(ha, (fp->txr_idx + (ha->hw.num_tx_rings >> 1))); + txr_idx = txr_idx + (ha->hw.num_tx_rings >> 1); +#else + ql_hw_tx_done_locked(ha, fp->txr_idx); +#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ + + mp = drbr_peek(ifp, fp->tx_br); + + while (mp != NULL) { + + if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) { +#ifdef QL_ENABLE_ISCSI_TLV + if (ql_iscsi_pdu(ha, mp) == 0) { + iscsi_pdu = 1; + } +#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ + } + + ret = qla_send(ha, &mp, txr_idx, iscsi_pdu); + + if (ret) { + if (mp != NULL) + drbr_putback(ifp, fp->tx_br, mp); + else { + drbr_advance(ifp, fp->tx_br); + } + + mtx_unlock(&fp->tx_mtx); + + goto qla_fp_taskqueue_exit0; + } else { + drbr_advance(ifp, fp->tx_br); + } + + mp = drbr_peek(ifp, fp->tx_br); + } + + mtx_unlock(&fp->tx_mtx); + +qla_fp_taskqueue_exit0: + + if (rx_pkts_left || ((mp != NULL) && ret)) { + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + } else { + if (!ha->flags.stop_rcv) { + QL_ENABLE_INTERRUPTS(ha, fp->txr_idx); + } + } + +qla_fp_taskqueue_exit: + + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + return; +} + +static int +qla_create_fp_taskqueues(qla_host_t *ha) +{ + int i; + uint8_t tq_name[32]; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + bzero(tq_name, sizeof (tq_name)); + snprintf(tq_name, sizeof (tq_name), "ql_fp_tq_%d", i); + + TASK_INIT(&fp->fp_task, 0, qla_fp_taskqueue, fp); + + fp->fp_taskqueue = taskqueue_create_fast(tq_name, M_NOWAIT, + taskqueue_thread_enqueue, + &fp->fp_taskqueue); + + if (fp->fp_taskqueue == NULL) + return (-1); + + taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s", + tq_name); + + QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, + fp->fp_taskqueue)); + } + + return (0); +} + +static void +qla_destroy_fp_taskqueues(qla_host_t *ha) +{ + int i; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + if (fp->fp_taskqueue != NULL) { + taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + taskqueue_free(fp->fp_taskqueue); + fp->fp_taskqueue = NULL; + } + } + return; +} + +static void +qla_drain_fp_taskqueues(qla_host_t *ha) +{ + int i; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + if (fp->fp_taskqueue != NULL) { + taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + } + } + return; +} + +static int +qla_transmit(struct ifnet *ifp, struct mbuf *mp) +{ + qla_host_t *ha = (qla_host_t *)ifp->if_softc; + qla_tx_fp_t *fp; + int rss_id = 0; + int ret = 0; + + QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + +#if __FreeBSD_version >= 1100000 + if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) +#else + if (mp->m_flags & M_FLOWID) +#endif + rss_id = (mp->m_pkthdr.flowid & Q8_RSS_IND_TBL_MAX_IDX) % + ha->hw.num_sds_rings; + fp = &ha->tx_fp[rss_id]; + + if (fp->tx_br == NULL) { + ret = EINVAL; + goto qla_transmit_exit; + } + + if (mp != NULL) { + ret = drbr_enqueue(ifp, fp->tx_br, mp); + } + + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + + ret = 0; + +qla_transmit_exit: + + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + return ret; +} + +static void +qla_qflush(struct ifnet *ifp) +{ + int i; + qla_tx_fp_t *fp; + struct mbuf *mp; + qla_host_t *ha; + + ha = (qla_host_t *)ifp->if_softc; + + QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br) { + mtx_lock(&fp->tx_mtx); + + while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) { + m_freem(mp); + } + mtx_unlock(&fp->tx_mtx); + } + } + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + + return; +} + + static void qla_stop(qla_host_t *ha) { struct ifnet *ifp = ha->ifp; device_t dev; + int i = 0; dev = ha->pci_dev; ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QLA_TX_LOCK(ha); QLA_TX_UNLOCK(ha); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp; + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br != NULL) { + mtx_lock(&fp->tx_mtx); + mtx_unlock(&fp->tx_mtx); + } + } ha->flags.qla_watchdog_pause = 1; @@ -1313,6 +1534,8 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + qla_drain_fp_taskqueues(ha); + ql_hw_stop_rcv(ha); ql_del_hw_if(ha); @@ -1653,25 +1876,6 @@ exit_ql_get_mbuf: return (ret); } -static void -qla_tx_done(void *context, int pending) -{ - qla_host_t *ha = context; - struct ifnet *ifp; - - ifp = ha->ifp; - - if (!ifp) - return; - - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: !IFF_DRV_RUNNING\n", __func__)); - return; - } - ql_hw_tx_done(ha); - - qla_start(ha->ifp); -} static void qla_get_peer(qla_host_t *ha) @@ -1714,18 +1918,32 @@ qla_error_recovery(void *context, int pe qla_host_t *ha = context; uint32_t msecs_100 = 100; struct ifnet *ifp = ha->ifp; + int i = 0; (void)QLA_LOCK(ha, __func__, 0); if (ha->flags.qla_interface_up) { - ha->hw.imd_compl = 1; - qla_mdelay(__func__, 300); + ha->hw.imd_compl = 1; + qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); + ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QLA_TX_LOCK(ha); QLA_TX_UNLOCK(ha); + ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp; + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br != NULL) { + mtx_lock(&fp->tx_mtx); + mtx_unlock(&fp->tx_mtx); + } + } } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 2 00:37:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56E14CCB04F; Thu, 2 Feb 2017 00:37:23 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B131A9; Thu, 2 Feb 2017 00:37:22 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v120bM1B076035; Thu, 2 Feb 2017 00:37:22 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v120bLW8076026; Thu, 2 Feb 2017 00:37:21 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201702020037.v120bLW8076026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Thu, 2 Feb 2017 00:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r313073 - stable/9/sys/dev/qlxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 00:37:23 -0000 Author: davidcs Date: Thu Feb 2 00:37:21 2017 New Revision: 313073 URL: https://svnweb.freebsd.org/changeset/base/313073 Log: MFC r312728 Added support for if_transmit and if_qflush Removed if_start updated version to 3.10.33 Modified: stable/9/sys/dev/qlxgbe/ql_def.h stable/9/sys/dev/qlxgbe/ql_glbl.h stable/9/sys/dev/qlxgbe/ql_hw.c stable/9/sys/dev/qlxgbe/ql_hw.h stable/9/sys/dev/qlxgbe/ql_isr.c stable/9/sys/dev/qlxgbe/ql_os.c stable/9/sys/dev/qlxgbe/ql_os.h stable/9/sys/dev/qlxgbe/ql_ver.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/qlxgbe/ql_def.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_def.h Thu Feb 2 00:20:53 2017 (r313072) +++ stable/9/sys/dev/qlxgbe/ql_def.h Thu Feb 2 00:37:21 2017 (r313073) @@ -112,6 +112,16 @@ typedef struct _qla_tx_ring { uint64_t count; } qla_tx_ring_t; +typedef struct _qla_tx_fp { + struct mtx tx_mtx; + char tx_mtx_name[32]; + struct buf_ring *tx_br; + struct task fp_task; + struct taskqueue *fp_taskqueue; + void *ha; + uint32_t txr_idx; +} qla_tx_fp_t; + /* * Adapter structure contains the hardware independant information of the * pci function. @@ -178,10 +188,9 @@ struct qla_host { qla_tx_ring_t tx_ring[NUM_TX_RINGS]; bus_dma_tag_t tx_tag; - struct task tx_task; - struct taskqueue *tx_tq; struct callout tx_callout; - struct mtx tx_lock; + + qla_tx_fp_t tx_fp[MAX_SDS_RINGS]; qla_rx_ring_t rx_ring[MAX_RDS_RINGS]; bus_dma_tag_t rx_tag; Modified: stable/9/sys/dev/qlxgbe/ql_glbl.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_glbl.h Thu Feb 2 00:20:53 2017 (r313072) +++ stable/9/sys/dev/qlxgbe/ql_glbl.h Thu Feb 2 00:37:21 2017 (r313073) @@ -39,6 +39,7 @@ */ extern void ql_mbx_isr(void *arg); extern void ql_isr(void *arg); +extern uint32_t ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count); /* * from ql_os.c @@ -66,7 +67,7 @@ extern void qla_reset_promisc(qla_host_t extern int ql_set_allmulti(qla_host_t *ha); extern void qla_reset_allmulti(qla_host_t *ha); extern void ql_update_link_state(qla_host_t *ha); -extern void ql_hw_tx_done(qla_host_t *ha); +extern void ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx); extern int ql_set_max_mtu(qla_host_t *ha, uint32_t mtu, uint16_t cntxt_id); extern void ql_hw_stop_rcv(qla_host_t *ha); extern void ql_get_stats(qla_host_t *ha); @@ -76,7 +77,7 @@ extern void qla_hw_async_event(qla_host_ extern int qla_get_nic_partition(qla_host_t *ha, uint32_t *supports_9kb, uint32_t *num_rcvq); -extern int qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp); +extern int ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp); extern void ql_minidump(qla_host_t *ha); extern int ql_minidump_init(qla_host_t *ha); Modified: stable/9/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_hw.c Thu Feb 2 00:20:53 2017 (r313072) +++ stable/9/sys/dev/qlxgbe/ql_hw.c Thu Feb 2 00:37:21 2017 (r313073) @@ -51,7 +51,6 @@ static void qla_del_rcv_cntxt(qla_host_t static int qla_init_rcv_cntxt(qla_host_t *ha); static void qla_del_xmt_cntxt(qla_host_t *ha); static int qla_init_xmt_cntxt(qla_host_t *ha); -static void qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx); static int qla_mbx_cmd(qla_host_t *ha, uint32_t *h_mbox, uint32_t n_hmbox, uint32_t *fw_mbox, uint32_t n_fwmbox, uint32_t no_pause); static int qla_config_intr_cntxt(qla_host_t *ha, uint32_t start_idx, @@ -2047,7 +2046,7 @@ ql_hw_send(qla_host_t *ha, bus_dma_segme ha->hw.iscsi_pkt_count++; if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) { - qla_hw_tx_done_locked(ha, txr_idx); + ql_hw_tx_done_locked(ha, txr_idx); if (hw->tx_cntxt[txr_idx].txr_free <= (num_tx_cmds + QLA_TX_MIN_FREE)) { QL_DPRINT8(ha, (dev, "%s: (hw->txr_free <= " @@ -2552,15 +2551,8 @@ qla_init_rcv_cntxt(qla_host_t *ha) qla_host_to_le64(hw->dma_buf.sds_ring[i].dma_addr); rcntxt->sds[i].size = qla_host_to_le32(NUM_STATUS_DESCRIPTORS); - if (ha->msix_count == 2) { - rcntxt->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[0]); - rcntxt->sds[i].intr_src_bit = qla_host_to_le16((i)); - } else { - rcntxt->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[i]); - rcntxt->sds[i].intr_src_bit = qla_host_to_le16(0); - } + rcntxt->sds[i].intr_id = qla_host_to_le16(hw->intr_id[i]); + rcntxt->sds[i].intr_src_bit = qla_host_to_le16(0); } for (i = 0; i < rcntxt_rds_rings; i++) { @@ -2672,17 +2664,11 @@ qla_add_rcv_rings(qla_host_t *ha, uint32 add_rcv->sds[i].size = qla_host_to_le32(NUM_STATUS_DESCRIPTORS); - if (ha->msix_count == 2) { - add_rcv->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[0]); - add_rcv->sds[i].intr_src_bit = qla_host_to_le16(j); - } else { - add_rcv->sds[i].intr_id = - qla_host_to_le16(hw->intr_id[j]); - add_rcv->sds[i].intr_src_bit = qla_host_to_le16(0); - } + add_rcv->sds[i].intr_id = qla_host_to_le16(hw->intr_id[j]); + add_rcv->sds[i].intr_src_bit = qla_host_to_le16(0); } + for (i = 0; (i < nsds); i++) { j = i + sds_idx; @@ -2803,6 +2789,7 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin q80_rsp_tx_cntxt_t *tcntxt_rsp; uint32_t err; qla_hw_tx_cntxt_t *hw_tx_cntxt; + uint32_t intr_idx; hw_tx_cntxt = &hw->tx_cntxt[txr_idx]; @@ -2818,6 +2805,8 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin tcntxt->count_version = (sizeof (q80_rq_tx_cntxt_t) >> 2); tcntxt->count_version |= Q8_MBX_CMD_VERSION; + intr_idx = txr_idx; + #ifdef QL_ENABLE_ISCSI_TLV tcntxt->cap0 = Q8_TX_CNTXT_CAP0_BASEFW | Q8_TX_CNTXT_CAP0_LSO | @@ -2827,8 +2816,9 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin tcntxt->traffic_class = 1; } -#else + intr_idx = txr_idx % (ha->hw.num_tx_rings >> 1); +#else tcntxt->cap0 = Q8_TX_CNTXT_CAP0_BASEFW | Q8_TX_CNTXT_CAP0_LSO; #endif /* #ifdef QL_ENABLE_ISCSI_TLV */ @@ -2841,10 +2831,9 @@ qla_init_xmt_cntxt_i(qla_host_t *ha, uin qla_host_to_le64(hw_tx_cntxt->tx_cons_paddr); tcntxt->tx_ring[0].nentries = qla_host_to_le16(NUM_TX_DESCRIPTORS); - tcntxt->tx_ring[0].intr_id = qla_host_to_le16(hw->intr_id[0]); + tcntxt->tx_ring[0].intr_id = qla_host_to_le16(hw->intr_id[intr_idx]); tcntxt->tx_ring[0].intr_src_bit = qla_host_to_le16(0); - hw_tx_cntxt->txr_free = NUM_TX_DESCRIPTORS; hw_tx_cntxt->txr_next = hw_tx_cntxt->txr_comp = 0; @@ -3166,11 +3155,11 @@ ql_hw_set_multi(qla_host_t *ha, uint8_t } /* - * Name: qla_hw_tx_done_locked + * Name: ql_hw_tx_done_locked * Function: Handle Transmit Completions */ -static void -qla_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) +void +ql_hw_tx_done_locked(qla_host_t *ha, uint32_t txr_idx) { qla_tx_buf_t *txb; qla_hw_t *hw = &ha->hw; @@ -3208,34 +3197,6 @@ qla_hw_tx_done_locked(qla_host_t *ha, ui return; } -/* - * Name: ql_hw_tx_done - * Function: Handle Transmit Completions - */ -void -ql_hw_tx_done(qla_host_t *ha) -{ - int i; - uint32_t flag = 0; - - if (!mtx_trylock(&ha->tx_lock)) { - QL_DPRINT8(ha, (ha->pci_dev, - "%s: !mtx_trylock(&ha->tx_lock)\n", __func__)); - return; - } - for (i = 0; i < ha->hw.num_tx_rings; i++) { - qla_hw_tx_done_locked(ha, i); - if (ha->hw.tx_cntxt[i].txr_free <= (NUM_TX_DESCRIPTORS >> 1)) - flag = 1; - } - - if (!flag) - ha->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - - QLA_TX_UNLOCK(ha); - return; -} - void ql_update_link_state(qla_host_t *ha) { @@ -3655,7 +3616,7 @@ qla_get_port_config(qla_host_t *ha, uint } int -qla_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) +ql_iscsi_pdu(qla_host_t *ha, struct mbuf *mp) { struct ether_vlan_header *eh; uint16_t etype; Modified: stable/9/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_hw.h Thu Feb 2 00:20:53 2017 (r313072) +++ stable/9/sys/dev/qlxgbe/ql_hw.h Thu Feb 2 00:37:21 2017 (r313073) @@ -1543,7 +1543,6 @@ typedef struct _qla_hw_tx_cntxt { uint32_t tx_prod_reg; uint16_t tx_cntxt_id; - uint8_t frame_hdr[QL_FRAME_HDR_SIZE]; } qla_hw_tx_cntxt_t; Modified: stable/9/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_isr.c Thu Feb 2 00:20:53 2017 (r313072) +++ stable/9/sys/dev/qlxgbe/ql_isr.c Thu Feb 2 00:37:21 2017 (r313073) @@ -450,11 +450,11 @@ qla_rcv_cont_sds(qla_host_t *ha, uint32_ } /* - * Name: qla_rcv_isr + * Name: ql_rcv_isr * Function: Main Interrupt Service Routine */ -static uint32_t -qla_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count) +uint32_t +ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count) { device_t dev; qla_hw_t *hw; @@ -704,7 +704,7 @@ qla_rcv_isr(qla_host_t *ha, uint32_t sds } if (ha->flags.stop_rcv) - goto qla_rcv_isr_exit; + goto ql_rcv_isr_exit; if (hw->sds[sds_idx].sdsr_next != comp_idx) { QL_UPDATE_SDS_CONSUMER_INDEX(ha, sds_idx, comp_idx); @@ -727,7 +727,7 @@ qla_rcv_isr(qla_host_t *ha, uint32_t sds if (opcode) ret = -1; -qla_rcv_isr_exit: +ql_rcv_isr_exit: hw->sds[sds_idx].rcv_active = 0; return (ret); @@ -931,7 +931,7 @@ ql_isr(void *arg) int idx; qla_hw_t *hw; struct ifnet *ifp; - uint32_t ret = 0; + qla_tx_fp_t *fp; ha = ivec->ha; hw = &ha->hw; @@ -940,17 +940,12 @@ ql_isr(void *arg) if ((idx = ivec->sds_idx) >= ha->hw.num_sds_rings) return; - if (idx == 0) - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); - - ret = qla_rcv_isr(ha, idx, -1); - if (idx == 0) - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); + fp = &ha->tx_fp[idx]; + + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); - if (!ha->flags.stop_rcv) { - QL_ENABLE_INTERRUPTS(ha, idx); - } return; } Modified: stable/9/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_os.c Thu Feb 2 00:20:53 2017 (r313072) +++ stable/9/sys/dev/qlxgbe/ql_os.c Thu Feb 2 00:37:21 2017 (r313073) @@ -76,11 +76,11 @@ static void qla_release(qla_host_t *ha); static void qla_dmamap_callback(void *arg, bus_dma_segment_t *segs, int nsegs, int error); static void qla_stop(qla_host_t *ha); -static int qla_send(qla_host_t *ha, struct mbuf **m_headp); -static void qla_tx_done(void *context, int pending); static void qla_get_peer(qla_host_t *ha); static void qla_error_recovery(void *context, int pending); static void qla_async_event(void *context, int pending); +static int qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, + uint32_t iscsi_pdu); /* * Hooks to the Operating Systems @@ -93,7 +93,14 @@ static void qla_init(void *arg); static int qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static int qla_media_change(struct ifnet *ifp); static void qla_media_status(struct ifnet *ifp, struct ifmediareq *ifmr); -static void qla_start(struct ifnet *ifp); + +static int qla_transmit(struct ifnet *ifp, struct mbuf *mp); +static void qla_qflush(struct ifnet *ifp); +static int qla_alloc_tx_br(qla_host_t *ha, qla_tx_fp_t *tx_fp); +static void qla_free_tx_br(qla_host_t *ha, qla_tx_fp_t *tx_fp); +static int qla_create_fp_taskqueues(qla_host_t *ha); +static void qla_destroy_fp_taskqueues(qla_host_t *ha); +static void qla_drain_fp_taskqueues(qla_host_t *ha); static device_method_t qla_pci_methods[] = { /* Device interface */ @@ -225,7 +232,6 @@ qla_watchdog(void *arg) qla_hw_t *hw; struct ifnet *ifp; uint32_t i; - qla_hw_tx_cntxt_t *hw_tx_cntxt; hw = &ha->hw; ifp = ha->ifp; @@ -254,19 +260,14 @@ qla_watchdog(void *arg) &ha->async_event_task); } - for (i = 0; i < ha->hw.num_tx_rings; i++) { - hw_tx_cntxt = &hw->tx_cntxt[i]; - if (qla_le32_to_host(*(hw_tx_cntxt->tx_cons)) != - hw_tx_cntxt->txr_comp) { - taskqueue_enqueue(ha->tx_tq, - &ha->tx_task); - break; - } - } + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp = &ha->tx_fp[i]; - if ((ifp->if_snd.ifq_head != NULL) && QL_RUNNING(ifp)) { - taskqueue_enqueue(ha->tx_tq, &ha->tx_task); + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, + &fp->fp_task); } + ha->qla_watchdog_paused = 0; } else { ha->qla_watchdog_paused = 0; @@ -322,9 +323,7 @@ qla_pci_attach(device_t dev) rsrc_len = (uint32_t) bus_get_resource_count(dev, SYS_RES_MEMORY, ha->reg_rid); - mtx_init(&ha->hw_lock, "qla83xx_hw_lock", MTX_NETWORK_LOCK, MTX_SPIN); - - mtx_init(&ha->tx_lock, "qla83xx_tx_lock", MTX_NETWORK_LOCK, MTX_DEF); + mtx_init(&ha->hw_lock, "qla83xx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF); qla_add_sysctls(ha); ql_hw_add_sysctls(ha); @@ -344,8 +343,9 @@ qla_pci_attach(device_t dev) } QL_DPRINT2(ha, (dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" - " msix_count 0x%x pci_reg %p\n", __func__, ha, - ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg)); + " msix_count 0x%x pci_reg %p pci_reg1 %p\n", __func__, ha, + ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg, + ha->pci_reg1)); /* initialize hardware */ if (ql_init_hw(ha)) { @@ -366,14 +366,15 @@ qla_pci_attach(device_t dev) goto qla_pci_attach_err; } device_printf(dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" - " msix_count 0x%x pci_reg %p num_rcvq = %d\n", __func__, ha, - ha->pci_func, rsrc_len, ha->msix_count, ha->pci_reg, num_rcvq); + " msix_count 0x%x pci_reg %p pci_reg1 %p num_rcvq = %d\n", + __func__, ha, ha->pci_func, rsrc_len, ha->msix_count, + ha->pci_reg, ha->pci_reg1, num_rcvq); #ifdef QL_ENABLE_ISCSI_TLV if ((ha->msix_count < 64) || (num_rcvq != 32)) { ha->hw.num_sds_rings = 15; - ha->hw.num_tx_rings = 32; + ha->hw.num_tx_rings = ha->hw.num_sds_rings * 2; } #endif /* #ifdef QL_ENABLE_ISCSI_TLV */ ha->hw.num_rds_rings = ha->hw.num_sds_rings; @@ -421,8 +422,20 @@ qla_pci_attach(device_t dev) device_printf(dev, "could not setup interrupt\n"); goto qla_pci_attach_err; } + + ha->tx_fp[i].ha = ha; + ha->tx_fp[i].txr_idx = i; + + if (qla_alloc_tx_br(ha, &ha->tx_fp[i])) { + device_printf(dev, "%s: could not allocate tx_br[%d]\n", + __func__, i); + goto qla_pci_attach_err; + } } + if (qla_create_fp_taskqueues(ha) != 0) + goto qla_pci_attach_err; + printf("%s: mp__ncpus %d sds %d rds %d msi-x %d\n", __func__, mp_ncpus, ha->hw.num_sds_rings, ha->hw.num_rds_rings, ha->msix_count); @@ -452,13 +465,6 @@ qla_pci_attach(device_t dev) ha->flags.qla_watchdog_active = 1; ha->flags.qla_watchdog_pause = 0; - - TASK_INIT(&ha->tx_task, 0, qla_tx_done, ha); - ha->tx_tq = taskqueue_create("qla_txq", M_NOWAIT, - taskqueue_thread_enqueue, &ha->tx_tq); - taskqueue_start_threads(&ha->tx_tq, 1, PI_NET, "%s txq", - device_get_nameunit(ha->pci_dev)); - callout_init(&ha->tx_callout, TRUE); ha->flags.qla_callout_init = 1; @@ -584,11 +590,6 @@ qla_release(qla_host_t *ha) taskqueue_free(ha->err_tq); } - if (ha->tx_tq) { - taskqueue_drain(ha->tx_tq, &ha->tx_task); - taskqueue_free(ha->tx_tq); - } - ql_del_cdev(ha); if (ha->flags.qla_watchdog_active) { @@ -626,13 +627,15 @@ qla_release(qla_host_t *ha) ha->irq_vec[i].irq_rid, ha->irq_vec[i].irq); } + + qla_free_tx_br(ha, &ha->tx_fp[i]); } + qla_destroy_fp_taskqueues(ha); if (ha->msix_count) pci_release_msi(dev); if (ha->flags.lock_init) { - mtx_destroy(&ha->tx_lock); mtx_destroy(&ha->hw_lock); } @@ -812,7 +815,9 @@ qla_init_ifnet(device_t dev, qla_host_t ifp->if_softc = ha; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = qla_ioctl; - ifp->if_start = qla_start; + + ifp->if_transmit = qla_transmit; + ifp->if_qflush = qla_qflush; IFQ_SET_MAXLEN(&ifp->if_snd, qla_get_ifq_snd_maxlen(ha)); ifp->if_snd.ifq_drv_maxlen = qla_get_ifq_snd_maxlen(ha); @@ -822,12 +827,13 @@ qla_init_ifnet(device_t dev, qla_host_t ether_ifattach(ifp, qla_get_mac_addr(ha)); - ifp->if_capabilities = IFCAP_HWCSUM | + ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_TSO4 | - IFCAP_JUMBO_MTU; - - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; - ifp->if_capabilities |= IFCAP_VLAN_HWTSO; + IFCAP_JUMBO_MTU | + IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_MTU | + IFCAP_VLAN_HWTSO | + IFCAP_LRO; ifp->if_capenable = ifp->if_capabilities; @@ -922,10 +928,13 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); - if (QLA_LOCK(ha, __func__, 1) == 0) { - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - QLA_UNLOCK(ha, __func__); - } + //if (QLA_LOCK(ha, __func__, 1) == 0) { + // ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + // QLA_UNLOCK(ha, __func__); + //} + QLA_LOCK(ha, __func__, 1); + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + QLA_UNLOCK(ha, __func__); return (ret); } @@ -1130,64 +1139,10 @@ qla_media_status(struct ifnet *ifp, stru return; } -static void -qla_start(struct ifnet *ifp) -{ - struct mbuf *m_head; - qla_host_t *ha = (qla_host_t *)ifp->if_softc; - - QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); - - if (!mtx_trylock(&ha->tx_lock)) { - QL_DPRINT8(ha, (ha->pci_dev, - "%s: mtx_trylock(&ha->tx_lock) failed\n", __func__)); - return; - } - - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) { - QL_DPRINT8(ha, - (ha->pci_dev, "%s: !IFF_DRV_RUNNING\n", __func__)); - QLA_TX_UNLOCK(ha); - return; - } - - if (!ha->hw.link_up || !ha->watchdog_ticks) - ql_update_link_state(ha); - - if (!ha->hw.link_up) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: link down\n", __func__)); - QLA_TX_UNLOCK(ha); - return; - } - - while (ifp->if_snd.ifq_head != NULL) { - IF_DEQUEUE(&ifp->if_snd, m_head); - - if (m_head == NULL) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: m_head == NULL\n", - __func__)); - break; - } - - if (qla_send(ha, &m_head)) { - if (m_head == NULL) - break; - QL_DPRINT8(ha, (ha->pci_dev, "%s: PREPEND\n", __func__)); - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - IF_PREPEND(&ifp->if_snd, m_head); - break; - } - /* Send a copy of the frame to the BPF listener */ - ETHER_BPF_MTAP(ifp, m_head); - } - QLA_TX_UNLOCK(ha); - QL_DPRINT8(ha, (ha->pci_dev, "%s: exit\n", __func__)); - return; -} static int -qla_send(qla_host_t *ha, struct mbuf **m_headp) +qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, + uint32_t iscsi_pdu) { bus_dma_segment_t segs[QLA_MAX_SEGMENTS]; bus_dmamap_t map; @@ -1195,8 +1150,6 @@ qla_send(qla_host_t *ha, struct mbuf **m int ret = -1; uint32_t tx_idx; struct mbuf *m_head = *m_headp; - uint32_t txr_idx = ha->txr_idx; - uint32_t iscsi_pdu = 0; QL_DPRINT8(ha, (ha->pci_dev, "%s: enter\n", __func__)); @@ -1293,16 +1246,302 @@ qla_send(qla_host_t *ha, struct mbuf **m return (ret); } +static int +qla_alloc_tx_br(qla_host_t *ha, qla_tx_fp_t *fp) +{ + snprintf(fp->tx_mtx_name, sizeof(fp->tx_mtx_name), + "qla%d_fp%d_tx_mq_lock", ha->pci_func, fp->txr_idx); + + mtx_init(&fp->tx_mtx, fp->tx_mtx_name, NULL, MTX_DEF); + + fp->tx_br = buf_ring_alloc(NUM_TX_DESCRIPTORS, M_DEVBUF, + M_NOWAIT, &fp->tx_mtx); + if (fp->tx_br == NULL) { + QL_DPRINT1(ha, (ha->pci_dev, "buf_ring_alloc failed for " + " fp[%d, %d]\n", ha->pci_func, fp->txr_idx)); + return (-ENOMEM); + } + return 0; +} + +static void +qla_free_tx_br(qla_host_t *ha, qla_tx_fp_t *fp) +{ + struct mbuf *mp; + struct ifnet *ifp = ha->ifp; + + if (mtx_initialized(&fp->tx_mtx)) { + + if (fp->tx_br != NULL) { + + mtx_lock(&fp->tx_mtx); + + while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) { + m_freem(mp); + } + + mtx_unlock(&fp->tx_mtx); + + buf_ring_free(fp->tx_br, M_DEVBUF); + fp->tx_br = NULL; + } + mtx_destroy(&fp->tx_mtx); + } + return; +} + +static void +qla_fp_taskqueue(void *context, int pending) +{ + qla_tx_fp_t *fp; + qla_host_t *ha; + struct ifnet *ifp; + struct mbuf *mp; + int ret = 0; + uint32_t txr_idx; + uint32_t iscsi_pdu = 0; + uint32_t rx_pkts_left; + + fp = context; + + if (fp == NULL) + return; + + ha = (qla_host_t *)fp->ha; + + ifp = ha->ifp; + + txr_idx = fp->txr_idx; + + mtx_lock(&fp->tx_mtx); + + if (((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) || (!ha->hw.link_up)) { + mtx_unlock(&fp->tx_mtx); + goto qla_fp_taskqueue_exit; + } + + rx_pkts_left = ql_rcv_isr(ha, fp->txr_idx, 64); + +#ifdef QL_ENABLE_ISCSI_TLV + ql_hw_tx_done_locked(ha, fp->txr_idx); + ql_hw_tx_done_locked(ha, (fp->txr_idx + (ha->hw.num_tx_rings >> 1))); + txr_idx = txr_idx + (ha->hw.num_tx_rings >> 1); +#else + ql_hw_tx_done_locked(ha, fp->txr_idx); +#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ + + mp = drbr_peek(ifp, fp->tx_br); + + while (mp != NULL) { + + if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) { +#ifdef QL_ENABLE_ISCSI_TLV + if (ql_iscsi_pdu(ha, mp) == 0) { + iscsi_pdu = 1; + } +#endif /* #ifdef QL_ENABLE_ISCSI_TLV */ + } + + ret = qla_send(ha, &mp, txr_idx, iscsi_pdu); + + if (ret) { + if (mp != NULL) + drbr_putback(ifp, fp->tx_br, mp); + else { + drbr_advance(ifp, fp->tx_br); + } + + mtx_unlock(&fp->tx_mtx); + + goto qla_fp_taskqueue_exit0; + } else { + drbr_advance(ifp, fp->tx_br); + } + + mp = drbr_peek(ifp, fp->tx_br); + } + + mtx_unlock(&fp->tx_mtx); + +qla_fp_taskqueue_exit0: + + if (rx_pkts_left || ((mp != NULL) && ret)) { + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + } else { + if (!ha->flags.stop_rcv) { + QL_ENABLE_INTERRUPTS(ha, fp->txr_idx); + } + } + +qla_fp_taskqueue_exit: + + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + return; +} + +static int +qla_create_fp_taskqueues(qla_host_t *ha) +{ + int i; + uint8_t tq_name[32]; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + bzero(tq_name, sizeof (tq_name)); + snprintf(tq_name, sizeof (tq_name), "ql_fp_tq_%d", i); + + TASK_INIT(&fp->fp_task, 0, qla_fp_taskqueue, fp); + + fp->fp_taskqueue = taskqueue_create_fast(tq_name, M_NOWAIT, + taskqueue_thread_enqueue, + &fp->fp_taskqueue); + + if (fp->fp_taskqueue == NULL) + return (-1); + + taskqueue_start_threads(&fp->fp_taskqueue, 1, PI_NET, "%s", + tq_name); + + QL_DPRINT1(ha, (ha->pci_dev, "%s: %p\n", __func__, + fp->fp_taskqueue)); + } + + return (0); +} + +static void +qla_destroy_fp_taskqueues(qla_host_t *ha) +{ + int i; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + if (fp->fp_taskqueue != NULL) { + taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + taskqueue_free(fp->fp_taskqueue); + fp->fp_taskqueue = NULL; + } + } + return; +} + +static void +qla_drain_fp_taskqueues(qla_host_t *ha) +{ + int i; + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp = &ha->tx_fp[i]; + + if (fp->fp_taskqueue != NULL) { + taskqueue_drain(fp->fp_taskqueue, &fp->fp_task); + } + } + return; +} + +static int +qla_transmit(struct ifnet *ifp, struct mbuf *mp) +{ + qla_host_t *ha = (qla_host_t *)ifp->if_softc; + qla_tx_fp_t *fp; + int rss_id = 0; + int ret = 0; + + QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + +#if __FreeBSD_version >= 1100000 + if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE) +#else + if (mp->m_flags & M_FLOWID) +#endif + rss_id = (mp->m_pkthdr.flowid & Q8_RSS_IND_TBL_MAX_IDX) % + ha->hw.num_sds_rings; + fp = &ha->tx_fp[rss_id]; + + if (fp->tx_br == NULL) { + ret = EINVAL; + goto qla_transmit_exit; + } + + if (mp != NULL) { + ret = drbr_enqueue(ifp, fp->tx_br, mp); + } + + if (fp->fp_taskqueue != NULL) + taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); + + ret = 0; + +qla_transmit_exit: + + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit ret = %d\n", __func__, ret)); + return ret; +} + +static void +qla_qflush(struct ifnet *ifp) +{ + int i; + qla_tx_fp_t *fp; + struct mbuf *mp; + qla_host_t *ha; + + ha = (qla_host_t *)ifp->if_softc; + + QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br) { + mtx_lock(&fp->tx_mtx); + + while ((mp = drbr_dequeue(ifp, fp->tx_br)) != NULL) { + m_freem(mp); + } + mtx_unlock(&fp->tx_mtx); + } + } + QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); + + return; +} + + static void qla_stop(qla_host_t *ha) { struct ifnet *ifp = ha->ifp; device_t dev; + int i = 0; dev = ha->pci_dev; ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QLA_TX_LOCK(ha); QLA_TX_UNLOCK(ha); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp; + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br != NULL) { + mtx_lock(&fp->tx_mtx); + mtx_unlock(&fp->tx_mtx); + } + } ha->flags.qla_watchdog_pause = 1; @@ -1311,6 +1550,8 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + qla_drain_fp_taskqueues(ha); + ql_hw_stop_rcv(ha); ql_del_hw_if(ha); @@ -1651,25 +1892,6 @@ exit_ql_get_mbuf: return (ret); } -static void -qla_tx_done(void *context, int pending) -{ - qla_host_t *ha = context; - struct ifnet *ifp; - - ifp = ha->ifp; - - if (!ifp) - return; - - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - QL_DPRINT8(ha, (ha->pci_dev, "%s: !IFF_DRV_RUNNING\n", __func__)); - return; - } - ql_hw_tx_done(ha); - - qla_start(ha->ifp); -} static void qla_get_peer(qla_host_t *ha) @@ -1712,18 +1934,32 @@ qla_error_recovery(void *context, int pe qla_host_t *ha = context; uint32_t msecs_100 = 100; struct ifnet *ifp = ha->ifp; + int i = 0; (void)QLA_LOCK(ha, __func__, 0); if (ha->flags.qla_interface_up) { - ha->hw.imd_compl = 1; - qla_mdelay(__func__, 300); + ha->hw.imd_compl = 1; + qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); + ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); - QLA_TX_LOCK(ha); QLA_TX_UNLOCK(ha); + ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); + + for (i = 0; i < ha->hw.num_sds_rings; i++) { + qla_tx_fp_t *fp; + + fp = &ha->tx_fp[i]; + + if (fp == NULL) + continue; + + if (fp->tx_br != NULL) { + mtx_lock(&fp->tx_mtx); + mtx_unlock(&fp->tx_mtx); + } + } } QLA_UNLOCK(ha, __func__); Modified: stable/9/sys/dev/qlxgbe/ql_os.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_os.h Thu Feb 2 00:20:53 2017 (r313072) +++ stable/9/sys/dev/qlxgbe/ql_os.h Thu Feb 2 00:37:21 2017 (r313073) @@ -147,8 +147,8 @@ MALLOC_DECLARE(M_QLA83XXBUF); /* * Locks */ -#define QLA_LOCK(ha, str, no_delay) qla_lock(ha, str, no_delay) -#define QLA_UNLOCK(ha, str) qla_unlock(ha, str) +#define QLA_LOCK(ha, str, no_delay) mtx_lock(&ha->hw_lock) +#define QLA_UNLOCK(ha, str) mtx_unlock(&ha->hw_lock) #define QLA_TX_LOCK(ha) mtx_lock(&ha->tx_lock); #define QLA_TX_UNLOCK(ha) mtx_unlock(&ha->tx_lock); Modified: stable/9/sys/dev/qlxgbe/ql_ver.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_ver.h Thu Feb 2 00:20:53 2017 (r313072) +++ stable/9/sys/dev/qlxgbe/ql_ver.h Thu Feb 2 00:37:21 2017 (r313073) @@ -36,6 +36,6 @@ #define QLA_VERSION_MAJOR 3 #define QLA_VERSION_MINOR 10 -#define QLA_VERSION_BUILD 31 +#define QLA_VERSION_BUILD 33 #endif /* #ifndef _QL_VER_H_ */ From owner-svn-src-all@freebsd.org Thu Feb 2 00:50:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 895F8CCB2B8; Thu, 2 Feb 2017 00:50:48 +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 519AE908; Thu, 2 Feb 2017 00:50:48 +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 v120ollU080172; Thu, 2 Feb 2017 00:50:47 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v120okJl080163; Thu, 2 Feb 2017 00:50:46 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201702020050.v120okJl080163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 2 Feb 2017 00:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313074 - in head: contrib/libarchive contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/tar/test lib/libarchive lib/libarchive/t... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 00:50:48 -0000 Author: mm Date: Thu Feb 2 00:50:46 2017 New Revision: 313074 URL: https://svnweb.freebsd.org/changeset/base/313074 Log: MFV r313071: Sync libarchive with vendor Vendor changes (relevant to FreeBSD): - support extracting NFSv4 ACLs from Solaris tar archives - bugfixes and optimizations in the ACL code - multiple fixes in the test suite - typo and other small bugfixes Security fixes: - cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335) - LHA reader: heap-buffer-overflow in lha_read_file_header_1() (CVE-2017-5601) - LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream() (OSS-Fuzz 453) - mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443) - WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458) Memory leak fixes: - ACL support: free memory allocated by acl_get_qualifier() - disk writer: missing free in create_filesystem_object() - file reader: fd leak (Coverity 1016755) - gnutar writer: fix free in archive_write_gnutar_header() (Coverity 101675) - iso 9660 reader: missing free in parse_file_info() (partial Coverity 1016754) - program reader: missing free in __archive_read_program() - program writer: missing free in __archive_write_program_free() - xar reader: missing free in xar_cleanup() - xar reader: missing frees in expat_xmlattr_setup() (Coverity 1229979-1229981) - xar writer: missing free in file_free() - zip reader: missing free in zip_read_local_file_header() MFC after: 1 week X-MFC with: 310866, 310868, 310870, 311899 Added: head/contrib/libarchive/libarchive/test/test_acl_platform_nfs4.c - copied unchanged from r313071, vendor/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c head/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c - copied unchanged from r313071, vendor/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c Deleted: head/contrib/libarchive/libarchive/test/test_acl_freebsd_nfs4.c head/contrib/libarchive/libarchive/test/test_acl_freebsd_posix1e.c Modified: head/contrib/libarchive/NEWS head/contrib/libarchive/libarchive/archive_acl.c head/contrib/libarchive/libarchive/archive_acl_private.h head/contrib/libarchive/libarchive/archive_entry.c head/contrib/libarchive/libarchive/archive_entry_strmode.c head/contrib/libarchive/libarchive/archive_platform.h head/contrib/libarchive/libarchive/archive_random.c head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c head/contrib/libarchive/libarchive/archive_read_open_filename.c head/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c head/contrib/libarchive/libarchive/archive_read_support_filter_program.c head/contrib/libarchive/libarchive/archive_read_support_format_cab.c head/contrib/libarchive/libarchive/archive_read_support_format_cpio.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_mtree.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_xar.c head/contrib/libarchive/libarchive/archive_read_support_format_zip.c head/contrib/libarchive/libarchive/archive_write_add_filter_program.c head/contrib/libarchive/libarchive/archive_write_disk_acl.c head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/archive_write_open.3 head/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c head/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c head/contrib/libarchive/libarchive/archive_write_set_format_xar.c head/contrib/libarchive/libarchive/test/main.c head/contrib/libarchive/libarchive/test/test.h head/contrib/libarchive/libarchive/test/test_acl_text.c head/contrib/libarchive/libarchive/test/test_archive_string.c head/contrib/libarchive/libarchive/test/test_compat_gtar.c head/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c head/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.tar.uu head/contrib/libarchive/libarchive/test/test_fuzz.c head/contrib/libarchive/libarchive/test/test_read_disk_directory_traversals.c head/contrib/libarchive/libarchive/test/test_read_filter_lzop.c head/contrib/libarchive/libarchive/test/test_read_filter_lzop_multiple_parts.c head/contrib/libarchive/libarchive/test/test_read_format_zip.c head/contrib/libarchive/libarchive/test/test_read_format_zip_comment_stored.c head/contrib/libarchive/libarchive/test/test_read_format_zip_mac_metadata.c head/contrib/libarchive/libarchive/test/test_read_format_zip_malformed.c head/contrib/libarchive/libarchive/test/test_read_format_zip_nested.c head/contrib/libarchive/libarchive/test/test_read_format_zip_padded.c head/contrib/libarchive/libarchive/test/test_read_format_zip_sfx.c head/contrib/libarchive/libarchive/test/test_write_disk_secure746.c head/contrib/libarchive/libarchive/test/test_write_filter_lz4.c head/contrib/libarchive/libarchive/test/test_write_filter_lzop.c head/contrib/libarchive/libarchive/test/test_write_format_zip_large.c head/contrib/libarchive/libarchive/test/test_write_format_zip_zip64.c head/contrib/libarchive/tar/test/test_option_uid_uname.c head/contrib/libarchive/tar/util.c head/lib/libarchive/config_freebsd.h head/lib/libarchive/tests/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/NEWS ============================================================================== --- head/contrib/libarchive/NEWS Thu Feb 2 00:37:21 2017 (r313073) +++ head/contrib/libarchive/NEWS Thu Feb 2 00:50:46 2017 (r313074) @@ -1,3 +1,7 @@ +Jan 29, 2017: Limited NFSv4 ACL support for Mac OS (Darwin) + +Jan 10, 2017: POSIX.1e and NFSv4 ACL support for Solaris and derivates + Dec 27, 2016: NFSv4 ACL read and write support for pax Deprecated functions: archive_entry_acl_text(), archive_entry_acl_text_w() Modified: head/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_acl.c Thu Feb 2 00:37:21 2017 (r313073) +++ head/contrib/libarchive/libarchive/archive_acl.c Thu Feb 2 00:50:46 2017 (r313074) @@ -349,6 +349,15 @@ archive_acl_count(struct archive_acl *ac } /* + * Return a bitmask of stored ACL types in an ACL list + */ +int +archive_acl_types(struct archive_acl *acl) +{ + return (acl->acl_types); +} + +/* * Prepare for reading entries from the ACL data. Returns a count * of entries matching "want_type", or zero if there are no * non-extended ACL entries of that type. @@ -1144,7 +1153,7 @@ archive_acl_from_text_w(struct archive_a const wchar_t *s, *st; - int numfields, fields, n, r, ret; + int numfields, fields, n, r, sol, ret; int type, types, tag, permset, id; size_t len; wchar_t sep; @@ -1192,6 +1201,7 @@ archive_acl_from_text_w(struct archive_a } n = 0; + sol = 0; id = -1; permset = 0; name.start = name.end = NULL; @@ -1263,6 +1273,7 @@ archive_acl_from_text_w(struct archive_a && ismode_w(field[n + 1].start, field[n + 1].end, &permset)) { /* This is Solaris-style "other:rwx" */ + sol = 1; } else if (fields == (n + 3) && field[n + 1].start < field[n + 1].end) { /* Invalid mask or other field */ @@ -1287,9 +1298,12 @@ archive_acl_from_text_w(struct archive_a continue; } - /* Without "default:" we expect mode in field 2 */ - if (permset == 0 && !ismode_w(field[n + 2].start, - field[n + 2].end, &permset)) { + /* + * Without "default:" we expect mode in field 2 + * Exception: Solaris other and mask fields + */ + if (permset == 0 && !ismode_w(field[n + 2 - sol].start, + field[n + 2 - sol].end, &permset)) { /* Invalid mode, skip entry */ ret = ARCHIVE_WARN; continue; @@ -1615,7 +1629,7 @@ archive_acl_from_text_l(struct archive_a } field[6], name; const char *s, *st; - int numfields, fields, n, r, ret; + int numfields, fields, n, r, sol, ret; int type, types, tag, permset, id; size_t len; char sep; @@ -1663,6 +1677,7 @@ archive_acl_from_text_l(struct archive_a } n = 0; + sol = 0; id = -1; permset = 0; name.start = name.end = NULL; @@ -1734,6 +1749,7 @@ archive_acl_from_text_l(struct archive_a && ismode(field[n + 1].start, field[n + 1].end, &permset)) { /* This is Solaris-style "other:rwx" */ + sol = 1; } else if (fields == (n + 3) && field[n + 1].start < field[n + 1].end) { /* Invalid mask or other field */ @@ -1758,9 +1774,12 @@ archive_acl_from_text_l(struct archive_a continue; } - /* Without "default:" we expect mode in field 2 */ - if (permset == 0 && !ismode(field[n + 2].start, - field[n + 2].end, &permset)) { + /* + * Without "default:" we expect mode in field 3 + * Exception: Solaris other and mask fields + */ + if (permset == 0 && !ismode(field[n + 2 - sol].start, + field[n + 2 - sol].end, &permset)) { /* Invalid mode, skip entry */ ret = ARCHIVE_WARN; continue; Modified: head/contrib/libarchive/libarchive/archive_acl_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_acl_private.h Thu Feb 2 00:37:21 2017 (r313073) +++ head/contrib/libarchive/libarchive/archive_acl_private.h Thu Feb 2 00:50:46 2017 (r313074) @@ -56,6 +56,7 @@ struct archive_acl { void archive_acl_clear(struct archive_acl *); void archive_acl_copy(struct archive_acl *, struct archive_acl *); int archive_acl_count(struct archive_acl *, int); +int archive_acl_types(struct archive_acl *); int archive_acl_reset(struct archive_acl *, int); int archive_acl_next(struct archive *, struct archive_acl *, int, int *, int *, int *, int *, const char **); Modified: head/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.c Thu Feb 2 00:37:21 2017 (r313073) +++ head/contrib/libarchive/libarchive/archive_entry.c Thu Feb 2 00:50:46 2017 (r313074) @@ -1447,7 +1447,7 @@ archive_entry_acl_add_entry_w(struct arc int archive_entry_acl_types(struct archive_entry *entry) { - return ((&entry->acl)->acl_types); + return (archive_acl_types(&entry->acl)); } /* Modified: head/contrib/libarchive/libarchive/archive_entry_strmode.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_strmode.c Thu Feb 2 00:37:21 2017 (r313073) +++ head/contrib/libarchive/libarchive/archive_entry_strmode.c Thu Feb 2 00:50:46 2017 (r313074) @@ -80,7 +80,7 @@ archive_entry_strmode(struct archive_ent if (mode & 0001) bp[9] = 't'; else bp[9] = 'T'; } - if (archive_entry_acl_count(entry, ARCHIVE_ENTRY_ACL_TYPE_ACCESS)) + if (archive_entry_acl_types(entry) != 0) bp[10] = '+'; return (bp); Modified: head/contrib/libarchive/libarchive/archive_platform.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_platform.h Thu Feb 2 00:37:21 2017 (r313073) +++ head/contrib/libarchive/libarchive/archive_platform.h Thu Feb 2 00:50:46 2017 (r313074) @@ -147,8 +147,25 @@ * acl_set_file(), and ACL_USER, we assume it has the rest of the * POSIX.1e draft functions used in archive_read_extract.c. */ -#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE && HAVE_ACL_USER +#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE +#if HAVE_ACL_USER #define HAVE_POSIX_ACL 1 +#elif HAVE_ACL_TYPE_EXTENDED +#define HAVE_DARWIN_ACL 1 +#endif +#endif + +/* + * If this platform has , acl_get(), facl_get(), acl_set(), + * facl_set() and types aclent_t and ace_t it uses Solaris-style ACL functions + */ +#if HAVE_SYS_ACL_H && HAVE_ACL_GET && HAVE_FACL_GET && HAVE_ACL_SET && HAVE_FACL_SET && HAVE_ACLENT_T && HAVE_ACE_T +#define HAVE_SUN_ACL 1 +#endif + +/* Define if platform supports NFSv4 ACLs */ +#if (HAVE_POSIX_ACL && HAVE_ACL_TYPE_NFS4) || HAVE_SUN_ACL || HAVE_DARWIN_ACL +#define HAVE_NFS4_ACL 1 #endif /* Modified: head/contrib/libarchive/libarchive/archive_random.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_random.c Thu Feb 2 00:37:21 2017 (r313073) +++ head/contrib/libarchive/libarchive/archive_random.c Thu Feb 2 00:50:46 2017 (r313074) @@ -80,7 +80,7 @@ archive_random(void *buf, size_t nbytes) success = CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - if (!success && GetLastError() == NTE_BAD_KEYSET) { + if (!success && GetLastError() == (DWORD)NTE_BAD_KEYSET) { success = CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); } Modified: head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu Feb 2 00:37:21 2017 (r313073) +++ head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu Feb 2 00:50:46 2017 (r313074) @@ -38,6 +38,11 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_ACL_H #include #endif +#ifdef HAVE_DARWIN_ACL +#include +#include +#include +#endif #ifdef HAVE_SYS_EXTATTR_H #include #endif @@ -118,6 +123,15 @@ __FBSDID("$FreeBSD$"); #define ACL_GET_PERM acl_get_perm_np #endif +/* NFSv4 platform ACL type */ +#if HAVE_SUN_ACL +#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACE_T +#elif HAVE_DARWIN_ACL +#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_EXTENDED +#elif HAVE_ACL_TYPE_NFS4 +#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_NFS4 +#endif + static int setup_acls(struct archive_read_disk *, struct archive_entry *, int *fd); static int setup_mac_metadata(struct archive_read_disk *, @@ -405,17 +419,38 @@ setup_mac_metadata(struct archive_read_d } #endif +#if HAVE_DARWIN_ACL +static int translate_guid(struct archive *, acl_entry_t, + int *, int *, const char **); + +static void add_trivial_nfs4_acl(struct archive_entry *); +#endif + +#if HAVE_SUN_ACL +static int +sun_acl_is_trivial(acl_t *, mode_t, int *trivialp); +#endif -#ifdef HAVE_POSIX_ACL +#if HAVE_POSIX_ACL || HAVE_NFS4_ACL static int translate_acl(struct archive_read_disk *a, - struct archive_entry *entry, acl_t acl, int archive_entry_acl_type); + struct archive_entry *entry, +#if HAVE_SUN_ACL + acl_t *acl, +#else + acl_t acl, +#endif + int archive_entry_acl_type); static int setup_acls(struct archive_read_disk *a, struct archive_entry *entry, int *fd) { const char *accpath; - acl_t acl; +#if HAVE_SUN_ACL + acl_t *acl; +#else + acl_t acl; +#endif int r; accpath = archive_entry_sourcepath(entry); @@ -440,17 +475,20 @@ setup_acls(struct archive_read_disk *a, acl = NULL; -#ifdef ACL_TYPE_NFS4 +#if HAVE_NFS4_ACL /* Try NFSv4 ACL first. */ if (*fd >= 0) -#if HAVE_ACL_GET_FD_NP - acl = acl_get_fd_np(*fd, ACL_TYPE_NFS4); +#if HAVE_SUN_ACL + /* Solaris reads both POSIX.1e and NFSv4 ACL here */ + facl_get(*fd, 0, &acl); +#elif HAVE_ACL_GET_FD_NP + acl = acl_get_fd_np(*fd, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); #else acl = acl_get_fd(*fd); #endif #if HAVE_ACL_GET_LINK_NP else if (!a->follow_symlinks) - acl = acl_get_link_np(accpath, ACL_TYPE_NFS4); + acl = acl_get_link_np(accpath, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); #else else if ((!a->follow_symlinks) && (archive_entry_filetype(entry) == AE_IFLNK)) @@ -459,12 +497,24 @@ setup_acls(struct archive_read_disk *a, acl = NULL; #endif else - acl = acl_get_file(accpath, ACL_TYPE_NFS4); +#if HAVE_SUN_ACL + /* Solaris reads both POSIX.1e and NFSv4 ACLs here */ + acl_get(accpath, 0, &acl); +#else + acl = acl_get_file(accpath, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); +#endif -#if HAVE_ACL_IS_TRIVIAL_NP - if (acl != NULL && acl_is_trivial_np(acl, &r) == 0) { - /* Ignore "trivial" ACLs that just mirror the file mode. */ - if (r) { + +#if HAVE_ACL_IS_TRIVIAL_NP || HAVE_SUN_ACL + /* Ignore "trivial" ACLs that just mirror the file mode. */ + if (acl != NULL) { +#if HAVE_SUN_ACL + if (sun_acl_is_trivial(acl, archive_entry_mode(entry), + &r) == 0 && r == 1) +#elif HAVE_ACL_IS_TRIVIAL_NP + if (acl_is_trivial_np(acl, &r) == 0 && r == 1) +#endif + { acl_free(acl); acl = NULL; /* @@ -474,17 +524,35 @@ setup_acls(struct archive_read_disk *a, return (ARCHIVE_OK); } } -#endif +#endif /* HAVE_ACL_IS_TRIVIAL_NP || HAVE_SUN_ACL */ if (acl != NULL) { r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); acl_free(acl); if (r != ARCHIVE_OK) { archive_set_error(&a->archive, errno, +#if HAVE_SUN_ACL + "Couldn't translate ACLs: %s", accpath); +#else "Couldn't translate NFSv4 ACLs: %s", accpath); +#endif } +#if HAVE_DARWIN_ACL + /* + * Because Mac OS doesn't support owner@, group@ and everyone@ + * ACLs we need to add NFSv4 ACLs mirroring the file mode to + * the archive entry. Otherwise extraction on non-Mac platforms + * would lead to an invalid file mode. + */ + if (archive_entry_acl_count(entry, + ARCHIVE_ENTRY_ACL_TYPE_NFS4) > 0) + add_trivial_nfs4_acl(entry); +#endif return (r); } -#endif /* ACL_TYPE_NFS4 */ +#endif /* HAVE_NFS4_ACL */ + +#if HAVE_POSIX_ACL + /* This code path is skipped on MacOS and Solaris */ /* Retrieve access ACL from file. */ if (*fd >= 0) @@ -513,8 +581,7 @@ setup_acls(struct archive_read_disk *a, #endif if (acl != NULL) { - r = translate_acl(a, entry, acl, - ARCHIVE_ENTRY_ACL_TYPE_ACCESS); + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_ACCESS); acl_free(acl); acl = NULL; if (r != ARCHIVE_OK) { @@ -544,71 +611,560 @@ setup_acls(struct archive_read_disk *a, } } } +#endif /* HAVE_POSIX_ACL */ return (ARCHIVE_OK); } /* - * Translate system ACL into libarchive internal structure. + * Translate system ACL permissions into libarchive internal structure */ - static struct { - int archive_perm; - int platform_perm; + int archive_perm; + int platform_perm; } acl_perm_map[] = { - {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, - {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, - {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, -#ifdef ACL_TYPE_NFS4 - {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, - {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, - {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, - {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, - {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_NAMED_ATTRS}, - {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_NAMED_ATTRS}, - {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, - {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, - {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, - {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} +#if HAVE_SUN_ACL /* Solaris NFSv4 ACL permissions */ + {ARCHIVE_ENTRY_ACL_EXECUTE, ACE_EXECUTE}, + {ARCHIVE_ENTRY_ACL_READ_DATA, ACE_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACE_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACE_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACE_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACE_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACE_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACE_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACE_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACE_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACE_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACE_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, ACE_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACE_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACE_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACE_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACE_SYNCHRONIZE} +#elif HAVE_DARWIN_ACL /* MacOS ACL permissions */ + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_EXTATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_EXTATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_SECURITY}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_SECURITY}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_CHANGE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} +#else /* POSIX.1e ACL permissions */ + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, + {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, +#if HAVE_ACL_TYPE_NFS4 /* FreeBSD NFSv4 ACL permissions */ + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} #endif +#endif /* !HAVE_SUN_ACL && !HAVE_DARWIN_ACL */ }; -#ifdef ACL_TYPE_NFS4 +#if HAVE_NFS4_ACL +/* + * Translate system NFSv4 inheritance flags into libarchive internal structure + */ static struct { - int archive_inherit; - int platform_inherit; + int archive_inherit; + int platform_inherit; } acl_inherit_map[] = { - {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, +#if HAVE_SUN_ACL /* Solaris ACL inheritance flags */ + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACE_FILE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACE_DIRECTORY_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACE_NO_PROPAGATE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACE_INHERIT_ONLY_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACE_SUCCESSFUL_ACCESS_ACE_FLAG}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACE_FAILED_ACCESS_ACE_FLAG}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACE_INHERITED_ACE} +#elif HAVE_DARWIN_ACL /* MacOS NFSv4 inheritance flags */ + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}, + {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_LIMIT_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_ONLY_INHERIT} +#else /* FreeBSD NFSv4 ACL inheritance flags */ + {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_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 /* !HAVE_SUN_ACL && !HAVE_DARWIN_ACL */ }; -#endif +#endif /* HAVE_NFS4_ACL */ + +#if HAVE_DARWIN_ACL +static int translate_guid(struct archive *a, acl_entry_t acl_entry, + int *ae_id, int *ae_tag, const char **ae_name) +{ + void *q; + uid_t ugid; + int r, idtype; + struct passwd *pwd; + struct group *grp; + + q = acl_get_qualifier(acl_entry); + if (q == NULL) + return (1); + r = mbr_uuid_to_id((const unsigned char *)q, &ugid, &idtype); + if (r != 0) { + acl_free(q); + return (1); + } + if (idtype == ID_TYPE_UID) { + *ae_tag = ARCHIVE_ENTRY_ACL_USER; + pwd = getpwuuid(q); + if (pwd == NULL) { + *ae_id = ugid; + *ae_name = NULL; + } else { + *ae_id = pwd->pw_uid; + *ae_name = archive_read_disk_uname(a, *ae_id); + } + } else if (idtype == ID_TYPE_GID) { + *ae_tag = ARCHIVE_ENTRY_ACL_GROUP; + grp = getgruuid(q); + if (grp == NULL) { + *ae_id = ugid; + *ae_name = NULL; + } else { + *ae_id = grp->gr_gid; + *ae_name = archive_read_disk_gname(a, *ae_id); + } + } else + r = 1; + + acl_free(q); + return (r); +} + +/* + * Add trivial NFSv4 ACL entries from mode + */ +static void +add_trivial_nfs4_acl(struct archive_entry *entry) +{ + mode_t mode; + int i; + const int rperm = ARCHIVE_ENTRY_ACL_READ_DATA; + const int wperm = ARCHIVE_ENTRY_ACL_WRITE_DATA | + ARCHIVE_ENTRY_ACL_APPEND_DATA; + const int eperm = ARCHIVE_ENTRY_ACL_EXECUTE; + const int pubset = ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES | + ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS | + ARCHIVE_ENTRY_ACL_READ_ACL | + ARCHIVE_ENTRY_ACL_SYNCHRONIZE; + const int ownset = pubset | ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES | + ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS | + ARCHIVE_ENTRY_ACL_WRITE_ACL | + ARCHIVE_ENTRY_ACL_WRITE_OWNER; + + struct { + const int type; + const int tag; + int permset; + } tacl_entry[] = { + {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_USER_OBJ, 0}, + {ARCHIVE_ENTRY_ACL_TYPE_DENY, ARCHIVE_ENTRY_ACL_USER_OBJ, 0}, + {ARCHIVE_ENTRY_ACL_TYPE_DENY, ARCHIVE_ENTRY_ACL_GROUP_OBJ, 0}, + {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_USER_OBJ, ownset}, + {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_GROUP_OBJ, pubset}, + {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_EVERYONE, pubset} + }; + + mode = archive_entry_mode(entry); + + /* Permissions for everyone@ */ + if (mode & 0004) + tacl_entry[5].permset |= rperm; + if (mode & 0002) + tacl_entry[5].permset |= wperm; + if (mode & 0001) + tacl_entry[5].permset |= eperm; + + /* Permissions for group@ */ + if (mode & 0040) + tacl_entry[4].permset |= rperm; + else if (mode & 0004) + tacl_entry[2].permset |= rperm; + if (mode & 0020) + tacl_entry[4].permset |= wperm; + else if (mode & 0002) + tacl_entry[2].permset |= wperm; + if (mode & 0010) + tacl_entry[4].permset |= eperm; + else if (mode & 0001) + tacl_entry[2].permset |= eperm; + + /* Permissions for owner@ */ + if (mode & 0400) { + tacl_entry[3].permset |= rperm; + if (!(mode & 0040) && (mode & 0004)) + tacl_entry[0].permset |= rperm; + } else if ((mode & 0040) || (mode & 0004)) + tacl_entry[1].permset |= rperm; + if (mode & 0200) { + tacl_entry[3].permset |= wperm; + if (!(mode & 0020) && (mode & 0002)) + tacl_entry[0].permset |= wperm; + } else if ((mode & 0020) || (mode & 0002)) + tacl_entry[1].permset |= wperm; + if (mode & 0100) { + tacl_entry[3].permset |= eperm; + if (!(mode & 0010) && (mode & 0001)) + tacl_entry[0].permset |= eperm; + } else if ((mode & 0010) || (mode & 0001)) + tacl_entry[1].permset |= eperm; + + for (i = 0; i < 6; i++) { + if (tacl_entry[i].permset != 0) { + archive_entry_acl_add_entry(entry, + tacl_entry[i].type, tacl_entry[i].permset, + tacl_entry[i].tag, -1, NULL); + } + } + + return; +} +#elif HAVE_SUN_ACL +/* + * Check if acl is trivial + * This is a FreeBSD acl_is_trivial_np() implementation for Solaris + */ +static int +sun_acl_is_trivial(acl_t *acl, mode_t mode, int *trivialp) +{ + int i, p; + const uint32_t rperm = ACE_READ_DATA; + const uint32_t wperm = ACE_WRITE_DATA | ACE_APPEND_DATA; + const uint32_t eperm = ACE_EXECUTE; + const uint32_t pubset = ACE_READ_ATTRIBUTES | ACE_READ_NAMED_ATTRS | + ACE_READ_ACL | ACE_SYNCHRONIZE; + const uint32_t ownset = pubset | ACE_WRITE_ATTRIBUTES | + ACE_WRITE_NAMED_ATTRS | ACE_WRITE_ACL | ACE_WRITE_OWNER; + + ace_t *ace; + ace_t tace[6]; + + if (acl == NULL || trivialp == NULL) + return (-1); + + *trivialp = 0; + + /* ACL_IS_TRIVIAL flag must be set for both POSIX.1e and NFSv4 ACLs */ + if ((acl->acl_flags & ACL_IS_TRIVIAL) == 0) + return (0); + + /* + * POSIX.1e ACLs marked with ACL_IS_TRIVIAL are compatible with + * FreeBSD acl_is_trivial_np(). On Solaris they have 4 entries, + * incuding mask. + */ + if (acl->acl_type == ACLENT_T) { + if (acl->acl_cnt == 4) + *trivialp = 1; + return (0); + } + + if (acl->acl_type != ACE_T || acl->acl_entry_size != sizeof(ace_t)) + return (-1); + + /* + * Continue with checking NFSv4 ACLs + * + * Create list of trivial ace's to be compared + */ + + /* owner@ allow pre */ + tace[0].a_flags = ACE_OWNER; + tace[0].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; + tace[0].a_access_mask = 0; + + /* owner@ deny */ + tace[1].a_flags = ACE_OWNER; + tace[1].a_type = ACE_ACCESS_DENIED_ACE_TYPE; + tace[1].a_access_mask = 0; + + /* group@ deny */ + tace[2].a_flags = ACE_GROUP | ACE_IDENTIFIER_GROUP; + tace[2].a_type = ACE_ACCESS_DENIED_ACE_TYPE; + tace[2].a_access_mask = 0; + + /* owner@ allow */ + tace[3].a_flags = ACE_OWNER; + tace[3].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; + tace[3].a_access_mask = ownset; + + /* group@ allow */ + tace[4].a_flags = ACE_GROUP | ACE_IDENTIFIER_GROUP; + tace[4].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; + tace[4].a_access_mask = pubset; + + /* everyone@ allow */ + tace[5].a_flags = ACE_EVERYONE; + tace[5].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; + tace[5].a_access_mask = pubset; + + /* Permissions for everyone@ */ + if (mode & 0004) + tace[5].a_access_mask |= rperm; + if (mode & 0002) + tace[5].a_access_mask |= wperm; + if (mode & 0001) + tace[5].a_access_mask |= eperm; + + /* Permissions for group@ */ + if (mode & 0040) + tace[4].a_access_mask |= rperm; + else if (mode & 0004) + tace[2].a_access_mask |= rperm; + if (mode & 0020) + tace[4].a_access_mask |= wperm; + else if (mode & 0002) + tace[2].a_access_mask |= wperm; + if (mode & 0010) + tace[4].a_access_mask |= eperm; + else if (mode & 0001) + tace[2].a_access_mask |= eperm; + + /* Permissions for owner@ */ + if (mode & 0400) { + tace[3].a_access_mask |= rperm; + if (!(mode & 0040) && (mode & 0004)) + tace[0].a_access_mask |= rperm; + } else if ((mode & 0040) || (mode & 0004)) + tace[1].a_access_mask |= rperm; + if (mode & 0200) { + tace[3].a_access_mask |= wperm; + if (!(mode & 0020) && (mode & 0002)) + tace[0].a_access_mask |= wperm; + } else if ((mode & 0020) || (mode & 0002)) + tace[1].a_access_mask |= wperm; + if (mode & 0100) { + tace[3].a_access_mask |= eperm; + if (!(mode & 0010) && (mode & 0001)) + tace[0].a_access_mask |= eperm; + } else if ((mode & 0010) || (mode & 0001)) + tace[1].a_access_mask |= eperm; + + /* Check if the acl count matches */ + p = 3; + for (i = 0; i < 3; i++) { + if (tace[i].a_access_mask != 0) + p++; + } + if (acl->acl_cnt != p) + return (0); + + p = 0; + for (i = 0; i < 6; i++) { + if (tace[i].a_access_mask != 0) { + ace = &((ace_t *)acl->acl_aclp)[p]; + /* + * Illumos added ACE_DELETE_CHILD to write perms for + * directories. We have to check against that, too. + */ + if (ace->a_flags != tace[i].a_flags || + ace->a_type != tace[i].a_type || + (ace->a_access_mask != tace[i].a_access_mask && + ((acl->acl_flags & ACL_IS_DIR) == 0 || + (tace[i].a_access_mask & wperm) == 0 || + ace->a_access_mask != + (tace[i].a_access_mask | ACE_DELETE_CHILD)))) + return (0); + p++; + } + } + + *trivialp = 1; + return (0); +} +#endif /* HAVE_SUN_ACL */ + +#if HAVE_SUN_ACL +/* + * Translate Solaris POSIX.1e and NFSv4 ACLs into libarchive internal ACL + */ +static int +translate_acl(struct archive_read_disk *a, + struct archive_entry *entry, acl_t *acl, int default_entry_acl_type) +{ + int e, i; + int ae_id, ae_tag, ae_perm; + int entry_acl_type; + const char *ae_name; + aclent_t *aclent; + ace_t *ace; + + (void)default_entry_acl_type; + + if (acl->acl_cnt <= 0) + return (ARCHIVE_OK); + + for (e = 0; e < acl->acl_cnt; e++) { + ae_name = NULL; + ae_tag = 0; + ae_perm = 0; + + if (acl->acl_type == ACE_T) { + ace = &((ace_t *)acl->acl_aclp)[e]; + ae_id = ace->a_who; + + switch(ace->a_type) { + case ACE_ACCESS_ALLOWED_ACE_TYPE: + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALLOW; + break; + case ACE_ACCESS_DENIED_ACE_TYPE: + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_DENY; + break; + case ACE_SYSTEM_AUDIT_ACE_TYPE: + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ACCESS; + break; + case ACE_SYSTEM_ALARM_ACE_TYPE: + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALARM; + break; + default: + /* Unknown entry type, skip */ + continue; + } + + if ((ace->a_flags & ACE_OWNER) != 0) + ae_tag = ARCHIVE_ENTRY_ACL_USER_OBJ; + else if ((ace->a_flags & ACE_GROUP) != 0) + ae_tag = ARCHIVE_ENTRY_ACL_GROUP_OBJ; + else if ((ace->a_flags & ACE_EVERYONE) != 0) + ae_tag = ARCHIVE_ENTRY_ACL_EVERYONE; + else if ((ace->a_flags & ACE_IDENTIFIER_GROUP) != 0) { + ae_tag = ARCHIVE_ENTRY_ACL_GROUP; + ae_name = archive_read_disk_gname(&a->archive, + ae_id); + } else { + ae_tag = ARCHIVE_ENTRY_ACL_USER; + ae_name = archive_read_disk_uname(&a->archive, + ae_id); + } + + for (i = 0; i < (int)(sizeof(acl_inherit_map) / + sizeof(acl_inherit_map[0])); ++i) { + if ((ace->a_flags & + acl_inherit_map[i].platform_inherit) != 0) + ae_perm |= + acl_inherit_map[i].archive_inherit; + } + + for (i = 0; i < (int)(sizeof(acl_perm_map) / + sizeof(acl_perm_map[0])); ++i) { + if ((ace->a_access_mask & + acl_perm_map[i].platform_perm) != 0) + ae_perm |= + acl_perm_map[i].archive_perm; + } + } else { + aclent = &((aclent_t *)acl->acl_aclp)[e]; + if ((aclent->a_type & ACL_DEFAULT) != 0) + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_DEFAULT; + else + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ACCESS; + ae_id = aclent->a_id; + + switch(aclent->a_type) { + case DEF_USER: + case USER: + ae_name = archive_read_disk_uname(&a->archive, + ae_id); + ae_tag = ARCHIVE_ENTRY_ACL_USER; + break; + case DEF_GROUP: + case GROUP: + ae_name = archive_read_disk_gname(&a->archive, + ae_id); + ae_tag = ARCHIVE_ENTRY_ACL_GROUP; + break; + case DEF_CLASS_OBJ: + case CLASS_OBJ: + ae_tag = ARCHIVE_ENTRY_ACL_MASK; + break; + case DEF_USER_OBJ: + case USER_OBJ: + ae_tag = ARCHIVE_ENTRY_ACL_USER_OBJ; + break; + case DEF_GROUP_OBJ: + case GROUP_OBJ: + ae_tag = ARCHIVE_ENTRY_ACL_GROUP_OBJ; + break; + case DEF_OTHER_OBJ: + case OTHER_OBJ: + ae_tag = ARCHIVE_ENTRY_ACL_OTHER; + break; + default: + /* Unknown tag type, skip */ + continue; + } + + if ((aclent->a_perm & 1) != 0) + ae_perm |= ARCHIVE_ENTRY_ACL_EXECUTE; + if ((aclent->a_perm & 2) != 0) + ae_perm |= ARCHIVE_ENTRY_ACL_WRITE; + if ((aclent->a_perm & 4) != 0) + ae_perm |= ARCHIVE_ENTRY_ACL_READ; + } /* default_entry_acl_type != ARCHIVE_ENTRY_ACL_TYPE_NFS4 */ + + archive_entry_acl_add_entry(entry, entry_acl_type, + ae_perm, ae_tag, ae_id, ae_name); + } + return (ARCHIVE_OK); +} +#else /* !HAVE_SUN_ACL */ +/* + * Translate POSIX.1e (Linux), FreeBSD (both POSIX.1e and NFSv4) and + * MacOS (NFSv4 only) ACLs into libarchive internal structure + */ static int translate_acl(struct archive_read_disk *a, struct archive_entry *entry, acl_t acl, int default_entry_acl_type) { acl_tag_t acl_tag; -#ifdef ACL_TYPE_NFS4 +#if HAVE_ACL_TYPE_NFS4 acl_entry_type_t acl_type; - acl_flagset_t acl_flagset; int brand; #endif +#if HAVE_ACL_TYPE_NFS4 || HAVE_DARWIN_ACL + acl_flagset_t acl_flagset; +#endif acl_entry_t acl_entry; acl_permset_t acl_permset; int i, entry_acl_type; int r, s, ae_id, ae_tag, ae_perm; +#if !HAVE_DARWIN_ACL + void *q; +#endif const char *ae_name; -#ifdef ACL_TYPE_NFS4 +#if HAVE_ACL_TYPE_NFS4 // FreeBSD "brands" ACLs as POSIX.1e or NFSv4 // Make sure the "brand" on this ACL is consistent // with the default_entry_acl_type bits provided. @@ -643,14 +1199,19 @@ translate_acl(struct archive_read_disk * } #endif - s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); if (s == -1) { archive_set_error(&a->archive, errno, "Failed to get first ACL entry"); return (ARCHIVE_WARN); } - while (s == 1) { + +#if HAVE_DARWIN_ACL + while (s == 0) +#else /* FreeBSD, Linux */ + while (s == 1) +#endif + { ae_id = -1; ae_name = NULL; ae_perm = 0; @@ -661,14 +1222,25 @@ translate_acl(struct archive_read_disk * return (ARCHIVE_WARN); } switch (acl_tag) { +#if !HAVE_DARWIN_ACL /* FreeBSD, Linux */ case ACL_USER: - ae_id = (int)*(uid_t *)acl_get_qualifier(acl_entry); - ae_name = archive_read_disk_uname(&a->archive, ae_id); + q = acl_get_qualifier(acl_entry); + if (q != NULL) { + ae_id = (int)*(uid_t *)q; + acl_free(q); + ae_name = archive_read_disk_uname(&a->archive, + ae_id); + } ae_tag = ARCHIVE_ENTRY_ACL_USER; break; case ACL_GROUP: - ae_id = (int)*(gid_t *)acl_get_qualifier(acl_entry); - ae_name = archive_read_disk_gname(&a->archive, ae_id); + q = acl_get_qualifier(acl_entry); + if (q != NULL) { + ae_id = (int)*(gid_t *)q; + acl_free(q); + ae_name = archive_read_disk_gname(&a->archive, + ae_id); + } ae_tag = ARCHIVE_ENTRY_ACL_GROUP; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 2 01:11:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5A81CCB9C3; Thu, 2 Feb 2017 01:11:50 +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 9654312DF; Thu, 2 Feb 2017 01:11:50 +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 v121Bnak092076; Thu, 2 Feb 2017 01:11:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121Bnw5092072; Thu, 2 Feb 2017 01:11:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020111.v121Bnw5092072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313075 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:11:50 -0000 Author: kib Date: Thu Feb 2 01:11:49 2017 New Revision: 313075 URL: https://svnweb.freebsd.org/changeset/base/313075 Log: MFC r312428: Refcount tmpfs nodes and mount structures. Modified: stable/11/sys/fs/tmpfs/tmpfs.h stable/11/sys/fs/tmpfs/tmpfs_subr.c stable/11/sys/fs/tmpfs/tmpfs_vfsops.c stable/11/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs.h Thu Feb 2 00:50:46 2017 (r313074) +++ stable/11/sys/fs/tmpfs/tmpfs.h Thu Feb 2 01:11:49 2017 (r313075) @@ -158,9 +158,11 @@ struct tmpfs_node { * Doubly-linked list entry which links all existing nodes for * a single file system. This is provided to ease the removal * of all nodes during the unmount operation, and to support - * the implementation of VOP_VNTOCNP(). + * the implementation of VOP_VNTOCNP(). tn_attached is false + * when the node is removed from list and unlocked. */ LIST_ENTRY(tmpfs_node) tn_entries; /* (m) */ + bool tn_attached; /* (m) */ /* * The node's type. Any of 'VBLK', 'VCHR', 'VDIR', 'VFIFO', @@ -231,6 +233,9 @@ struct tmpfs_node { */ int tn_vpstate; /* (i) */ + /* Transient refcounter on this node. */ + u_int tn_refcount; /* (m) + (i) */ + /* misc data field for different tn_type node */ union { /* Valid when tn_type == VBLK || tn_type == VCHR. */ @@ -358,6 +363,9 @@ struct tmpfs_mount { /* Number of nodes currently that are in use. */ ino_t tm_nodes_inuse; + /* Refcounter on this struct tmpfs_mount. */ + uint64_t tm_refcount; + /* maximum representable file size */ u_int64_t tm_maxfilesize; @@ -402,10 +410,14 @@ struct tmpfs_dir_cursor { * Prototypes for tmpfs_subr.c. */ +void tmpfs_ref_node(struct tmpfs_node *node); +void tmpfs_ref_node_locked(struct tmpfs_node *node); int tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *, enum vtype, uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *, char *, dev_t, struct tmpfs_node **); void tmpfs_free_node(struct tmpfs_mount *, struct tmpfs_node *); +bool tmpfs_free_node_locked(struct tmpfs_mount *, struct tmpfs_node *, bool); +void tmpfs_free_tmp(struct tmpfs_mount *); int tmpfs_alloc_dirent(struct tmpfs_mount *, struct tmpfs_node *, const char *, u_int, struct tmpfs_dirent **); void tmpfs_free_dirent(struct tmpfs_mount *, struct tmpfs_dirent *); Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 00:50:46 2017 (r313074) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:11:49 2017 (r313075) @@ -132,6 +132,26 @@ tmpfs_pages_check_avail(struct tmpfs_mou return (1); } +void +tmpfs_ref_node(struct tmpfs_node *node) +{ + + TMPFS_NODE_LOCK(node); + tmpfs_ref_node_locked(node); + TMPFS_NODE_UNLOCK(node); +} + +void +tmpfs_ref_node_locked(struct tmpfs_node *node) +{ + + TMPFS_NODE_ASSERT_LOCKED(node); + KASSERT(node->tn_refcount > 0, ("node %p zero refcount", node)); + KASSERT(node->tn_refcount < UINT_MAX, ("node %p refcount %u", node, + node->tn_refcount)); + node->tn_refcount++; +} + /* * Allocates a new node of type 'type' inside the 'tmp' mount point, with * its owner set to 'uid', its group to 'gid' and its mode set to 'mode', @@ -206,6 +226,7 @@ tmpfs_alloc_node(struct mount *mp, struc nnode->tn_gid = gid; nnode->tn_mode = mode; nnode->tn_id = alloc_unr(tmp->tm_ino_unr); + nnode->tn_refcount = 1; /* Type-specific initialization. */ switch (nnode->tn_type) { @@ -259,7 +280,9 @@ tmpfs_alloc_node(struct mount *mp, struc TMPFS_LOCK(tmp); LIST_INSERT_HEAD(&tmp->tm_nodes_used, nnode, tn_entries); + nnode->tn_attached = true; tmp->tm_nodes_inuse++; + tmp->tm_refcount++; TMPFS_UNLOCK(tmp); *node = nnode; @@ -273,18 +296,40 @@ tmpfs_alloc_node(struct mount *mp, struc void tmpfs_free_node(struct tmpfs_mount *tmp, struct tmpfs_node *node) { + + TMPFS_LOCK(tmp); + TMPFS_NODE_LOCK(node); + if (!tmpfs_free_node_locked(tmp, node, false)) { + TMPFS_NODE_UNLOCK(node); + TMPFS_UNLOCK(tmp); + } +} + +bool +tmpfs_free_node_locked(struct tmpfs_mount *tmp, struct tmpfs_node *node, + bool detach) +{ vm_object_t uobj; + TMPFS_MP_ASSERT_LOCKED(tmp); + TMPFS_NODE_ASSERT_LOCKED(node); + KASSERT(node->tn_refcount > 0, ("node %p refcount zero", node)); + + node->tn_refcount--; + if (node->tn_attached && (detach || node->tn_refcount == 0)) { + MPASS(tmp->tm_nodes_inuse > 0); + tmp->tm_nodes_inuse--; + LIST_REMOVE(node, tn_entries); + node->tn_attached = false; + } + if (node->tn_refcount > 0) + return (false); + #ifdef INVARIANTS - TMPFS_NODE_LOCK(node); MPASS(node->tn_vnode == NULL); MPASS((node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0); - TMPFS_NODE_UNLOCK(node); #endif - - TMPFS_LOCK(tmp); - LIST_REMOVE(node, tn_entries); - tmp->tm_nodes_inuse--; + TMPFS_NODE_UNLOCK(node); TMPFS_UNLOCK(tmp); switch (node->tn_type) { @@ -324,6 +369,9 @@ tmpfs_free_node(struct tmpfs_mount *tmp, free_unr(tmp->tm_ino_unr, node->tn_id); uma_zfree(tmp->tm_node_pool, node); + TMPFS_LOCK(tmp); + tmpfs_free_tmp(tmp); + return (true); } static __inline uint32_t @@ -469,13 +517,16 @@ tmpfs_alloc_vp(struct mount *mp, struct struct vnode **vpp) { struct vnode *vp; + struct tmpfs_mount *tm; vm_object_t object; int error; error = 0; -loop: + tm = VFS_TO_TMPFS(mp); TMPFS_NODE_LOCK(node); -loop1: + tmpfs_ref_node_locked(node); +loop: + TMPFS_NODE_ASSERT_LOCKED(node); if ((vp = node->tn_vnode) != NULL) { MPASS((node->tn_vpstate & TMPFS_VNODE_DOOMED) == 0); VI_LOCK(vp); @@ -495,12 +546,14 @@ loop1: msleep(&node->tn_vnode, TMPFS_NODE_MTX(node), 0, "tmpfsE", 0); } - goto loop1; + goto loop; } TMPFS_NODE_UNLOCK(node); error = vget(vp, lkflag | LK_INTERLOCK, curthread); - if (error == ENOENT) + if (error == ENOENT) { + TMPFS_NODE_LOCK(node); goto loop; + } if (error != 0) { vp = NULL; goto out; @@ -512,6 +565,7 @@ loop1: */ if (node->tn_vnode == NULL || node->tn_vnode != vp) { vput(vp); + TMPFS_NODE_LOCK(node); goto loop; } @@ -533,11 +587,9 @@ loop1: if (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) { node->tn_vpstate |= TMPFS_VNODE_WANT; error = msleep((caddr_t) &node->tn_vpstate, - TMPFS_NODE_MTX(node), PDROP | PCATCH, - "tmpfs_alloc_vp", 0); - if (error) - return error; - + TMPFS_NODE_MTX(node), 0, "tmpfs_alloc_vp", 0); + if (error != 0) + goto out; goto loop; } else node->tn_vpstate |= TMPFS_VNODE_ALLOCATING; @@ -611,16 +663,17 @@ unlock: TMPFS_NODE_UNLOCK(node); out: - *vpp = vp; + if (error == 0) { + *vpp = vp; #ifdef INVARIANTS - if (error == 0) { MPASS(*vpp != NULL && VOP_ISLOCKED(*vpp)); TMPFS_NODE_LOCK(node); MPASS(*vpp == node->tn_vnode); TMPFS_NODE_UNLOCK(node); - } #endif + } + tmpfs_free_node(tm, node); return (error); } Modified: stable/11/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 00:50:46 2017 (r313074) +++ stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 01:11:49 2017 (r313075) @@ -222,6 +222,7 @@ tmpfs_mount(struct mount *mp) mtx_init(&tmp->tm_allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF); tmp->tm_nodes_max = nodes_max; tmp->tm_nodes_inuse = 0; + tmp->tm_refcount = 1; tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : OFF_MAX; LIST_INIT(&tmp->tm_nodes_used); @@ -304,11 +305,35 @@ tmpfs_unmount(struct mount *mp, int mntf TMPFS_LOCK(tmp); while ((node = LIST_FIRST(&tmp->tm_nodes_used)) != NULL) { - TMPFS_UNLOCK(tmp); + TMPFS_NODE_LOCK(node); if (node->tn_type == VDIR) tmpfs_dir_destroy(tmp, node); - tmpfs_free_node(tmp, node); - TMPFS_LOCK(tmp); + if (tmpfs_free_node_locked(tmp, node, true)) + TMPFS_LOCK(tmp); + else + TMPFS_NODE_UNLOCK(node); + } + + mp->mnt_data = NULL; + tmpfs_free_tmp(tmp); + vfs_write_resume(mp, VR_START_WRITE); + + MNT_ILOCK(mp); + mp->mnt_flag &= ~MNT_LOCAL; + MNT_IUNLOCK(mp); + + return (0); +} + +void +tmpfs_free_tmp(struct tmpfs_mount *tmp) +{ + + MPASS(tmp->tm_refcount > 0); + tmp->tm_refcount--; + if (tmp->tm_refcount > 0) { + TMPFS_UNLOCK(tmp); + return; } TMPFS_UNLOCK(tmp); @@ -320,16 +345,7 @@ tmpfs_unmount(struct mount *mp, int mntf MPASS(tmp->tm_pages_used == 0); MPASS(tmp->tm_nodes_inuse == 0); - /* Throw away the tmpfs_mount structure. */ - free(mp->mnt_data, M_TMPFSMNT); - mp->mnt_data = NULL; - vfs_write_resume(mp, VR_START_WRITE); - - MNT_ILOCK(mp); - mp->mnt_flag &= ~MNT_LOCAL; - MNT_IUNLOCK(mp); - - return (0); + free(tmp, M_TMPFSMNT); } static int @@ -347,36 +363,36 @@ static int tmpfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { - boolean_t found; struct tmpfs_fid *tfhp; struct tmpfs_mount *tmp; struct tmpfs_node *node; + int error; tmp = VFS_TO_TMPFS(mp); tfhp = (struct tmpfs_fid *)fhp; if (tfhp->tf_len != sizeof(struct tmpfs_fid)) - return EINVAL; + return (EINVAL); if (tfhp->tf_id >= tmp->tm_nodes_max) - return EINVAL; - - found = FALSE; + return (EINVAL); TMPFS_LOCK(tmp); LIST_FOREACH(node, &tmp->tm_nodes_used, tn_entries) { if (node->tn_id == tfhp->tf_id && node->tn_gen == tfhp->tf_gen) { - found = TRUE; + tmpfs_ref_node(node); break; } } TMPFS_UNLOCK(tmp); - if (found) - return (tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp)); - - return (EINVAL); + if (node != NULL) { + error = tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp); + tmpfs_free_node(tmp, node); + } else + error = EINVAL; + return (error); } /* ARGSUSED2 */ Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 00:50:46 2017 (r313074) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:11:49 2017 (r313075) @@ -82,7 +82,8 @@ tmpfs_lookup(struct vop_cachedlookup_arg struct vnode **vpp = v->a_vpp; struct componentname *cnp = v->a_cnp; struct tmpfs_dirent *de; - struct tmpfs_node *dnode; + struct tmpfs_node *dnode, *pnode; + struct tmpfs_mount *tm; int error; dnode = VP_TO_TMPFS_DIR(dvp); @@ -104,8 +105,12 @@ tmpfs_lookup(struct vop_cachedlookup_arg goto out; } if (cnp->cn_flags & ISDOTDOT) { + tm = VFS_TO_TMPFS(dvp->v_mount); + pnode = dnode->tn_dir.tn_parent; + tmpfs_ref_node(pnode); error = vn_vget_ino_gen(dvp, tmpfs_vn_get_ino_alloc, - dnode->tn_dir.tn_parent, cnp->cn_lkflags, vpp); + pnode, cnp->cn_lkflags, vpp); + tmpfs_free_node(tm, pnode); if (error != 0) goto out; } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { From owner-svn-src-all@freebsd.org Thu Feb 2 01:14:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E720CCBB94; Thu, 2 Feb 2017 01:14:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DBC31721; Thu, 2 Feb 2017 01:14:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v121Eilt092237; Thu, 2 Feb 2017 01:14:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121EiSM092236; Thu, 2 Feb 2017 01:14:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020114.v121EiSM092236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313076 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:14:45 -0000 Author: kib Date: Thu Feb 2 01:14:44 2017 New Revision: 313076 URL: https://svnweb.freebsd.org/changeset/base/313076 Log: MFC r312429: VNON nodes cannot exist. Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:11:49 2017 (r313075) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:14:44 2017 (r313076) @@ -333,11 +333,6 @@ tmpfs_free_node_locked(struct tmpfs_moun TMPFS_UNLOCK(tmp); switch (node->tn_type) { - case VNON: - /* Do not do anything. VNON is provided to let the - * allocation routine clean itself easily by avoiding - * duplicating code in it. */ - /* FALLTHROUGH */ case VBLK: /* FALLTHROUGH */ case VCHR: From owner-svn-src-all@freebsd.org Thu Feb 2 01:17:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91BB9CCBE93; Thu, 2 Feb 2017 01:17:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C53E199A; Thu, 2 Feb 2017 01:17:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v121H4tY092386; Thu, 2 Feb 2017 01:17:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121H4Qv092385; Thu, 2 Feb 2017 01:17:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020117.v121H4Qv092385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01:17:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313077 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:17:05 -0000 Author: kib Date: Thu Feb 2 01:17:04 2017 New Revision: 313077 URL: https://svnweb.freebsd.org/changeset/base/313077 Log: MFC r312430: Implement VOP_VPTOCNP() for tmpfs. Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:14:44 2017 (r313076) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:17:04 2017 (r313077) @@ -1406,6 +1406,132 @@ tmpfs_whiteout(struct vop_whiteout_args } } +static int +tmpfs_vptocnp_dir(struct tmpfs_node *tn, struct tmpfs_node *tnp, + struct tmpfs_dirent **pde) +{ + struct tmpfs_dir_cursor dc; + struct tmpfs_dirent *de; + + for (de = tmpfs_dir_first(tnp, &dc); de != NULL; + de = tmpfs_dir_next(tnp, &dc)) { + if (de->td_node == tn) { + *pde = de; + return (0); + } + } + return (ENOENT); +} + +static int +tmpfs_vptocnp_fill(struct vnode *vp, struct tmpfs_node *tn, + struct tmpfs_node *tnp, char *buf, int *buflen, struct vnode **dvp) +{ + struct tmpfs_dirent *de; + int error, i; + + error = vn_vget_ino_gen(vp, tmpfs_vn_get_ino_alloc, tnp, LK_SHARED, + dvp); + if (error != 0) + return (error); + error = tmpfs_vptocnp_dir(tn, tnp, &de); + if (error == 0) { + i = *buflen; + i -= de->td_namelen; + if (i < 0) { + error = ENOMEM; + } else { + bcopy(de->ud.td_name, buf + i, de->td_namelen); + *buflen = i; + } + } + if (error == 0) { + if (vp != *dvp) + VOP_UNLOCK(*dvp, 0); + } else { + if (vp != *dvp) + vput(*dvp); + else + vrele(vp); + } + return (error); +} + +static int +tmpfs_vptocnp(struct vop_vptocnp_args *ap) +{ + struct vnode *vp, **dvp; + struct tmpfs_node *tn, *tnp, *tnp1; + struct tmpfs_dirent *de; + struct tmpfs_mount *tm; + char *buf; + int *buflen; + int error; + + vp = ap->a_vp; + dvp = ap->a_vpp; + buf = ap->a_buf; + buflen = ap->a_buflen; + + tm = VFS_TO_TMPFS(vp->v_mount); + tn = VP_TO_TMPFS_NODE(vp); + if (tn->tn_type == VDIR) { + tnp = tn->tn_dir.tn_parent; + if (tnp == NULL) + return (ENOENT); + tmpfs_ref_node(tnp); + error = tmpfs_vptocnp_fill(vp, tn, tn->tn_dir.tn_parent, buf, + buflen, dvp); + tmpfs_free_node(tm, tnp); + return (error); + } +restart: + TMPFS_LOCK(tm); + LIST_FOREACH_SAFE(tnp, &tm->tm_nodes_used, tn_entries, tnp1) { + if (tnp->tn_type != VDIR) + continue; + TMPFS_NODE_LOCK(tnp); + tmpfs_ref_node_locked(tnp); + + /* + * tn_vnode cannot be instantiated while we hold the + * node lock, so the directory cannot be changed while + * we iterate over it. Do this to avoid instantiating + * vnode for directories which cannot point to our + * node. + */ + error = tnp->tn_vnode == NULL ? tmpfs_vptocnp_dir(tn, tnp, + &de) : 0; + + if (error == 0) { + TMPFS_NODE_UNLOCK(tnp); + TMPFS_UNLOCK(tm); + error = tmpfs_vptocnp_fill(vp, tn, tnp, buf, buflen, + dvp); + if (error == 0) { + tmpfs_free_node(tm, tnp); + return (0); + } + if ((vp->v_iflag & VI_DOOMED) != 0) { + tmpfs_free_node(tm, tnp); + return (ENOENT); + } + TMPFS_LOCK(tm); + TMPFS_NODE_LOCK(tnp); + } + if (tmpfs_free_node_locked(tm, tnp, false)) { + goto restart; + } else { + KASSERT(tnp->tn_refcount > 0, + ("node %p refcount zero", tnp)); + tnp1 = LIST_NEXT(tnp, tn_entries); + TMPFS_NODE_UNLOCK(tnp); + } + } + TMPFS_UNLOCK(tm); + return (ENOENT); +} + /* * Vnode operations vector used for files stored in a tmpfs file system. */ @@ -1438,5 +1564,6 @@ struct vop_vector tmpfs_vnodeop_entries .vop_vptofh = tmpfs_vptofh, .vop_whiteout = tmpfs_whiteout, .vop_bmap = VOP_EOPNOTSUPP, + .vop_vptocnp = tmpfs_vptocnp, }; From owner-svn-src-all@freebsd.org Thu Feb 2 01:18:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87F6DCCC0D9; Thu, 2 Feb 2017 01:18: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 628C41BD9; Thu, 2 Feb 2017 01:18: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 v121ItR8092512; Thu, 2 Feb 2017 01:18:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121Itei092507; Thu, 2 Feb 2017 01:18:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020118.v121Itei092507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313078 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:18:56 -0000 Author: kib Date: Thu Feb 2 01:18:54 2017 New Revision: 313078 URL: https://svnweb.freebsd.org/changeset/base/313078 Log: MFC r312432: Add a mount option for tmpfs(5) to not use namecache. Modified: stable/11/sys/fs/tmpfs/tmpfs.h stable/11/sys/fs/tmpfs/tmpfs_subr.c stable/11/sys/fs/tmpfs/tmpfs_vfsops.c stable/11/sys/fs/tmpfs/tmpfs_vnops.c stable/11/sys/fs/tmpfs/tmpfs_vnops.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs.h Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs.h Thu Feb 2 01:18:54 2017 (r313078) @@ -383,7 +383,9 @@ struct tmpfs_mount { uma_zone_t tm_node_pool; /* Read-only status. */ - int tm_ronly; + bool tm_ronly; + /* Do not use namecache. */ + bool tm_nonc; }; #define TMPFS_LOCK(tm) mtx_lock(&(tm)->tm_allnode_lock) #define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->tm_allnode_lock) @@ -528,4 +530,11 @@ VP_TO_TMPFS_DIR(struct vnode *vp) return (node); } +static inline bool +tmpfs_use_nc(struct vnode *vp) +{ + + return (!(VFS_TO_TMPFS(vp->v_mount)->tm_nonc)); +} + #endif /* _FS_TMPFS_TMPFS_H_ */ Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 01:18:54 2017 (r313078) @@ -592,7 +592,8 @@ loop: TMPFS_NODE_UNLOCK(node); /* Get a new vnode and associate it with our node. */ - error = getnewvnode("tmpfs", mp, &tmpfs_vnodeop_entries, &vp); + error = getnewvnode("tmpfs", mp, VFS_TO_TMPFS(mp)->tm_nonc ? + &tmpfs_vnodeop_nonc_entries : &tmpfs_vnodeop_entries, &vp); if (error != 0) goto unlock; MPASS(vp != NULL); Modified: stable/11/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 01:18:54 2017 (r313078) @@ -79,7 +79,7 @@ static void tmpfs_susp_clean(struct moun static const char *tmpfs_opts[] = { "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export", - "union", NULL + "union", "nonc", NULL }; static const char *tmpfs_updateopts[] = { @@ -138,6 +138,7 @@ tmpfs_mount(struct mount *mp) struct tmpfs_node *root; struct thread *td = curthread; int error; + bool nonc; /* Size counters. */ u_quad_t pages; off_t nodes_max, size_max, maxfilesize; @@ -186,6 +187,7 @@ tmpfs_mount(struct mount *mp) size_max = 0; if (vfs_getopt_size(mp->mnt_optnew, "maxfilesize", &maxfilesize) != 0) maxfilesize = 0; + nonc = vfs_getopt(mp->mnt_optnew, "nonc", NULL, NULL) == 0; /* Do not allow mounts if we do not have enough memory to preserve * the minimum reserved pages. */ @@ -236,6 +238,7 @@ tmpfs_mount(struct mount *mp) sizeof(struct tmpfs_node), tmpfs_node_ctor, tmpfs_node_dtor, tmpfs_node_init, tmpfs_node_fini, UMA_ALIGN_PTR, 0); tmp->tm_ronly = (mp->mnt_flag & MNT_RDONLY) != 0; + tmp->tm_nonc = nonc; /* Allocate the root node. */ error = tmpfs_alloc_node(mp, tmp, VDIR, root_uid, root_gid, Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 01:18:54 2017 (r313078) @@ -76,11 +76,8 @@ tmpfs_vn_get_ino_alloc(struct mount *mp, } static int -tmpfs_lookup(struct vop_cachedlookup_args *v) +tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) { - struct vnode *dvp = v->a_dvp; - struct vnode **vpp = v->a_vpp; - struct componentname *cnp = v->a_cnp; struct tmpfs_dirent *de; struct tmpfs_node *dnode, *pnode; struct tmpfs_mount *tm; @@ -213,7 +210,7 @@ tmpfs_lookup(struct vop_cachedlookup_arg * request was for creation, as it does not improve timings on * emprical tests. */ - if ((cnp->cn_flags & MAKEENTRY) != 0) + if ((cnp->cn_flags & MAKEENTRY) != 0 && tmpfs_use_nc(dvp)) cache_enter(dvp, *vpp, cnp); out: @@ -227,6 +224,20 @@ out: } static int +tmpfs_cached_lookup(struct vop_cachedlookup_args *v) +{ + + return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp)); +} + +static int +tmpfs_lookup(struct vop_lookup_args *v) +{ + + return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp)); +} + +static int tmpfs_create(struct vop_create_args *v) { struct vnode *dvp = v->a_dvp; @@ -238,7 +249,7 @@ tmpfs_create(struct vop_create_args *v) MPASS(vap->va_type == VREG || vap->va_type == VSOCK); error = tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); - if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0) + if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0 && tmpfs_use_nc(dvp)) cache_enter(dvp, *vpp, cnp); return (error); } @@ -1013,10 +1024,12 @@ tmpfs_rename(struct vop_rename_args *v) tmpfs_dir_attach(tdvp, de); - cache_purge(fvp); - if (tvp != NULL) - cache_purge(tvp); - cache_purge_negative(tdvp); + if (tmpfs_use_nc(fvp)) { + cache_purge(fvp); + if (tvp != NULL) + cache_purge(tvp); + cache_purge_negative(tdvp); + } error = 0; @@ -1129,8 +1142,10 @@ tmpfs_rmdir(struct vop_rmdir_args *v) TMPFS_NODE_MODIFIED; TMPFS_NODE_UNLOCK(dnode); - cache_purge(dvp); - cache_purge(vp); + if (tmpfs_use_nc(dvp)) { + cache_purge(dvp); + cache_purge(vp); + } /* Free the directory entry we just deleted. Note that the node * referred by it will not be removed until the vnode is really @@ -1274,7 +1289,8 @@ tmpfs_reclaim(struct vop_reclaim_args *v else vnode_destroy_vobject(vp); vp->v_object = NULL; - cache_purge(vp); + if (tmpfs_use_nc(vp)) + cache_purge(vp); TMPFS_NODE_LOCK(node); tmpfs_free_vp(vp); @@ -1538,7 +1554,7 @@ restart: struct vop_vector tmpfs_vnodeop_entries = { .vop_default = &default_vnodeops, .vop_lookup = vfs_cache_lookup, - .vop_cachedlookup = tmpfs_lookup, + .vop_cachedlookup = tmpfs_cached_lookup, .vop_create = tmpfs_create, .vop_mknod = tmpfs_mknod, .vop_open = tmpfs_open, @@ -1567,3 +1583,10 @@ struct vop_vector tmpfs_vnodeop_entries .vop_vptocnp = tmpfs_vptocnp, }; +/* + * Same vector for mounts which do not use namecache. + */ +struct vop_vector tmpfs_vnodeop_nonc_entries = { + .vop_default = &tmpfs_vnodeop_entries, + .vop_lookup = tmpfs_lookup, +}; Modified: stable/11/sys/fs/tmpfs/tmpfs_vnops.h ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_vnops.h Thu Feb 2 01:17:04 2017 (r313077) +++ stable/11/sys/fs/tmpfs/tmpfs_vnops.h Thu Feb 2 01:18:54 2017 (r313078) @@ -44,6 +44,7 @@ */ extern struct vop_vector tmpfs_vnodeop_entries; +extern struct vop_vector tmpfs_vnodeop_nonc_entries; vop_access_t tmpfs_access; vop_getattr_t tmpfs_getattr; From owner-svn-src-all@freebsd.org Thu Feb 2 01:21:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BE43CCC382; Thu, 2 Feb 2017 01:21:57 +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 EC9B01FF4; Thu, 2 Feb 2017 01:21: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 v121Luf4096368; Thu, 2 Feb 2017 01:21:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121LuZM096367; Thu, 2 Feb 2017 01:21:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702020121.v121LuZM096367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 01:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313079 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:21:57 -0000 Author: kib Date: Thu Feb 2 01:21:55 2017 New Revision: 313079 URL: https://svnweb.freebsd.org/changeset/base/313079 Log: MFC r312649: Document mount option "nonc" for tmpfs. Modified: stable/11/share/man/man5/tmpfs.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man5/tmpfs.5 ============================================================================== --- stable/11/share/man/man5/tmpfs.5 Thu Feb 2 01:18:54 2017 (r313078) +++ stable/11/share/man/man5/tmpfs.5 Thu Feb 2 01:21:55 2017 (r313079) @@ -54,7 +54,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2017 +.Dd January 20, 2017 .Dt TMPFS 5 .Os .Sh NAME @@ -120,6 +120,10 @@ Defaults to the mount point's UID. .It Cm mode Specifies the mode (in octal notation) of the root inode of the file system. Defaults to the mount point's mode. +.It Cm nonc +Do not use namecache to resolve names to files for the created mount. +This saves memory, but currently might impair scalability for highly +used mounts on large machines. .It Cm inodes Specifies the maximum number of nodes available to the file system. If not specified, the file system chooses a reasonable maximum based on From owner-svn-src-all@freebsd.org Thu Feb 2 01:33:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29C33CCCD8F; Thu, 2 Feb 2017 01:33:10 +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 EBB17D32; Thu, 2 Feb 2017 01:33:09 +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 v121X9eJ000792; Thu, 2 Feb 2017 01:33:09 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v121X95M000791; Thu, 2 Feb 2017 01:33:09 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201702020133.v121X95M000791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 2 Feb 2017 01:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313080 - head/sys/i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:33:10 -0000 Author: mjg Date: Thu Feb 2 01:33:08 2017 New Revision: 313080 URL: https://svnweb.freebsd.org/changeset/base/313080 Log: i386: fixup fcmpset An incorrect output specifier was used which worked with clang by accident, but breaks with the in-tree gcc version. While here plug a whitespace nit. Reported by: bde Modified: head/sys/i386/include/atomic.h Modified: head/sys/i386/include/atomic.h ============================================================================== --- head/sys/i386/include/atomic.h Thu Feb 2 01:21:55 2017 (r313079) +++ head/sys/i386/include/atomic.h Thu Feb 2 01:33:08 2017 (r313080) @@ -225,9 +225,9 @@ atomic_fcmpset_int(volatile u_int *dst, " cmpxchgl %3,%1 ; " " sete %0 ; " "# atomic_cmpset_int" - : "=r" (res), /* 0 */ + : "=q" (res), /* 0 */ "+m" (*dst), /* 1 */ - "+a" (*expect) /* 2 */ + "+a" (*expect) /* 2 */ : "r" (src) /* 3 */ : "memory", "cc"); return (res); From owner-svn-src-all@freebsd.org Thu Feb 2 01:42:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B3BCCCB3DC; Thu, 2 Feb 2017 01:42:10 +0000 (UTC) (envelope-from mjguzik@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 0F63912D9; Thu, 2 Feb 2017 01:42:10 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id u63so742613wmu.2; Wed, 01 Feb 2017 17:42:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GSHFNumzS5QN/8ZgHZ7rCbyGYOgZ6o+180vaVjkPfkM=; b=kqcFT2x80zSKnDPZZwnckz2cxXHF1pzkI35cUAv/BtrNtMxakASprVnghcPJemMyzp NAR419MzKMgvfXEfjm15l/9xV00nKDI+GL+VOOBJgCzSVVhyxk6anUBNHlMK0sCpwiyW 79s0ztw3H+kVeqj4rlMyYu9CfCW1LNyWHjK30qM1Cak9HsbmMXIait6erwzP3+lmK9Bk cEDhnwUuURlA4Qzh2tKvjT6FnKMbcHA67xzHu8LgBeB00bNY1lbiCHpsJifACb58lVI5 Fv3BpspYylXhswdhwVjebFd9KydzMphNAIbBecrYy1Wbu/vEXOKmbzW85rx09DyijyGB Nyxw== 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=GSHFNumzS5QN/8ZgHZ7rCbyGYOgZ6o+180vaVjkPfkM=; b=Ze6rLca/n/iVajEjqFxZ5jCuCzkHzOvaeOELd7c+GmkB5c7eVKKrSQ5uyLmCCrAvun zU6AQpL1wwXWbqEO3+j+oXJsNpNYdVbgbmkwr1GmLsxEhuCVYk07aq3BpGD4KrgBaccg IrfBCzpHfBcvAeASANw7mM4Rl8A5kbBMbo5vEXL7igDzrmV52TGKwvnqqqF+7qw5/A6E y2TSIYOcttjgkdqb0qRxiEvpGTanhCHw2y5fPrxFX8BjIsGW4ACjcsKGuqmcH5Y36UsL 5UC86zpgUV8+Zl8VeH/b2OtkMbCPyOd3wCC85wHWB22gyzCp0wbYOotslFFC9eCTqqwJ FvAA== X-Gm-Message-State: AIkVDXJPzQZDcVeqgmEQz+lHWqcqFx9nz/nUJpycNo1YKofV8Edg22sTbugp9MM3zL1jeA== X-Received: by 10.28.209.202 with SMTP id i193mr5512474wmg.20.1485999728343; Wed, 01 Feb 2017 17:42:08 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id c133sm262603wmd.13.2017.02.01.17.42.07 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 01 Feb 2017 17:42:07 -0800 (PST) Date: Thu, 2 Feb 2017 02:42:04 +0100 From: Mateusz Guzik To: Bruce Evans Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312975 - head/sys/i386/include Message-ID: <20170202014204.GA992@dft-labs.eu> References: <201701300224.v0U2Osj1010421@repo.freebsd.org> <20170130142123.V953@besplex.bde.org> <20170201214349.H1136@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170201214349.H1136@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 01:42:10 -0000 On Wed, Feb 01, 2017 at 10:12:57PM +1100, Bruce Evans wrote: > On Mon, 30 Jan 2017, Bruce Evans wrote: > > >On Mon, 30 Jan 2017, Mateusz Guzik wrote: > > > >>Log: > >> i386: add atomic_fcmpset > >> > >> Tested by: pho > > > >This is has some bugs and style bugs. > > This is still broken. The invalid asm breaks building at least atomic.o > with gcc-4.2.1. > > Tested fix: > > X Index: i386/include/atomic.h > X =================================================================== > X --- i386/include/atomic.h (revision 313007) > X +++ i386/include/atomic.h (working copy) > X @@ -225,9 +225,9 @@ > X " cmpxchgl %3,%1 ; " > X " sete %0 ; " > X "# atomic_cmpset_int" > X - : "=r" (res), /* 0 */ > X + : "=q" (res), /* 0 */ > X "+m" (*dst), /* 1 */ > X - "+a" (*expect) /* 2 */ > X + "+a" (*expect) /* 2 */ > X : "r" (src) /* 3 */ > X : "memory", "cc"); > X return (res); > Uh, I ended up with the same fix. Committed in r313080. Sorry for breakage in the first place. > The semantics of fcmpset seem to be undocumented. On x86, *expect is > updated non-atomically by a store in the output parameter. I think > cmpxchg updates the "a" register atomically, but then the output > parameter causes this to be stored non-atomically to *expect. A better > API would somehow return the "a" register and let the caller store it > if it wants. Ordinary cmpset can be built on this by not storing, and > the caller can do the store atomically to a different place if *expect > is too volatile to be atomic. > The primitive was modeled after atomic_compare_exchange_* from c11 atomics. I don't see what's the benefit of storing the result separately. As it is, the primitive fits nicely into loops like "inc not zero". Like this: r = *counter; for (;;) { if (r == 0) break; if (atomic_fcmpset_int(counter, &r, r + 1)) break; // r we can loop back to re-test r } > Maybe just decouple the input parameter from the output parameter. The > following works right (for an amd64 API): > > Y static __inline int > Y atomic_xfcmpset_long(volatile u_long *dst, u_long *expect_out, u_long expect_in, > Y u_long src) > Y { > Y u_long expect; > Y u_char res; > Y Y expect = expect_in; > Y __asm __volatile( > Y " " MPLOCKED " " > Y " cmpxchgq %3,%1 ; " > Y " sete %0 ; " > Y "# atomic_fcmpset_long" > Y : "=r" (res), /* 0 */ > Y "+m" (*dst), /* 1 */ > Y "+a" (expect) /* 2 */ > Y : "r" (src) /* 3 */ > Y : "memory", "cc"); > Y *expect_out = expect; > > If the caller doesn't want to use *expect_out, it passes a pointer to an > unused local variable. The compiler can then optimize away the store > since it is not hidden in the asm. > _fcmpset is specifically for callers who want the value back. Ones which don't can use the _cmpset variant. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Thu Feb 2 03:30:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78515CCB2DC for ; Thu, 2 Feb 2017 03:30:36 +0000 (UTC) (envelope-from wlosh@bsdimp.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 451A41754 for ; Thu, 2 Feb 2017 03:30:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x244.google.com with SMTP id q20so22975357ioi.3 for ; Wed, 01 Feb 2017 19:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OGKRJ4LRGV7uhR4C2wizwHO8FIVTvINc8WAJ5KLhDgU=; b=VCRW3V2h699E63v1/21bTZoRjQxQvAP4Pqpe1Ig0uh9u+6LBWNkXvab0nzmUKP5wbF wKyzh1mdfHeTge0LuZIwoSxaxLqfdCnnkIo6R6DxfQhi1408zmQDV7ORSnTupV/CqY9a 2A7PJ4bDJeuOPv6jS5zFgjHmS59zo3x3d2EBIZFNQ4EIYkJWoqewBoy5KXMh0dADaSuu 0KnHYDAM4M7Z1IR1erEdWFbCVzu+PsYWQdOWp4a+iJOjeTCiJj0wYLD016viJrLfgJpG hw1COMQsTIOmUFsm/XWBmZhR0+2qjzJE7fjTGhqHyiFYw9dr3GsKu9DxTM29Oh2BHqjf 5VIA== 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=OGKRJ4LRGV7uhR4C2wizwHO8FIVTvINc8WAJ5KLhDgU=; b=tuPRq6FO7GRCWyF6MUuJJj8Gz+BSotY7m3dG0PcbUOCec/1BgjeteqUURy1LJRiI4r PWCEnyaYFD33NUUwCPQY1jcjv0GeqZCoXC4mLIyv7g3Sj3SI/BZWh3J7VadMZ0Njxp5U RXspMQjeIgO10IXhVVq2FXZQSwXq+bb7bz6edkYAc0DPz+ZbcJCaGLjA+WRDglXiA5s4 VkX2heofHzCFL8M1D1JCEPpVip1jFnuHRAG47MxqiV+M3c+bZupL8lpLrZO9Zp6vzfg2 EcfEhkXzDaiIeZ8Z5xwHwaIHPWg710t5QCFHpipEepm2PHYj8JYgEtmyfngDmTe56Nrw le7g== X-Gm-Message-State: AIkVDXJnOygkwuEh4eMqRf4SFEQlamGjDqqhe0bMy8Gt5ZWTsRRKfsgeItqb4jM+uJuS0A2TXMN/yIhl2fhc5Q== X-Received: by 10.107.139.131 with SMTP id n125mr5306910iod.166.1486006235508; Wed, 01 Feb 2017 19:30:35 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Wed, 1 Feb 2017 19:30:34 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <1485986136.3017.89.camel@freebsd.org> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> <20170201170950.GF79121@zxy.spb.ru> <20170201213956.GA3765@lonesome.com> <20170201215007.GA37974@zxy.spb.ru> <1485986136.3017.89.camel@freebsd.org> From: Warner Losh Date: Wed, 1 Feb 2017 20:30:34 -0700 X-Google-Sender-Auth: Ax_4mNnqfOkXo_xyp82dPduF7lk Message-ID: Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... To: Ian Lepore Cc: Slawa Olhovchenkov , Mark Linimon , John Baldwin , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Takahashi Yoshihiro Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 03:30:36 -0000 On Wed, Feb 1, 2017 at 2:55 PM, Ian Lepore wrote: > On Thu, 2017-02-02 at 00:50 +0300, Slawa Olhovchenkov wrote: >> On Wed, Feb 01, 2017 at 03:39:57PM -0600, Mark Linimon wrote: >> >> > >> > On Wed, Feb 01, 2017 at 08:09:50PM +0300, Slawa Olhovchenkov wrote: >> > > >> > > Also, I am think current ports don't build on 4.x. >> > I will personally guarantee, in writing, that current ports do not >> > build >> > on 4.x, nor have they done so for years. I personally removed the >> > legacy >> > cruft when 4.11 finally went EOL. >> > >> > > >> > > I am got complains about using ports on 8.x. >> > I am 99% certain that ports will not work on either 8.x or >> > 9.x. Legacy >> > cruft was removed at the EOL in each of those cases. >> > >> > Anyone who think that we can support ports on 4.x, 5.x, 6.x, 7.x, >> > 8.x, >> > 9.x, 10.x, 11.x, and -current, all at the same time, needs to seek >> > medical >> > attention at once. At the absolute least, that era spans 3 major >> > versions >> > of make(1) and two completely different package implementations. >> I am assume no problem to use new make on old system. >> May be posible use pkg too (not sure about pkg requirements to >> syscalls). >> > > I can't say anything about 4.x, but I have no problems building current > ports on 8.2. I have backported a few crucial changes to make, like > handling :tl and :tu, and that's about it. It may not be officially > supported, but it's not hard to make it work for those who have a need. > > I also still support systems that use true ISA-slot hardware, but that > doesn't include any storage or network controllers. Mostly the ISA > cards are proprietary things, plus one ancient 8-port uart expansion > card that amazingly still works and can still be purchased. Yea, but those systems aren't quite pure ISA systems. They are SBCs with an ISA interface, but with PCI NICs and built in IDE controllers. We're not talking about breaking those. Your systems have 64MB or more of RAM, which is enough to run FreeBSD (should you guys ever forward port). Though, to be honest, I'm not sure if UART would work with that particular card... All the proprietary cards that I recall should still work, though there may be some hassle with the network stuff one of them does. Warner From owner-svn-src-all@freebsd.org Thu Feb 2 03:54:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0113ACCBFEF; Thu, 2 Feb 2017 03:54:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFD3486A; Thu, 2 Feb 2017 03:54:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v123shpb058072; Thu, 2 Feb 2017 03:54:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v123shxF058071; Thu, 2 Feb 2017 03:54:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702020354.v123shxF058071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 2 Feb 2017 03:54:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313081 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 03:54:45 -0000 Author: ngie Date: Thu Feb 2 03:54:43 2017 New Revision: 313081 URL: https://svnweb.freebsd.org/changeset/base/313081 Log: Replace for/retry loops with "wait_for_ggate_device" calls and check results of commands As noted in r313008, the underlying issue was that geom_gate device creation wasn't created at ggatel command completion, but some short time after. ggatec(8) employs similar logic when creating geom_gate(4) devices. Switch from retry loops (after the ggatec/dd write calls) to wait_for_ggate_device function calls after calling ggatec(8) instead to detect the presence of the /dev/ggate* device, as this function is sufficient for determining whether or not the character device is ready for testing While here, use atf_check consistently with all dd calls to ensure that data output is as expected. MFC after: 1 week Reviewed by: asomers Differential Revision: D9409 Sponsored by: Dell EMC Isilon Modified: head/tests/sys/geom/class/gate/ggate_test.sh Modified: head/tests/sys/geom/class/gate/ggate_test.sh ============================================================================== --- head/tests/sys/geom/class/gate/ggate_test.sh Thu Feb 2 01:33:08 2017 (r313080) +++ head/tests/sys/geom/class/gate/ggate_test.sh Thu Feb 2 03:54:43 2017 (r313081) @@ -4,7 +4,6 @@ PIDFILE=ggated.pid PLAINFILES=plainfiles PORT=33080 CONF=gg.exports -RETRIES=16 atf_test_case ggated cleanup ggated_head() @@ -21,31 +20,23 @@ ggated_body() 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 + atf_check -e ignore -o ignore \ + dd if=/dev/random of=/dev/$work bs=1m count=1 conv=notrunc + atf_check -e ignore -o ignore \ + 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 + atf_check ggatec create -p $PORT -u $us 127.0.0.1 /dev/$work - 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 + ggate_dev=/dev/ggate${us} + + wait_for_ggate_device ${ggate_dev} + + atf_check -e ignore -o ignore \ + dd if=/dev/${src} of=${ggate_dev} bs=1m count=1 conv=notrunc checksum /dev/$src /dev/$work } @@ -78,7 +69,8 @@ ggatel_file_body() wait_for_ggate_device ${ggate_dev} - dd if=src of=${ggate_dev} bs=1m count=1 conv=notrunc + atf_check -e ignore -o ignore \ + dd if=src of=${ggate_dev} bs=1m count=1 conv=notrunc checksum src work } @@ -103,8 +95,10 @@ ggatel_md_body() 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 -e ignore -o ignore \ + dd if=/dev/random of=$work bs=1m count=1 conv=notrunc + atf_check -e ignore -o ignore \ + dd if=/dev/random of=$src bs=1m count=1 conv=notrunc atf_check ggatel create -u $us /dev/$work @@ -112,7 +106,8 @@ ggatel_md_body() wait_for_ggate_device ${ggate_dev} - dd if=/dev/$src of=${ggate_dev} bs=1m count=1 conv=notrunc + atf_check -e ignore -o ignore \ + dd if=/dev/$src of=${ggate_dev} bs=1m count=1 conv=notrunc checksum /dev/$src /dev/$work } From owner-svn-src-all@freebsd.org Thu Feb 2 04:50:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55E11CCDF1C; Thu, 2 Feb 2017 04:50:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 228C31EE4; Thu, 2 Feb 2017 04:50:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v124oK9n078710; Thu, 2 Feb 2017 04:50:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v124oKnM078709; Thu, 2 Feb 2017 04:50:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702020450.v124oKnM078709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 2 Feb 2017 04:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313082 - head/sys/dev/de X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 04:50:21 -0000 Author: imp Date: Thu Feb 2 04:50:20 2017 New Revision: 313082 URL: https://svnweb.freebsd.org/changeset/base/313082 Log: Remove dangling DE425 EISA card references in the de driver. They aren't used, and this doesn't change the supported hardware. Modified: head/sys/dev/de/dc21040reg.h Modified: head/sys/dev/de/dc21040reg.h ============================================================================== --- head/sys/dev/de/dc21040reg.h Thu Feb 2 03:54:43 2017 (r313081) +++ head/sys/dev/de/dc21040reg.h Thu Feb 2 04:50:20 2017 (r313082) @@ -494,20 +494,6 @@ typedef struct { #define PHYCTL_AUTONEG_RESTART 0x0200 #define PHYCTL_FULL_DUPLEX 0x0100 -/* - * Definitions for the DE425. - */ -#define DE425_CFID 0x08 /* Configuration Id */ -#define DE425_CFCS 0x0C /* Configuration Command-Status */ -#define DE425_CFRV 0x18 /* Configuration Revision */ -#define DE425_CFLT 0x1C /* Configuration Latency Timer */ -#define DE425_CBIO 0x28 /* Configuration Base IO Address */ -#define DE425_CFDA 0x2C /* Configuration Driver Area */ -#define DE425_ENETROM_OFFSET 0xC90 /* Offset in I/O space for ENETROM */ -#define DE425_CFG0 0xC88 /* IRQ register */ -#define DE425_EISAID 0x10a34250 /* EISA device id */ -#define DE425_EISA_IOSIZE 0x100 - #define DEC_VENDORID 0x1011 #define CHIPID_21040 0x0002 #define CHIPID_21140 0x0009 From owner-svn-src-all@freebsd.org Thu Feb 2 04:53:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3ED6CCD0BC; Thu, 2 Feb 2017 04:53:34 +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 6504C38E; Thu, 2 Feb 2017 04:53:34 +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 v124rX0o082545; Thu, 2 Feb 2017 04:53:33 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v124rXwp082544; Thu, 2 Feb 2017 04:53:33 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702020453.v124rXwp082544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 2 Feb 2017 04:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313083 - head/usr.sbin/tcpdump/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 04:53:34 -0000 Author: glebius Date: Thu Feb 2 04:53:33 2017 New Revision: 313083 URL: https://svnweb.freebsd.org/changeset/base/313083 Log: Fix build with WITHOUT_INET6. Submitted by: Alex Deiter Modified: head/usr.sbin/tcpdump/tcpdump/Makefile Modified: head/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/Makefile Thu Feb 2 04:50:20 2017 (r313082) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Thu Feb 2 04:53:33 2017 (r313083) @@ -36,6 +36,7 @@ SRCS= addrtoname.c \ print-ascii.c \ print-atalk.c \ print-atm.c \ + print-babel.c \ print-beep.c \ print-bfd.c \ print-bgp.c \ @@ -50,6 +51,7 @@ SRCS= addrtoname.c \ print-cnfp.c \ print-dccp.c \ print-decnet.c \ + print-dhcp6.c \ print-domain.c \ print-dtp.c \ print-dvmrp.c \ @@ -62,6 +64,7 @@ SRCS= addrtoname.c \ print-fddi.c \ print-forces.c \ print-fr.c \ + print-frag6.c \ print-ftp.c \ print-geneve.c \ print-geonet.c \ @@ -70,10 +73,12 @@ SRCS= addrtoname.c \ print-hsrp.c \ print-http.c \ print-icmp.c \ + print-icmp6.c \ print-igmp.c \ print-igrp.c \ print-ip.c \ print-ip6.c \ + print-ip6opts.c \ print-ipcomp.c \ print-ipfc.c \ print-ipnet.c \ @@ -96,6 +101,7 @@ SRCS= addrtoname.c \ print-m3ua.c \ print-medsa.c \ print-mobile.c \ + print-mobility.c \ print-mpcp.c \ print-mpls.c \ print-mptcp.c \ @@ -109,6 +115,7 @@ SRCS= addrtoname.c \ print-openflow.c \ print-openflow-1.0.c \ print-ospf.c \ + print-ospf6.c \ print-otv.c \ print-pgm.c \ print-pim.c \ @@ -121,9 +128,11 @@ SRCS= addrtoname.c \ print-raw.c \ print-resp.c \ print-rip.c \ + print-ripng.c \ print-rpki-rtr.c \ print-rrcp.c \ print-rsvp.c \ + print-rt6.c \ print-rtsp.c \ print-rx.c \ print-sctp.c \ @@ -171,15 +180,6 @@ CFLAGS+= -DHAVE_CONFIG_H CFLAGS+= -D_U_="__attribute__((unused))" .if ${MK_INET6_SUPPORT} != "no" -SRCS+= print-babel.c \ - print-dhcp6.c \ - print-frag6.c \ - print-icmp6.c \ - print-ip6opts.c \ - print-mobility.c \ - print-ospf6.c \ - print-ripng.c \ - print-rt6.c CFLAGS+= -DINET6 -DHAVE_OS_IPV6_SUPPORT .endif .if ${MACHINE_CPUARCH} != "i386" From owner-svn-src-all@freebsd.org Thu Feb 2 05:26:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FE0BCCD9D0; Thu, 2 Feb 2017 05:26:40 +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 1F53A1335; Thu, 2 Feb 2017 05:26:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v125QdTT094835; Thu, 2 Feb 2017 05:26:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v125QdpX094834; Thu, 2 Feb 2017 05:26:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702020526.v125QdpX094834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 2 Feb 2017 05:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313084 - head/tools/tools/ath/athspectral X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 05:26:40 -0000 Author: adrian Date: Thu Feb 2 05:26:39 2017 New Revision: 313084 URL: https://svnweb.freebsd.org/changeset/base/313084 Log: [athspectral] add a knob to expose the spectral scan priority. This is required for AR9380 and later chips.. please leave it at 0 for now. Modified: head/tools/tools/ath/athspectral/athspectral.c Modified: head/tools/tools/ath/athspectral/athspectral.c ============================================================================== --- head/tools/tools/ath/athspectral/athspectral.c Thu Feb 2 04:53:33 2017 (r313083) +++ head/tools/tools/ath/athspectral/athspectral.c Thu Feb 2 05:26:39 2017 (r313084) @@ -104,6 +104,9 @@ spectralset(struct spectralhandler *spec case SPECTRAL_PARAM_SS_SHORT_RPT: pe.ss_short_report = param; break; + case SPECTRAL_PARAM_SS_SPECTRAL_PRI: + pe.ss_spectral_pri = param; + break; } spectral->atd.ad_id = SPECTRAL_CONTROL_SET_PARAMS | ATH_DIAG_IN; @@ -138,6 +141,7 @@ spectral_get(struct spectralhandler *spe printf(" ss_fft_period: %d\n", pe.ss_fft_period); printf(" ss_period: %d\n", pe.ss_period); printf(" ss_short_report: %d\n", pe.ss_short_report); + printf(" ss_spectral_pri: %d\n", pe.ss_spectral_pri); printf(" radar_bin_thresh_sel: %d\n", pe.radar_bin_thresh_sel); } @@ -222,6 +226,8 @@ spectral_set_param(struct spectralhandle spectralset(spectral, SPECTRAL_PARAM_SS_PERIOD, v); } else if (strcmp(param, "ss_count") == 0) { spectralset(spectral, SPECTRAL_PARAM_SS_COUNT, v); + } else if (strcmp(param, "ss_spectral_pri") == 0) { + spectralset(spectral, SPECTRAL_PARAM_SS_SPECTRAL_PRI, v); } else { return (0); } From owner-svn-src-all@freebsd.org Thu Feb 2 05:27:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D66ACCDA24; Thu, 2 Feb 2017 05:27: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 1D00114C1; Thu, 2 Feb 2017 05:27:07 +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 v125R6E0094901; Thu, 2 Feb 2017 05:27:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v125R6BW094900; Thu, 2 Feb 2017 05:27:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702020527.v125R6BW094900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 2 Feb 2017 05:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313085 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 05:27:07 -0000 Author: adrian Date: Thu Feb 2 05:27:06 2017 New Revision: 313085 URL: https://svnweb.freebsd.org/changeset/base/313085 Log: [ath] add spectral scan priority. Modified: head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Thu Feb 2 05:26:39 2017 (r313084) +++ head/sys/dev/ath/if_athioctl.h Thu Feb 2 05:27:06 2017 (r313085) @@ -432,6 +432,7 @@ struct ath_tx_radiotap_header { #define SPECTRAL_PARAM_SS_SHORT_RPT 4 #define SPECTRAL_PARAM_ENABLED 5 #define SPECTRAL_PARAM_ACTIVE 6 +#define SPECTRAL_PARAM_SS_SPECTRAL_PRI 7 /* * Spectral control parameters From owner-svn-src-all@freebsd.org Thu Feb 2 05:27:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE27DCCDA78; Thu, 2 Feb 2017 05:27:28 +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 8DB281642; Thu, 2 Feb 2017 05:27:28 +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 v125RRKU094957; Thu, 2 Feb 2017 05:27:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v125RRFw094956; Thu, 2 Feb 2017 05:27:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702020527.v125RRFw094956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 2 Feb 2017 05:27:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313086 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 05:27:28 -0000 Author: adrian Date: Thu Feb 2 05:27:27 2017 New Revision: 313086 URL: https://svnweb.freebsd.org/changeset/base/313086 Log: [ath_hal] add debugging level for spectral scan. Modified: head/sys/dev/ath/ath_hal/ah_debug.h Modified: head/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_debug.h Thu Feb 2 05:27:06 2017 (r313085) +++ head/sys/dev/ath/ath_hal/ah_debug.h Thu Feb 2 05:27:27 2017 (r313086) @@ -54,6 +54,7 @@ enum { HAL_DEBUG_PRINT_REG = 0x08000000, HAL_DEBUG_FCS_RTT = 0x10000000, HAL_DEBUG_BT_COEX = 0x20000000, + HAL_DEBUG_SPECTRAL = 0x40000000, HAL_DEBUG_UNMASKABLE = 0x80000000, /* always printed */ HAL_DEBUG_ANY = 0xffffffff From owner-svn-src-all@freebsd.org Thu Feb 2 05:27:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2907CCDAE2; Thu, 2 Feb 2017 05:27:49 +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 C245117A1; Thu, 2 Feb 2017 05:27:49 +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 v125Rmhp095018; Thu, 2 Feb 2017 05:27:48 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v125RmBL095017; Thu, 2 Feb 2017 05:27:48 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702020527.v125RmBL095017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 2 Feb 2017 05:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313087 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 05:27:50 -0000 Author: adrian Date: Thu Feb 2 05:27:48 2017 New Revision: 313087 URL: https://svnweb.freebsd.org/changeset/base/313087 Log: [ath] ensure the NIC is woken up before changing the spectral scan parameters. Modified: head/sys/dev/ath/if_ath_spectral.c Modified: head/sys/dev/ath/if_ath_spectral.c ============================================================================== --- head/sys/dev/ath/if_ath_spectral.c Thu Feb 2 05:27:27 2017 (r313086) +++ head/sys/dev/ath/if_ath_spectral.c Thu Feb 2 05:27:48 2017 (r313087) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include @@ -191,6 +192,10 @@ ath_ioctl_spectral(struct ath_softc *sc, if (! ath_hal_spectral_supported(sc->sc_ah)) return (EINVAL); + ATH_LOCK(sc); + ath_power_set_power_state(sc, HAL_PM_AWAKE); + ATH_UNLOCK(sc); + if (ad->ad_id & ATH_DIAG_IN) { /* * Copy in data. @@ -285,6 +290,10 @@ bad: free(indata, M_TEMP); if ((ad->ad_id & ATH_DIAG_DYN) && outdata != NULL) free(outdata, M_TEMP); + ATH_LOCK(sc); + ath_power_restore_power_state(sc); + ATH_UNLOCK(sc); + return (error); } From owner-svn-src-all@freebsd.org Thu Feb 2 05:29:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D00ACCDB9E; Thu, 2 Feb 2017 05:29:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17CFA1961; Thu, 2 Feb 2017 05:29:24 +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 v125TNLA095119; Thu, 2 Feb 2017 05:29:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v125TNMr095118; Thu, 2 Feb 2017 05:29:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702020529.v125TNMr095118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 2 Feb 2017 05:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313088 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 05:29:24 -0000 Author: adrian Date: Thu Feb 2 05:29:22 2017 New Revision: 313088 URL: https://svnweb.freebsd.org/changeset/base/313088 Log: [ath_hal] [ar9300] initial hacks to make spectral scan working on AR9380 and later NICs. * add debugging * disable the manual noise floor calibration and tracking done by the HAL; this interferes with the normal calibration path and will lock up the RX side * don't program short report / priority if they're provided as NOVAL. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c Thu Feb 2 05:27:48 2017 (r313087) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c Thu Feb 2 05:29:22 2017 (r313088) @@ -309,17 +309,27 @@ ar9300_noise_floor_power_get(struct ath_ void ar9300_configure_spectral_scan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss) { - u_int32_t val, i; + u_int32_t val; + //uint32_t i; struct ath_hal_9300 *ahp = AH9300(ah); HAL_BOOL asleep = ahp->ah_chip_full_sleep; - int16_t nf_buf[HAL_NUM_NF_READINGS]; + //int16_t nf_buf[HAL_NUM_NF_READINGS]; if ((AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) && asleep) { ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE); } + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "%s: called\n", __func__); + + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_fft_period=%d\n", ss->ss_fft_period); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_period=%d\n", ss->ss_period); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_count=%d\n", ss->ss_count); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_short_report=%d\n", ss->ss_short_report); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_spectral_pri=%d\n", ss->ss_spectral_pri); + ar9300_prep_spectral_scan(ah); +#if 0 if (ss->ss_spectral_pri) { for (i = 0; i < HAL_NUM_NF_READINGS; i++) { nf_buf[i] = NOISE_PWR_DBM_2_INT(ss->ss_nf_cal[i]); @@ -333,6 +343,7 @@ ar9300_configure_spectral_scan(struct at /*ar9300_disable_restart(ah);*/ #endif } +#endif val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN); @@ -364,18 +375,22 @@ ar9300_configure_spectral_scan(struct at val |= SM(ss->ss_period, AR_PHY_SPECTRAL_SCAN_PERIOD); } + if (ss->ss_short_report != HAL_SPECTRAL_PARAM_NOVAL) { if (ss->ss_short_report == AH_TRUE) { val |= AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT; } else { val &= ~AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT; } + } /* if noise power cal, force high priority */ + if (ss->ss_spectral_pri != HAL_SPECTRAL_PARAM_NOVAL) { if (ss->ss_spectral_pri) { val |= AR_PHY_SPECTRAL_SCAN_PRIORITY_HI; } else { val &= ~AR_PHY_SPECTRAL_SCAN_PRIORITY_HI; } + } /* enable spectral scan */ OS_REG_WRITE(ah, AR_PHY_SPECTRAL_SCAN, val | AR_PHY_SPECTRAL_SCAN_ENABLE); @@ -400,6 +415,8 @@ ar9300_get_spectral_params(struct ath_ha struct ath_hal_9300 *ahp = AH9300(ah); HAL_BOOL asleep = ahp->ah_chip_full_sleep; + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "%s: called\n", __func__); + c = AH_PRIVATE(ah)->ah_curchan; if (c != NULL) chan = ath_hal_checkchannel(ah, c); @@ -416,6 +433,17 @@ ar9300_get_spectral_params(struct ath_ha ss->ss_count = MS(val, AR_PHY_SPECTRAL_SCAN_COUNT); ss->ss_short_report = (val & AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT) ? 1:0; ss->ss_spectral_pri = ( val & AR_PHY_SPECTRAL_SCAN_PRIORITY_HI) ? 1:0; + ss->ss_enabled = !! (val & AR_PHY_SPECTRAL_SCAN_ENABLE); + ss->ss_active = !! (val & AR_PHY_SPECTRAL_SCAN_ACTIVE); + + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_fft_period=%d\n", ss->ss_fft_period); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_period=%d\n", ss->ss_period); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_count=%d\n", ss->ss_count); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_short_report=%d\n", ss->ss_short_report); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_spectral_pri=%d\n", ss->ss_spectral_pri); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_enabled=%d\n", ss->ss_enabled); + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_active=%d\n", ss->ss_active); + OS_MEMZERO(ss->ss_nf_cal, sizeof(ss->ss_nf_cal)); OS_MEMZERO(ss->ss_nf_pwr, sizeof(ss->ss_nf_cal)); ss->ss_nf_temp_data = 0; @@ -470,6 +498,8 @@ void ar9300_start_spectral_scan(struct a ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE); } + HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "%s: called\n", __func__); + ar9300_prep_spectral_scan(ah); /* activate spectral scan */ From owner-svn-src-all@freebsd.org Thu Feb 2 06:07:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E97A3CCD383; Thu, 2 Feb 2017 06:07:40 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B954BBED; Thu, 2 Feb 2017 06:07:40 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1267dCU011517; Thu, 2 Feb 2017 06:07:39 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1267dAD011516; Thu, 2 Feb 2017 06:07:39 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201702020607.v1267dAD011516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Thu, 2 Feb 2017 06:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313089 - head/sys/dev/cesa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 06:07:41 -0000 Author: wma Date: Thu Feb 2 06:07:39 2017 New Revision: 313089 URL: https://svnweb.freebsd.org/changeset/base/313089 Log: Remove remaining ifdefs from CESA header Commit r312743 ("Use SoC ID - based detection in CESA") resulted in build failing for Marvell armv5 platforms, which don't support the newer version of CESA controller. This patch provides a fix by removing ifdefs around bitfields' definitions, so that they are known to all platforms. Submitted by: Marcin Wojtas Obtained from: Semihalf Sponsored by: Stormshield Modified: head/sys/dev/cesa/cesa.h Modified: head/sys/dev/cesa/cesa.h ============================================================================== --- head/sys/dev/cesa/cesa.h Thu Feb 2 05:29:22 2017 (r313088) +++ head/sys/dev/cesa/cesa.h Thu Feb 2 06:07:39 2017 (r313089) @@ -336,10 +336,7 @@ struct cesa_chain_info { #define CESA_TDMA_CR_ENABLE (1 << 12) #define CESA_TDMA_CR_FETCHND (1 << 13) #define CESA_TDMA_CR_ACTIVE (1 << 14) - -#if defined (SOC_MV_ARMADA38X) #define CESA_TDMA_NUM_OUTSTAND (2 << 16) -#endif #define CESA_TDMA_ECR 0x08C8 #define CESA_TDMA_ECR_MISS (1 << 0) @@ -361,10 +358,7 @@ struct cesa_chain_info { /* CESA SA registers definitions */ #define CESA_SA_CMD 0x0E00 #define CESA_SA_CMD_ACTVATE (1 << 0) - -#if defined (SOC_MV_ARMADA38X) #define CESA_SA_CMD_SHA2 (1 << 31) -#endif #define CESA_SA_DPR 0x0E04 From owner-svn-src-all@freebsd.org Thu Feb 2 06:14:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40B47CCD62B; Thu, 2 Feb 2017 06:14:48 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0528D1088; Thu, 2 Feb 2017 06:14:47 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v126ElqA015485; Thu, 2 Feb 2017 06:14:47 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v126Ei6m015457; Thu, 2 Feb 2017 06:14:44 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201702020614.v126Ei6m015457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Thu, 2 Feb 2017 06:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313090 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/arm arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/freescale/vybrid arm/include... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 06:14:48 -0000 Author: mmel Date: Thu Feb 2 06:14:44 2017 New Revision: 313090 URL: https://svnweb.freebsd.org/changeset/base/313090 Log: Remake support for SMP kernel on UP cpu: - Use new option SMP_ON_UP instead of (mis)using specific CPU type. By this, any SMP kernel can be compiled with SMP_ON_UP support. - Enable runtime detection of CPU multiprocessor extensions only if SMP_ON_UP option is used. In other cases (pure SMP or UP), statically compile only required variant. - Don't leak multiprocessor instructions to UP kernel. - Correctly handle data cache write back to point of unification. DCCMVAU is supported on all armv7 cpus. - For SMP_ON_UP kernels, detect proper TTB flags on runtime. Differential Revision: https://reviews.freebsd.org/D9133 Modified: head/sys/arm/allwinner/std.allwinner head/sys/arm/allwinner/std.allwinner_up head/sys/arm/altera/socfpga/std.socfpga head/sys/arm/amlogic/aml8726/std.aml8726 head/sys/arm/annapurna/alpine/std.alpine head/sys/arm/arm/cpufunc.c head/sys/arm/arm/pmap-v6.c head/sys/arm/broadcom/bcm2835/std.bcm2836 head/sys/arm/conf/GENERIC head/sys/arm/freescale/imx/std.imx51 head/sys/arm/freescale/imx/std.imx53 head/sys/arm/freescale/imx/std.imx6 head/sys/arm/freescale/vybrid/std.vybrid head/sys/arm/include/cpu-v6.h head/sys/arm/include/cpufunc.h head/sys/arm/include/intr.h head/sys/arm/include/sysreg.h head/sys/arm/mv/armada38x/std.armada38x head/sys/arm/nvidia/tegra124/std.tegra124 head/sys/arm/qemu/std.virt head/sys/arm/rockchip/std.rk30xx head/sys/arm/samsung/exynos/std.exynos5250 head/sys/arm/samsung/exynos/std.exynos5420 head/sys/arm/ti/am335x/std.am335x head/sys/arm/ti/omap4/std.omap4 head/sys/arm/xilinx/std.zynq7 head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/arm/allwinner/std.allwinner ============================================================================== --- head/sys/arm/allwinner/std.allwinner Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/allwinner/std.allwinner Thu Feb 2 06:14:44 2017 (r313090) @@ -1,7 +1,7 @@ # Allwinner common options #$FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/allwinner/std.allwinner_up ============================================================================== --- head/sys/arm/allwinner/std.allwinner_up Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/allwinner/std.allwinner_up Thu Feb 2 06:14:44 2017 (r313090) @@ -1,7 +1,7 @@ # Allwinner Uniprocessor common options #$FreeBSD$ -cpu CPU_CORTEXA8 +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/altera/socfpga/std.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/std.socfpga Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/altera/socfpga/std.socfpga Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/amlogic/aml8726/std.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.aml8726 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/amlogic/aml8726/std.aml8726 Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/annapurna/alpine/std.alpine ============================================================================== --- head/sys/arm/annapurna/alpine/std.alpine Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/annapurna/alpine/std.alpine Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a -DAL_HAVE_TYPES" Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/arm/cpufunc.c Thu Feb 2 06:14:44 2017 (r313090) @@ -429,7 +429,7 @@ struct cpu_functions arm1176_cpufuncs = }; #endif /*CPU_ARM1176 */ -#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) struct cpu_functions cortexa_cpufuncs = { /* Cache operations */ @@ -450,7 +450,7 @@ struct cpu_functions cortexa_cpufuncs = /* Soft functions */ .cf_setup = cortexa_setup }; -#endif /* CPU_CORTEXA8 || CPU_CORTEXA_MP || CPU_KRAIT */ +#endif /* CPU_CORTEXA || CPU_KRAIT */ /* * Global constants also used by locore.s @@ -468,7 +468,7 @@ u_int cpu_reset_needs_v4_MMU_disable; /* defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_FA526) || defined(CPU_MV_PJ4B) || \ defined(CPU_XSCALE_81342) || \ - defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) + defined(CPU_CORTEXA) || defined(CPU_KRAIT) /* Global cache line sizes, use 32 as default */ int arm_dcache_min_line_size = 32; @@ -659,7 +659,7 @@ set_cpufuncs(void) goto out; } #endif /* CPU_ARM1176 */ -#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) switch(cputype & CPU_ID_SCHEME_MASK) { case CPU_ID_CORTEXA5: case CPU_ID_CORTEXA7: @@ -677,7 +677,7 @@ set_cpufuncs(void) default: break; } -#endif /* CPU_CORTEXA8 || CPU_CORTEXA_MP || CPU_KRAIT */ +#endif /* CPU_CORTEXA || CPU_KRAIT */ #if defined(CPU_MV_PJ4B) if (cputype == CPU_ID_MV88SV581X_V7 || @@ -830,7 +830,7 @@ arm10_setup(void) #if defined(CPU_ARM1176) \ || defined(CPU_MV_PJ4B) \ - || defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) + || defined(CPU_CORTEXA) || defined(CPU_KRAIT) static __inline void cpu_scc_setup_ccnt(void) { @@ -900,7 +900,7 @@ pj4bv7_setup(void) } #endif /* CPU_MV_PJ4B */ -#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) void cortexa_setup(void) @@ -908,7 +908,7 @@ cortexa_setup(void) cpu_scc_setup_ccnt(); } -#endif /* CPU_CORTEXA8 || CPU_CORTEXA_MP || CPU_KRAIT */ +#endif /* CPU_CORTEXA || CPU_KRAIT */ #if defined(CPU_FA526) void Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/arm/pmap-v6.c Thu Feb 2 06:14:44 2017 (r313090) @@ -140,7 +140,6 @@ __FBSDID("$FreeBSD$"); #ifdef SMP #include #endif - #ifndef PMAP_SHPGPERPROC #define PMAP_SHPGPERPROC 200 #endif @@ -431,7 +430,9 @@ encode_ttb_flags(int idx) reg |= (inner & 0x1) << 6; reg |= (inner & 0x2) >> 1; #ifdef SMP - reg |= 1 << 1; + ARM_SMP_UP( + reg |= 1 << 1, + ); #endif return reg; } @@ -485,8 +486,9 @@ pmap_set_tex(void) /* Add shareable bits for normal memory in SMP case. */ #ifdef SMP - if (ARM_USE_MP_EXTENSIONS) - prrr |= PRRR_NS1; + ARM_SMP_UP( + prrr |= PRRR_NS1, + ); #endif cp15_prrr_set(prrr); cp15_nmrr_set(nmrr); Modified: head/sys/arm/broadcom/bcm2835/std.bcm2836 ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.bcm2836 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/broadcom/bcm2835/std.bcm2836 Thu Feb 2 06:14:44 2017 (r313090) @@ -1,7 +1,7 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" options SOC_BCM2836 Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/conf/GENERIC Thu Feb 2 06:14:44 2017 (r313090) @@ -20,8 +20,8 @@ ident GENERIC -cpu CPU_CORTEXA_MP -cpu CPU_CORTEXA8 +cpu CPU_CORTEXA +options SMP_ON_UP machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/freescale/imx/std.imx51 ============================================================================== --- head/sys/arm/freescale/imx/std.imx51 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/freescale/imx/std.imx51 Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA8 +cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" options KERNVIRTADDR=0xc0100000 Modified: head/sys/arm/freescale/imx/std.imx53 ============================================================================== --- head/sys/arm/freescale/imx/std.imx53 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/freescale/imx/std.imx53 Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA8 +cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" options KERNVIRTADDR=0xc0100000 Modified: head/sys/arm/freescale/imx/std.imx6 ============================================================================== --- head/sys/arm/freescale/imx/std.imx6 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/freescale/imx/std.imx6 Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" options KERNVIRTADDR = 0xc2000000 Modified: head/sys/arm/freescale/vybrid/std.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/std.vybrid Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/freescale/vybrid/std.vybrid Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/include/cpu-v6.h Thu Feb 2 06:14:44 2017 (r313090) @@ -41,24 +41,47 @@ #if __ARM_ARCH < 6 #error Only include this file for ARMv6 -#else +#endif + +/* + * Some kernel modules (dtrace all for example) are compiled + * unconditionally with -DSMP. Although it looks like a bug, + * handle this case here and in #elif condition in ARM_SMP_UP macro. + */ +#if __ARM_ARCH <= 6 && defined(SMP) && !defined(KLD_MODULE) +#error SMP option is not supported on ARMv6 +#endif + +#if __ARM_ARCH <= 6 && defined(SMP_ON_UP) +#error SMP_ON_UP option is only supported on ARMv7+ CPUs +#endif + +#if !defined(SMP) && defined(SMP_ON_UP) +#error SMP option must be defined for SMP_ON_UP option +#endif #define CPU_ASID_KERNEL 0 -#if __ARM_ARCH >= 7 -#if !defined(SMP) -/* No SMP so no need to use the MP extensions */ -#define ARM_USE_MP_EXTENSIONS 0 -#elif defined(CPU_CORTEXA8) && \ - (defined(CPU_CORTEXA_MP) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B)) -#define ARM_USE_MP_EXTENSIONS (cpuinfo.mp_ext != 0) -#elif defined(CPU_CORTEXA8) -#define ARM_USE_MP_EXTENSIONS 0 +#if defined(SMP_ON_UP) +#define ARM_SMP_UP(smp_code, up_code) \ +do { \ + if (cpuinfo.mp_ext != 0) { \ + smp_code; \ + } else { \ + up_code; \ + } \ +} while (0) +#elif defined(SMP) && __ARM_ARCH > 6 +#define ARM_SMP_UP(smp_code, up_code) \ +do { \ + smp_code; \ +} while (0) #else -#define ARM_USE_MP_EXTENSIONS 1 +#define ARM_SMP_UP(smp_code, up_code) \ +do { \ + up_code; \ +} while (0) #endif -#endif /* __ARM_ARCH >= 7 */ - void dcache_wbinv_poc_all(void); /* !!! NOT SMP coherent function !!! */ vm_offset_t dcache_wb_pou_checked(vm_offset_t, vm_size_t); @@ -126,15 +149,15 @@ fname(uint64_t reg) \ /* TLB */ _WF0(_CP15_TLBIALL, CP15_TLBIALL) /* Invalidate entire unified TLB */ -#if __ARM_ARCH >= 7 +#if __ARM_ARCH >= 7 && defined(SMP) _WF0(_CP15_TLBIALLIS, CP15_TLBIALLIS) /* Invalidate entire unified TLB IS */ #endif _WF1(_CP15_TLBIASID, CP15_TLBIASID(%0)) /* Invalidate unified TLB by ASID */ -#if __ARM_ARCH >= 7 +#if __ARM_ARCH >= 7 && defined(SMP) _WF1(_CP15_TLBIASIDIS, CP15_TLBIASIDIS(%0)) /* Invalidate unified TLB by ASID IS */ #endif _WF1(_CP15_TLBIMVAA, CP15_TLBIMVAA(%0)) /* Invalidate unified TLB by MVA, all ASID */ -#if __ARM_ARCH >= 7 +#if __ARM_ARCH >= 7 && defined(SMP) _WF1(_CP15_TLBIMVAAIS, CP15_TLBIMVAAIS(%0)) /* Invalidate unified TLB by MVA, all ASID IS */ #endif _WF1(_CP15_TLBIMVA, CP15_TLBIMVA(%0)) /* Invalidate unified TLB by MVA */ @@ -144,7 +167,7 @@ _WF1(_CP15_TTB_SET, CP15_TTBR0(%0)) /* Cache and Branch predictor */ _WF0(_CP15_BPIALL, CP15_BPIALL) /* Branch predictor invalidate all */ -#if __ARM_ARCH >= 7 +#if __ARM_ARCH >= 7 && defined(SMP) _WF0(_CP15_BPIALLIS, CP15_BPIALLIS) /* Branch predictor invalidate all IS */ #endif _WF1(_CP15_BPIMVA, CP15_BPIMVA(%0)) /* Branch predictor invalidate by MVA */ @@ -158,7 +181,7 @@ _WF1(_CP15_DCCSW, CP15_DCCSW(%0)) /* Da _WF1(_CP15_DCIMVAC, CP15_DCIMVAC(%0)) /* Data cache invalidate by MVA PoC */ _WF1(_CP15_DCISW, CP15_DCISW(%0)) /* Data cache invalidate by set/way */ _WF0(_CP15_ICIALLU, CP15_ICIALLU) /* Instruction cache invalidate all PoU */ -#if __ARM_ARCH >= 7 +#if __ARM_ARCH >= 7 && defined(SMP) _WF0(_CP15_ICIALLUIS, CP15_ICIALLUIS) /* Instruction cache invalidate all PoU IS */ #endif _WF1(_CP15_ICIMVAU, CP15_ICIMVAU(%0)) /* Instruction cache invalidate */ @@ -360,17 +383,17 @@ tlb_flush_range_local(vm_offset_t va, vm } /* Broadcasting operations. */ -#if __ARM_ARCH >= 7 +#if __ARM_ARCH >= 7 && defined(SMP) static __inline void tlb_flush_all(void) { dsb(); - if (ARM_USE_MP_EXTENSIONS) - _CP15_TLBIALLIS(); - else - _CP15_TLBIALL(); + ARM_SMP_UP( + _CP15_TLBIALLIS(), + _CP15_TLBIALL() + ); dsb(); } @@ -379,10 +402,10 @@ tlb_flush_all_ng(void) { dsb(); - if (ARM_USE_MP_EXTENSIONS) - _CP15_TLBIASIDIS(CPU_ASID_KERNEL); - else - _CP15_TLBIASID(CPU_ASID_KERNEL); + ARM_SMP_UP( + _CP15_TLBIASIDIS(CPU_ASID_KERNEL), + _CP15_TLBIASID(CPU_ASID_KERNEL) + ); dsb(); } @@ -393,10 +416,10 @@ tlb_flush(vm_offset_t va) KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); dsb(); - if (ARM_USE_MP_EXTENSIONS) - _CP15_TLBIMVAAIS(va); - else - _CP15_TLBIMVA(va | CPU_ASID_KERNEL); + ARM_SMP_UP( + _CP15_TLBIMVAAIS(va), + _CP15_TLBIMVA(va | CPU_ASID_KERNEL) + ); dsb(); } @@ -410,13 +433,16 @@ tlb_flush_range(vm_offset_t va, vm_size size)); dsb(); - if (ARM_USE_MP_EXTENSIONS) { - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVAAIS(va); - } else { - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVA(va | CPU_ASID_KERNEL); - } + ARM_SMP_UP( + { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVAAIS(va); + }, + { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); + } + ); dsb(); } #else /* __ARM_ARCH < 7 */ @@ -440,23 +466,19 @@ icache_sync(vm_offset_t va, vm_size_t si dsb(); va &= ~cpuinfo.dcache_line_mask; + + for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 - if (ARM_USE_MP_EXTENSIONS) { - for ( ; va < eva; va += cpuinfo.dcache_line_size) - _CP15_DCCMVAU(va); - } else -#endif - { - for ( ; va < eva; va += cpuinfo.dcache_line_size) - _CP15_DCCMVAC(va); + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); +#endif } dsb(); -#if __ARM_ARCH >= 7 - if (ARM_USE_MP_EXTENSIONS) - _CP15_ICIALLUIS(); - else -#endif - _CP15_ICIALLU(); + ARM_SMP_UP( + _CP15_ICIALLUIS(), + _CP15_ICIALLU() + ); dsb(); isb(); } @@ -465,12 +487,11 @@ icache_sync(vm_offset_t va, vm_size_t si static __inline void icache_inv_all(void) { -#if __ARM_ARCH >= 7 - if (ARM_USE_MP_EXTENSIONS) - _CP15_ICIALLUIS(); - else -#endif - _CP15_ICIALLU(); + + ARM_SMP_UP( + _CP15_ICIALLUIS(), + _CP15_ICIALLU() + ); dsb(); isb(); } @@ -479,12 +500,11 @@ icache_inv_all(void) static __inline void bpb_inv_all(void) { -#if __ARM_ARCH >= 7 - if (ARM_USE_MP_EXTENSIONS) - _CP15_BPIALLIS(); - else -#endif - _CP15_BPIALL(); + + ARM_SMP_UP( + _CP15_BPIALLIS(), + _CP15_BPIALL() + ); dsb(); isb(); } @@ -497,15 +517,12 @@ dcache_wb_pou(vm_offset_t va, vm_size_t dsb(); va &= ~cpuinfo.dcache_line_mask; + for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 - if (ARM_USE_MP_EXTENSIONS) { - for ( ; va < eva; va += cpuinfo.dcache_line_size) - _CP15_DCCMVAU(va); - } else -#endif - { - for ( ; va < eva; va += cpuinfo.dcache_line_size) - _CP15_DCCMVAC(va); + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); +#endif } dsb(); } @@ -668,6 +685,5 @@ cp15_ats1cuw_check(vm_offset_t addr) isb(); return (cp15_par_get() & 0x01 ? EFAULT : 0); } -#endif /* !__ARM_ARCH < 6 */ #endif /* !MACHINE_CPU_V6_H */ Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/include/cpufunc.h Thu Feb 2 06:14:44 2017 (r313090) @@ -276,8 +276,7 @@ void sheeva_l2cache_wbinv_all (void); #if defined(CPU_MV_PJ4B) void armv6_idcache_wbinv_all (void); #endif -#if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || \ - defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) void armv7_idcache_wbinv_all (void); void armv7_cpu_sleep (int); void armv7_setup (void); Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/include/intr.h Thu Feb 2 06:14:44 2017 (r313090) @@ -76,7 +76,7 @@ int intr_pic_ipi_setup(u_int, const char #elif defined(CPU_ARM9) || defined(SOC_MV_KIRKWOOD) || \ defined(CPU_XSCALE_IXP435) #define NIRQ 64 -#elif defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) +#elif defined(CPU_CORTEXA) #define NIRQ 1020 #elif defined(CPU_KRAIT) #define NIRQ 288 Modified: head/sys/arm/include/sysreg.h ============================================================================== --- head/sys/arm/include/sysreg.h Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/include/sysreg.h Thu Feb 2 06:14:44 2017 (r313090) @@ -140,7 +140,7 @@ /* * CP15 C7 registers */ -#if __ARM_ARCH >= 7 +#if __ARM_ARCH >= 7 && defined(SMP) /* From ARMv7: */ #define CP15_ICIALLUIS p15, 0, r0, c7, c1, 0 /* Instruction cache invalidate all PoU, IS */ #define CP15_BPIALLIS p15, 0, r0, c7, c1, 6 /* Branch predictor invalidate all IS */ @@ -205,7 +205,7 @@ /* * CP15 C8 registers */ -#if __ARM_ARCH >= 7 +#if __ARM_ARCH >= 7 && defined(SMP) /* From ARMv7: */ #define CP15_TLBIALLIS p15, 0, r0, c8, c3, 0 /* Invalidate entire unified TLB IS */ #define CP15_TLBIMVAIS(rr) p15, 0, rr, c8, c3, 1 /* Invalidate unified TLB by MVA IS */ Modified: head/sys/arm/mv/armada38x/std.armada38x ============================================================================== --- head/sys/arm/mv/armada38x/std.armada38x Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/mv/armada38x/std.armada38x Thu Feb 2 06:14:44 2017 (r313090) @@ -1,7 +1,7 @@ # $FreeBSD$ files "../mv/armada38x/files.armada38x" files "../mv/files.mv" -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/nvidia/tegra124/std.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/std.tegra124 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/nvidia/tegra124/std.tegra124 Thu Feb 2 06:14:44 2017 (r313090) @@ -1,5 +1,5 @@ # $FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/qemu/std.virt ============================================================================== --- head/sys/arm/qemu/std.virt Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/qemu/std.virt Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ machine arm armv6 -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" options KERNVIRTADDR = 0xc1000000 Modified: head/sys/arm/rockchip/std.rk30xx ============================================================================== --- head/sys/arm/rockchip/std.rk30xx Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/rockchip/std.rk30xx Thu Feb 2 06:14:44 2017 (r313090) @@ -1,7 +1,7 @@ # Rockchip rk30xx common options #$FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/samsung/exynos/std.exynos5250 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5250 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/samsung/exynos/std.exynos5250 Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/samsung/exynos/std.exynos5420 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5420 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/samsung/exynos/std.exynos5420 Thu Feb 2 06:14:44 2017 (r313090) @@ -1,6 +1,6 @@ # $FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/arm/ti/am335x/std.am335x ============================================================================== --- head/sys/arm/ti/am335x/std.am335x Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/ti/am335x/std.am335x Thu Feb 2 06:14:44 2017 (r313090) @@ -3,7 +3,7 @@ files "../ti/am335x/files.am335x" include "../ti/std.ti" -cpu CPU_CORTEXA8 +cpu CPU_CORTEXA options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm makeoptions KERNVIRTADDR=0xc0200000 Modified: head/sys/arm/ti/omap4/std.omap4 ============================================================================== --- head/sys/arm/ti/omap4/std.omap4 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/ti/omap4/std.omap4 Thu Feb 2 06:14:44 2017 (r313090) @@ -3,7 +3,7 @@ files "../ti/omap4/files.omap4" include "../ti/std.ti" -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm makeoptions KERNVIRTADDR=0xc0200000 Modified: head/sys/arm/xilinx/std.zynq7 ============================================================================== --- head/sys/arm/xilinx/std.zynq7 Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/arm/xilinx/std.zynq7 Thu Feb 2 06:14:44 2017 (r313090) @@ -3,7 +3,7 @@ # # $FreeBSD$ -cpu CPU_CORTEXA_MP +cpu CPU_CORTEXA machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/conf/files.arm Thu Feb 2 06:14:44 2017 (r313090) @@ -36,7 +36,7 @@ arm/arm/cpufunc_asm_arm11x6.S optional c arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342 arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176 -arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa8 | cpu_cortexa_mp | cpu_krait | cpu_mv_pj4b +arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b arm/arm/cpufunc_asm_fa526.S optional cpu_fa526 arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b arm/arm/cpufunc_asm_sheeva.S optional cpu_arm9e Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Thu Feb 2 06:07:39 2017 (r313089) +++ head/sys/conf/options.arm Thu Feb 2 06:14:44 2017 (r313090) @@ -11,8 +11,7 @@ CPSW_ETHERSWITCH opt_cpsw.h CPU_ARM9 opt_global.h CPU_ARM9E opt_global.h CPU_ARM1176 opt_global.h -CPU_CORTEXA8 opt_global.h # Support the Cortex-A8 (no MP extensions) -CPU_CORTEXA_MP opt_global.h # Support Cortex-A CPUs with MP extensions +CPU_CORTEXA opt_global.h CPU_KRAIT opt_global.h CPU_FA526 opt_global.h CPU_MV_PJ4B opt_global.h @@ -20,6 +19,7 @@ CPU_XSCALE_81342 opt_global.h CPU_XSCALE_IXP425 opt_global.h CPU_XSCALE_IXP435 opt_global.h CPU_XSCALE_PXA2X0 opt_global.h +SMP_ON_UP opt_global.h # Runtime detection of MP extensions DEV_GIC opt_global.h DEV_PMU opt_global.h EFI opt_platform.h From owner-svn-src-all@freebsd.org Thu Feb 2 07:08:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 510B6CCD201; Thu, 2 Feb 2017 07:08:12 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D908EAB0; Thu, 2 Feb 2017 07:08:11 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp59-167-167-3.static.internode.on.net [59.167.167.3]) by vps.rulingia.com (8.15.2/8.15.2) with ESMTPS id v1277Yx9014897 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Feb 2017 18:07:39 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id v1277R21018681 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Feb 2017 18:07:27 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id v1277NhH018680; Thu, 2 Feb 2017 18:07:23 +1100 (AEDT) (envelope-from peter) Date: Thu, 2 Feb 2017 18:07:23 +1100 From: Peter Jeremy To: Alexey Dokuchaev Cc: Mark Linimon , Slawa Olhovchenkov , src-committers , John Baldwin , "svn-src-all@freebsd.org" , Takahashi Yoshihiro , "svn-src-head@freebsd.org" , Warner Losh Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170202070723.GE30074@server.rulingia.com> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> <20170201170950.GF79121@zxy.spb.ru> <20170201213956.GA3765@lonesome.com> <20170201232621.GA20035@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8P1HSweYDcXXzwPJ" Content-Disposition: inline In-Reply-To: <20170201232621.GA20035@FreeBSD.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 07:08:12 -0000 --8P1HSweYDcXXzwPJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2017-Feb-01 23:26:21 +0000, Alexey Dokuchaev wrote: >Well, we're doing something more than devoid any support claims: we're >deliberately breaking it, often for little to no reason. Things like >r431746 are disgrace to FreeBSD and utter disrespect to our users. :-( Actually, that's an excellent commit and I commend amdmi3 on it. It will help both our users and our developers. It clearly states to users that their system is unsupported and explains how they can bypass the check if they know what they are doing. That's far better than users getting strange build or runtime failures that require investigation and potentially emails to work out what's wrong. >That's largely irrelevant and hardly ever causing problems. All needed >make(1) implementations are available in ports; I can still build modern >ports in 8.x tinderbox with WITH_PKGNG=3Dyes/PKGSUFFIX=3D.txz. And you are doing so in the clear knowledge that what you are doing is not supported by the FreeBSD Project. --=20 Peter Jeremy --8P1HSweYDcXXzwPJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJYktqrXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs042kP/jap5cD4dnRQON3MKbKRDE1c SLxcUQrJlKrGkDbbMwqlsOpnd3zbtMz9Eg0+cSGm25+5LydTtvGPK99yNH7WRkEM mQ56NfFO9Cffticfnmnf8hMXP/JPcP8PNf3OzqZ+ebQQKdF7RNlzYfD3YK663XJ0 DZ/fY2RIw4tZmx3MgRvZKPwK1q8KSjj41tBcfxodeoCh+uBGhvsoHDdkdodSe4SU Oo5f5Gi+JxPCKVl0vGht9iugSAI6Qse5O/viHuxUTIceB/C2F0JR/mEgtqX0EE5g /hLBtyxNHhZdvcL0YNXsFmvmoNiGC/IEZIDN+efg3EetuIjmu6PmVFa+LmInohCn LvTGcfwj+tuhP3Ub9CfWpw26kV3jIMcAnohr5DgFBMt0SQ6rAUMNLhkjyNz/rDX8 fRXQOl2URcTErDU9APcrmQ0VdfpoErh47JWtTcU0hU/sHBWfazWESHpZ4Hd2AicM hkYf4QY0u81KlbR1Gpe/XhvDnkq1zxsF5ya2ZAYVizAqvJkBqk8TfPVIU9UJ+5G0 xC1i6GpK9e6bothwcDIdRwnpU8aWH7RcpnZhMQeHhK9viLHQBNOIwEnUnCsNbHyV I09u49fBD4QQv/RdsX6y9WQCKLfUT7E/gTt/gb63byu7C2xQBQUiscB7xVVRCELz u2RziLiuZ8EghvWew53b =uQMw -----END PGP SIGNATURE----- --8P1HSweYDcXXzwPJ-- From owner-svn-src-all@freebsd.org Thu Feb 2 08:29:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CBC4CCCBDC; Thu, 2 Feb 2017 08:29:26 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from mailhost.dlr.de (mailhost.dlr.de [129.247.252.32]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mailhost.dlr.de", Issuer "DLR CA - G02" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7106F175B; Thu, 2 Feb 2017 08:29:25 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from DLREXHUB01.intra.dlr.de (172.21.152.130) by mailhost.dlr.de (172.21.163.100) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Feb 2017 09:29:16 +0100 Received: from DLREXMBX01.intra.dlr.de ([fe80::d198:77e5:d411:fccd]) by dlrexhub01.intra.dlr.de ([::1]) with mapi id 14.03.0319.002; Thu, 2 Feb 2017 09:29:20 +0100 From: To: CC: , , Subject: RE: svn commit: r313043 - head/sys/kern Thread-Topic: svn commit: r313043 - head/sys/kern Thread-Index: AQHSfIzUaHU0GSnLtUmrDysUntoftKFUYnQAgAD1jAA= Date: Thu, 2 Feb 2017 08:29:20 +0000 Message-ID: <611243783F62AF48AFB07BC25FA4B1061CED9FD9@DLREXMBX01.intra.dlr.de> References: <201702011312.v11DC7WJ085025@repo.freebsd.org> <20170201180816.GF3334@FreeBSD.org> In-Reply-To: <20170201180816.GF3334@FreeBSD.org> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Content-Type: multipart/mixed; boundary="_002_611243783F62AF48AFB07BC25FA4B1061CED9FD9DLREXMBX01intra_" MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-11.0.0.4255-8.100.1062-22860.005 X-TM-AS-Result: No--18.826300-5.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 08:29:26 -0000 --_002_611243783F62AF48AFB07BC25FA4B1061CED9FD9DLREXMBX01intra_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To be honest - I feared that when I saw your messages regarding this. Here = is my original message from july. Attached is also a small test program. Hi, I'm trying to use asio (that's boost::asio without boost) to handle listeni= ng sockets asynchronuosly. This appears not to work. There are also some re= ports on the net about this problem. I was able to reproduce the problem wi= th a small C-programm that does the same steps as asio. The relevant sequen= ce of system calls is: kqueue() =3D 3 (0x3) socket(PF_INET,SOCK_STREAM,6) =3D 4 (0x4) setsockopt(0x4,0xffff,0x800,0x7fffffffea2c,0x4) =3D 0 (0x0) kevent(3,{ 4,EVFILT_READ,EV_ADD|EV_CLEAR,0x0,0x0,0x0 4,EVFILT_WRITE,EV_ADD|= EV_CLEAR,0x0,0x0,0x0 },2,0x0,0,0x0) =3D 0 (0x0) setsockopt(0x4,0xffff,0x4,0x7fffffffea2c,0x4) =3D 0 (0x0) bind(4,{ AF_INET 0.0.0.0:8080 },16) =3D 0 (0x0) listen(0x4,0x80) =3D 0 (0x0) ioctl(4,FIONBIO,0xffffea2c) =3D 0 (0x0) kevent(3,{ 4,EVFILT_READ,EV_ADD|EV_CLEAR,0x0,0x0,0x0 4,EVFILT_WRITE,EV_ADD|= EV_CLEAR,0x0,0x0,0x0 },2,0x0,0,0x0) =3D 0 (0x0) kevent(3,0x0,0,0x7fffffffe5a0,32,0x0) ERR#4 'Interrupted system call' The problem here is that asio registers each file descriptor with EVFILT_RE= AD and EVFILT_WRITE as soon as it is opened (first kevent call).=20 After bringing the socket into the listening state and when async_accept() = is called it registers the socket a second time. According to the man page = this is perfectly legal and can be used to modify the registration. With this sequence of calls kevent() does not return when a connection is e= stablished successfully. I tracked down the problem and the reason is in soo_kqfilter(). This is cal= led for the first EVFILT_READ registration and decides based on the SO_ACCE= PTCONN flag which filter operations to use solisten_filtops or soread_filto= ps. In this case it chooses soread_filtops. The second EVFILT_READ registration does not call soo_kqfilter() again, but= just updates the filter from the data and fflags field so the listening so= cket ends up with the wrong filter operations. -----Original Message----- From: Gleb Smirnoff [mailto:glebius@FreeBSD.org]=20 Sent: Wednesday, February 01, 2017 7:08 PM To: Hartmut Brandt Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: Re: svn commit: r313043 - head/sys/kern On Wed, Feb 01, 2017 at 01:12:07PM +0000, Hartmut Brandt wrote: H> Author: harti H> Date: Wed Feb 1 13:12:07 2017 H> New Revision: 313043 H> URL: https://svnweb.freebsd.org/changeset/base/313043 H>=20 H> Log: H> Merge filt_soread and filt_solisten and decide what to do when checkin= g H> for EVFILT_READ at the point of the check not when the event is regist= ers. H> This fixes a problem with asio when accepting a connection. H> =20 H> Reviewed by: kib@, Scott Mitchell This goes into opposite direction with what I am doing: https://reviews.freebsd.org/D9356 Can you please explain the problem with asio when accepting a connection? --=20 Totus tuus, Glebius. --_002_611243783F62AF48AFB07BC25FA4B1061CED9FD9DLREXMBX01intra_ Content-Type: text/plain; name="k.c" Content-Description: k.c Content-Disposition: attachment; filename="k.c"; size=1459; creation-date="Thu, 02 Feb 2017 07:47:39 GMT"; modification-date="Thu, 02 Feb 2017 07:47:39 GMT" Content-Transfer-Encoding: base64 I2luY2x1ZGUgPHN5cy9zb2NrZXQuaD4NCiNpbmNsdWRlIDxzeXMvdHlwZXMuaD4NCiNpbmNsdWRl IDxzeXMvZXZlbnQuaD4NCiNpbmNsdWRlIDxzeXMvZmlsaW8uaD4NCg0KI2luY2x1ZGUgPHN5cy9p b2N0bC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxzdGRpby5oPg0KI2lu Y2x1ZGUgPHN0cmluZy5oPg0KI2luY2x1ZGUgPGVyci5oPg0KDQpzdGF0aWMgdm9pZA0Kd2FpdF9s b29wKGludCBrcSwgaW50IHNvY2spDQp7DQoJc3RydWN0IGtldmVudCBldlszMl07DQoJc3RydWN0 IHNvY2thZGRyX2luIGFkZHI7DQoJc29ja2xlbl90IHNvY2tsZW47DQoNCglmb3IgKDs7KSB7DQoJ CWludCBuZXYgPSBrZXZlbnQoa3EsIE5VTEwsIDAsIGV2LCAzMiwgTlVMTCk7DQoJCWlmIChuZXYg PCAxKQ0KCQkJZXJyKDEsICJrZXZlbnQiKTsNCgkJZm9yIChpbnQgaSA9IDA7IGkgPCBuZXY7ICsr aSkgew0KCQkJaWYgKGV2W2ldLmlkZW50ID09IHNvY2spIHsNCgkJCQlwcmludGYoImFjY2VwdFxu Iik7DQoJCQkJaW50IGZkID0gYWNjZXB0KGV2W2ldLmlkZW50LA0KCQkJCSAgICAoc3RydWN0IHNv Y2thZGRyICopJmFkZHIsICZzb2NrbGVuKTsNCgkJCQlpZiAoZmQgPT0gLTEpDQoJCQkJCWVycigx LCAiYWNjZXB0Iik7DQoJCQl9DQoJCX0NCgl9DQp9DQoNCmludA0KbWFpbigpDQp7DQoJc3RydWN0 IHNvY2thZGRyX2luIGFkZHI7DQoNCgkvKiBvcGVuIGEgVENQIHNvY2tldCAqLw0KCWludCBrcSA9 IGtxdWV1ZSgpOw0KDQoJaW50IHNvY2sgPSBzb2NrZXQoUEZfSU5FVCwgU09DS19TVFJFQU0sIDAp Ow0KDQoJc3RydWN0IGtldmVudCBldlsyXTsNCglFVl9TRVQoJmV2WzBdLCBzb2NrLCBFVkZJTFRf UkVBRCwgRVZfQUREIHwgRVZfQ0xFQVIsIDAsIDAsIE5VTEwpOw0KCUVWX1NFVCgmZXZbMV0sIHNv Y2ssIEVWRklMVF9XUklURSwgRVZfQUREIHwgRVZfQ0xFQVIsIDAsIDAsIE5VTEwpOw0KDQoJaW50 IG9wdCA9IDE7DQoJc2V0c29ja29wdChzb2NrLCBTT0xfU09DS0VULCBTT19OT1NJR1BJUEUsICZv cHQsIHNpemVvZihvcHQpKTsNCg0KCWlmIChrZXZlbnQoa3EsIGV2LCAyLCBOVUxMLCAwLCBOVUxM KSA9PSAtMSkNCgkgICAgZXJyKDEsICJrZXZlbnQiKTsNCg0KCXNldHNvY2tvcHQoc29jaywgU09M X1NPQ0tFVCwgU09fUkVVU0VBRERSLCAmb3B0LCBzaXplb2Yob3B0KSk7DQoNCgltZW1zZXQoJmFk ZHIsIDAsIHNpemVvZihhZGRyKSk7DQoJYWRkci5zaW5fcG9ydCA9IGh0b25zKDEwMDAwKTsNCg0K CWJpbmQoc29jaywgKHN0cnVjdCBzb2NrYWRkciAqKSZhZGRyLCBzaXplb2YoYWRkcikpOw0KCWxp c3Rlbihzb2NrLCAweDgwKTsNCg0KCWlvY3RsKHNvY2ssIEZJT05CSU8sICZvcHQpOw0KDQoJaWYg KGtldmVudChrcSwgZXYsIDIsIE5VTEwsIDAsIE5VTEwpID09IC0xKQ0KCQllcnIoMSwgImtldmVu dCIpOw0KDQoJd2FpdF9sb29wKGtxLCBzb2NrKTsNCn0NCg== --_002_611243783F62AF48AFB07BC25FA4B1061CED9FD9DLREXMBX01intra_-- From owner-svn-src-all@freebsd.org Thu Feb 2 08:43:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 246A8CCD135; Thu, 2 Feb 2017 08:43:20 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from mailhost.dlr.de (mailhost.dlr.de [129.247.252.32]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mailhost.dlr.de", Issuer "DLR CA - G02" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B48F86C; Thu, 2 Feb 2017 08:43:19 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from DLREXHUB01.intra.dlr.de (172.21.152.130) by mailhost.dlr.de (172.21.163.100) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Feb 2017 09:43:11 +0100 Received: from DLREXMBX01.intra.dlr.de ([fe80::d198:77e5:d411:fccd]) by dlrexhub01.intra.dlr.de ([::1]) with mapi id 14.03.0319.002; Thu, 2 Feb 2017 09:43:15 +0100 From: To: CC: , , Subject: RE: svn commit: r313043 - head/sys/kern Thread-Topic: svn commit: r313043 - head/sys/kern Thread-Index: AQHSfIzUaHU0GSnLtUmrDysUntoftKFUWKeAgAEO6VA= Date: Thu, 2 Feb 2017 08:43:14 +0000 Message-ID: <611243783F62AF48AFB07BC25FA4B1061CEDA047@DLREXMBX01.intra.dlr.de> References: <201702011312.v11DC7WJ085025@repo.freebsd.org> <20170201173311.GY84308@strugglingcoder.info> In-Reply-To: <20170201173311.GY84308@strugglingcoder.info> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-11.0.0.4255-8.100.1062-22860.005 X-TM-AS-Result: No--7.948800-5.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 08:43:20 -0000 Sure. Let's settle this a couple of days. harti -----Original Message----- From: hiren panchasara [mailto:hiren@strugglingcoder.info]=20 Sent: Wednesday, February 01, 2017 6:33 PM To: Hartmut Brandt Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: Re: svn commit: r313043 - head/sys/kern On 02/01/17 at 01:12P, Hartmut Brandt wrote: > Author: harti > Date: Wed Feb 1 13:12:07 2017 > New Revision: 313043 > URL: https://svnweb.freebsd.org/changeset/base/313043 >=20 > Log: > Merge filt_soread and filt_solisten and decide what to do when checking > for EVFILT_READ at the point of the check not when the event is registe= rs. > This fixes a problem with asio when accepting a connection. > =20 > Reviewed by: kib@, Scott Mitchell >=20 > Modified: > head/sys/kern/uipc_socket.c Is it possible to MFC this back to 11? Cheers, Hiren From owner-svn-src-all@freebsd.org Thu Feb 2 09:16:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FC77CCDF58; Thu, 2 Feb 2017 09:16:05 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "StartCom Class 2 IV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41863175B; Thu, 2 Feb 2017 09:16:04 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 6198E15D; Thu, 2 Feb 2017 03:15:58 -0600 (CST) Date: Thu, 2 Feb 2017 03:15:57 -0600 From: Mark Linimon To: Peter Jeremy Cc: Alexey Dokuchaev , src-committers , John Baldwin , "svn-src-all@freebsd.org" , Takahashi Yoshihiro , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Warner Losh Subject: Re: svn commit: r312910 - in head: . etc/etc.pc98 etc/rc.d lib/libsysdecode libexec release release/doc release/doc/en_US.ISO8859-1/hardware release/doc/en_US.ISO8859-1/readme release/doc/share/example... Message-ID: <20170202091557.GA6058@lonesome.com> References: <201701280222.v0S2MFSR022477@repo.freebsd.org> <3458844.3oruRKbrzH@ralph.baldwin.cx> <20170201103555.GA79121@zxy.spb.ru> <12386326.7GSpFTXsMZ@ralph.baldwin.cx> <20170201170950.GF79121@zxy.spb.ru> <20170201213956.GA3765@lonesome.com> <20170201232621.GA20035@FreeBSD.org> <20170202070723.GE30074@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170202070723.GE30074@server.rulingia.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 09:16:05 -0000 On Thu, Feb 02, 2017 at 06:07:23PM +1100, Peter Jeremy wrote: > It clearly states to users that their system is unsupported and > explains how they can bypass the check if they know what they are > doing. It also prevents us from making a promise that we have no intention of keeping (e.g., indefinite support). mcl From owner-svn-src-all@freebsd.org Thu Feb 2 09:19:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1975FCCDFFC; Thu, 2 Feb 2017 09:19: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 C735C1906; Thu, 2 Feb 2017 09:19:58 +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 v129Jv6b090404; Thu, 2 Feb 2017 09:19:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v129Jvia090400; Thu, 2 Feb 2017 09:19:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702020919.v129Jvia090400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 2 Feb 2017 09:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313091 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 09:19:59 -0000 Author: adrian Date: Thu Feb 2 09:19:57 2017 New Revision: 313091 URL: https://svnweb.freebsd.org/changeset/base/313091 Log: [ath_hal] [ar9300] initial radar detection glue. * flesh out a "get default DFS parameters" routine * remove the stub that returns NULL * fix up the enable DFS method to do what FreeBSD does - specifically, allow pe_enabled to be set/cleared. This allows the radar pulse reporting code to function, but it doesn't yet do anything useful. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300phy.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Thu Feb 2 06:14:44 2017 (r313090) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Thu Feb 2 09:19:57 2017 (r313091) @@ -1489,6 +1489,7 @@ extern HAL_BOOL ar9300_radar_wait(struc extern struct dfs_pulse * ar9300_get_dfs_radars(struct ath_hal *ah, u_int32_t dfsdomain, int *numradars, struct dfs_bin5pulse **bin5pulses, int *numb5radars, HAL_PHYERR_PARAM *pe); +extern HAL_BOOL ar9300_get_default_dfs_thresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); extern void ar9300_adjust_difs(struct ath_hal *ah, u_int32_t val); extern u_int32_t ar9300_dfs_config_fft(struct ath_hal *ah, HAL_BOOL is_enable); extern void ar9300_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL enable); Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Thu Feb 2 06:14:44 2017 (r313090) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Thu Feb 2 09:19:57 2017 (r313091) @@ -219,7 +219,7 @@ ar9300_attach_freebsd_ops(struct ath_hal /* DFS functions */ ah->ah_enableDfs = ar9300_enable_dfs; ah->ah_getDfsThresh = ar9300_get_dfs_thresh; - ah->ah_getDfsDefaultThresh = ar9300_freebsd_get_dfs_default_thresh; + ah->ah_getDfsDefaultThresh = ar9300_get_default_dfs_thresh; // procradarevent ah->ah_isFastClockEnabled = ar9300_is_fast_clock_enabled; ah->ah_get11nExtBusy = ar9300_get_11n_ext_busy; @@ -696,16 +696,6 @@ ar9300_freebsd_get_mib_cycle_counts(stru return (AH_FALSE); } -HAL_BOOL -ar9300_freebsd_get_dfs_default_thresh(struct ath_hal *ah, - HAL_PHYERR_PARAM *pe) -{ - - /* XXX not yet */ - - return (AH_FALSE); -} - /* * Clear multicast filter by index - from FreeBSD ar5212_recv.c */ Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c Thu Feb 2 06:14:44 2017 (r313090) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c Thu Feb 2 09:19:57 2017 (r313091) @@ -235,7 +235,14 @@ ar9300_enable_dfs(struct ath_hal *ah, HA int reg_writes = 0; val = OS_REG_READ(ah, AR_PHY_RADAR_0); - val |= AR_PHY_RADAR_0_FFT_ENA | AR_PHY_RADAR_0_ENA; + val |= AR_PHY_RADAR_0_FFT_ENA; + + + if (pe->pe_enabled != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_ENA; + val |= SM(pe->pe_enabled, AR_PHY_RADAR_0_ENA); + } + if (pe->pe_firpwr != HAL_PHYERR_PARAM_NOVAL) { val &= ~AR_PHY_RADAR_0_FIRPWR; val |= SM(pe->pe_firpwr, AR_PHY_RADAR_0_FIRPWR); @@ -328,6 +335,7 @@ ar9300_get_dfs_thresh(struct ath_hal *ah pe->pe_height = MS(val, AR_PHY_RADAR_0_HEIGHT); pe->pe_prssi = MS(val, AR_PHY_RADAR_0_PRSSI); pe->pe_inband = MS(val, AR_PHY_RADAR_0_INBAND); + pe->pe_enabled = !! MS(val, AR_PHY_RADAR_0_ENA); val = OS_REG_READ(ah, AR_PHY_RADAR_1); @@ -425,6 +433,23 @@ ar9300_get_dfs_radars( return dfs_radars; } +HAL_BOOL +ar9300_get_default_dfs_thresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ + + pe->pe_firpwr = AR9300_DFS_FIRPWR; + pe->pe_rrssi = AR9300_DFS_RRSSI; + pe->pe_height = AR9300_DFS_HEIGHT; + pe->pe_prssi = AR9300_DFS_PRSSI; + /* see prssi comment above */ + + pe->pe_inband = AR9300_DFS_INBAND; + pe->pe_relpwr = AR9300_DFS_RELPWR; + pe->pe_relstep = AR9300_DFS_RELSTEP; + pe->pe_maxlen = AR9300_DFS_MAXLEN; + return (AH_TRUE); +} + void ar9300_adjust_difs(struct ath_hal *ah, u_int32_t val) { if (val == 0) { Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300phy.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300phy.h Thu Feb 2 06:14:44 2017 (r313090) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300phy.h Thu Feb 2 09:19:57 2017 (r313091) @@ -222,6 +222,7 @@ #define AR_PHY_TIMING5_RSSI_THR1A_ENA (0x1 << 15) /* BB_radar_detection) */ #define AR_PHY_RADAR_0_ENA 0x00000001 /* Enable radar detection */ +#define AR_PHY_RADAR_0_ENA_S 0 #define AR_PHY_RADAR_0_FFT_ENA 0x80000000 /* Enable FFT data */ #define AR_PHY_RADAR_0_INBAND 0x0000003e /* Inband pulse threshold */ #define AR_PHY_RADAR_0_INBAND_S 1 From owner-svn-src-all@freebsd.org Thu Feb 2 13:36:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44AA3CC9BFF; Thu, 2 Feb 2017 13:36:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 056C21760; Thu, 2 Feb 2017 13:36:08 +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 v12Da89S000440; Thu, 2 Feb 2017 13:36:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12Da7vL000435; Thu, 2 Feb 2017 13:36:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702021336.v12Da7vL000435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 13:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313092 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 13:36:09 -0000 Author: kib Date: Thu Feb 2 13:36:07 2017 New Revision: 313092 URL: https://svnweb.freebsd.org/changeset/base/313092 Log: MFC r312428: Refcount tmpfs nodes and mount structures. Modified: stable/10/sys/fs/tmpfs/tmpfs.h stable/10/sys/fs/tmpfs/tmpfs_subr.c stable/10/sys/fs/tmpfs/tmpfs_vfsops.c stable/10/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs.h Thu Feb 2 09:19:57 2017 (r313091) +++ stable/10/sys/fs/tmpfs/tmpfs.h Thu Feb 2 13:36:07 2017 (r313092) @@ -158,9 +158,11 @@ struct tmpfs_node { * Doubly-linked list entry which links all existing nodes for * a single file system. This is provided to ease the removal * of all nodes during the unmount operation, and to support - * the implementation of VOP_VNTOCNP(). + * the implementation of VOP_VNTOCNP(). tn_attached is false + * when the node is removed from list and unlocked. */ LIST_ENTRY(tmpfs_node) tn_entries; /* (m) */ + bool tn_attached; /* (m) */ /* * The node's type. Any of 'VBLK', 'VCHR', 'VDIR', 'VFIFO', @@ -231,6 +233,9 @@ struct tmpfs_node { */ int tn_vpstate; /* (i) */ + /* Transient refcounter on this node. */ + u_int tn_refcount; /* (m) + (i) */ + /* misc data field for different tn_type node */ union { /* Valid when tn_type == VBLK || tn_type == VCHR. */ @@ -358,6 +363,9 @@ struct tmpfs_mount { /* Number of nodes currently that are in use. */ ino_t tm_nodes_inuse; + /* Refcounter on this struct tmpfs_mount. */ + uint64_t tm_refcount; + /* maximum representable file size */ u_int64_t tm_maxfilesize; @@ -402,10 +410,14 @@ struct tmpfs_dir_cursor { * Prototypes for tmpfs_subr.c. */ +void tmpfs_ref_node(struct tmpfs_node *node); +void tmpfs_ref_node_locked(struct tmpfs_node *node); int tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *, enum vtype, uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *, char *, dev_t, struct tmpfs_node **); void tmpfs_free_node(struct tmpfs_mount *, struct tmpfs_node *); +bool tmpfs_free_node_locked(struct tmpfs_mount *, struct tmpfs_node *, bool); +void tmpfs_free_tmp(struct tmpfs_mount *); int tmpfs_alloc_dirent(struct tmpfs_mount *, struct tmpfs_node *, const char *, u_int, struct tmpfs_dirent **); void tmpfs_free_dirent(struct tmpfs_mount *, struct tmpfs_dirent *); Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 09:19:57 2017 (r313091) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 13:36:07 2017 (r313092) @@ -131,6 +131,26 @@ tmpfs_pages_check_avail(struct tmpfs_mou return (1); } +void +tmpfs_ref_node(struct tmpfs_node *node) +{ + + TMPFS_NODE_LOCK(node); + tmpfs_ref_node_locked(node); + TMPFS_NODE_UNLOCK(node); +} + +void +tmpfs_ref_node_locked(struct tmpfs_node *node) +{ + + TMPFS_NODE_ASSERT_LOCKED(node); + KASSERT(node->tn_refcount > 0, ("node %p zero refcount", node)); + KASSERT(node->tn_refcount < UINT_MAX, ("node %p refcount %u", node, + node->tn_refcount)); + node->tn_refcount++; +} + /* * Allocates a new node of type 'type' inside the 'tmp' mount point, with * its owner set to 'uid', its group to 'gid' and its mode set to 'mode', @@ -205,6 +225,7 @@ tmpfs_alloc_node(struct mount *mp, struc nnode->tn_gid = gid; nnode->tn_mode = mode; nnode->tn_id = alloc_unr(tmp->tm_ino_unr); + nnode->tn_refcount = 1; /* Type-specific initialization. */ switch (nnode->tn_type) { @@ -258,7 +279,9 @@ tmpfs_alloc_node(struct mount *mp, struc TMPFS_LOCK(tmp); LIST_INSERT_HEAD(&tmp->tm_nodes_used, nnode, tn_entries); + nnode->tn_attached = true; tmp->tm_nodes_inuse++; + tmp->tm_refcount++; TMPFS_UNLOCK(tmp); *node = nnode; @@ -272,18 +295,40 @@ tmpfs_alloc_node(struct mount *mp, struc void tmpfs_free_node(struct tmpfs_mount *tmp, struct tmpfs_node *node) { + + TMPFS_LOCK(tmp); + TMPFS_NODE_LOCK(node); + if (!tmpfs_free_node_locked(tmp, node, false)) { + TMPFS_NODE_UNLOCK(node); + TMPFS_UNLOCK(tmp); + } +} + +bool +tmpfs_free_node_locked(struct tmpfs_mount *tmp, struct tmpfs_node *node, + bool detach) +{ vm_object_t uobj; + TMPFS_MP_ASSERT_LOCKED(tmp); + TMPFS_NODE_ASSERT_LOCKED(node); + KASSERT(node->tn_refcount > 0, ("node %p refcount zero", node)); + + node->tn_refcount--; + if (node->tn_attached && (detach || node->tn_refcount == 0)) { + MPASS(tmp->tm_nodes_inuse > 0); + tmp->tm_nodes_inuse--; + LIST_REMOVE(node, tn_entries); + node->tn_attached = false; + } + if (node->tn_refcount > 0) + return (false); + #ifdef INVARIANTS - TMPFS_NODE_LOCK(node); MPASS(node->tn_vnode == NULL); MPASS((node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0); - TMPFS_NODE_UNLOCK(node); #endif - - TMPFS_LOCK(tmp); - LIST_REMOVE(node, tn_entries); - tmp->tm_nodes_inuse--; + TMPFS_NODE_UNLOCK(node); TMPFS_UNLOCK(tmp); switch (node->tn_type) { @@ -323,6 +368,9 @@ tmpfs_free_node(struct tmpfs_mount *tmp, free_unr(tmp->tm_ino_unr, node->tn_id); uma_zfree(tmp->tm_node_pool, node); + TMPFS_LOCK(tmp); + tmpfs_free_tmp(tmp); + return (true); } static __inline uint32_t @@ -468,13 +516,16 @@ tmpfs_alloc_vp(struct mount *mp, struct struct vnode **vpp) { struct vnode *vp; + struct tmpfs_mount *tm; vm_object_t object; int error; error = 0; -loop: + tm = VFS_TO_TMPFS(mp); TMPFS_NODE_LOCK(node); -loop1: + tmpfs_ref_node_locked(node); +loop: + TMPFS_NODE_ASSERT_LOCKED(node); if ((vp = node->tn_vnode) != NULL) { MPASS((node->tn_vpstate & TMPFS_VNODE_DOOMED) == 0); VI_LOCK(vp); @@ -494,12 +545,14 @@ loop1: msleep(&node->tn_vnode, TMPFS_NODE_MTX(node), 0, "tmpfsE", 0); } - goto loop1; + goto loop; } TMPFS_NODE_UNLOCK(node); error = vget(vp, lkflag | LK_INTERLOCK, curthread); - if (error == ENOENT) + if (error == ENOENT) { + TMPFS_NODE_LOCK(node); goto loop; + } if (error != 0) { vp = NULL; goto out; @@ -511,6 +564,7 @@ loop1: */ if (node->tn_vnode == NULL || node->tn_vnode != vp) { vput(vp); + TMPFS_NODE_LOCK(node); goto loop; } @@ -532,11 +586,9 @@ loop1: if (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) { node->tn_vpstate |= TMPFS_VNODE_WANT; error = msleep((caddr_t) &node->tn_vpstate, - TMPFS_NODE_MTX(node), PDROP | PCATCH, - "tmpfs_alloc_vp", 0); - if (error) - return error; - + TMPFS_NODE_MTX(node), 0, "tmpfs_alloc_vp", 0); + if (error != 0) + goto out; goto loop; } else node->tn_vpstate |= TMPFS_VNODE_ALLOCATING; @@ -610,16 +662,17 @@ unlock: TMPFS_NODE_UNLOCK(node); out: - *vpp = vp; + if (error == 0) { + *vpp = vp; #ifdef INVARIANTS - if (error == 0) { MPASS(*vpp != NULL && VOP_ISLOCKED(*vpp)); TMPFS_NODE_LOCK(node); MPASS(*vpp == node->tn_vnode); TMPFS_NODE_UNLOCK(node); - } #endif + } + tmpfs_free_node(tm, node); return (error); } Modified: stable/10/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 09:19:57 2017 (r313091) +++ stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 13:36:07 2017 (r313092) @@ -221,6 +221,7 @@ tmpfs_mount(struct mount *mp) mtx_init(&tmp->tm_allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF); tmp->tm_nodes_max = nodes_max; tmp->tm_nodes_inuse = 0; + tmp->tm_refcount = 1; tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : OFF_MAX; LIST_INIT(&tmp->tm_nodes_used); @@ -302,11 +303,35 @@ tmpfs_unmount(struct mount *mp, int mntf TMPFS_LOCK(tmp); while ((node = LIST_FIRST(&tmp->tm_nodes_used)) != NULL) { - TMPFS_UNLOCK(tmp); + TMPFS_NODE_LOCK(node); if (node->tn_type == VDIR) tmpfs_dir_destroy(tmp, node); - tmpfs_free_node(tmp, node); - TMPFS_LOCK(tmp); + if (tmpfs_free_node_locked(tmp, node, true)) + TMPFS_LOCK(tmp); + else + TMPFS_NODE_UNLOCK(node); + } + + mp->mnt_data = NULL; + tmpfs_free_tmp(tmp); + vfs_write_resume(mp, VR_START_WRITE); + + MNT_ILOCK(mp); + mp->mnt_flag &= ~MNT_LOCAL; + MNT_IUNLOCK(mp); + + return (0); +} + +void +tmpfs_free_tmp(struct tmpfs_mount *tmp) +{ + + MPASS(tmp->tm_refcount > 0); + tmp->tm_refcount--; + if (tmp->tm_refcount > 0) { + TMPFS_UNLOCK(tmp); + return; } TMPFS_UNLOCK(tmp); @@ -318,16 +343,7 @@ tmpfs_unmount(struct mount *mp, int mntf MPASS(tmp->tm_pages_used == 0); MPASS(tmp->tm_nodes_inuse == 0); - /* Throw away the tmpfs_mount structure. */ - free(mp->mnt_data, M_TMPFSMNT); - mp->mnt_data = NULL; - vfs_write_resume(mp, VR_START_WRITE); - - MNT_ILOCK(mp); - mp->mnt_flag &= ~MNT_LOCAL; - MNT_IUNLOCK(mp); - - return (0); + free(tmp, M_TMPFSMNT); } static int @@ -345,36 +361,36 @@ static int tmpfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) { - boolean_t found; struct tmpfs_fid *tfhp; struct tmpfs_mount *tmp; struct tmpfs_node *node; + int error; tmp = VFS_TO_TMPFS(mp); tfhp = (struct tmpfs_fid *)fhp; if (tfhp->tf_len != sizeof(struct tmpfs_fid)) - return EINVAL; + return (EINVAL); if (tfhp->tf_id >= tmp->tm_nodes_max) - return EINVAL; - - found = FALSE; + return (EINVAL); TMPFS_LOCK(tmp); LIST_FOREACH(node, &tmp->tm_nodes_used, tn_entries) { if (node->tn_id == tfhp->tf_id && node->tn_gen == tfhp->tf_gen) { - found = TRUE; + tmpfs_ref_node(node); break; } } TMPFS_UNLOCK(tmp); - if (found) - return (tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp)); - - return (EINVAL); + if (node != NULL) { + error = tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp); + tmpfs_free_node(tmp, node); + } else + error = EINVAL; + return (error); } /* ARGSUSED2 */ Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 09:19:57 2017 (r313091) +++ stable/10/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 13:36:07 2017 (r313092) @@ -82,7 +82,8 @@ tmpfs_lookup(struct vop_cachedlookup_arg struct vnode **vpp = v->a_vpp; struct componentname *cnp = v->a_cnp; struct tmpfs_dirent *de; - struct tmpfs_node *dnode; + struct tmpfs_node *dnode, *pnode; + struct tmpfs_mount *tm; int error; dnode = VP_TO_TMPFS_DIR(dvp); @@ -104,8 +105,12 @@ tmpfs_lookup(struct vop_cachedlookup_arg goto out; } if (cnp->cn_flags & ISDOTDOT) { + tm = VFS_TO_TMPFS(dvp->v_mount); + pnode = dnode->tn_dir.tn_parent; + tmpfs_ref_node(pnode); error = vn_vget_ino_gen(dvp, tmpfs_vn_get_ino_alloc, - dnode->tn_dir.tn_parent, cnp->cn_lkflags, vpp); + pnode, cnp->cn_lkflags, vpp); + tmpfs_free_node(tm, pnode); if (error != 0) goto out; } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { From owner-svn-src-all@freebsd.org Thu Feb 2 13:37:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDC33CC9C85; Thu, 2 Feb 2017 13:37:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D0C918CC; Thu, 2 Feb 2017 13:37:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12Db0bn000533; Thu, 2 Feb 2017 13:37:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12Db07T000532; Thu, 2 Feb 2017 13:37:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702021337.v12Db07T000532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 13:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313093 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 13:37:01 -0000 Author: kib Date: Thu Feb 2 13:37:00 2017 New Revision: 313093 URL: https://svnweb.freebsd.org/changeset/base/313093 Log: MFC r312429: VNON nodes cannot exist. Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 13:36:07 2017 (r313092) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 13:37:00 2017 (r313093) @@ -332,11 +332,6 @@ tmpfs_free_node_locked(struct tmpfs_moun TMPFS_UNLOCK(tmp); switch (node->tn_type) { - case VNON: - /* Do not do anything. VNON is provided to let the - * allocation routine clean itself easily by avoiding - * duplicating code in it. */ - /* FALLTHROUGH */ case VBLK: /* FALLTHROUGH */ case VCHR: From owner-svn-src-all@freebsd.org Thu Feb 2 13:38:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C53BCC9D2C; Thu, 2 Feb 2017 13:38:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16FE41A25; Thu, 2 Feb 2017 13:38:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12Dc28m000631; Thu, 2 Feb 2017 13:38:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12Dc2NW000630; Thu, 2 Feb 2017 13:38:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702021338.v12Dc2NW000630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 13:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313094 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 13:38:03 -0000 Author: kib Date: Thu Feb 2 13:38:01 2017 New Revision: 313094 URL: https://svnweb.freebsd.org/changeset/base/313094 Log: MFC r312430: Implement VOP_VPTOCNP() for tmpfs. Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 13:37:00 2017 (r313093) +++ stable/10/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 13:38:01 2017 (r313094) @@ -1402,6 +1402,132 @@ tmpfs_whiteout(struct vop_whiteout_args } } +static int +tmpfs_vptocnp_dir(struct tmpfs_node *tn, struct tmpfs_node *tnp, + struct tmpfs_dirent **pde) +{ + struct tmpfs_dir_cursor dc; + struct tmpfs_dirent *de; + + for (de = tmpfs_dir_first(tnp, &dc); de != NULL; + de = tmpfs_dir_next(tnp, &dc)) { + if (de->td_node == tn) { + *pde = de; + return (0); + } + } + return (ENOENT); +} + +static int +tmpfs_vptocnp_fill(struct vnode *vp, struct tmpfs_node *tn, + struct tmpfs_node *tnp, char *buf, int *buflen, struct vnode **dvp) +{ + struct tmpfs_dirent *de; + int error, i; + + error = vn_vget_ino_gen(vp, tmpfs_vn_get_ino_alloc, tnp, LK_SHARED, + dvp); + if (error != 0) + return (error); + error = tmpfs_vptocnp_dir(tn, tnp, &de); + if (error == 0) { + i = *buflen; + i -= de->td_namelen; + if (i < 0) { + error = ENOMEM; + } else { + bcopy(de->ud.td_name, buf + i, de->td_namelen); + *buflen = i; + } + } + if (error == 0) { + if (vp != *dvp) + VOP_UNLOCK(*dvp, 0); + } else { + if (vp != *dvp) + vput(*dvp); + else + vrele(vp); + } + return (error); +} + +static int +tmpfs_vptocnp(struct vop_vptocnp_args *ap) +{ + struct vnode *vp, **dvp; + struct tmpfs_node *tn, *tnp, *tnp1; + struct tmpfs_dirent *de; + struct tmpfs_mount *tm; + char *buf; + int *buflen; + int error; + + vp = ap->a_vp; + dvp = ap->a_vpp; + buf = ap->a_buf; + buflen = ap->a_buflen; + + tm = VFS_TO_TMPFS(vp->v_mount); + tn = VP_TO_TMPFS_NODE(vp); + if (tn->tn_type == VDIR) { + tnp = tn->tn_dir.tn_parent; + if (tnp == NULL) + return (ENOENT); + tmpfs_ref_node(tnp); + error = tmpfs_vptocnp_fill(vp, tn, tn->tn_dir.tn_parent, buf, + buflen, dvp); + tmpfs_free_node(tm, tnp); + return (error); + } +restart: + TMPFS_LOCK(tm); + LIST_FOREACH_SAFE(tnp, &tm->tm_nodes_used, tn_entries, tnp1) { + if (tnp->tn_type != VDIR) + continue; + TMPFS_NODE_LOCK(tnp); + tmpfs_ref_node_locked(tnp); + + /* + * tn_vnode cannot be instantiated while we hold the + * node lock, so the directory cannot be changed while + * we iterate over it. Do this to avoid instantiating + * vnode for directories which cannot point to our + * node. + */ + error = tnp->tn_vnode == NULL ? tmpfs_vptocnp_dir(tn, tnp, + &de) : 0; + + if (error == 0) { + TMPFS_NODE_UNLOCK(tnp); + TMPFS_UNLOCK(tm); + error = tmpfs_vptocnp_fill(vp, tn, tnp, buf, buflen, + dvp); + if (error == 0) { + tmpfs_free_node(tm, tnp); + return (0); + } + if ((vp->v_iflag & VI_DOOMED) != 0) { + tmpfs_free_node(tm, tnp); + return (ENOENT); + } + TMPFS_LOCK(tm); + TMPFS_NODE_LOCK(tnp); + } + if (tmpfs_free_node_locked(tm, tnp, false)) { + goto restart; + } else { + KASSERT(tnp->tn_refcount > 0, + ("node %p refcount zero", tnp)); + tnp1 = LIST_NEXT(tnp, tn_entries); + TMPFS_NODE_UNLOCK(tnp); + } + } + TMPFS_UNLOCK(tm); + return (ENOENT); +} + /* * Vnode operations vector used for files stored in a tmpfs file system. */ @@ -1434,5 +1560,6 @@ struct vop_vector tmpfs_vnodeop_entries .vop_vptofh = tmpfs_vptofh, .vop_whiteout = tmpfs_whiteout, .vop_bmap = VOP_EOPNOTSUPP, + .vop_vptocnp = tmpfs_vptocnp, }; From owner-svn-src-all@freebsd.org Thu Feb 2 13:39:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A86C4CC9DD1; Thu, 2 Feb 2017 13:39:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82FF21BBB; Thu, 2 Feb 2017 13:39:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12DdBf6000733; Thu, 2 Feb 2017 13:39:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12DdBnC000728; Thu, 2 Feb 2017 13:39:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702021339.v12DdBnC000728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 13:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313095 - stable/10/sys/fs/tmpfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 13:39:12 -0000 Author: kib Date: Thu Feb 2 13:39:11 2017 New Revision: 313095 URL: https://svnweb.freebsd.org/changeset/base/313095 Log: MFC r312432: Add a mount option for tmpfs(5) to not use namecache. Modified: stable/10/sys/fs/tmpfs/tmpfs.h stable/10/sys/fs/tmpfs/tmpfs_subr.c stable/10/sys/fs/tmpfs/tmpfs_vfsops.c stable/10/sys/fs/tmpfs/tmpfs_vnops.c stable/10/sys/fs/tmpfs/tmpfs_vnops.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs.h Thu Feb 2 13:38:01 2017 (r313094) +++ stable/10/sys/fs/tmpfs/tmpfs.h Thu Feb 2 13:39:11 2017 (r313095) @@ -383,7 +383,9 @@ struct tmpfs_mount { uma_zone_t tm_node_pool; /* Read-only status. */ - int tm_ronly; + bool tm_ronly; + /* Do not use namecache. */ + bool tm_nonc; }; #define TMPFS_LOCK(tm) mtx_lock(&(tm)->tm_allnode_lock) #define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->tm_allnode_lock) @@ -528,4 +530,11 @@ VP_TO_TMPFS_DIR(struct vnode *vp) return (node); } +static inline bool +tmpfs_use_nc(struct vnode *vp) +{ + + return (!(VFS_TO_TMPFS(vp->v_mount)->tm_nonc)); +} + #endif /* _FS_TMPFS_TMPFS_H_ */ Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 13:38:01 2017 (r313094) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Thu Feb 2 13:39:11 2017 (r313095) @@ -591,7 +591,8 @@ loop: TMPFS_NODE_UNLOCK(node); /* Get a new vnode and associate it with our node. */ - error = getnewvnode("tmpfs", mp, &tmpfs_vnodeop_entries, &vp); + error = getnewvnode("tmpfs", mp, VFS_TO_TMPFS(mp)->tm_nonc ? + &tmpfs_vnodeop_nonc_entries : &tmpfs_vnodeop_entries, &vp); if (error != 0) goto unlock; MPASS(vp != NULL); Modified: stable/10/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 13:38:01 2017 (r313094) +++ stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Thu Feb 2 13:39:11 2017 (r313095) @@ -78,7 +78,7 @@ static int tmpfs_statfs(struct mount *, static const char *tmpfs_opts[] = { "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export", - "union", NULL + "union", "nonc", NULL }; static const char *tmpfs_updateopts[] = { @@ -137,6 +137,7 @@ tmpfs_mount(struct mount *mp) struct tmpfs_node *root; struct thread *td = curthread; int error; + bool nonc; /* Size counters. */ u_quad_t pages; off_t nodes_max, size_max, maxfilesize; @@ -185,6 +186,7 @@ tmpfs_mount(struct mount *mp) size_max = 0; if (vfs_getopt_size(mp->mnt_optnew, "maxfilesize", &maxfilesize) != 0) maxfilesize = 0; + nonc = vfs_getopt(mp->mnt_optnew, "nonc", NULL, NULL) == 0; /* Do not allow mounts if we do not have enough memory to preserve * the minimum reserved pages. */ @@ -235,6 +237,7 @@ tmpfs_mount(struct mount *mp) sizeof(struct tmpfs_node), tmpfs_node_ctor, tmpfs_node_dtor, tmpfs_node_init, tmpfs_node_fini, UMA_ALIGN_PTR, 0); tmp->tm_ronly = (mp->mnt_flag & MNT_RDONLY) != 0; + tmp->tm_nonc = nonc; /* Allocate the root node. */ error = tmpfs_alloc_node(mp, tmp, VDIR, root_uid, root_gid, Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 13:38:01 2017 (r313094) +++ stable/10/sys/fs/tmpfs/tmpfs_vnops.c Thu Feb 2 13:39:11 2017 (r313095) @@ -76,11 +76,8 @@ tmpfs_vn_get_ino_alloc(struct mount *mp, } static int -tmpfs_lookup(struct vop_cachedlookup_args *v) +tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) { - struct vnode *dvp = v->a_dvp; - struct vnode **vpp = v->a_vpp; - struct componentname *cnp = v->a_cnp; struct tmpfs_dirent *de; struct tmpfs_node *dnode, *pnode; struct tmpfs_mount *tm; @@ -213,7 +210,7 @@ tmpfs_lookup(struct vop_cachedlookup_arg * request was for creation, as it does not improve timings on * emprical tests. */ - if ((cnp->cn_flags & MAKEENTRY) != 0) + if ((cnp->cn_flags & MAKEENTRY) != 0 && tmpfs_use_nc(dvp)) cache_enter(dvp, *vpp, cnp); out: @@ -227,6 +224,20 @@ out: } static int +tmpfs_cached_lookup(struct vop_cachedlookup_args *v) +{ + + return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp)); +} + +static int +tmpfs_lookup(struct vop_lookup_args *v) +{ + + return (tmpfs_lookup1(v->a_dvp, v->a_vpp, v->a_cnp)); +} + +static int tmpfs_create(struct vop_create_args *v) { struct vnode *dvp = v->a_dvp; @@ -238,7 +249,7 @@ tmpfs_create(struct vop_create_args *v) MPASS(vap->va_type == VREG || vap->va_type == VSOCK); error = tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); - if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0) + if (error == 0 && (cnp->cn_flags & MAKEENTRY) != 0 && tmpfs_use_nc(dvp)) cache_enter(dvp, *vpp, cnp); return (error); } @@ -1009,10 +1020,12 @@ tmpfs_rename(struct vop_rename_args *v) tmpfs_dir_attach(tdvp, de); - cache_purge(fvp); - if (tvp != NULL) - cache_purge(tvp); - cache_purge_negative(tdvp); + if (tmpfs_use_nc(fvp)) { + cache_purge(fvp); + if (tvp != NULL) + cache_purge(tvp); + cache_purge_negative(tdvp); + } error = 0; @@ -1125,8 +1138,10 @@ tmpfs_rmdir(struct vop_rmdir_args *v) TMPFS_NODE_MODIFIED; TMPFS_NODE_UNLOCK(dnode); - cache_purge(dvp); - cache_purge(vp); + if (tmpfs_use_nc(dvp)) { + cache_purge(dvp); + cache_purge(vp); + } /* Free the directory entry we just deleted. Note that the node * referred by it will not be removed until the vnode is really @@ -1270,7 +1285,8 @@ tmpfs_reclaim(struct vop_reclaim_args *v else vnode_destroy_vobject(vp); vp->v_object = NULL; - cache_purge(vp); + if (tmpfs_use_nc(vp)) + cache_purge(vp); TMPFS_NODE_LOCK(node); tmpfs_free_vp(vp); @@ -1534,7 +1550,7 @@ restart: struct vop_vector tmpfs_vnodeop_entries = { .vop_default = &default_vnodeops, .vop_lookup = vfs_cache_lookup, - .vop_cachedlookup = tmpfs_lookup, + .vop_cachedlookup = tmpfs_cached_lookup, .vop_create = tmpfs_create, .vop_mknod = tmpfs_mknod, .vop_open = tmpfs_open, @@ -1563,3 +1579,10 @@ struct vop_vector tmpfs_vnodeop_entries .vop_vptocnp = tmpfs_vptocnp, }; +/* + * Same vector for mounts which do not use namecache. + */ +struct vop_vector tmpfs_vnodeop_nonc_entries = { + .vop_default = &tmpfs_vnodeop_entries, + .vop_lookup = tmpfs_lookup, +}; Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.h ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vnops.h Thu Feb 2 13:38:01 2017 (r313094) +++ stable/10/sys/fs/tmpfs/tmpfs_vnops.h Thu Feb 2 13:39:11 2017 (r313095) @@ -44,6 +44,7 @@ */ extern struct vop_vector tmpfs_vnodeop_entries; +extern struct vop_vector tmpfs_vnodeop_nonc_entries; vop_access_t tmpfs_access; vop_getattr_t tmpfs_getattr; From owner-svn-src-all@freebsd.org Thu Feb 2 13:40:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37409CC9EB0; Thu, 2 Feb 2017 13:40:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04C121E4F; Thu, 2 Feb 2017 13:40:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12DecRU000872; Thu, 2 Feb 2017 13:40:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12DecPP000871; Thu, 2 Feb 2017 13:40:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702021340.v12DecPP000871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 13:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313096 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 13:40:39 -0000 Author: kib Date: Thu Feb 2 13:40:37 2017 New Revision: 313096 URL: https://svnweb.freebsd.org/changeset/base/313096 Log: MFC r312649: Document mount option "nonc" for tmpfs. Modified: stable/10/share/man/man5/tmpfs.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/tmpfs.5 ============================================================================== --- stable/10/share/man/man5/tmpfs.5 Thu Feb 2 13:39:11 2017 (r313095) +++ stable/10/share/man/man5/tmpfs.5 Thu Feb 2 13:40:37 2017 (r313096) @@ -54,7 +54,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2017 +.Dd January 20, 2017 .Dt TMPFS 5 .Os .Sh NAME @@ -120,6 +120,10 @@ Defaults to the mount point's UID. .It Cm mode Specifies the mode (in octal notation) of the root inode of the file system. Defaults to the mount point's mode. +.It Cm nonc +Do not use namecache to resolve names to files for the created mount. +This saves memory, but currently might impair scalability for highly +used mounts on large machines. .It Cm inodes Specifies the maximum number of nodes available to the file system. If not specified, the file system chooses a reasonable maximum based on From owner-svn-src-all@freebsd.org Thu Feb 2 17:29:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F475CCD3F4; Thu, 2 Feb 2017 17:29:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3439772; Thu, 2 Feb 2017 17:29:16 +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 v12HTGIk095210; Thu, 2 Feb 2017 17:29:16 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12HTGuX095209; Thu, 2 Feb 2017 17:29:16 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702021729.v12HTGuX095209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 2 Feb 2017 17:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313097 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 17:29:17 -0000 Author: jhb Date: Thu Feb 2 17:29:15 2017 New Revision: 313097 URL: https://svnweb.freebsd.org/changeset/base/313097 Log: Require Data Layer Active reporting for native PCI-e HotPlug. Some PCI-e bridges report that they support HotPlug in the slot capabilities but do not report support for Data Layer Active events in the link capabilities register. These bridges do not work correctly when HotPlug is used. Further, while the description of HotPlug in the spec does not mention that DL active events are required, the description of the link capabilities register says that DL active is required for HotPlug. Thanks to Dave Baukus for finding that language in the spec. PR: 211699 Submitted by: Dave Baukus Reviewed by: vangyzen MFC after: 3 days Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Thu Feb 2 13:40:37 2017 (r313096) +++ head/sys/dev/pci/pci_pci.c Thu Feb 2 17:29:15 2017 (r313097) @@ -935,6 +935,8 @@ pcib_probe_hotplug(struct pcib_softc *sc if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_HPC) == 0) return; + if ((sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) == 0) + return; /* * Some devices report that they have an MRL when they actually From owner-svn-src-all@freebsd.org Thu Feb 2 17:43:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B184ECCD8ED; Thu, 2 Feb 2017 17:43:01 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80DA110A9; Thu, 2 Feb 2017 17:43:01 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12Hh0fv003257; Thu, 2 Feb 2017 17:43:00 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12Hh0ft003256; Thu, 2 Feb 2017 17:43:00 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201702021743.v12Hh0ft003256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Thu, 2 Feb 2017 17:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313098 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 17:43:01 -0000 Author: lidl Date: Thu Feb 2 17:43:00 2017 New Revision: 313098 URL: https://svnweb.freebsd.org/changeset/base/313098 Log: Fix compilation for mips64 platforms The hwpmc_mips24k / hwpmc_mips74k modules are only for mips 32-bit hosts. Reviewed by: adrian Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Feb 2 17:29:15 2017 (r313097) +++ head/sys/modules/Makefile Thu Feb 2 17:43:00 2017 (r313098) @@ -522,7 +522,7 @@ _cxgbe= cxgbe SUBDIR+= zfs .endif -.if ${MACHINE_CPUARCH} == "mips" +.if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") _hwpmc_mips24k= hwpmc_mips24k _hwpmc_mips74k= hwpmc_mips74k .endif From owner-svn-src-all@freebsd.org Thu Feb 2 17:44:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDECACCD9A6; Thu, 2 Feb 2017 17:44:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D9E8122D; Thu, 2 Feb 2017 17:44:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12Hit5k003403; Thu, 2 Feb 2017 17:44:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12Hit3U003402; Thu, 2 Feb 2017 17:44:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201702021744.v12Hit3U003402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 2 Feb 2017 17:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313099 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 17:44:56 -0000 Author: trasz Date: Thu Feb 2 17:44:55 2017 New Revision: 313099 URL: https://svnweb.freebsd.org/changeset/base/313099 Log: Ifdef out the unused vm_rr_selectdomain(). MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/vm/vm_phys.c Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Thu Feb 2 17:43:00 2017 (r313098) +++ head/sys/vm/vm_phys.c Thu Feb 2 17:44:55 2017 (r313099) @@ -270,6 +270,7 @@ vm_phys_fictitious_cmp(struct vm_phys_fi (uintmax_t)p1->end, (uintmax_t)p2->start, (uintmax_t)p2->end); } +#ifdef notyet static __inline int vm_rr_selectdomain(void) { @@ -285,6 +286,7 @@ vm_rr_selectdomain(void) return (0); #endif } +#endif /* notyet */ /* * Initialise a VM domain iterator. From owner-svn-src-all@freebsd.org Thu Feb 2 18:14:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2206ACCE4B3; Thu, 2 Feb 2017 18:14:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 60BE0D54; Thu, 2 Feb 2017 18:14:24 +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 mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 67EE910481BA; Fri, 3 Feb 2017 05:14:16 +1100 (AEDT) Date: Fri, 3 Feb 2017 05:14:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mateusz Guzik cc: Bruce Evans , Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312975 - head/sys/i386/include In-Reply-To: <20170202014204.GA992@dft-labs.eu> Message-ID: <20170203040751.I2354@besplex.bde.org> References: <201701300224.v0U2Osj1010421@repo.freebsd.org> <20170130142123.V953@besplex.bde.org> <20170201214349.H1136@besplex.bde.org> <20170202014204.GA992@dft-labs.eu> 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=ZHXAibqBrz8wDKC0GT4A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 18:14:25 -0000 On Thu, 2 Feb 2017, Mateusz Guzik wrote: > On Wed, Feb 01, 2017 at 10:12:57PM +1100, Bruce Evans wrote: >> On Mon, 30 Jan 2017, Bruce Evans wrote: >> >>> On Mon, 30 Jan 2017, Mateusz Guzik wrote: >>> >>>> Log: >>>> i386: add atomic_fcmpset >>>> >>>> Tested by: pho >>> >>> This is has some bugs and style bugs. >> >> This is still broken. The invalid asm breaks building at least atomic.o >> with gcc-4.2.1. >> >> Tested fix: >> ... > > Uh, I ended up with the same fix. Committed in r313080. Thanks. > Sorry for breakage in the first place. > >> The semantics of fcmpset seem to be undocumented. On x86, *expect is >> updated non-atomically by a store in the output parameter. I think >> cmpxchg updates the "a" register atomically, but then the output >> parameter causes this to be stored non-atomically to *expect. A better >> API would somehow return the "a" register and let the caller store it >> if it wants. Ordinary cmpset can be built on this by not storing, and >> the caller can do the store atomically to a different place if *expect >> is too volatile to be atomic. >> > > The primitive was modeled after atomic_compare_exchange_* from c11 > atomics. I don't see what's the benefit of storing the result > separately. > > As it is, the primitive fits nicely into loops like "inc not zero". > > Like this: > r = *counter; > for (;;) { > if (r == 0) > break; > if (atomic_fcmpset_int(counter, &r, r + 1)) > break; > // r we can loop back to re-test r > } You won't want to ifdef this for SMP, so the i386 implementation has further bugs like I expected (fcmpset is not implemented in the CPU_DISABLE_CMPXCHG case). >> Maybe just decouple the input parameter from the output parameter. The >> following works right (for an amd64 API): >> >> Y static __inline int >> Y atomic_xfcmpset_long(volatile u_long *dst, u_long *expect_out, u_long expect_in, >> Y u_long src) The output parameter is not well named in this or in fcmpset, since when the comparison fails it holds the compared copy of *dst, not of *expect_in, and otherwise it is not useful and holds a copy of src. >> If the caller doesn't want to use *expect_out, it passes a pointer to an >> unused local variable. The compiler can then optimize away the store >> since it is not hidden in the asm. > > _fcmpset is specifically for callers who want the value back. Ones which > don't can use the _cmpset variant. The main caller of _xfcmpset would be the _cmpset variantL static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_int dummy __unused; return (atomic_xfcmpset_int(dst, &dummy, expect, src)); } Actually, _cmpset can be built out of _fcmpset even more easily: static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { return (atomic_fcmpset_int(dst, &expect, src)); } This has to be a function since a macro would expose *&expect to clobbering. Bruce From owner-svn-src-all@freebsd.org Thu Feb 2 18:27:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77244CCE6D9; Thu, 2 Feb 2017 18:27:22 +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 51B4E14D6; Thu, 2 Feb 2017 18:27:22 +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 v12IRLR3020425; Thu, 2 Feb 2017 18:27:21 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12IRKxC020418; Thu, 2 Feb 2017 18:27:20 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702021827.v12IRKxC020418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 2 Feb 2017 18:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313100 - in stable/11: sbin/dhclient sys/dev/mpr usr.bin/chat usr.bin/rpcgen usr.bin/tail usr.sbin/diskinfo X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 18:27:22 -0000 Author: asomers Date: Thu Feb 2 18:27:20 2017 New Revision: 313100 URL: https://svnweb.freebsd.org/changeset/base/313100 Log: MFC r311160, r311210, r311288, r311292, r311298, r311340 r311160: misc minor fixes in mpr(4) sys/dev/mpr/mpr_sas.c * Fix a potential null pointer dereference (CID 1305731) * Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID 1211934) sys/dev/mpr/mpr_sas_lsi.c * Nullify a dangling pointer in mprsas_get_sata_identify * Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935) Reported by: Coverity (partially) CID: 1305731 1211934 1211935 Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8880 r311210: Quell Coverity for diskinfo(8) * CID 1198994: Don't run the speed disk on a disk with no sectors * CID 1011442: Don't call close(2) if open(2) fails * CID 1011161: Use snprintf instead of sprintf * CID 1009825: Check the return value of lseek Reported by: Coverity CID: 1198994 1011442 1011161 1009825 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311288: Delete dead code in chat(8) It's always been dead, ever since first import in 1994. It's still dead in OpenBSD's version, too. Reported by: Coverity CID: 270586 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311292: Remove dead code in rpc_parse.c It's been dead ever since it was imported from TI-RPC in 1995. The dead code is still present in Illumos today, but was removed from NetBSD in 2006. Reported by: Coverity CID: 270097 Obtained from: NetBSD MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311298: Remove dead code in dhclient(8) The offending code has been dead ever since the import from OpenBSD in r195805. OpenBSD later deleted that entire function. Reported by: Coverity CID: 500059 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311340: Misc Coverity fixes for tail(1) CID 1006402: Initialize stack variable CID 271580: Don't leak memory when ENOMEM. Reported by: Coverity CID: 271580 1006402 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: stable/11/sbin/dhclient/dispatch.c stable/11/sys/dev/mpr/mpr_sas.c stable/11/sys/dev/mpr/mpr_sas_lsi.c stable/11/usr.bin/chat/chat.c stable/11/usr.bin/rpcgen/rpc_parse.c stable/11/usr.bin/tail/reverse.c stable/11/usr.sbin/diskinfo/diskinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/dhclient/dispatch.c ============================================================================== --- stable/11/sbin/dhclient/dispatch.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/sbin/dhclient/dispatch.c Thu Feb 2 18:27:20 2017 (r313100) @@ -453,16 +453,12 @@ add_protocol(char *name, int fd, void (* void remove_protocol(struct protocol *proto) { - struct protocol *p, *next, *prev; + struct protocol *p, *next; - prev = NULL; for (p = protocols; p; p = next) { next = p->next; if (p == proto) { - if (prev) - prev->next = p->next; - else - protocols = p->next; + protocols = p->next; free(p); } } Modified: stable/11/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/11/sys/dev/mpr/mpr_sas.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/sys/dev/mpr/mpr_sas.c Thu Feb 2 18:27:20 2017 (r313100) @@ -1846,8 +1846,12 @@ mprsas_action_scsiio(struct mprsas_softc if (csio->ccb_h.flags & CAM_CDB_POINTER) bcopy(csio->cdb_io.cdb_ptr, &req->CDB.CDB32[0], csio->cdb_len); - else + else { + KASSERT(csio->cdb_len <= IOCDBLEN, + ("cdb_len %d is greater than IOCDBLEN but CAM_CDB_POINTER is not set", + csio->cdb_len)); bcopy(csio->cdb_io.cdb_bytes, &req->CDB.CDB32[0],csio->cdb_len); + } req->IoFlags = htole16(csio->cdb_len); /* @@ -2429,6 +2433,7 @@ mprsas_scsiio_complete(struct mpr_softc * driver is being shutdown. */ if ((csio->cdb_io.cdb_bytes[0] == INQUIRY) && + (csio->data_ptr != NULL) && ((csio->data_ptr[0] & 0x1f) == T_DIRECT) && (sc->mapping_table[target_id].device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE) && Modified: stable/11/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- stable/11/sys/dev/mpr/mpr_sas_lsi.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/sys/dev/mpr/mpr_sas_lsi.c Thu Feb 2 18:27:20 2017 (r313100) @@ -1056,6 +1056,7 @@ out: mpr_free_command(sc, cm); else if (error == 0) error = EWOULDBLOCK; + cm->cm_data = NULL; free(buffer, M_MPR); return (error); } @@ -1196,18 +1197,18 @@ mprsas_SSU_to_SATA_devices(struct mpr_so continue; } - ccb = xpt_alloc_ccb_nowait(); - if (ccb == NULL) { - mpr_dprint(sc, MPR_FAULT, "Unable to alloc CCB to stop " - "unit.\n"); - return; - } - /* * The stop_at_shutdown flag will be set if this device is * a SATA direct-access end device. */ if (target->stop_at_shutdown) { + ccb = xpt_alloc_ccb_nowait(); + if (ccb == NULL) { + mpr_dprint(sc, MPR_FAULT, "Unable to alloc CCB to stop " + "unit.\n"); + return; + } + if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, pathid, targetid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { Modified: stable/11/usr.bin/chat/chat.c ============================================================================== --- stable/11/usr.bin/chat/chat.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/usr.bin/chat/chat.c Thu Feb 2 18:27:20 2017 (r313100) @@ -1173,7 +1173,7 @@ int get_string(char *string) { char temp[STR_LEN]; - int c, printed = 0; + int c; size_t len, minlen; char *s = temp, *end = s + STR_LEN; char *logged = temp; @@ -1306,13 +1306,6 @@ get_string(char *string) alarm(0); - if (verbose && printed) { - if (alarmed) - chat_logf(" -- read timed out"); - else - chat_logf(" -- read failed: %m"); - } - exit_code = 3; alarmed = 0; return (0); Modified: stable/11/usr.bin/rpcgen/rpc_parse.c ============================================================================== --- stable/11/usr.bin/rpcgen/rpc_parse.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/usr.bin/rpcgen/rpc_parse.c Thu Feb 2 18:27:20 2017 (r313100) @@ -290,7 +290,6 @@ def_union(definition *defp) declaration dec; case_list *cases; case_list **tailp; - int flag; defp->def_kind = DEF_UNION; scan(TOK_IDENT, &tok); @@ -309,7 +308,6 @@ def_union(definition *defp) cases->case_name = tok.str; scan(TOK_COLON, &tok); /* now peek at next token */ - flag = 0; if (peekscan(TOK_CASE, &tok)){ do { scan2(TOK_IDENT, TOK_CHARCONST, &tok); @@ -322,14 +320,6 @@ def_union(definition *defp) scan(TOK_COLON, &tok); } while (peekscan(TOK_CASE, &tok)); } - else - if (flag) - { - - *tailp = cases; - tailp = &cases->next; - cases = XALLOC(case_list); - } get_declaration(&dec, DEF_UNION); cases->case_decl = dec; Modified: stable/11/usr.bin/tail/reverse.c ============================================================================== --- stable/11/usr.bin/tail/reverse.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/usr.bin/tail/reverse.c Thu Feb 2 18:27:20 2017 (r313100) @@ -117,6 +117,7 @@ r_reg(FILE *fp, const char *fn, enum STY map.start = NULL; map.mapoff = map.maxoff = size; map.fd = fileno(fp); + map.maplen = 0; /* * Last char is special, ignore whether newline or not. Note that @@ -205,7 +206,13 @@ r_buf(FILE *fp, const char *fn) (tl->l = malloc(BSZ)) == NULL) { if (!mark) err(1, "malloc"); - tl = enomem ? tl->next : mark; + if (enomem) + tl = tl->next; + else { + if (tl) + free(tl); + tl = mark; + } enomem += tl->len; } else if (mark) { tl->next = mark; Modified: stable/11/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- stable/11/usr.sbin/diskinfo/diskinfo.c Thu Feb 2 17:44:55 2017 (r313099) +++ stable/11/usr.sbin/diskinfo/diskinfo.c Thu Feb 2 18:27:20 2017 (r313100) @@ -94,13 +94,12 @@ main(int argc, char **argv) for (i = 0; i < argc; i++) { fd = open(argv[i], O_RDONLY); if (fd < 0 && errno == ENOENT && *argv[i] != '/') { - sprintf(buf, "%s%s", _PATH_DEV, argv[i]); + snprintf(buf, BUFSIZ, "%s%s", _PATH_DEV, argv[i]); fd = open(buf, O_RDONLY); } if (fd < 0) { warn("%s", argv[i]); - exitval = 1; - goto out; + exit(1); } error = ioctl(fd, DIOCGMEDIASIZE, &mediasize); if (error) { @@ -186,7 +185,8 @@ rdsect(int fd, off_t blockno, u_int sect { int error; - lseek(fd, (off_t)blockno * sectorsize, SEEK_SET); + if (lseek(fd, (off_t)blockno * sectorsize, SEEK_SET) == -1) + err(1, "lseek"); error = read(fd, sector, sectorsize); if (error == -1) err(1, "read"); @@ -251,6 +251,9 @@ speeddisk(int fd, off_t mediasize, u_int off_t b0, b1, sectorcount, step; sectorcount = mediasize / sectorsize; + if (sectorcount <= 0) + return; /* Can't test devices with no sectors */ + step = 1ULL << (flsll(sectorcount / (4 * 200)) - 1); if (step > 16384) step = 16384; From owner-svn-src-all@freebsd.org Thu Feb 2 18:43:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18EDDCCEA90; Thu, 2 Feb 2017 18:43:28 +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 A402267; Thu, 2 Feb 2017 18:43:27 +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 v12IhLN1023558 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Feb 2017 20:43:22 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v12IhLN1023558 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v12IhLZf023557; Thu, 2 Feb 2017 20:43:21 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 2 Feb 2017 20:43:21 +0200 From: Konstantin Belousov To: Bruce Evans Cc: Mateusz Guzik , Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312975 - head/sys/i386/include Message-ID: <20170202184321.GO2092@kib.kiev.ua> References: <201701300224.v0U2Osj1010421@repo.freebsd.org> <20170130142123.V953@besplex.bde.org> <20170201214349.H1136@besplex.bde.org> <20170202014204.GA992@dft-labs.eu> <20170203040751.I2354@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170203040751.I2354@besplex.bde.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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 18:43:28 -0000 On Fri, Feb 03, 2017 at 05:14:15AM +1100, Bruce Evans wrote: > You won't want to ifdef this for SMP, so the i386 implementation has > further bugs like I expected (fcmpset is not implemented in the > CPU_DISABLE_CMPXCHG case). I think it is time to remove the option. It certainly outlived it usefulness: ... VmWare 3.x seems to emulate this instruction poorly, causing the guest OS to run very slowly. This problem appears to be fixed in VmWare 4.x, at least in version 4.5.2 ... From owner-svn-src-all@freebsd.org Thu Feb 2 18:48:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E9EBCCEB18; Thu, 2 Feb 2017 18:48:24 +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 9DC50262; Thu, 2 Feb 2017 18:48:23 +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 v12ImJrL024816 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Feb 2017 20:48:19 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v12ImJrL024816 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v12ImJUj024815; Thu, 2 Feb 2017 20:48:19 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 2 Feb 2017 20:48:19 +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: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern Message-ID: <20170202184819.GP2092@kib.kiev.ua> References: <201701310326.v0V3QW30024375@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201701310326.v0V3QW30024375@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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 18:48:24 -0000 On Tue, Jan 31, 2017 at 03:26:32AM +0000, Conrad E. Meyer wrote: > + compile-with "${CC} -c ${CFLAGS:N-nostdinc} ${WERROR} ${PROF} -msse4 ${.IMPSRC}" \ BTW, new gcc has -mcrc32 option, but clang 3.9.1 apparently does not. From owner-svn-src-all@freebsd.org Thu Feb 2 19:22:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B531CCD4B9; Thu, 2 Feb 2017 19:22:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABF8D16C1; Thu, 2 Feb 2017 19:22:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12JMRO3044726; Thu, 2 Feb 2017 19:22:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12JMRUF044718; Thu, 2 Feb 2017 19:22:27 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201702021922.v12JMRUF044718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 2 Feb 2017 19:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313101 - in vendor/byacc/dist: . package package/debian package/pkgsrc test test/btyacc test/yacc X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 19:22:29 -0000 Author: jkim Date: Thu Feb 2 19:22:26 2017 New Revision: 313101 URL: https://svnweb.freebsd.org/changeset/base/313101 Log: Import byacc 20170201. Added: vendor/byacc/dist/test/btyacc/expr.oxout.error vendor/byacc/dist/test/btyacc/expr.oxout.output vendor/byacc/dist/test/btyacc/expr.oxout.tab.c (contents, props changed) vendor/byacc/dist/test/btyacc/expr.oxout.tab.h (contents, props changed) vendor/byacc/dist/test/expr.oxout.y vendor/byacc/dist/test/yacc/expr.oxout.error vendor/byacc/dist/test/yacc/expr.oxout.output vendor/byacc/dist/test/yacc/expr.oxout.tab.c (contents, props changed) vendor/byacc/dist/test/yacc/expr.oxout.tab.h (contents, props changed) Modified: vendor/byacc/dist/CHANGES vendor/byacc/dist/MANIFEST vendor/byacc/dist/VERSION vendor/byacc/dist/aclocal.m4 vendor/byacc/dist/config.guess vendor/byacc/dist/config.sub vendor/byacc/dist/configure vendor/byacc/dist/defs.h vendor/byacc/dist/main.c vendor/byacc/dist/package/byacc.spec vendor/byacc/dist/package/debian/changelog vendor/byacc/dist/package/debian/copyright vendor/byacc/dist/package/mingw-byacc.spec vendor/byacc/dist/package/pkgsrc/Makefile vendor/byacc/dist/reader.c Modified: vendor/byacc/dist/CHANGES ============================================================================== --- vendor/byacc/dist/CHANGES Thu Feb 2 18:27:20 2017 (r313100) +++ vendor/byacc/dist/CHANGES Thu Feb 2 19:22:26 2017 (r313101) @@ -1,3 +1,33 @@ +2017-02-01 Thomas E. Dickey + + * test/btyacc/expr.oxout.error, test/btyacc/expr.oxout.output, test/btyacc/expr.oxout.tab.c, test/btyacc/expr.oxout.tab.h, test/yacc/expr.oxout.error, test/yacc/expr.oxout.output, test/yacc/expr.oxout.tab.c, test/yacc/expr.oxout.tab.h: + RCS_BASE + + * package/debian/copyright: update copyright + + * reader.c, defs.h, main.c: + avoid using regex.h since some low-end platforms do not have this + + * test/expr.oxout.y: RCS_BASE + + * configure: regen + + * aclocal.m4: quiet a strict gcc warning in CF_MKSTEMP + +2017-02-01 Tom.Shields + + * main.c, reader.c, defs.h: + process #line directives, like bison and flex + +2017-02-01 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2016-12-31 Thomas E. Dickey + + * config.guess, config.sub: 2017-01-01 + 2016-12-02 Thomas E. Dickey * test/btyacc/quote_calc4-s.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/rename_debug.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc /btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, btyaccpar.c: Modified: vendor/byacc/dist/MANIFEST ============================================================================== --- vendor/byacc/dist/MANIFEST Thu Feb 2 18:27:20 2017 (r313100) +++ vendor/byacc/dist/MANIFEST Thu Feb 2 19:22:26 2017 (r313101) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20161202, version t20161202 +MANIFEST for byacc-20170201, version t20170201 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 @@ -77,6 +77,22 @@ test/btyacc/btyacc_demo.error referenc test/btyacc/btyacc_demo.output reference output for testing test/btyacc/btyacc_demo.tab.c reference output for testing test/btyacc/btyacc_demo.tab.h reference output for testing +test/btyacc/btyacc_demo2.error reference output for testing +test/btyacc/btyacc_demo2.output reference output for testing +test/btyacc/btyacc_demo2.tab.c reference output for testing +test/btyacc/btyacc_demo2.tab.h reference output for testing +test/btyacc/btyacc_destroy1.error reference output for testing +test/btyacc/btyacc_destroy1.output reference output for testing +test/btyacc/btyacc_destroy1.tab.c reference output for testing +test/btyacc/btyacc_destroy1.tab.h reference output for testing +test/btyacc/btyacc_destroy2.error reference output for testing +test/btyacc/btyacc_destroy2.output reference output for testing +test/btyacc/btyacc_destroy2.tab.c reference output for testing +test/btyacc/btyacc_destroy2.tab.h reference output for testing +test/btyacc/btyacc_destroy3.error reference output for testing +test/btyacc/btyacc_destroy3.output reference output for testing +test/btyacc/btyacc_destroy3.tab.c reference output for testing +test/btyacc/btyacc_destroy3.tab.h reference output for testing test/btyacc/calc.error reference output for testing test/btyacc/calc.output reference output for testing test/btyacc/calc.tab.c reference output for testing @@ -256,6 +272,10 @@ test/btyacc/error.error referenc test/btyacc/error.output reference output for testing test/btyacc/error.tab.c reference output for testing test/btyacc/error.tab.h reference output for testing +test/btyacc/expr.oxout.error reference output for testing +test/btyacc/expr.oxout.output reference output for testing +test/btyacc/expr.oxout.tab.c reference output for testing +test/btyacc/expr.oxout.tab.h reference output for testing test/btyacc/grammar.dot reference output for testing test/btyacc/grammar.error reference output for testing test/btyacc/grammar.output reference output for testing @@ -359,6 +379,9 @@ test/btyacc/varsyntax_calc1.tab.h refer test subdirectory test/btyacc_calc1.y testcase for btyacc test/btyacc_demo.y testcase for btyacc +test/btyacc_destroy1.y btyacc test-case for %parse-param +test/btyacc_destroy2.y btyacc test-case for %parse-param +test/btyacc_destroy3.y btyacc test-case for %parse-param test/calc.y example from VMS freeware version of byacc test/calc1.y advanced example from Steve Johnson's paper. test/calc2.y test-cases and reference files for %lex-param / %parse-param @@ -403,6 +426,7 @@ test/err_syntax8.y testcase test/err_syntax8a.y testcase for used_reserved() test/err_syntax9.y testcase for tokenized_start() test/error.y original version of byacc - 1993 +test/expr.oxout.y test-case for "#line" feature test/grammar.y grammar from cproto test/inherit0.y testcase for btyacc test/inherit1.y testcase for btyacc @@ -577,6 +601,10 @@ test/yacc/error.error referenc test/yacc/error.output reference output for testing test/yacc/error.tab.c reference output for testing test/yacc/error.tab.h reference output for testing +test/yacc/expr.oxout.error reference output for testing +test/yacc/expr.oxout.output reference output for testing +test/yacc/expr.oxout.tab.c reference output for testing +test/yacc/expr.oxout.tab.h reference output for testing test/yacc/grammar.dot reference output for testing test/yacc/grammar.error reference output for testing test/yacc/grammar.output reference output for testing Modified: vendor/byacc/dist/VERSION ============================================================================== --- vendor/byacc/dist/VERSION Thu Feb 2 18:27:20 2017 (r313100) +++ vendor/byacc/dist/VERSION Thu Feb 2 19:22:26 2017 (r313101) @@ -1 +1 @@ -20161202 +20170201 Modified: vendor/byacc/dist/aclocal.m4 ============================================================================== --- vendor/byacc/dist/aclocal.m4 Thu Feb 2 18:27:20 2017 (r313100) +++ vendor/byacc/dist/aclocal.m4 Thu Feb 2 19:22:26 2017 (r313101) @@ -1,7 +1,7 @@ -dnl $Id: aclocal.m4,v 1.41 2016/12/02 13:03:06 tom Exp $ +dnl $Id: aclocal.m4,v 1.42 2017/02/01 10:12:21 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- -dnl Copyright 2004-2015,2016 Thomas E. Dickey +dnl Copyright 2004-2016,2017 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -803,20 +803,26 @@ fi test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MKSTEMP version: 9 updated: 2012/10/03 04:34:49 +dnl CF_MKSTEMP version: 10 updated: 2017/01/21 11:12:16 dnl ---------- dnl Check for a working mkstemp. This creates two files, checks that they are dnl successfully created and distinct (AmigaOS apparently fails on the last). AC_DEFUN([CF_MKSTEMP],[ +AC_CHECK_HEADERS( \ +unistd.h \ +) AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[ rm -rf conftest* AC_TRY_RUN([ #include +#ifdef HAVE_UNISTD_H +#include +#endif #include #include #include #include -int main() +int main(void) { char *tmpl = "conftestXXXXXX"; char name[2][80]; Modified: vendor/byacc/dist/config.guess ============================================================================== --- vendor/byacc/dist/config.guess Thu Feb 2 18:27:20 2017 (r313100) +++ vendor/byacc/dist/config.guess Thu Feb 2 19:22:26 2017 (r313101) @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-10-02' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." Modified: vendor/byacc/dist/config.sub ============================================================================== --- vendor/byacc/dist/config.sub Thu Feb 2 18:27:20 2017 (r313100) +++ vendor/byacc/dist/config.sub Thu Feb 2 19:22:26 2017 (r313101) @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-11-19' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ Report bugs and patches to &5 +for ac_header in \ +unistd.h \ + +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:3919: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3925 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3929: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3935: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:3954: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6 if test "${cf_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3922,15 +3972,18 @@ if test "$cross_compiling" = yes; then cf_cv_func_mkstemp=maybe else cat >conftest.$ac_ext <<_ACEOF -#line 3925 "configure" +#line 3975 "configure" #include "confdefs.h" #include +#ifdef HAVE_UNISTD_H +#include +#endif #include #include #include #include -int main() +int main(void) { char *tmpl = "conftestXXXXXX"; char name[2][80]; @@ -3960,15 +4013,15 @@ int main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3963: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4016: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3966: \$? = $ac_status" >&5 + echo "$as_me:4019: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3968: \"$ac_try\"") >&5 + { (eval echo "$as_me:4021: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3971: \$? = $ac_status" >&5 + echo "$as_me:4024: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_mkstemp=yes @@ -3983,16 +4036,16 @@ rm -f core core.* *.core conftest$ac_exe fi fi -echo "$as_me:3986: result: $cf_cv_func_mkstemp" >&5 +echo "$as_me:4039: result: $cf_cv_func_mkstemp" >&5 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6 if test "x$cf_cv_func_mkstemp" = xmaybe ; then - echo "$as_me:3989: checking for mkstemp" >&5 + echo "$as_me:4042: checking for mkstemp" >&5 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 if test "${ac_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3995 "configure" +#line 4048 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mkstemp (); below. */ @@ -4023,16 +4076,16 @@ f = mkstemp; /* workaround for ICC 12.0. } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4026: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4079: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4029: \$? = $ac_status" >&5 + echo "$as_me:4082: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4032: \"$ac_try\"") >&5 + { (eval echo "$as_me:4085: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4035: \$? = $ac_status" >&5 + echo "$as_me:4088: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mkstemp=yes else @@ -4042,7 +4095,7 @@ ac_cv_func_mkstemp=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4045: result: $ac_cv_func_mkstemp" >&5 +echo "$as_me:4098: result: $ac_cv_func_mkstemp" >&5 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 fi @@ -4057,13 +4110,13 @@ fi for ac_func in vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:4060: checking for $ac_func" >&5 +echo "$as_me:4113: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4066 "configure" +#line 4119 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -4094,16 +4147,16 @@ f = $ac_func; /* workaround for ICC 12.0 } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4097: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4150: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4100: \$? = $ac_status" >&5 + echo "$as_me:4153: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4103: \"$ac_try\"") >&5 + { (eval echo "$as_me:4156: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4106: \$? = $ac_status" >&5 + echo "$as_me:4159: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -4113,7 +4166,7 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4116: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:4169: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <&5 +echo "$as_me:4179: checking for maximum table size" >&5 echo $ECHO_N "checking for maximum table size... $ECHO_C" >&6 # Check whether --with-max-table-size or --without-max-table-size was given. @@ -4133,12 +4186,12 @@ if test "${with_max_table_size+set}" = s fi; if test -n "$with_max_table_size" then - echo "$as_me:4136: result: $with_max_table_size" >&5 + echo "$as_me:4189: result: $with_max_table_size" >&5 echo "${ECHO_T}$with_max_table_size" >&6 check=`expr "$with_max_table_size" + 0` if test "x$check" != "x$with_max_table_size" then - { { echo "$as_me:4141: error: invalid value for --with-max-table-size: $with_max_table_size" >&5 + { { echo "$as_me:4194: error: invalid value for --with-max-table-size: $with_max_table_size" >&5 echo "$as_me: error: invalid value for --with-max-table-size: $with_max_table_size" >&2;} { (exit 1); exit 1; }; } fi @@ -4148,11 +4201,11 @@ cat >>confdefs.h <&5 + echo "$as_me:4204: result: default" >&5 echo "${ECHO_T}default" >&6 fi -echo "$as_me:4155: checking if backtracking extension is wanted" >&5 +echo "$as_me:4208: checking if backtracking extension is wanted" >&5 echo $ECHO_N "checking if backtracking extension is wanted... $ECHO_C" >&6 # Check whether --enable-btyacc or --disable-btyacc was given. @@ -4160,7 +4213,7 @@ if test "${enable_btyacc+set}" = set; th enableval="$enable_btyacc" fi; -echo "$as_me:4163: result: $enable_btyacc" >&5 +echo "$as_me:4216: result: $enable_btyacc" >&5 echo "${ECHO_T}$enable_btyacc" >&6 if test "$enable_btyacc" = "yes"; then @@ -4175,7 +4228,7 @@ fi if ( test "$GCC" = yes || test "$GXX" = yes ) then -echo "$as_me:4178: checking if you want to check for gcc warnings" >&5 +echo "$as_me:4231: checking if you want to check for gcc warnings" >&5 echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6 # Check whether --with-warnings or --without-warnings was given. @@ -4185,7 +4238,7 @@ if test "${with_warnings+set}" = set; th else cf_opt_with_warnings=no fi; -echo "$as_me:4188: result: $cf_opt_with_warnings" >&5 +echo "$as_me:4241: result: $cf_opt_with_warnings" >&5 echo "${ECHO_T}$cf_opt_with_warnings" >&6 if test "$cf_opt_with_warnings" != no ; then @@ -4207,10 +4260,10 @@ cat > conftest.i <&5 + { echo "$as_me:4263: checking for $CC __attribute__ directives..." >&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > conftest.$ac_ext <&5 + if { (eval echo "$as_me:4315: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4265: \$? = $ac_status" >&5 + echo "$as_me:4318: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:4267: result: ... $cf_attribute" >&5 + test -n "$verbose" && echo "$as_me:4320: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h case $cf_attribute in @@ -4328,12 +4381,12 @@ INTEL_COMPILER=no if test "$GCC" = yes ; then case $host_os in (linux*|gnu*) - echo "$as_me:4331: checking if this is really Intel C compiler" >&5 + echo "$as_me:4384: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >conftest.$ac_ext <<_ACEOF -#line 4336 "configure" +#line 4389 "configure" #include "confdefs.h" int @@ -4350,16 +4403,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4353: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4406: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4356: \$? = $ac_status" >&5 + echo "$as_me:4409: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4359: \"$ac_try\"") >&5 + { (eval echo "$as_me:4412: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4362: \$? = $ac_status" >&5 + echo "$as_me:4415: \$? = $ac_status" >&5 (exit $ac_status); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -4370,7 +4423,7 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" - echo "$as_me:4373: result: $INTEL_COMPILER" >&5 + echo "$as_me:4426: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac @@ -4379,12 +4432,12 @@ fi CLANG_COMPILER=no if test "$GCC" = yes ; then - echo "$as_me:4382: checking if this is really Clang C compiler" >&5 + echo "$as_me:4435: checking if this is really Clang C compiler" >&5 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Qunused-arguments" cat >conftest.$ac_ext <<_ACEOF -#line 4387 "configure" +#line 4440 "configure" #include "confdefs.h" int @@ -4401,16 +4454,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4404: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4457: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4407: \$? = $ac_status" >&5 + echo "$as_me:4460: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4410: \"$ac_try\"") >&5 + { (eval echo "$as_me:4463: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4413: \$? = $ac_status" >&5 + echo "$as_me:4466: \$? = $ac_status" >&5 (exit $ac_status); }; }; then CLANG_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" @@ -4421,12 +4474,12 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" - echo "$as_me:4424: result: $CLANG_COMPILER" >&5 + echo "$as_me:4477: result: $CLANG_COMPILER" >&5 echo "${ECHO_T}$CLANG_COMPILER" >&6 fi cat > conftest.$ac_ext <&5 + { echo "$as_me:4499: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-Wall" @@ -4459,12 +4512,12 @@ echo "$as_me: checking for $CC warning o wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:4462: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:4515: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4465: \$? = $ac_status" >&5 + echo "$as_me:4518: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:4467: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:4520: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi @@ -4473,7 +4526,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 elif test "$GCC" = yes then - { echo "$as_me:4476: checking for $CC warning options..." >&5 + { echo "$as_me:4529: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS= @@ -4497,12 +4550,12 @@ echo "$as_me: checking for $CC warning o Wundef $cf_gcc_warnings $cf_warn_CONST Wwrite-strings do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:4500: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:4553: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4503: \$? = $ac_status" >&5 + echo "$as_me:4556: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:4505: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:4558: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case $cf_opt in (Wcast-qual) @@ -4513,7 +4566,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 ([34].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:4516: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:4569: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -4523,7 +4576,7 @@ echo "${as_me:-configure}:4516: testing ([12].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:4526: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:4579: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -4539,7 +4592,7 @@ rm -rf conftest* fi fi -echo "$as_me:4542: checking if you want to see long compiling messages" >&5 +echo "$as_me:4595: checking if you want to see long compiling messages" >&5 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6 # Check whether --enable-echo or --disable-echo was given. @@ -4573,10 +4626,10 @@ else ECHO_CC='' fi; -echo "$as_me:4576: result: $enableval" >&5 +echo "$as_me:4629: result: $enableval" >&5 echo "${ECHO_T}$enableval" >&6 -echo "$as_me:4579: checking if you want to use dmalloc for testing" >&5 +echo "$as_me:4632: checking if you want to use dmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6 # Check whether --with-dmalloc or --without-dmalloc was given. @@ -4593,7 +4646,7 @@ EOF else with_dmalloc= fi; -echo "$as_me:4596: result: ${with_dmalloc:-no}" >&5 +echo "$as_me:4649: result: ${with_dmalloc:-no}" >&5 echo "${ECHO_T}${with_dmalloc:-no}" >&6 case .$with_cflags in @@ -4687,23 +4740,23 @@ fi esac if test "$with_dmalloc" = yes ; then - echo "$as_me:4690: checking for dmalloc.h" >&5 + echo "$as_me:4743: checking for dmalloc.h" >&5 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4696 "configure" +#line 4749 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:4700: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:4753: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4706: \$? = $ac_status" >&5 + echo "$as_me:4759: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -4722,11 +4775,11 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:4725: result: $ac_cv_header_dmalloc_h" >&5 +echo "$as_me:4778: result: $ac_cv_header_dmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 if test $ac_cv_header_dmalloc_h = yes; then -echo "$as_me:4729: checking for dmalloc_debug in -ldmalloc" >&5 +echo "$as_me:4782: checking for dmalloc_debug in -ldmalloc" >&5 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4734,7 +4787,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4737 "configure" +#line 4790 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4753,16 +4806,16 @@ dmalloc_debug (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4756: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4809: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4759: \$? = $ac_status" >&5 + echo "$as_me:4812: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4762: \"$ac_try\"") >&5 + { (eval echo "$as_me:4815: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4765: \$? = $ac_status" >&5 + echo "$as_me:4818: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dmalloc_dmalloc_debug=yes else @@ -4773,7 +4826,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4776: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 +echo "$as_me:4829: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then cat >>confdefs.h <&5 +echo "$as_me:4844: checking if you want to use dbmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6 # Check whether --with-dbmalloc or --without-dbmalloc was given. @@ -4805,7 +4858,7 @@ EOF else with_dbmalloc= fi; -echo "$as_me:4808: result: ${with_dbmalloc:-no}" >&5 +echo "$as_me:4861: result: ${with_dbmalloc:-no}" >&5 echo "${ECHO_T}${with_dbmalloc:-no}" >&6 case .$with_cflags in @@ -4899,23 +4952,23 @@ fi esac if test "$with_dbmalloc" = yes ; then - echo "$as_me:4902: checking for dbmalloc.h" >&5 + echo "$as_me:4955: checking for dbmalloc.h" >&5 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dbmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4908 "configure" +#line 4961 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:4912: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:4965: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4918: \$? = $ac_status" >&5 + echo "$as_me:4971: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -4934,11 +4987,11 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:4937: result: $ac_cv_header_dbmalloc_h" >&5 +echo "$as_me:4990: result: $ac_cv_header_dbmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6 if test $ac_cv_header_dbmalloc_h = yes; then -echo "$as_me:4941: checking for debug_malloc in -ldbmalloc" >&5 +echo "$as_me:4994: checking for debug_malloc in -ldbmalloc" >&5 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4946,7 +4999,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldbmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4949 "configure" +#line 5002 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4965,16 +5018,16 @@ debug_malloc (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4968: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5021: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4971: \$? = $ac_status" >&5 + echo "$as_me:5024: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4974: \"$ac_try\"") >&5 + { (eval echo "$as_me:5027: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4977: \$? = $ac_status" >&5 + echo "$as_me:5030: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dbmalloc_debug_malloc=yes else @@ -4985,7 +5038,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4988: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 +echo "$as_me:5041: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then cat >>confdefs.h <&5 +echo "$as_me:5056: checking if you want to use valgrind for testing" >&5 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6 # Check whether --with-valgrind or --without-valgrind was given. @@ -5017,7 +5070,7 @@ EOF else with_valgrind= fi; -echo "$as_me:5020: result: ${with_valgrind:-no}" >&5 +echo "$as_me:5073: result: ${with_valgrind:-no}" >&5 echo "${ECHO_T}${with_valgrind:-no}" >&6 case .$with_cflags in @@ -5110,7 +5163,7 @@ fi ;; esac -echo "$as_me:5113: checking if you want to perform memory-leak testing" >&5 +echo "$as_me:5166: checking if you want to perform memory-leak testing" >&5 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6 # Check whether --enable-leaks or --disable-leaks was given. @@ -5120,7 +5173,7 @@ if test "${enable_leaks+set}" = set; the else : ${with_no_leaks:=no} fi; -echo "$as_me:5123: result: $with_no_leaks" >&5 +echo "$as_me:5176: result: $with_no_leaks" >&5 echo "${ECHO_T}$with_no_leaks" >&6 if test "$with_no_leaks" = yes ; then @@ -5137,7 +5190,7 @@ fi # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 -echo "$as_me:5140: checking for $ac_word" >&5 +echo "$as_me:5193: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GROFF_PATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5154,7 +5207,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_GROFF_PATH="$ac_dir/$ac_word" - echo "$as_me:5157: found $ac_dir/$ac_word" >&5 + echo "$as_me:5210: found $ac_dir/$ac_word" >&5 break fi done @@ -5166,16 +5219,16 @@ fi GROFF_PATH=$ac_cv_path_GROFF_PATH if test -n "$GROFF_PATH"; then - echo "$as_me:5169: result: $GROFF_PATH" >&5 + echo "$as_me:5222: result: $GROFF_PATH" >&5 echo "${ECHO_T}$GROFF_PATH" >&6 else - echo "$as_me:5172: result: no" >&5 + echo "$as_me:5225: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "nroff", so it can be a program name with args. set dummy nroff; ac_word=$2 -echo "$as_me:5178: checking for $ac_word" >&5 +echo "$as_me:5231: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_NROFF_PATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5192,7 +5245,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_NROFF_PATH="$ac_dir/$ac_word" - echo "$as_me:5195: found $ac_dir/$ac_word" >&5 + echo "$as_me:5248: found $ac_dir/$ac_word" >&5 break fi done @@ -5204,10 +5257,10 @@ fi NROFF_PATH=$ac_cv_path_NROFF_PATH if test -n "$NROFF_PATH"; then - echo "$as_me:5207: result: $NROFF_PATH" >&5 + echo "$as_me:5260: result: $NROFF_PATH" >&5 echo "${ECHO_T}$NROFF_PATH" >&6 else - echo "$as_me:5210: result: no" >&5 + echo "$as_me:5263: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5220,7 +5273,7 @@ else GROFF_NOTE= fi -echo "$as_me:5223: checking for program to convert manpage to html" >&5 +echo "$as_me:5276: checking for program to convert manpage to html" >&5 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6 # Check whether --with-man2html or --without-man2html was given. @@ -5235,11 +5288,11 @@ cf_with_groff=no case $cf_man2html in (yes) - echo "$as_me:5238: result: man2html" >&5 + echo "$as_me:5291: result: man2html" >&5 echo "${ECHO_T}man2html" >&6 # Extract the first word of "man2html", so it can be a program name with args. set dummy man2html; ac_word=$2 -echo "$as_me:5242: checking for $ac_word" >&5 +echo "$as_me:5295: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 2 19:23:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44E66CCD516; Thu, 2 Feb 2017 19:23:09 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0A0D192D; Thu, 2 Feb 2017 19:23:08 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12JN8uB044797; Thu, 2 Feb 2017 19:23:08 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12JN8Be044796; Thu, 2 Feb 2017 19:23:08 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201702021923.v12JN8Be044796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 2 Feb 2017 19:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313102 - vendor/byacc/20170201 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 19:23:09 -0000 Author: jkim Date: Thu Feb 2 19:23:07 2017 New Revision: 313102 URL: https://svnweb.freebsd.org/changeset/base/313102 Log: Tag byacc 20170201. Added: vendor/byacc/20170201/ - copied from r313101, vendor/byacc/dist/ From owner-svn-src-all@freebsd.org Thu Feb 2 19:24:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E55FDCCD567; Thu, 2 Feb 2017 19:24:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 22B971A8C; Thu, 2 Feb 2017 19:24:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 6FBBD42CFCD; Fri, 3 Feb 2017 06:23:54 +1100 (AEDT) Date: Fri, 3 Feb 2017 06:23:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , Mateusz Guzik , Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312975 - head/sys/i386/include In-Reply-To: <20170202184321.GO2092@kib.kiev.ua> Message-ID: <20170203062049.N2690@besplex.bde.org> References: <201701300224.v0U2Osj1010421@repo.freebsd.org> <20170130142123.V953@besplex.bde.org> <20170201214349.H1136@besplex.bde.org> <20170202014204.GA992@dft-labs.eu> <20170203040751.I2354@besplex.bde.org> <20170202184321.GO2092@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=EiulhN8bn4RJF35M6TYA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 19:24:05 -0000 On Thu, 2 Feb 2017, Konstantin Belousov wrote: > On Fri, Feb 03, 2017 at 05:14:15AM +1100, Bruce Evans wrote: >> You won't want to ifdef this for SMP, so the i386 implementation has >> further bugs like I expected (fcmpset is not implemented in the >> CPU_DISABLE_CMPXCHG case). > > I think it is time to remove the option. It certainly outlived it > usefulness: > > ... VmWare 3.x seems to emulate this instruction poorly, causing > the guest OS to run very slowly. This problem appears to be fixed in > VmWare 4.x, at least in version 4.5.2 ... Yes, it is probably not useful. Similarly for many old i386 options like NPX and SSE. NPX might as well be mandatory, and SSE always there but dynamically configured as it is now. Bruce From owner-svn-src-all@freebsd.org Thu Feb 2 19:24:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7B21CCD59B; Thu, 2 Feb 2017 19:24:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 69B2A1AE8; Thu, 2 Feb 2017 19:24:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v12JOCk1023436 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Feb 2017 11:24:12 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v12JOBu6023435; Thu, 2 Feb 2017 11:24:11 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 2 Feb 2017 11:24:11 -0800 From: Gleb Smirnoff To: Hartmut.Brandt@dlr.de Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313043 - head/sys/kern Message-ID: <20170202192411.GK3334@FreeBSD.org> References: <201702011312.v11DC7WJ085025@repo.freebsd.org> <20170201180816.GF3334@FreeBSD.org> <611243783F62AF48AFB07BC25FA4B1061CED9FD9@DLREXMBX01.intra.dlr.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <611243783F62AF48AFB07BC25FA4B1061CED9FD9@DLREXMBX01.intra.dlr.de> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 19:24:18 -0000 Hartmut, Thanks for explanation! Is there a test program available to reproduce the problem? I want to try the sequence on my branch. On Thu, Feb 02, 2017 at 08:29:20AM +0000, Hartmut.Brandt@dlr.de wrote: H> To be honest - I feared that when I saw your messages regarding this. Here is my original message from july. Attached is also a small test program. H> H> Hi, H> H> I'm trying to use asio (that's boost::asio without boost) to handle listening sockets asynchronuosly. This appears not to work. There are also some reports on the net about this problem. I was able to reproduce the problem with a small C-programm that does the same steps as asio. The relevant sequence of system calls is: H> H> kqueue() = 3 (0x3) H> socket(PF_INET,SOCK_STREAM,6) = 4 (0x4) H> setsockopt(0x4,0xffff,0x800,0x7fffffffea2c,0x4) = 0 (0x0) H> kevent(3,{ 4,EVFILT_READ,EV_ADD|EV_CLEAR,0x0,0x0,0x0 4,EVFILT_WRITE,EV_ADD|EV_CLEAR,0x0,0x0,0x0 },2,0x0,0,0x0) = 0 (0x0) H> setsockopt(0x4,0xffff,0x4,0x7fffffffea2c,0x4) = 0 (0x0) H> bind(4,{ AF_INET 0.0.0.0:8080 },16) = 0 (0x0) H> listen(0x4,0x80) = 0 (0x0) H> ioctl(4,FIONBIO,0xffffea2c) = 0 (0x0) H> kevent(3,{ 4,EVFILT_READ,EV_ADD|EV_CLEAR,0x0,0x0,0x0 4,EVFILT_WRITE,EV_ADD|EV_CLEAR,0x0,0x0,0x0 },2,0x0,0,0x0) = 0 (0x0) H> kevent(3,0x0,0,0x7fffffffe5a0,32,0x0) ERR#4 'Interrupted system call' H> H> The problem here is that asio registers each file descriptor with EVFILT_READ and EVFILT_WRITE as soon as it is opened (first kevent call). H> After bringing the socket into the listening state and when async_accept() is called it registers the socket a second time. According to the man page this is perfectly legal and can be used to modify the registration. H> H> With this sequence of calls kevent() does not return when a connection is established successfully. H> H> I tracked down the problem and the reason is in soo_kqfilter(). This is called for the first EVFILT_READ registration and decides based on the SO_ACCEPTCONN flag which filter operations to use solisten_filtops or soread_filtops. In this case it chooses soread_filtops. H> H> The second EVFILT_READ registration does not call soo_kqfilter() again, but just updates the filter from the data and fflags field so the listening socket ends up with the wrong filter operations. H> H> H> H> -----Original Message----- H> From: Gleb Smirnoff [mailto:glebius@FreeBSD.org] H> Sent: Wednesday, February 01, 2017 7:08 PM H> To: Hartmut Brandt H> Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freebsd.org H> Subject: Re: svn commit: r313043 - head/sys/kern H> H> On Wed, Feb 01, 2017 at 01:12:07PM +0000, Hartmut Brandt wrote: H> H> Author: harti H> H> Date: Wed Feb 1 13:12:07 2017 H> H> New Revision: 313043 H> H> URL: https://svnweb.freebsd.org/changeset/base/313043 H> H> H> H> Log: H> H> Merge filt_soread and filt_solisten and decide what to do when checking H> H> for EVFILT_READ at the point of the check not when the event is registers. H> H> This fixes a problem with asio when accepting a connection. H> H> H> H> Reviewed by: kib@, Scott Mitchell H> H> This goes into opposite direction with what I am doing: H> H> https://reviews.freebsd.org/D9356 H> H> Can you please explain the problem with asio when accepting a connection? H> H> -- H> Totus tuus, Glebius. H> H> #include H> #include H> #include H> #include H> H> #include H> #include H> #include H> #include H> #include H> H> static void H> wait_loop(int kq, int sock) H> { H> struct kevent ev[32]; H> struct sockaddr_in addr; H> socklen_t socklen; H> H> for (;;) { H> int nev = kevent(kq, NULL, 0, ev, 32, NULL); H> if (nev < 1) H> err(1, "kevent"); H> for (int i = 0; i < nev; ++i) { H> if (ev[i].ident == sock) { H> printf("accept\n"); H> int fd = accept(ev[i].ident, H> (struct sockaddr *)&addr, &socklen); H> if (fd == -1) H> err(1, "accept"); H> } H> } H> } H> } H> H> int H> main() H> { H> struct sockaddr_in addr; H> H> /* open a TCP socket */ H> int kq = kqueue(); H> H> int sock = socket(PF_INET, SOCK_STREAM, 0); H> H> struct kevent ev[2]; H> EV_SET(&ev[0], sock, EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, NULL); H> EV_SET(&ev[1], sock, EVFILT_WRITE, EV_ADD | EV_CLEAR, 0, 0, NULL); H> H> int opt = 1; H> setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, &opt, sizeof(opt)); H> H> if (kevent(kq, ev, 2, NULL, 0, NULL) == -1) H> err(1, "kevent"); H> H> setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); H> H> memset(&addr, 0, sizeof(addr)); H> addr.sin_port = htons(10000); H> H> bind(sock, (struct sockaddr *)&addr, sizeof(addr)); H> listen(sock, 0x80); H> H> ioctl(sock, FIONBIO, &opt); H> H> if (kevent(kq, ev, 2, NULL, 0, NULL) == -1) H> err(1, "kevent"); H> H> wait_loop(kq, sock); H> } -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Thu Feb 2 19:50:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3994CCDA87; Thu, 2 Feb 2017 19:50:30 +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 ADFCE832; Thu, 2 Feb 2017 19:50:30 +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 v12JoTFI053479; Thu, 2 Feb 2017 19:50:29 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12JoT4c053472; Thu, 2 Feb 2017 19:50:29 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702021950.v12JoT4c053472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 2 Feb 2017 19:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313103 - in stable/10: sbin/dhclient sys/dev/mpr usr.bin/chat usr.bin/rpcgen usr.bin/tail usr.sbin/diskinfo X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 19:50:30 -0000 Author: asomers Date: Thu Feb 2 19:50:28 2017 New Revision: 313103 URL: https://svnweb.freebsd.org/changeset/base/313103 Log: MFC r311160, r311210, r311288, r311292, r311298, r311340 r311160: misc minor fixes in mpr(4) sys/dev/mpr/mpr_sas.c * Fix a potential null pointer dereference (CID 1305731) * Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID 1211934) sys/dev/mpr/mpr_sas_lsi.c * Nullify a dangling pointer in mprsas_get_sata_identify * Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935) Reported by: Coverity (partially) CID: 1305731 1211934 1211935 Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8880 r311210: Quell Coverity for diskinfo(8) * CID 1198994: Don't run the speed disk on a disk with no sectors * CID 1011442: Don't call close(2) if open(2) fails * CID 1011161: Use snprintf instead of sprintf * CID 1009825: Check the return value of lseek Reported by: Coverity CID: 1198994 1011442 1011161 1009825 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311288: Delete dead code in chat(8) It's always been dead, ever since first import in 1994. It's still dead in OpenBSD's version, too. Reported by: Coverity CID: 270586 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311292: Remove dead code in rpc_parse.c It's been dead ever since it was imported from TI-RPC in 1995. The dead code is still present in Illumos today, but was removed from NetBSD in 2006. Reported by: Coverity CID: 270097 Obtained from: NetBSD MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311298: Remove dead code in dhclient(8) The offending code has been dead ever since the import from OpenBSD in r195805. OpenBSD later deleted that entire function. Reported by: Coverity CID: 500059 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311340: Misc Coverity fixes for tail(1) CID 1006402: Initialize stack variable CID 271580: Don't leak memory when ENOMEM. Reported by: Coverity CID: 271580 1006402 MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: stable/10/sbin/dhclient/dispatch.c stable/10/sys/dev/mpr/mpr_sas.c stable/10/sys/dev/mpr/mpr_sas_lsi.c stable/10/usr.bin/chat/chat.c stable/10/usr.bin/rpcgen/rpc_parse.c stable/10/usr.bin/tail/reverse.c stable/10/usr.sbin/diskinfo/diskinfo.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dhclient/dispatch.c ============================================================================== --- stable/10/sbin/dhclient/dispatch.c Thu Feb 2 19:23:07 2017 (r313102) +++ stable/10/sbin/dhclient/dispatch.c Thu Feb 2 19:50:28 2017 (r313103) @@ -453,16 +453,12 @@ add_protocol(char *name, int fd, void (* void remove_protocol(struct protocol *proto) { - struct protocol *p, *next, *prev; + struct protocol *p, *next; - prev = NULL; for (p = protocols; p; p = next) { next = p->next; if (p == proto) { - if (prev) - prev->next = p->next; - else - protocols = p->next; + protocols = p->next; free(p); } } Modified: stable/10/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas.c Thu Feb 2 19:23:07 2017 (r313102) +++ stable/10/sys/dev/mpr/mpr_sas.c Thu Feb 2 19:50:28 2017 (r313103) @@ -1846,8 +1846,12 @@ mprsas_action_scsiio(struct mprsas_softc if (csio->ccb_h.flags & CAM_CDB_POINTER) bcopy(csio->cdb_io.cdb_ptr, &req->CDB.CDB32[0], csio->cdb_len); - else + else { + KASSERT(csio->cdb_len <= IOCDBLEN, + ("cdb_len %d is greater than IOCDBLEN but CAM_CDB_POINTER is not set", + csio->cdb_len)); bcopy(csio->cdb_io.cdb_bytes, &req->CDB.CDB32[0],csio->cdb_len); + } req->IoFlags = htole16(csio->cdb_len); /* @@ -2429,6 +2433,7 @@ mprsas_scsiio_complete(struct mpr_softc * driver is being shutdown. */ if ((csio->cdb_io.cdb_bytes[0] == INQUIRY) && + (csio->data_ptr != NULL) && ((csio->data_ptr[0] & 0x1f) == T_DIRECT) && (sc->mapping_table[target_id].device_info & MPI2_SAS_DEVICE_INFO_SATA_DEVICE) && Modified: stable/10/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas_lsi.c Thu Feb 2 19:23:07 2017 (r313102) +++ stable/10/sys/dev/mpr/mpr_sas_lsi.c Thu Feb 2 19:50:28 2017 (r313103) @@ -1056,6 +1056,7 @@ out: mpr_free_command(sc, cm); else if (error == 0) error = EWOULDBLOCK; + cm->cm_data = NULL; free(buffer, M_MPR); return (error); } @@ -1196,18 +1197,18 @@ mprsas_SSU_to_SATA_devices(struct mpr_so continue; } - ccb = xpt_alloc_ccb_nowait(); - if (ccb == NULL) { - mpr_dprint(sc, MPR_FAULT, "Unable to alloc CCB to stop " - "unit.\n"); - return; - } - /* * The stop_at_shutdown flag will be set if this device is * a SATA direct-access end device. */ if (target->stop_at_shutdown) { + ccb = xpt_alloc_ccb_nowait(); + if (ccb == NULL) { + mpr_dprint(sc, MPR_FAULT, "Unable to alloc CCB to stop " + "unit.\n"); + return; + } + if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, pathid, targetid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { Modified: stable/10/usr.bin/chat/chat.c ============================================================================== --- stable/10/usr.bin/chat/chat.c Thu Feb 2 19:23:07 2017 (r313102) +++ stable/10/usr.bin/chat/chat.c Thu Feb 2 19:50:28 2017 (r313103) @@ -1173,7 +1173,7 @@ int get_string(char *string) { char temp[STR_LEN]; - int c, printed = 0; + int c; size_t len, minlen; char *s = temp, *end = s + STR_LEN; char *logged = temp; @@ -1306,13 +1306,6 @@ get_string(char *string) alarm(0); - if (verbose && printed) { - if (alarmed) - chat_logf(" -- read timed out"); - else - chat_logf(" -- read failed: %m"); - } - exit_code = 3; alarmed = 0; return (0); Modified: stable/10/usr.bin/rpcgen/rpc_parse.c ============================================================================== --- stable/10/usr.bin/rpcgen/rpc_parse.c Thu Feb 2 19:23:07 2017 (r313102) +++ stable/10/usr.bin/rpcgen/rpc_parse.c Thu Feb 2 19:50:28 2017 (r313103) @@ -290,7 +290,6 @@ def_union(definition *defp) declaration dec; case_list *cases; case_list **tailp; - int flag; defp->def_kind = DEF_UNION; scan(TOK_IDENT, &tok); @@ -309,7 +308,6 @@ def_union(definition *defp) cases->case_name = tok.str; scan(TOK_COLON, &tok); /* now peek at next token */ - flag = 0; if (peekscan(TOK_CASE, &tok)){ do { scan2(TOK_IDENT, TOK_CHARCONST, &tok); @@ -322,14 +320,6 @@ def_union(definition *defp) scan(TOK_COLON, &tok); } while (peekscan(TOK_CASE, &tok)); } - else - if (flag) - { - - *tailp = cases; - tailp = &cases->next; - cases = XALLOC(case_list); - }; get_declaration(&dec, DEF_UNION); cases->case_decl = dec; Modified: stable/10/usr.bin/tail/reverse.c ============================================================================== --- stable/10/usr.bin/tail/reverse.c Thu Feb 2 19:23:07 2017 (r313102) +++ stable/10/usr.bin/tail/reverse.c Thu Feb 2 19:50:28 2017 (r313103) @@ -117,6 +117,7 @@ r_reg(FILE *fp, const char *fn, enum STY map.start = NULL; map.mapoff = map.maxoff = size; map.fd = fileno(fp); + map.maplen = 0; /* * Last char is special, ignore whether newline or not. Note that @@ -205,7 +206,13 @@ r_buf(FILE *fp, const char *fn) (tl->l = malloc(BSZ)) == NULL) { if (!mark) err(1, "malloc"); - tl = enomem ? tl->next : mark; + if (enomem) + tl = tl->next; + else { + if (tl) + free(tl); + tl = mark; + } enomem += tl->len; } else if (mark) { tl->next = mark; Modified: stable/10/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- stable/10/usr.sbin/diskinfo/diskinfo.c Thu Feb 2 19:23:07 2017 (r313102) +++ stable/10/usr.sbin/diskinfo/diskinfo.c Thu Feb 2 19:50:28 2017 (r313103) @@ -89,13 +89,12 @@ main(int argc, char **argv) for (i = 0; i < argc; i++) { fd = open(argv[i], O_RDONLY); if (fd < 0 && errno == ENOENT && *argv[i] != '/') { - sprintf(buf, "%s%s", _PATH_DEV, argv[i]); + snprintf(buf, BUFSIZ, "%s%s", _PATH_DEV, argv[i]); fd = open(buf, O_RDONLY); } if (fd < 0) { warn("%s", argv[i]); - exitval = 1; - goto out; + exit(1); } error = ioctl(fd, DIOCGMEDIASIZE, &mediasize); if (error) { @@ -176,7 +175,8 @@ rdsect(int fd, off_t blockno, u_int sect { int error; - lseek(fd, (off_t)blockno * sectorsize, SEEK_SET); + if (lseek(fd, (off_t)blockno * sectorsize, SEEK_SET) == -1) + err(1, "lseek"); error = read(fd, sector, sectorsize); if (error == -1) err(1, "read"); @@ -241,6 +241,9 @@ speeddisk(int fd, off_t mediasize, u_int off_t b0, b1, sectorcount, step; sectorcount = mediasize / sectorsize; + if (sectorcount <= 0) + return; /* Can't test devices with no sectors */ + step = 1ULL << (flsll(sectorcount / (4 * 200)) - 1); if (step > 16384) step = 16384; From owner-svn-src-all@freebsd.org Thu Feb 2 19:56:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF455CCDCB0; Thu, 2 Feb 2017 19:56: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 89C85C38; Thu, 2 Feb 2017 19:56: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 v12JufSr057278; Thu, 2 Feb 2017 19:56:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12JufOv057273; Thu, 2 Feb 2017 19:56:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201702021956.v12JufOv057273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 2 Feb 2017 19:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313104 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 19:56:42 -0000 Author: glebius Date: Thu Feb 2 19:56:41 2017 New Revision: 313104 URL: https://svnweb.freebsd.org/changeset/base/313104 Log: Reduce diff to upstream using HAVE_CAPSICUM instead of __FreeBSD__. It'll also make it easier to upstream HAVE_CASPER patch. Modified: head/contrib/tcpdump/config.h.in head/contrib/tcpdump/configure head/contrib/tcpdump/configure.in head/contrib/tcpdump/tcpdump.c head/usr.sbin/tcpdump/tcpdump/config.h Modified: head/contrib/tcpdump/config.h.in ============================================================================== --- head/contrib/tcpdump/config.h.in Thu Feb 2 19:50:28 2017 (r313103) +++ head/contrib/tcpdump/config.h.in Thu Feb 2 19:56:41 2017 (r313104) @@ -9,8 +9,8 @@ /* Define to 1 if you have the `bpf_dump' function. */ #undef HAVE_BPF_DUMP -/* Casper library support available */ -#undef HAVE_CASPER +/* capsicum support available */ +#undef HAVE_CAPSICUM /* Define to 1 if you have the `cap_enter' function. */ #undef HAVE_CAP_ENTER Modified: head/contrib/tcpdump/configure ============================================================================== --- head/contrib/tcpdump/configure Thu Feb 2 19:50:28 2017 (r313103) +++ head/contrib/tcpdump/configure Thu Feb 2 19:56:41 2017 (r313104) @@ -4593,7 +4593,7 @@ fi $as_echo_n "checking whether to sandbox using capsicum... " >&6; } if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then -$as_echo "#define HAVE_CASPER 1" >>confdefs.h +$as_echo "#define HAVE_CAPSICUM 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } Modified: head/contrib/tcpdump/configure.in ============================================================================== --- head/contrib/tcpdump/configure.in Thu Feb 2 19:50:28 2017 (r313103) +++ head/contrib/tcpdump/configure.in Thu Feb 2 19:56:41 2017 (r313104) @@ -228,7 +228,7 @@ if test ! -z "$with_sandbox-capsicum" && fi AC_MSG_CHECKING([whether to sandbox using capsicum]) if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then - AC_DEFINE(HAVE_CASPER, 1, [casper support available]) + AC_DEFINE(HAVE_CAPSICUM, 1, [capsicum support available]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Thu Feb 2 19:50:28 2017 (r313103) +++ head/contrib/tcpdump/tcpdump.c Thu Feb 2 19:56:41 2017 (r313104) @@ -75,18 +75,18 @@ The Regents of the University of Califor * to compile if has already been included; including the headers * in the opposite order works fine. */ -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM #include #include +#include +#include +#include #include #ifdef HAVE_CASPER #include #include -#include -#include -#include #endif /* HAVE_CASPER */ -#endif /* __FreeBSD__ */ +#endif /* HAVE_CAPSICUM */ #include #include #include @@ -249,7 +249,7 @@ struct dump_info { char *CurrentFileName; pcap_t *pd; pcap_dumper_t *p; -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM int dirfd; #endif }; @@ -789,7 +789,7 @@ tstamp_precision_to_string(int precision } #endif -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM /* * Ensure that, on a dump file's descriptor, we have all the rights * necessary to make the standard I/O library work with an fdopen()ed @@ -1188,10 +1188,10 @@ main(int argc, char **argv) #endif int status; FILE *VFile; -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM cap_rights_t rights; -#endif /* !__FreeBSD__ */ int cansandbox; +#endif /* HAVE_CAPSICUM */ int Oflag = 1; /* run filter code optimizer */ int yflag_dlt = -1; const char *yflag_dlt_name = NULL; @@ -1685,7 +1685,7 @@ main(int argc, char **argv) if (pd == NULL) error("%s", ebuf); -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM cap_rights_init(&rights, CAP_READ); if (cap_rights_limit(fileno(pcap_file(pd)), &rights) < 0 && errno != ENOSYS) { @@ -1916,7 +1916,7 @@ main(int argc, char **argv) if (pcap_setfilter(pd, &fcode) < 0) error("%s", pcap_geterr(pd)); -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM if (RFileName == NULL && VFileName == NULL) { static const unsigned long cmds[] = { BIOCGSTATS, BIOCROTZBUF }; @@ -1966,11 +1966,11 @@ main(int argc, char **argv) #endif /* HAVE_LIBCAP_NG */ if (p == NULL) error("%s", pcap_geterr(pd)); -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM set_dumper_capsicum_rights(p); #endif if (Cflag != 0 || Gflag != 0) { -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM dumpinfo.WFileName = strdup(basename(WFileName)); if (dumpinfo.WFileName == NULL) { error("Unable to allocate memory for file %s", @@ -1992,7 +1992,7 @@ main(int argc, char **argv) errno != ENOSYS) { error("unable to limit dump descriptor fcntls"); } -#else /* !__FreeBSD__ */ +#else /* !HAVE_CAPSICUM */ dumpinfo.WFileName = WFileName; #endif callback = dump_packet_and_trunc; @@ -2064,7 +2064,7 @@ main(int argc, char **argv) (void)fflush(stderr); } -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM cansandbox = (VFileName == NULL && zflag == NULL); #ifdef HAVE_CASPER cansandbox = (cansandbox && (ndo->ndo_nflag || capdns != NULL)); @@ -2073,7 +2073,7 @@ main(int argc, char **argv) #endif /* HAVE_CASPER */ if (cansandbox && cap_enter() < 0 && errno != ENOSYS) error("unable to enter the capability mode"); -#endif /* __FreeBSD __ */ +#endif /* HAVE_CAPSICUM */ do { status = pcap_loop(pd, cnt, callback, pcap_userdata); @@ -2124,7 +2124,7 @@ main(int argc, char **argv) pd = pcap_open_offline(RFileName, ebuf); if (pd == NULL) error("%s", ebuf); -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM cap_rights_init(&rights, CAP_READ); if (cap_rights_limit(fileno(pcap_file(pd)), &rights) < 0 && errno != ENOSYS) { @@ -2378,7 +2378,7 @@ dump_packet_and_trunc(u_char *user, cons /* If the time is greater than the specified window, rotate */ if (t - Gflag_time >= Gflag) { -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM FILE *fp; int fd; #endif @@ -2437,7 +2437,7 @@ dump_packet_and_trunc(u_char *user, cons capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, CAP_DAC_OVERRIDE); capng_apply(CAPNG_SELECT_BOTH); #endif /* HAVE_LIBCAP_NG */ -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM fd = openat(dump_info->dirfd, dump_info->CurrentFileName, O_CREAT | O_WRONLY | O_TRUNC, 0644); @@ -2451,7 +2451,7 @@ dump_packet_and_trunc(u_char *user, cons dump_info->CurrentFileName); } dump_info->p = pcap_dump_fopen(dump_info->pd, fp); -#else /* !__FreeBSD__ */ +#else /* !HAVE_CAPSICUM */ dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName); #endif #ifdef HAVE_LIBCAP_NG @@ -2460,7 +2460,7 @@ dump_packet_and_trunc(u_char *user, cons #endif /* HAVE_LIBCAP_NG */ if (dump_info->p == NULL) error("%s", pcap_geterr(pd)); -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM set_dumper_capsicum_rights(dump_info->p); #endif } @@ -2477,7 +2477,7 @@ dump_packet_and_trunc(u_char *user, cons if (size == -1) error("ftell fails on output file"); if (size > Cflag) { -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM FILE *fp; int fd; #endif @@ -2509,7 +2509,7 @@ dump_packet_and_trunc(u_char *user, cons capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, CAP_DAC_OVERRIDE); capng_apply(CAPNG_SELECT_BOTH); #endif /* HAVE_LIBCAP_NG */ -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM fd = openat(dump_info->dirfd, dump_info->CurrentFileName, O_CREAT | O_WRONLY | O_TRUNC, 0644); if (fd < 0) { @@ -2522,7 +2522,7 @@ dump_packet_and_trunc(u_char *user, cons dump_info->CurrentFileName); } dump_info->p = pcap_dump_fopen(dump_info->pd, fp); -#else /* !__FreeBSD__ */ +#else /* !HAVE_CAPSICUM */ dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName); #endif #ifdef HAVE_LIBCAP_NG @@ -2531,7 +2531,7 @@ dump_packet_and_trunc(u_char *user, cons #endif /* HAVE_LIBCAP_NG */ if (dump_info->p == NULL) error("%s", pcap_geterr(pd)); -#ifdef __FreeBSD__ +#ifdef HAVE_CAPSICUM set_dumper_capsicum_rights(dump_info->p); #endif } Modified: head/usr.sbin/tcpdump/tcpdump/config.h ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/config.h Thu Feb 2 19:50:28 2017 (r313103) +++ head/usr.sbin/tcpdump/tcpdump/config.h Thu Feb 2 19:56:41 2017 (r313104) @@ -13,6 +13,9 @@ /* Define to 1 if you have the `bpf_dump' function. */ #define HAVE_BPF_DUMP 1 +/* capsicum support available */ +#define HAVE_CAPSICUM 1 + /* Casper library support available */ /* See Makefile */ /* #undef HAVE_CASPER */ From owner-svn-src-all@freebsd.org Thu Feb 2 20:00:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58AA1CCDD75; Thu, 2 Feb 2017 20:00:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAEC7E02; Thu, 2 Feb 2017 20:00:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12K02Go057513; Thu, 2 Feb 2017 20:00:02 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12K01wT057505; Thu, 2 Feb 2017 20:00:01 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201702022000.v12K01wT057505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 2 Feb 2017 20:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313105 - in head/contrib/byacc: . package package/debian package/pkgsrc test test/btyacc test/yacc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 20:00:03 -0000 Author: jkim Date: Thu Feb 2 20:00:01 2017 New Revision: 313105 URL: https://svnweb.freebsd.org/changeset/base/313105 Log: MFV: r313101 Update byacc to 20170201. Added: head/contrib/byacc/test/btyacc/expr.oxout.error - copied unchanged from r313101, vendor/byacc/dist/test/btyacc/expr.oxout.error head/contrib/byacc/test/btyacc/expr.oxout.output - copied unchanged from r313101, vendor/byacc/dist/test/btyacc/expr.oxout.output head/contrib/byacc/test/btyacc/expr.oxout.tab.c - copied unchanged from r313101, vendor/byacc/dist/test/btyacc/expr.oxout.tab.c head/contrib/byacc/test/btyacc/expr.oxout.tab.h - copied unchanged from r313101, vendor/byacc/dist/test/btyacc/expr.oxout.tab.h head/contrib/byacc/test/expr.oxout.y - copied unchanged from r313101, vendor/byacc/dist/test/expr.oxout.y head/contrib/byacc/test/yacc/expr.oxout.error - copied unchanged from r313101, vendor/byacc/dist/test/yacc/expr.oxout.error head/contrib/byacc/test/yacc/expr.oxout.output - copied unchanged from r313101, vendor/byacc/dist/test/yacc/expr.oxout.output head/contrib/byacc/test/yacc/expr.oxout.tab.c - copied unchanged from r313101, vendor/byacc/dist/test/yacc/expr.oxout.tab.c head/contrib/byacc/test/yacc/expr.oxout.tab.h - copied unchanged from r313101, vendor/byacc/dist/test/yacc/expr.oxout.tab.h Modified: head/contrib/byacc/CHANGES head/contrib/byacc/MANIFEST head/contrib/byacc/VERSION head/contrib/byacc/aclocal.m4 head/contrib/byacc/config.guess head/contrib/byacc/config.sub head/contrib/byacc/configure head/contrib/byacc/defs.h head/contrib/byacc/main.c head/contrib/byacc/package/byacc.spec head/contrib/byacc/package/debian/changelog head/contrib/byacc/package/debian/copyright head/contrib/byacc/package/mingw-byacc.spec head/contrib/byacc/package/pkgsrc/Makefile head/contrib/byacc/reader.c Directory Properties: head/contrib/byacc/ (props changed) Modified: head/contrib/byacc/CHANGES ============================================================================== --- head/contrib/byacc/CHANGES Thu Feb 2 19:56:41 2017 (r313104) +++ head/contrib/byacc/CHANGES Thu Feb 2 20:00:01 2017 (r313105) @@ -1,3 +1,33 @@ +2017-02-01 Thomas E. Dickey + + * test/btyacc/expr.oxout.error, test/btyacc/expr.oxout.output, test/btyacc/expr.oxout.tab.c, test/btyacc/expr.oxout.tab.h, test/yacc/expr.oxout.error, test/yacc/expr.oxout.output, test/yacc/expr.oxout.tab.c, test/yacc/expr.oxout.tab.h: + RCS_BASE + + * package/debian/copyright: update copyright + + * reader.c, defs.h, main.c: + avoid using regex.h since some low-end platforms do not have this + + * test/expr.oxout.y: RCS_BASE + + * configure: regen + + * aclocal.m4: quiet a strict gcc warning in CF_MKSTEMP + +2017-02-01 Tom.Shields + + * main.c, reader.c, defs.h: + process #line directives, like bison and flex + +2017-02-01 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2016-12-31 Thomas E. Dickey + + * config.guess, config.sub: 2017-01-01 + 2016-12-02 Thomas E. Dickey * test/btyacc/quote_calc4-s.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/rename_debug.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc /btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, btyaccpar.c: Modified: head/contrib/byacc/MANIFEST ============================================================================== --- head/contrib/byacc/MANIFEST Thu Feb 2 19:56:41 2017 (r313104) +++ head/contrib/byacc/MANIFEST Thu Feb 2 20:00:01 2017 (r313105) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20161202, version t20161202 +MANIFEST for byacc-20170201, version t20170201 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 @@ -77,6 +77,22 @@ test/btyacc/btyacc_demo.error referenc test/btyacc/btyacc_demo.output reference output for testing test/btyacc/btyacc_demo.tab.c reference output for testing test/btyacc/btyacc_demo.tab.h reference output for testing +test/btyacc/btyacc_demo2.error reference output for testing +test/btyacc/btyacc_demo2.output reference output for testing +test/btyacc/btyacc_demo2.tab.c reference output for testing +test/btyacc/btyacc_demo2.tab.h reference output for testing +test/btyacc/btyacc_destroy1.error reference output for testing +test/btyacc/btyacc_destroy1.output reference output for testing +test/btyacc/btyacc_destroy1.tab.c reference output for testing +test/btyacc/btyacc_destroy1.tab.h reference output for testing +test/btyacc/btyacc_destroy2.error reference output for testing +test/btyacc/btyacc_destroy2.output reference output for testing +test/btyacc/btyacc_destroy2.tab.c reference output for testing +test/btyacc/btyacc_destroy2.tab.h reference output for testing +test/btyacc/btyacc_destroy3.error reference output for testing +test/btyacc/btyacc_destroy3.output reference output for testing +test/btyacc/btyacc_destroy3.tab.c reference output for testing +test/btyacc/btyacc_destroy3.tab.h reference output for testing test/btyacc/calc.error reference output for testing test/btyacc/calc.output reference output for testing test/btyacc/calc.tab.c reference output for testing @@ -256,6 +272,10 @@ test/btyacc/error.error referenc test/btyacc/error.output reference output for testing test/btyacc/error.tab.c reference output for testing test/btyacc/error.tab.h reference output for testing +test/btyacc/expr.oxout.error reference output for testing +test/btyacc/expr.oxout.output reference output for testing +test/btyacc/expr.oxout.tab.c reference output for testing +test/btyacc/expr.oxout.tab.h reference output for testing test/btyacc/grammar.dot reference output for testing test/btyacc/grammar.error reference output for testing test/btyacc/grammar.output reference output for testing @@ -359,6 +379,9 @@ test/btyacc/varsyntax_calc1.tab.h refer test subdirectory test/btyacc_calc1.y testcase for btyacc test/btyacc_demo.y testcase for btyacc +test/btyacc_destroy1.y btyacc test-case for %parse-param +test/btyacc_destroy2.y btyacc test-case for %parse-param +test/btyacc_destroy3.y btyacc test-case for %parse-param test/calc.y example from VMS freeware version of byacc test/calc1.y advanced example from Steve Johnson's paper. test/calc2.y test-cases and reference files for %lex-param / %parse-param @@ -403,6 +426,7 @@ test/err_syntax8.y testcase test/err_syntax8a.y testcase for used_reserved() test/err_syntax9.y testcase for tokenized_start() test/error.y original version of byacc - 1993 +test/expr.oxout.y test-case for "#line" feature test/grammar.y grammar from cproto test/inherit0.y testcase for btyacc test/inherit1.y testcase for btyacc @@ -577,6 +601,10 @@ test/yacc/error.error referenc test/yacc/error.output reference output for testing test/yacc/error.tab.c reference output for testing test/yacc/error.tab.h reference output for testing +test/yacc/expr.oxout.error reference output for testing +test/yacc/expr.oxout.output reference output for testing +test/yacc/expr.oxout.tab.c reference output for testing +test/yacc/expr.oxout.tab.h reference output for testing test/yacc/grammar.dot reference output for testing test/yacc/grammar.error reference output for testing test/yacc/grammar.output reference output for testing Modified: head/contrib/byacc/VERSION ============================================================================== --- head/contrib/byacc/VERSION Thu Feb 2 19:56:41 2017 (r313104) +++ head/contrib/byacc/VERSION Thu Feb 2 20:00:01 2017 (r313105) @@ -1 +1 @@ -20161202 +20170201 Modified: head/contrib/byacc/aclocal.m4 ============================================================================== --- head/contrib/byacc/aclocal.m4 Thu Feb 2 19:56:41 2017 (r313104) +++ head/contrib/byacc/aclocal.m4 Thu Feb 2 20:00:01 2017 (r313105) @@ -1,7 +1,7 @@ -dnl $Id: aclocal.m4,v 1.41 2016/12/02 13:03:06 tom Exp $ +dnl $Id: aclocal.m4,v 1.42 2017/02/01 10:12:21 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- -dnl Copyright 2004-2015,2016 Thomas E. Dickey +dnl Copyright 2004-2016,2017 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -803,20 +803,26 @@ fi test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MKSTEMP version: 9 updated: 2012/10/03 04:34:49 +dnl CF_MKSTEMP version: 10 updated: 2017/01/21 11:12:16 dnl ---------- dnl Check for a working mkstemp. This creates two files, checks that they are dnl successfully created and distinct (AmigaOS apparently fails on the last). AC_DEFUN([CF_MKSTEMP],[ +AC_CHECK_HEADERS( \ +unistd.h \ +) AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[ rm -rf conftest* AC_TRY_RUN([ #include +#ifdef HAVE_UNISTD_H +#include +#endif #include #include #include #include -int main() +int main(void) { char *tmpl = "conftestXXXXXX"; char name[2][80]; Modified: head/contrib/byacc/config.guess ============================================================================== --- head/contrib/byacc/config.guess Thu Feb 2 19:56:41 2017 (r313104) +++ head/contrib/byacc/config.guess Thu Feb 2 20:00:01 2017 (r313105) @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-10-02' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." Modified: head/contrib/byacc/config.sub ============================================================================== --- head/contrib/byacc/config.sub Thu Feb 2 19:56:41 2017 (r313104) +++ head/contrib/byacc/config.sub Thu Feb 2 20:00:01 2017 (r313105) @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-11-19' +timestamp='2017-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ Report bugs and patches to &5 +for ac_header in \ +unistd.h \ + +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:3919: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3925 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3929: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3935: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:3954: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6 if test "${cf_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3922,15 +3972,18 @@ if test "$cross_compiling" = yes; then cf_cv_func_mkstemp=maybe else cat >conftest.$ac_ext <<_ACEOF -#line 3925 "configure" +#line 3975 "configure" #include "confdefs.h" #include +#ifdef HAVE_UNISTD_H +#include +#endif #include #include #include #include -int main() +int main(void) { char *tmpl = "conftestXXXXXX"; char name[2][80]; @@ -3960,15 +4013,15 @@ int main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3963: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4016: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3966: \$? = $ac_status" >&5 + echo "$as_me:4019: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3968: \"$ac_try\"") >&5 + { (eval echo "$as_me:4021: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3971: \$? = $ac_status" >&5 + echo "$as_me:4024: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_mkstemp=yes @@ -3983,16 +4036,16 @@ rm -f core core.* *.core conftest$ac_exe fi fi -echo "$as_me:3986: result: $cf_cv_func_mkstemp" >&5 +echo "$as_me:4039: result: $cf_cv_func_mkstemp" >&5 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6 if test "x$cf_cv_func_mkstemp" = xmaybe ; then - echo "$as_me:3989: checking for mkstemp" >&5 + echo "$as_me:4042: checking for mkstemp" >&5 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 if test "${ac_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3995 "configure" +#line 4048 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mkstemp (); below. */ @@ -4023,16 +4076,16 @@ f = mkstemp; /* workaround for ICC 12.0. } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4026: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4079: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4029: \$? = $ac_status" >&5 + echo "$as_me:4082: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4032: \"$ac_try\"") >&5 + { (eval echo "$as_me:4085: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4035: \$? = $ac_status" >&5 + echo "$as_me:4088: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mkstemp=yes else @@ -4042,7 +4095,7 @@ ac_cv_func_mkstemp=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4045: result: $ac_cv_func_mkstemp" >&5 +echo "$as_me:4098: result: $ac_cv_func_mkstemp" >&5 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 fi @@ -4057,13 +4110,13 @@ fi for ac_func in vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:4060: checking for $ac_func" >&5 +echo "$as_me:4113: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4066 "configure" +#line 4119 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -4094,16 +4147,16 @@ f = $ac_func; /* workaround for ICC 12.0 } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4097: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4150: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4100: \$? = $ac_status" >&5 + echo "$as_me:4153: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4103: \"$ac_try\"") >&5 + { (eval echo "$as_me:4156: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4106: \$? = $ac_status" >&5 + echo "$as_me:4159: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -4113,7 +4166,7 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4116: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:4169: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <&5 +echo "$as_me:4179: checking for maximum table size" >&5 echo $ECHO_N "checking for maximum table size... $ECHO_C" >&6 # Check whether --with-max-table-size or --without-max-table-size was given. @@ -4133,12 +4186,12 @@ if test "${with_max_table_size+set}" = s fi; if test -n "$with_max_table_size" then - echo "$as_me:4136: result: $with_max_table_size" >&5 + echo "$as_me:4189: result: $with_max_table_size" >&5 echo "${ECHO_T}$with_max_table_size" >&6 check=`expr "$with_max_table_size" + 0` if test "x$check" != "x$with_max_table_size" then - { { echo "$as_me:4141: error: invalid value for --with-max-table-size: $with_max_table_size" >&5 + { { echo "$as_me:4194: error: invalid value for --with-max-table-size: $with_max_table_size" >&5 echo "$as_me: error: invalid value for --with-max-table-size: $with_max_table_size" >&2;} { (exit 1); exit 1; }; } fi @@ -4148,11 +4201,11 @@ cat >>confdefs.h <&5 + echo "$as_me:4204: result: default" >&5 echo "${ECHO_T}default" >&6 fi -echo "$as_me:4155: checking if backtracking extension is wanted" >&5 +echo "$as_me:4208: checking if backtracking extension is wanted" >&5 echo $ECHO_N "checking if backtracking extension is wanted... $ECHO_C" >&6 # Check whether --enable-btyacc or --disable-btyacc was given. @@ -4160,7 +4213,7 @@ if test "${enable_btyacc+set}" = set; th enableval="$enable_btyacc" fi; -echo "$as_me:4163: result: $enable_btyacc" >&5 +echo "$as_me:4216: result: $enable_btyacc" >&5 echo "${ECHO_T}$enable_btyacc" >&6 if test "$enable_btyacc" = "yes"; then @@ -4175,7 +4228,7 @@ fi if ( test "$GCC" = yes || test "$GXX" = yes ) then -echo "$as_me:4178: checking if you want to check for gcc warnings" >&5 +echo "$as_me:4231: checking if you want to check for gcc warnings" >&5 echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6 # Check whether --with-warnings or --without-warnings was given. @@ -4185,7 +4238,7 @@ if test "${with_warnings+set}" = set; th else cf_opt_with_warnings=no fi; -echo "$as_me:4188: result: $cf_opt_with_warnings" >&5 +echo "$as_me:4241: result: $cf_opt_with_warnings" >&5 echo "${ECHO_T}$cf_opt_with_warnings" >&6 if test "$cf_opt_with_warnings" != no ; then @@ -4207,10 +4260,10 @@ cat > conftest.i <&5 + { echo "$as_me:4263: checking for $CC __attribute__ directives..." >&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > conftest.$ac_ext <&5 + if { (eval echo "$as_me:4315: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4265: \$? = $ac_status" >&5 + echo "$as_me:4318: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:4267: result: ... $cf_attribute" >&5 + test -n "$verbose" && echo "$as_me:4320: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h case $cf_attribute in @@ -4328,12 +4381,12 @@ INTEL_COMPILER=no if test "$GCC" = yes ; then case $host_os in (linux*|gnu*) - echo "$as_me:4331: checking if this is really Intel C compiler" >&5 + echo "$as_me:4384: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >conftest.$ac_ext <<_ACEOF -#line 4336 "configure" +#line 4389 "configure" #include "confdefs.h" int @@ -4350,16 +4403,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4353: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4406: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4356: \$? = $ac_status" >&5 + echo "$as_me:4409: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4359: \"$ac_try\"") >&5 + { (eval echo "$as_me:4412: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4362: \$? = $ac_status" >&5 + echo "$as_me:4415: \$? = $ac_status" >&5 (exit $ac_status); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" @@ -4370,7 +4423,7 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" - echo "$as_me:4373: result: $INTEL_COMPILER" >&5 + echo "$as_me:4426: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac @@ -4379,12 +4432,12 @@ fi CLANG_COMPILER=no if test "$GCC" = yes ; then - echo "$as_me:4382: checking if this is really Clang C compiler" >&5 + echo "$as_me:4435: checking if this is really Clang C compiler" >&5 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Qunused-arguments" cat >conftest.$ac_ext <<_ACEOF -#line 4387 "configure" +#line 4440 "configure" #include "confdefs.h" int @@ -4401,16 +4454,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4404: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:4457: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4407: \$? = $ac_status" >&5 + echo "$as_me:4460: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4410: \"$ac_try\"") >&5 + { (eval echo "$as_me:4463: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4413: \$? = $ac_status" >&5 + echo "$as_me:4466: \$? = $ac_status" >&5 (exit $ac_status); }; }; then CLANG_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" @@ -4421,12 +4474,12 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$cf_save_CFLAGS" - echo "$as_me:4424: result: $CLANG_COMPILER" >&5 + echo "$as_me:4477: result: $CLANG_COMPILER" >&5 echo "${ECHO_T}$CLANG_COMPILER" >&6 fi cat > conftest.$ac_ext <&5 + { echo "$as_me:4499: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-Wall" @@ -4459,12 +4512,12 @@ echo "$as_me: checking for $CC warning o wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:4462: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:4515: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4465: \$? = $ac_status" >&5 + echo "$as_me:4518: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:4467: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:4520: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi @@ -4473,7 +4526,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 elif test "$GCC" = yes then - { echo "$as_me:4476: checking for $CC warning options..." >&5 + { echo "$as_me:4529: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS= @@ -4497,12 +4550,12 @@ echo "$as_me: checking for $CC warning o Wundef $cf_gcc_warnings $cf_warn_CONST Wwrite-strings do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo "$as_me:4500: \"$ac_compile\"") >&5 + if { (eval echo "$as_me:4553: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4503: \$? = $ac_status" >&5 + echo "$as_me:4556: \$? = $ac_status" >&5 (exit $ac_status); }; then - test -n "$verbose" && echo "$as_me:4505: result: ... -$cf_opt" >&5 + test -n "$verbose" && echo "$as_me:4558: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case $cf_opt in (Wcast-qual) @@ -4513,7 +4566,7 @@ echo "${ECHO_T}... -$cf_opt" >&6 ([34].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:4516: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:4569: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -4523,7 +4576,7 @@ echo "${as_me:-configure}:4516: testing ([12].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 -echo "${as_me:-configure}:4526: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 +echo "${as_me:-configure}:4579: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac @@ -4539,7 +4592,7 @@ rm -rf conftest* fi fi -echo "$as_me:4542: checking if you want to see long compiling messages" >&5 +echo "$as_me:4595: checking if you want to see long compiling messages" >&5 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6 # Check whether --enable-echo or --disable-echo was given. @@ -4573,10 +4626,10 @@ else ECHO_CC='' fi; -echo "$as_me:4576: result: $enableval" >&5 +echo "$as_me:4629: result: $enableval" >&5 echo "${ECHO_T}$enableval" >&6 -echo "$as_me:4579: checking if you want to use dmalloc for testing" >&5 +echo "$as_me:4632: checking if you want to use dmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6 # Check whether --with-dmalloc or --without-dmalloc was given. @@ -4593,7 +4646,7 @@ EOF else with_dmalloc= fi; -echo "$as_me:4596: result: ${with_dmalloc:-no}" >&5 +echo "$as_me:4649: result: ${with_dmalloc:-no}" >&5 echo "${ECHO_T}${with_dmalloc:-no}" >&6 case .$with_cflags in @@ -4687,23 +4740,23 @@ fi esac if test "$with_dmalloc" = yes ; then - echo "$as_me:4690: checking for dmalloc.h" >&5 + echo "$as_me:4743: checking for dmalloc.h" >&5 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4696 "configure" +#line 4749 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:4700: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:4753: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4706: \$? = $ac_status" >&5 + echo "$as_me:4759: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -4722,11 +4775,11 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:4725: result: $ac_cv_header_dmalloc_h" >&5 +echo "$as_me:4778: result: $ac_cv_header_dmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 if test $ac_cv_header_dmalloc_h = yes; then -echo "$as_me:4729: checking for dmalloc_debug in -ldmalloc" >&5 +echo "$as_me:4782: checking for dmalloc_debug in -ldmalloc" >&5 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4734,7 +4787,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4737 "configure" +#line 4790 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4753,16 +4806,16 @@ dmalloc_debug (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4756: \"$ac_link\"") >&5 +if { (eval echo "$as_me:4809: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4759: \$? = $ac_status" >&5 + echo "$as_me:4812: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4762: \"$ac_try\"") >&5 + { (eval echo "$as_me:4815: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4765: \$? = $ac_status" >&5 + echo "$as_me:4818: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dmalloc_dmalloc_debug=yes else @@ -4773,7 +4826,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4776: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 +echo "$as_me:4829: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then cat >>confdefs.h <&5 +echo "$as_me:4844: checking if you want to use dbmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6 # Check whether --with-dbmalloc or --without-dbmalloc was given. @@ -4805,7 +4858,7 @@ EOF else with_dbmalloc= fi; -echo "$as_me:4808: result: ${with_dbmalloc:-no}" >&5 +echo "$as_me:4861: result: ${with_dbmalloc:-no}" >&5 echo "${ECHO_T}${with_dbmalloc:-no}" >&6 case .$with_cflags in @@ -4899,23 +4952,23 @@ fi esac if test "$with_dbmalloc" = yes ; then - echo "$as_me:4902: checking for dbmalloc.h" >&5 + echo "$as_me:4955: checking for dbmalloc.h" >&5 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dbmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4908 "configure" +#line 4961 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:4912: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:4965: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4918: \$? = $ac_status" >&5 + echo "$as_me:4971: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -4934,11 +4987,11 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:4937: result: $ac_cv_header_dbmalloc_h" >&5 +echo "$as_me:4990: result: $ac_cv_header_dbmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6 if test $ac_cv_header_dbmalloc_h = yes; then -echo "$as_me:4941: checking for debug_malloc in -ldbmalloc" >&5 +echo "$as_me:4994: checking for debug_malloc in -ldbmalloc" >&5 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4946,7 +4999,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldbmalloc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4949 "configure" +#line 5002 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4965,16 +5018,16 @@ debug_malloc (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4968: \"$ac_link\"") >&5 +if { (eval echo "$as_me:5021: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4971: \$? = $ac_status" >&5 + echo "$as_me:5024: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4974: \"$ac_try\"") >&5 + { (eval echo "$as_me:5027: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4977: \$? = $ac_status" >&5 + echo "$as_me:5030: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dbmalloc_debug_malloc=yes else @@ -4985,7 +5038,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4988: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 +echo "$as_me:5041: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then cat >>confdefs.h <&5 +echo "$as_me:5056: checking if you want to use valgrind for testing" >&5 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6 # Check whether --with-valgrind or --without-valgrind was given. @@ -5017,7 +5070,7 @@ EOF else with_valgrind= fi; -echo "$as_me:5020: result: ${with_valgrind:-no}" >&5 +echo "$as_me:5073: result: ${with_valgrind:-no}" >&5 echo "${ECHO_T}${with_valgrind:-no}" >&6 case .$with_cflags in @@ -5110,7 +5163,7 @@ fi ;; esac -echo "$as_me:5113: checking if you want to perform memory-leak testing" >&5 +echo "$as_me:5166: checking if you want to perform memory-leak testing" >&5 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6 # Check whether --enable-leaks or --disable-leaks was given. @@ -5120,7 +5173,7 @@ if test "${enable_leaks+set}" = set; the else : ${with_no_leaks:=no} fi; -echo "$as_me:5123: result: $with_no_leaks" >&5 +echo "$as_me:5176: result: $with_no_leaks" >&5 echo "${ECHO_T}$with_no_leaks" >&6 if test "$with_no_leaks" = yes ; then @@ -5137,7 +5190,7 @@ fi # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 -echo "$as_me:5140: checking for $ac_word" >&5 +echo "$as_me:5193: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GROFF_PATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5154,7 +5207,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_GROFF_PATH="$ac_dir/$ac_word" - echo "$as_me:5157: found $ac_dir/$ac_word" >&5 + echo "$as_me:5210: found $ac_dir/$ac_word" >&5 break fi done @@ -5166,16 +5219,16 @@ fi GROFF_PATH=$ac_cv_path_GROFF_PATH if test -n "$GROFF_PATH"; then - echo "$as_me:5169: result: $GROFF_PATH" >&5 + echo "$as_me:5222: result: $GROFF_PATH" >&5 echo "${ECHO_T}$GROFF_PATH" >&6 else - echo "$as_me:5172: result: no" >&5 + echo "$as_me:5225: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "nroff", so it can be a program name with args. set dummy nroff; ac_word=$2 -echo "$as_me:5178: checking for $ac_word" >&5 +echo "$as_me:5231: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_NROFF_PATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5192,7 +5245,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_NROFF_PATH="$ac_dir/$ac_word" - echo "$as_me:5195: found $ac_dir/$ac_word" >&5 + echo "$as_me:5248: found $ac_dir/$ac_word" >&5 break fi done @@ -5204,10 +5257,10 @@ fi NROFF_PATH=$ac_cv_path_NROFF_PATH if test -n "$NROFF_PATH"; then - echo "$as_me:5207: result: $NROFF_PATH" >&5 + echo "$as_me:5260: result: $NROFF_PATH" >&5 echo "${ECHO_T}$NROFF_PATH" >&6 else - echo "$as_me:5210: result: no" >&5 + echo "$as_me:5263: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -5220,7 +5273,7 @@ else GROFF_NOTE= fi -echo "$as_me:5223: checking for program to convert manpage to html" >&5 +echo "$as_me:5276: checking for program to convert manpage to html" >&5 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6 # Check whether --with-man2html or --without-man2html was given. @@ -5235,11 +5288,11 @@ cf_with_groff=no case $cf_man2html in (yes) - echo "$as_me:5238: result: man2html" >&5 + echo "$as_me:5291: result: man2html" >&5 echo "${ECHO_T}man2html" >&6 # Extract the first word of "man2html", so it can be a program name with args. set dummy man2html; ac_word=$2 -echo "$as_me:5242: checking for $ac_word" >&5 +echo "$as_me:5295: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Feb 2 20:01:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD8D0CCDE11; Thu, 2 Feb 2017 20:01:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D3AA1152; Thu, 2 Feb 2017 20:01:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12K1sLj059125; Thu, 2 Feb 2017 20:01:54 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12K1s0Q059124; Thu, 2 Feb 2017 20:01:54 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201702022001.v12K1s0Q059124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 2 Feb 2017 20:01:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313106 - head/usr.bin/yacc/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 20:01:55 -0000 Author: jkim Date: Thu Feb 2 20:01:54 2017 New Revision: 313106 URL: https://svnweb.freebsd.org/changeset/base/313106 Log: Update byacc regression tests to match 20170201. Modified: head/usr.bin/yacc/tests/Makefile Modified: head/usr.bin/yacc/tests/Makefile ============================================================================== --- head/usr.bin/yacc/tests/Makefile Thu Feb 2 20:00:01 2017 (r313105) +++ head/usr.bin/yacc/tests/Makefile Thu Feb 2 20:01:54 2017 (r313106) @@ -25,6 +25,9 @@ FILEStestDIR= ${TESTSDIR} FILEStest+= btyacc_calc1.y FILEStest+= btyacc_demo.y +FILEStest+= btyacc_destroy1.y +FILEStest+= btyacc_destroy2.y +FILEStest+= btyacc_destroy3.y FILEStest+= calc.y FILEStest+= calc1.y FILEStest+= calc2.y @@ -69,6 +72,7 @@ FILEStest+= err_syntax8.y FILEStest+= err_syntax8a.y FILEStest+= err_syntax9.y FILEStest+= error.y +FILEStest+= expr.oxout.y FILEStest+= grammar.y FILEStest+= inherit0.y FILEStest+= inherit1.y @@ -242,6 +246,10 @@ FILEStest_yacc+= error.error FILEStest_yacc+= error.output FILEStest_yacc+= error.tab.c FILEStest_yacc+= error.tab.h +FILEStest_yacc+= expr.oxout.error +FILEStest_yacc+= expr.oxout.output +FILEStest_yacc+= expr.oxout.tab.c +FILEStest_yacc+= expr.oxout.tab.h FILEStest_yacc+= grammar.dot FILEStest_yacc+= grammar.error FILEStest_yacc+= grammar.output From owner-svn-src-all@freebsd.org Thu Feb 2 20:29:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0D30CCC5F5; Thu, 2 Feb 2017 20:29:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 9B6001E8A; Thu, 2 Feb 2017 20:29:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 8931F10559F; Fri, 3 Feb 2017 07:29:05 +1100 (AEDT) Date: Fri, 3 Feb 2017 07:29:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern In-Reply-To: <20170202184819.GP2092@kib.kiev.ua> Message-ID: <20170203062806.A2690@besplex.bde.org> References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170202184819.GP2092@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=BKLDlBYG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=gxlKNWXeVbEL2LKZ7v0A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 20:29:14 -0000 On Thu, 2 Feb 2017, Konstantin Belousov wrote: > On Tue, Jan 31, 2017 at 03:26:32AM +0000, Conrad E. Meyer wrote: >> + compile-with "${CC} -c ${CFLAGS:N-nostdinc} ${WERROR} ${PROF} -msse4 ${.IMPSRC}" \ > > BTW, new gcc has -mcrc32 option, but clang 3.9.1 apparently does not. I've almost finished fixing and optimizing this. I didn't manage to fix all the compiler pessimizations, but the result is within 5% of optimal for buffers larger than a few K. See the previous patch for -msse4 removal. It might be good to add -fno-unroll-functions to CFLAGS to prevent some clang pessimizations. Or -Os might work even better. X Index: libkern/x86/crc32_sse42.c X =================================================================== X --- libkern/x86/crc32_sse42.c (revision 313090) X +++ libkern/x86/crc32_sse42.c (working copy) X @@ -31,15 +31,41 @@ X */ X #ifdef USERSPACE_TESTING X #include X +#include X #else X #include X +#include X #include X -#include X -#include X #endif X X -#include X +static __inline uint32_t X +_mm_crc32_u8(uint32_t x, uint8_t y) X +{ X + /* X + * clang (at least 3.9.[0-1]) pessimizes "rm" (y) and "m" (y) X + * significantly and "r" (y) a lot by copying y to a different X + * local variable (on the stack or in a register), so only use X + * the latter. This costs a register and an instruction but X + * not a uop. X + */ X + __asm("crc32b %1,%0" : "+r" (x) : "r" (y)); X + return (x); X +} I haven't found a better fix. Even gcc likes to pessimize this by preferring the "r" constraint in "rm", so "r" should be disparaged. It does this to try to schedule loop control instructions in beteen the memory reference and the operation using it, but it gets this scheduling mostly wrong. -Os stops this for gcc, but clang keeps producing the large and slow explicit load (then a store to a different place in memory to use there if the constraint allows "m") even with -Os. X X +static __inline uint32_t X +_mm_crc32_u32(uint32_t x, uint32_t y) X +{ X + __asm("crc32l %1,%0" : "+r" (x) : "r" (y)); X + return (x); X +} X + X +static __inline uint64_t X +_mm_crc32_u64(uint64_t x, uint64_t y) X +{ X + __asm("crc32q %1,%0" : "+r" (x) : "r" (y)); X + return (x); X +} X + X /* CRC-32C (iSCSI) polynomial in reversed bit order. */ X #define POLY 0x82f63b78 X X @@ -47,12 +73,14 @@ X * Block sizes for three-way parallel crc computation. LONG and SHORT must X * both be powers of two. X */ X -#define LONG 8192 X -#define SHORT 256 X +#define LONG 128 X +#define SHORT 64 These are now the smallest that work right on Haswell. Practical values should be larger in case the timing is to different for the manual scheduling to work. Small buffers are still slow, so LONG = SHORT = 1024 (with no LONG loop) would be a good practical value, except for the annoying problem that the 3-way optimization doesn't work so well for normal power-of-2 buffer sizes. LONG = SHORT = 1024 is perfect for buffer sizes of a multiple of 3K. It does 4K as 3K + 1K, with the 3K part optimized and the 1K part unoptimized and taking as long as the 3K part. LONG = 1024 with SHORT = 64 does the residual 1K at almost full speed except for another residual of 192. X X /* Tables for hardware crc that shift a crc by LONG and SHORT zeros. */ X static uint32_t crc32c_long[4][256]; X +static uint32_t crc32c_2long[4][256]; X static uint32_t crc32c_short[4][256]; X +static uint32_t crc32c_2short[4][256]; X X /* X * Multiply a matrix times a vector over the Galois field of two elements, X @@ -171,7 +199,9 @@ X crc32c_init_hw(void) X { X crc32c_zeros(crc32c_long, LONG); X + crc32c_zeros(crc32c_2long, 2 * LONG); X crc32c_zeros(crc32c_short, SHORT); X + crc32c_zeros(crc32c_2short, 2 * SHORT); X } X #ifdef _KERNEL X SYSINIT(crc32c_sse42, SI_SUB_LOCK, SI_ORDER_ANY, crc32c_init_hw, NULL); X @@ -190,7 +220,11 @@ X const size_t align = 4; X #endif X const unsigned char *next, *end; X - uint64_t crc0, crc1, crc2; /* need to be 64 bits for crc32q */ X +#ifdef __amd64__ X + uint64_t crc0, crc1, crc2; X +#else X + uint32_t crc0, crc1, crc2; X +#endif X X next = buf; X crc0 = crc; The type system doesn't work well here. The crc32* instruction returns a 32-bit value in a register of unclear size. I think it is zero extended to full width, but my asms aren't written quite right to say this and neither are the instrinsics. The 64-bit intrinsic returns a 64-bit value which just gets in the way. The above has to declare the type as uint64_t for amd64, else pessimizations result. That gives smaller pessimizations, mainly with gcc, for expressions like (crc0 >> 24) where the 64-bit declaration doesn't make it clear that the top bits are zero, so extra zeroing operations may be necessary. I have barely tested the 32-bit case, but the 64-bit type is clearly wasted then (but easier to optimize away since no crc intrinsic returns it). LONG and SHORT should be about half as large in the 32-bit case, since they should scale with the number of crc32 operations in the inner loop. X @@ -202,6 +236,7 @@ X len--; X } X X +#if LONG > SHORT X /* X * Compute the crc on sets of LONG*3 bytes, executing three independent X * crc instructions, each on LONG bytes -- this is optimized for the X @@ -209,6 +244,7 @@ X * have a throughput of one crc per cycle, but a latency of three X * cycles. X */ X + crc = 0; X while (len >= LONG * 3) { X crc1 = 0; X crc2 = 0; X @@ -229,16 +265,64 @@ X #endif X next += align; X } while (next < end); X - crc0 = crc32c_shift(crc32c_long, crc0) ^ crc1; X - crc0 = crc32c_shift(crc32c_long, crc0) ^ crc2; X + /*- X + * Update the crc. Try to do it in parallel with the inner X + * loop. 'crc' is used to accumulate crc0 and crc1 X + * produced by the inner loop so that the next iteration X + * of the loop doesn't depend on anything except crc2. X + * X + * The full expression for the update is: X + * crc = S*S*S*crc + S*S*crc0 + S*crc1 X + * where the terms are polynomials modulo the CRC polynomial. X + * We regroup this subtly as: X + * crc = S*S * (S * crc + crc0) + S*crc1. X + * This has an extra dependency which reduces possible X + * parallelism for the expression, but it turns out to be X + * best to intentionally delay evaluation of this expression X + * so that it competes less with the inner loop. X + * X + * We also intentionally reduce parallelism by feedng back X + * crc2 to the inner loop as crc0 instead of accumulating X + * it in crc. This synchronizes the loop with crc update. X + * CPU and/or compiler schedulers produced bad order without X + * this. X + * X + * Shifts take about 12 cycles each, so 3 here with 2 X + * parallelizable take about 24 cycles and the crc update X + * takes slightly longer. 8 dependent crc32 instructions X + * can run in 24 cycles, so the 3-way blocking is worse X + * than useless for sizes less than 8 * = 64 X + * on amd64. In practice, SHORT = 32 confirms these X + * timing calculations by giving a small improvement X + * starting at size 96. Then the inner loop takes about X + * 12 cycles and the crc update about 24, but these are X + * partly in parallel so the total time is less than the X + * 36 cycles that 12 dependent crc32 instructions would X + * take. X + * X + * To have a chance of completely hiding the overhead for X + * the crc update, the inner loop must take considerably X + * longer than 24 cycles. LONG = 64 makes the inner loop X + * take about 24 cycles, so is not quite large enough. X + * LONG = 128 works OK. Unhideable overheads are about X + * 12 cycles per inner loop. All assuming timing like X + * Haswell. X + */ X + crc = crc32c_shift(crc32c_long, crc) ^ crc0; X + crc1 = crc32c_shift(crc32c_long, crc1); X + crc = crc32c_shift(crc32c_2long, crc) ^ crc1; X + crc0 = crc2; X next += LONG * 2; X len -= LONG * 3; X } X + crc0 ^= crc; X +#endif /* LONG > SHORT */ See the comment. Optimizing this was similar to optimizing polynomial expressions in libm. Higher power of S are best avoided, since the parallelism for combining results is limited. X X /* X * Do the same thing, but now on SHORT*3 blocks for the remaining data X * less than a LONG*3 block X */ X + crc = 0; X while (len >= SHORT * 3) { X crc1 = 0; X crc2 = 0; X @@ -259,11 +343,14 @@ X #endif X next += align; X } while (next < end); X - crc0 = crc32c_shift(crc32c_short, crc0) ^ crc1; X - crc0 = crc32c_shift(crc32c_short, crc0) ^ crc2; X + crc = crc32c_shift(crc32c_short, crc) ^ crc0; X + crc1 = crc32c_shift(crc32c_short, crc1); X + crc = crc32c_shift(crc32c_2short, crc) ^ crc1; X + crc0 = crc2; A simpler method that almost works is: crc0 = crc32c_shift(crc32c_2short, crc0); crc1 = crc32c_shift(crc32c_short, crc1); /* crc2 unchanged, and crc not used. */ These updates run in parallel, so the inner loop only has to wait half as long to restart. With the old SHORT = 256, the timing was approx. 96 cycles for the inner loop, then 24 cycles for the CRC update (33% overhead). This simpler change reduces the overhead to 17%). With the new LONG = 128, the inner loop takes about 48 cycles and the update about 24, mostly in parallel so that they have zero overhead except for the last iteration. Compiler "optimizations" of rearranging this code tend to break the parallelism. X next += SHORT * 2; X len -= SHORT * 3; X } X + crc0 ^= crc; X X /* Compute the crc on the remaining bytes at native word size. */ X end = next + (len - (len & (align - 1))); Bruce From owner-svn-src-all@freebsd.org Thu Feb 2 20:30:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EFF3CCC780; Thu, 2 Feb 2017 20:30:52 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E57D7C7; Thu, 2 Feb 2017 20:30:51 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12KUpqS072621; Thu, 2 Feb 2017 20:30:51 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12KUoxk072619; Thu, 2 Feb 2017 20:30:50 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201702022030.v12KUoxk072619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Thu, 2 Feb 2017 20:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313107 - head/libexec/getty X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 20:30:52 -0000 Author: danfe (ports committer) Date: Thu Feb 2 20:30:50 2017 New Revision: 313107 URL: https://svnweb.freebsd.org/changeset/base/313107 Log: Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8) There is one capability explicitly documented in gettytab(5) as stupid: he. And it is indeed. It was meant to facilitate system hostname modification, but is hardly usable in practice because it allows very limited editing (e.g., it depends on a particular hostname length, making it non-generic). Replace it with simple implementation that treats ``he'' as POSIX extended regular expression which is matched against the hostname. If there are no parenthesized subexpressions in the pattern, entire matched string is used as the final hostname. Otherwise, use the first matched subexpression. If the pattern does not match, the original hostname is not modified. Using regex(3) gives more freedom, does not complicate the code very much, and makes a lot more sense, in turn making ``he'' less stupid and actually useful (e.g., it is now possible to obtain node or domain names from the original hostname string, without knowing it in advance). Reviewed by: jilles, manpages (wblock) Approved by: jilles (implied) Differential Revision: https://reviews.freebsd.org/D9244 Modified: head/libexec/getty/gettytab.5 head/libexec/getty/subr.c Modified: head/libexec/getty/gettytab.5 ============================================================================== --- head/libexec/getty/gettytab.5 Thu Feb 2 20:01:54 2017 (r313106) +++ head/libexec/getty/gettytab.5 Thu Feb 2 20:30:50 2017 (r313107) @@ -28,7 +28,7 @@ .\" from: @(#)gettytab.5 8.4 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" " -.Dd April 19, 1994 +.Dd February 2, 2017 .Dt GETTYTAB 5 .Os .Sh NAME @@ -118,7 +118,7 @@ character .Em NOT hangup line on last close .It "he str" Ta Dv NULL Ta -.No "hostname editing string" +.No "hostname editing regular expression" .It "hn str hostname hostname" .It "ht bool false terminal has real tabs" .It "hw bool false do cts/rts hardware flow control" @@ -302,18 +302,13 @@ but may also be overridden by the table entry. In either case it may be edited with the .Va \&he -string. -A '@' in the -.Va \&he -string causes one character from the real hostname to -be copied to the final hostname. -A '#' in the -.Va \&he -string causes the next character of the real hostname -to be skipped. -Each character that -is neither '@' nor '#' is copied into the final hostname. -Surplus '@' and '#' characters are ignored. +POSIX +.Dq extended +regular expression, which is matched against the hostname. +If there are no parenthesized subexpressions in the pattern, +the entire matched string is used as the final hostname; +otherwise, the first matched subexpression is used instead. +If the pattern does not match, the original hostname is not modified. .It \&%t The tty name. .It "\&%m, \&%r, \&%s, \&%v" @@ -528,10 +523,6 @@ of the delay algorithms are not implemen The terminal driver should support sane delay settings. .Pp The -.Va \&he -capability is stupid. -.Pp -The .Xr termcap 5 format is horrid, something more rational should have been chosen. Modified: head/libexec/getty/subr.c ============================================================================== --- head/libexec/getty/subr.c Thu Feb 2 20:01:54 2017 (r313106) +++ head/libexec/getty/subr.c Thu Feb 2 20:30:50 2017 (r313107) @@ -43,6 +43,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -53,8 +54,6 @@ static const char rcsid[] = #include "pathnames.h" #include "extern.h" - - /* * Get a table entry. */ @@ -469,42 +468,48 @@ adelay(int ms, struct delayval *dp) char editedhost[MAXHOSTNAMELEN]; void -edithost(const char *pat) +edithost(const char *pattern) { - const char *host = HN; - char *res = editedhost; - - if (!pat) - pat = ""; - while (*pat) { - switch (*pat) { - - case '#': - if (*host) - host++; - break; - - case '@': - if (*host) - *res++ = *host++; - break; - - default: - *res++ = *pat; - break; + regex_t regex; + regmatch_t *match; + int found; + + if (pattern == NULL || *pattern == '\0') + goto copyasis; + if (regcomp(®ex, pattern, REG_EXTENDED) != 0) + goto copyasis; + + match = calloc(regex.re_nsub + 1, sizeof(*match)); + if (match == NULL) { + regfree(®ex); + goto copyasis; + } + + found = !regexec(®ex, HN, regex.re_nsub + 1, match, 0); + if (found) { + size_t subex, totalsize; - } - if (res == &editedhost[sizeof editedhost - 1]) { - *res = '\0'; - return; - } - pat++; - } - if (*host) - strncpy(res, host, sizeof editedhost - (res - editedhost) - 1); - else - *res = '\0'; - editedhost[sizeof editedhost - 1] = '\0'; + /* + * We found a match. If there were no parenthesized + * subexpressions in the pattern, use entire matched + * string as ``editedhost''; otherwise use the first + * matched subexpression. + */ + subex = !!regex.re_nsub; + totalsize = match[subex].rm_eo - match[subex].rm_so + 1; + strlcpy(editedhost, HN + match[subex].rm_so, totalsize > + sizeof(editedhost) ? sizeof(editedhost) : totalsize); + } + free(match); + regfree(®ex); + if (found) + return; + /* + * In case of any errors, or if the pattern did not match, pass + * the original hostname as is. + */ + copyasis: + strlcpy(editedhost, HN, sizeof(editedhost)); } static struct speedtab { From owner-svn-src-all@freebsd.org Thu Feb 2 21:05:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F3FCCE08C; Thu, 2 Feb 2017 21:05:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B305136E; Thu, 2 Feb 2017 21:05:56 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12L5tPY086107; Thu, 2 Feb 2017 21:05:55 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12L5tWn086106; Thu, 2 Feb 2017 21:05:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702022105.v12L5tWn086106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 2 Feb 2017 21:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313108 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 21:05:56 -0000 Author: asomers Date: Thu Feb 2 21:05:55 2017 New Revision: 313108 URL: https://svnweb.freebsd.org/changeset/base/313108 Log: MFC r310180, r310327 r310180: Fix panic during lagg destruction with simultaneous status check If you run "ifconfig lagg0 destroy" and "ifconfig lagg0" at the same time a page fault may result. The first process will destroy ifp->if_lagg in lagg_clone_destroy (called by if_clone_destroy). Then the second process will observe that ifp->if_lagg is NULL at the top of lagg_port_ioctl and goto fallback: where it will promptly dereference ifp->if_lagg anyway. The solution is to repeat the NULL check for ifp->if_lagg MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8512 r310327: Remove stray debugging code from r310180 Reported by: rstone Pointy hat to: asomers MFC after: 3 weeks X-MFC-with: 310180 Sponsored by: Spectra Logic Corp Modified: stable/11/sys/net/if_lagg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_lagg.c ============================================================================== --- stable/11/sys/net/if_lagg.c Thu Feb 2 20:30:50 2017 (r313107) +++ stable/11/sys/net/if_lagg.c Thu Feb 2 21:05:55 2017 (r313108) @@ -1022,7 +1022,7 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon return (error); fallback: - if (lp->lp_ioctl != NULL) + if (lp != NULL && lp->lp_ioctl != NULL) return ((*lp->lp_ioctl)(ifp, cmd, data)); return (EINVAL); From owner-svn-src-all@freebsd.org Thu Feb 2 21:51:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91CAECCECFC; Thu, 2 Feb 2017 21:51:29 +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 44495C56; Thu, 2 Feb 2017 21:51:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x241.google.com with SMTP id s58so265898qtc.2; Thu, 02 Feb 2017 13:51:29 -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=S47RtRQKaix79LcFk5wQXomJ8MAmUXBX11ol1ccla8k=; b=MPrx4S4ObgzMyuV8fELj3Ge6DAPNxiFLbStLwWh3MSO6fC4Z6mP6D9yUllS53EsS9c OxIdXYlgKguUfdt4IFuWMh2yTYXCNumd8qFo12Ad36+5DlxMjcJHQ5s8WZnT9HSX5BDG qDMwZCuxogPH+6LH0RNsMyObkeHfZ/S1PF/agprRAc1WPZ3lEAHEZsOJdKzxdccCuOXJ 3BtkS1XL1QlwqFEUPV+wctmqm+hScXdmr+KzhmN2PRi0Xwtu1p88q3twOCiEUCBtLsVg gA8nWrhMwUskRwbsXutSD7sniIY/Zb7OZjeQfMh7PqN9S9S5mDh0TQRanRK8lAlIWZSt L6pA== 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=S47RtRQKaix79LcFk5wQXomJ8MAmUXBX11ol1ccla8k=; b=TekTboP1D/K0dJWNeD+1PNO0mymz9VoX8gY+kdVolRzaKLJtzHVlxvgwVUDonLtgfM uiXFiYATxQjgMgPg6W+HZoiFxSVQoyDyDI8ZApbUM/cJ1SXHSUPHp+FjGQaSjBkiSf8e CkI5K10VNXb1j4ko/bfS/W0aJm1ukVI723HIyA3wth4thXaMkf7hsX4R2hahWvXooNLi 0myDgqf2Sul80PDzS/skRaN6D5KuiCDpFQWZF9ZdejAKxSumzdSJ3kPxHmrVMNd0JpOH gLd08pX3VDvggH2U1K03aZIvB9PgJfkis3i6CGs5D8/hZUAlWFCRJfzFh/bhdig8IL3X YHWg== X-Gm-Message-State: AIkVDXLl1FPFxi5mYnP2PlMMMvfrgONMEsWrqELVxjKWsOAzRq5IfVLluVmonRmZf334k4YrkvEU2JS4xFOIcQ== X-Received: by 10.200.36.207 with SMTP id t15mr10467707qtt.84.1486072288412; Thu, 02 Feb 2017 13:51:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.84.230 with HTTP; Thu, 2 Feb 2017 13:51:28 -0800 (PST) In-Reply-To: <201702021956.v12JufOv057273@repo.freebsd.org> References: <201702021956.v12JufOv057273@repo.freebsd.org> From: Ngie Cooper Date: Thu, 2 Feb 2017 13:51:28 -0800 Message-ID: Subject: Re: svn commit: r313104 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump To: Gleb Smirnoff Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 21:51:29 -0000 On Thu, Feb 2, 2017 at 11:56 AM, Gleb Smirnoff wrote: > Author: glebius > Date: Thu Feb 2 19:56:41 2017 > New Revision: 313104 > URL: https://svnweb.freebsd.org/changeset/base/313104 > > Log: > Reduce diff to upstream using HAVE_CAPSICUM instead of __FreeBSD__. It'll also > make it easier to upstream HAVE_CASPER patch. ... > -/* Casper library support available */ > -#undef HAVE_CASPER ... Hi glebius! Was removing this intentional? Thanks! -Ngie From owner-svn-src-all@freebsd.org Thu Feb 2 21:56:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54D49CCED75; Thu, 2 Feb 2017 21:56:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x22b.google.com (mail-qt0-x22b.google.com [IPv6:2607:f8b0:400d:c0d::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CB34ECA; Thu, 2 Feb 2017 21:56:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22b.google.com with SMTP id v23so2663602qtb.0; Thu, 02 Feb 2017 13:56:34 -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=11jmnfDdnn5OGT0bx4mDVnHy9RUUpiYYYMBoA8eC3bA=; b=J8DH9sSwYrE0dTBKsggGq9AlpHqq/RJjJg+wZaw5w+0KVaio3qBz9feEXsR8q3Ysa4 RuSf3s6OTlGWy2jbrm+hg8CrT2JmsTbYtpE99Eh7aooaAtKLhKPWPL1PoViHEnCjLeOR nLEmFd295nJa4GFzRhW0KVzOQRDyGX4urGwQ/azqtwh3nFuqzddKW3uqBFoFWXCpxu0Q CfkLVgXG9FbuKGTAXKiTrER/x+TuJBMRzIWF38AaGRCxJLTcS+LYTn7Hp5C+1fBtw+qH CMqvRm6rZC0mFcunztySdzwUFB8CK6udqO4rUzkiVnLh4qpqqs79ENIHX98yyLDfYcRz O+iw== 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=11jmnfDdnn5OGT0bx4mDVnHy9RUUpiYYYMBoA8eC3bA=; b=g9/g0BLoQLTj5YDZjLap0ntukQxDdYHFXs0q4iC1vhXtNOYDxnm8DRhH7V6OSUXthU 3eOlmvs/2PYxsN9C/4nyNXADxC/VAgCpqtTuzog9seSS7cYvSzt029JoN7qtdWZ80FTE uTYuCUOHecpzcP4eOOcM2JGgLYEXzzQ7Gim1b5eeaDamjeZAX/5bJzS1OnrxDaZ4hB5n tgScRp0B2rEPCKZxWTVVQ7v7qHaSDq6nBjqBK7O9bOq4BoGdmZxH/HTzPD+rKn4j6uUs 5qmdJjmhAmACjaJKsIix7QwzwSy+AeYkNtWLHuAcWLKDl8SomovqpEngY/ov3Gvx0o2n f9nQ== X-Gm-Message-State: AIkVDXI3prNKZ33qt8ceKaRYlQg5QpRhDq8RWnEkBn8tWYkmY2UG/p3AbxjdYEhxDX2jKOcnXFvzdhKXkiyiDQ== X-Received: by 10.200.36.207 with SMTP id t15mr10485955qtt.84.1486072592924; Thu, 02 Feb 2017 13:56:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.84.230 with HTTP; Thu, 2 Feb 2017 13:56:32 -0800 (PST) In-Reply-To: <201702022030.v12KUoxk072619@repo.freebsd.org> References: <201702022030.v12KUoxk072619@repo.freebsd.org> From: Ngie Cooper Date: Thu, 2 Feb 2017 13:56:32 -0800 Message-ID: Subject: Re: svn commit: r313107 - head/libexec/getty To: Alexey Dokuchaev Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 21:56:34 -0000 On Thu, Feb 2, 2017 at 12:30 PM, Alexey Dokuchaev wrote: > Author: danfe (ports committer) > Date: Thu Feb 2 20:30:50 2017 > New Revision: 313107 > URL: https://svnweb.freebsd.org/changeset/base/313107 > > Log: > Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8) > > There is one capability explicitly documented in gettytab(5) as stupid: he. > And it is indeed. It was meant to facilitate system hostname modification, > but is hardly usable in practice because it allows very limited editing > (e.g., it depends on a particular hostname length, making it non-generic). > > Replace it with simple implementation that treats ``he'' as POSIX extended > regular expression which is matched against the hostname. If there are no > parenthesized subexpressions in the pattern, entire matched string is used > as the final hostname. Otherwise, use the first matched subexpression. > If the pattern does not match, the original hostname is not modified. > > Using regex(3) gives more freedom, does not complicate the code very much, > and makes a lot more sense, in turn making ``he'' less stupid and actually > useful (e.g., it is now possible to obtain node or domain names from the > original hostname string, without knowing it in advance). > > Reviewed by: jilles, manpages (wblock) > Approved by: jilles (implied) > Differential Revision: https://reviews.freebsd.org/D9244 Cool! Does this deserve a "Relnotes: yes"? Thanks! -Ngie From owner-svn-src-all@freebsd.org Thu Feb 2 22:02:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8616ACCEFA9; Thu, 2 Feb 2017 22:02:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BE1C13C8; Thu, 2 Feb 2017 22:02:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12M2Bkf010051; Thu, 2 Feb 2017 22:02:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12M2BQ0010048; Thu, 2 Feb 2017 22:02:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702022202.v12M2BQ0010048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Feb 2017 22:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313109 - in head/sys/i386: i386 isa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 22:02:12 -0000 Author: kib Date: Thu Feb 2 22:02:10 2017 New Revision: 313109 URL: https://svnweb.freebsd.org/changeset/base/313109 Log: Use ANSI definitions for some i386 functions. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/i386/machdep.c head/sys/i386/i386/vm_machdep.c head/sys/i386/isa/npx.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Feb 2 21:05:55 2017 (r313108) +++ head/sys/i386/i386/machdep.c Thu Feb 2 22:02:10 2017 (r313109) @@ -2164,8 +2164,7 @@ i386_kdb_init(void) } register_t -init386(first) - int first; +init386(int first) { struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Thu Feb 2 21:05:55 2017 (r313108) +++ head/sys/i386/i386/vm_machdep.c Thu Feb 2 22:02:10 2017 (r313109) @@ -172,11 +172,7 @@ alloc_fpusave(int flags) * ready to run and return to user mode. */ void -cpu_fork(td1, p2, td2, flags) - register struct thread *td1; - register struct proc *p2; - struct thread *td2; - int flags; +cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) { register struct proc *p1; struct pcb *pcb2; Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Thu Feb 2 21:05:55 2017 (r313108) +++ head/sys/i386/isa/npx.c Thu Feb 2 22:02:10 2017 (r313109) @@ -542,8 +542,7 @@ SYSINIT(npxinitstate, SI_SUB_DRIVERS, SI * Free coprocessor (if we have it). */ void -npxexit(td) - struct thread *td; +npxexit(struct thread *td) { critical_enter(); @@ -573,7 +572,7 @@ npxexit(td) } int -npxformat() +npxformat(void) { if (!hw_float) @@ -953,7 +952,7 @@ npxresume(union savefpu *addr) } void -npxdrop() +npxdrop(void) { struct thread *td; @@ -1289,8 +1288,7 @@ fpu_clean_state(void) #endif /* CPU_ENABLE_SSE */ static void -fpurstor(addr) - union savefpu *addr; +fpurstor(union savefpu *addr) { #ifdef CPU_ENABLE_SSE From owner-svn-src-all@freebsd.org Thu Feb 2 22:19:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EBA1CCE1AC; Thu, 2 Feb 2017 22:19:58 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FC1E1AF5; Thu, 2 Feb 2017 22:19:58 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id A16FA635F; Thu, 2 Feb 2017 22:19:57 +0000 (UTC) Date: Thu, 2 Feb 2017 22:19:57 +0000 From: Alexey Dokuchaev To: Ngie Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r313107 - head/libexec/getty Message-ID: <20170202221957.GA82840@FreeBSD.org> References: <201702022030.v12KUoxk072619@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 22:19:58 -0000 On Thu, Feb 02, 2017 at 01:56:32PM -0800, Ngie Cooper wrote: > On Thu, Feb 2, 2017 at 12:30 PM, Alexey Dokuchaev wrote: > > Author: danfe (ports committer) > > Date: Thu Feb 2 20:30:50 2017 > > New Revision: 313107 > > URL: https://svnweb.freebsd.org/changeset/base/313107 > > > > Log: > > Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8) > > [...] > > > > Reviewed by: jilles, manpages (wblock) > > Approved by: jilles (implied) > > Differential Revision: https://reviews.freebsd.org/D9244 > > Cool! Does this deserve a "Relnotes: yes"? Not sure; I've thought of it, but eventually decided this change is too minor to warrant a dedicated release note, and none of the DR reviewers mentioned or requested it as well. ./danfe From owner-svn-src-all@freebsd.org Thu Feb 2 22:55:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E74CDCCEB4D; Thu, 2 Feb 2017 22:55:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CFCE01062; Thu, 2 Feb 2017 22:55:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v12MtPp0025101 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Feb 2017 14:55:25 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v12MtPT6025100; Thu, 2 Feb 2017 14:55:25 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 2 Feb 2017 14:55:25 -0800 From: Gleb Smirnoff To: Ngie Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r313104 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump Message-ID: <20170202225525.GL3334@FreeBSD.org> References: <201702021956.v12JufOv057273@repo.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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 22:55:27 -0000 On Thu, Feb 02, 2017 at 01:51:28PM -0800, Ngie Cooper wrote: N> On Thu, Feb 2, 2017 at 11:56 AM, Gleb Smirnoff wrote: N> > Author: glebius N> > Date: Thu Feb 2 19:56:41 2017 N> > New Revision: 313104 N> > URL: https://svnweb.freebsd.org/changeset/base/313104 N> > N> > Log: N> > Reduce diff to upstream using HAVE_CAPSICUM instead of __FreeBSD__. It'll also N> > make it easier to upstream HAVE_CASPER patch. N> N> ... N> N> > -/* Casper library support available */ N> > -#undef HAVE_CASPER N> N> Hi glebius! N> Was removing this intentional? Yes. This define comes via Makefile. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Thu Feb 2 23:04:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48A91CCED9D; Thu, 2 Feb 2017 23:04:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 188811672; Thu, 2 Feb 2017 23:04:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12N40BS035435; Thu, 2 Feb 2017 23:04:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12N409c035434; Thu, 2 Feb 2017 23:04:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702022304.v12N409c035434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 2 Feb 2017 23:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313111 - head/sbin/nvmecontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 23:04:01 -0000 Author: imp Date: Thu Feb 2 23:04:00 2017 New Revision: 313111 URL: https://svnweb.freebsd.org/changeset/base/313111 Log: Use aligned buffer for the firmware data. Otherwise, when loading a MAXPHYS bytes of data, the I/O would require MAXPHYS + PAGE_SIZE worth of pages to do the I/O and we'd hit an assertion in vm_fault_quick_hold_pages unless MAXPHYS was larger than 1M + PAGE_SIZE. Modified: head/sbin/nvmecontrol/firmware.c Modified: head/sbin/nvmecontrol/firmware.c ============================================================================== --- head/sbin/nvmecontrol/firmware.c Thu Feb 2 23:01:29 2017 (r313110) +++ head/sbin/nvmecontrol/firmware.c Thu Feb 2 23:04:00 2017 (r313111) @@ -114,7 +114,7 @@ update_firmware(int fd, uint8_t *payload off = 0; resid = payload_size; - if ((chunk = malloc(NVME_MAX_XFER_SIZE)) == NULL) + if ((chunk = aligned_alloc(NVME_MAX_XFER_SIZE, PAGE_SIZE)) == NULL) errx(1, "unable to malloc %d bytes", NVME_MAX_XFER_SIZE); while (resid > 0) { From owner-svn-src-all@freebsd.org Thu Feb 2 23:04:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54711CCEDDA; Thu, 2 Feb 2017 23:04:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23B6316B8; Thu, 2 Feb 2017 23:04:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12N46Rq035526; Thu, 2 Feb 2017 23:04:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12N460i035525; Thu, 2 Feb 2017 23:04:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702022304.v12N460i035525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 2 Feb 2017 23:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313113 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 23:04:07 -0000 Author: imp Date: Thu Feb 2 23:04:06 2017 New Revision: 313113 URL: https://svnweb.freebsd.org/changeset/base/313113 Log: Ensure that the passthrough request will fit in MAXPHYS bytes after it has been rounded to full pages. This avoids a panic in vm_fault_quick_hold_pages due to this off-by-one error passing one page too many into vmapbuf. Modified: head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Thu Feb 2 23:04:01 2017 (r313112) +++ head/sys/dev/nvme/nvme_ctrlr.c Thu Feb 2 23:04:06 2017 (r313113) @@ -874,8 +874,20 @@ nvme_ctrlr_passthrough_cmd(struct nvme_c struct mtx *mtx; struct buf *buf = NULL; int ret = 0; + vm_offset_t addr, end; if (pt->len > 0) { + /* + * vmapbuf calls vm_fault_quick_hold_pages which only maps full + * pages. Ensure this request has fewer than MAXPHYS bytes when + * extended to full pages. + */ + addr = (vm_offset_t)pt->buf; + end = round_page(addr + pt->len); + addr = trunc_page(addr); + if (end - addr > MAXPHYS) + return EIO; + if (pt->len > ctrlr->max_xfer_size) { nvme_printf(ctrlr, "pt->len (%d) " "exceeds max_xfer_size (%d)\n", pt->len, From owner-svn-src-all@freebsd.org Thu Feb 2 23:04:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1E85CCEDA3; Thu, 2 Feb 2017 23:04:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 711C41673; Thu, 2 Feb 2017 23:04:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v12N41Hm035480; Thu, 2 Feb 2017 23:04:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v12N41Hr035479; Thu, 2 Feb 2017 23:04:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201702022304.v12N41Hr035479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 2 Feb 2017 23:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313112 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2017 23:04:02 -0000 Author: asomers Date: Thu Feb 2 23:04:01 2017 New Revision: 313112 URL: https://svnweb.freebsd.org/changeset/base/313112 Log: MFC r310180, r310327 r310180: Fix panic during lagg destruction with simultaneous status check If you run "ifconfig lagg0 destroy" and "ifconfig lagg0" at the same time a page fault may result. The first process will destroy ifp->if_lagg in lagg_clone_destroy (called by if_clone_destroy). Then the second process will observe that ifp->if_lagg is NULL at the top of lagg_port_ioctl and goto fallback: where it will promptly dereference ifp->if_lagg anyway. The solution is to repeat the NULL check for ifp->if_lagg MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8512 r310327: Remove stray debugging code from r310180 Reported by: rstone Pointy hat to: asomers MFC after: 3 weeks X-MFC-with: 310180 Sponsored by: Spectra Logic Corp Modified: stable/10/sys/net/if_lagg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_lagg.c ============================================================================== --- stable/10/sys/net/if_lagg.c Thu Feb 2 23:04:00 2017 (r313111) +++ stable/10/sys/net/if_lagg.c Thu Feb 2 23:04:01 2017 (r313112) @@ -858,7 +858,7 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon return (error); fallback: - if (lp->lp_ioctl != NULL) + if (lp != NULL && lp->lp_ioctl != NULL) return ((*lp->lp_ioctl)(ifp, cmd, data)); return (EINVAL); From owner-svn-src-all@freebsd.org Fri Feb 3 00:50:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09570CCCB7A; Fri, 3 Feb 2017 00:50:43 +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 A1720CD1; Fri, 3 Feb 2017 00:50:42 +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 v130ofq9077417; Fri, 3 Feb 2017 00:50:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130ofcD077416; Fri, 3 Feb 2017 00:50:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030050.v130ofcD077416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313117 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:50:43 -0000 Author: markj Date: Fri Feb 3 00:50:41 2017 New Revision: 313117 URL: https://svnweb.freebsd.org/changeset/base/313117 Log: MFC r310332: Avoid modifying the object string table when patching USDT probes. Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Fri Feb 3 00:46:40 2017 (r313116) +++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Fri Feb 3 00:50:41 2017 (r313117) @@ -1223,6 +1223,7 @@ process_obj(dtrace_hdl_t *dtp, const cha static const char dt_enabled[] = "enabled"; static const char dt_symprefix[] = "$dtrace"; static const char dt_symfmt[] = "%s%ld.%s"; + char probename[DTRACE_NAMELEN]; int fd, i, ndx, eprobe, mod = 0; Elf *elf = NULL; GElf_Ehdr ehdr; @@ -1576,8 +1577,6 @@ process_obj(dtrace_hdl_t *dtp, const cha bcopy(s, pname, p - s); pname[p - s] = '\0'; - p = strhyphenate(p + 3); /* strlen("___") */ - if (dt_symtab_lookup(data_sym, isym, rela.r_offset, shdr_rel.sh_info, &fsym, (emachine1 == EM_PPC64), elf) != 0) @@ -1628,10 +1627,14 @@ process_obj(dtrace_hdl_t *dtp, const cha "no such provider %s", pname)); } - if ((prp = dt_probe_lookup(pvp, p)) == NULL) { + if (strlcpy(probename, p + 3, sizeof (probename)) >= + sizeof (probename)) return (dt_link_error(dtp, elf, fd, bufs, - "no such probe %s", p)); - } + "invalid probe name %s", probename)); + (void) strhyphenate(probename); + if ((prp = dt_probe_lookup(pvp, probename)) == NULL) + return (dt_link_error(dtp, elf, fd, bufs, + "no such probe %s", probename)); assert(fsym.st_value <= rela.r_offset); From owner-svn-src-all@freebsd.org Fri Feb 3 00:53:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 909B9CCCD7B; Fri, 3 Feb 2017 00:53:34 +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 516EC105D; Fri, 3 Feb 2017 00:53:34 +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 v130rXUa081251; Fri, 3 Feb 2017 00:53:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130rXaK081250; Fri, 3 Feb 2017 00:53:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030053.v130rXaK081250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313118 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:53:34 -0000 Author: markj Date: Fri Feb 3 00:53:33 2017 New Revision: 313118 URL: https://svnweb.freebsd.org/changeset/base/313118 Log: MFC r312307: Improve some of the sysctl descriptions added in r299827. Modified: stable/11/sys/netinet6/in6_proto.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/in6_proto.c ============================================================================== --- stable/11/sys/netinet6/in6_proto.c Fri Feb 3 00:50:41 2017 (r313117) +++ stable/11/sys/netinet6/in6_proto.c Fri Feb 3 00:53:33 2017 (r313118) @@ -507,19 +507,21 @@ sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARG SYSCTL_INT(_net_inet6_ip6, IPV6CTL_FORWARDING, forwarding, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_forwarding), 0, - "Enable IPv6 forwarding between interfaces"); + "Enable forwarding of IPv6 packets between interfaces"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS, redirect, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_sendredirects), 0, - "Send a redirect message when forwarding back to a source link"); + "Send ICMPv6 redirects for unforwardable IPv6 packets"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, hlim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_defhlim), 0, - "Default hop limit"); + "Default hop limit to use for outgoing IPv6 packets"); SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragpackets), 0, - "Maximum allowed number of outstanding fragmented IPv6 packets"); + "Default maximum number of outstanding fragmented IPv6 packets. " + "A value of 0 means no fragmented packets will be accepted, while a " + "a value of -1 means no limit"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0, "Default value of per-interface flag for accepting ICMPv6 RA messages"); @@ -541,7 +543,8 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_LOG_I "Frequency in seconds at which to log IPv6 forwarding errors"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_HDRNESTLIMIT, hdrnestlimit, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_hdrnestlimit), 0, - "Maximum allowed number of nested protocol headers"); + "Default maximum number of IPv6 extension headers permitted on " + "incoming IPv6 packets, 0 for no artificial limit"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DAD_COUNT, dad_count, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_dad_count), 0, "Number of ICMPv6 NS messages sent during duplicate address detection"); @@ -550,7 +553,8 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_ "Provide an IPv6 flowlabel in outbound packets"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_DEFMCASTHLIM, defmcasthlim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_defmcasthlim), 0, - "Default hop limit for multicast packets"); + "Default hop limit for IPv6 multicast packets originating from this " + "node"); SYSCTL_STRING(_net_inet6_ip6, IPV6CTL_KAME_VERSION, kame_version, CTLFLAG_RD, __KAME_VERSION, 0, "KAME version string"); From owner-svn-src-all@freebsd.org Fri Feb 3 00:54:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F295BCCCE45; Fri, 3 Feb 2017 00:54:28 +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 C1FAF119A; Fri, 3 Feb 2017 00:54:28 +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 v130sRMY081348; Fri, 3 Feb 2017 00:54:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130sRKs081347; Fri, 3 Feb 2017 00:54:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030054.v130sRKs081347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313119 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:54:29 -0000 Author: markj Date: Fri Feb 3 00:54:27 2017 New Revision: 313119 URL: https://svnweb.freebsd.org/changeset/base/313119 Log: MFC r312199: Stop the scheduler upon panic even in non-SMP kernels. Modified: stable/11/sys/kern/kern_shutdown.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_shutdown.c ============================================================================== --- stable/11/sys/kern/kern_shutdown.c Fri Feb 3 00:53:33 2017 (r313118) +++ stable/11/sys/kern/kern_shutdown.c Fri Feb 3 00:54:27 2017 (r313119) @@ -713,13 +713,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-all@freebsd.org Fri Feb 3 00:55:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0590CCCED3; Fri, 3 Feb 2017 00:55:32 +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 AF4B512E9; Fri, 3 Feb 2017 00:55:32 +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 v130tVXd081473; Fri, 3 Feb 2017 00:55:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130tVke081472; Fri, 3 Feb 2017 00:55:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030055.v130tVke081472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313120 - stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:55:33 -0000 Author: markj Date: Fri Feb 3 00:55:31 2017 New Revision: 313120 URL: https://svnweb.freebsd.org/changeset/base/313120 Log: MFC r312893: Fix an off-by-one in an assertion on fasttrap tracepoint sizes. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Fri Feb 3 00:54:27 2017 (r313119) +++ stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Fri Feb 3 00:55:31 2017 (r313120) @@ -1627,7 +1627,7 @@ fasttrap_pid_probe(struct reg *rp) * a signal we can reset the value of the scratch register. */ - ASSERT(tp->ftt_size < FASTTRAP_MAX_INSTR_SIZE); + ASSERT(tp->ftt_size <= FASTTRAP_MAX_INSTR_SIZE); curthread->t_dtrace_scrpc = addr; bcopy(tp->ftt_instr, &scratch[i], tp->ftt_size); From owner-svn-src-all@freebsd.org Fri Feb 3 00:58:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77A54CCCF59; Fri, 3 Feb 2017 00:58:09 +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 524931479; Fri, 3 Feb 2017 00:58:09 +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 v130w8hZ081708; Fri, 3 Feb 2017 00:58:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v130w8hG081706; Fri, 3 Feb 2017 00:58:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030058.v130w8hG081706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 00:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313121 - in stable/11/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 00:58:09 -0000 Author: markj Date: Fri Feb 3 00:58:08 2017 New Revision: 313121 URL: https://svnweb.freebsd.org/changeset/base/313121 Log: MFC r311902: Coalesce TLB shootdowns of global PTEs in pmap_advise() on x86. Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/i386/i386/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Feb 3 00:55:31 2017 (r313120) +++ stable/11/sys/amd64/amd64/pmap.c Fri Feb 3 00:58:08 2017 (r313121) @@ -6054,7 +6054,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; @@ -6134,11 +6134,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) { /* @@ -6153,12 +6153,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: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Fri Feb 3 00:55:31 2017 (r313120) +++ stable/11/sys/i386/i386/pmap.c Fri Feb 3 00:58:08 2017 (r313121) @@ -4959,7 +4959,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; @@ -5020,11 +5020,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) { /* @@ -5039,12 +5039,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-all@freebsd.org Fri Feb 3 01:04:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30A28CBE384; Fri, 3 Feb 2017 01:04:24 +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 000711B07; Fri, 3 Feb 2017 01:04:23 +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 v1314NAS085815; Fri, 3 Feb 2017 01:04:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1314Nf0085814; Fri, 3 Feb 2017 01:04:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030104.v1314Nf0085814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313122 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:04:24 -0000 Author: markj Date: Fri Feb 3 01:04:22 2017 New Revision: 313122 URL: https://svnweb.freebsd.org/changeset/base/313122 Log: MFC r312209: Suppress a warning about m_assertbuf being unused. Modified: stable/11/sys/kern/uipc_mbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/uipc_mbuf.c ============================================================================== --- stable/11/sys/kern/uipc_mbuf.c Fri Feb 3 00:58:08 2017 (r313121) +++ stable/11/sys/kern/uipc_mbuf.c Fri Feb 3 01:04:22 2017 (r313122) @@ -169,7 +169,7 @@ CTASSERT(sizeof(struct m_ext) == 28); * plain pointer does. */ #ifdef INVARIANTS -static struct mbuf m_assertbuf; +static struct mbuf __used m_assertbuf; CTASSERT(sizeof(m_assertbuf.m_slist) == sizeof(m_assertbuf.m_next)); CTASSERT(sizeof(m_assertbuf.m_stailq) == sizeof(m_assertbuf.m_next)); CTASSERT(sizeof(m_assertbuf.m_slistpkt) == sizeof(m_assertbuf.m_nextpkt)); From owner-svn-src-all@freebsd.org Fri Feb 3 01:10:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92CFCCBE6E4; Fri, 3 Feb 2017 01:10:39 +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 5A9A11ECB; Fri, 3 Feb 2017 01:10:39 +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 v131AcDO086151; Fri, 3 Feb 2017 01:10:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131AcJM086150; Fri, 3 Feb 2017 01:10:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030110.v131AcJM086150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313123 - stable/11/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:10:39 -0000 Author: markj Date: Fri Feb 3 01:10:38 2017 New Revision: 313123 URL: https://svnweb.freebsd.org/changeset/base/313123 Log: MFC r310316: Consistently print D variable indices in decimal when disassembling. Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c Fri Feb 3 01:04:22 2017 (r313122) +++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c Fri Feb 3 01:10:38 2017 (r313123) @@ -499,7 +499,7 @@ dt_dis(const dtrace_difo_t *dp, FILE *fp if (v->dtdv_flags & DIFV_F_MOD) (void) strcat(flags, "/w"); - (void) fprintf(fp, "%-16s %-4x %-3s %-3s %-4s %s\n", + (void) fprintf(fp, "%-16s %-4u %-3s %-3s %-4s %s\n", &dp->dtdo_strtab[v->dtdv_name], v->dtdv_id, kind, scope, flags + 1, dt_dis_typestr(&v->dtdv_type, type, sizeof (type))); From owner-svn-src-all@freebsd.org Fri Feb 3 01:15:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF9B3CBEB31; Fri, 3 Feb 2017 01:15:32 +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 A0324401; Fri, 3 Feb 2017 01:15:32 +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 v131FV7m090029; Fri, 3 Feb 2017 01:15:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131FV0C090027; Fri, 3 Feb 2017 01:15:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030115.v131FV0C090027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313124 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:15:33 -0000 Author: markj Date: Fri Feb 3 01:15:31 2017 New Revision: 313124 URL: https://svnweb.freebsd.org/changeset/base/313124 Log: MFC r310420, r310421, r310422: Fix races and logic errors around dlclose(). Modified: stable/11/libexec/rtld-elf/rtld.c stable/11/libexec/rtld-elf/rtld.h Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Fri Feb 3 01:10:38 2017 (r313123) +++ stable/11/libexec/rtld-elf/rtld.c Fri Feb 3 01:15:31 2017 (r313124) @@ -87,7 +87,10 @@ static char *errmsg_save(void); static void *fill_search_info(const char *, size_t, void *); static char *find_library(const char *, const Obj_Entry *, int *); static const char *gethints(bool); +static void hold_object(Obj_Entry *); +static void unhold_object(Obj_Entry *); static void init_dag(Obj_Entry *); +static void init_marker(Obj_Entry *); static void init_pagesizes(Elf_Auxinfo **aux_info); static void init_rtld(caddr_t, Elf_Auxinfo **); static void initlist_add_neededs(Needed_Entry *, Objlist *); @@ -113,6 +116,7 @@ static void objlist_put_after(Objlist *, static void objlist_remove(Objlist *, Obj_Entry *); static int parse_libdir(const char *); static void *path_enumerate(const char *, path_enum_proc, void *); +static void release_object(Obj_Entry *); static int relocate_object_dag(Obj_Entry *root, bool bind_now, Obj_Entry *rtldobj, int flags, RtldLockState *lockstate); static int relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, @@ -1827,6 +1831,14 @@ init_dag(Obj_Entry *root) root->dag_inited = true; } +static void +init_marker(Obj_Entry *marker) +{ + + bzero(marker, sizeof(*marker)); + marker->marker = true; +} + Obj_Entry * globallist_curr(const Obj_Entry *obj) { @@ -1853,6 +1865,23 @@ globallist_next(const Obj_Entry *obj) } } +/* Prevent the object from being unmapped while the bind lock is dropped. */ +static void +hold_object(Obj_Entry *obj) +{ + + obj->holdcount++; +} + +static void +unhold_object(Obj_Entry *obj) +{ + + assert(obj->holdcount > 0); + if (--obj->holdcount == 0 && obj->unholdfree) + release_object(obj); +} + static void process_z(Obj_Entry *root) { @@ -2210,7 +2239,7 @@ load_object(const char *name, int fd_u, fd = -1; if (name != NULL) { TAILQ_FOREACH(obj, &obj_list, next) { - if (obj->marker) + if (obj->marker || obj->doomed) continue; if (object_match_name(obj, name)) return (obj); @@ -2257,7 +2286,7 @@ load_object(const char *name, int fd_u, return NULL; } TAILQ_FOREACH(obj, &obj_list, next) { - if (obj->marker) + if (obj->marker || obj->doomed) continue; if (obj->ino == sb.st_ino && obj->dev == sb.st_dev) break; @@ -2399,6 +2428,9 @@ objlist_call_fini(Objlist *list, Obj_Ent assert(root == NULL || root->refcount == 1); + if (root != NULL) + root->doomed = true; + /* * Preserve the current error message since a fini function might * call into the dynamic linker and overwrite it. @@ -2411,15 +2443,11 @@ objlist_call_fini(Objlist *list, Obj_Ent continue; /* Remove object from fini list to prevent recursive invocation. */ STAILQ_REMOVE(list, elm, Struct_Objlist_Entry, link); - /* - * XXX: If a dlopen() call references an object while the - * fini function is in progress, we might end up trying to - * unload the referenced object in dlclose() or the object - * won't be unloaded although its fini function has been - * called. - */ - lock_release(rtld_bind_lock, lockstate); + /* Ensure that new references cannot be acquired. */ + elm->obj->doomed = true; + hold_object(elm->obj); + lock_release(rtld_bind_lock, lockstate); /* * It is legal to have both DT_FINI and DT_FINI_ARRAY defined. * When this happens, DT_FINI_ARRAY is processed first. @@ -2445,6 +2473,7 @@ objlist_call_fini(Objlist *list, Obj_Ent call_initfini_pointer(elm->obj, elm->obj->fini); } wlock_acquire(rtld_bind_lock, lockstate); + unhold_object(elm->obj); /* No need to free anything if process is going down. */ if (root != NULL) free(elm); @@ -2498,6 +2527,7 @@ objlist_call_init(Objlist *list, RtldLoc * without better locking. */ elm->obj->init_done = true; + hold_object(elm->obj); lock_release(rtld_bind_lock, lockstate); /* @@ -2524,6 +2554,7 @@ objlist_call_init(Objlist *list, RtldLoc } } wlock_acquire(rtld_bind_lock, lockstate); + unhold_object(elm->obj); } errmsg_restore(saved_msg); } @@ -3539,8 +3570,7 @@ dl_iterate_phdr(__dl_iterate_hdr_callbac RtldLockState bind_lockstate, phdr_lockstate; int error; - bzero(&marker, sizeof(marker)); - marker.marker = true; + init_marker(&marker); error = 0; wlock_acquire(rtld_phdr_lock, &phdr_lockstate); @@ -3548,11 +3578,13 @@ dl_iterate_phdr(__dl_iterate_hdr_callbac for (obj = globallist_curr(TAILQ_FIRST(&obj_list)); obj != NULL;) { TAILQ_INSERT_AFTER(&obj_list, obj, &marker, next); rtld_fill_dl_phdr_info(obj, &phdr_info); + hold_object(obj); lock_release(rtld_bind_lock, &bind_lockstate); error = callback(&phdr_info, sizeof phdr_info, param); wlock_acquire(rtld_bind_lock, &bind_lockstate); + unhold_object(obj); obj = globallist_next(&marker); TAILQ_REMOVE(&obj_list, &marker, next); if (error != 0) { @@ -3807,6 +3839,19 @@ _r_debug_postinit(struct link_map *m) __compiler_membar(); } +static void +release_object(Obj_Entry *obj) +{ + + if (obj->holdcount > 0) { + obj->unholdfree = true; + return; + } + munmap(obj->mapbase, obj->mapsize); + linkmap_delete(obj); + obj_free(obj); +} + /* * Get address of the pointer variable in the main program. * Prefer non-weak symbol over the weak one. @@ -4377,7 +4422,7 @@ trace_loaded_objects(Obj_Entry *obj) static void unload_object(Obj_Entry *root) { - Obj_Entry *obj, *obj1; + Obj_Entry marker, *obj, *next; assert(root->refcount == 0); @@ -4388,18 +4433,32 @@ unload_object(Obj_Entry *root) unlink_object(root); /* Unmap all objects that are no longer referenced. */ - TAILQ_FOREACH_SAFE(obj, &obj_list, next, obj1) { + for (obj = TAILQ_FIRST(&obj_list); obj != NULL; obj = next) { + next = TAILQ_NEXT(obj, next); if (obj->marker || obj->refcount != 0) continue; LD_UTRACE(UTRACE_UNLOAD_OBJECT, obj, obj->mapbase, obj->mapsize, 0, obj->path); dbg("unloading \"%s\"", obj->path); - unload_filtees(root); - munmap(obj->mapbase, obj->mapsize); - linkmap_delete(obj); + /* + * Unlink the object now to prevent new references from + * being acquired while the bind lock is dropped in + * recursive dlclose() invocations. + */ TAILQ_REMOVE(&obj_list, obj, next); obj_count--; - obj_free(obj); + + if (obj->filtees_loaded) { + if (next != NULL) { + init_marker(&marker); + TAILQ_INSERT_BEFORE(next, &marker, next); + unload_filtees(obj); + next = TAILQ_NEXT(&marker, next); + TAILQ_REMOVE(&obj_list, &marker, next); + } else + unload_filtees(obj); + } + release_object(obj); } } Modified: stable/11/libexec/rtld-elf/rtld.h ============================================================================== --- stable/11/libexec/rtld-elf/rtld.h Fri Feb 3 01:10:38 2017 (r313123) +++ stable/11/libexec/rtld-elf/rtld.h Fri Feb 3 01:15:31 2017 (r313124) @@ -142,7 +142,8 @@ typedef struct Struct_Obj_Entry { TAILQ_ENTRY(Struct_Obj_Entry) next; char *path; /* Pathname of underlying file (%) */ char *origin_path; /* Directory path of origin file */ - int refcount; + int refcount; /* DAG references */ + int holdcount; /* Count of transient references */ int dl_refcount; /* Number of times loaded by dlopen */ /* These items are computed by map_object() or by digest_phdr(). */ @@ -265,6 +266,8 @@ typedef struct Struct_Obj_Entry { bool valid_hash_gnu : 1; /* A valid GNU hash tag is available */ bool dlopened : 1; /* dlopen()-ed (vs. load statically) */ bool marker : 1; /* marker on the global obj list */ + bool unholdfree : 1; /* unmap upon last unhold */ + bool doomed : 1; /* Object cannot be referenced */ struct link_map linkmap; /* For GDB and dlinfo() */ Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ From owner-svn-src-all@freebsd.org Fri Feb 3 01:16:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E516CCBEC1E; Fri, 3 Feb 2017 01:16:55 +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 B42557D2; Fri, 3 Feb 2017 01:16:55 +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 v131GsVC090135; Fri, 3 Feb 2017 01:16:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131Gswm090133; Fri, 3 Feb 2017 01:16:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030116.v131Gswm090133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313125 - in stable/11: lib/libc/sys sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:16:56 -0000 Author: markj Date: Fri Feb 3 01:16:54 2017 New Revision: 313125 URL: https://svnweb.freebsd.org/changeset/base/313125 Log: MFC r309200: Launder VPO_NOSYNC pages upon vnode deactivation. Modified: stable/11/lib/libc/sys/mmap.2 stable/11/sys/kern/vfs_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/mmap.2 ============================================================================== --- stable/11/lib/libc/sys/mmap.2 Fri Feb 3 01:15:31 2017 (r313124) +++ stable/11/lib/libc/sys/mmap.2 Fri Feb 3 01:16:54 2017 (r313125) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd February 18, 2015 +.Dd November 25, 2016 .Dt MMAP 2 .Os .Sh NAME @@ -189,6 +189,8 @@ this option any VM pages you dirty may b (every 30-60 seconds usually) which can create performance problems if you do not need that to occur (such as when you are using shared file-backed mmap regions for IPC purposes). +Dirty data will be flushed automatically when all mappings of an object are +removed and all descriptors referencing the object are closed. Note that VM/file system coherency is maintained whether you use .Dv MAP_NOSYNC Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Fri Feb 3 01:15:31 2017 (r313124) +++ stable/11/sys/kern/vfs_subr.c Fri Feb 3 01:16:54 2017 (r313125) @@ -2948,7 +2948,7 @@ vinactive(struct vnode *vp, struct threa obj = vp->v_object; if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_NOSYNC); + vm_object_page_clean(obj, 0, 0, 0); VM_OBJECT_WUNLOCK(obj); } VOP_INACTIVE(vp, td); From owner-svn-src-all@freebsd.org Fri Feb 3 01:18:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1E86CBED2B; Fri, 3 Feb 2017 01:18:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CA96988; Fri, 3 Feb 2017 01:18:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v131Il4N090279; Fri, 3 Feb 2017 01:18:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131IlC3090274; Fri, 3 Feb 2017 01:18:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030118.v131IlC3090274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313126 - in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/pid contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n usr.sbin/dtrace/tests/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:18:48 -0000 Author: markj Date: Fri Feb 3 01:18:47 2017 New Revision: 313126 URL: https://svnweb.freebsd.org/changeset/base/313126 Log: MFC r309698, r309699, r309700: DTrace test fixes. Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh stable/11/cddl/usr.sbin/dtrace/tests/tools/dtest.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh Fri Feb 3 01:16:54 2017 (r313125) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh Fri Feb 3 01:18:47 2017 (r313126) @@ -56,7 +56,7 @@ prov.h: prov.d $dtrace -h -s prov.d prov.o: prov.d main.o - $dtrace -G -32 -s prov.d main.o + $dtrace -G -s prov.d main.o EOF cat > prov.d < /dev/null + /bin/date > /dev/null done } Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh Fri Feb 3 01:16:54 2017 (r313125) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh Fri Feb 3 01:18:47 2017 (r313126) @@ -45,7 +45,7 @@ EOF spinny() { while true; do - /usr/bin/date > /dev/null + /bin/date > /dev/null done } Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh Fri Feb 3 01:16:54 2017 (r313125) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh Fri Feb 3 01:18:47 2017 (r313126) @@ -45,7 +45,7 @@ EOF spinny() { while true; do - /usr/bin/date > /dev/null + /bin/date > /dev/null done } Modified: stable/11/cddl/usr.sbin/dtrace/tests/tools/dtest.sh ============================================================================== --- stable/11/cddl/usr.sbin/dtrace/tests/tools/dtest.sh Fri Feb 3 01:16:54 2017 (r313125) +++ stable/11/cddl/usr.sbin/dtrace/tests/tools/dtest.sh Fri Feb 3 01:18:47 2017 (r313126) @@ -70,7 +70,7 @@ runtest() err.*.ksh|tst.*.ksh) expr "$TFILE" : 'err.*' >/dev/null && exstatus=1 - ksh "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR + tst=$TFILE ksh "$TFILE" /usr/sbin/dtrace >$STDOUT 2>$STDERR status=$? if [ $status -ne $exstatus ]; then From owner-svn-src-all@freebsd.org Fri Feb 3 01:19:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D5E3CBED9C; Fri, 3 Feb 2017 01:19:50 +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 F08E8B1F; Fri, 3 Feb 2017 01:19: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 v131Jn1L090415; Fri, 3 Feb 2017 01:19:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131Jn3D090414; Fri, 3 Feb 2017 01:19:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030119.v131Jn3D090414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313127 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:19:50 -0000 Author: markj Date: Fri Feb 3 01:19:48 2017 New Revision: 313127 URL: https://svnweb.freebsd.org/changeset/base/313127 Log: MFC r307693: Simplify keg_drain() a bit by using LIST_FOREACH_SAFE. Modified: stable/11/sys/vm/uma_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/uma_core.c ============================================================================== --- stable/11/sys/vm/uma_core.c Fri Feb 3 01:18:47 2017 (r313126) +++ stable/11/sys/vm/uma_core.c Fri Feb 3 01:19:48 2017 (r313127) @@ -845,8 +845,7 @@ static void keg_drain(uma_keg_t keg) { struct slabhead freeslabs = { 0 }; - uma_slab_t slab; - uma_slab_t n; + uma_slab_t slab, tmp; /* * We don't want to take pages from statically allocated kegs at this @@ -862,15 +861,10 @@ keg_drain(uma_keg_t keg) if (keg->uk_free == 0) goto finished; - slab = LIST_FIRST(&keg->uk_free_slab); - while (slab) { - n = LIST_NEXT(slab, us_link); - - /* We have no where to free these to */ - if (slab->us_flags & UMA_SLAB_BOOT) { - slab = n; + LIST_FOREACH_SAFE(slab, &keg->uk_free_slab, us_link, tmp) { + /* We have nowhere to free these to. */ + if (slab->us_flags & UMA_SLAB_BOOT) continue; - } LIST_REMOVE(slab, us_link); keg->uk_pages -= keg->uk_ppera; @@ -880,8 +874,6 @@ keg_drain(uma_keg_t keg) UMA_HASH_REMOVE(&keg->uk_hash, slab, slab->us_data); SLIST_INSERT_HEAD(&freeslabs, slab, us_hlink); - - slab = n; } finished: KEG_UNLOCK(keg); From owner-svn-src-all@freebsd.org Fri Feb 3 01:21:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9C96CCD0FF; Fri, 3 Feb 2017 01:21:57 +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 94498FFA; Fri, 3 Feb 2017 01:21:57 +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 v131LutO094151; Fri, 3 Feb 2017 01:21:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131LuRP094150; Fri, 3 Feb 2017 01:21:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030121.v131LuRP094150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313128 - stable/11/sys/x86/acpica X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:21:57 -0000 Author: markj Date: Fri Feb 3 01:21:56 2017 New Revision: 313128 URL: https://svnweb.freebsd.org/changeset/base/313128 Log: MFC r302793: Allow ACPI wakeup code and page tables to be stored in non-contiguous pages. Modified: stable/11/sys/x86/acpica/acpi_wakeup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/11/sys/x86/acpica/acpi_wakeup.c Fri Feb 3 01:19:48 2017 (r313127) +++ stable/11/sys/x86/acpica/acpi_wakeup.c Fri Feb 3 01:21:56 2017 (r313128) @@ -88,7 +88,7 @@ static cpuset_t suspcpus; static struct susppcb **susppcbs; #endif -static void *acpi_alloc_wakeup_handler(void); +static void *acpi_alloc_wakeup_handler(void **); static void acpi_stop_beep(void *); #ifdef SMP @@ -97,18 +97,14 @@ static void acpi_wakeup_cpus(struct acp #endif #ifdef __amd64__ -#define ACPI_PAGETABLES 3 +#define ACPI_WAKEPAGES 4 #else -#define ACPI_PAGETABLES 0 +#define ACPI_WAKEPAGES 1 #endif -#define WAKECODE_VADDR(sc) \ - ((sc)->acpi_wakeaddr + (ACPI_PAGETABLES * PAGE_SIZE)) -#define WAKECODE_PADDR(sc) \ - ((sc)->acpi_wakephys + (ACPI_PAGETABLES * PAGE_SIZE)) #define WAKECODE_FIXUP(offset, type, val) do { \ type *addr; \ - addr = (type *)(WAKECODE_VADDR(sc) + offset); \ + addr = (type *)(sc->acpi_wakeaddr + (offset)); \ *addr = val; \ } while (0) @@ -125,7 +121,7 @@ static int acpi_wakeup_ap(struct acpi_softc *sc, int cpu) { struct pcb *pcb; - int vector = (WAKECODE_PADDR(sc) >> 12) & 0xff; + int vector = (sc->acpi_wakephys >> 12) & 0xff; int apic_id = cpu_apic_ids[cpu]; int ms; @@ -168,7 +164,7 @@ acpi_wakeup_cpus(struct acpi_softc *sc) /* setup a vector to our boot code */ *((volatile u_short *)WARMBOOT_OFF) = WARMBOOT_TARGET; - *((volatile u_short *)WARMBOOT_SEG) = WAKECODE_PADDR(sc) >> 4; + *((volatile u_short *)WARMBOOT_SEG) = sc->acpi_wakephys >> 4; outb(CMOS_REG, BIOS_RESET); outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */ @@ -209,7 +205,7 @@ acpi_sleep_machdep(struct acpi_softc *sc if (acpi_resume_beep != 0) timer_spkr_acquire(); - AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc), 0); + AcpiSetFirmwareWakingVector(sc->acpi_wakephys, 0); intr_suspend(); @@ -309,11 +305,12 @@ acpi_wakeup_machdep(struct acpi_softc *s } static void * -acpi_alloc_wakeup_handler(void) +acpi_alloc_wakeup_handler(void *wakepages[ACPI_WAKEPAGES]) { - void *wakeaddr; int i; + memset(wakepages, 0, ACPI_WAKEPAGES * sizeof(*wakepages)); + /* * Specify the region for our wakeup code. We want it in the low 1 MB * region, excluding real mode IVT (0-0x3ff), BDA (0x400-0x4ff), EBDA @@ -321,18 +318,18 @@ acpi_alloc_wakeup_handler(void) * and ROM area (0xa0000 and above). The temporary page tables must be * page-aligned. */ - wakeaddr = contigmalloc((ACPI_PAGETABLES + 1) * PAGE_SIZE, M_DEVBUF, - M_NOWAIT, 0x500, 0xa0000, PAGE_SIZE, 0ul); - if (wakeaddr == NULL) { - printf("%s: can't alloc wake memory\n", __func__); - return (NULL); + for (i = 0; i < ACPI_WAKEPAGES; i++) { + wakepages[i] = contigmalloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT, + 0x500, 0xa0000, PAGE_SIZE, 0ul); + if (wakepages[i] == NULL) { + printf("%s: can't alloc wake memory\n", __func__); + goto freepages; + } } if (EVENTHANDLER_REGISTER(power_resume, acpi_stop_beep, NULL, EVENTHANDLER_PRI_LAST) == NULL) { printf("%s: can't register event handler\n", __func__); - contigfree(wakeaddr, (ACPI_PAGETABLES + 1) * PAGE_SIZE, - M_DEVBUF); - return (NULL); + goto freepages; } susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK); for (i = 0; i < mp_ncpus; i++) { @@ -340,39 +337,56 @@ acpi_alloc_wakeup_handler(void) susppcbs[i]->sp_fpususpend = alloc_fpusave(M_WAITOK); } - return (wakeaddr); + return (wakepages); + +freepages: + for (i = 0; i < ACPI_WAKEPAGES; i++) + if (wakepages[i] != NULL) + contigfree(wakepages[i], PAGE_SIZE, M_DEVBUF); + return (NULL); } void acpi_install_wakeup_handler(struct acpi_softc *sc) { - static void *wakeaddr = NULL; + static void *wakeaddr; + void *wakepages[ACPI_WAKEPAGES]; #ifdef __amd64__ uint64_t *pt4, *pt3, *pt2; + vm_paddr_t pt4pa, pt3pa, pt2pa; int i; #endif if (wakeaddr != NULL) return; - wakeaddr = acpi_alloc_wakeup_handler(); - if (wakeaddr == NULL) + if (acpi_alloc_wakeup_handler(wakepages) == NULL) return; + wakeaddr = wakepages[0]; sc->acpi_wakeaddr = (vm_offset_t)wakeaddr; sc->acpi_wakephys = vtophys(wakeaddr); - bcopy(wakecode, (void *)WAKECODE_VADDR(sc), sizeof(wakecode)); +#ifdef __amd64__ + pt4 = wakepages[1]; + pt3 = wakepages[2]; + pt2 = wakepages[3]; + pt4pa = vtophys(pt4); + pt3pa = vtophys(pt3); + pt2pa = vtophys(pt2); +#endif + + bcopy(wakecode, (void *)sc->acpi_wakeaddr, sizeof(wakecode)); /* Patch GDT base address, ljmp targets. */ WAKECODE_FIXUP((bootgdtdesc + 2), uint32_t, - WAKECODE_PADDR(sc) + bootgdt); + sc->acpi_wakephys + bootgdt); WAKECODE_FIXUP((wakeup_sw32 + 2), uint32_t, - WAKECODE_PADDR(sc) + wakeup_32); + sc->acpi_wakephys + wakeup_32); #ifdef __amd64__ WAKECODE_FIXUP((wakeup_sw64 + 1), uint32_t, - WAKECODE_PADDR(sc) + wakeup_64); - WAKECODE_FIXUP(wakeup_pagetables, uint32_t, sc->acpi_wakephys); + sc->acpi_wakephys + wakeup_64); + WAKECODE_FIXUP(wakeup_pagetables, uint32_t, pt4pa); #endif /* Save pointers to some global data. */ @@ -384,33 +398,28 @@ acpi_install_wakeup_handler(struct acpi_ WAKECODE_FIXUP(wakeup_cr3, register_t, vtophys(kernel_pmap->pm_pdir)); #endif -#else - /* Build temporary page tables below realmode code. */ - pt4 = wakeaddr; - pt3 = pt4 + (PAGE_SIZE) / sizeof(uint64_t); - pt2 = pt3 + (PAGE_SIZE) / sizeof(uint64_t); - +#else /* __amd64__ */ /* Create the initial 1GB replicated page tables */ for (i = 0; i < 512; i++) { /* * Each slot of the level 4 pages points * to the same level 3 page */ - pt4[i] = (uint64_t)(sc->acpi_wakephys + PAGE_SIZE); + pt4[i] = (uint64_t)pt3pa; pt4[i] |= PG_V | PG_RW | PG_U; /* * Each slot of the level 3 pages points * to the same level 2 page */ - pt3[i] = (uint64_t)(sc->acpi_wakephys + (2 * PAGE_SIZE)); + pt3[i] = (uint64_t)pt2pa; pt3[i] |= PG_V | PG_RW | PG_U; /* The level 2 page slots are mapped with 2MB pages for 1GB. */ pt2[i] = i * (2 * 1024 * 1024); pt2[i] |= PG_V | PG_RW | PG_PS | PG_U; } -#endif +#endif /* !__amd64__ */ if (bootverbose) device_printf(sc->acpi_dev, "wakeup code va %#jx pa %#jx\n", From owner-svn-src-all@freebsd.org Fri Feb 3 01:23:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6951CCD322; Fri, 3 Feb 2017 01:23:40 +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 6BD94122B; Fri, 3 Feb 2017 01:23:40 +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 v131NdH4094369; Fri, 3 Feb 2017 01:23:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131Ndww094368; Fri, 3 Feb 2017 01:23:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030123.v131Ndww094368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313129 - stable/11/cddl/contrib/opensolaris/common/ctf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:23:40 -0000 Author: markj Date: Fri Feb 3 01:23:39 2017 New Revision: 313129 URL: https://svnweb.freebsd.org/changeset/base/313129 Log: MFC r305055: Recursively enumerate anonymous structs and unions in ctf_member_info(). Modified: stable/11/cddl/contrib/opensolaris/common/ctf/ctf_types.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/common/ctf/ctf_types.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/common/ctf/ctf_types.c Fri Feb 3 01:21:56 2017 (r313128) +++ stable/11/cddl/contrib/opensolaris/common/ctf/ctf_types.c Fri Feb 3 01:23:39 2017 (r313129) @@ -644,11 +644,8 @@ ctf_type_compat(ctf_file_t *lfp, ctf_id_ } } -/* - * Return the type and offset for a given member of a STRUCT or UNION. - */ -int -ctf_member_info(ctf_file_t *fp, ctf_id_t type, const char *name, +static int +_ctf_member_info(ctf_file_t *fp, ctf_id_t type, const char *name, ulong_t off, ctf_membinfo_t *mip) { ctf_file_t *ofp = fp; @@ -673,9 +670,13 @@ ctf_member_info(ctf_file_t *fp, ctf_id_t ((uintptr_t)tp + increment); for (n = LCTF_INFO_VLEN(fp, tp->ctt_info); n != 0; n--, mp++) { + if (mp->ctm_name == 0 && + _ctf_member_info(fp, mp->ctm_type, name, + mp->ctm_offset + off, mip) == 0) + return (0); if (strcmp(ctf_strptr(fp, mp->ctm_name), name) == 0) { mip->ctm_type = mp->ctm_type; - mip->ctm_offset = mp->ctm_offset; + mip->ctm_offset = mp->ctm_offset + off; return (0); } } @@ -684,9 +685,14 @@ ctf_member_info(ctf_file_t *fp, ctf_id_t ((uintptr_t)tp + increment); for (n = LCTF_INFO_VLEN(fp, tp->ctt_info); n != 0; n--, lmp++) { + if (lmp->ctlm_name == 0 && + _ctf_member_info(fp, lmp->ctlm_name, name, + (ulong_t)CTF_LMEM_OFFSET(lmp) + off, mip) == 0) + return (0); if (strcmp(ctf_strptr(fp, lmp->ctlm_name), name) == 0) { mip->ctm_type = lmp->ctlm_type; - mip->ctm_offset = (ulong_t)CTF_LMEM_OFFSET(lmp); + mip->ctm_offset = + (ulong_t)CTF_LMEM_OFFSET(lmp) + off; return (0); } } @@ -696,6 +702,17 @@ ctf_member_info(ctf_file_t *fp, ctf_id_t } /* + * Return the type and offset for a given member of a STRUCT or UNION. + */ +int +ctf_member_info(ctf_file_t *fp, ctf_id_t type, const char *name, + ctf_membinfo_t *mip) +{ + + return (_ctf_member_info(fp, type, name, 0, mip)); +} + +/* * Return the array type, index, and size information for the specified ARRAY. */ int From owner-svn-src-all@freebsd.org Fri Feb 3 01:28:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31776CCD404; Fri, 3 Feb 2017 01:28:59 +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 E90C7143B; Fri, 3 Feb 2017 01:28:58 +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 v131SwM0094822; Fri, 3 Feb 2017 01:28:58 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131SvJI094820; Fri, 3 Feb 2017 01:28:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030128.v131SvJI094820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313130 - in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/pid usr.sbin/dtrace/tests/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:28:59 -0000 Author: markj Date: Fri Feb 3 01:28:57 2017 New Revision: 313130 URL: https://svnweb.freebsd.org/changeset/base/313130 Log: MFC r307400, r307401: DTrace test fixes. Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c stable/11/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Fri Feb 3 01:23:39 2017 (r313129) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Fri Feb 3 01:28:57 2017 (r313130) @@ -31,8 +31,8 @@ #include int -go(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, - int arg7, int arg8, int arg9) +go(long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6, + long arg7, long arg8, long arg9) { return (arg1); } Modified: stable/11/cddl/usr.sbin/dtrace/tests/tools/exclude.sh ============================================================================== --- stable/11/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri Feb 3 01:23:39 2017 (r313129) +++ stable/11/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Fri Feb 3 01:28:57 2017 (r313130) @@ -73,6 +73,7 @@ exclude EXFAIL common/mib/tst.udp.ksh exclude SKIP common/privs/tst.fds.ksh exclude SKIP common/privs/tst.func_access.ksh exclude SKIP common/privs/tst.getf.ksh +exclude SKIP common/privs/tst.kpriv.ksh exclude SKIP common/privs/tst.op_access.ksh exclude SKIP common/privs/tst.procpriv.ksh exclude SKIP common/privs/tst.providers.ksh From owner-svn-src-all@freebsd.org Fri Feb 3 01:30:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0B29CCD4F3; Fri, 3 Feb 2017 01:30:52 +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 8FD79161B; Fri, 3 Feb 2017 01:30:52 +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 v131Upw3094977; Fri, 3 Feb 2017 01:30:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131UpoV094976; Fri, 3 Feb 2017 01:30:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030130.v131UpoV094976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313131 - stable/11/cddl/lib/libdtrace X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:30:52 -0000 Author: markj Date: Fri Feb 3 01:30:51 2017 New Revision: 313131 URL: https://svnweb.freebsd.org/changeset/base/313131 Log: MFC r308773: Define dependencies for some auto-generated source files in libdtrace. Modified: stable/11/cddl/lib/libdtrace/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/lib/libdtrace/Makefile ============================================================================== --- stable/11/cddl/lib/libdtrace/Makefile Fri Feb 3 01:28:57 2017 (r313130) +++ stable/11/cddl/lib/libdtrace/Makefile Fri Feb 3 01:30:51 2017 (r313131) @@ -120,12 +120,10 @@ LIBADD= ctf elf proc pthread rtld_db CLEANFILES= dt_errtags.c dt_names.c -dt_errtags.c: - sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh < ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h > dt_errtags.c - -dt_names.c: - sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh < ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h > dt_names.c +.include -beforedepend: dt_errtags.c dt_names.c +dt_errtags.c: ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h + sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh < ${.ALLSRC} > ${.TARGET} -.include +dt_names.c: ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h + sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh < ${.ALLSRC} > ${.TARGET} From owner-svn-src-all@freebsd.org Fri Feb 3 01:32:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C222CCD6AE; Fri, 3 Feb 2017 01:32:05 +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 46D4D1A3D; Fri, 3 Feb 2017 01:32:05 +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 v131W4sm098851; Fri, 3 Feb 2017 01:32:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v131W4Yt098849; Fri, 3 Feb 2017 01:32:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030132.v131W4Yt098849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 01:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313132 - stable/11/contrib/elftoolchain/libdwarf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 01:32:05 -0000 Author: markj Date: Fri Feb 3 01:32:04 2017 New Revision: 313132 URL: https://svnweb.freebsd.org/changeset/base/313132 Log: MFC r310724: Follow DW_AT_specification when looking up DW_AT_type attributes. PR: 215350, 215395 Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval.c stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval.c ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval.c Fri Feb 3 01:30:51 2017 (r313131) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval.c Fri Feb 3 01:32:04 2017 (r313132) @@ -145,6 +145,7 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw Dwarf_Die die1; Dwarf_Unsigned val; Dwarf_Debug dbg; + int first; dbg = die != NULL ? die->die_dbg : NULL; @@ -155,14 +156,16 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw *valp = 0; - if ((at = _dwarf_attr_find(die, attr)) == NULL && attr != DW_AT_type) { - DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); - return (DW_DLV_NO_ENTRY); - } - die1 = NULL; - if (at == NULL && - (at = _dwarf_attr_find(die, DW_AT_abstract_origin)) != NULL) { + for (;;) { + if ((at = _dwarf_attr_find(die, attr)) != NULL || + attr != DW_AT_type) + break; + if ((at = _dwarf_attr_find(die, DW_AT_abstract_origin)) == + NULL && + (at = _dwarf_attr_find(die, DW_AT_specification)) == NULL) + break; + switch (at->at_form) { case DW_FORM_ref1: case DW_FORM_ref2: @@ -170,13 +173,15 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw case DW_FORM_ref8: case DW_FORM_ref_udata: val = at->u[0].u64; - if ((die1 = _dwarf_die_find(die, val)) == NULL || - (at = _dwarf_attr_find(die1, attr)) == NULL) { - if (die1 != NULL) - dwarf_dealloc(dbg, die1, DW_DLA_DIE); + first = (die1 == NULL); + die1 = _dwarf_die_find(die, val); + if (!first) + dwarf_dealloc(dbg, die, DW_DLA_DIE); + if (die1 == NULL) { DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); return (DW_DLV_NO_ENTRY); } + die = die1; break; default: DWARF_SET_ERROR(dbg, err, DW_DLE_ATTR_FORM_BAD); @@ -184,6 +189,11 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw } } + if (at == NULL) { + DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); + return (DW_DLV_NO_ENTRY); + } + switch (at->at_form) { case DW_FORM_addr: case DW_FORM_data1: Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 Fri Feb 3 01:30:51 2017 (r313131) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf_attrval_signed.3 Fri Feb 3 01:32:04 2017 (r313132) @@ -24,7 +24,7 @@ .\" .\" $Id: dwarf_attrval_signed.3 2980 2014-01-21 20:15:54Z kaiwang27 $ .\" -.Dd January 18, 2014 +.Dd December 26, 2016 .Os .Dt DWARF_ATTRVAL_SIGNED 3 .Sh NAME @@ -168,17 +168,22 @@ or .Pp If the attribute named by argument .Ar attr -is not present in the debugging information entry referenced by -argument +is +.Dv DW_AT_type +and is not present in the debugging information entry referenced by argument .Ar die , and if a .Dv DW_AT_abstract_origin +or +.Dv DW_AT_specification attribute is present in the debugging information entry, function .Fn dwarf_attrval_unsigned will search for the named attribute in the debugging information entry referenced by the .Dv DW_AT_abstract_origin +or +.Dv DW_AT_specification attribute. .Sh RETURN VALUES On success, these functions returns From owner-svn-src-all@freebsd.org Fri Feb 3 03:22:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD8FDCCE65E; Fri, 3 Feb 2017 03:22:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 799EB1651; Fri, 3 Feb 2017 03:22:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v133Mlgj044463; Fri, 3 Feb 2017 03:22:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v133MlJr044461; Fri, 3 Feb 2017 03:22:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201702030322.v133MlJr044461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 3 Feb 2017 03:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313133 - head/sys/cddl/dev/dtrace/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 03:22:49 -0000 Author: markj Date: Fri Feb 3 03:22:47 2017 New Revision: 313133 URL: https://svnweb.freebsd.org/changeset/base/313133 Log: Sync the x86 dis_tables.c with upstream. This corresponds to the following illumos issues: 5755 want support for Intel FMA instrs 5756 want support for Intel BMI1 instrs 5757 want support for Intel BMI2 instrs 5758 want support for Intel AVX2 instrs 7204 Want broadwell rdseed and adx support 7208 Want stac/clac disasm support 7733 Need SHA Instruction dis support 7756 dis can't handle x86 SSE 3 instructions 7757 want avx2 disasm tests 7758 want SSE 4.1 disasm tests MFC after: 2 weeks Modified: head/sys/cddl/dev/dtrace/x86/dis_tables.c head/sys/cddl/dev/dtrace/x86/dis_tables.h Modified: head/sys/cddl/dev/dtrace/x86/dis_tables.c ============================================================================== --- head/sys/cddl/dev/dtrace/x86/dis_tables.c Fri Feb 3 01:32:04 2017 (r313132) +++ head/sys/cddl/dev/dtrace/x86/dis_tables.c Fri Feb 3 03:22:47 2017 (r313133) @@ -21,7 +21,7 @@ */ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright 2016 Joyent, Inc. */ /* @@ -87,6 +87,8 @@ typedef struct instable { uint_t it_always64:1; /* 64 bit when in 64 bit mode */ uint_t it_invalid32:1; /* invalid in IA32 */ uint_t it_stackop:1; /* push/pop stack operation */ + uint_t it_vexwoxmm:1; /* VEX instructions that don't use XMM/YMM */ + uint_t it_avxsuf:1; /* AVX suffix required */ } instable_t; /* @@ -219,6 +221,7 @@ enum { VEX_NONE, /* VEX no operand */ VEX_MO, /* VEX mod_rm -> implicit reg */ VEX_RMrX, /* VEX VEX.vvvv, mod_rm -> mod_reg */ + VEX_VRMrX, /* VEX mod_rm, VEX.vvvv -> mod_rm */ VEX_RRX, /* VEX VEX.vvvv, mod_reg -> mod_rm */ VEX_RMRX, /* VEX VEX.vvvv, mod_rm, imm8[7:4] -> mod_reg */ VEX_MX, /* VEX mod_rm -> mod_reg */ @@ -230,11 +233,16 @@ enum { VEX_RR, /* VEX mod_rm -> mod_reg */ VEX_RRi, /* VEX mod_rm, imm8 -> mod_reg */ VEX_RM, /* VEX mod_reg -> mod_rm */ + VEX_RIM, /* VEX mod_reg, imm8 -> mod_rm */ VEX_RRM, /* VEX VEX.vvvv, mod_reg -> mod_rm */ VEX_RMX, /* VEX VEX.vvvv, mod_rm -> mod_reg */ + VEX_SbVM, /* VEX SIB, VEX.vvvv -> mod_rm */ VMx, /* vmcall/vmlaunch/vmresume/vmxoff */ VMxo, /* VMx instruction with optional prefix */ - SVM /* AMD SVM instructions */ + SVM, /* AMD SVM instructions */ + BLS, /* BLSR, BLSMSK, BLSI */ + FMA, /* FMA instructions, all VEX_RMrX */ + ADX /* ADX instructions, support REX.w, mod_rm->mod_reg */ }; /* @@ -272,12 +280,14 @@ enum { * IND - indirect to another to another table * "T" - means to Terminate indirections (this is the final opcode) * "S" - means "operand length suffix required" + * "Sa" - means AVX2 suffix (d/q) required * "NS" - means "no suffix" which is the operand length suffix of the opcode * "Z" - means instruction size arg required * "u" - means the opcode is invalid in IA32 but valid in amd64 * "x" - means the opcode is invalid in amd64, but not IA32 * "y" - means the operand size is always 64 bits in 64 bit mode * "p" - means push/pop stack operation + * "vr" - means VEX instruction that operates on normal registers, not fpu */ #if defined(DIS_TEXT) && defined(DIS_MEM) @@ -290,11 +300,13 @@ enum { #define TNSyp(name, amode) {TERM, amode, name, 0, 0, 0, 1, 0, 1} #define TNSZ(name, amode, sz) {TERM, amode, name, 0, sz, 0, 0, 0, 0} #define TNSZy(name, amode, sz) {TERM, amode, name, 0, sz, 0, 1, 0, 0} +#define TNSZvr(name, amode, sz) {TERM, amode, name, 0, sz, 0, 0, 0, 0, 1} #define TS(name, amode) {TERM, amode, name, 1, 0, 0, 0, 0, 0} #define TSx(name, amode) {TERM, amode, name, 1, 0, 1, 0, 0, 0} #define TSy(name, amode) {TERM, amode, name, 1, 0, 0, 1, 0, 0} #define TSp(name, amode) {TERM, amode, name, 1, 0, 0, 0, 0, 1} #define TSZ(name, amode, sz) {TERM, amode, name, 1, sz, 0, 0, 0, 0} +#define TSaZ(name, amode, sz) {TERM, amode, name, 1, sz, 0, 0, 0, 0, 0, 1} #define TSZx(name, amode, sz) {TERM, amode, name, 1, sz, 1, 0, 0, 0} #define TSZy(name, amode, sz) {TERM, amode, name, 1, sz, 0, 1, 0, 0} #define INVALID {TERM, UNKNOWN, "", 0, 0, 0, 0, 0} @@ -308,11 +320,13 @@ enum { #define TNSyp(name, amode) {TERM, amode, name, 0, 0, 1, 0, 1} #define TNSZ(name, amode, sz) {TERM, amode, name, 0, 0, 0, 0, 0} #define TNSZy(name, amode, sz) {TERM, amode, name, 0, 0, 1, 0, 0} +#define TNSZvr(name, amode, sz) {TERM, amode, name, 0, 0, 0, 0, 0, 1} #define TS(name, amode) {TERM, amode, name, 1, 0, 0, 0, 0} #define TSx(name, amode) {TERM, amode, name, 1, 1, 0, 0, 0} #define TSy(name, amode) {TERM, amode, name, 1, 0, 1, 0, 0} #define TSp(name, amode) {TERM, amode, name, 1, 0, 0, 0, 1} #define TSZ(name, amode, sz) {TERM, amode, name, 1, 0, 0, 0, 0} +#define TSaZ(name, amode, sz) {TERM, amode, name, 1, 0, 0, 0, 0, 0, 1} #define TSZx(name, amode, sz) {TERM, amode, name, 1, 1, 0, 0, 0} #define TSZy(name, amode, sz) {TERM, amode, name, 1, 0, 1, 0, 0} #define INVALID {TERM, UNKNOWN, "", 0, 0, 0, 0, 0} @@ -326,11 +340,13 @@ enum { #define TNSx(name, amode) {TERM, amode, 0, 1, 0, 0, 0} #define TNSZ(name, amode, sz) {TERM, amode, sz, 0, 0, 0, 0} #define TNSZy(name, amode, sz) {TERM, amode, sz, 0, 1, 0, 0} +#define TNSZvr(name, amode, sz) {TERM, amode, sz, 0, 0, 0, 0, 1} #define TS(name, amode) {TERM, amode, 0, 0, 0, 0, 0} #define TSx(name, amode) {TERM, amode, 0, 1, 0, 0, 0} #define TSy(name, amode) {TERM, amode, 0, 0, 1, 0, 0} #define TSp(name, amode) {TERM, amode, 0, 0, 0, 0, 1} #define TSZ(name, amode, sz) {TERM, amode, sz, 0, 0, 0, 0} +#define TSaZ(name, amode, sz) {TERM, amode, sz, 0, 0, 0, 0, 0, 1} #define TSZx(name, amode, sz) {TERM, amode, sz, 1, 0, 0, 0} #define TSZy(name, amode, sz) {TERM, amode, sz, 0, 1, 0, 0} #define INVALID {TERM, UNKNOWN, 0, 0, 0, 0, 0} @@ -344,11 +360,13 @@ enum { #define TNSx(name, amode) {TERM, amode, 1, 0, 0, 0} #define TNSZ(name, amode, sz) {TERM, amode, 0, 0, 0, 0} #define TNSZy(name, amode, sz) {TERM, amode, 0, 1, 0, 0} +#define TNSZvr(name, amode, sz) {TERM, amode, 0, 0, 0, 0, 1} #define TS(name, amode) {TERM, amode, 0, 0, 0, 0} #define TSx(name, amode) {TERM, amode, 1, 0, 0, 0} #define TSy(name, amode) {TERM, amode, 0, 1, 0, 0} #define TSp(name, amode) {TERM, amode, 0, 0, 0, 1} #define TSZ(name, amode, sz) {TERM, amode, 0, 0, 0, 0} +#define TSaZ(name, amode, sz) {TERM, amode, 0, 0, 0, 0, 0, 1} #define TSZx(name, amode, sz) {TERM, amode, 1, 0, 0, 0} #define TSZy(name, amode, sz) {TERM, amode, 0, 1, 0, 0} #define INVALID {TERM, UNKNOWN, 0, 0, 0, 0} @@ -399,6 +417,12 @@ const char *const dis_addr64_mode12[16] const char *const dis_scale_factor[4] = { ")", ",2)", ",4)", ",8)" }; /* + * decode for scale from VSIB byte, note that we always include the scale factor + * to match gas. + */ +const char *const dis_vscale_factor[4] = { ",1)", ",2)", ",4)", ",8)" }; + +/* * register decoding for normal references to registers (ie. not addressing) */ const char *const dis_REG8[16] = { @@ -550,7 +574,7 @@ const instable_t dis_op0FC7[8] = { const instable_t dis_op0FC7m3[8] = { /* [0] */ INVALID, INVALID, INVALID, INVALID, -/* [4] */ INVALID, INVALID, TNS("rdrand",MG9), INVALID, +/* [4] */ INVALID, INVALID, TNS("rdrand",MG9), TNS("rdseed", MG9), }; /* @@ -669,7 +693,7 @@ const instable_t dis_opSIMDdata16[256] = /* [70] */ TNSZ("pshufd",XMMP,16), INVALID, INVALID, INVALID, /* [74] */ TNSZ("pcmpeqb",XMM,16), TNSZ("pcmpeqw",XMM,16), TNSZ("pcmpeqd",XMM,16), INVALID, /* [78] */ TNSZ("extrq",XMM2I,16), TNSZ("extrq",XMM,16), INVALID, INVALID, -/* [7C] */ INVALID, INVALID, TNSZ("movd",XMM3MXS,4), TNSZ("movdqa",XMMS,16), +/* [7C] */ TNSZ("haddpd",XMM,16), TNSZ("hsubpd",XMM,16), TNSZ("movd",XMM3MXS,4), TNSZ("movdqa",XMMS,16), /* [80] */ INVALID, INVALID, INVALID, INVALID, /* [84] */ INVALID, INVALID, INVALID, INVALID, @@ -696,7 +720,7 @@ const instable_t dis_opSIMDdata16[256] = /* [C8] */ INVALID, INVALID, INVALID, INVALID, /* [CC] */ INVALID, INVALID, INVALID, INVALID, -/* [D0] */ INVALID, TNSZ("psrlw",XMM,16), TNSZ("psrld",XMM,16), TNSZ("psrlq",XMM,16), +/* [D0] */ TNSZ("addsubpd",XMM,16),TNSZ("psrlw",XMM,16), TNSZ("psrld",XMM,16), TNSZ("psrlq",XMM,16), /* [D4] */ TNSZ("paddq",XMM,16), TNSZ("pmullw",XMM,16), TNSZ("movq",XMMS,8), TNS("pmovmskb",XMMX3), /* [D8] */ TNSZ("psubusb",XMM,16), TNSZ("psubusw",XMM,16), TNSZ("pminub",XMM,16), TNSZ("pand",XMM,16), /* [DC] */ TNSZ("paddusb",XMM,16), TNSZ("paddusw",XMM,16), TNSZ("pmaxub",XMM,16), TNSZ("pandn",XMM,16), @@ -803,7 +827,7 @@ const instable_t dis_opSIMDrepnz[256] = /* [08] */ INVALID, INVALID, INVALID, INVALID, /* [0C] */ INVALID, INVALID, INVALID, INVALID, -/* [10] */ TNSZ("movsd",XMM,8), TNSZ("movsd",XMMS,8), INVALID, INVALID, +/* [10] */ TNSZ("movsd",XMM,8), TNSZ("movsd",XMMS,8), TNSZ("movddup",XMM,8), INVALID, /* [14] */ INVALID, INVALID, INVALID, INVALID, /* [18] */ INVALID, INVALID, INVALID, INVALID, /* [1C] */ INVALID, INVALID, INVALID, INVALID, @@ -836,7 +860,7 @@ const instable_t dis_opSIMDrepnz[256] = /* [70] */ TNSZ("pshuflw",XMMP,16),INVALID, INVALID, INVALID, /* [74] */ INVALID, INVALID, INVALID, INVALID, /* [78] */ TNSZ("insertq",XMMX2I,16),TNSZ("insertq",XMM,8),INVALID, INVALID, -/* [7C] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ TNSZ("haddps",XMM,16), TNSZ("hsubps",XMM,16), INVALID, INVALID, /* [80] */ INVALID, INVALID, INVALID, INVALID, /* [84] */ INVALID, INVALID, INVALID, INVALID, @@ -863,7 +887,7 @@ const instable_t dis_opSIMDrepnz[256] = /* [C8] */ INVALID, INVALID, INVALID, INVALID, /* [CC] */ INVALID, INVALID, INVALID, INVALID, -/* [D0] */ INVALID, INVALID, INVALID, INVALID, +/* [D0] */ TNSZ("addsubps",XMM,16),INVALID, INVALID, INVALID, /* [D4] */ INVALID, INVALID, TNS("movdq2q",XMMXM), INVALID, /* [D8] */ INVALID, INVALID, INVALID, INVALID, /* [DC] */ INVALID, INVALID, INVALID, INVALID, @@ -873,7 +897,7 @@ const instable_t dis_opSIMDrepnz[256] = /* [E8] */ INVALID, INVALID, INVALID, INVALID, /* [EC] */ INVALID, INVALID, INVALID, INVALID, -/* [F0] */ INVALID, INVALID, INVALID, INVALID, +/* [F0] */ TNS("lddqu",XMMM), INVALID, INVALID, INVALID, /* [F4] */ INVALID, INVALID, INVALID, INVALID, /* [F8] */ INVALID, INVALID, INVALID, INVALID, /* [FC] */ INVALID, INVALID, INVALID, INVALID, @@ -961,6 +985,251 @@ const instable_t dis_opAVXF20F[256] = { /* [FC] */ INVALID, INVALID, INVALID, INVALID, }; +const instable_t dis_opAVXF20F3A[256] = { +/* [00] */ INVALID, INVALID, INVALID, INVALID, +/* [04] */ INVALID, INVALID, INVALID, INVALID, +/* [08] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [10] */ INVALID, INVALID, INVALID, INVALID, +/* [14] */ INVALID, INVALID, INVALID, INVALID, +/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, INVALID, + +/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [24] */ INVALID, INVALID, INVALID, INVALID, +/* [28] */ INVALID, INVALID, INVALID, INVALID, +/* [2C] */ INVALID, INVALID, INVALID, INVALID, + +/* [30] */ INVALID, INVALID, INVALID, INVALID, +/* [34] */ INVALID, INVALID, INVALID, INVALID, +/* [38] */ INVALID, INVALID, INVALID, INVALID, +/* [3C] */ INVALID, INVALID, INVALID, INVALID, + +/* [40] */ INVALID, INVALID, INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ INVALID, INVALID, INVALID, INVALID, +/* [54] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ INVALID, INVALID, INVALID, INVALID, +/* [5C] */ INVALID, INVALID, INVALID, INVALID, + +/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [64] */ INVALID, INVALID, INVALID, INVALID, +/* [68] */ INVALID, INVALID, INVALID, INVALID, +/* [6C] */ INVALID, INVALID, INVALID, INVALID, + +/* [70] */ INVALID, INVALID, INVALID, INVALID, +/* [74] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ INVALID, INVALID, INVALID, INVALID, + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ INVALID, INVALID, INVALID, INVALID, +/* [BC] */ INVALID, INVALID, INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, INVALID, INVALID, +/* [C4] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ INVALID, INVALID, INVALID, INVALID, +/* [D4] */ INVALID, INVALID, INVALID, INVALID, +/* [D8] */ INVALID, INVALID, INVALID, INVALID, +/* [DC] */ INVALID, INVALID, INVALID, INVALID, + +/* [E0] */ INVALID, INVALID, INVALID, INVALID, +/* [E4] */ INVALID, INVALID, INVALID, INVALID, +/* [E8] */ INVALID, INVALID, INVALID, INVALID, +/* [EC] */ INVALID, INVALID, INVALID, INVALID, + +/* [F0] */ TNSZvr("rorx",VEX_MXI,6),INVALID, INVALID, INVALID, +/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F8] */ INVALID, INVALID, INVALID, INVALID, +/* [FC] */ INVALID, INVALID, INVALID, INVALID, +}; + +const instable_t dis_opAVXF20F38[256] = { +/* [00] */ INVALID, INVALID, INVALID, INVALID, +/* [04] */ INVALID, INVALID, INVALID, INVALID, +/* [08] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [10] */ INVALID, INVALID, INVALID, INVALID, +/* [14] */ INVALID, INVALID, INVALID, INVALID, +/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, INVALID, + +/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [24] */ INVALID, INVALID, INVALID, INVALID, +/* [28] */ INVALID, INVALID, INVALID, INVALID, +/* [2C] */ INVALID, INVALID, INVALID, INVALID, + +/* [30] */ INVALID, INVALID, INVALID, INVALID, +/* [34] */ INVALID, INVALID, INVALID, INVALID, +/* [38] */ INVALID, INVALID, INVALID, INVALID, +/* [3C] */ INVALID, INVALID, INVALID, INVALID, + +/* [40] */ INVALID, INVALID, INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ INVALID, INVALID, INVALID, INVALID, +/* [54] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ INVALID, INVALID, INVALID, INVALID, +/* [5C] */ INVALID, INVALID, INVALID, INVALID, + +/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [64] */ INVALID, INVALID, INVALID, INVALID, +/* [68] */ INVALID, INVALID, INVALID, INVALID, +/* [6C] */ INVALID, INVALID, INVALID, INVALID, + +/* [70] */ INVALID, INVALID, INVALID, INVALID, +/* [74] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ INVALID, INVALID, INVALID, INVALID, + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ INVALID, INVALID, INVALID, INVALID, +/* [BC] */ INVALID, INVALID, INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, INVALID, INVALID, +/* [C4] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ INVALID, INVALID, INVALID, INVALID, +/* [D4] */ INVALID, INVALID, INVALID, INVALID, +/* [D8] */ INVALID, INVALID, INVALID, INVALID, +/* [DC] */ INVALID, INVALID, INVALID, INVALID, + +/* [E0] */ INVALID, INVALID, INVALID, INVALID, +/* [E4] */ INVALID, INVALID, INVALID, INVALID, +/* [E8] */ INVALID, INVALID, INVALID, INVALID, +/* [EC] */ INVALID, INVALID, INVALID, INVALID, + +/* [F0] */ INVALID, INVALID, INVALID, INVALID, +/* [F4] */ INVALID, TNSZvr("pdep",VEX_RMrX,5),TNSZvr("mulx",VEX_RMrX,5),TNSZvr("shrx",VEX_VRMrX,5), +/* [F8] */ INVALID, INVALID, INVALID, INVALID, +/* [FC] */ INVALID, INVALID, INVALID, INVALID, +}; + +const instable_t dis_opAVXF30F38[256] = { +/* [00] */ INVALID, INVALID, INVALID, INVALID, +/* [04] */ INVALID, INVALID, INVALID, INVALID, +/* [08] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [10] */ INVALID, INVALID, INVALID, INVALID, +/* [14] */ INVALID, INVALID, INVALID, INVALID, +/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, INVALID, + +/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [24] */ INVALID, INVALID, INVALID, INVALID, +/* [28] */ INVALID, INVALID, INVALID, INVALID, +/* [2C] */ INVALID, INVALID, INVALID, INVALID, + +/* [30] */ INVALID, INVALID, INVALID, INVALID, +/* [34] */ INVALID, INVALID, INVALID, INVALID, +/* [38] */ INVALID, INVALID, INVALID, INVALID, +/* [3C] */ INVALID, INVALID, INVALID, INVALID, + +/* [40] */ INVALID, INVALID, INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ INVALID, INVALID, INVALID, INVALID, +/* [54] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ INVALID, INVALID, INVALID, INVALID, +/* [5C] */ INVALID, INVALID, INVALID, INVALID, + +/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [64] */ INVALID, INVALID, INVALID, INVALID, +/* [68] */ INVALID, INVALID, INVALID, INVALID, +/* [6C] */ INVALID, INVALID, INVALID, INVALID, + +/* [70] */ INVALID, INVALID, INVALID, INVALID, +/* [74] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ INVALID, INVALID, INVALID, INVALID, + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ INVALID, INVALID, INVALID, INVALID, +/* [BC] */ INVALID, INVALID, INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, INVALID, INVALID, +/* [C4] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ INVALID, INVALID, INVALID, INVALID, +/* [D4] */ INVALID, INVALID, INVALID, INVALID, +/* [D8] */ INVALID, INVALID, INVALID, INVALID, +/* [DC] */ INVALID, INVALID, INVALID, INVALID, + +/* [E0] */ INVALID, INVALID, INVALID, INVALID, +/* [E4] */ INVALID, INVALID, INVALID, INVALID, +/* [E8] */ INVALID, INVALID, INVALID, INVALID, +/* [EC] */ INVALID, INVALID, INVALID, INVALID, + +/* [F0] */ INVALID, INVALID, INVALID, INVALID, +/* [F4] */ INVALID, TNSZvr("pext",VEX_RMrX,5),INVALID, TNSZvr("sarx",VEX_VRMrX,5), +/* [F8] */ INVALID, INVALID, INVALID, INVALID, +/* [FC] */ INVALID, INVALID, INVALID, INVALID, +}; /* * Decode table for SIMD instructions with the repz (0xf3) prefix. */ @@ -970,8 +1239,8 @@ const instable_t dis_opSIMDrepz[256] = { /* [08] */ INVALID, INVALID, INVALID, INVALID, /* [0C] */ INVALID, INVALID, INVALID, INVALID, -/* [10] */ TNSZ("movss",XMM,4), TNSZ("movss",XMMS,4), INVALID, INVALID, -/* [14] */ INVALID, INVALID, INVALID, INVALID, +/* [10] */ TNSZ("movss",XMM,4), TNSZ("movss",XMMS,4), TNSZ("movsldup",XMM,16),INVALID, +/* [14] */ INVALID, INVALID, TNSZ("movshdup",XMM,16),INVALID, /* [18] */ INVALID, INVALID, INVALID, INVALID, /* [1C] */ INVALID, INVALID, INVALID, INVALID, @@ -1023,7 +1292,7 @@ const instable_t dis_opSIMDrepz[256] = { /* [B0] */ INVALID, INVALID, INVALID, INVALID, /* [B4] */ INVALID, INVALID, INVALID, INVALID, /* [B8] */ TS("popcnt",MRw), INVALID, INVALID, INVALID, -/* [BC] */ INVALID, TS("lzcnt",MRw), INVALID, INVALID, +/* [BC] */ TNSZ("tzcnt",MRw,5), TS("lzcnt",MRw), INVALID, INVALID, /* [C0] */ INVALID, INVALID, TNSZ("cmpss",XMMP,4), INVALID, /* [C4] */ INVALID, INVALID, INVALID, INVALID, @@ -1141,6 +1410,15 @@ const instable_t dis_op0F38F1[2] = { TS("movbe",MOVBE), }; +/* + * The following table is used to distinguish between adox and adcx which share + * the same opcodes. + */ +const instable_t dis_op0F38F6[2] = { +/* [00] */ TNS("adcx",ADX), + TNS("adox",ADX), +}; + const instable_t dis_op0F38[256] = { /* [00] */ TNSZ("pshufb",XMM_66o,16),TNSZ("phaddw",XMM_66o,16),TNSZ("phaddd",XMM_66o,16),TNSZ("phaddsw",XMM_66o,16), /* [04] */ TNSZ("pmaddubsw",XMM_66o,16),TNSZ("phsubw",XMM_66o,16), TNSZ("phsubd",XMM_66o,16),TNSZ("phsubsw",XMM_66o,16), @@ -1204,8 +1482,8 @@ const instable_t dis_op0F38[256] = { /* [C0] */ INVALID, INVALID, INVALID, INVALID, /* [C4] */ INVALID, INVALID, INVALID, INVALID, -/* [C8] */ INVALID, INVALID, INVALID, INVALID, -/* [CC] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ TNSZ("sha1nexte",XMM,16),TNSZ("sha1msg1",XMM,16),TNSZ("sha1msg2",XMM,16),TNSZ("sha256rnds2",XMM,16), +/* [CC] */ TNSZ("sha256msg1",XMM,16),TNSZ("sha256msg2",XMM,16),INVALID, INVALID, /* [D0] */ INVALID, INVALID, INVALID, INVALID, /* [D4] */ INVALID, INVALID, INVALID, INVALID, @@ -1217,7 +1495,7 @@ const instable_t dis_op0F38[256] = { /* [E8] */ INVALID, INVALID, INVALID, INVALID, /* [EC] */ INVALID, INVALID, INVALID, INVALID, /* [F0] */ IND(dis_op0F38F0), IND(dis_op0F38F1), INVALID, INVALID, -/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F4] */ INVALID, INVALID, IND(dis_op0F38F6), INVALID, /* [F8] */ INVALID, INVALID, INVALID, INVALID, /* [FC] */ INVALID, INVALID, INVALID, INVALID, }; @@ -1229,7 +1507,7 @@ const instable_t dis_opAVX660F38[256] = /* [0C] */ TNSZ("vpermilps",VEX_RMrX,8),TNSZ("vpermilpd",VEX_RMrX,16),TNSZ("vtestps",VEX_RRI,8), TNSZ("vtestpd",VEX_RRI,16), /* [10] */ INVALID, INVALID, INVALID, TNSZ("vcvtph2ps",VEX_MX,16), -/* [14] */ INVALID, INVALID, INVALID, TNSZ("vptest",VEX_RRI,16), +/* [14] */ INVALID, INVALID, TNSZ("vpermps",VEX_RMrX,16),TNSZ("vptest",VEX_RRI,16), /* [18] */ TNSZ("vbroadcastss",VEX_MX,4),TNSZ("vbroadcastsd",VEX_MX,8),TNSZ("vbroadcastf128",VEX_MX,16),INVALID, /* [1C] */ TNSZ("vpabsb",VEX_MX,16),TNSZ("vpabsw",VEX_MX,16),TNSZ("vpabsd",VEX_MX,16),INVALID, @@ -1239,18 +1517,18 @@ const instable_t dis_opAVX660F38[256] = /* [2C] */ TNSZ("vmaskmovps",VEX_RMrX,8),TNSZ("vmaskmovpd",VEX_RMrX,16),TNSZ("vmaskmovps",VEX_RRM,8),TNSZ("vmaskmovpd",VEX_RRM,16), /* [30] */ TNSZ("vpmovzxbw",VEX_MX,16),TNSZ("vpmovzxbd",VEX_MX,16),TNSZ("vpmovzxbq",VEX_MX,16),TNSZ("vpmovzxwd",VEX_MX,16), -/* [34] */ TNSZ("vpmovzxwq",VEX_MX,16),TNSZ("vpmovzxdq",VEX_MX,16),INVALID, TNSZ("vpcmpgtq",VEX_RMrX,16), +/* [34] */ TNSZ("vpmovzxwq",VEX_MX,16),TNSZ("vpmovzxdq",VEX_MX,16),TNSZ("vpermd",VEX_RMrX,16),TNSZ("vpcmpgtq",VEX_RMrX,16), /* [38] */ TNSZ("vpminsb",VEX_RMrX,16),TNSZ("vpminsd",VEX_RMrX,16),TNSZ("vpminuw",VEX_RMrX,16),TNSZ("vpminud",VEX_RMrX,16), /* [3C] */ TNSZ("vpmaxsb",VEX_RMrX,16),TNSZ("vpmaxsd",VEX_RMrX,16),TNSZ("vpmaxuw",VEX_RMrX,16),TNSZ("vpmaxud",VEX_RMrX,16), /* [40] */ TNSZ("vpmulld",VEX_RMrX,16),TNSZ("vphminposuw",VEX_MX,16),INVALID, INVALID, -/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [44] */ INVALID, TSaZ("vpsrlv",VEX_RMrX,16),TNSZ("vpsravd",VEX_RMrX,16),TSaZ("vpsllv",VEX_RMrX,16), /* [48] */ INVALID, INVALID, INVALID, INVALID, /* [4C] */ INVALID, INVALID, INVALID, INVALID, /* [50] */ INVALID, INVALID, INVALID, INVALID, /* [54] */ INVALID, INVALID, INVALID, INVALID, -/* [58] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ TNSZ("vpbroadcastd",VEX_MX,16),TNSZ("vpbroadcastq",VEX_MX,16),TNSZ("vbroadcasti128",VEX_MX,16),INVALID, /* [5C] */ INVALID, INVALID, INVALID, INVALID, /* [60] */ INVALID, INVALID, INVALID, INVALID, @@ -1260,28 +1538,28 @@ const instable_t dis_opAVX660F38[256] = /* [70] */ INVALID, INVALID, INVALID, INVALID, /* [74] */ INVALID, INVALID, INVALID, INVALID, -/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ TNSZ("vpbroadcastb",VEX_MX,16),TNSZ("vpbroadcastw",VEX_MX,16),INVALID, INVALID, /* [7C] */ INVALID, INVALID, INVALID, INVALID, /* [80] */ INVALID, INVALID, INVALID, INVALID, /* [84] */ INVALID, INVALID, INVALID, INVALID, /* [88] */ INVALID, INVALID, INVALID, INVALID, -/* [8C] */ INVALID, INVALID, INVALID, INVALID, +/* [8C] */ TSaZ("vpmaskmov",VEX_RMrX,16),INVALID, TSaZ("vpmaskmov",VEX_RRM,16),INVALID, -/* [90] */ INVALID, INVALID, INVALID, INVALID, -/* [94] */ INVALID, INVALID, INVALID, INVALID, -/* [98] */ INVALID, INVALID, INVALID, INVALID, -/* [9C] */ INVALID, INVALID, INVALID, INVALID, +/* [90] */ TNSZ("vpgatherd",VEX_SbVM,16),TNSZ("vpgatherq",VEX_SbVM,16),TNSZ("vgatherdp",VEX_SbVM,16),TNSZ("vgatherqp",VEX_SbVM,16), +/* [94] */ INVALID, INVALID, TNSZ("vfmaddsub132p",FMA,16),TNSZ("vfmsubadd132p",FMA,16), +/* [98] */ TNSZ("vfmadd132p",FMA,16),TNSZ("vfmadd132s",FMA,16),TNSZ("vfmsub132p",FMA,16),TNSZ("vfmsub132s",FMA,16), +/* [9C] */ TNSZ("vfnmadd132p",FMA,16),TNSZ("vfnmadd132s",FMA,16),TNSZ("vfnmsub132p",FMA,16),TNSZ("vfnmsub132s",FMA,16), /* [A0] */ INVALID, INVALID, INVALID, INVALID, -/* [A4] */ INVALID, INVALID, INVALID, INVALID, -/* [A8] */ INVALID, INVALID, INVALID, INVALID, -/* [AC] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, TNSZ("vfmaddsub213p",FMA,16),TNSZ("vfmsubadd213p",FMA,16), +/* [A8] */ TNSZ("vfmadd213p",FMA,16),TNSZ("vfmadd213s",FMA,16),TNSZ("vfmsub213p",FMA,16),TNSZ("vfmsub213s",FMA,16), +/* [AC] */ TNSZ("vfnmadd213p",FMA,16),TNSZ("vfnmadd213s",FMA,16),TNSZ("vfnmsub213p",FMA,16),TNSZ("vfnmsub213s",FMA,16), /* [B0] */ INVALID, INVALID, INVALID, INVALID, -/* [B4] */ INVALID, INVALID, INVALID, INVALID, -/* [B8] */ INVALID, INVALID, INVALID, INVALID, -/* [BC] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, TNSZ("vfmaddsub231p",FMA,16),TNSZ("vfmsubadd231p",FMA,16), +/* [B8] */ TNSZ("vfmadd231p",FMA,16),TNSZ("vfmadd231s",FMA,16),TNSZ("vfmsub231p",FMA,16),TNSZ("vfmsub231s",FMA,16), +/* [BC] */ TNSZ("vfnmadd231p",FMA,16),TNSZ("vfnmadd231s",FMA,16),TNSZ("vfnmsub231p",FMA,16),TNSZ("vfnmsub231s",FMA,16), /* [C0] */ INVALID, INVALID, INVALID, INVALID, /* [C4] */ INVALID, INVALID, INVALID, INVALID, @@ -1298,7 +1576,7 @@ const instable_t dis_opAVX660F38[256] = /* [E8] */ INVALID, INVALID, INVALID, INVALID, /* [EC] */ INVALID, INVALID, INVALID, INVALID, /* [F0] */ IND(dis_op0F38F0), IND(dis_op0F38F1), INVALID, INVALID, -/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F4] */ INVALID, INVALID, INVALID, TNSZvr("shlx",VEX_VRMrX,5), /* [F8] */ INVALID, INVALID, INVALID, INVALID, /* [FC] */ INVALID, INVALID, INVALID, INVALID, }; @@ -1367,7 +1645,7 @@ const instable_t dis_op0F3A[256] = { /* [C0] */ INVALID, INVALID, INVALID, INVALID, /* [C4] */ INVALID, INVALID, INVALID, INVALID, /* [C8] */ INVALID, INVALID, INVALID, INVALID, -/* [CC] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ TNSZ("sha1rnds4",XMMP,16),INVALID, INVALID, INVALID, /* [D0] */ INVALID, INVALID, INVALID, INVALID, /* [D4] */ INVALID, INVALID, INVALID, INVALID, @@ -1386,7 +1664,7 @@ const instable_t dis_op0F3A[256] = { }; const instable_t dis_opAVX660F3A[256] = { -/* [00] */ INVALID, INVALID, INVALID, INVALID, +/* [00] */ TNSZ("vpermq",VEX_MXI,16),TNSZ("vpermpd",VEX_MXI,16),TNSZ("vpblendd",VEX_RMRX,16),INVALID, /* [04] */ TNSZ("vpermilps",VEX_MXI,8),TNSZ("vpermilpd",VEX_MXI,16),TNSZ("vperm2f128",VEX_RMRX,16),INVALID, /* [08] */ TNSZ("vroundps",VEX_MXI,16),TNSZ("vroundpd",VEX_MXI,16),TNSZ("vroundss",VEX_RMRX,16),TNSZ("vroundsd",VEX_RMRX,16), /* [0C] */ TNSZ("vblendps",VEX_RMRX,16),TNSZ("vblendpd",VEX_RMRX,16),TNSZ("vpblendw",VEX_RMRX,16),TNSZ("vpalignr",VEX_RMRX,16), @@ -1403,11 +1681,11 @@ const instable_t dis_opAVX660F3A[256] = /* [30] */ INVALID, INVALID, INVALID, INVALID, /* [34] */ INVALID, INVALID, INVALID, INVALID, -/* [38] */ INVALID, INVALID, INVALID, INVALID, +/* [38] */ TNSZ("vinserti128",VEX_RMRX,16),TNSZ("vextracti128",VEX_RIM,16),INVALID, INVALID, /* [3C] */ INVALID, INVALID, INVALID, INVALID, /* [40] */ TNSZ("vdpps",VEX_RMRX,16),TNSZ("vdppd",VEX_RMRX,16),TNSZ("vmpsadbw",VEX_RMRX,16),INVALID, -/* [44] */ TNSZ("vpclmulqdq",VEX_RMRX,16),INVALID, INVALID, INVALID, +/* [44] */ TNSZ("vpclmulqdq",VEX_RMRX,16),INVALID, TNSZ("vperm2i128",VEX_RMRX,16),INVALID, /* [48] */ INVALID, INVALID, TNSZ("vblendvps",VEX_RMRX,8), TNSZ("vblendvpd",VEX_RMRX,16), /* [4C] */ TNSZ("vpblendvb",VEX_RMRX,16),INVALID, INVALID, INVALID, @@ -1468,6 +1746,15 @@ const instable_t dis_opAVX660F3A[256] = }; /* + * Decode table for 0x0F0D which uses the first byte of the mod_rm to + * indicate a sub-code. + */ +const instable_t dis_op0F0D[8] = { +/* [00] */ INVALID, TNS("prefetchw",PREF), TNS("prefetchwt1",PREF),INVALID, +/* [04] */ INVALID, INVALID, INVALID, INVALID, +}; + +/* * Decode table for 0x0F opcodes */ @@ -1476,7 +1763,7 @@ const instable_t dis_op0F[16][16] = { /* [00] */ IND(dis_op0F00), IND(dis_op0F01), TNS("lar",MR), TNS("lsl",MR), /* [04] */ INVALID, TNS("syscall",NORM), TNS("clts",NORM), TNS("sysret",NORM), /* [08] */ TNS("invd",NORM), TNS("wbinvd",NORM), INVALID, TNS("ud2",NORM), -/* [0C] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, IND(dis_op0F0D), INVALID, INVALID, }, { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), @@ -1631,8 +1918,8 @@ const instable_t dis_opAVX0F[16][16] = { /* [E8] */ INVALID, INVALID, INVALID, INVALID, /* [EC] */ INVALID, INVALID, INVALID, INVALID, }, { -/* [F0] */ INVALID, INVALID, INVALID, INVALID, -/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F0] */ INVALID, INVALID, TNSZvr("andn",VEX_RMrX,5),TNSZvr("bls",BLS,5), +/* [F4] */ INVALID, TNSZvr("bzhi",VEX_VRMrX,5),INVALID, TNSZvr("bextr",VEX_VRMrX,5), /* [F8] */ INVALID, INVALID, INVALID, INVALID, /* [FC] */ INVALID, INVALID, INVALID, INVALID, } }; @@ -1795,19 +2082,19 @@ const instable_t dis_opFP1n2[8][8] = { /* [2,0] */ TNS("fiaddl",M), TNS("fimull",M), TNS("ficoml",M), TNS("ficompl",M), /* [2,4] */ TNS("fisubl",M), TNS("fisubrl",M), TNS("fidivl",M), TNS("fidivrl",M), }, { -/* [3,0] */ TNS("fildl",M), INVALID, TNS("fistl",M), TNS("fistpl",M), +/* [3,0] */ TNS("fildl",M), TNSZ("tisttpl",M,4), TNS("fistl",M), TNS("fistpl",M), /* [3,4] */ INVALID, TNSZ("fldt",M,10), INVALID, TNSZ("fstpt",M,10), }, { /* [4,0] */ TNSZ("faddl",M,8), TNSZ("fmull",M,8), TNSZ("fcoml",M,8), TNSZ("fcompl",M,8), /* [4,1] */ TNSZ("fsubl",M,8), TNSZ("fsubrl",M,8), TNSZ("fdivl",M,8), TNSZ("fdivrl",M,8), }, { -/* [5,0] */ TNSZ("fldl",M,8), INVALID, TNSZ("fstl",M,8), TNSZ("fstpl",M,8), +/* [5,0] */ TNSZ("fldl",M,8), TNSZ("fisttpll",M,8), TNSZ("fstl",M,8), TNSZ("fstpl",M,8), /* [5,4] */ TNSZ("frstor",M,108), INVALID, TNSZ("fnsave",M,108), TNSZ("fnstsw",M,2), }, { /* [6,0] */ TNSZ("fiadd",M,2), TNSZ("fimul",M,2), TNSZ("ficom",M,2), TNSZ("ficomp",M,2), /* [6,4] */ TNSZ("fisub",M,2), TNSZ("fisubr",M,2), TNSZ("fidiv",M,2), TNSZ("fidivr",M,2), }, { -/* [7,0] */ TNSZ("fild",M,2), INVALID, TNSZ("fist",M,2), TNSZ("fistp",M,2), +/* [7,0] */ TNSZ("fild",M,2), TNSZ("fisttp",M,2), TNSZ("fist",M,2), TNSZ("fistp",M,2), /* [7,4] */ TNSZ("fbld",M,10), TNSZ("fildll",M,8), TNSZ("fbstp",M,10), TNSZ("fistpll",M,8), } }; @@ -2039,6 +2326,80 @@ static int isize64[] = {1, 2, 4, 8}; #define YMM_OPND 9 /* "value" used to indicate a ymm reg */ /* + * The AVX2 gather instructions are a bit of a mess. While there's a pattern, + * there's not really a consistent scheme that we can use to know what the mode + * is supposed to be for a given type. Various instructions, like VPGATHERDD, + * always match the value of VEX_L. Other instructions like VPGATHERDQ, have + * some registers match VEX_L, but the VSIB is always XMM. + * + * The simplest way to deal with this is to just define a table based on the + * instruction opcodes, which are 0x90-0x93, so we subtract 0x90 to index into + * them. + * + * We further have to subdivide this based on the value of VEX_W and the value + * of VEX_L. The array is constructed to be indexed as: + * [opcode - 0x90][VEX_W][VEX_L]. + */ +/* w = 0, 0x90 */ +typedef struct dis_gather_regs { + uint_t dgr_arg0; /* src reg */ + uint_t dgr_arg1; /* vsib reg */ + uint_t dgr_arg2; /* dst reg */ + char *dgr_suffix; /* suffix to append */ +} dis_gather_regs_t; + +static dis_gather_regs_t dis_vgather[4][2][2] = { + { + /* op 0x90, W.0 */ + { + { XMM_OPND, XMM_OPND, XMM_OPND, "d" }, + { YMM_OPND, YMM_OPND, YMM_OPND, "d" } + }, + /* op 0x90, W.1 */ + { + { XMM_OPND, XMM_OPND, XMM_OPND, "q" }, + { YMM_OPND, XMM_OPND, YMM_OPND, "q" } + } + }, + { + /* op 0x91, W.0 */ + { + { XMM_OPND, XMM_OPND, XMM_OPND, "d" }, + { XMM_OPND, YMM_OPND, XMM_OPND, "d" }, + }, + /* op 0x91, W.1 */ + { + { XMM_OPND, XMM_OPND, XMM_OPND, "q" }, + { YMM_OPND, YMM_OPND, YMM_OPND, "q" }, + } + }, + { + /* op 0x92, W.0 */ + { + { XMM_OPND, XMM_OPND, XMM_OPND, "s" }, + { YMM_OPND, YMM_OPND, YMM_OPND, "s" } + }, + /* op 0x92, W.1 */ + { + { XMM_OPND, XMM_OPND, XMM_OPND, "d" }, + { YMM_OPND, XMM_OPND, YMM_OPND, "d" } + } + }, + { + /* op 0x93, W.0 */ + { + { XMM_OPND, XMM_OPND, XMM_OPND, "s" }, + { XMM_OPND, YMM_OPND, XMM_OPND, "s" } + }, + /* op 0x93, W.1 */ + { + { XMM_OPND, XMM_OPND, XMM_OPND, "d" }, + { YMM_OPND, YMM_OPND, YMM_OPND, "d" } + } + } +}; + +/* * Get the next byte and separate the op code into the high and low nibbles. */ static int @@ -2409,16 +2770,29 @@ dtrace_get_operand(dis86_t *x, uint_t mo } else { uint_t need_paren = 0; char **regs; + char **bregs; + const char *const *sf; if (x->d86_mode == SIZE32) /* NOTE this is not addr_size! */ regs = (char **)dis_REG32; else regs = (char **)dis_REG64; + if (x->d86_vsib != 0) { + if (wbit == YMM_OPND) /* NOTE this is not addr_size! */ + bregs = (char **)dis_YMMREG; + else + bregs = (char **)dis_XMMREG; + sf = dis_vscale_factor; + } else { + bregs = regs; + sf = dis_scale_factor; + } + /* * print the base (if any) */ if (base == EBP_REGNO && mode == 0) { - if (index != ESP_REGNO) { + if (index != ESP_REGNO || x->d86_vsib != 0) { (void) strlcat(opnd, "(", OPLEN); need_paren = 1; } @@ -2431,10 +2805,10 @@ dtrace_get_operand(dis86_t *x, uint_t mo /* * print the index (if any) */ - if (index != ESP_REGNO) { + if (index != ESP_REGNO || x->d86_vsib) { (void) strlcat(opnd, ",", OPLEN); - (void) strlcat(opnd, regs[index], OPLEN); - (void) strlcat(opnd, dis_scale_factor[ss], OPLEN); + (void) strlcat(opnd, bregs[index], OPLEN); + (void) strlcat(opnd, sf[ss], OPLEN); } else if (need_paren) (void) strlcat(opnd, ")", OPLEN); @@ -2581,7 +2955,12 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod uint_t vex_B = 1; uint_t vex_W = 0; uint_t vex_L; + dis_gather_regs_t *vreg; +#ifdef DIS_TEXT + /* Instruction name for BLS* family of instructions */ + char *blsinstr; +#endif size_t off; @@ -2605,6 +2984,7 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod x->d86_rex_prefix = 0; x->d86_got_modrm = 0; x->d86_memsize = 0; + x->d86_vsib = 0; if (cpu_mode == SIZE16) { opnd_size = SIZE16; @@ -2802,6 +3182,10 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod dp = (instable_t *) &dis_opAVXF30F [(opcode1 << 4) | opcode2]; + } else if (vex_m == VEX_m_0F38) { + dp = (instable_t *) + &dis_opAVXF30F38 + [(opcode1 << 4) | opcode2]; } else { goto error; } @@ -2811,6 +3195,14 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod dp = (instable_t *) &dis_opAVXF20F [(opcode1 << 4) | opcode2]; + } else if (vex_m == VEX_m_0F3A) { + dp = (instable_t *) + &dis_opAVXF20F3A + [(opcode1 << 4) | opcode2]; + } else if (vex_m == VEX_m_0F38) { + dp = (instable_t *) + &dis_opAVXF20F38 + [(opcode1 << 4) | opcode2]; } else { goto error; } @@ -2822,10 +3214,14 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod } } if (vex_prefix) { - if (vex_L) - wbit = YMM_OPND; - else - wbit = XMM_OPND; + if (dp->it_vexwoxmm) { + wbit = LONG_OPND; + } else { + if (vex_L) + wbit = YMM_OPND; + else + wbit = XMM_OPND; + } } /* @@ -2894,6 +3290,8 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod goto error; #endif switch (dp->it_adrmode) { + case XMMP: + break; case XMMP_66r: case XMMPRM_66r: case XMM3PM_66r: @@ -2935,11 +3333,50 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod dp++; } } + + /* + * The adx family of instructions (adcx and adox) + * continue the classic Intel tradition of abusing + * arbitrary prefixes without actually meaning the + * prefix bit. Therefore, if we find either the + * opnd_size_prefix or rep_prefix we end up zeroing it + * out after making our determination so as to ensure + * that we don't get confused and accidentally print + * repz prefixes and the like on these instructions. + * + * In addition, these instructions are actually much + * closer to AVX instructions in semantics. Importantly, + * they always default to having 32-bit operands. + * However, if the CPU is in 64-bit mode, then and only + * then, does it use REX.w promotes things to 64-bits + * and REX.r allows 64-bit mode to use register r8-r15. + */ + if (dp->it_indirect == (instable_t *)dis_op0F38F6) { + dp = dp->it_indirect; + if (opnd_size_prefix == 0 && + rep_prefix == 0xf3) { + /* It is adox */ + dp++; + } else if (opnd_size_prefix != 0x66 && + rep_prefix != 0) { + /* It isn't adcx */ + goto error; + } + opnd_size_prefix = 0; + rep_prefix = 0; + opnd_size = SIZE32; + if (rex_prefix & REX_W) + opnd_size = SIZE64; + } + #ifdef DIS_TEXT if (strcmp(dp->it_name, "INVALID") == 0) goto error; #endif switch (dp->it_adrmode) { + case ADX: + case XMM: + break; case RM_66r: case XMM_66r: case XMMM_66r: @@ -3029,9 +3466,12 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod goto error; /* - * deal with MMX/SSE opcodes which are changed by prefixes + * Deal with MMX/SSE opcodes which are changed by prefixes. Note, we do + * need to include UNKNOWN below, as we may have instructions that + * actually have a prefix, but don't exist in any other form. */ switch (dp->it_adrmode) { + case UNKNOWN: case MMO: case MMOIMPL: case MMO3P: @@ -3220,7 +3660,10 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod if (strcmp(dp->it_name, "INVALID") == 0) goto error; (void) strlcat(x->d86_mnem, dp->it_name, OPLEN); - if (dp->it_suffix) { + if (dp->it_avxsuf && dp->it_suffix) { + (void) strlcat(x->d86_mnem, vex_W != 0 ? "q" : "d", + OPLEN); + } else if (dp->it_suffix) { char *types[] = {"", "w", "l", "q"}; if (opcode_bytes == 2 && opcode4 == 4) { /* It's a cmovx.yy. Replace the suffix x */ @@ -3341,6 +3784,7 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mod /* memory or register operand to register, with 'w' bit */ case MRw: + case ADX: wbit = WBIT(opcode2); STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 0); break; @@ -3640,6 +4084,18 @@ just_mem: #endif NOMEM; break; + } else if (r_m == 2) { +#ifdef DIS_TEXT + (void) strncpy(x->d86_mnem, "clac", OPLEN); +#endif + NOMEM; + break; + } else if (r_m == 3) { +#ifdef DIS_TEXT + (void) strncpy(x->d86_mnem, "stac", OPLEN); +#endif + NOMEM; + break; } else { goto error; } @@ -4337,11 +4793,31 @@ xmmprm: dtrace_get_operand(x, mode, r_m, wbit, 0); break; case VEX_RMrX: + case FMA: /* ModR/M.reg := op(VEX.vvvv, ModR/M.r/m) */ x->d86_numopnds = 3; dtrace_get_modrm(x, &mode, ®, &r_m); dtrace_vex_adjust(vex_byte1, mode, ®, &r_m); + /* + * In classic Intel fashion, the opcodes for all of the FMA + * instructions all have two possible mnemonics which vary by + * one letter, which is selected based on the value of the wbit. + * When wbit is one, they have the 'd' suffix and when 'wbit' is + * 0, they have the 's' suffix. Otherwise, the FMA instructions + * are all a standard VEX_RMrX. + */ +#ifdef DIS_TEXT + if (dp->it_adrmode == FMA) { + size_t len = strlen(dp->it_name); + (void) strncpy(x->d86_mnem, dp->it_name, OPLEN); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 3 03:57:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DF10CCEC98; Fri, 3 Feb 2017 03:57: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 587DE6C3; Fri, 3 Feb 2017 03:57:07 +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 v133v6DC056689; Fri, 3 Feb 2017 03:57:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v133v6GL056688; Fri, 3 Feb 2017 03:57:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702030357.v133v6GL056688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 3 Feb 2017 03:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313134 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 03:57:07 -0000 Author: adrian Date: Fri Feb 3 03:57:06 2017 New Revision: 313134 URL: https://svnweb.freebsd.org/changeset/base/313134 Log: [ath_hal] [ar9300] initial radar decode for AR9380 and later chips. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Feb 3 03:22:47 2017 (r313133) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Feb 3 03:57:06 2017 (r313134) @@ -109,6 +109,201 @@ ar9300_freebsd_set_tsf64(struct ath_hal OS_REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff); } +/* Flags for pulse_bw_info */ +#define PRI_CH_RADAR_FOUND 0x01 +#define EXT_CH_RADAR_FOUND 0x02 +#define EXT_CH_RADAR_EARLY_FOUND 0x04 + +static HAL_BOOL +ar9300_freebsd_proc_radar_event(struct ath_hal *ah, struct ath_rx_status *rxs, + uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event) +{ + HAL_BOOL doDfsExtCh; + HAL_BOOL doDfsEnhanced; + HAL_BOOL doDfsCombinedRssi; + + uint8_t rssi = 0, ext_rssi = 0; + uint8_t pulse_bw_info = 0, pulse_length_ext = 0, pulse_length_pri = 0; + uint32_t dur = 0; + int pri_found = 1, ext_found = 0; + int early_ext = 0; + int is_dc = 0; + uint16_t datalen; /* length from the RX status field */ + + /* Check whether the given phy error is a radar event */ + if ((rxs->rs_phyerr != HAL_PHYERR_RADAR) && + (rxs->rs_phyerr != HAL_PHYERR_FALSE_RADAR_EXT)) { + return AH_FALSE; + } + + /* Grab copies of the capabilities; just to make the code clearer */ + doDfsExtCh = AH_PRIVATE(ah)->ah_caps.halExtChanDfsSupport; + doDfsEnhanced = AH_PRIVATE(ah)->ah_caps.halEnhancedDfsSupport; + doDfsCombinedRssi = AH_PRIVATE(ah)->ah_caps.halUseCombinedRadarRssi; + + datalen = rxs->rs_datalen; + + /* If hardware supports it, use combined RSSI, else use chain 0 RSSI */ + if (doDfsCombinedRssi) + rssi = (uint8_t) rxs->rs_rssi; + else + rssi = (uint8_t) rxs->rs_rssi_ctl[0]; + + /* Set this; but only use it if doDfsExtCh is set */ + ext_rssi = (uint8_t) rxs->rs_rssi_ext[0]; + + /* Cap it at 0 if the RSSI is a negative number */ + if (rssi & 0x80) + rssi = 0; + + if (ext_rssi & 0x80) + ext_rssi = 0; + + /* + * Fetch the relevant data from the frame + */ + if (doDfsExtCh) { + if (datalen < 3) + return AH_FALSE; + + /* Last three bytes of the frame are of interest */ + pulse_length_pri = *(buf + datalen - 3); + pulse_length_ext = *(buf + datalen - 2); + pulse_bw_info = *(buf + datalen - 1); + HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, ext_rssi=%d, pulse_length_pri=%d," + " pulse_length_ext=%d, pulse_bw_info=%x\n", + __func__, rssi, ext_rssi, pulse_length_pri, pulse_length_ext, + pulse_bw_info); + } else { + /* The pulse width is byte 0 of the data */ + if (datalen >= 1) + dur = ((uint8_t) buf[0]) & 0xff; + else + dur = 0; + + if (dur == 0 && rssi == 0) { + HALDEBUG(ah, HAL_DEBUG_DFS, "%s: dur and rssi are 0\n", __func__); + return AH_FALSE; + } + + HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, dur=%d\n", __func__, rssi, dur); + + /* Single-channel only */ + pri_found = 1; + ext_found = 0; + } + + /* + * If doing extended channel data, pulse_bw_info must + * have one of the flags set. + */ + if (doDfsExtCh && pulse_bw_info == 0x0) + return AH_FALSE; + + /* + * If the extended channel data is available, calculate + * which to pay attention to. + */ + if (doDfsExtCh) { + /* If pulse is on DC, take the larger duration of the two */ + if ((pulse_bw_info & EXT_CH_RADAR_FOUND) && + (pulse_bw_info & PRI_CH_RADAR_FOUND)) { + is_dc = 1; + if (pulse_length_ext > pulse_length_pri) { + dur = pulse_length_ext; + pri_found = 0; + ext_found = 1; + } else { + dur = pulse_length_pri; + pri_found = 1; + ext_found = 0; + } + } else if (pulse_bw_info & EXT_CH_RADAR_EARLY_FOUND) { + dur = pulse_length_ext; + pri_found = 0; + ext_found = 1; + early_ext = 1; + } else if (pulse_bw_info & PRI_CH_RADAR_FOUND) { + dur = pulse_length_pri; + pri_found = 1; + ext_found = 0; + } else if (pulse_bw_info & EXT_CH_RADAR_FOUND) { + dur = pulse_length_ext; + pri_found = 0; + ext_found = 1; + } + + } + + /* + * For enhanced DFS (Merlin and later), pulse_bw_info has + * implications for selecting the correct RSSI value. + */ + if (doDfsEnhanced) { + switch (pulse_bw_info & 0x03) { + case 0: + /* No radar? */ + rssi = 0; + break; + case PRI_CH_RADAR_FOUND: + /* Radar in primary channel */ + /* Cannot use ctrl channel RSSI if ext channel is stronger */ + if (ext_rssi >= (rssi + 3)) { + rssi = 0; + } + break; + case EXT_CH_RADAR_FOUND: + /* Radar in extended channel */ + /* Cannot use ext channel RSSI if ctrl channel is stronger */ + if (rssi >= (ext_rssi + 12)) { + rssi = 0; + } else { + rssi = ext_rssi; + } + break; + case (PRI_CH_RADAR_FOUND | EXT_CH_RADAR_FOUND): + /* When both are present, use stronger one */ + if (rssi < ext_rssi) + rssi = ext_rssi; + break; + } + } + + /* + * If not doing enhanced DFS, choose the ext channel if + * it is stronger than the main channel + */ + if (doDfsExtCh && !doDfsEnhanced) { + if ((ext_rssi > rssi) && (ext_rssi < 128)) + rssi = ext_rssi; + } + + /* + * XXX what happens if the above code decides the RSSI + * XXX wasn't valid, an sets it to 0? + */ + + /* + * Fill out dfs_event structure. + */ + event->re_full_ts = fulltsf; + event->re_ts = rxs->rs_tstamp; + event->re_rssi = rssi; + event->re_dur = dur; + + event->re_flags = 0; + if (pri_found) + event->re_flags |= HAL_DFS_EVENT_PRICH; + if (ext_found) + event->re_flags |= HAL_DFS_EVENT_EXTCH; + if (early_ext) + event->re_flags |= HAL_DFS_EVENT_EXTEARLY; + if (is_dc) + event->re_flags |= HAL_DFS_EVENT_ISDC; + + return AH_TRUE; +} + void ar9300_attach_freebsd_ops(struct ath_hal *ah) { @@ -220,7 +415,7 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_enableDfs = ar9300_enable_dfs; ah->ah_getDfsThresh = ar9300_get_dfs_thresh; ah->ah_getDfsDefaultThresh = ar9300_get_default_dfs_thresh; - // procradarevent + ah->ah_procRadarEvent = ar9300_freebsd_proc_radar_event; ah->ah_isFastClockEnabled = ar9300_is_fast_clock_enabled; ah->ah_get11nExtBusy = ar9300_get_11n_ext_busy; From owner-svn-src-all@freebsd.org Fri Feb 3 04:36:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A1B7CCD7AD; Fri, 3 Feb 2017 04:36:08 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::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 EE7BE1793; Fri, 3 Feb 2017 04:36:07 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id c85so1624210wmi.1; Thu, 02 Feb 2017 20:36:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:references:to:reply-to:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=0O83LRpKiFHGGOZ1/mmgdSFPHJ8C9DQNvjjCDxZ3Zvk=; b=B4RQlOg61NrsnI5pm1sxHzEDCVgICJWzZNHqp/6CniY0lXCFZS0hiCxi9C2pxxx9tF 0JDCp9NHx3iXhZx6lVjbtpBCmz9sdIfwLmoUuxZTf2V3vERQqMsyV1yExsxBG6aGiKXB HIBCbOO/tZrzJ8BbRRmM4QEaiLxuqE9BpwNf08nfLvQtMxCZUHYJmmtRSEugrhJpF0i/ 3kZFoh2z3XYbwVK9hlwFSexmtdxswVlg75GaUoSRBzn3EJkjEJXbhe4Nyk+tMam5Ydfx 0o0LlUUO0aJ7giox+WRdBVoFbpN1DspJJ0ceWJs+0NBbH3UMSYvOVpbI3p23xkx1juAC 7i7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:references:to:reply-to:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=0O83LRpKiFHGGOZ1/mmgdSFPHJ8C9DQNvjjCDxZ3Zvk=; b=aT+D8DJe2Y5fbuiUCm6fqrT5+118AfMe8052Tqy1tVvhMp1Vys1Ga/d52NGeO49vSm fjJkNWHHtl5N2d4jbX8PWfNmMpC89htfF1ilDjNtKnKFs/Eik9QkM/q4CTash7uZ6Ro5 pq2T/QwI2UKEJoArQSai2AK0XLuP2rzrE9jm7b06GSj2/OIT6QWm+ga5Gy74YGS6hQag DYLN8ZhkXnmOSmFD8dXJNHWTS8cZo57sELKHkANT7ze4W7Gxd+AYbjA0YZ50aqEjlwpo eQ5TNXoPEFWJdefjfFFw0rACL12hcDI6KIk47Zx5aIIYij3UH2zBmqKioDUe8uhkeqAJ Om8w== X-Gm-Message-State: AIkVDXK+GeYi1USYbXRx7MB/cv1Zlukb+VnLb38mjBTazlLkdDliAVsz1q0WsQRlY5SPnA== X-Received: by 10.223.147.1 with SMTP id 1mr10352840wro.60.1486096564567; Thu, 02 Feb 2017 20:36:04 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id s26sm42788736wra.26.2017.02.02.20.36.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Feb 2017 20:36:04 -0800 (PST) From: Michal Meloun X-Google-Original-From: Michal Meloun Subject: Re: svn commit: r313042 - in head/sys/boot: efi/include efi/libefi efi/loader forth References: <201702010846.v118kxNk070776@repo.freebsd.org> To: Toomas Soome , svn-src-head@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: mmel@freebsd.org Message-ID: <38c02260-7a34-7820-6507-6f240cf8a18c@freebsd.org> Date: Fri, 3 Feb 2017 05:36:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <201702010846.v118kxNk070776@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 04:36:08 -0000 On 01.02.2017 9:46, Toomas Soome wrote: > Author: tsoome > Date: Wed Feb 1 08:46:59 2017 > New Revision: 313042 > URL: https://svnweb.freebsd.org/changeset/base/313042 > > Log: > loader.efi environment related cleanups > > Since we have dedicated libefi/env.c file for variable support, the following > changes are done: > > Simple cstyle changes in env.c > Moved efi variable related commands from loader/main.c to libefi/env.c > Did create function to set "efi-version" environment variable in env.c. > > This function does serve two purposes: for first a small clean up of the > loader main(), and for second, it does replace the otherwise unused > efi_variable_support hack. > A bit of cleanup of ficl backend functions. The TEST_MAIN has no meaning, > and removed few memory leaks. > > The forth code is updated to use "efi-version" variable, instead of ficl > environment check. > > Reviewed by: imp > Approved by: imp (mentor) > Differential Revision: https://reviews.freebsd.org/D9165 > > Added: > head/sys/boot/efi/libefi/wchar.c (contents, props changed) > Modified: > head/sys/boot/efi/include/efilib.h > head/sys/boot/efi/libefi/Makefile > head/sys/boot/efi/libefi/env.c > head/sys/boot/efi/loader/main.c > head/sys/boot/forth/loader.4th > This breaks armv6 buildworld: /usr/src/sys/boot/efi/libefi/env.c:97:50: error: format specifies type 'unsigned long' but the argument has type 'EFI_STATUS' (aka 'unsigned int') [-Werror,-Wformat] printf("Can't get the variable: error %#lx\n", status); ~~~~ ^~~~~~ %#x /usr/src/sys/boot/efi/libefi/env.c:104:50: error: format specifies type 'unsigned long' but the argument has type 'EFI_STATUS' (aka 'unsigned int') [-Werror,-Wformat] printf("Can't get the variable: error %#lx\n", status); ~~~~ ^~~~~~ %#x /usr/src/sys/boot/efi/libefi/env.c:109:35: error: format specifies type 'wchar_t *' (aka 'unsigned int *') but the argument has type 'CHAR16 *' (aka 'unsigned short *') [-Werror,-Wformat] printf("%s 0x%x %S", str, attr, varnamearg); ~~ ^~~~~~~~~~ /usr/src/sys/boot/efi/libefi/env.c:111:36: error: format specifies type 'wchar_t *' (aka 'unsigned int *') but the argument has type 'CHAR16 *' (aka 'unsigned short *') [-Werror,-Wformat] printf("%s 0x%x %S=", str, attr, varnamearg); ~~ ^~~~~~~~~~ Michal > Modified: head/sys/boot/efi/include/efilib.h > ============================================================================== > --- head/sys/boot/efi/include/efilib.h Wed Feb 1 05:24:17 2017 (r313041) > +++ head/sys/boot/efi/include/efilib.h Wed Feb 1 08:46:59 2017 (r313042) > @@ -65,4 +65,12 @@ EFI_STATUS main(int argc, CHAR16 *argv[] > void exit(EFI_STATUS status); > void delay(int usecs); > > +/* EFI environment initialization. */ > +void efi_init_environment(void); > + > +/* CHAR16 utility functions. */ > +int wcscmp(CHAR16 *, CHAR16 *); > +void cpy8to16(const char *, CHAR16 *, size_t); > +void cpy16to8(const CHAR16 *, char *, size_t); > + > #endif /* _LOADER_EFILIB_H */ > > Modified: head/sys/boot/efi/libefi/Makefile > ============================================================================== > --- head/sys/boot/efi/libefi/Makefile Wed Feb 1 05:24:17 2017 (r313041) > +++ head/sys/boot/efi/libefi/Makefile Wed Feb 1 08:46:59 2017 (r313042) > @@ -3,6 +3,7 @@ > .include > > .if ${MK_FORTH} != "no" > +CFLAGS+= -DBOOT_FORTH > .include "${.CURDIR}/../../Makefile.ficl" > .endif > > @@ -10,17 +11,14 @@ LIB= efi > INTERNALLIB= > WARNS?= 2 > > -SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c errno.c \ > - handles.c libefi.c > +SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \ > + handles.c wchar.c libefi.c > > .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" > SRCS+= time.c > .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" > SRCS+= time_event.c > .endif > -.if ${MK_FORTH} != "no" > -SRCS+= env.c > -.endif > > # We implement a slightly non-standard %S in that it always takes a > # CHAR16 that's common in UEFI-land instead of a wchar_t. This only > > Modified: head/sys/boot/efi/libefi/env.c > ============================================================================== > --- head/sys/boot/efi/libefi/env.c Wed Feb 1 05:24:17 2017 (r313041) > +++ head/sys/boot/efi/libefi/env.c Wed Feb 1 08:46:59 2017 (r313042) > @@ -26,15 +26,17 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include > #include > #include > #include > #include > #include > +#include > #include "bootstrap.h" > +#ifdef BOOT_FORTH > #include "ficl.h" > - > -int efi_variable_support = 1; > +#endif > > /* > * Simple wrappers to the underlying UEFI functions. > @@ -42,36 +44,348 @@ int efi_variable_support = 1; > * for details. > */ > EFI_STATUS > -efi_get_next_variable_name(UINTN *variable_name_size, CHAR16 *variable_name, EFI_GUID *vendor_guid) > +efi_get_next_variable_name(UINTN *variable_name_size, CHAR16 *variable_name, > + EFI_GUID *vendor_guid) > { > - return RS->GetNextVariableName(variable_name_size, variable_name, vendor_guid); > + return (RS->GetNextVariableName(variable_name_size, variable_name, > + vendor_guid)); > } > > EFI_STATUS > -efi_get_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, UINT32 *attributes, UINTN *data_size, > - void *data) > +efi_get_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, > + UINT32 *attributes, UINTN *data_size, void *data) > { > - return RS->GetVariable(variable_name, vendor_guid, attributes, data_size, data); > + return (RS->GetVariable(variable_name, vendor_guid, attributes, > + data_size, data)); > } > > EFI_STATUS > -efi_set_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, UINT32 attributes, UINTN data_size, > - void *data) > +efi_set_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid, > + UINT32 attributes, UINTN data_size, void *data) > +{ > + return (RS->SetVariable(variable_name, vendor_guid, attributes, > + data_size, data)); > +} > + > +void > +efi_init_environment(void) > +{ > + char var[128]; > + > + snprintf(var, sizeof(var), "%d.%02d", ST->Hdr.Revision >> 16, > + ST->Hdr.Revision & 0xffff); > + env_setenv("efi-version", EV_VOLATILE, var, env_noset, env_nounset); > +} > + > +COMMAND_SET(efishow, "efi-show", "print some or all EFI variables", command_efi_show); > + > +static int > +efi_print_var(CHAR16 *varnamearg, EFI_GUID *matchguid, int lflag) > { > - return RS->SetVariable(variable_name, vendor_guid, attributes, data_size, data); > + UINTN datasz, i; > + EFI_STATUS status; > + UINT32 attr; > + CHAR16 *data; > + char *str; > + uint32_t uuid_status; > + int is_ascii; > + > + datasz = 0; > + status = RS->GetVariable(varnamearg, matchguid, &attr, > + &datasz, NULL); > + if (status != EFI_BUFFER_TOO_SMALL) { > + printf("Can't get the variable: error %#lx\n", status); > + return (CMD_ERROR); > + } > + data = malloc(datasz); > + status = RS->GetVariable(varnamearg, matchguid, &attr, > + &datasz, data); > + if (status != EFI_SUCCESS) { > + printf("Can't get the variable: error %#lx\n", status); > + return (CMD_ERROR); > + } > + uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); > + if (lflag) { > + printf("%s 0x%x %S", str, attr, varnamearg); > + } else { > + printf("%s 0x%x %S=", str, attr, varnamearg); > + is_ascii = 1; > + free(str); > + str = (char *)data; > + for (i = 0; i < datasz - 1; i++) { > + /* Quick hack to see if this ascii-ish string printable range plus tab, cr and lf */ > + if ((str[i] < 32 || str[i] > 126) && str[i] != 9 && str[i] != 10 && str[i] != 13) { > + is_ascii = 0; > + break; > + } > + } > + if (str[datasz - 1] != '\0') > + is_ascii = 0; > + if (is_ascii) > + printf("%s", str); > + else { > + for (i = 0; i < datasz / 2; i++) { > + if (isalnum(data[i]) || isspace(data[i])) > + printf("%c", data[i]); > + else > + printf("\\x%02x", data[i]); > + } > + } > + } > + free(data); > + if (pager_output("\n")) > + return (CMD_WARN); > + return (CMD_OK); > } > > +static int > +command_efi_show(int argc, char *argv[]) > +{ > + /* > + * efi-show [-a] > + * print all the env > + * efi-show -u UUID > + * print all the env vars tagged with UUID > + * efi-show -v var > + * search all the env vars and print the ones matching var > + * eif-show -u UUID -v var > + * eif-show UUID var > + * print all the env vars that match UUID and var > + */ > + /* NB: We assume EFI_GUID is the same as uuid_t */ > + int aflag = 0, gflag = 0, lflag = 0, vflag = 0; > + int ch, rv; > + unsigned i; > + EFI_STATUS status; > + EFI_GUID varguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; > + EFI_GUID matchguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; > + uint32_t uuid_status; > + CHAR16 *varname; > + CHAR16 *newnm; > + CHAR16 varnamearg[128]; > + UINTN varalloc; > + UINTN varsz; > + > + while ((ch = getopt(argc, argv, "ag:lv:")) != -1) { > + switch (ch) { > + case 'a': > + aflag = 1; > + break; > + case 'g': > + gflag = 1; > + uuid_from_string(optarg, (uuid_t *)&matchguid, > + &uuid_status); > + if (uuid_status != uuid_s_ok) { > + printf("uid %s could not be parsed\n", optarg); > + return (CMD_ERROR); > + } > + break; > + case 'l': > + lflag = 1; > + break; > + case 'v': > + vflag = 1; > + if (strlen(optarg) >= nitems(varnamearg)) { > + printf("Variable %s is longer than %zd characters\n", > + optarg, nitems(varnamearg)); > + return (CMD_ERROR); > + } > + for (i = 0; i < strlen(optarg); i++) > + varnamearg[i] = optarg[i]; > + varnamearg[i] = 0; > + break; > + default: > + printf("Invalid argument %c\n", ch); > + return (CMD_ERROR); > + } > + } > + > + if (aflag && (gflag || vflag)) { > + printf("-a isn't compatible with -v or -u\n"); > + return (CMD_ERROR); > + } > + > + if (aflag && optind < argc) { > + printf("-a doesn't take any args\n"); > + return (CMD_ERROR); > + } > + > + if (optind == argc) > + aflag = 1; > + > + argc -= optind; > + argv += optind; > + > + pager_open(); > + if (vflag && gflag) { > + rv = efi_print_var(varnamearg, &matchguid, lflag); > + pager_close(); > + return (rv); > + } > + > + if (argc == 2) { > + optarg = argv[0]; > + if (strlen(optarg) >= nitems(varnamearg)) { > + printf("Variable %s is longer than %zd characters\n", > + optarg, nitems(varnamearg)); > + pager_close(); > + return (CMD_ERROR); > + } > + for (i = 0; i < strlen(optarg); i++) > + varnamearg[i] = optarg[i]; > + varnamearg[i] = 0; > + optarg = argv[1]; > + uuid_from_string(optarg, (uuid_t *)&matchguid, > + &uuid_status); > + if (uuid_status != uuid_s_ok) { > + printf("uid %s could not be parsed\n", optarg); > + pager_close(); > + return (CMD_ERROR); > + } > + rv = efi_print_var(varnamearg, &matchguid, lflag); > + pager_close(); > + return (rv); > + } > + > + if (argc > 0) { > + printf("Too many args %d\n", argc); > + pager_close(); > + return (CMD_ERROR); > + } > + > + /* > + * Initiate the search -- note the standard takes pain > + * to specify the initial call must be a poiner to a NULL > + * character. > + */ > + varalloc = 1024; > + varname = malloc(varalloc); > + if (varname == NULL) { > + printf("Can't allocate memory to get variables\n"); > + pager_close(); > + return (CMD_ERROR); > + } > + varname[0] = 0; > + while (1) { > + varsz = varalloc; > + status = RS->GetNextVariableName(&varsz, varname, &varguid); > + if (status == EFI_BUFFER_TOO_SMALL) { > + varalloc = varsz; > + newnm = realloc(varname, varalloc); > + if (newnm == NULL) { > + printf("Can't allocate memory to get variables\n"); > + free(varname); > + pager_close(); > + return (CMD_ERROR); > + } > + varname = newnm; > + continue; /* Try again with bigger buffer */ > + } > + if (status != EFI_SUCCESS) > + break; > + if (aflag) { > + if (efi_print_var(varname, &varguid, lflag) != CMD_OK) > + break; > + continue; > + } > + if (vflag) { > + if (wcscmp(varnamearg, varname) == 0) { > + if (efi_print_var(varname, &varguid, lflag) != CMD_OK) > + break; > + continue; > + } > + } > + if (gflag) { > + if (memcmp(&varguid, &matchguid, sizeof(varguid)) == 0) { > + if (efi_print_var(varname, &varguid, lflag) != CMD_OK) > + break; > + continue; > + } > + } > + } > + free(varname); > + pager_close(); > + > + return (CMD_OK); > +} > + > +COMMAND_SET(efiset, "efi-set", "set EFI variables", command_efi_set); > + > +static int > +command_efi_set(int argc, char *argv[]) > +{ > + char *uuid, *var, *val; > + CHAR16 wvar[128]; > + EFI_GUID guid; > + uint32_t status; > + EFI_STATUS err; > + > + if (argc != 4) { > + printf("efi-set uuid var new-value\n"); > + return (CMD_ERROR); > + } > + uuid = argv[1]; > + var = argv[2]; > + val = argv[3]; > + uuid_from_string(uuid, (uuid_t *)&guid, &status); > + if (status != uuid_s_ok) { > + printf("Invalid uuid %s %d\n", uuid, status); > + return (CMD_ERROR); > + } > + cpy8to16(var, wvar, sizeof(wvar)); > + err = RS->SetVariable(wvar, &guid, > + EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS, > + strlen(val) + 1, val); > + if (EFI_ERROR(err)) { > + printf("Failed to set variable: error %lu\n", EFI_ERROR_CODE(err)); > + return (CMD_ERROR); > + } > + return (CMD_OK); > +} > + > +COMMAND_SET(efiunset, "efi-unset", "delete / unset EFI variables", command_efi_unset); > + > +static int > +command_efi_unset(int argc, char *argv[]) > +{ > + char *uuid, *var; > + CHAR16 wvar[128]; > + EFI_GUID guid; > + uint32_t status; > + EFI_STATUS err; > + > + if (argc != 3) { > + printf("efi-unset uuid var\n"); > + return (CMD_ERROR); > + } > + uuid = argv[1]; > + var = argv[2]; > + uuid_from_string(uuid, (uuid_t *)&guid, &status); > + if (status != uuid_s_ok) { > + printf("Invalid uuid %s\n", uuid); > + return (CMD_ERROR); > + } > + cpy8to16(var, wvar, sizeof(wvar)); > + err = RS->SetVariable(wvar, &guid, 0, 0, NULL); > + if (EFI_ERROR(err)) { > + printf("Failed to unset variable: error %lu\n", EFI_ERROR_CODE(err)); > + return (CMD_ERROR); > + } > + return (CMD_OK); > +} > + > +#ifdef BOOT_FORTH > /* > - * FreeBSD's loader interaction words and extras > + * FreeBSD's loader interaction words and extras > * > - * efi-setenv ( value n name n guid n attr -- 0 | -1) > - * efi-getenv ( guid n addr n -- addr' n' | -1 ) > - * efi-unsetenv ( name n guid n'' -- ) > + * efi-setenv ( value n name n guid n attr -- 0 | -1) > + * efi-getenv ( guid n addr n -- addr' n' | -1 ) > + * efi-unsetenv ( name n guid n'' -- ) > */ > > /* > * efi-setenv > - * efi-setenv ( value n name n guid n attr -- 0 | -1) > + * efi-setenv ( value n name n guid n attr -- 0 | -1) > * > * Set environment variables using the SetVariable EFI runtime service. > * > @@ -87,19 +401,18 @@ efi_set_variable(CHAR16 *variable_name, > * 4 Run time access > * (corresponding to the same bits in the UEFI spec). > */ > -void > +static void > ficlEfiSetenv(FICL_VM *pVM) > { > -#ifndef TESTMAIN > char *value = NULL, *guid = NULL; > CHAR16 *name = NULL; > int i; > -#endif > char *namep, *valuep, *guidp; > int names, values, guids, attr; > - int status; > + EFI_STATUS status; > uuid_t u; > uint32_t ustatus; > + bool error = true; > > #if FICL_ROBUST > 1 > vmCheckStack(pVM, 6, 0); > @@ -112,10 +425,9 @@ ficlEfiSetenv(FICL_VM *pVM) > values = stackPopINT(pVM->pStack); > valuep = (char*)stackPopPtr(pVM->pStack); > > -#ifndef TESTMAIN > guid = (char*)ficlMalloc(guids); > if (guid == NULL) > - vmThrowErr(pVM, "Error: out of memory"); > + goto out; > memcpy(guid, guidp, guids); > uuid_from_string(guid, &u, &ustatus); > if (ustatus != uuid_s_ok) { > @@ -123,16 +435,16 @@ ficlEfiSetenv(FICL_VM *pVM) > goto out; > } > > - name = (CHAR16 *)ficlMalloc((names + 1) * sizeof(CHAR16)); > + name = ficlMalloc((names + 1) * sizeof(CHAR16)); > if (name == NULL) > - vmThrowErr(pVM, "Error: out of memory"); > + goto out; > for (i = 0; i < names; i++) > name[i] = namep[i]; > - name[names] = (CHAR16)0; > + name[names] = 0; > > - value = (char*)ficlMalloc(values + 1); > + value = ficlMalloc(values + 1); > if (value == NULL) > - vmThrowErr(pVM, "Error: out of memory"); > + goto out; > memcpy(value, valuep, values); > > status = efi_set_variable(name, (EFI_GUID *)&u, attr, values, value); > @@ -140,21 +452,20 @@ ficlEfiSetenv(FICL_VM *pVM) > stackPushINT(pVM->pStack, 0); > else > stackPushINT(pVM->pStack, -1); > + error = false; > out: > ficlFree(name); > ficlFree(value); > ficlFree(guid); > -#endif > > - return; > + if (error == true) > + vmThrowErr(pVM, "Error: out of memory"); > } > > -void > +static void > ficlEfiGetenv(FICL_VM *pVM) > { > -#ifndef TESTMAIN > char *name, *value; > -#endif > char *namep; > int names; > > @@ -164,7 +475,6 @@ ficlEfiGetenv(FICL_VM *pVM) > names = stackPopINT(pVM->pStack); > namep = (char*) stackPopPtr(pVM->pStack); > > -#ifndef TESTMAIN > name = (char*) ficlMalloc(names+1); > if (name == NULL) > vmThrowErr(pVM, "Error: out of memory"); > @@ -178,18 +488,13 @@ ficlEfiGetenv(FICL_VM *pVM) > stackPushPtr(pVM->pStack, value); > stackPushINT(pVM->pStack, strlen(value)); > } else > -#endif > stackPushINT(pVM->pStack, -1); > - > - return; > } > > -void > +static void > ficlEfiUnsetenv(FICL_VM *pVM) > { > -#ifndef TESTMAIN > char *name; > -#endif > char *namep; > int names; > > @@ -199,7 +504,6 @@ ficlEfiUnsetenv(FICL_VM *pVM) > names = stackPopINT(pVM->pStack); > namep = (char*) stackPopPtr(pVM->pStack); > > -#ifndef TESTMAIN > name = (char*) ficlMalloc(names+1); > if (name == NULL) > vmThrowErr(pVM, "Error: out of memory"); > @@ -208,9 +512,6 @@ ficlEfiUnsetenv(FICL_VM *pVM) > > unsetenv(name); > ficlFree(name); > -#endif > - > - return; > } > > /************************************************************************** > @@ -218,17 +519,14 @@ ficlEfiUnsetenv(FICL_VM *pVM) > **************************************************************************/ > void ficlEfiCompilePlatform(FICL_SYSTEM *pSys) > { > - FICL_DICT *dp = pSys->dp; > - assert (dp); > - > - dictAppendWord(dp, "efi-setenv", ficlEfiSetenv, FW_DEFAULT); > - dictAppendWord(dp, "efi-getenv", ficlEfiGetenv, FW_DEFAULT); > - dictAppendWord(dp, "efi-unsetenv", ficlEfiUnsetenv, FW_DEFAULT); > + FICL_DICT *dp = pSys->dp; > + assert (dp); > > - /* Would like to export the EFI version, but this will do for now */ > - ficlSetEnv(pSys, "efi-boot", 1); > - > - return; > + dictAppendWord(dp, "efi-setenv", ficlEfiSetenv, FW_DEFAULT); > + dictAppendWord(dp, "efi-getenv", ficlEfiGetenv, FW_DEFAULT); > + dictAppendWord(dp, "efi-unsetenv", ficlEfiUnsetenv, FW_DEFAULT); > } > > FICL_COMPILE_SET(ficlEfiCompilePlatform); > + > +#endif /* BOOT_FORTH */ > > Added: head/sys/boot/efi/libefi/wchar.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/boot/efi/libefi/wchar.c Wed Feb 1 08:46:59 2017 (r313042) > @@ -0,0 +1,73 @@ > +/*- > + * Copyright 2016 Netflix, Inc. All Rights Reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > + > +/* > + * CHAR16 related functions moved from loader. > + * Perhaps we should move those to libstand afterall, but they are > + * needed only by UEFI. > + */ > + > +int > +wcscmp(CHAR16 *a, CHAR16 *b) > +{ > + > + while (*a && *b && *a == *b) { > + a++; > + b++; > + } > + return *a - *b; > +} > + > +/* > + * cpy8to16 copies a traditional C string into a CHAR16 string and > + * 0 terminates it. len is the size of *dst in bytes. > + */ > +void > +cpy8to16(const char *src, CHAR16 *dst, size_t len) > +{ > + len <<= 1; /* Assume CHAR16 is 2 bytes */ > + while (len > 0 && *src) { > + *dst++ = *src++; > + len--; > + } > + *dst++ = (CHAR16)0; > +} > + > +void > +cpy16to8(const CHAR16 *src, char *dst, size_t len) > +{ > + size_t i; > + > + for (i = 0; i < len && src[i]; i++) > + dst[i] = (char)src[i]; > + if (i < len) > + dst[i] = '\0'; > +} > > Modified: head/sys/boot/efi/loader/main.c > ============================================================================== > --- head/sys/boot/efi/loader/main.c Wed Feb 1 05:24:17 2017 (r313041) > +++ head/sys/boot/efi/loader/main.c Wed Feb 1 08:46:59 2017 (r313042) > @@ -52,22 +52,6 @@ __FBSDID("$FreeBSD$"); > > extern char bootprog_info[]; > > -#ifdef BOOT_FORTH > -/* > - * Normally, efi.o from libefi.a would be brought in due to a function we call > - * there that's defined there. However, none of its functions are callable from > - * here since it just adds words to the FORTH environment or implement those > - * words. So, add a reference to a symbol in efi.o to force it to be be brought > - * in so the init function there gets added to the "compile" linker set happens > - * correctly. > - * > - * This assumes there's no global analysys that notices dummy1 isn't used > - * anywhere and tries to eliminate it. > - */ > -extern int efi_variable_support; > -int *dummy1 = &efi_variable_support; > -#endif > - > struct arch_switch archsw; /* MI/MD interface boundary */ > > EFI_GUID acpi = ACPI_TABLE_GUID; > @@ -88,32 +72,6 @@ EFI_GUID inputid = SIMPLE_TEXT_INPUT_PRO > static void efi_zfs_probe(void); > #endif > > -/* > - * cpy8to16 copies a traditional C string into a CHAR16 string and > - * 0 terminates it. len is the size of *dst in bytes. > - */ > -static void > -cpy8to16(const char *src, CHAR16 *dst, size_t len) > -{ > - len <<= 1; /* Assume CHAR16 is 2 bytes */ > - while (len > 0 && *src) { > - *dst++ = *src++; > - len--; > - } > - *dst++ = (CHAR16)0; > -} > - > -static void > -cpy16to8(const CHAR16 *src, char *dst, size_t len) > -{ > - size_t i; > - > - for (i = 0; i < len && src[i]; i++) > - dst[i] = (char)src[i]; > - if (i < len) > - dst[i] = '\0'; > -} > - > static int > has_keyboard(void) > { > @@ -455,9 +413,7 @@ main(int argc, CHAR16 *argv[]) > } > } > > - snprintf(var, sizeof(var), "%d.%02d", ST->Hdr.Revision >> 16, > - ST->Hdr.Revision & 0xffff); > - env_setenv("efi-version", EV_VOLATILE, var, env_noset, env_nounset); > + efi_init_environment(); > setenv("LINES", "24", 1); /* optional */ > > for (k = 0; k < ST->NumberOfTableEntries; k++) { > @@ -476,19 +432,6 @@ main(int argc, CHAR16 *argv[]) > return (EFI_SUCCESS); /* keep compiler happy */ > } > > -/* XXX move to lib stand ? */ > -static int > -wcscmp(CHAR16 *a, CHAR16 *b) > -{ > - > - while (*a && *b && *a == *b) { > - a++; > - b++; > - } > - return *a - *b; > -} > - > - > COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot); > > static int > @@ -770,305 +713,6 @@ command_reloadbe(int argc, char *argv[]) > } > #endif > > -COMMAND_SET(efishow, "efi-show", "print some or all EFI variables", command_efi_show); > - > -static int > -efi_print_var(CHAR16 *varnamearg, EFI_GUID *matchguid, int lflag) > -{ > - UINTN datasz, i; > - EFI_STATUS status; > - UINT32 attr; > - CHAR16 *data; > - char *str; > - uint32_t uuid_status; > - int is_ascii; > - > - datasz = 0; > - status = RS->GetVariable(varnamearg, matchguid, &attr, > - &datasz, NULL); > - if (status != EFI_BUFFER_TOO_SMALL) { > - printf("Can't get the variable: error %#lx\n", status); > - return (CMD_ERROR); > - } > - data = malloc(datasz); > - status = RS->GetVariable(varnamearg, matchguid, &attr, > - &datasz, data); > - if (status != EFI_SUCCESS) { > - printf("Can't get the variable: error %#lx\n", status); > - return (CMD_ERROR); > - } > - uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); > - if (lflag) { > - printf("%s 0x%x %S", str, attr, varnamearg); > - } else { > - printf("%s 0x%x %S=", str, attr, varnamearg); > - is_ascii = 1; > - free(str); > - str = (char *)data; > - for (i = 0; i < datasz - 1; i++) { > - /* Quick hack to see if this ascii-ish string printable range plus tab, cr and lf */ > - if ((str[i] < 32 || str[i] > 126) && str[i] != 9 && str[i] != 10 && str[i] != 13) { > - is_ascii = 0; > - break; > - } > - } > - if (str[datasz - 1] != '\0') > - is_ascii = 0; > - if (is_ascii) > - printf("%s", str); > - else { > - for (i = 0; i < datasz / 2; i++) { > - if (isalnum(data[i]) || isspace(data[i])) > - printf("%c", data[i]); > - else > - printf("\\x%02x", data[i]); > - } > - } > - } > - free(data); > - if (pager_output("\n")) > - return (CMD_WARN); > - return (CMD_OK); > -} > - > -static int > -command_efi_show(int argc, char *argv[]) > -{ > - /* > - * efi-show [-a] > - * print all the env > - * efi-show -u UUID > - * print all the env vars tagged with UUID > - * efi-show -v var > - * search all the env vars and print the ones matching var > - * eif-show -u UUID -v var > - * eif-show UUID var > - * print all the env vars that match UUID and var > - */ > - /* NB: We assume EFI_GUID is the same as uuid_t */ > - int aflag = 0, gflag = 0, lflag = 0, vflag = 0; > - int ch, rv; > - unsigned i; > - EFI_STATUS status; > - EFI_GUID varguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; > - EFI_GUID matchguid = { 0,0,0,{0,0,0,0,0,0,0,0} }; > - uint32_t uuid_status; > - CHAR16 *varname; > - CHAR16 *newnm; > - CHAR16 varnamearg[128]; > - UINTN varalloc; > - UINTN varsz; > - > - while ((ch = getopt(argc, argv, "ag:lv:")) != -1) { > - switch (ch) { > - case 'a': > - aflag = 1; > - break; > - case 'g': > - gflag = 1; > - uuid_from_string(optarg, (uuid_t *)&matchguid, > - &uuid_status); > - if (uuid_status != uuid_s_ok) { > - printf("uid %s could not be parsed\n", optarg); > - return (CMD_ERROR); > - } > - break; > - case 'l': > - lflag = 1; > - break; > - case 'v': > - vflag = 1; > - if (strlen(optarg) >= nitems(varnamearg)) { > - printf("Variable %s is longer than %zd characters\n", > - optarg, nitems(varnamearg)); > - return (CMD_ERROR); > - } > - for (i = 0; i < strlen(optarg); i++) > - varnamearg[i] = optarg[i]; > - varnamearg[i] = 0; > - break; > - default: > - printf("Invalid argument %c\n", ch); > - return (CMD_ERROR); > - } > - } > - > - if (aflag && (gflag || vflag)) { > - printf("-a isn't compatible with -v or -u\n"); > - return (CMD_ERROR); > - } > - > - if (aflag && optind < argc) { > - printf("-a doesn't take any args"); > - return (CMD_ERROR); > - } > - > - if (optind == argc) > - aflag = 1; > - > - argc -= optind; > - argv += optind; > - > - pager_open(); > - if (vflag && gflag) { > - rv = efi_print_var(varnamearg, &matchguid, lflag); > - pager_close(); > - return (rv); > - } > - > - if (argc == 2) { > - optarg = argv[0]; > - if (strlen(optarg) >= nitems(varnamearg)) { > - printf("Variable %s is longer than %zd characters\n", > - optarg, nitems(varnamearg)); > - pager_close(); > - return (CMD_ERROR); > - } > - for (i = 0; i < strlen(optarg); i++) > - varnamearg[i] = optarg[i]; > - varnamearg[i] = 0; > - optarg = argv[1]; > - uuid_from_string(optarg, (uuid_t *)&matchguid, > - &uuid_status); > - if (uuid_status != uuid_s_ok) { > - printf("uid %s could not be parsed\n", optarg); > - pager_close(); > - return (CMD_ERROR); > - } > - rv = efi_print_var(varnamearg, &matchguid, lflag); > - pager_close(); > - return (rv); > - } > - > - if (argc > 0) { > - printf("Too many args %d\n", argc); > - pager_close(); > - return (CMD_ERROR); > - } > - > - /* > - * Initiate the search -- note the standard takes pain > - * to specify the initial call must be a poiner to a NULL > - * character. > - */ > - varalloc = 1024; > - varname = malloc(varalloc); > - if (varname == NULL) { > - printf("Can't allocate memory to get variables\n"); > - pager_close(); > - return (CMD_ERROR); > - } > - varname[0] = 0; > - while (1) { > - varsz = varalloc; > - status = RS->GetNextVariableName(&varsz, varname, &varguid); > - if (status == EFI_BUFFER_TOO_SMALL) { > - varalloc = varsz; > - newnm = malloc(varalloc); > - if (newnm == NULL) { > - printf("Can't allocate memory to get variables\n"); > - free(varname); > - pager_close(); > - return (CMD_ERROR); > - } > - memcpy(newnm, varname, varsz); > - free(varname); > - varname = newnm; > - continue; /* Try again with bigger buffer */ > - } > - if (status != EFI_SUCCESS) > - break; > - if (aflag) { > - if (efi_print_var(varname, &varguid, lflag) != CMD_OK) > - break; > - continue; > - } > - if (vflag) { > - if (wcscmp(varnamearg, varname) == 0) { > - if (efi_print_var(varname, &varguid, lflag) != CMD_OK) > - break; > - continue; > - } > - } > - if (gflag) { > - if (memcmp(&varguid, &matchguid, sizeof(varguid)) == 0) { > - if (efi_print_var(varname, &varguid, lflag) != CMD_OK) > - break; > - continue; > - } > - } > - } > - free(varname); > - pager_close(); > - > - return (CMD_OK); > -} > - > -COMMAND_SET(efiset, "efi-set", "set EFI variables", command_efi_set); > - > -static int > -command_efi_set(int argc, char *argv[]) > -{ > - char *uuid, *var, *val; > - CHAR16 wvar[128]; > - EFI_GUID guid; > - uint32_t status; > - EFI_STATUS err; > - > - if (argc != 4) { > - printf("efi-set uuid var new-value\n"); > - return (CMD_ERROR); > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@freebsd.org Fri Feb 3 05:15:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 556D7CCE019; Fri, 3 Feb 2017 05:15:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1AF8790; Fri, 3 Feb 2017 05:15: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 v135F9Uc089044; Fri, 3 Feb 2017 05:15:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v135F84O089041; Fri, 3 Feb 2017 05:15:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702030515.v135F84O089041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 3 Feb 2017 05:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313135 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 05:15:10 -0000 Author: adrian Date: Fri Feb 3 05:15:08 2017 New Revision: 313135 URL: https://svnweb.freebsd.org/changeset/base/313135 Log: [ath_hal] prepare for CAC quiet time. To support DFS, the NIC needs to be very quiet during this time. No transmissions including ACKs are allowed. This is just the initial HAL glue. Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Fri Feb 3 03:57:06 2017 (r313134) +++ head/sys/dev/ath/ath_hal/ah.c Fri Feb 3 05:15:08 2017 (r313135) @@ -1429,6 +1429,21 @@ ath_hal_getcca(struct ath_hal *ah) } /* + * Set the current state of self-generated ACK and RTS/CTS frames. + * + * For correct DFS operation, the device should not even /ACK/ frames + * that are sent to it during CAC or CSA. + */ +void +ath_hal_set_dfs_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL ena) +{ + + if (ah->ah_setDfsCacTxQuiet == NULL) + return; + ah->ah_setDfsCacTxQuiet(ah, ena); +} + +/* * This routine is only needed when supporting EEPROM-in-RAM setups * (eg embedded SoCs and on-board PCI/PCIe devices.) */ Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Fri Feb 3 03:57:06 2017 (r313134) +++ head/sys/dev/ath/ath_hal/ah.h Fri Feb 3 05:15:08 2017 (r313135) @@ -1395,6 +1395,7 @@ struct ath_hal { struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event); HAL_BOOL __ahdecl(*ah_isFastClockEnabled)(struct ath_hal *ah); + void __ahdecl(*ah_setDfsCacTxQuiet)(struct ath_hal *, HAL_BOOL); /* Spectral Scan functions */ void __ahdecl(*ah_spectralConfigure)(struct ath_hal *ah, @@ -1660,6 +1661,11 @@ void __ahdecl ath_hal_setcca(struct ath_ int __ahdecl ath_hal_getcca(struct ath_hal *ah); /* + * Enable/disable and get self-gen frame (ACK, CTS) for CAC. + */ +void __ahdecl ath_hal_set_dfs_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL ena); + +/* * Read EEPROM data from ah_eepromdata */ HAL_BOOL __ahdecl ath_hal_EepromDataRead(struct ath_hal *ah, From owner-svn-src-all@freebsd.org Fri Feb 3 05:15:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36B59CCE05D; Fri, 3 Feb 2017 05:15:37 +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 EBC898D5; Fri, 3 Feb 2017 05:15:36 +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 v135Farn089115; Fri, 3 Feb 2017 05:15:36 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v135FZQ6089112; Fri, 3 Feb 2017 05:15:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702030515.v135FZQ6089112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 3 Feb 2017 05:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313136 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 05:15:37 -0000 Author: adrian Date: Fri Feb 3 05:15:35 2017 New Revision: 313136 URL: https://svnweb.freebsd.org/changeset/base/313136 Log: [ath_hal] [ar9300] link in the CAC enable/diable methods and expose it via the HAL. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Feb 3 05:15:08 2017 (r313135) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Feb 3 05:15:35 2017 (r313136) @@ -417,7 +417,8 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_getDfsDefaultThresh = ar9300_get_default_dfs_thresh; ah->ah_procRadarEvent = ar9300_freebsd_proc_radar_event; ah->ah_isFastClockEnabled = ar9300_is_fast_clock_enabled; - ah->ah_get11nExtBusy = ar9300_get_11n_ext_busy; + ah->ah_get11nExtBusy = ar9300_get_11n_ext_busy; + ah->ah_setDfsCacTxQuiet = ar9300_cac_tx_quiet; /* Spectral Scan Functions */ ah->ah_spectralConfigure = ar9300_configure_spectral_scan; Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Fri Feb 3 05:15:08 2017 (r313135) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c Fri Feb 3 05:15:35 2017 (r313136) @@ -649,11 +649,12 @@ ar9300_set_quiet(struct ath_hal *ah, u_i return status; #undef TU_TO_USEC } -#ifdef ATH_SUPPORT_DFS + +//#ifdef ATH_SUPPORT_DFS void ar9300_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL enable) { - u32 reg1, reg2; + uint32_t reg1, reg2; reg1 = OS_REG_READ(ah, AR_MAC_PCU_OFFSET(MAC_PCU_MISC_MODE)); reg2 = OS_REG_READ(ah, AR_MAC_PCU_OFFSET(MAC_PCU_QUIET_TIME_1)); @@ -671,7 +672,7 @@ ar9300_cac_tx_quiet(struct ath_hal *ah, reg2 | AR_QUIET1_QUIET_ACK_CTS_ENABLE); } } -#endif /* ATH_SUPPORT_DFS */ +//#endif /* ATH_SUPPORT_DFS */ void ar9300_set_pcu_config(struct ath_hal *ah) Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Fri Feb 3 05:15:08 2017 (r313135) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Fri Feb 3 05:15:35 2017 (r313136) @@ -4263,11 +4263,11 @@ ar9300_init_user_settings(struct ath_hal if (ahp->ah_beacon_rssi_threshold != 0) { ar9300_set_hw_beacon_rssi_threshold(ah, ahp->ah_beacon_rssi_threshold); } -#ifdef ATH_SUPPORT_DFS +//#ifdef ATH_SUPPORT_DFS if (ahp->ah_cac_quiet_enabled) { ar9300_cac_tx_quiet(ah, 1); } -#endif /* ATH_SUPPORT_DFS */ +//#endif /* ATH_SUPPORT_DFS */ } int From owner-svn-src-all@freebsd.org Fri Feb 3 06:04:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9885FCCEBC2; Fri, 3 Feb 2017 06:04: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 431DE1DC3; Fri, 3 Feb 2017 06:04:07 +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 v13646Ni009842; Fri, 3 Feb 2017 06:04:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13646eL009841; Fri, 3 Feb 2017 06:04:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702030604.v13646eL009841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 3 Feb 2017 06:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313137 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 06:04:07 -0000 Author: adrian Date: Fri Feb 3 06:04:06 2017 New Revision: 313137 URL: https://svnweb.freebsd.org/changeset/base/313137 Log: [net80211] don't update quiet time counter values every probe request. The quiet time counter update is happening each time the IE is added, which also means it happens for each quiet time IE addition to the probe response. Only update the countdown if we request ie (ie, beacon updates.) Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Fri Feb 3 05:15:35 2017 (r313136) +++ head/sys/net80211/ieee80211_output.c Fri Feb 3 06:04:06 2017 (r313137) @@ -2016,16 +2016,23 @@ ieee80211_add_supportedchannels(uint8_t * Add an 11h Quiet time element to a frame. */ static uint8_t * -ieee80211_add_quiet(uint8_t *frm, struct ieee80211vap *vap) +ieee80211_add_quiet(uint8_t *frm, struct ieee80211vap *vap, int update) { struct ieee80211_quiet_ie *quiet = (struct ieee80211_quiet_ie *) frm; quiet->quiet_ie = IEEE80211_ELEMID_QUIET; quiet->len = 6; - if (vap->iv_quiet_count_value == 1) - vap->iv_quiet_count_value = vap->iv_quiet_count; - else if (vap->iv_quiet_count_value > 1) - vap->iv_quiet_count_value--; + + /* + * Only update every beacon interval - otherwise probe responses + * would update the quiet count value. + */ + if (update) { + if (vap->iv_quiet_count_value == 1) + vap->iv_quiet_count_value = vap->iv_quiet_count; + else if (vap->iv_quiet_count_value > 1) + vap->iv_quiet_count_value--; + } if (vap->iv_quiet_count_value == 0) { /* value 0 is reserved as per 802.11h standerd */ @@ -2812,7 +2819,7 @@ ieee80211_alloc_proberesp(struct ieee802 if (IEEE80211_IS_CHAN_DFS(ic->ic_bsschan) && (vap->iv_flags_ext & IEEE80211_FEXT_DFS)) { if (vap->iv_quiet) - frm = ieee80211_add_quiet(frm, vap); + frm = ieee80211_add_quiet(frm, vap, 0); } } if (IEEE80211_IS_CHAN_ANYG(bss->ni_chan)) @@ -3161,7 +3168,7 @@ ieee80211_beacon_construct(struct mbuf * if (IEEE80211_IS_CHAN_DFS(ic->ic_bsschan) && (vap->iv_flags_ext & IEEE80211_FEXT_DFS)) { if (vap->iv_quiet) - frm = ieee80211_add_quiet(frm,vap); + frm = ieee80211_add_quiet(frm,vap, 0); } } else bo->bo_quiet = frm; @@ -3596,7 +3603,7 @@ ieee80211_beacon_update(struct ieee80211 if (IEEE80211_IS_CHAN_DFS(ic->ic_bsschan) && (vap->iv_flags_ext & IEEE80211_FEXT_DFS) ){ if (vap->iv_quiet) - ieee80211_add_quiet(bo->bo_quiet, vap); + ieee80211_add_quiet(bo->bo_quiet, vap, 1); } if (isset(bo->bo_flags, IEEE80211_BEACON_ERP)) { /* From owner-svn-src-all@freebsd.org Fri Feb 3 07:51:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77D32CCD05D; Fri, 3 Feb 2017 07:51:34 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from mailhost.dlr.de (mailhost.dlr.de [129.247.252.33]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mailhost.dlr.de", Issuer "DLR CA - G02" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9D5C1128; Fri, 3 Feb 2017 07:51:33 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from DLREXHUB02.intra.dlr.de (172.21.152.140) by mailhost.dlr.de (172.21.163.101) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 3 Feb 2017 08:51:18 +0100 Received: from DLREXMBX01.intra.dlr.de ([fe80::d198:77e5:d411:fccd]) by dlrexhub02.intra.dlr.de ([::1]) with mapi id 14.03.0319.002; Fri, 3 Feb 2017 08:51:24 +0100 From: To: CC: , , Subject: RE: svn commit: r313043 - head/sys/kern Thread-Topic: svn commit: r313043 - head/sys/kern Thread-Index: AQHSfIzUaHU0GSnLtUmrDysUntoftKFUYnQAgAD1jACAALH/gIAA4GAA Date: Fri, 3 Feb 2017 07:51:24 +0000 Message-ID: <611243783F62AF48AFB07BC25FA4B1061CEDA7DC@DLREXMBX01.intra.dlr.de> References: <201702011312.v11DC7WJ085025@repo.freebsd.org> <20170201180816.GF3334@FreeBSD.org> <611243783F62AF48AFB07BC25FA4B1061CED9FD9@DLREXMBX01.intra.dlr.de> <20170202192411.GK3334@FreeBSD.org> In-Reply-To: <20170202192411.GK3334@FreeBSD.org> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Content-Type: multipart/mixed; boundary="_002_611243783F62AF48AFB07BC25FA4B1061CEDA7DCDLREXMBX01intra_" MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-11.0.0.4283-8.100.1062-22862.005 X-TM-AS-Result: No--25.031400-5.000000-31 X-TM-AS-MatchedID: 150567-147015-700133-703829-106420-105700-702358-700767-7 09251-706290-700173-700324-707066-704852-706247-704421-703454-700398-711109 -843079-139006-708497-704746-106660-700107-709584-700970-186035-703747-7000 75-703788-702020-700476-700316-706891-705388-863828-701674-700486-700294-70 0693-711608-700516-702920-709512-701162-702367-701708-703712-704179-703283- 703969-704425-702037-706817-139705-701305-707027-705901-105250-703566-70147 5-187067-702560-106230-148035-148050-23116-42003 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 07:51:34 -0000 --_002_611243783F62AF48AFB07BC25FA4B1061CEDA7DCDLREXMBX01intra_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable It was attached to my mail, but maybe got removed somewhere. Here it is. It= does not use asio, but reproduces the same sequence of system calls. You s= tart it and the try to connect with telnet to port 10000. harti #include #include #include #include #include #include #include #include #include static void wait_loop(int kq, int sock) { struct kevent ev[32]; struct sockaddr_in addr; socklen_t socklen; for (;;) { int nev =3D kevent(kq, NULL, 0, ev, 32, NULL); if (nev < 1) err(1, "kevent"); for (int i =3D 0; i < nev; ++i) { if (ev[i].ident =3D=3D sock) { printf("accept\n"); int fd =3D accept(ev[i].ident, (struct sockaddr *)&addr, &socklen); if (fd =3D=3D -1) err(1, "accept"); } } } } int main() { struct sockaddr_in addr; /* open a TCP socket */ int kq =3D kqueue(); int sock =3D socket(PF_INET, SOCK_STREAM, 0); struct kevent ev[2]; EV_SET(&ev[0], sock, EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, NULL); EV_SET(&ev[1], sock, EVFILT_WRITE, EV_ADD | EV_CLEAR, 0, 0, NULL); int opt =3D 1; setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, &opt, sizeof(opt)); if (kevent(kq, ev, 2, NULL, 0, NULL) =3D=3D -1) err(1, "kevent"); setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); memset(&addr, 0, sizeof(addr)); addr.sin_port =3D htons(10000); bind(sock, (struct sockaddr *)&addr, sizeof(addr)); listen(sock, 0x80); ioctl(sock, FIONBIO, &opt); if (kevent(kq, ev, 2, NULL, 0, NULL) =3D=3D -1) err(1, "kevent"); wait_loop(kq, sock); } -----Original Message----- From: Gleb Smirnoff [mailto:glebius@FreeBSD.org]=20 Sent: Thursday, February 02, 2017 8:24 PM To: Brandt, Hartmut Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: Re: svn commit: r313043 - head/sys/kern Hartmut, Thanks for explanation! Is there a test program available to reproduce th= e problem? I want to try the sequence on my branch. On Thu, Feb 02, 2017 at 08:29:20AM +0000, Hartmut.Brandt@dlr.de wrote: H> To be honest - I feared that when I saw your messages regarding this. He= re is my original message from july. Attached is also a small test program. H>=20 H> Hi, H>=20 H> I'm trying to use asio (that's boost::asio without boost) to handle list= ening sockets asynchronuosly. This appears not to work. There are also some= reports on the net about this problem. I was able to reproduce the problem= with a small C-programm that does the same steps as asio. The relevant seq= uence of system calls is: H>=20 H> kqueue() =3D 3 (0x3) H> socket(PF_INET,SOCK_STREAM,6) =3D 4 (0x4) H> setsockopt(0x4,0xffff,0x800,0x7fffffffea2c,0x4) =3D 0 (0x0) H> kevent(3,{ 4,EVFILT_READ,EV_ADD|EV_CLEAR,0x0,0x0,0x0 4,EVFILT_WRITE,EV_A= DD|EV_CLEAR,0x0,0x0,0x0 },2,0x0,0,0x0) =3D 0 (0x0) H> setsockopt(0x4,0xffff,0x4,0x7fffffffea2c,0x4) =3D 0 (0x0) H> bind(4,{ AF_INET 0.0.0.0:8080 },16) =3D 0 (0x0) H> listen(0x4,0x80) =3D 0 (0x0) H> ioctl(4,FIONBIO,0xffffea2c) =3D 0 (0x0) H> kevent(3,{ 4,EVFILT_READ,EV_ADD|EV_CLEAR,0x0,0x0,0x0 4,EVFILT_WRITE,EV_A= DD|EV_CLEAR,0x0,0x0,0x0 },2,0x0,0,0x0) =3D 0 (0x0) H> kevent(3,0x0,0,0x7fffffffe5a0,32,0x0) ERR#4 'Interrupted system call' H>=20 H> The problem here is that asio registers each file descriptor with EVFILT= _READ and EVFILT_WRITE as soon as it is opened (first kevent call).=20 H> After bringing the socket into the listening state and when async_accept= () is called it registers the socket a second time. According to the man pa= ge this is perfectly legal and can be used to modify the registration. H>=20 H> With this sequence of calls kevent() does not return when a connection i= s established successfully. H>=20 H> I tracked down the problem and the reason is in soo_kqfilter(). This is = called for the first EVFILT_READ registration and decides based on the SO_A= CCEPTCONN flag which filter operations to use solisten_filtops or soread_fi= ltops. In this case it chooses soread_filtops. H>=20 H> The second EVFILT_READ registration does not call soo_kqfilter() again, = but just updates the filter from the data and fflags field so the listening= socket ends up with the wrong filter operations. H>=20 H>=20 H>=20 H> -----Original Message----- H> From: Gleb Smirnoff [mailto:glebius@FreeBSD.org] H> Sent: Wednesday, February 01, 2017 7:08 PM H> To: Hartmut Brandt H> Cc: src-committers@freebsd.org; svn-src-all@freebsd.org;=20 H> svn-src-head@freebsd.org H> Subject: Re: svn commit: r313043 - head/sys/kern H>=20 H> On Wed, Feb 01, 2017 at 01:12:07PM +0000, Hartmut Brandt wrote: H> H> Author: harti H> H> Date: Wed Feb 1 13:12:07 2017 H> H> New Revision: 313043 H> H> URL: https://svnweb.freebsd.org/changeset/base/313043 H> H>=20 H> H> Log: H> H> Merge filt_soread and filt_solisten and decide what to do when chec= king H> H> for EVFILT_READ at the point of the check not when the event is reg= isters. H> H> This fixes a problem with asio when accepting a connection. H> H> =20 H> H> Reviewed by: kib@, Scott Mitchell H>=20 H> This goes into opposite direction with what I am doing: H>=20 H> https://reviews.freebsd.org/D9356 H>=20 H> Can you please explain the problem with asio when accepting a connection= ? H>=20 H> -- H> Totus tuus, Glebius. H>=20 H> #include H> #include H> #include H> #include H>=20 H> #include H> #include H> #include H> #include H> #include H>=20 H> static void H> wait_loop(int kq, int sock) H> { H> struct kevent ev[32]; H> struct sockaddr_in addr; H> socklen_t socklen; H>=20 H> for (;;) { H> int nev =3D kevent(kq, NULL, 0, ev, 32, NULL); H> if (nev < 1) H> err(1, "kevent"); H> for (int i =3D 0; i < nev; ++i) { H> if (ev[i].ident =3D=3D sock) { H> printf("accept\n"); H> int fd =3D accept(ev[i].ident, H> (struct sockaddr *)&addr, &socklen); H> if (fd =3D=3D -1) H> err(1, "accept"); H> } H> } H> } H> } H>=20 H> int H> main() H> { H> struct sockaddr_in addr; H>=20 H> /* open a TCP socket */ H> int kq =3D kqueue(); H>=20 H> int sock =3D socket(PF_INET, SOCK_STREAM, 0); H>=20 H> struct kevent ev[2]; H> EV_SET(&ev[0], sock, EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, NULL); H> EV_SET(&ev[1], sock, EVFILT_WRITE, EV_ADD | EV_CLEAR, 0, 0, NULL); H>=20 H> int opt =3D 1; H> setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, &opt, sizeof(opt)); H>=20 H> if (kevent(kq, ev, 2, NULL, 0, NULL) =3D=3D -1) H> err(1, "kevent"); H>=20 H> setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); H>=20 H> memset(&addr, 0, sizeof(addr)); H> addr.sin_port =3D htons(10000); H>=20 H> bind(sock, (struct sockaddr *)&addr, sizeof(addr)); H> listen(sock, 0x80); H>=20 H> ioctl(sock, FIONBIO, &opt); H>=20 H> if (kevent(kq, ev, 2, NULL, 0, NULL) =3D=3D -1) H> err(1, "kevent"); H>=20 H> wait_loop(kq, sock); H> } --=20 Totus tuus, Glebius. --_002_611243783F62AF48AFB07BC25FA4B1061CEDA7DCDLREXMBX01intra_ Content-Type: text/plain; name="k.c" Content-Description: k.c Content-Disposition: attachment; filename="k.c"; size=1459; creation-date="Fri, 03 Feb 2017 07:47:17 GMT"; modification-date="Fri, 03 Feb 2017 07:47:17 GMT" Content-Transfer-Encoding: base64 I2luY2x1ZGUgPHN5cy9zb2NrZXQuaD4NCiNpbmNsdWRlIDxzeXMvdHlwZXMuaD4NCiNpbmNsdWRl IDxzeXMvZXZlbnQuaD4NCiNpbmNsdWRlIDxzeXMvZmlsaW8uaD4NCg0KI2luY2x1ZGUgPHN5cy9p b2N0bC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxzdGRpby5oPg0KI2lu Y2x1ZGUgPHN0cmluZy5oPg0KI2luY2x1ZGUgPGVyci5oPg0KDQpzdGF0aWMgdm9pZA0Kd2FpdF9s b29wKGludCBrcSwgaW50IHNvY2spDQp7DQoJc3RydWN0IGtldmVudCBldlszMl07DQoJc3RydWN0 IHNvY2thZGRyX2luIGFkZHI7DQoJc29ja2xlbl90IHNvY2tsZW47DQoNCglmb3IgKDs7KSB7DQoJ CWludCBuZXYgPSBrZXZlbnQoa3EsIE5VTEwsIDAsIGV2LCAzMiwgTlVMTCk7DQoJCWlmIChuZXYg PCAxKQ0KCQkJZXJyKDEsICJrZXZlbnQiKTsNCgkJZm9yIChpbnQgaSA9IDA7IGkgPCBuZXY7ICsr aSkgew0KCQkJaWYgKGV2W2ldLmlkZW50ID09IHNvY2spIHsNCgkJCQlwcmludGYoImFjY2VwdFxu Iik7DQoJCQkJaW50IGZkID0gYWNjZXB0KGV2W2ldLmlkZW50LA0KCQkJCSAgICAoc3RydWN0IHNv Y2thZGRyICopJmFkZHIsICZzb2NrbGVuKTsNCgkJCQlpZiAoZmQgPT0gLTEpDQoJCQkJCWVycigx LCAiYWNjZXB0Iik7DQoJCQl9DQoJCX0NCgl9DQp9DQoNCmludA0KbWFpbigpDQp7DQoJc3RydWN0 IHNvY2thZGRyX2luIGFkZHI7DQoNCgkvKiBvcGVuIGEgVENQIHNvY2tldCAqLw0KCWludCBrcSA9 IGtxdWV1ZSgpOw0KDQoJaW50IHNvY2sgPSBzb2NrZXQoUEZfSU5FVCwgU09DS19TVFJFQU0sIDAp Ow0KDQoJc3RydWN0IGtldmVudCBldlsyXTsNCglFVl9TRVQoJmV2WzBdLCBzb2NrLCBFVkZJTFRf UkVBRCwgRVZfQUREIHwgRVZfQ0xFQVIsIDAsIDAsIE5VTEwpOw0KCUVWX1NFVCgmZXZbMV0sIHNv Y2ssIEVWRklMVF9XUklURSwgRVZfQUREIHwgRVZfQ0xFQVIsIDAsIDAsIE5VTEwpOw0KDQoJaW50 IG9wdCA9IDE7DQoJc2V0c29ja29wdChzb2NrLCBTT0xfU09DS0VULCBTT19OT1NJR1BJUEUsICZv cHQsIHNpemVvZihvcHQpKTsNCg0KCWlmIChrZXZlbnQoa3EsIGV2LCAyLCBOVUxMLCAwLCBOVUxM KSA9PSAtMSkNCgkgICAgZXJyKDEsICJrZXZlbnQiKTsNCg0KCXNldHNvY2tvcHQoc29jaywgU09M X1NPQ0tFVCwgU09fUkVVU0VBRERSLCAmb3B0LCBzaXplb2Yob3B0KSk7DQoNCgltZW1zZXQoJmFk ZHIsIDAsIHNpemVvZihhZGRyKSk7DQoJYWRkci5zaW5fcG9ydCA9IGh0b25zKDEwMDAwKTsNCg0K CWJpbmQoc29jaywgKHN0cnVjdCBzb2NrYWRkciAqKSZhZGRyLCBzaXplb2YoYWRkcikpOw0KCWxp c3Rlbihzb2NrLCAweDgwKTsNCg0KCWlvY3RsKHNvY2ssIEZJT05CSU8sICZvcHQpOw0KDQoJaWYg KGtldmVudChrcSwgZXYsIDIsIE5VTEwsIDAsIE5VTEwpID09IC0xKQ0KCQllcnIoMSwgImtldmVu dCIpOw0KDQoJd2FpdF9sb29wKGtxLCBzb2NrKTsNCn0NCg== --_002_611243783F62AF48AFB07BC25FA4B1061CEDA7DCDLREXMBX01intra_-- From owner-svn-src-all@freebsd.org Fri Feb 3 08:26:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29BC4CCE02B; Fri, 3 Feb 2017 08:26:56 +0000 (UTC) (envelope-from garga.bsd@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 D7B41847; Fri, 3 Feb 2017 08:26:55 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qt0-x241.google.com with SMTP id n13so3133903qtc.0; Fri, 03 Feb 2017 00:26:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=D6cxxxfO/7Ovb9R6n/rvYz3KaDEogdGDx9ZxM8NxjAk=; b=lTLSLjK63kVEhKYKIME+adKf4FoL9ZFDEPF//n+KJaijX52GQw6FMap/HBHsLU5lMZ kfgkA0qEael8Rgygl9yDxo2dDfzmHit3PhNG+WBi2XNoDl9n0J35l2wVAgR17B1iObAT /xYEjm0xUGE1XcXGddRmZfSxhoWQvmiY5C0cTKaK2T51KZxF5ISVlND2kIsyHSg2w1Cl f0HJQbjOdHivta/J7Ad4LyC9GA8P6xE4yl4qVW+EVeJDXy1gUpn1iKRH0fxwq3dMVTpj 9Kzip63Pe1PH6QgF/QTK0xauHR9yzs/QqYn4X2enVDLkM3suUT0WWVThSyIfG2rOIVZY Nadw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:mime-version:subject:from:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to; bh=D6cxxxfO/7Ovb9R6n/rvYz3KaDEogdGDx9ZxM8NxjAk=; b=RX1tG8QxgNH1z7DPagYkcgiuQcR+z2Frjwc2FbJa2lRka74IYS6dJeHOTMpqDhTZro EKntf9z+ZB1dKIxydDkHtmIpLylZbV37ODNYe6wWxzlWDNkNjqmEqOQOJhUWtCD+e50Y vasCvEHxEk6bEnujALwqinfalKlrdmDVwRKtuwA5mrQKkL/aCN2kZQWmZiZQjMy7YOzs u4YuszZ0SrRworTxI1f25TRVB8GIllrG1o5h3+wGj3F4e8vRAIShNYPjp/b5bhIlYGLw gYjsn2B0KKmXtBKQSgXpxsJEAywgKaqsp7yS8r3+/Kz48cD4cJ52Ksq/qdBVbx57mGo3 akuw== X-Gm-Message-State: AIkVDXKI06ZSHootOVv2YbA8h7Y+3/gXfOj9rbLowc9eYgUbGd9oH5NAVQkaGNtoLd8GJA== X-Received: by 10.233.237.13 with SMTP id c13mr13232117qkg.227.1486110414997; Fri, 03 Feb 2017 00:26:54 -0800 (PST) Received: from mbp.home ([200.236.247.6]) by smtp.gmail.com with ESMTPSA id l53sm23790052qtl.41.2017.02.03.00.26.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2017 00:26:53 -0800 (PST) Sender: Renato Botelho Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313048 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump From: Renato Botelho In-Reply-To: <201702012026.v11KQgS3069932@repo.freebsd.org> Date: Fri, 3 Feb 2017 06:26:49 -0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <201702012026.v11KQgS3069932@repo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 08:26:56 -0000 > On 1 Feb 2017, at 18:26, Gleb Smirnoff wrote: > > Author: glebius > Date: Wed Feb 1 20:26:42 2017 > New Revision: 313048 > URL: https://svnweb.freebsd.org/changeset/base/313048 > > Log: > Update tcpdump to 4.9.0. > > It fixes many buffer overflow in different protocol parsers, but none of > them are critical, even in absense of Capsicum. > > Security: CVE-2016-7922, CVE-2016-7923, CVE-2016-7924, CVE-2016-7925 > Security: CVE-2016-7926, CVE-2016-7927, CVE-2016-7928, CVE-2016-7929 > Security: CVE-2016-7930, CVE-2016-7931, CVE-2016-7932, CVE-2016-7933 > Security: CVE-2016-7934, CVE-2016-7935, CVE-2016-7936, CVE-2016-7937 > Security: CVE-2016-7938, CVE-2016-7939, CVE-2016-7940, CVE-2016-7973 > Security: CVE-2016-7974, CVE-2016-7975, CVE-2016-7983, CVE-2016-7984 > Security: CVE-2016-7985, CVE-2016-7986, CVE-2016-7992, CVE-2016-7993 > Security: CVE-2016-8574, CVE-2016-8575, CVE-2017-5202, CVE-2017-5203 > Security: CVE-2017-5204, CVE-2017-5205, CVE-2017-5341, CVE-2017-5342 > Security: CVE-2017-5482, CVE-2017-5483, CVE-2017-5484, CVE-2017-5485 > Security: CVE-2017-5486 Hi Gleb, Do you plan to MFC it to stable/11 and stable/10? -- Renato Botelho From owner-svn-src-all@freebsd.org Fri Feb 3 08:32:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9DC4CCE364; Fri, 3 Feb 2017 08:32:30 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83E92100F; Fri, 3 Feb 2017 08:32:30 +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 689721FE025; Fri, 3 Feb 2017 09:31:42 +0100 (CET) Subject: Re: svn commit: r313006 - in head: sys/conf sys/libkern sys/libkern/x86 sys/sys tests/sys/kern To: Bruce Evans References: <201701310326.v0V3QW30024375@repo.freebsd.org> <20170131153411.G1061@besplex.bde.org> <20170131175309.N1418@besplex.bde.org> <20170201005009.E2504@besplex.bde.org> Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <553e4199-c80e-88dd-109a-cc1cd1520d6a@selasky.org> Date: Fri, 3 Feb 2017 09:31:48 +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: <20170201005009.E2504@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 08:32:30 -0000 On 01/31/17 16:36, Bruce Evans wrote: >> gcc-4.2.1 is an ancient compiler. Good riddance. > > I prefer it. This change also breaks compilation with clang v3.6 (FYI) --HPS From owner-svn-src-all@freebsd.org Fri Feb 3 10:04:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5903CCCBEE; Fri, 3 Feb 2017 10:04:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 759DD8C4; Fri, 3 Feb 2017 10:04:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13A4HBV009692; Fri, 3 Feb 2017 10:04:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13A4HfA009691; Fri, 3 Feb 2017 10:04:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702031004.v13A4HfA009691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Feb 2017 10:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313141 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 10:04:18 -0000 Author: andrew Date: Fri Feb 3 10:04:17 2017 New Revision: 313141 URL: https://svnweb.freebsd.org/changeset/base/313141 Log: Only define atomic_fcmpset_long in the kernel. We may include machine/atomic.h in userspace, however atomic_fcmpset_32 is unimplemented there. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/include/atomic-v4.h Modified: head/sys/arm/include/atomic-v4.h ============================================================================== --- head/sys/arm/include/atomic-v4.h Fri Feb 3 08:15:23 2017 (r313140) +++ head/sys/arm/include/atomic-v4.h Fri Feb 3 10:04:17 2017 (r313141) @@ -463,6 +463,8 @@ atomic_cmpset_long(volatile u_long *dst, return (atomic_cmpset_32((volatile uint32_t *)dst, old, newe)); } +#ifdef _KERNEL +/* atomic_fcmpset_32 is only defined for the kernel */ static __inline u_long atomic_fcmpset_long(volatile u_long *dst, u_long *old, u_long newe) { @@ -470,6 +472,7 @@ atomic_fcmpset_long(volatile u_long *dst return (atomic_fcmpset_32((volatile uint32_t *)dst, (uint32_t *)old, newe)); } +#endif static __inline u_long atomic_fetchadd_long(volatile u_long *p, u_long v) From owner-svn-src-all@freebsd.org Fri Feb 3 11:04:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70DA9CCE76A; Fri, 3 Feb 2017 11:04:51 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D6D633D; Fri, 3 Feb 2017 11:04:51 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13B4oeY033906; Fri, 3 Feb 2017 11:04:50 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13B4oAG033905; Fri, 3 Feb 2017 11:04:50 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031104.v13B4oAG033905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 11:04:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313142 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 11:04:51 -0000 Author: sevan (doc committer) Date: Fri Feb 3 11:04:50 2017 New Revision: 313142 URL: https://svnweb.freebsd.org/changeset/base/313142 Log: Fix the previous commit to the family tree file. It is too early to list 11.0, and we do not list -CURRENT here. Submitted by: maxim Sponsored by: The FreeBSD Foundation Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Fri Feb 3 10:04:17 2017 (r313141) +++ stable/11/share/misc/bsd-family-tree Fri Feb 3 11:04:50 2017 (r313142) @@ -339,7 +339,11 @@ FreeBSD 5.2 | | | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | | | | | | -FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current + *--FreeBSD | | | | + | 11.0 | | | | + | | | | | + | | | | | +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -687,6 +691,8 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +FreeBSD 11.0 2016-06-08 [FBD] +FreeBSD 12.0 2016-06-09 [FBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Fri Feb 3 11:17:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8625CCEA5B; Fri, 3 Feb 2017 11:17:45 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97C1CA19; Fri, 3 Feb 2017 11:17:45 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13BHiS7038462; Fri, 3 Feb 2017 11:17:44 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13BHiEg038461; Fri, 3 Feb 2017 11:17:44 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031117.v13BHiEg038461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 11:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313143 - stable/11/bin/kill X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 11:17:45 -0000 Author: sevan (doc committer) Date: Fri Feb 3 11:17:44 2017 New Revision: 313143 URL: https://svnweb.freebsd.org/changeset/base/313143 Log: In v3 UNIX, the kill utility is documented in category 8, not 1. Add a note of it. http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8 PR: 211786 Approved by: bcr (mentor) Obtained from: TUHS Differential Revision: https://reviews.freebsd.org/D8105 Modified: stable/11/bin/kill/kill.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/kill/kill.1 ============================================================================== --- stable/11/bin/kill/kill.1 Fri Feb 3 11:04:50 2017 (r313142) +++ stable/11/bin/kill/kill.1 Fri Feb 3 11:17:44 2017 (r313143) @@ -32,7 +32,7 @@ .\" @(#)kill.1 8.2 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd April 28, 1995 +.Dd October 3, 2016 .Dt KILL 1 .Os .Sh NAME @@ -147,7 +147,8 @@ compatible. A .Nm command appeared in -.At v3 . +.At v3 +in section 8 of the manual. .Sh BUGS A replacement for the command .Dq Li kill 0 From owner-svn-src-all@freebsd.org Fri Feb 3 11:18:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81A54CCEAC7; Fri, 3 Feb 2017 11:18:35 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E659B6A; Fri, 3 Feb 2017 11:18:35 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13BIYYg038561; Fri, 3 Feb 2017 11:18:34 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13BIY8W038560; Fri, 3 Feb 2017 11:18:34 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031118.v13BIY8W038560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 11:18:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313144 - stable/10/bin/kill X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 11:18:35 -0000 Author: sevan (doc committer) Date: Fri Feb 3 11:18:34 2017 New Revision: 313144 URL: https://svnweb.freebsd.org/changeset/base/313144 Log: In v3 UNIX, the kill utility is documented in category 8, not 1. Add a note of it. http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8 PR: 211786 Approved by: bcr (mentor) Obtained from: TUHS Differential Revision: https://reviews.freebsd.org/D8105 Modified: stable/10/bin/kill/kill.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/kill/kill.1 ============================================================================== --- stable/10/bin/kill/kill.1 Fri Feb 3 11:17:44 2017 (r313143) +++ stable/10/bin/kill/kill.1 Fri Feb 3 11:18:34 2017 (r313144) @@ -32,7 +32,7 @@ .\" @(#)kill.1 8.2 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd April 28, 1995 +.Dd October 3, 2016 .Dt KILL 1 .Os .Sh NAME @@ -147,7 +147,8 @@ compatible. A .Nm command appeared in -.At v3 . +.At v3 +in section 8 of the manual. .Sh BUGS A replacement for the command .Dq Li kill 0 From owner-svn-src-all@freebsd.org Fri Feb 3 11:47:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF8B7CCE2BC; Fri, 3 Feb 2017 11:47:58 +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 7F209DB3; Fri, 3 Feb 2017 11:47:58 +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 v13Blv9F050859; Fri, 3 Feb 2017 11:47:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13BlvsB050858; Fri, 3 Feb 2017 11:47:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702031147.v13BlvsB050858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Feb 2017 11:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313145 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 11:47:58 -0000 Author: andrew Date: Fri Feb 3 11:47:57 2017 New Revision: 313145 URL: https://svnweb.freebsd.org/changeset/base/313145 Log: Remove an old use of _ARM_ARCH_6, we are moving to using the standard __ARM_ARCH >= 6 spelling. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/include/asmacros.h Modified: head/sys/arm/include/asmacros.h ============================================================================== --- head/sys/arm/include/asmacros.h Fri Feb 3 11:18:34 2017 (r313144) +++ head/sys/arm/include/asmacros.h Fri Feb 3 11:47:57 2017 (r313145) @@ -35,7 +35,7 @@ #ifdef LOCORE -#ifdef _ARM_ARCH_6 +#if __ARM_ARCH >= 6 #define GET_CURTHREAD_PTR(tmp) \ mrc p15, 0, tmp, c13, c0, 4 #else From owner-svn-src-all@freebsd.org Fri Feb 3 11:51:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F305CCE6F1; Fri, 3 Feb 2017 11:51:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C97D412D9; Fri, 3 Feb 2017 11:51:07 +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 v13Bp6JQ051943; Fri, 3 Feb 2017 11:51:06 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13Bp6Xl051942; Fri, 3 Feb 2017 11:51:06 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201702031151.v13Bp6Xl051942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 3 Feb 2017 11:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313146 - head/lib/libc/aarch64/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 11:51:08 -0000 Author: andrew Date: Fri Feb 3 11:51:06 2017 New Revision: 313146 URL: https://svnweb.freebsd.org/changeset/base/313146 Log: Fix the comment showing the meaning of the first argument to sigprocmask. Sponsored by: ABT Systems Ltd Modified: head/lib/libc/aarch64/gen/setjmp.S Modified: head/lib/libc/aarch64/gen/setjmp.S ============================================================================== --- head/lib/libc/aarch64/gen/setjmp.S Fri Feb 3 11:47:57 2017 (r313145) +++ head/lib/libc/aarch64/gen/setjmp.S Fri Feb 3 11:51:06 2017 (r313146) @@ -82,7 +82,7 @@ ENTRY(longjmp) /* Restore the signal mask */ mov x2, #0 /* oset */ add x1, x0, #(_JB_SIGMASK * 8) /* set */ - mov x0, #3 /* SIG_BLOCK */ + mov x0, #3 /* SIG_SETMASK */ bl sigprocmask ldr x1, [sp, #16] From owner-svn-src-all@freebsd.org Fri Feb 3 12:03:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62E47CCC40D; Fri, 3 Feb 2017 12:03:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23A621E5A; Fri, 3 Feb 2017 12:03:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13C3Bh8058844; Fri, 3 Feb 2017 12:03:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13C3Aki058840; Fri, 3 Feb 2017 12:03:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702031203.v13C3Aki058840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 3 Feb 2017 12:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313148 - in stable/11/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 12:03:12 -0000 Author: kib Date: Fri Feb 3 12:03:10 2017 New Revision: 313148 URL: https://svnweb.freebsd.org/changeset/base/313148 Log: MFC r312555: Use SFENCE for ordering CLFLUSHOPT. Modified: stable/11/sys/amd64/amd64/pmap.c stable/11/sys/amd64/include/cpufunc.h stable/11/sys/i386/i386/pmap.c stable/11/sys/i386/include/cpufunc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Feb 3 12:01:28 2017 (r313147) +++ stable/11/sys/amd64/amd64/pmap.c Fri Feb 3 12:03:10 2017 (r313148) @@ -1863,16 +1863,16 @@ pmap_invalidate_cache_range(vm_offset_t return; /* - * Otherwise, do per-cache line flush. Use the mfence + * Otherwise, do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache * coherence domain. */ - mfence(); + sfence(); for (; sva < eva; sva += cpu_clflush_line_size) clflushopt(sva); - mfence(); + sfence(); } else if ((cpu_feature & CPUID_CLFSH) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { if (pmap_kextract(sva) == lapic_paddr) @@ -1916,7 +1916,9 @@ pmap_invalidate_cache_pages(vm_page_t *p ((cpu_feature & CPUID_CLFSH) == 0 && !useclflushopt)) pmap_invalidate_cache(); else { - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); for (i = 0; i < count; i++) { daddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pages[i])); @@ -1928,7 +1930,9 @@ pmap_invalidate_cache_pages(vm_page_t *p clflush(daddr); } } - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); } } Modified: stable/11/sys/amd64/include/cpufunc.h ============================================================================== --- stable/11/sys/amd64/include/cpufunc.h Fri Feb 3 12:01:28 2017 (r313147) +++ stable/11/sys/amd64/include/cpufunc.h Fri Feb 3 12:03:10 2017 (r313148) @@ -327,6 +327,13 @@ mfence(void) } static __inline void +sfence(void) +{ + + __asm __volatile("sfence" : : : "memory"); +} + +static __inline void ia32_pause(void) { __asm __volatile("pause"); Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Fri Feb 3 12:01:28 2017 (r313147) +++ stable/11/sys/i386/i386/pmap.c Fri Feb 3 12:03:10 2017 (r313148) @@ -1284,16 +1284,16 @@ pmap_invalidate_cache_range(vm_offset_t return; #endif /* - * Otherwise, do per-cache line flush. Use the mfence + * Otherwise, do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache * coherence domain. */ - mfence(); + sfence(); for (; sva < eva; sva += cpu_clflush_line_size) clflushopt(sva); - mfence(); + sfence(); } else if ((cpu_feature & CPUID_CLFSH) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { #ifdef DEV_APIC @@ -5348,12 +5348,14 @@ pmap_flush_page(vm_page_t m) eva = sva + PAGE_SIZE; /* - * Use mfence despite the ordering implied by + * Use mfence or sfence despite the ordering implied by * mtx_{un,}lock() because clflush on non-Intel CPUs * and clflushopt are not guaranteed to be ordered by * any other instruction. */ - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); for (; sva < eva; sva += cpu_clflush_line_size) { if (useclflushopt) @@ -5361,7 +5363,9 @@ pmap_flush_page(vm_page_t m) else clflush(sva); } - if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); *cmap_pte2 = 0; sched_unpin(); Modified: stable/11/sys/i386/include/cpufunc.h ============================================================================== --- stable/11/sys/i386/include/cpufunc.h Fri Feb 3 12:01:28 2017 (r313147) +++ stable/11/sys/i386/include/cpufunc.h Fri Feb 3 12:03:10 2017 (r313148) @@ -158,6 +158,13 @@ mfence(void) __asm __volatile("mfence" : : : "memory"); } +static __inline void +sfence(void) +{ + + __asm __volatile("sfence" : : : "memory"); +} + #ifdef _KERNEL #define HAVE_INLINE_FFS From owner-svn-src-all@freebsd.org Fri Feb 3 12:20:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 592B8CCC95C; Fri, 3 Feb 2017 12:20:46 +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 33B177F5; Fri, 3 Feb 2017 12:20:46 +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 v13CKjjR063165; Fri, 3 Feb 2017 12:20:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13CKi6n063159; Fri, 3 Feb 2017 12:20:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702031220.v13CKi6n063159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 3 Feb 2017 12:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313150 - in stable/10/sys: amd64/amd64 amd64/include i386/i386 i386/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 12:20:46 -0000 Author: kib Date: Fri Feb 3 12:20:44 2017 New Revision: 313150 URL: https://svnweb.freebsd.org/changeset/base/313150 Log: MFC r289894: CLFLUSH does not need barriers, the instruction is ordered WRT other writes. Use CLFLUSHOPT when available. MFC r312555: Use SFENCE for ordering CLFLUSHOPT. Modified: stable/10/sys/amd64/amd64/initcpu.c stable/10/sys/amd64/amd64/pmap.c stable/10/sys/amd64/include/cpufunc.h stable/10/sys/i386/i386/initcpu.c stable/10/sys/i386/i386/pmap.c stable/10/sys/i386/include/cpufunc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/10/sys/amd64/amd64/initcpu.c Fri Feb 3 12:13:55 2017 (r313149) +++ stable/10/sys/amd64/amd64/initcpu.c Fri Feb 3 12:20:44 2017 (r313150) @@ -253,12 +253,17 @@ initializecpucache(void) * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); - if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) + if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) { cpu_feature &= ~CPUID_CLFSH; + cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; + } + /* - * Allow to disable CLFLUSH feature manually by - * hw.clflush_disable tunable. + * The kernel's use of CLFLUSH{,OPT} can be disabled manually + * by setting the hw.clflush_disable tunable. */ - if (hw_clflush_disable == 1) + if (hw_clflush_disable == 1) { cpu_feature &= ~CPUID_CLFSH; + cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; + } } Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Fri Feb 3 12:13:55 2017 (r313149) +++ stable/10/sys/amd64/amd64/pmap.c Fri Feb 3 12:20:44 2017 (r313150) @@ -1789,9 +1789,8 @@ pmap_invalidate_cache_range(vm_offset_t if ((cpu_feature & CPUID_SS) != 0 && !force) ; /* If "Self Snoop" is supported and allowed, do nothing. */ - else if ((cpu_feature & CPUID_CLFSH) != 0 && + else if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { - /* * XXX: Some CPUs fault, hang, or trash the local APIC * registers if we use CLFLUSH on the local APIC @@ -1802,16 +1801,29 @@ pmap_invalidate_cache_range(vm_offset_t return; /* - * Otherwise, do per-cache line flush. Use the mfence + * Otherwise, do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache * coherence domain. */ - mfence(); + sfence(); + for (; sva < eva; sva += cpu_clflush_line_size) + clflushopt(sva); + sfence(); + } else if ((cpu_feature & CPUID_CLFSH) != 0 && + eva - sva < PMAP_CLFLUSH_THRESHOLD) { + if (pmap_kextract(sva) == lapic_paddr) + return; + /* + * Writes are ordered by CLFLUSH on Intel CPUs. + */ + if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); for (; sva < eva; sva += cpu_clflush_line_size) clflush(sva); - mfence(); + if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); } else { /* @@ -1835,19 +1847,31 @@ pmap_invalidate_cache_pages(vm_page_t *p { vm_offset_t daddr, eva; int i; + bool useclflushopt; + useclflushopt = (cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0; if (count >= PMAP_CLFLUSH_THRESHOLD / PAGE_SIZE || - (cpu_feature & CPUID_CLFSH) == 0) + ((cpu_feature & CPUID_CLFSH) == 0 && !useclflushopt)) pmap_invalidate_cache(); else { - mfence(); + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); for (i = 0; i < count; i++) { daddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pages[i])); eva = daddr + PAGE_SIZE; - for (; daddr < eva; daddr += cpu_clflush_line_size) - clflush(daddr); + for (; daddr < eva; daddr += cpu_clflush_line_size) { + if (useclflushopt) + clflushopt(daddr); + else + clflush(daddr); + } } - mfence(); + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); } } Modified: stable/10/sys/amd64/include/cpufunc.h ============================================================================== --- stable/10/sys/amd64/include/cpufunc.h Fri Feb 3 12:13:55 2017 (r313149) +++ stable/10/sys/amd64/include/cpufunc.h Fri Feb 3 12:20:44 2017 (r313150) @@ -327,6 +327,13 @@ mfence(void) } static __inline void +sfence(void) +{ + + __asm __volatile("sfence" : : : "memory"); +} + +static __inline void ia32_pause(void) { __asm __volatile("pause"); Modified: stable/10/sys/i386/i386/initcpu.c ============================================================================== --- stable/10/sys/i386/i386/initcpu.c Fri Feb 3 12:13:55 2017 (r313149) +++ stable/10/sys/i386/i386/initcpu.c Fri Feb 3 12:20:44 2017 (r313150) @@ -826,14 +826,18 @@ initializecpucache(void) * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); - if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) + if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) { cpu_feature &= ~CPUID_CLFSH; + cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; + } /* - * Allow to disable CLFLUSH feature manually by - * hw.clflush_disable tunable. + * The kernel's use of CLFLUSH{,OPT} can be disabled manually + * by setting the hw.clflush_disable tunable. */ - if (hw_clflush_disable == 1) + if (hw_clflush_disable == 1) { cpu_feature &= ~CPUID_CLFSH; + cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; + } #if defined(PC98) && !defined(CPU_UPGRADE_HW_CACHE) /* Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Fri Feb 3 12:13:55 2017 (r313149) +++ stable/10/sys/i386/i386/pmap.c Fri Feb 3 12:20:44 2017 (r313150) @@ -1222,9 +1222,8 @@ pmap_invalidate_cache_range(vm_offset_t if ((cpu_feature & CPUID_SS) != 0 && !force) ; /* If "Self Snoop" is supported and allowed, do nothing. */ - else if ((cpu_feature & CPUID_CLFSH) != 0 && + else if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { - #ifdef DEV_APIC /* * XXX: Some CPUs fault, hang, or trash the local APIC @@ -1236,16 +1235,29 @@ pmap_invalidate_cache_range(vm_offset_t return; #endif /* - * Otherwise, do per-cache line flush. Use the mfence + * Otherwise, do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache * coherence domain. */ - mfence(); + sfence(); + for (; sva < eva; sva += cpu_clflush_line_size) + clflushopt(sva); + sfence(); + } else if ((cpu_feature & CPUID_CLFSH) != 0 && + eva - sva < PMAP_CLFLUSH_THRESHOLD) { + if (pmap_kextract(sva) == lapic_paddr) + return; + /* + * Writes are ordered by CLFLUSH on Intel CPUs. + */ + if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); for (; sva < eva; sva += cpu_clflush_line_size) clflush(sva); - mfence(); + if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); } else { /* @@ -5316,8 +5328,10 @@ pmap_flush_page(vm_page_t m) { struct sysmaps *sysmaps; vm_offset_t sva, eva; + bool useclflushopt; - if ((cpu_feature & CPUID_CLFSH) != 0) { + useclflushopt = (cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0; + if (useclflushopt || (cpu_feature & CPUID_CLFSH) != 0) { sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; mtx_lock(&sysmaps->lock); if (*sysmaps->CMAP2) @@ -5330,14 +5344,25 @@ pmap_flush_page(vm_page_t m) eva = sva + PAGE_SIZE; /* - * Use mfence despite the ordering implied by - * mtx_{un,}lock() because clflush is not guaranteed - * to be ordered by any other instruction. + * Use mfence or sfence despite the ordering implied by + * mtx_{un,}lock() because clflush on non-Intel CPUs + * and clflushopt are not guaranteed to be ordered by + * any other instruction. */ - mfence(); - for (; sva < eva; sva += cpu_clflush_line_size) - clflush(sva); - mfence(); + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); + for (; sva < eva; sva += cpu_clflush_line_size) { + if (useclflushopt) + clflushopt(sva); + else + clflush(sva); + } + if (useclflushopt) + sfence(); + else if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); *sysmaps->CMAP2 = 0; sched_unpin(); mtx_unlock(&sysmaps->lock); Modified: stable/10/sys/i386/include/cpufunc.h ============================================================================== --- stable/10/sys/i386/include/cpufunc.h Fri Feb 3 12:13:55 2017 (r313149) +++ stable/10/sys/i386/include/cpufunc.h Fri Feb 3 12:20:44 2017 (r313150) @@ -175,6 +175,13 @@ mfence(void) __asm __volatile("mfence" : : : "memory"); } +static __inline void +sfence(void) +{ + + __asm __volatile("sfence" : : : "memory"); +} + #ifdef _KERNEL #define HAVE_INLINE_FFS From owner-svn-src-all@freebsd.org Fri Feb 3 12:47:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A649ACCD5AF; Fri, 3 Feb 2017 12:47:25 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72AEF1B96; Fri, 3 Feb 2017 12:47:25 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13ClO3G075689; Fri, 3 Feb 2017 12:47:24 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13ClObF075688; Fri, 3 Feb 2017 12:47:24 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031247.v13ClObF075688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 12:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313152 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 12:47:25 -0000 Author: sevan (doc committer) Date: Fri Feb 3 12:47:24 2017 New Revision: 313152 URL: https://svnweb.freebsd.org/changeset/base/313152 Log: Revert previous merge as it contained incorrect commit message. Modified: stable/11/share/misc/bsd-family-tree Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Fri Feb 3 12:21:15 2017 (r313151) +++ stable/11/share/misc/bsd-family-tree Fri Feb 3 12:47:24 2017 (r313152) @@ -339,11 +339,7 @@ FreeBSD 5.2 | | | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | | | | | | - *--FreeBSD | | | | - | 11.0 | | | | - | | | | | - | | | | | -FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current +FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -691,8 +687,6 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] -FreeBSD 11.0 2016-06-08 [FBD] -FreeBSD 12.0 2016-06-09 [FBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Fri Feb 3 12:48:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B37BDCCD6BE; Fri, 3 Feb 2017 12:48:45 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82D361D03; Fri, 3 Feb 2017 12:48:45 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13Cmibv075789; Fri, 3 Feb 2017 12:48:44 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13CmirH075788; Fri, 3 Feb 2017 12:48:44 GMT (envelope-from des@FreeBSD.org) Message-Id: <201702031248.v13CmirH075788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 3 Feb 2017 12:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313153 - vendor-crypto/openssh/dist X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 12:48:45 -0000 Author: des Date: Fri Feb 3 12:48:44 2017 New Revision: 313153 URL: https://svnweb.freebsd.org/changeset/base/313153 Log: Add missing properties Modified: Directory Properties: vendor-crypto/openssh/dist/cipher-aesctr.c (props changed) vendor-crypto/openssh/dist/cipher-aesctr.h (props changed) vendor-crypto/openssh/dist/platform-tracing.c (props changed) vendor-crypto/openssh/dist/sshbuf-getput-basic.c (props changed) vendor-crypto/openssh/dist/sshbuf-getput-crypto.c (props changed) vendor-crypto/openssh/dist/sshbuf-misc.c (props changed) vendor-crypto/openssh/dist/sshbuf.c (props changed) vendor-crypto/openssh/dist/sshbuf.h (props changed) vendor-crypto/openssh/dist/ssherr.c (props changed) vendor-crypto/openssh/dist/ssherr.h (props changed) vendor-crypto/openssh/dist/sshkey.c (props changed) vendor-crypto/openssh/dist/sshkey.h (props changed) vendor-crypto/openssh/dist/utf8.c (props changed) vendor-crypto/openssh/dist/utf8.h (props changed) From owner-svn-src-all@freebsd.org Fri Feb 3 12:51:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFFAACCD888; Fri, 3 Feb 2017 12:51:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA5828; Fri, 3 Feb 2017 12:51:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13CpeYP078941; Fri, 3 Feb 2017 12:51:40 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13Cperm078940; Fri, 3 Feb 2017 12:51:40 GMT (envelope-from des@FreeBSD.org) Message-Id: <201702031251.v13Cperm078940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 3 Feb 2017 12:51:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313155 - in vendor-crypto/openssh/dist: . openbsd-compat openbsd-compat/regress regress regress/misc regress/misc/kexfuzz regress/unittests regress/unittests/bitmap regress/unittests/h... X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 12:51:41 -0000 Author: des Date: Fri Feb 3 12:51:40 2017 New Revision: 313155 URL: https://svnweb.freebsd.org/changeset/base/313155 Log: More property fixups. Damn svn autoprops :( Modified: Directory Properties: vendor-crypto/openssh/dist/openbsd-compat/bsd-err.c (props changed) vendor-crypto/openssh/dist/openbsd-compat/kludge-fd_set.c (props changed) vendor-crypto/openssh/dist/openbsd-compat/regress/opensslvertest.c (props changed) vendor-crypto/openssh/dist/openbsd-compat/strcasestr.c (props changed) vendor-crypto/openssh/dist/platform-pledge.c (props changed) vendor-crypto/openssh/dist/regress/cert-file.sh (props changed) vendor-crypto/openssh/dist/regress/cfgparse.sh (props changed) vendor-crypto/openssh/dist/regress/check-perm.c (props changed) vendor-crypto/openssh/dist/regress/hostkey-agent.sh (props changed) vendor-crypto/openssh/dist/regress/hostkey-rotate.sh (props changed) vendor-crypto/openssh/dist/regress/keygen-knownhosts.sh (props changed) vendor-crypto/openssh/dist/regress/limit-keytype.sh (props changed) vendor-crypto/openssh/dist/regress/misc/Makefile (props changed) vendor-crypto/openssh/dist/regress/misc/kexfuzz/Makefile (props changed) vendor-crypto/openssh/dist/regress/misc/kexfuzz/kexfuzz.c (props changed) vendor-crypto/openssh/dist/regress/moduli.in (props changed) vendor-crypto/openssh/dist/regress/multipubkey.sh (props changed) vendor-crypto/openssh/dist/regress/principals-command.sh (props changed) vendor-crypto/openssh/dist/regress/unittests/Makefile (props changed) vendor-crypto/openssh/dist/regress/unittests/bitmap/Makefile (props changed) vendor-crypto/openssh/dist/regress/unittests/hostkeys/Makefile (props changed) vendor-crypto/openssh/dist/regress/unittests/hostkeys/mktestdata.sh (props changed) vendor-crypto/openssh/dist/regress/unittests/kex/Makefile (props changed) vendor-crypto/openssh/dist/regress/unittests/match/Makefile (props changed) vendor-crypto/openssh/dist/regress/unittests/match/tests.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshbuf/Makefile (props changed) vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_fixed.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_fuzz.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_getput_basic.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshbuf/test_sshbuf_misc.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshbuf/tests.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshkey/Makefile (props changed) vendor-crypto/openssh/dist/regress/unittests/sshkey/common.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshkey/common.h (props changed) vendor-crypto/openssh/dist/regress/unittests/sshkey/test_file.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshkey/test_fuzz.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshkey/test_sshkey.c (props changed) vendor-crypto/openssh/dist/regress/unittests/sshkey/tests.c (props changed) vendor-crypto/openssh/dist/regress/unittests/test_helper/Makefile (props changed) vendor-crypto/openssh/dist/regress/unittests/test_helper/fuzz.c (props changed) vendor-crypto/openssh/dist/regress/unittests/test_helper/test_helper.c (props changed) vendor-crypto/openssh/dist/regress/unittests/test_helper/test_helper.h (props changed) vendor-crypto/openssh/dist/regress/unittests/utf8/Makefile (props changed) vendor-crypto/openssh/dist/regress/unittests/utf8/tests.c (props changed) vendor-crypto/openssh/dist/regress/valgrind-unit.sh (props changed) vendor-crypto/openssh/dist/sandbox-pledge.c (props changed) vendor-crypto/openssh/dist/sandbox-solaris.c (props changed) From owner-svn-src-all@freebsd.org Fri Feb 3 12:51:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81B5ACCD88E; Fri, 3 Feb 2017 12:51:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A63451; Fri, 3 Feb 2017 12:51:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13Cpg4N078967; Fri, 3 Feb 2017 12:51:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13Cpexi078938; Fri, 3 Feb 2017 12:51:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702031251.v13Cpexi078938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 3 Feb 2017 12:51:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313154 - in head/sys: conf i386/conf i386/i386 i386/include i386/isa i386/linux x86/acpica x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 12:51:43 -0000 Author: kib Date: Fri Feb 3 12:51:40 2017 New Revision: 313154 URL: https://svnweb.freebsd.org/changeset/base/313154 Log: For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE and device npx. This means that FPU is always initialized and handled when available, and SSE+ register file and exception are handled when available. This makes the kernel FPU code much easier to maintain by the cost of slight bloat for CPUs older than 25 years. CPU_DISABLE_CMPXCHG outlived its usefulness, see the removed comment explaining the original purpose. Suggested by and discussed with: bde Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/conf/files.i386 head/sys/conf/options.i386 head/sys/i386/conf/DEFAULTS head/sys/i386/conf/NOTES head/sys/i386/i386/elf_machdep.c head/sys/i386/i386/exception.s head/sys/i386/i386/initcpu.c head/sys/i386/i386/machdep.c head/sys/i386/i386/mp_machdep.c head/sys/i386/i386/pmap.c head/sys/i386/i386/ptrace_machdep.c head/sys/i386/i386/support.s head/sys/i386/i386/swtch.s head/sys/i386/i386/trap.c head/sys/i386/i386/vm86bios.s head/sys/i386/i386/vm_machdep.c head/sys/i386/include/atomic.h head/sys/i386/isa/npx.c head/sys/i386/linux/linux_ptrace.c head/sys/x86/acpica/acpi_wakeup.c head/sys/x86/x86/cpu_machdep.c head/sys/x86/x86/identcpu.c Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/conf/files.i386 Fri Feb 3 12:51:40 2017 (r313154) @@ -530,7 +530,7 @@ i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 i386/isa/elink.c optional ep | ie -i386/isa/npx.c optional npx +i386/isa/npx.c standard i386/isa/pmtimer.c optional pmtimer i386/isa/prof_machdep.c optional profiling-routine i386/linux/imgact_linux.c optional compat_linux Modified: head/sys/conf/options.i386 ============================================================================== --- head/sys/conf/options.i386 Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/conf/options.i386 Fri Feb 3 12:51:40 2017 (r313154) @@ -50,8 +50,6 @@ CPU_BTB_EN opt_cpu.h CPU_CYRIX_NO_LOCK opt_cpu.h CPU_DIRECT_MAPPED_CACHE opt_cpu.h CPU_DISABLE_5X86_LSSER opt_cpu.h -CPU_DISABLE_CMPXCHG opt_global.h # XXX global, unlike other CPU_* -CPU_DISABLE_SSE opt_cpu.h CPU_ELAN opt_cpu.h CPU_ELAN_PPS opt_cpu.h CPU_ELAN_XTAL opt_cpu.h @@ -113,7 +111,6 @@ NETGRAPH_CRONYX opt_ng_cronyx.h # Device options DEV_APIC opt_apic.h DEV_ATPIC opt_atpic.h -DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h Modified: head/sys/i386/conf/DEFAULTS ============================================================================== --- head/sys/i386/conf/DEFAULTS Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/conf/DEFAULTS Fri Feb 3 12:51:40 2017 (r313154) @@ -9,9 +9,6 @@ machine i386 device isa options ISAPNP -# Floating point support. -device npx - # Pseudo devices. device mem # Memory and kernel memory devices device io # I/O device Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/conf/NOTES Fri Feb 3 12:51:40 2017 (r313154) @@ -115,15 +115,6 @@ cpu I686_CPU # aka Pentium Pro(tm) # reorder). This option should not be used if you use memory mapped # I/O device(s). # -# CPU_DISABLE_CMPXCHG disables the CMPXCHG instruction on > i386 IA32 -# machines. VmWare 3.x seems to emulate this instruction poorly, causing -# the guest OS to run very slowly. This problem appears to be fixed in -# VmWare 4.x, at least in version 4.5.2, so that enabling this option with -# VmWare 4.x will result in locking operations to be 20-30 times slower. -# Enabling this with an SMP kernel will cause the kernel to be unusable. -# -# CPU_DISABLE_SSE explicitly prevents I686_CPU from turning on SSE. -# # CPU_ELAN enables support for AMDs ElanSC520 CPU. # CPU_ELAN_PPS enables precision timestamp code. # CPU_ELAN_XTAL sets the clock crystal frequency in Hz. @@ -201,8 +192,6 @@ options CPU_BLUELIGHTNING_FPU_OP_CACHE options CPU_BTB_EN options CPU_DIRECT_MAPPED_CACHE options CPU_DISABLE_5X86_LSSER -options CPU_DISABLE_CMPXCHG -#options CPU_DISABLE_SSE options CPU_ELAN options CPU_ELAN_PPS options CPU_ELAN_XTAL=32768000 @@ -313,7 +302,7 @@ device apm_saver # Requires APM # # ISA bus # -device isa # Required by npx(4) +device isa # # Options for `isa': @@ -395,8 +384,7 @@ device dpms # DPMS suspend & resume vi options X86BIOS # -# The Numeric Processing eXtension driver. This is non-optional. -device npx +# Hints for the non-optional Numeric Processing eXtension driver. hint.npx.0.flags="0x0" hint.npx.0.irq="13" Modified: head/sys/i386/i386/elf_machdep.c ============================================================================== --- head/sys/i386/i386/elf_machdep.c Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/elf_machdep.c Fri Feb 3 12:51:40 2017 (r313154) @@ -49,10 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - struct sysentvec elf32_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, @@ -143,13 +139,10 @@ SYSINIT(kelf32, SI_SUB_EXEC, SI_ORDER_AN void elf32_dump_thread(struct thread *td, void *dst, size_t *off) { -#ifdef CPU_ENABLE_SSE void *buf; -#endif size_t len; len = 0; -#ifdef CPU_ENABLE_SSE if (use_xsave) { if (dst != NULL) { npxgetregs(td); @@ -162,7 +155,6 @@ elf32_dump_thread(struct thread *td, voi len += elf32_populate_note(NT_X86_XSTATE, NULL, NULL, cpu_max_ext_state_size, NULL); } -#endif *off = len; } Modified: head/sys/i386/i386/exception.s ============================================================================== --- head/sys/i386/i386/exception.s Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/exception.s Fri Feb 3 12:51:40 2017 (r313154) @@ -37,7 +37,6 @@ #include "opt_apic.h" #include "opt_atpic.h" #include "opt_hwpmc_hooks.h" -#include "opt_npx.h" #include #include Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/initcpu.c Fri Feb 3 12:51:40 2017 (r313154) @@ -44,10 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - #ifdef I486_CPU static void init_5x86(void); static void init_bluelightning(void); @@ -742,12 +738,10 @@ initializecpu(void) default: break; } -#if defined(CPU_ENABLE_SSE) if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { load_cr4(rcr4() | CR4_FXSR | CR4_XMM); cpu_fxsr = hw_instruction_sse = 1; } -#endif #if defined(PAE) || defined(PAE_TABLES) if ((amd_feature & AMDID_NX) != 0) { uint64_t msr; Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/machdep.c Fri Feb 3 12:51:40 2017 (r313154) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include "opt_kstack_pages.h" #include "opt_maxmem.h" #include "opt_mp_watchdog.h" -#include "opt_npx.h" #include "opt_perfmon.h" #include "opt_platform.h" #include "opt_xbox.h" @@ -162,10 +161,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthr extern register_t init386(int first); extern void dblfault_handler(void); -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - static void cpu_startup(void *); static void fpstate_drop(struct thread *td); static void get_fpcontext(struct thread *td, mcontext_t *mcp, @@ -621,14 +616,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs = td->td_frame; oonstack = sigonstack(regs->tf_esp); -#ifdef CPU_ENABLE_SSE if (cpu_max_ext_state_size > sizeof(union savefpu) && use_xsave) { xfpusave_len = cpu_max_ext_state_size - sizeof(union savefpu); xfpusave = __builtin_alloca(xfpusave_len); } else { -#else - { -#endif xfpusave_len = 0; xfpusave = NULL; } @@ -2169,9 +2160,7 @@ init386(int first) struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; struct pcpu *pc; -#ifdef CPU_ENABLE_SSE struct xstate_hdr *xhdr; -#endif int late_console; thread0.td_kstack = proc0kstack; @@ -2424,9 +2413,7 @@ init386(int first) i386_kdb_init(); msgbufinit(msgbufp, msgbufsize); -#ifdef DEV_NPX npxinit(true); -#endif /* * Set up thread0 pcb after npxinit calculated pcb + fpu save * area size. Zero out the extended state header in fpu save @@ -2434,13 +2421,11 @@ init386(int first) */ thread0.td_pcb = get_pcb_td(&thread0); bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size); -#ifdef CPU_ENABLE_SSE if (use_xsave) { xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) + 1); xhdr->xstate_bv = xsave_mask; } -#endif PCPU_SET(curpcb, thread0.td_pcb); /* Move esp0 in the tss to its final place. */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ @@ -2707,17 +2692,11 @@ fill_fpregs(struct thread *td, struct fp KASSERT(td == curthread || TD_IS_SUSPENDED(td) || P_SHOULDSTOP(td->td_proc), ("not suspended thread %p", td)); -#ifdef DEV_NPX npxgetregs(td); -#else - bzero(fpregs, sizeof(*fpregs)); -#endif -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) npx_fill_fpregs_xmm(&get_pcb_user_save_td(td)->sv_xmm, (struct save87 *)fpregs); else -#endif /* CPU_ENABLE_SSE */ bcopy(&get_pcb_user_save_td(td)->sv_87, fpregs, sizeof(*fpregs)); return (0); @@ -2727,17 +2706,13 @@ int set_fpregs(struct thread *td, struct fpreg *fpregs) { -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) npx_set_fpregs_xmm((struct save87 *)fpregs, &get_pcb_user_save_td(td)->sv_xmm); else -#endif /* CPU_ENABLE_SSE */ bcopy(fpregs, &get_pcb_user_save_td(td)->sv_87, sizeof(*fpregs)); -#ifdef DEV_NPX npxuserinited(td); -#endif return (0); } @@ -2846,20 +2821,12 @@ static void get_fpcontext(struct thread *td, mcontext_t *mcp, char *xfpusave, size_t xfpusave_len) { -#ifdef CPU_ENABLE_SSE size_t max_len, len; -#endif -#ifndef DEV_NPX - mcp->mc_fpformat = _MC_FPFMT_NODEV; - mcp->mc_ownedfp = _MC_FPOWNED_NONE; - bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); -#else mcp->mc_ownedfp = npxgetregs(td); bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate[0], sizeof(mcp->mc_fpstate)); mcp->mc_fpformat = npxformat(); -#ifdef CPU_ENABLE_SSE if (!use_xsave || xfpusave_len == 0) return; max_len = cpu_max_ext_state_size - sizeof(union savefpu); @@ -2871,8 +2838,6 @@ get_fpcontext(struct thread *td, mcontex mcp->mc_flags |= _MC_HASFPXSTATE; mcp->mc_xfpustate_len = len; bcopy(get_pcb_user_save_td(td) + 1, xfpusave, len); -#endif -#endif } static int @@ -2893,16 +2858,10 @@ set_fpcontext(struct thread *td, mcontex error = 0; } else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || mcp->mc_ownedfp == _MC_FPOWNED_PCB) { -#ifdef DEV_NPX fpstate = (union savefpu *)&mcp->mc_fpstate; -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) fpstate->sv_xmm.sv_env.en_mxcsr &= cpu_mxcsr_mask; -#endif error = npxsetregs(td, fpstate, xfpustate, xfpustate_len); -#else - error = EINVAL; -#endif } else return (EINVAL); return (error); @@ -2914,10 +2873,8 @@ fpstate_drop(struct thread *td) KASSERT(PCB_USER_FPU(td->td_pcb), ("fpstate_drop: kernel-owned fpu")); critical_enter(); -#ifdef DEV_NPX if (PCPU_GET(fpcurthread) == td) npxdrop(); -#endif /* * XXX force a full drop of the npx. The above only drops it if we * owned it. npxgetregs() has the same bug in the !cpu_fxsr case. Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/mp_machdep.c Fri Feb 3 12:51:40 2017 (r313154) @@ -41,9 +41,6 @@ __FBSDID("$FreeBSD$"); #ifndef DEV_APIC #error The apic device is required for SMP, add "device apic" to your config file. #endif -#if defined(CPU_DISABLE_CMPXCHG) && !defined(COMPILING_LINT) -#error SMP not supported with CPU_DISABLE_CMPXCHG -#endif #endif /* not lint */ #include Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/pmap.c Fri Feb 3 12:51:40 2017 (r313154) @@ -152,10 +152,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - #ifndef PMAP_SHPGPERPROC #define PMAP_SHPGPERPROC 200 #endif @@ -4217,11 +4213,9 @@ pagezero(void *page) { #if defined(I686_CPU) if (cpu_class == CPUCLASS_686) { -#if defined(CPU_ENABLE_SSE) if (cpu_feature & CPUID_SSE2) sse2_pagezero(page); else -#endif i686_pagezero(page); } else #endif Modified: head/sys/i386/i386/ptrace_machdep.c ============================================================================== --- head/sys/i386/i386/ptrace_machdep.c Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/ptrace_machdep.c Fri Feb 3 12:51:40 2017 (r313154) @@ -39,11 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - -#ifdef CPU_ENABLE_SSE static int cpu_ptrace_xstate(struct thread *td, int req, void *addr, int data) { @@ -114,12 +109,10 @@ cpu_ptrace_xstate(struct thread *td, int return (error); } -#endif static int cpu_ptrace_xmm(struct thread *td, int req, void *addr, int data) { -#ifdef CPU_ENABLE_SSE struct savexmm *fpstate; int error; @@ -152,9 +145,6 @@ cpu_ptrace_xmm(struct thread *td, int re } return (error); -#else - return (EINVAL); -#endif } int Modified: head/sys/i386/i386/support.s ============================================================================== --- head/sys/i386/i386/support.s Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/support.s Fri Feb 3 12:51:40 2017 (r313154) @@ -29,8 +29,6 @@ * $FreeBSD$ */ -#include "opt_npx.h" - #include #include #include Modified: head/sys/i386/i386/swtch.s ============================================================================== --- head/sys/i386/i386/swtch.s Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/swtch.s Fri Feb 3 12:51:40 2017 (r313154) @@ -32,7 +32,6 @@ * $FreeBSD$ */ -#include "opt_npx.h" #include "opt_sched.h" #include @@ -150,7 +149,6 @@ ENTRY(cpu_switch) movl %eax,PCB_DR0(%edx) 1: -#ifdef DEV_NPX /* have we used fp, and need a save? */ cmpl %ecx,PCPU(FPCURTHREAD) jne 1f @@ -158,7 +156,6 @@ ENTRY(cpu_switch) call npxsave /* do it in a big C function */ popl %eax 1: -#endif /* Save is done. Now fire up new thread. Leave old vmspace. */ movl 4(%esp),%edi Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/trap.c Fri Feb 3 12:51:40 2017 (r313154) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" #include "opt_isa.h" #include "opt_kdb.h" -#include "opt_npx.h" #include "opt_stack.h" #include "opt_trap.h" @@ -335,13 +334,9 @@ user_trctrap_out: break; case T_ARITHTRAP: /* arithmetic trap */ -#ifdef DEV_NPX ucode = npxtrap_x87(); if (ucode == -1) goto userout; -#else - ucode = 0; -#endif i = SIGFPE; break; @@ -475,13 +470,11 @@ user_trctrap_out: break; case T_DNA: -#ifdef DEV_NPX KASSERT(PCB_USER_FPU(td->td_pcb), ("kernel FPU ctx has leaked")); /* transparent fault (due to context switch "late") */ if (npxdna()) goto userout; -#endif uprintf("pid %d killed due to lack of floating point\n", p->p_pid); i = SIGKILL; @@ -494,13 +487,9 @@ user_trctrap_out: break; case T_XMMFLT: /* SIMD floating-point exception */ -#if defined(DEV_NPX) && !defined(CPU_DISABLE_SSE) && defined(I686_CPU) ucode = npxtrap_sse(); if (ucode == -1) goto userout; -#else - ucode = 0; -#endif i = SIGFPE; break; #ifdef KDTRACE_HOOKS @@ -524,12 +513,10 @@ user_trctrap_out: goto out; case T_DNA: -#ifdef DEV_NPX if (PCB_USER_FPU(td->td_pcb)) panic("Unregistered use of FPU in kernel"); if (npxdna()) goto out; -#endif break; case T_ARITHTRAP: /* arithmetic trap */ Modified: head/sys/i386/i386/vm86bios.s ============================================================================== --- head/sys/i386/i386/vm86bios.s Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/vm86bios.s Fri Feb 3 12:51:40 2017 (r313154) @@ -26,8 +26,6 @@ * $FreeBSD$ */ -#include "opt_npx.h" - #include /* miscellaneous asm macros */ #include @@ -63,7 +61,6 @@ ENTRY(vm86_bioscall) pushl %edi pushl %gs -#ifdef DEV_NPX pushfl cli movl PCPU(CURTHREAD),%ecx @@ -77,7 +74,6 @@ ENTRY(vm86_bioscall) popl %edx /* recover our pcb */ 1: popfl -#endif movl SCR_VMFRAME(%edx),%ebx /* target frame location */ movl %ebx,%edi /* destination */ Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/i386/vm_machdep.c Fri Feb 3 12:51:40 2017 (r313154) @@ -99,10 +99,6 @@ __FBSDID("$FreeBSD$"); #define NSFBUFS (512 + maxusers * 16) #endif -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - _Static_assert(OFFSETOF_CURTHREAD == offsetof(struct pcpu, pc_curthread), "OFFSETOF_CURTHREAD does not correspond with offset of pc_curthread."); _Static_assert(OFFSETOF_CURPCB == offsetof(struct pcpu, pc_curpcb), @@ -152,18 +148,14 @@ void * alloc_fpusave(int flags) { void *res; -#ifdef CPU_ENABLE_SSE struct savefpu_ymm *sf; -#endif res = malloc(cpu_max_ext_state_size, M_DEVBUF, flags); -#ifdef CPU_ENABLE_SSE if (use_xsave) { sf = (struct savefpu_ymm *)res; bzero(&sf->sv_xstate.sx_hd, sizeof(sf->sv_xstate.sx_hd)); sf->sv_xstate.sx_hd.xstate_bv = xsave_mask; } -#endif return (res); } /* @@ -203,12 +195,10 @@ cpu_fork(struct thread *td1, struct proc /* Ensure that td1's pcb is up to date. */ if (td1 == curthread) td1->td_pcb->pcb_gs = rgs(); -#ifdef DEV_NPX critical_enter(); if (PCPU_GET(fpcurthread) == td1) npxsave(td1->td_pcb->pcb_save); critical_exit(); -#endif /* Point the pcb to the top of the stack */ pcb2 = get_pcb_td(td2); @@ -346,12 +336,10 @@ void cpu_thread_exit(struct thread *td) { -#ifdef DEV_NPX critical_enter(); if (td == PCPU_GET(fpcurthread)) npxdrop(); critical_exit(); -#endif /* Disable any hardware breakpoints. */ if (td->td_pcb->pcb_flags & PCB_DBREGS) { @@ -392,21 +380,17 @@ void cpu_thread_alloc(struct thread *td) { struct pcb *pcb; -#ifdef CPU_ENABLE_SSE struct xstate_hdr *xhdr; -#endif td->td_pcb = pcb = get_pcb_td(td); td->td_frame = (struct trapframe *)((caddr_t)pcb - 16) - 1; pcb->pcb_ext = NULL; pcb->pcb_save = get_pcb_user_save_pcb(pcb); -#ifdef CPU_ENABLE_SSE if (use_xsave) { xhdr = (struct xstate_hdr *)(pcb->pcb_save + 1); bzero(xhdr, sizeof(*xhdr)); xhdr->xstate_bv = xsave_mask; } -#endif } void Modified: head/sys/i386/include/atomic.h ============================================================================== --- head/sys/i386/include/atomic.h Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/include/atomic.h Fri Feb 3 12:51:40 2017 (r313154) @@ -170,33 +170,6 @@ struct __hack * Returns 0 on failure, non-zero on success */ -#ifdef CPU_DISABLE_CMPXCHG - -static __inline int -atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) -{ - u_char res; - - __asm __volatile( - " pushfl ; " - " cli ; " - " cmpl %3,%1 ; " - " jne 1f ; " - " movl %2,%1 ; " - "1: " - " sete %0 ; " - " popfl ; " - "# atomic_cmpset_int" - : "=q" (res), /* 0 */ - "+m" (*dst) /* 1 */ - : "r" (src), /* 2 */ - "r" (expect) /* 3 */ - : "memory"); - return (res); -} - -#else /* !CPU_DISABLE_CMPXCHG */ - static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { @@ -233,8 +206,6 @@ atomic_fcmpset_int(volatile u_int *dst, return (res); } -#endif /* CPU_DISABLE_CMPXCHG */ - /* * Atomically add the value of v to the integer pointed to by p and return * the previous value of *p. Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Fri Feb 3 12:48:44 2017 (r313153) +++ head/sys/i386/isa/npx.c Fri Feb 3 12:51:40 2017 (r313154) @@ -74,10 +74,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) -#define CPU_ENABLE_SSE -#endif - /* * 387 and 287 Numeric Coprocessor Extension (NPX) Driver. */ @@ -93,7 +89,6 @@ __FBSDID("$FreeBSD$"); #define fp_divide_by_0() __asm __volatile( \ "fldz; fld1; fdiv %st,%st(1); fnop") #define frstor(addr) __asm __volatile("frstor %0" : : "m" (*(addr))) -#ifdef CPU_ENABLE_SSE #define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) #define ldmxcsr(csr) __asm __volatile("ldmxcsr %0" : : "m" (csr)) @@ -130,7 +125,6 @@ xsaveopt(char *addr, uint64_t mask) __asm __volatile("xsaveopt %0" : "=m" (*addr) : "a" (low), "d" (hi) : "memory"); } -#endif #else /* !(__GNUCLIKE_ASM && !lint) */ void fldcw(u_short cw); @@ -141,7 +135,6 @@ void fnstcw(caddr_t addr); void fnstsw(caddr_t addr); void fp_divide_by_0(void); void frstor(caddr_t addr); -#ifdef CPU_ENABLE_SSE void fxsave(caddr_t addr); void fxrstor(caddr_t addr); void ldmxcsr(u_int csr); @@ -149,14 +142,12 @@ void stmxcsr(u_int *csr); void xrstor(char *addr, uint64_t mask); void xsave(char *addr, uint64_t mask); void xsaveopt(char *addr, uint64_t mask); -#endif #endif /* __GNUCLIKE_ASM && !lint */ #define start_emulating() load_cr0(rcr0() | CR0_TS) #define stop_emulating() clts() -#ifdef CPU_ENABLE_SSE #define GET_FPU_CW(thread) \ (cpu_fxsr ? \ (thread)->td_pcb->pcb_save->sv_xmm.sv_env.en_cw : \ @@ -171,16 +162,7 @@ void xsaveopt(char *addr, uint64_t mask) else \ (savefpu)->sv_87.sv_env.en_cw = (value); \ } while (0) -#else /* CPU_ENABLE_SSE */ -#define GET_FPU_CW(thread) \ - (thread->td_pcb->pcb_save->sv_87.sv_env.en_cw) -#define GET_FPU_SW(thread) \ - (thread->td_pcb->pcb_save->sv_87.sv_env.en_sw) -#define SET_FPU_CW(savefpu, value) \ - (savefpu)->sv_87.sv_env.en_cw = (value) -#endif /* CPU_ENABLE_SSE */ -#ifdef CPU_ENABLE_SSE CTASSERT(sizeof(union savefpu) == 512); CTASSERT(sizeof(struct xstate_hdr) == 64); CTASSERT(sizeof(struct savefpu_ymm) == 832); @@ -200,7 +182,6 @@ CTASSERT(X86_XSTATE_XCR0_OFFSET >= offse X86_XSTATE_XCR0_OFFSET + sizeof(uint64_t) <= sizeof(struct savexmm)); static void fpu_clean_state(void); -#endif static void fpusave(union savefpu *); static void fpurstor(union savefpu *); @@ -210,21 +191,17 @@ int hw_float; SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, &hw_float, 0, "Floating point instructions executed in hardware"); -#ifdef CPU_ENABLE_SSE int use_xsave; uint64_t xsave_mask; -#endif static uma_zone_t fpu_save_area_zone; static union savefpu *npx_initialstate; -#ifdef CPU_ENABLE_SSE struct xsave_area_elm_descr { u_int offset; u_int size; } *xsave_area_desc; static int use_xsaveopt; -#endif static volatile u_int npx_traps_while_probing; @@ -332,7 +309,6 @@ cleanup: return (hw_float); } -#ifdef CPU_ENABLE_SSE /* * Enable XSAVE if supported and allowed by user. * Calculate the xsave_mask. @@ -368,7 +344,7 @@ npxinit_bsp1(void) if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) use_xsaveopt = 1; } -#endif + /* * Calculate the fpu save area size. @@ -376,7 +352,6 @@ npxinit_bsp1(void) static void npxinit_bsp2(void) { -#ifdef CPU_ENABLE_SSE u_int cp[4]; if (use_xsave) { @@ -389,7 +364,6 @@ npxinit_bsp2(void) do_cpuid(1, cp); cpu_feature2 = cp[2]; } else -#endif cpu_max_ext_state_size = sizeof(union savefpu); } @@ -401,25 +375,19 @@ npxinit(bool bsp) { static union savefpu dummy; register_t saveintr; -#ifdef CPU_ENABLE_SSE u_int mxcsr; -#endif u_short control; if (bsp) { if (!npx_probe()) return; -#ifdef CPU_ENABLE_SSE npxinit_bsp1(); -#endif } -#ifdef CPU_ENABLE_SSE if (use_xsave) { load_cr4(rcr4() | CR4_XSAVE); load_xcr(XCR0, xsave_mask); } -#endif /* * XCR0 shall be set up before CPU can report the save area size. @@ -436,20 +404,16 @@ npxinit(bool bsp) */ saveintr = intr_disable(); stop_emulating(); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) fninit(); else -#endif fnsave(&dummy); control = __INITIAL_NPXCW__; fldcw(control); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) { mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); } -#endif start_emulating(); intr_restore(saveintr); } @@ -463,9 +427,7 @@ static void npxinitstate(void *arg __unused) { register_t saveintr; -#ifdef CPU_ENABLE_SSE int cp[4], i, max_ext_n; -#endif if (!hw_float) return; @@ -476,7 +438,6 @@ npxinitstate(void *arg __unused) stop_emulating(); fpusave(npx_initialstate); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) { if (npx_initialstate->sv_xmm.sv_env.en_mxcsr_mask) cpu_mxcsr_mask = @@ -498,11 +459,9 @@ npxinitstate(void *arg __unused) bzero(npx_initialstate->sv_xmm.sv_xmm, sizeof(npx_initialstate->sv_xmm.sv_xmm)); } else -#endif bzero(npx_initialstate->sv_87.sv_ac, sizeof(npx_initialstate->sv_87.sv_ac)); -#ifdef CPU_ENABLE_SSE /* * Create a table describing the layout of the CPU Extended * Save Area. @@ -527,7 +486,6 @@ npxinitstate(void *arg __unused) xsave_area_desc[i].size = cp[0]; } } -#endif fpu_save_area_zone = uma_zcreate("FPU_save_area", cpu_max_ext_state_size, NULL, NULL, NULL, NULL, @@ -577,10 +535,8 @@ npxformat(void) if (!hw_float) return (_MC_FPFMT_NODEV); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) return (_MC_FPFMT_XMM); -#endif return (_MC_FPFMT_387); } @@ -801,7 +757,6 @@ npxtrap_x87(void) return (fpetable[status & ((~control & 0x3f) | 0x40)]); } -#ifdef CPU_ENABLE_SSE int npxtrap_sse(void) { @@ -821,7 +776,6 @@ npxtrap_sse(void) critical_exit(); return (fpetable[(mxcsr & (~mxcsr >> 7)) & 0x3f]); } -#endif /* * Implement device not available (DNA) exception @@ -860,10 +814,8 @@ npxdna(void) */ PCPU_SET(fpcurthread, curthread); -#ifdef CPU_ENABLE_SSE if (cpu_fxsr) fpu_clean_state(); -#endif if ((curpcb->pcb_flags & PCB_NPXINITDONE) == 0) { /* @@ -905,11 +857,9 @@ npxsave(addr) { stop_emulating(); -#ifdef CPU_ENABLE_SSE if (use_xsaveopt) xsaveopt((char *)addr, xsave_mask); else -#endif fpusave(addr); start_emulating(); PCPU_SET(fpcurthread, NULL); @@ -960,9 +910,7 @@ npxdrop(void) * Discard pending exceptions in the !cpu_fxsr case so that unmasked * ones don't cause a panic on the next frstor. */ -#ifdef CPU_ENABLE_SSE if (!cpu_fxsr) -#endif fnclex(); td = PCPU_GET(fpcurthread); @@ -982,11 +930,9 @@ int npxgetregs(struct thread *td) { struct pcb *pcb; -#ifdef CPU_ENABLE_SSE uint64_t *xstate_bv, bit; char *sa; int max_ext_n, i; -#endif int owned; if (!hw_float) @@ -1003,9 +949,7 @@ npxgetregs(struct thread *td) critical_enter(); if (td == PCPU_GET(fpcurthread)) { fpusave(get_pcb_user_save_pcb(pcb)); -#ifdef CPU_ENABLE_SSE if (!cpu_fxsr) -#endif /* * fnsave initializes the FPU and destroys whatever * context it contains. Make sure the FPU owner @@ -1017,7 +961,6 @@ npxgetregs(struct thread *td) owned = _MC_FPOWNED_PCB; } critical_exit(); -#ifdef CPU_ENABLE_SSE if (use_xsave) { /* * Handle partially saved state. @@ -1040,7 +983,6 @@ npxgetregs(struct thread *td) *xstate_bv |= bit; } } -#endif return (owned); } @@ -1055,7 +997,6 @@ npxuserinited(struct thread *td) pcb->pcb_flags |= PCB_NPXUSERINITDONE; } -#ifdef CPU_ENABLE_SSE int npxsetxstate(struct thread *td, char *xfpustate, size_t xfpustate_size) { @@ -1093,16 +1034,13 @@ npxsetxstate(struct thread *td, char *xf return (0); } -#endif int npxsetregs(struct thread *td, union savefpu *addr, char *xfpustate, size_t xfpustate_size) { struct pcb *pcb; -#ifdef CPU_ENABLE_SSE int error; -#endif if (!hw_float) return (ENXIO); @@ -1110,14 +1048,12 @@ npxsetregs(struct thread *td, union save pcb = td->td_pcb; critical_enter(); if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { -#ifdef CPU_ENABLE_SSE error = npxsetxstate(td, xfpustate, xfpustate_size); if (error != 0) { critical_exit(); return (error); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 3 13:01:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A20ACCDBBF; Fri, 3 Feb 2017 13:01:02 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4513D8FF; Fri, 3 Feb 2017 13:01:02 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13D11nR080960; Fri, 3 Feb 2017 13:01:01 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13D11xv080954; Fri, 3 Feb 2017 13:01:01 GMT (envelope-from des@FreeBSD.org) Message-Id: <201702031301.v13D11xv080954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 3 Feb 2017 13:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313156 - in vendor/ldns/dist: . compat contrib/DNS-LDNS contrib/DNS-LDNS/lib/DNS contrib/DNS-LDNS/lib/DNS/LDNS contrib/DNS-LDNS/t contrib/ldnsx contrib/python doc drill examples ldns m... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 13:01:02 -0000 Author: des Date: Fri Feb 3 13:01:00 2017 New Revision: 313156 URL: https://svnweb.freebsd.org/changeset/base/313156 Log: import ldns 1.7.0 Added: vendor/ldns/dist/contrib/DNS-LDNS/META.yml vendor/ldns/dist/m4/ax_config_feature.m4 vendor/ldns/dist/m4/ax_have_poll.m4 Modified: vendor/ldns/dist/Changelog vendor/ldns/dist/Makefile.in vendor/ldns/dist/README vendor/ldns/dist/README.git vendor/ldns/dist/aclocal.m4 vendor/ldns/dist/acx_nlnetlabs.m4 vendor/ldns/dist/buffer.c vendor/ldns/dist/compat/b64_pton.c vendor/ldns/dist/compat/malloc.c vendor/ldns/dist/compat/snprintf.c vendor/ldns/dist/config.guess vendor/ldns/dist/config.sub vendor/ldns/dist/configure vendor/ldns/dist/configure.ac vendor/ldns/dist/contrib/DNS-LDNS/Changes vendor/ldns/dist/contrib/DNS-LDNS/LDNS.xs vendor/ldns/dist/contrib/DNS-LDNS/Makefile.PL vendor/ldns/dist/contrib/DNS-LDNS/README vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecDataChain.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecName.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRSets.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRs.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecTrustTree.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecZone.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/GC.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/Key.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/KeyList.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/Packet.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RBNode.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RR.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/RRList.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/Resolver.pm vendor/ldns/dist/contrib/DNS-LDNS/lib/DNS/LDNS/Zone.pm vendor/ldns/dist/contrib/DNS-LDNS/t/dnssec_datachain.t vendor/ldns/dist/contrib/DNS-LDNS/t/rr.t vendor/ldns/dist/contrib/DNS-LDNS/typemap vendor/ldns/dist/contrib/ldnsx/ldnsx.py vendor/ldns/dist/contrib/python/Makefile vendor/ldns/dist/contrib/python/ldns.i vendor/ldns/dist/contrib/python/ldns_key.i vendor/ldns/dist/contrib/python/ldns_rdf.i vendor/ldns/dist/contrib/python/ldns_resolver.i vendor/ldns/dist/dane.c vendor/ldns/dist/dname.c vendor/ldns/dist/dnssec.c vendor/ldns/dist/dnssec_sign.c vendor/ldns/dist/dnssec_verify.c vendor/ldns/dist/dnssec_zone.c vendor/ldns/dist/doc/TODO vendor/ldns/dist/doc/doxyparse.pl vendor/ldns/dist/doc/function_manpages vendor/ldns/dist/doc/header.html vendor/ldns/dist/drill/chasetrace.c vendor/ldns/dist/drill/config.h.in vendor/ldns/dist/drill/configure vendor/ldns/dist/drill/configure.ac vendor/ldns/dist/drill/drill.1.in vendor/ldns/dist/drill/drill.c vendor/ldns/dist/drill/drill.h vendor/ldns/dist/drill/error.c vendor/ldns/dist/drill/securetrace.c vendor/ldns/dist/drill/work.c vendor/ldns/dist/duration.c vendor/ldns/dist/error.c vendor/ldns/dist/examples/config.h.in vendor/ldns/dist/examples/configure vendor/ldns/dist/examples/configure.ac vendor/ldns/dist/examples/ldns-compare-zones.1 vendor/ldns/dist/examples/ldns-compare-zones.c vendor/ldns/dist/examples/ldns-dane.1.in vendor/ldns/dist/examples/ldns-dane.c vendor/ldns/dist/examples/ldns-dpa.1 vendor/ldns/dist/examples/ldns-dpa.c vendor/ldns/dist/examples/ldns-gen-zone.1 vendor/ldns/dist/examples/ldns-gen-zone.c vendor/ldns/dist/examples/ldns-key2ds.1 vendor/ldns/dist/examples/ldns-key2ds.c vendor/ldns/dist/examples/ldns-keyfetcher.c vendor/ldns/dist/examples/ldns-keygen.1 vendor/ldns/dist/examples/ldns-keygen.c vendor/ldns/dist/examples/ldns-mx.c vendor/ldns/dist/examples/ldns-notify.1 vendor/ldns/dist/examples/ldns-notify.c vendor/ldns/dist/examples/ldns-read-zone.1 vendor/ldns/dist/examples/ldns-read-zone.c vendor/ldns/dist/examples/ldns-signzone.1 vendor/ldns/dist/examples/ldns-signzone.c vendor/ldns/dist/examples/ldns-test-edns.c vendor/ldns/dist/examples/ldns-testns.c vendor/ldns/dist/examples/ldns-testpkts.c vendor/ldns/dist/examples/ldns-update.1 vendor/ldns/dist/examples/ldns-update.c vendor/ldns/dist/examples/ldns-verify-zone.1.in vendor/ldns/dist/examples/ldns-verify-zone.c vendor/ldns/dist/examples/ldns-walk.c vendor/ldns/dist/examples/ldnsd.c vendor/ldns/dist/higher.c vendor/ldns/dist/host2str.c vendor/ldns/dist/host2wire.c vendor/ldns/dist/install-sh vendor/ldns/dist/keys.c vendor/ldns/dist/ldns/buffer.h vendor/ldns/dist/ldns/common.h.in vendor/ldns/dist/ldns/config.h.in vendor/ldns/dist/ldns/dane.h vendor/ldns/dist/ldns/dname.h vendor/ldns/dist/ldns/dnssec.h vendor/ldns/dist/ldns/dnssec_sign.h vendor/ldns/dist/ldns/dnssec_verify.h vendor/ldns/dist/ldns/dnssec_zone.h vendor/ldns/dist/ldns/duration.h vendor/ldns/dist/ldns/error.h vendor/ldns/dist/ldns/higher.h vendor/ldns/dist/ldns/host2str.h vendor/ldns/dist/ldns/host2wire.h vendor/ldns/dist/ldns/keys.h vendor/ldns/dist/ldns/net.h.in vendor/ldns/dist/ldns/packet.h vendor/ldns/dist/ldns/radix.h vendor/ldns/dist/ldns/rbtree.h vendor/ldns/dist/ldns/rdata.h vendor/ldns/dist/ldns/resolver.h vendor/ldns/dist/ldns/rr.h vendor/ldns/dist/ldns/str2host.h vendor/ldns/dist/ldns/tsig.h vendor/ldns/dist/ldns/update.h vendor/ldns/dist/ldns/util.h.in vendor/ldns/dist/ldns/wire2host.h vendor/ldns/dist/ldns/zone.h vendor/ldns/dist/libdns.doxygen vendor/ldns/dist/ltmain.sh vendor/ldns/dist/m4/libtool.m4 vendor/ldns/dist/m4/ltoptions.m4 vendor/ldns/dist/m4/ltsugar.m4 vendor/ldns/dist/m4/ltversion.m4 vendor/ldns/dist/m4/lt~obsolete.m4 vendor/ldns/dist/net.c vendor/ldns/dist/packaging/ldns-config.in vendor/ldns/dist/packet.c vendor/ldns/dist/parse.c vendor/ldns/dist/radix.c vendor/ldns/dist/rbtree.c vendor/ldns/dist/rdata.c vendor/ldns/dist/resolver.c vendor/ldns/dist/rr.c vendor/ldns/dist/rr_functions.c vendor/ldns/dist/str2host.c vendor/ldns/dist/tsig.c vendor/ldns/dist/update.c vendor/ldns/dist/util.c vendor/ldns/dist/wire2host.c vendor/ldns/dist/zone.c Modified: vendor/ldns/dist/Changelog ============================================================================== --- vendor/ldns/dist/Changelog Fri Feb 3 12:51:40 2017 (r313155) +++ vendor/ldns/dist/Changelog Fri Feb 3 13:01:00 2017 (r313156) @@ -1,3 +1,118 @@ +1.7.0 2016-12-20 + * Fix lookup of relative names in ldns_resolver_search. + * bugfix #548: Double free for answers > 4096 in ldns_resolver_send_pkt + * Follow CNAME's when tracing with drill (TODO dnssec trace) + * Fix #551 change Regent to Copyright holder in BSD license in + some of the headings of the file, to match the opensource.org + BSD license. + * -e option makes ldns-compare-zones exit with status code 2 on difference + * Filter out specified RR types with ldns-read-zone -e and -E options + * bugfix #563: Correct DNSKEY from DSA private key. Thanks Peter Koch. + * bugfix #562: ldns-keygen match DSA key maximum size with library. + And check keysizes with all algorithms. Thanks Peter Koch. + * ldns-verify-zone accepts only one single zonefile as argument. + * bugfix #573: ldns-keygen write private keys with mode 0600. + Thanks Leon Weber + * Fix configure to make ldns compile with LibreSSL 2.0 + * drill now also accepts dig style -y option + (-y <[algo:]name:key> i.s.o. -y ) + * OPENPGPKEY draft rr types. Enable with: --enable-rrtype-openpgpkey + * bugfix #608: Correct comment about escaped characters + * CDS and CDNSKEY rr type from RFC 7344. + --enable-rrtype-cds configure option removed + * fix: Memory leak in ldns_pkt_rr_list_by_name() + Thanks Johannes Naab + * fix: Memory leak in ldns_dname2buffer_wire_compress() + Thanks Max Liebkies + * bugfix #613: Allow tab as whitespace too in last rdata field of types + of variable length. Thanks Xiali Yan + * bugfix: strip trailing whitespace from $ORIGIN lines in zone files + * Let ldns-keygen output .ds files only for KSK keys + * Parse RFC7218 TLSA mnemonics, but do not output them + * Let ldns-dane use SPKI as the default selector i.s.o. Cert + * bugfix: Fit left over NSEC3s once more before adding empty non + terminals. Thanks Stuart Browne + * bugfix #605: Determine default trust anchor location at compile time + Thanks Peter Koch + * bugfix #697: Double free with ldns-dane create + Thanks Carsten Strotmann + * bugfix #623: Do not redefine bool type and boolean values + Thanks Jakob Petsovits + * bugfix #570: Add TLSA, CDS, CDNSKEY and OPENPGPKEY RR types to ldnsx + Thanks Shussain + * bugfix #575: ldns_pkt_clone() does not copy timestamp field + Thanks Calle Dybedahl + * bugfix #584: ldns-update fixes. Send update to port 53, bring manpage + in sync with the usage text, and don't alter the ldns_resolver passed + to ldns_update_soa_zone_mname(). Created a ldns_resolver_clone() + function in the process. Thanks Nicholas Riley. + * bugfix #633: ldns_pkt_clone() parameter isn't const. + Thanks Jakop Petsovits + * bugfix: ldns-dane manpage correction + Thanks Erwin Lansing + * Spelling fixes. Thanks Andreas Schulze + * Hyphen used as minus in manpages. Thanks Andreas Schulze. + * RFC7553 RR Type URI is supported by default. + * Fix ECDSA signature generation, do not omit leading zeroes. + * bugfix: Get rid of superfluous newline in ldns-keyfetcher + Thanks Jan-Piet Mens + * bugfix: -U option to ldns-signzone to sign with every algorithm + Thanks Guido Kroon + * const function parameters whenever possible. + Thanks Ray Bellis + * bugfix #725: allow RR-types on the type bitmap window border + Thanks Pieter Lexis + * bugfix #726: 2 typos in drill manpage. + Thanks Hugo Lombard + * Add type CSYNC support, RFC 7477. + * Prepare for ED25519, ED448 support: todo convert* routines in + dnssec.h, once openssl has support for signing with these algorithms. + The dns algorithm number is not yet allocated. These features are + not fully implemented yet, openssl (1.1) does not support the + algorithms enough to generate keys and sign and verify with them. + * Fix _answerfrom comment in ldns_struct_pkt. + * Fix drill axfr ipv4/ipv6 queries. + * Fix comment referring to mk_query in packet.h to pkt_query_new. + * Fix description of QR flag in packet.h. + * Fix for openssl 1.1.0 API changes. + * Remove commented out macro. Thanks Thiago Farina + * bugfix #641: Include install-sh in .gitignore + * bugfix #825: Module import breaks with newer SWIG versions. + Thanks Christoph Egger + * bugfix #796 - #792: Fix miscellaneous compiler warning issues. + Thanks Ngie Cooper + * bugfix #769: Add support for :: in an IPv6 address + Thanks Hajimu UMEMOTO + * bugfix #760: Detect superfluous text in presentation format + Thanks Xiali Yan + * bugfix #708: warnings and errors with xcode 6.1/7.0 + * bugfix #754: Memory leak in ldns_str2rdf_ipseckey + Thanks Xiali Yan + * bugfix #661: Fail NSEC3 signing when NSEC domainname length + would overflow. Thanks Jan-Piet Mens. + * bugfix #771: hmac-sha224, hmac-sha384 and hmac-sha512 keys. + Thanks Harald Jenny + * bugfix #680: ldns fails to reject invalidly formatted + RFC 7553 URI RRs. Thanks Robert Edmonds + * bugfix #678: Use poll i.s.o. select to support > 1024 fds + Thanks William King + * Use OpenSSL DANE functions for verification (unless explicitly + disabled with --disable-dane-ta-usage). + * Bumb .so version + * Include OPENPGPKEY RR type by default + * rdata processing for SMIMEA RR type + * Fix crash in displaying TLSA RR's. + Thanks Andreas Schulze + * Update ldns-key2ds man page to mention GOST and SHA384 hash + functions. Thanks Harald Jenny + * Add sha384 and sha512 tsig algorithm. Thanks Michael Weiser + * Clarify data ownership with consts for tsig parameters. + Thanks Michael Weiser + * bugfix: Fix detection of DSA support with OpenSSL >= 1.1.0 + * bugfix #1160: Provide sha256 for release tarballs + * --enable-gost-anyway compiles GOST support with OpenSSL >= 1.1.0 + even when the GOST engine is not available. + 1.6.17 2014-01-10 * Fix ldns_dnssec_zone_new_frm_fp_l to allow the last parsed line of a zone to be an NSEC3 (or its RRSIG) covering an empty non terminal. Modified: vendor/ldns/dist/Makefile.in ============================================================================== --- vendor/ldns/dist/Makefile.in Fri Feb 3 12:51:40 2017 (r313155) +++ vendor/ldns/dist/Makefile.in Fri Feb 3 13:01:00 2017 (r313156) @@ -12,6 +12,7 @@ datarootdir = @datarootdir@ datadir = @datadir@ libdir = @libdir@ includedir = @includedir@ +sysconfdir = @sysconfdir@ doxygen = @doxygen@ pywrapdir = $(srcdir)/contrib/python pyldnsxwrapdir = $(srcdir)/contrib/ldnsx @@ -27,13 +28,21 @@ pyldnsx_uninst = @PYLDNSXUNINST@ libtool = @libtool@ CONFIG_FILES = @CONFIG_FILES@ +LDNS_TRUST_ANCHOR_FILE = @LDNS_TRUST_ANCHOR_FILE@ +DEFAULT_CAFILE = @DEFAULT_CAFILE@ +DEFAULT_CAPATH = @DEFAULT_CAPATH@ + +edit = sed \ + -e 's|@LDNS_TRUST_ANCHOR_FILE[@]|$(LDNS_TRUST_ANCHOR_FILE)|g' \ + -e 's|@DEFAULT_CAFILE[@]|$(DEFAULT_CAFILE)|g' \ + -e 's|@DEFAULT_CAPATH[@]|$(DEFAULT_CAPATH)|g' + # override $U variable which is used by autotools for deansification (for # K&R C compilers), but causes problems if $U is defined in the env). U= - CC = @CC@ CFLAGS = @CFLAGS@ -CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@ @DEFS@ +CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@ @DEFS@ -DLDNS_TRUST_ANCHOR_FILE="\"$(LDNS_TRUST_ANCHOR_FILE)\"" LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ LIBOBJDIR = compat/ @@ -92,11 +101,10 @@ LDNS_DANE_LOBJS = examples/ldns-dane.lo EX_SSL_PROGS = examples/ldns-nsec3-hash examples/ldns-revoke examples/ldns-signzone examples/ldns-verify-zone EX_SSL_LOBJS = examples/ldns-nsec3-hash.lo examples/ldns-revoke.lo examples/ldns-signzone.lo examples/ldns-verify-zone.lo - COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) COMP_LIB = $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) LINK = $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -LINK_LIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -version-number $(version_info) -no-undefined +LINK_LIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -version-info $(version_info) -no-undefined LINK_EXE = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIBSSL_LDFLAGS) .PHONY: clean realclean docclean manpages doc lint all lib pyldns test @@ -129,7 +137,7 @@ putdown-builddir: if test -d drill -a ! -f drill/README ; then rmdir drill || : ; fi if test -d compat -a ! -f compat/malloc.c; then rmdir compat || : ; fi -drill: no-drill-config-h drill/drill +drill: no-drill-config-h drill/drill drill/drill.1 no-drill-config-h: @if test -e $(srcdir)/drill/config.h -o -e drill/config.h ; \ then echo "A config.h was detected in the drill subdirectory." ; \ @@ -138,10 +146,14 @@ no-drill-config-h: echo "or build drill there." ; \ exit -1 ; \ fi + drill/drill: $(DRILL_LOBJS) $(LIB) $(LINK_EXE) $(DRILL_LOBJS) $(LIBS) $(LIBSSL_LIBS) -lldns -o drill/drill -install-drill: drill/drill +drill/drill.1: $(srcdir)/drill/drill.1.in + $(edit) $(srcdir)/drill/drill.1.in > drill/drill.1 + +install-drill: drill/drill drill/drill.1 $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 @@ -154,9 +166,9 @@ uninstall-drill: test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-drill: - $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill + $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill drill/drill.1 -examples: no-examples-config-h $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) +examples: no-examples-config-h $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1 no-examples-config-h: @if test -e $(srcdir)/examples/config.h -o -e examples/config.h ; \ then echo "A config.h was detected in the examples subdirectory." ; \ @@ -165,6 +177,7 @@ no-examples-config-h: echo "or build examples there." ; \ exit -1 ; \ fi + $(EXAMPLE_PROGS): $(LINK_EXE) $@.lo $(LIBS) -lldns -o $@ @@ -182,7 +195,13 @@ $(LDNS_DANE): $(EX_SSL_PROGS): $(LINK_EXE) $@.lo $(LIBS) $(LIBSSL_LIBS) -lldns -o $@ -install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) +examples/ldns-dane.1: $(srcdir)/examples/ldns-dane.1.in + $(edit) $(srcdir)/examples/ldns-dane.1.in > examples/ldns-dane.1 + +examples/ldns-verify-zone.1: $(srcdir)/examples/ldns-verify-zone.1.in + $(edit) $(srcdir)/examples/ldns-verify-zone.1.in > examples/ldns-verify-zone.1 + +install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1 $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 @@ -205,6 +224,7 @@ clean-examples: $(LIBTOOL) --mode clean rm -f $(EXAMPLE_PROGS) $(LIBTOOL) --mode clean rm -f $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) $(LIBTOOL) --mode clean rm -f $(EXAMPLE_LOBJS) + $(LIBTOOL) --mode clean rm -f examples/ldns-dane.1 examples/ldns-verify-zone.1 linktest: $(srcdir)/linktest.c libldns.la $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/linktest.c -o linktest.lo @@ -224,7 +244,7 @@ mancheck: sh -c 'find . -name \*.\[13\] -exec troff -z {} \;' 2>&1 | sed "s/^\.\///" | sed "s/\(:[0\-9]\+:\)/\1 warning:/g" doxygen: manpages - if test ! -e doc/header.html ; then \ + @if test ! -e doc/header.html ; then \ $(INSTALL) -c -m 644 $(srcdir)/doc/header.html doc/ ; \ fi ; $(doxygen) $(srcdir)/libdns.doxygen @@ -236,22 +256,40 @@ manpages: $(srcdir)/doc/function_manpage @$(INSTALL) -d doc @cat $(srcdir)/ldns/*.h \ | $(srcdir)/doc/doxyparse.pl \ - -m $(srcdir)/doc/function_manpages 2>&1 \ + -m $(srcdir)/doc/function_manpages \ | grep -v ^doxygen | grep -v ^cat > doc/ldns_manpages +manpage-create-errors: $(srcdir)/doc/function_manpages + @$(INSTALL) -d doc + @cat $(srcdir)/ldns/*.h \ + | $(srcdir)/doc/doxyparse.pl -e \ + -m $(srcdir)/doc/function_manpages >/dev/null + +manpage-errors: + @man --version >/dev/null 2>&1 && \ + for m in `cat $(srcdir)/ldns/*.h | $(srcdir)/doc/doxyparse.pl -m $(srcdir)/doc/function_manpages 2>&1 | grep -v ^doxygen | grep -v ^cat` ; do\ + LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 \ + man --warnings -E UTF-8 -l -Tutf8 -Z doc/man/man3/$${m}.3 2>&1 >/dev/null \ + | awk "-vpage=$${m}.3" '{printf("%s: ", page);print}'; \ + if ! lexgrog doc/man/man3/$${m}.3 >/dev/null 2>&1 ; \ + then \ + echo doc/man/man3/$${m}.3: manpage-has-bad-whatis-entry; \ + fi; \ + done || echo "WARNING!: Cannot detect manpage errors on `uname`" + pyldns: _ldns.la $(pywrapdir)/ldns_wrapper.c: $(PYLDNS_I_FILES) ldns/config.h - $(swig) $(swigpy_flags) -o $@ $(CPPFLAGS) $(PYTHON_CPPFLAGS) $(pywrapdir)/ldns.i + $(swig) $(swigpy_flags) -o $@ $(PYTHON_CPPFLAGS) $(pywrapdir)/ldns.i ldns_wrapper.lo: $(pywrapdir)/ldns_wrapper.c ldns/config.h - $(COMP_LIB) -I./include/ldns $(PYTHON_CPPFLAGS) $(PYTHON_X_CFLAGS) -c $(pywrapdir)/ldns_wrapper.c -o $@ + $(COMP_LIB) -I./include/ldns $(LIBSSL_CPPFLAGS) $(PYTHON_CPPFLAGS) $(PYTHON_X_CFLAGS) -c $(pywrapdir)/ldns_wrapper.c -o $@ _ldns.la: ldns_wrapper.lo libldns.la - $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(PYTHON_CFLAGS) $(LDFLAGS) $(PYTHON_LDFLAGS) -module -version-number $(version_info) -no-undefined -o $@ ldns_wrapper.lo -rpath $(python_site) -L. -L.libs -lldns $(LIBS) + $(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(PYTHON_CFLAGS) $(LDFLAGS) $(PYTHON_LDFLAGS) -module -version-info $(version_info) -no-undefined -o $@ ldns_wrapper.lo -rpath $(python_site) -L. -L.libs -lldns $(LIBS) $(p5_dns_ldns_dir)/Makefile: $(p5_dns_ldns_dir)/Makefile.PL - BUILDDIR=`pwd`; cd $(p5_dns_ldns_dir); $(PERL) Makefile.PL PREFIX="$(prefix)" LIBS="-L$$BUILDDIR/.libs -lldns" INC="-I$$BUILDDIR" + BUILDDIR=`pwd`; cd $(p5_dns_ldns_dir); LD_LIBRARY_PATH="$$BUILDDIR/.libs:$$LD_LIBRARY_PATH" DYLD_LIBRARY_PATH="$$BUILDDIR/.libs:$$DYLD_LIBRARY_PATH" $(PERL) Makefile.PL LIBS="-L$$BUILDDIR/.libs -lldns" INC="-I$$BUILDDIR" $(p5_dns_ldns_dir)/blib/arch/auto/DNS/LDNS/LDNS.so: $(p5_dns_ldns_dir)/Makefile cd $(p5_dns_ldns_dir); $(MAKE) Modified: vendor/ldns/dist/README ============================================================================== --- vendor/ldns/dist/README Fri Feb 3 12:51:40 2017 (r313155) +++ vendor/ldns/dist/README Fri Feb 3 13:01:00 2017 (r313156) @@ -42,7 +42,9 @@ INSTALLATION If you are building from the repository you will need to have (gnu) autotools like libtool and autoreconf installed. A list of all the commands needed to build everything can be found in README.git. Note that the actual -commands may be a little bit different on your machine. Most notable, you'll need to run libtoolize (or glibtoolize), if you skip this step, you'll get an error about missing config.sub. +commands may be a little bit different on your machine. Most notably, you'll +need to run libtoolize (or glibtoolize). If you skip this step, you'll get +an error about missing config.sub. * Developers ldns is developed by the ldns team at NLnet Labs. This team currently @@ -85,7 +87,7 @@ for more information. SOLARIS -In Solaris multi-architecture systems (that have both 32-bit and +In Solaris multi-architecture systems (which have both 32-bit and 64-bit support), it can be a bit taxing to convince the system to compile in 64-bit mode. Jakob Schlyter has kindly contributed a build script that sets the right build and link options. You can find it in @@ -99,13 +101,13 @@ http://www.nlnetlabs.nl/projects/ldns/bu * pyldns Compiling pyldns produces many ``unused parameter'' warnings. Those are harmless and may safely be ignored. -Also when building with Swig which version is before 2.0.4, compiling +Also, when building with SWIG older than 2.0.4, compiling pyldns produces many ``missing initializer'' warnings. Those are harmless too. Your Support -NLnet Labs offers all of its software products as open source, most are -published under a BDS license. You can download them, not only from the +NLnet Labs offers all of its software products as open source, most +published under a BSD license. You can download them, not only from the NLnet Labs website but also through the various OS distributions for which NSD, ldns, and Unbound are packaged. We therefore have little idea who uses our software in production environments and have no direct ties Modified: vendor/ldns/dist/README.git ============================================================================== --- vendor/ldns/dist/README.git Fri Feb 3 12:51:40 2017 (r313155) +++ vendor/ldns/dist/README.git Fri Feb 3 13:01:00 2017 (r313156) @@ -13,8 +13,9 @@ # older versions of libtoolize do not support --install # so you might need to remove that (with newer versions # it is needed) -libtoolize -c --install -autoreconf --install +git submodule update --init +libtoolize -ci +autoreconf -fi ./configure --with-examples --with-drill # --with-pyldns --with-p5-dns-ldns make make doc # needs doxygen for the html pages Modified: vendor/ldns/dist/aclocal.m4 ============================================================================== --- vendor/ldns/dist/aclocal.m4 Fri Feb 3 12:51:40 2017 (r313155) +++ vendor/ldns/dist/aclocal.m4 Fri Feb 3 13:01:00 2017 (r313156) @@ -1,8 +1,7 @@ -# generated automatically by aclocal 1.11.3 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,8609 +11,11 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 3 13:01:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16357CCDC25; Fri, 3 Feb 2017 13:01:35 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF08DA72; Fri, 3 Feb 2017 13:01:34 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13D1X2W081036; Fri, 3 Feb 2017 13:01:33 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13D1XA4081035; Fri, 3 Feb 2017 13:01:33 GMT (envelope-from des@FreeBSD.org) Message-Id: <201702031301.v13D1XA4081035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 3 Feb 2017 13:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313157 - vendor/ldns/1.7.0 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 13:01:35 -0000 Author: des Date: Fri Feb 3 13:01:33 2017 New Revision: 313157 URL: https://svnweb.freebsd.org/changeset/base/313157 Log: tag ldns 1.7.0 Added: vendor/ldns/1.7.0/ - copied from r313156, vendor/ldns/dist/ From owner-svn-src-all@freebsd.org Fri Feb 3 13:06:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDFD6CCDDC5; Fri, 3 Feb 2017 13:06:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92477D4F; Fri, 3 Feb 2017 13:06:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13D6ZA1084408; Fri, 3 Feb 2017 13:06:35 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13D6Y8i084393; Fri, 3 Feb 2017 13:06:34 GMT (envelope-from des@FreeBSD.org) Message-Id: <201702031306.v13D6Y8i084393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 3 Feb 2017 13:06:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313158 - in vendor/unbound/dist: . cachedb contrib daemon dns64 doc iterator libunbound libunbound/python/doc libunbound/python/doc/examples pythonmod pythonmod/doc pythonmod/doc/examp... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 13:06:37 -0000 Author: des Date: Fri Feb 3 13:06:34 2017 New Revision: 313158 URL: https://svnweb.freebsd.org/changeset/base/313158 Log: import unbound 1.6.0 Added: vendor/unbound/dist/.gitattributes vendor/unbound/dist/doc/CNAME-basedRedirectionDesignNotes.pdf (contents, props changed) vendor/unbound/dist/pythonmod/doc/examples/example5.rst vendor/unbound/dist/pythonmod/doc/examples/example6.rst vendor/unbound/dist/pythonmod/examples/edns.py vendor/unbound/dist/pythonmod/examples/inplace_callbacks.py vendor/unbound/dist/pythonmod/test-edns.conf vendor/unbound/dist/pythonmod/test-inplace_callbacks.py vendor/unbound/dist/services/view.c vendor/unbound/dist/services/view.h vendor/unbound/dist/testdata/local_cname.rpl vendor/unbound/dist/testdata/stop_nxdomain_minimised.rpl vendor/unbound/dist/testdata/views.rpl Modified: vendor/unbound/dist/Makefile.in vendor/unbound/dist/cachedb/cachedb.c vendor/unbound/dist/config.h.in vendor/unbound/dist/configure vendor/unbound/dist/configure.ac vendor/unbound/dist/contrib/libunbound.pc.in vendor/unbound/dist/contrib/unbound_munin_ vendor/unbound/dist/daemon/acl_list.c vendor/unbound/dist/daemon/acl_list.h vendor/unbound/dist/daemon/cachedump.c vendor/unbound/dist/daemon/daemon.c vendor/unbound/dist/daemon/daemon.h vendor/unbound/dist/daemon/remote.c vendor/unbound/dist/daemon/stats.c vendor/unbound/dist/daemon/stats.h vendor/unbound/dist/daemon/unbound.c vendor/unbound/dist/daemon/worker.c vendor/unbound/dist/daemon/worker.h vendor/unbound/dist/dns64/dns64.c vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/README vendor/unbound/dist/doc/example.conf.in vendor/unbound/dist/doc/libunbound.3.in vendor/unbound/dist/doc/unbound-anchor.8.in vendor/unbound/dist/doc/unbound-checkconf.8.in vendor/unbound/dist/doc/unbound-control.8.in vendor/unbound/dist/doc/unbound-host.1.in vendor/unbound/dist/doc/unbound.8.in vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/iterator/iter_delegpt.c vendor/unbound/dist/iterator/iter_delegpt.h vendor/unbound/dist/iterator/iter_fwd.c vendor/unbound/dist/iterator/iter_hints.c vendor/unbound/dist/iterator/iter_utils.c vendor/unbound/dist/iterator/iterator.c vendor/unbound/dist/libunbound/context.c vendor/unbound/dist/libunbound/libunbound.c vendor/unbound/dist/libunbound/libworker.c vendor/unbound/dist/libunbound/libworker.h vendor/unbound/dist/libunbound/python/doc/conf.py vendor/unbound/dist/libunbound/python/doc/examples/example1a.rst vendor/unbound/dist/libunbound/python/doc/examples/example1b.rst vendor/unbound/dist/libunbound/python/doc/examples/example2.rst vendor/unbound/dist/libunbound/python/doc/examples/example3.rst vendor/unbound/dist/libunbound/python/doc/examples/example4.rst vendor/unbound/dist/libunbound/python/doc/examples/example5.rst vendor/unbound/dist/libunbound/python/doc/examples/example6.rst vendor/unbound/dist/libunbound/python/doc/examples/example7.rst vendor/unbound/dist/libunbound/python/doc/examples/example8.rst vendor/unbound/dist/libunbound/python/doc/examples/index.rst vendor/unbound/dist/libunbound/python/doc/install.rst vendor/unbound/dist/libunbound/python/doc/intro.rst vendor/unbound/dist/libunbound/worker.h vendor/unbound/dist/pythonmod/doc/conf.py vendor/unbound/dist/pythonmod/doc/examples/example1.rst vendor/unbound/dist/pythonmod/doc/examples/example2.rst vendor/unbound/dist/pythonmod/doc/examples/example4.rst vendor/unbound/dist/pythonmod/doc/examples/index.rst vendor/unbound/dist/pythonmod/doc/install.rst vendor/unbound/dist/pythonmod/doc/modules/functions.rst vendor/unbound/dist/pythonmod/doc/modules/struct.rst vendor/unbound/dist/pythonmod/interface.i vendor/unbound/dist/pythonmod/pythonmod.c vendor/unbound/dist/pythonmod/pythonmod.h vendor/unbound/dist/services/cache/dns.c vendor/unbound/dist/services/localzone.c vendor/unbound/dist/services/localzone.h vendor/unbound/dist/services/mesh.c vendor/unbound/dist/services/mesh.h vendor/unbound/dist/services/outside_network.c vendor/unbound/dist/services/outside_network.h vendor/unbound/dist/sldns/str2wire.c vendor/unbound/dist/sldns/wire2str.c vendor/unbound/dist/smallapp/unbound-anchor.c vendor/unbound/dist/smallapp/unbound-checkconf.c vendor/unbound/dist/smallapp/unbound-control.c vendor/unbound/dist/smallapp/worker_cb.c vendor/unbound/dist/testcode/asynclook.c vendor/unbound/dist/testcode/fake_event.c vendor/unbound/dist/testcode/memstats.c vendor/unbound/dist/testcode/perf.c vendor/unbound/dist/testcode/streamtcp.c vendor/unbound/dist/testdata/04-checkconf.tpkg vendor/unbound/dist/testdata/09-unbound-control.tpkg vendor/unbound/dist/testdata/val_cnamewctonodata.rpl vendor/unbound/dist/testdata/val_ds_sha2.crpl vendor/unbound/dist/testdata/val_ds_sha2_downgrade.crpl vendor/unbound/dist/testdata/val_nodata_failsig.rpl vendor/unbound/dist/testdata/val_nsec3_wcany.rpl vendor/unbound/dist/testdata/val_nsec3_wcany_nodeny.rpl vendor/unbound/dist/util/config_file.c vendor/unbound/dist/util/config_file.h vendor/unbound/dist/util/configlexer.c vendor/unbound/dist/util/configlexer.lex vendor/unbound/dist/util/configparser.c vendor/unbound/dist/util/configparser.h vendor/unbound/dist/util/configparser.y vendor/unbound/dist/util/data/msgencode.c vendor/unbound/dist/util/data/msgparse.c vendor/unbound/dist/util/data/msgparse.h vendor/unbound/dist/util/data/msgreply.c vendor/unbound/dist/util/data/msgreply.h vendor/unbound/dist/util/fptr_wlist.c vendor/unbound/dist/util/fptr_wlist.h vendor/unbound/dist/util/iana_ports.inc vendor/unbound/dist/util/module.c vendor/unbound/dist/util/module.h vendor/unbound/dist/validator/autotrust.c vendor/unbound/dist/validator/val_neg.c vendor/unbound/dist/validator/val_nsec.c vendor/unbound/dist/validator/val_nsec3.c vendor/unbound/dist/validator/val_secalgo.c vendor/unbound/dist/validator/val_sigcrypt.c vendor/unbound/dist/validator/val_utils.c vendor/unbound/dist/validator/validator.c Added: vendor/unbound/dist/.gitattributes ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/unbound/dist/.gitattributes Fri Feb 3 13:06:34 2017 (r313158) @@ -0,0 +1 @@ +testdata/*.[0-9] linguist-documentation Modified: vendor/unbound/dist/Makefile.in ============================================================================== --- vendor/unbound/dist/Makefile.in Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/Makefile.in Fri Feb 3 13:06:34 2017 (r313158) @@ -101,7 +101,7 @@ util/data/msgreply.c util/data/packed_rr iterator/iter_delegpt.c iterator/iter_donotq.c iterator/iter_fwd.c \ iterator/iter_hints.c iterator/iter_priv.c iterator/iter_resptype.c \ iterator/iter_scrub.c iterator/iter_utils.c services/listen_dnsport.c \ -services/localzone.c services/mesh.c services/modstack.c \ +services/localzone.c services/mesh.c services/modstack.c services/view.c \ services/outbound_list.c services/outside_network.c util/alloc.c \ util/config_file.c util/configlexer.c util/configparser.c \ util/fptr_wlist.c util/locks.c util/log.c util/mini_event.c util/module.c \ @@ -117,7 +117,7 @@ $(DNSTAP_SRC) COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ -iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo \ +iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo view.lo \ outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo \ fptr_wlist.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ @@ -625,7 +625,8 @@ msgencode.lo msgencode.o: $(srcdir)/util $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/sldns/sbuffer.h $(srcdir)/services/localzone.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/module.h $(srcdir)/services/view.h msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ @@ -635,7 +636,9 @@ msgreply.lo msgreply.o: $(srcdir)/util/d $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/util/module.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ @@ -705,25 +708,32 @@ listen_dnsport.lo listen_dnsport.o: $(sr $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/util/as112.h + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h $(srcdir)/util/as112.h mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h \ $(srcdir)/util/regional.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/view.h $(srcdir)/util/data/dname.h modstack.lo modstack.o: $(srcdir)/services/modstack.c config.h $(srcdir)/services/modstack.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER) $(srcdir)/cachedb/cachedb.h + $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER) +view.lo view.o: $(srcdir)/services/view.c config.h $(srcdir)/services/view.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h @@ -760,15 +770,15 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ - $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h \ - $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h \ - $(PYTHONMOD_HEADER) $(srcdir)/cachedb/cachedb.h + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_nsec3.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_neg.h \ + $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h \ + $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/config_file.h $(PYTHONMOD_HEADER) locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ @@ -778,7 +788,7 @@ mini_event.lo mini_event.o: $(srcdir)/ut $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/netevent.h $(srcdir)/util/ub_event.h \ $(srcdir)/util/log.h $(srcdir)/util/net_help.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ @@ -902,14 +912,7 @@ dns64.lo dns64.o: $(srcdir)/dns64/dns64. $(srcdir)/util/storage/slabhash.h $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h -cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h $(srcdir)/cachedb/cachedb.h $(srcdir)/util/module.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/services/cache/dns.h $(srcdir)/validator/val_neg.h \ - $(srcdir)/util/rbtree.h $(srcdir)/validator/val_secalgo.h $(srcdir)/iterator/iter_utils.h \ - $(srcdir)/iterator/iter_resptype.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h \ - $(srcdir)/sldns/sbuffer.h +cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ @@ -956,9 +959,11 @@ testpkts.lo testpkts.o: $(srcdir)/testco unitldns.lo unitldns.o: $(srcdir)/testcode/unitldns.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \ - $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/locks.h \ + $(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h $(srcdir)/daemon/cachedump.h \ $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -978,10 +983,10 @@ daemon.lo daemon.o: $(srcdir)/daemon/dae $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h \ - $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h + $(srcdir)/services/view.h $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h \ + $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h remote.lo remote.o: $(srcdir)/daemon/remote.c config.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ @@ -992,12 +997,12 @@ remote.lo remote.o: $(srcdir)/daemon/rem $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/iterator/iter_delegpt.h \ - $(srcdir)/services/outside_network.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h \ - $(srcdir)/sldns/wire2str.h + $(srcdir)/services/view.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h \ + $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/services/outside_network.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -1025,8 +1030,8 @@ worker.lo worker.o: $(srcdir)/daemon/wor $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h $(srcdir)/util/regional.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ $(srcdir)/services/outside_network.h $(srcdir)/services/outbound_list.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ @@ -1054,8 +1059,8 @@ worker.lo worker.o: $(srcdir)/daemon/wor $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h $(srcdir)/util/regional.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ $(srcdir)/services/outside_network.h $(srcdir)/services/outbound_list.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ @@ -1064,9 +1069,11 @@ worker.lo worker.o: $(srcdir)/daemon/wor $(srcdir)/validator/val_anchor.h $(srcdir)/libunbound/context.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/libworker.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \ - $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/locks.h \ + $(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ @@ -1074,10 +1081,10 @@ daemon.lo daemon.o: $(srcdir)/daemon/dae $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h \ - $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h + $(srcdir)/services/view.h $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h \ + $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -1125,7 +1132,7 @@ unbound-checkconf.lo unbound-checkconf.o $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/localzone.h \ - $(srcdir)/sldns/sbuffer.h $(PYTHONMOD_HEADER) + $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h $(PYTHONMOD_HEADER) worker_cb.lo worker_cb.o: $(srcdir)/smallapp/worker_cb.c config.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ @@ -1137,8 +1144,9 @@ context.lo context.o: $(srcdir)/libunbou $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ + $(srcdir)/sldns/sbuffer.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1146,9 +1154,9 @@ libunbound.lo libunbound.o: $(srcdir)/li $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h \ $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/util/ub_event.h \ - $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/sldns/sbuffer.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1156,12 +1164,12 @@ libworker.lo libworker.o: $(srcdir)/libu $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h $(srcdir)/util/netevent.h \ $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/sldns/str2wire.h + $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/iterator/iter_hints.h $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ Modified: vendor/unbound/dist/cachedb/cachedb.c ============================================================================== --- vendor/unbound/dist/cachedb/cachedb.c Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/cachedb/cachedb.c Fri Feb 3 13:06:34 2017 (r313158) @@ -547,8 +547,8 @@ cachedb_handle_query(struct module_qstat return; } - if(qstate->blacklist) { - /* cache is blacklisted */ + if(qstate->blacklist || qstate->no_cache_lookup) { + /* cache is blacklisted or we are instructed from edns to not look */ /* pass request to next module */ qstate->ext_state[id] = module_wait_module; return; @@ -556,10 +556,15 @@ cachedb_handle_query(struct module_qstat /* lookup inside unbound's internal cache */ if(cachedb_intcache_lookup(qstate)) { - if(verbosity >= VERB_ALGO) - log_dns_msg("cachedb internal cache lookup", - &qstate->return_msg->qinfo, - qstate->return_msg->rep); + if(verbosity >= VERB_ALGO) { + if(qstate->return_msg->rep) + log_dns_msg("cachedb internal cache lookup", + &qstate->return_msg->qinfo, + qstate->return_msg->rep); + else log_info("cachedb internal cache lookup: rcode %s", + sldns_lookup_by_id(sldns_rcodes, qstate->return_rcode)? + sldns_lookup_by_id(sldns_rcodes, qstate->return_rcode)->name:"??"); + } /* we are done with the query */ qstate->ext_state[id] = module_finished; return; @@ -595,8 +600,8 @@ static void cachedb_handle_response(struct module_qstate* qstate, struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id) { - /* check if we are enabled, and skip if not */ - if(!ie->enabled) { + /* check if we are not enabled or instructed to not cache, and skip */ + if(!ie->enabled || qstate->no_cache_store) { /* we are done with the query */ qstate->ext_state[id] = module_finished; return; @@ -649,6 +654,11 @@ cachedb_operate(struct module_qstate* qs (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL); return; } + if(!iq && (event == module_event_moddone)) { + /* during priming, module done but we never started */ + qstate->ext_state[id] = module_finished; + return; + } log_err("bad event for cachedb"); (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL); Modified: vendor/unbound/dist/config.h.in ============================================================================== --- vendor/unbound/dist/config.h.in Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/config.h.in Fri Feb 3 13:06:34 2017 (r313158) @@ -107,6 +107,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the `DSA_SIG_set0' function. */ +#undef HAVE_DSA_SIG_SET0 + /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H @@ -143,6 +146,9 @@ /* Define to 1 if you have the `EVP_cleanup' function. */ #undef HAVE_EVP_CLEANUP +/* Define to 1 if you have the `EVP_dss1' function. */ +#undef HAVE_EVP_DSS1 + /* Define to 1 if you have the `EVP_MD_CTX_new' function. */ #undef HAVE_EVP_MD_CTX_NEW @@ -344,9 +350,6 @@ /* Define to 1 if you have the `recvmsg' function. */ #undef HAVE_RECVMSG -/* define if you have the sbrk() call */ -#undef HAVE_SBRK - /* Define to 1 if you have the `sendmsg' function. */ #undef HAVE_SENDMSG @@ -395,6 +398,9 @@ /* Define if you have the SSL libraries installed. */ #undef HAVE_SSL +/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */ +#undef HAVE_SSL_CTX_SET_SECURITY_LEVEL + /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H Modified: vendor/unbound/dist/configure ============================================================================== --- vendor/unbound/dist/configure Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/configure Fri Feb 3 13:06:34 2017 (r313158) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.5.10. +# Generated by GNU Autoconf 2.69 for unbound 1.6.0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.5.10' -PACKAGE_STRING='unbound 1.5.10' +PACKAGE_VERSION='1.6.0' +PACKAGE_STRING='unbound 1.6.0' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -659,6 +659,7 @@ WINAPPS WINDRES CHECKLOCK_OBJ staticexe +PC_LIBEVENT_DEPENDENCY UNBOUND_EVENT_UNINSTALL UNBOUND_EVENT_INSTALL SSLLIB @@ -678,6 +679,7 @@ WITH_PYTHONMODULE swig SWIG_LIB SWIG +PC_PY_DEPENDENCY PY_MAJOR_VERSION PYTHON_SITE_PKG PYTHON_LDFLAGS @@ -1401,7 +1403,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.5.10 to adapt to many kinds of systems. +\`configure' configures unbound 1.6.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1466,7 +1468,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.5.10:";; + short | recursive ) echo "Configuration of unbound 1.6.0:";; esac cat <<\_ACEOF @@ -1656,7 +1658,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.5.10 +unbound configure 1.6.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2365,7 +2367,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.5.10, which was +It was created by unbound $as_me 1.6.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2715,13 +2717,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu UNBOUND_VERSION_MAJOR=1 -UNBOUND_VERSION_MINOR=5 +UNBOUND_VERSION_MINOR=6 -UNBOUND_VERSION_MICRO=10 +UNBOUND_VERSION_MICRO=0 LIBUNBOUND_CURRENT=6 -LIBUNBOUND_REVISION=2 +LIBUNBOUND_REVISION=3 LIBUNBOUND_AGE=4 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2771,6 +2773,7 @@ LIBUNBOUND_AGE=4 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub # 1.5.9 had 6:1:4 # 1.5.10 had 6:2:4 +# 1.6.0 had 6:3:4 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -16823,6 +16826,8 @@ $as_echo "#define HAVE_PYTHON 1" >>confd LIBS="$PYTHON_LDFLAGS $LIBS" CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" ub_have_python=yes + PC_PY_DEPENDENCY="python" + # Check for SWIG ub_have_swig=no @@ -17535,7 +17540,7 @@ fi done -for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup +for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1 do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -17551,12 +17556,13 @@ done # these check_funcs need -lssl BAKLIBS="$LIBS" LIBS="-lssl $LIBS" -for ac_func in OPENSSL_init_ssl +for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level do : - ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl" -if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_INIT_SSL 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -17925,13 +17931,13 @@ if test "${enable_dsa+set}" = set; then fi use_dsa="no" -case "$enable_ecdsa" in +case "$enable_dsa" in no) ;; *) # detect if DSA is supported, and turn it off if not. - ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1" -if test "x$ac_cv_func_EVP_dss1" = xyes; then : + ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new" +if test "x$ac_cv_func_DSA_SIG_new" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -18378,6 +18384,8 @@ _ACEOF fi done # only in libev. (tested on 4.00) + PC_LIBEVENT_DEPENDENCY="libevent" + if test -n "$BAK_LDFLAGS_SET"; then LDFLAGS="$BAK_LDFLAGS" fi @@ -18959,33 +18967,6 @@ fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5 -$as_echo_n "checking for sbrk... " >&6; } -# catch the warning of deprecated sbrk -old_cflags="$CFLAGS" -CFLAGS="$CFLAGS -Werror" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - -int main(void) { void* cur = sbrk(0); printf("%u\n", (unsigned)(size_t)((char*)cur - (char*)sbrk(0))); return 0; } - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_SBRK 1" >>confdefs.h - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -CFLAGS="$old_cflags" - # check if setreuid en setregid fail, on MacOSX10.4(darwin8). if echo $build_os | grep darwin8 > /dev/null; then @@ -19939,7 +19920,7 @@ _ACEOF -version=1.5.10 +version=1.6.0 date=`date +'%b %e, %Y'` @@ -20454,7 +20435,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.5.10, which was +This file was extended by unbound $as_me 1.6.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20520,7 +20501,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.5.10 +unbound config.status 1.6.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/unbound/dist/configure.ac ============================================================================== --- vendor/unbound/dist/configure.ac Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/configure.ac Fri Feb 3 13:06:34 2017 (r313158) @@ -9,15 +9,15 @@ sinclude(dnstap/dnstap.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) -m4_define([VERSION_MINOR],[5]) -m4_define([VERSION_MICRO],[10]) +m4_define([VERSION_MINOR],[6]) +m4_define([VERSION_MICRO],[0]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=6 -LIBUNBOUND_REVISION=2 +LIBUNBOUND_REVISION=3 LIBUNBOUND_AGE=4 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -67,6 +67,7 @@ LIBUNBOUND_AGE=4 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub # 1.5.9 had 6:1:4 # 1.5.10 had 6:2:4 +# 1.6.0 had 6:3:4 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -543,6 +544,8 @@ if test x_$ub_test_python != x_no; then LIBS="$PYTHON_LDFLAGS $LIBS" CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" ub_have_python=yes + PC_PY_DEPENDENCY="python" + AC_SUBST(PC_PY_DEPENDENCY) # Check for SWIG ub_have_swig=no @@ -673,12 +676,12 @@ else AC_MSG_RESULT([no]) fi AC_CHECK_HEADERS([openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h],,, [AC_INCLUDES_DEFAULT]) -AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup]) +AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1]) # these check_funcs need -lssl BAKLIBS="$LIBS" LIBS="-lssl $LIBS" -AC_CHECK_FUNCS([OPENSSL_init_ssl]) +AC_CHECK_FUNCS([OPENSSL_init_ssl SSL_CTX_set_security_level]) LIBS="$BAKLIBS" AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free,SSL_CTX_set_ecdh_auto], [], [], [ @@ -864,12 +867,12 @@ esac AC_ARG_ENABLE(dsa, AC_HELP_STRING([--disable-dsa], [Disable DSA support])) use_dsa="no" -case "$enable_ecdsa" in +case "$enable_dsa" in no) ;; *) # detect if DSA is supported, and turn it off if not. - AC_CHECK_FUNC(EVP_dss1, [ + AC_CHECK_FUNC(DSA_SIG_new, [ AC_DEFINE_UNQUOTED([USE_DSA], [1], [Define this to enable DSA support.]) ], [if test "x$enable_dsa" = "xyes"; then AC_MSG_ERROR([OpenSSL does not support DSA and you used --enable-dsa.]) fi ]) @@ -1000,6 +1003,8 @@ large outgoing port ranges. ]) AC_CHECK_FUNCS([event_base_get_method]) # only in libevent 1.4.3 and later AC_CHECK_FUNCS([ev_loop]) # only in libev. (tested on 3.51) AC_CHECK_FUNCS([ev_default_loop]) # only in libev. (tested on 4.00) + PC_LIBEVENT_DEPENDENCY="libevent" + AC_SUBST(PC_LIBEVENT_DEPENDENCY) if test -n "$BAK_LDFLAGS_SET"; then LDFLAGS="$BAK_LDFLAGS" fi @@ -1142,19 +1147,6 @@ AC_CHECK_FUNCS([tzset sigprocmask fcntl AC_CHECK_FUNCS([setresuid],,[AC_CHECK_FUNCS([setreuid])]) AC_CHECK_FUNCS([setresgid],,[AC_CHECK_FUNCS([setregid])]) -AC_MSG_CHECKING([for sbrk]) -# catch the warning of deprecated sbrk -old_cflags="$CFLAGS" -CFLAGS="$CFLAGS -Werror" -AC_COMPILE_IFELSE([AC_LANG_SOURCE(AC_INCLUDES_DEFAULT -[[ -int main(void) { void* cur = sbrk(0); printf("%u\n", (unsigned)(size_t)((char*)cur - (char*)sbrk(0))); return 0; } -]])], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SBRK, 1, [define if you have the sbrk() call]) - ], [AC_MSG_RESULT(no)]) -CFLAGS="$old_cflags" - # check if setreuid en setregid fail, on MacOSX10.4(darwin8). if echo $build_os | grep darwin8 > /dev/null; then AC_DEFINE(DARWIN_BROKEN_SETREUID, 1, [Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work]) Modified: vendor/unbound/dist/contrib/libunbound.pc.in ============================================================================== --- vendor/unbound/dist/contrib/libunbound.pc.in Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/contrib/libunbound.pc.in Fri Feb 3 13:06:34 2017 (r313158) @@ -7,7 +7,7 @@ Name: unbound Description: Library with validating, recursive, and caching DNS resolver URL: http://www.unbound.net Version: @PACKAGE_VERSION@ -Requires: -Libs: -L${libdir} -lunbound @SSLLIB@ @LIBS@ -Libs.private: @LDFLAGS@ +Requires: libcrypto libssl @PC_LIBEVENT_DEPENDENCY@ @PC_PY_DEPENDENCY@ +Libs: -L${libdir} -lunbound +Libs.private: @SSLLIB@ @LIBS@ Cflags: -I${includedir} Modified: vendor/unbound/dist/contrib/unbound_munin_ ============================================================================== --- vendor/unbound/dist/contrib/unbound_munin_ Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/contrib/unbound_munin_ Fri Feb 3 13:06:34 2017 (r313158) @@ -150,7 +150,7 @@ get_state ( ) { fi done # try to get it - echo $$ >$lock + if echo $$ >$lock ; then : ; else break; fi done # do not refetch if the file exists and only LEE seconds old if test -f $state; then @@ -266,7 +266,6 @@ if test "$1" = "config" ; then echo "graph_args --base 1024 -l 0" echo "graph_vlabel memory used in bytes" echo "graph_category DNS" - p_config "mem.total.sbrk" "Total memory" "GAUGE" p_config "mem.cache.rrset" "RRset cache memory" "GAUGE" p_config "mem.cache.message" "Message cache memory" "GAUGE" p_config "mem.mod.iterator" "Iterator module memory" "GAUGE" @@ -458,20 +457,6 @@ queue) done ;; memory) - mn=`echo mem.total.sbrk | sed $ABBREV | tr . _` - get_value 'mem.total.sbrk' - if test $value -eq 0; then - chk=`echo $ctrl | sed -e 's/-control$/-checkconf/'` - pidf=`$chk -o pidfile $conf 2>&1` - pid=`cat $pidf 2>&1` - value=`ps -p "$pid" -o rss= 2>&1` - if test "`expr $value + 1 - 1 2>&1`" -eq "$value" 2>&1; then - value=`expr $value \* 1024` - else - value=0 - fi - fi - echo "$mn.value" $value for x in mem.cache.rrset mem.cache.message mem.mod.iterator \ mem.mod.validator msg.cache.count rrset.cache.count \ infra.cache.count key.cache.count; do Modified: vendor/unbound/dist/daemon/acl_list.c ============================================================================== --- vendor/unbound/dist/daemon/acl_list.c Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/daemon/acl_list.c Fri Feb 3 13:06:34 2017 (r313158) @@ -170,6 +170,23 @@ acl_list_tags_cfg(struct acl_list* acl, return 1; } +/** apply acl_view string */ +static int +acl_list_view_cfg(struct acl_list* acl, const char* str, const char* str2, + struct views* vs) +{ + struct acl_addr* node; + if(!(node=acl_find_or_create(acl, str))) + return 0; + node->view = views_find_view(vs, str2, 0 /* get read lock*/); + if(!node->view) { + log_err("no view with name: %s", str2); + return 0; + } + lock_rw_unlock(&node->view->lock); + return 1; +} + /** apply acl_tag_action string */ static int acl_list_tag_action_cfg(struct acl_list* acl, struct config_file* cfg, @@ -210,15 +227,47 @@ acl_list_tag_action_cfg(struct acl_list* /** check wire data parse */ static int -check_data(const char* data) +check_data(const char* data, const struct config_strlist* head) { char buf[65536]; uint8_t rr[LDNS_RR_BUF_SIZE]; size_t len = sizeof(rr); int res; - snprintf(buf, sizeof(buf), "%s %s", "example.com.", data); + /* '.' is sufficient for validation, and it makes the call to + * sldns_wirerr_get_type() simpler below. */ + snprintf(buf, sizeof(buf), "%s %s", ".", data); res = sldns_str2wire_rr_buf(buf, rr, &len, NULL, 3600, NULL, 0, NULL, 0); + + /* Reject it if we would end up having CNAME and other data (including + * another CNAME) for the same tag. */ + if(res == 0 && head) { + const char* err_data = NULL; + + if(sldns_wirerr_get_type(rr, len, 1) == LDNS_RR_TYPE_CNAME) { + /* adding CNAME while other data already exists. */ + err_data = data; + } else { + snprintf(buf, sizeof(buf), "%s %s", ".", head->str); + len = sizeof(rr); + res = sldns_str2wire_rr_buf(buf, rr, &len, NULL, 3600, + NULL, 0, NULL, 0); + if(res != 0) { + /* This should be impossible here as head->str + * has been validated, but we check it just in + * case. */ + return 0; + } + if(sldns_wirerr_get_type(rr, len, 1) == + LDNS_RR_TYPE_CNAME) /* already have CNAME */ + err_data = head->str; + } + if(err_data) { + log_err("redirect tag data '%s' must not coexist with " + "other data.", err_data); + return 0; + } + } if(res == 0) return 1; log_err("rr data [char %d] parse error %s", @@ -258,7 +307,7 @@ acl_list_tag_data_cfg(struct acl_list* a } /* check data? */ - if(!check_data(data)) { + if(!check_data(data, node->tag_datas[tagid])) { log_err("cannot parse access-control-tag data: %s %s '%s'", str, tag, data); return 0; @@ -312,6 +361,27 @@ read_acl_tags(struct acl_list* acl, stru return 1; } +/** read acl view config */ +static int +read_acl_view(struct acl_list* acl, struct config_file* cfg, struct views* v) +{ + struct config_str2list* np, *p = cfg->acl_view; + cfg->acl_view = NULL; + while(p) { + log_assert(p->str && p->str2); + if(!acl_list_view_cfg(acl, p->str, p->str2, v)) { + return 0; + } + /* free the items as we go to free up memory */ + np = p->next; + free(p->str); + free(p->str2); + free(p); + p = np; + } + return 1; +} + /** read acl tag actions config */ static int read_acl_tag_actions(struct acl_list* acl, struct config_file* cfg) @@ -362,12 +432,15 @@ read_acl_tag_datas(struct acl_list* acl, } int -acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg) +acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg, + struct views* v) { regional_free_all(acl->region); addr_tree_init(&acl->tree); if(!read_acl_list(acl, cfg)) return 0; + if(!read_acl_view(acl, cfg, v)) + return 0; if(!read_acl_tags(acl, cfg)) return 0; if(!read_acl_tag_actions(acl, cfg)) Modified: vendor/unbound/dist/daemon/acl_list.h ============================================================================== --- vendor/unbound/dist/daemon/acl_list.h Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/daemon/acl_list.h Fri Feb 3 13:06:34 2017 (r313158) @@ -43,6 +43,7 @@ #ifndef DAEMON_ACL_LIST_H #define DAEMON_ACL_LIST_H #include "util/storage/dnstree.h" +#include "services/view.h" struct config_file; struct regional; @@ -100,6 +101,8 @@ struct acl_addr { struct config_strlist** tag_datas; /** size of the tag_datas array */ size_t tag_datas_size; + /* view element, NULL if none */ + struct view* view; }; /** @@ -118,9 +121,11 @@ void acl_list_delete(struct acl_list* ac * Process access control config. * @param acl: where to store. * @param cfg: config options. + * @param v: views structure * @return 0 on error. */ -int acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg); +int acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg, + struct views* v); /** * Lookup access control status for acl structure. Modified: vendor/unbound/dist/daemon/cachedump.c ============================================================================== --- vendor/unbound/dist/daemon/cachedump.c Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/daemon/cachedump.c Fri Feb 3 13:06:34 2017 (r313158) @@ -563,6 +563,7 @@ load_qinfo(char* str, struct query_info* qinfo->qclass = sldns_wirerr_get_class(rr, rr_len, dname_len); qinfo->qname_len = dname_len; qinfo->qname = (uint8_t*)regional_alloc_init(region, rr, dname_len); + qinfo->local_alias = NULL; if(!qinfo->qname) { log_warn("error out of memory"); return NULL; @@ -826,6 +827,7 @@ int print_deleg_lookup(SSL* ssl, struct qinfo.qname_len = nmlen; qinfo.qtype = LDNS_RR_TYPE_A; qinfo.qclass = LDNS_RR_CLASS_IN; + qinfo.local_alias = NULL; dname_str(nm, b); if(!ssl_printf(ssl, "The following name servers are used for lookup " Modified: vendor/unbound/dist/daemon/daemon.c ============================================================================== --- vendor/unbound/dist/daemon/daemon.c Fri Feb 3 13:01:33 2017 (r313157) +++ vendor/unbound/dist/daemon/daemon.c Fri Feb 3 13:06:34 2017 (r313158) @@ -79,6 +79,7 @@ #include "services/cache/rrset.h" #include "services/cache/infra.h" #include "services/localzone.h" +#include "services/view.h" #include "services/modstack.h" #include "util/module.h" #include "util/random.h" @@ -248,9 +249,16 @@ daemon_init(void) free(daemon); return NULL; } + /* init edns_known_options */ + if(!edns_known_options_init(daemon->env)) { + free(daemon->env); + free(daemon); + return NULL; + } alloc_init(&daemon->superalloc, NULL, 0); daemon->acl = acl_list_create(); if(!daemon->acl) { + edns_known_options_delete(daemon->env); free(daemon->env); free(daemon); return NULL; @@ -347,6 +355,7 @@ static void daemon_setup_modules(struct daemon->env)) { fatal_exit("failed to setup modules"); } + log_edns_known_options(VERB_ALGO, daemon->env); } /** @@ -542,8 +551,15 @@ void daemon_fork(struct daemon* daemon) { log_assert(daemon); - if(!acl_list_apply_cfg(daemon->acl, daemon->cfg)) + if(!(daemon->views = views_create())) + fatal_exit("Could not create views: out of memory"); + /* create individual views and their localzone/data trees */ + if(!views_apply_cfg(daemon->views, daemon->cfg)) + fatal_exit("Could not set up views"); + + if(!acl_list_apply_cfg(daemon->acl, daemon->cfg, daemon->views)) fatal_exit("Could not setup access control list"); + /* create global local_zones */ if(!(daemon->local_zones = local_zones_create())) fatal_exit("Could not create local zones: out of memory"); if(!local_zones_apply_cfg(daemon->local_zones, daemon->cfg)) @@ -605,6 +621,8 @@ daemon_cleanup(struct daemon* daemon) slabhash_clear(daemon->env->msg_cache); local_zones_delete(daemon->local_zones); daemon->local_zones = NULL; + views_delete(daemon->views); + daemon->views = NULL; /* key cache is cleared by module desetup during next daemon_fork() */ daemon_remote_clear(daemon->rc); for(i=0; inum; i++) @@ -634,6 +652,8 @@ daemon_delete(struct daemon* daemon) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Feb 3 13:07:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67881CCDE53; Fri, 3 Feb 2017 13:07:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A69CEBF; Fri, 3 Feb 2017 13:07:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13D7P4X084480; Fri, 3 Feb 2017 13:07:25 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13D7Pxs084479; Fri, 3 Feb 2017 13:07:25 GMT (envelope-from des@FreeBSD.org) Message-Id: <201702031307.v13D7Pxs084479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 3 Feb 2017 13:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313159 - vendor/unbound/1.6.0 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 13:07:26 -0000 Author: des Date: Fri Feb 3 13:07:24 2017 New Revision: 313159 URL: https://svnweb.freebsd.org/changeset/base/313159 Log: tag unbound 1.6.0 Added: vendor/unbound/1.6.0/ - copied from r313158, vendor/unbound/dist/ From owner-svn-src-all@freebsd.org Fri Feb 3 16:08:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D361CCF36D; Fri, 3 Feb 2017 16:08:59 +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 6A068239; Fri, 3 Feb 2017 16:08:59 +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 v13G8wUm060981; Fri, 3 Feb 2017 16:08:58 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13G8wwa060980; Fri, 3 Feb 2017 16:08:58 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702031608.v13G8wwa060980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 3 Feb 2017 16:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313160 - head/sbin/resolvconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:08:59 -0000 Author: pfg Date: Fri Feb 3 16:08:58 2017 New Revision: 313160 URL: https://svnweb.freebsd.org/changeset/base/313160 Log: resolvconf: restore RESTARTCMD=, CMD1=, CMD2= and sed pattern as before. r312992 removed RESTARTCMD_WITH_ARG for @RESTARTCMD something@ but reverted the sed to be '@RESTARTCMD \(.*\)@' and RESTARTCMD= to be the value of RESTARTCMD_WITH_ARG. Submitted by: Guy Yur x_MFC with: r312992 Modified: head/sbin/resolvconf/Makefile Modified: head/sbin/resolvconf/Makefile ============================================================================== --- head/sbin/resolvconf/Makefile Fri Feb 3 13:07:24 2017 (r313159) +++ head/sbin/resolvconf/Makefile Fri Feb 3 16:08:58 2017 (r313160) @@ -20,16 +20,16 @@ SBINDIR= /sbin # We don't assume to restart the services in /sbin. So, though # our service(8) is in /usr/sbin, we can use it, here. -CMD1= \1 onestatus >/dev/null 2>\&1 -CMD2= \1 restart -RESTARTCMD= /usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2} +CMD1= \\$$1 onestatus >/dev/null 2>\&1 +CMD2= \\$$1 restart +RESTARTCMD= "/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}" .for f in ${SCRIPTS} ${FILES} ${MAN} ${f}: ${f}.in sed -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \ -e 's:@LIBEXECDIR@:${FILESDIR}:g' \ -e 's:@VARDIR@:${VARDIR}:g' \ - -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \ + -e 's:@RESTARTCMD@:${RESTARTCMD}:g' \ -e 's:@RCDIR@:${RCDIR}:g' \ -e 's:@SBINDIR@:${SBINDIR}:g' \ -e 's: vpn : ng[0-9]*&:g' \ From owner-svn-src-all@freebsd.org Fri Feb 3 16:15:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3569FCCF71C; Fri, 3 Feb 2017 16:15:08 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F95BC67; Fri, 3 Feb 2017 16:15:07 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13GF7Z6064838; Fri, 3 Feb 2017 16:15:07 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13GF7ds064837; Fri, 3 Feb 2017 16:15:07 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031615.v13GF7ds064837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 16:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313161 - stable/10/share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:15:08 -0000 Author: sevan (doc committer) Date: Fri Feb 3 16:15:06 2017 New Revision: 313161 URL: https://svnweb.freebsd.org/changeset/base/313161 Log: MFC from r273333 to 307002. Modified: stable/10/share/misc/bsd-family-tree Modified: stable/10/share/misc/bsd-family-tree ============================================================================== --- stable/10/share/misc/bsd-family-tree Fri Feb 3 16:08:58 2017 (r313160) +++ stable/10/share/misc/bsd-family-tree Fri Feb 3 16:15:06 2017 (r313161) @@ -258,6 +258,9 @@ FreeBSD 5.2 | | | | 8.3 | | | | | | | | | | | | NetBSD | | | | | | | | 5.1.3 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 5.1.4 | | | | | | | | OpenBSD 5.1 | | | | Mac OS X | `----. | | | | | 10.8 | \ | | @@ -268,14 +271,17 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | | | | NetBSD | | | | | | | | | 5.2.1 | | + | | | | | | | | | | + | | | | | | | NetBSD | | + | | | | | | | 5.2.2 | | | | | | | | | | | | | | | | | \ | | | | | | | | NetBSD | | | | | | | | 6.0.1 | | - | | | | | | | | | + | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 | | | | | | NetBSD | | | | | | | | 6.0.2 | | - | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 + | | | | | | | | | | | | | | | NetBSD | | | | | | | | 6.0.3 | | | | | | | | | | | @@ -296,25 +302,55 @@ FreeBSD 5.2 | | | \ | | | | | *--FreeBSD | | | NetBSD 6.1.3 | | | 10.0 | | | | | | - | | | | | | DragonFly 3.6.1 - | | | | | | | - | | | | | | | - | | | | | | DragonFly 3.6.2 - | | | | NetBSD 6.1.4 | | - | | | | | | - | | | | OpenBSD 5.5 | - | | | | | DragonFly 3.8.0 - | FreeBSD | | | | - | 9.3 | | | | - | | | | | - | | | | | - | | | | | - | | | | | - | | | | | - | | | | | + | | | | | | | DragonFly 3.6.1 + | | | | | | | | + | | | | | | | | + | | | | | | | DragonFly 3.6.2 + | | | | | NetBSD 6.1.4 | | + | | | | | | | | + | | | | | | OpenBSD 5.5 | + | | | | | | | | + | | | | | | | DragonFly 3.8.0 + | | | | | | | | + | | | | | | | | + | | | | | | | DragonFly 3.8.1 + | | | | | | | | + | | | | | | | | + | | | | | | | DragonFly 3.6.3 + | | | | | | | | + | | FreeBSD | | | | | + | | 9.3 | | | | | + | | | | NetBSD 6.1.5 | DragonFly 3.8.2 + | | Mac OS X | | | + | | 10.10 | | | + | | | | OpenBSD 5.6 | + | FreeBSD | | | | + | 10.1 | | | DragonFly 4.0.1 + | | | | | | + | | | | | DragonFly 4.0.2 + | | | | | | + | | | | | DragonFly 4.0.3 + | | | | | | + | | | | | DragonFly 4.0.4 + | | | | | | + | | | | | DragonFly 4.0.5 + | | | | | | + | | | | OpenBSD 5.7 | + | | | | | DragonFly 4.2.0 + | FreeBSD | | | | + | 10.2 | | | | + | | OS X NetBSD 7.0 | | + | | 10.11 | OpenBSD 5.8 | + | | | | | DragonFly 4.4.1 + | FreeBSD | | OpenBSD 5.9 | + | 10.3 | | | | + | | NetBSD 7.0.1 | | + | | | | DragonFly 4.6.0 + *--FreeBSD | | OpenBSD 6.0 | + | 11.0 | | | | | | | | | | | | | | -FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -632,15 +668,42 @@ Mac OS X 10.9 2013-10-22 [APL] OpenBSD 5.4 2013-11-01 [OBD] DragonFly 3.6.0 2013-11-25 [DFB] FreeBSD 10.0 2014-01-20 [FBD] -NetBSD 6.0.4 2014-01-27 [NBD] -NetBSD 6.1.3 2014-01-27 [NBD] +NetBSD 5.1.4 2014-01-25 [NBD] +NetBSD 5.2.2 2014-01-25 [NBD] +NetBSD 6.0.4 2014-01-25 [NBD] +NetBSD 6.1.3 2014-01-25 [NBD] DragonFly 3.6.1 2014-02-22 [DFB] DragonFly 3.6.2 2014-04-10 [DFB] -NetBSD 6.0.5 2014-04-19 [NDB] -NetBSD 6.1.4 2014-04-19 [NDB] +NetBSD 6.0.5 2014-04-12 [NDB] +NetBSD 6.1.4 2014-04-12 [NDB] OpenBSD 5.5 2014-05-01 [OBD] DragonFly 3.8.0 2014-06-04 [DFB] +DragonFly 3.8.1 2014-06-16 [DFB] +DragonFly 3.6.3 2014-06-17 [DFB] FreeBSD 9.3 2014-07-05 [FBD] +DragonFly 3.8.2 2014-08-08 [DFB] +NetBSD 6.1.5 2014-09-22 [NBD] +Mac OS X 10.10 2014-10-16 [APL] +OpenBSD 5.6 2014-11-01 [OBD] +FreeBSD 10.1 2014-11-14 [FBD] +DragonFly 4.0.1 2014-11-25 [DFB] +DragonFly 4.0.2 2015-01-07 [DFB] +DragonFly 4.0.3 2015-01-21 [DFB] +DragonFly 4.0.4 2015-03-09 [DFB] +DragonFly 4.0.5 2015-03-23 [DFB] +OpenBSD 5.7 2015-05-01 [OBD] +DragonFly 4.2.0 2015-06-29 [DFB] +FreeBSD 10.2 2015-08-13 [FBD] +NetBSD 7.0 2015-09-25 [NBD] +OS X 10.11 2015-09-30 [APL] +OpenBSD 5.8 2015-10-18 [OBD] +DragonFly 4.4.1 2015-12-07 [DFB] +OpenBSD 5.9 2016-03-29 [OBD] +FreeBSD 10.3 2016-04-04 [FBD] +NetBSD 7.0.1 2016-05-22 [NBD] +DragonFly 4.6.0 2016-08-02 [DFB] +OpenBSD 6.0 2016-09-01 [OBD] +FreeBSD 11.0 2016-10-10 [FBD] Bibliography ------------------------ @@ -660,6 +723,10 @@ McKusick, Marshall Kirk, George Neville- Implementation of the FreeBSD Operating System. Addison-Wesley Professional, Published: Aug 2, 2004. ISBN 0-201-70245-2 +McKusick, Marshall Kirk, George Neville-Neil, Robert Watson. The +Design and Implementation of the FreeBSD Operating System, 2nd Edition. +Pearson Education, Inc., 2014. ISBN 0-321-96897-2 + Doug McIlroy. Research Unix Reader. Michael G. Brown. The Role of BSD in the Development of Unix. From owner-svn-src-all@freebsd.org Fri Feb 3 16:21:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D55CCCCFA00; Fri, 3 Feb 2017 16:21:31 +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 A275A1A4; Fri, 3 Feb 2017 16:21:31 +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 v13GLUtJ068987; Fri, 3 Feb 2017 16:21:30 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13GLUVT068986; Fri, 3 Feb 2017 16:21:30 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201702031621.v13GLUVT068986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 3 Feb 2017 16:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313162 - head/usr.sbin/ctladm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:21:31 -0000 Author: wblock (doc committer) Date: Fri Feb 3 16:21:30 2017 New Revision: 313162 URL: https://svnweb.freebsd.org/changeset/base/313162 Log: Replace Cyrillic characters with Latin (normal) ones. PR: 216534 Submitted by: eborisch+FreeBSD@gmail.com MFC after: 1 week Sponsored by: iXsystems Modified: head/usr.sbin/ctladm/ctladm.8 Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Fri Feb 3 16:15:06 2017 (r313161) +++ head/usr.sbin/ctladm/ctladm.8 Fri Feb 3 16:21:30 2017 (r313162) @@ -888,8 +888,8 @@ client through the selection of appropri The default value is "restricted". It improves data integrity, but may introduce some additional delays. .It Va serseq -Set to "on" to serialize conseсutive reads/writes. -Set to "read" to serialize conseсutive reads. +Set to "on" to serialize consecutive reads/writes. +Set to "read" to serialize consecutive reads. Set to "off" to allow them be issued in parallel. Parallel issue of consecutive operations may confuse logic of the backing file system, hurting performance; but it may improve performance From owner-svn-src-all@freebsd.org Fri Feb 3 16:27:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38E3ACCFBB6; Fri, 3 Feb 2017 16:27:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08A84985; Fri, 3 Feb 2017 16:27:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13GROSB069422; Fri, 3 Feb 2017 16:27:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13GROMH069421; Fri, 3 Feb 2017 16:27:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201702031627.v13GROMH069421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Feb 2017 16:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313163 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:27:25 -0000 Author: bdrewery Date: Fri Feb 3 16:27:23 2017 New Revision: 313163 URL: https://svnweb.freebsd.org/changeset/base/313163 Log: native-xtools: Add missing readelf. The switch to elftoolchain's readelf in r280859 caused native-xtools to no longer build readelf. This fixes poudriere builds not using a native readelf when expected. Reported by: strejda on freenode MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Feb 3 16:21:30 2017 (r313162) +++ head/Makefile.inc1 Fri Feb 3 16:27:23 2017 (r313163) @@ -1950,6 +1950,7 @@ native-xtools: .PHONY usr.bin/mktemp \ usr.bin/mt \ usr.bin/patch \ + usr.bin/readelf \ usr.bin/sed \ usr.bin/sort \ usr.bin/tar \ From owner-svn-src-all@freebsd.org Fri Feb 3 16:35:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73E84CCFD60; Fri, 3 Feb 2017 16:35:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FF0FE8B; Fri, 3 Feb 2017 16:35:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13GZAIE073777; Fri, 3 Feb 2017 16:35:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13GZApx073776; Fri, 3 Feb 2017 16:35:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702031635.v13GZApx073776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 3 Feb 2017 16:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313164 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:35:11 -0000 Author: pfg Date: Fri Feb 3 16:35:10 2017 New Revision: 313164 URL: https://svnweb.freebsd.org/changeset/base/313164 Log: MFC r312001: Remove __nonnull() attributes from x86 machine check architecture. 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 the only effect is cosmetic. Reviewed by: jhb, avg Modified: stable/11/sys/x86/x86/mca.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/mca.c ============================================================================== --- stable/11/sys/x86/x86/mca.c Fri Feb 3 16:27:23 2017 (r313163) +++ stable/11/sys/x86/x86/mca.c Fri Feb 3 16:35:10 2017 (r313164) @@ -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-all@freebsd.org Fri Feb 3 16:36:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CCBCCCFE28; Fri, 3 Feb 2017 16:36:15 +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 6BFB91056; Fri, 3 Feb 2017 16:36:15 +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 v13GaE39073860; Fri, 3 Feb 2017 16:36:14 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13GaE9P073859; Fri, 3 Feb 2017 16:36:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201702031636.v13GaE9P073859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 3 Feb 2017 16:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313165 - stable/10/sys/x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:36:15 -0000 Author: pfg Date: Fri Feb 3 16:36:14 2017 New Revision: 313165 URL: https://svnweb.freebsd.org/changeset/base/313165 Log: MFC r312001: Remove __nonnull() attributes from x86 machine check architecture. 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 the only effect is cosmetic. Reviewed by: jhb, avg Modified: stable/10/sys/x86/x86/mca.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/mca.c ============================================================================== --- stable/10/sys/x86/x86/mca.c Fri Feb 3 16:35:10 2017 (r313164) +++ stable/10/sys/x86/x86/mca.c Fri Feb 3 16:36:14 2017 (r313165) @@ -249,7 +249,7 @@ mca_error_mmtype(uint16_t mca_error) return ("???"); } -static int __nonnull(1) +static int mca_mute(const struct mca_record *rec) { @@ -278,7 +278,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; @@ -417,7 +417,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; @@ -484,7 +484,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-all@freebsd.org Fri Feb 3 16:39:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B967BCCFEA3; Fri, 3 Feb 2017 16:39:11 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C98E123C; Fri, 3 Feb 2017 16:39:11 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13GdAQh074032; Fri, 3 Feb 2017 16:39:10 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13GdAXQ074031; Fri, 3 Feb 2017 16:39:10 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201702031639.v13GdAXQ074031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 3 Feb 2017 16:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313166 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:39:11 -0000 Author: tsoome Date: Fri Feb 3 16:39:10 2017 New Revision: 313166 URL: https://svnweb.freebsd.org/changeset/base/313166 Log: loader: libefi/env.c warnings in arm build The arm build has revealed some of the warnings, the fix for CHAR16 warning is to switch the warning off for env.c (same as for efinet.c). For error code we need to use macro. Reported by: gjb Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D9422 Modified: head/sys/boot/efi/libefi/Makefile head/sys/boot/efi/libefi/env.c Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:36:14 2017 (r313165) +++ head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:39:10 2017 (r313166) @@ -26,6 +26,7 @@ SRCS+= time_event.c # of a short. There's no good cast to use here so just ignore the # warnings for now. CWARNFLAGS.efinet.c+= -Wno-format +CWARNFLAGS.env.c+= -Wno-format .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -msoft-float -mgeneral-regs-only Modified: head/sys/boot/efi/libefi/env.c ============================================================================== --- head/sys/boot/efi/libefi/env.c Fri Feb 3 16:36:14 2017 (r313165) +++ head/sys/boot/efi/libefi/env.c Fri Feb 3 16:39:10 2017 (r313166) @@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU status = RS->GetVariable(varnamearg, matchguid, &attr, &datasz, NULL); if (status != EFI_BUFFER_TOO_SMALL) { - printf("Can't get the variable: error %#lx\n", status); + printf("Can't get the variable: error %#lx\n", + EFI_ERROR_CODE(status)); return (CMD_ERROR); } data = malloc(datasz); status = RS->GetVariable(varnamearg, matchguid, &attr, &datasz, data); if (status != EFI_SUCCESS) { - printf("Can't get the variable: error %#lx\n", status); + printf("Can't get the variable: error %#lx\n", + EFI_ERROR_CODE(status)); return (CMD_ERROR); } uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); From owner-svn-src-all@freebsd.org Fri Feb 3 16:47:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 683D0CCE320 for ; Fri, 3 Feb 2017 16:47:30 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4C81B83 for ; Fri, 3 Feb 2017 16:47:30 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 6fc5cc85-ea30-11e6-b3c2-c9f38144898e 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 outbound2.ore.mailhop.org (Halon) with ESMTPSA id 6fc5cc85-ea30-11e6-b3c2-c9f38144898e; Fri, 03 Feb 2017 16:47:24 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v13GlR1l024277; Fri, 3 Feb 2017 09:47:27 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1486140447.3017.189.camel@freebsd.org> Subject: Re: svn commit: r313166 - head/sys/boot/efi/libefi From: Ian Lepore To: Toomas Soome , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 03 Feb 2017 09:47:27 -0700 In-Reply-To: <201702031639.v13GdAXQ074031@repo.freebsd.org> References: <201702031639.v13GdAXQ074031@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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:47:30 -0000 On Fri, 2017-02-03 at 16:39 +0000, Toomas Soome wrote: > Author: tsoome > Date: Fri Feb3 16:39:10 2017 > New Revision: 313166 > URL: https://svnweb.freebsd.org/changeset/base/313166 > > Log: > loader: libefi/env.c warnings in arm build > > The arm build has revealed some of the warnings, the fix for CHAR16 > warning is to switch the warning off for env.c (same as for > efinet.c). > How is disabling the warning instead of just fixing it the right thing to do? I think disabling a printf format warning is never the right thing to do, it just turns a compile warning into a runtime failure. -- Ian > For error code we need to use macro. > > Reported by: gjb > Reviewed by: imp > Approved by: imp (mentor) > Differential Revision: https://reviews.freebsd.org/D9422 > > Modified: > head/sys/boot/efi/libefi/Makefile > head/sys/boot/efi/libefi/env.c > > Modified: head/sys/boot/efi/libefi/Makefile > ===================================================================== > ========= > --- head/sys/boot/efi/libefi/Makefile Fri Feb3 16:36:14 2017 > (r313165) > +++ head/sys/boot/efi/libefi/Makefile Fri Feb3 16:39:10 2017 > (r313166) > @@ -26,6 +26,7 @@ SRCS+= time_event.c > # of a short. There's no good cast to use here so just ignore the > # warnings for now. > CWARNFLAGS.efinet.c+= -Wno-format > +CWARNFLAGS.env.c+= -Wno-format > > .if ${MACHINE_CPUARCH} == "aarch64" > CFLAGS+= -msoft-float -mgeneral-regs-only > > Modified: head/sys/boot/efi/libefi/env.c > ===================================================================== > ========= > --- head/sys/boot/efi/libefi/env.c Fri Feb3 16:36:14 2017 > (r313165) > +++ head/sys/boot/efi/libefi/env.c Fri Feb3 16:39:10 2017 > (r313166) > @@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU > status = RS->GetVariable(varnamearg, matchguid, &attr, > &datasz, NULL); > if (status != EFI_BUFFER_TOO_SMALL) { > - printf("Can't get the variable: error %#lx\n", > status); > + printf("Can't get the variable: error %#lx\n", > + EFI_ERROR_CODE(status)); > return (CMD_ERROR); > } > data = malloc(datasz); > status = RS->GetVariable(varnamearg, matchguid, &attr, > &datasz, data); > if (status != EFI_SUCCESS) { > - printf("Can't get the variable: error %#lx\n", > status); > + printf("Can't get the variable: error %#lx\n", > + EFI_ERROR_CODE(status)); > return (CMD_ERROR); > } > uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); > From owner-svn-src-all@freebsd.org Fri Feb 3 16:49:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89605CCE3AE for ; Fri, 3 Feb 2017 16:49:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B3E61D16 for ; Fri, 3 Feb 2017 16:49:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x241.google.com with SMTP id f200so2192354itf.3 for ; Fri, 03 Feb 2017 08:49:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9Bqg0sdApvwXTZQRFDJK/1JtfJnK2GKvsRHavnGPzvI=; b=CNsL9y+8veBDI6BXsTunVYR2FoLAI+EgcPgonH0sdFqIapjX6Bxfh46icHHhmWIEwT T0kdfx8TxhoQptgbesFBc87T1wqoeNCYcJ61TcJFhbjY2VuYeMhEWCpyFwAib1UQzrhf qNwqTtqra43Mn1cmqf1sw6wL6/iv3+VzpprHJioRefORXSL0FbyT4ydIR/27N6EhYnzN hy9eDzLl0uzvdFo9Rg6qRyzYiSeTWUa465TUtxQbmkw5y2xxLsfRJxfEl4Wu952cfaXa AB32k70qdXFQRWIjovTRtlf/ta4IzYy+h9vmXa0HzIyB+eLfZMus5WmSV5O9EcX1uNCy Db1A== 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=9Bqg0sdApvwXTZQRFDJK/1JtfJnK2GKvsRHavnGPzvI=; b=mc0MsL0hRPlxuzifRIfZoi7PU1b2BxtHmwPAoII6eQDtDnYhFq+kka582EcRCf2mBB xL/BbT2DA84g6AY2gaGfSV6yLxfhSH5Z7dWluchXZNTwwKJcmJ9flis9XCIR+cCR3HtY ekpBAJQM3g7SYLgT7Ds+bgBnwd4o/wAKxiI4folvxD2gnEJzhFDCdatG84guHVEOqr2k HM/psnyNJN20KXWn0kjMYOAs6rlhkFEM1qruSszrjod99dPqwqAnQJKcKz4I0PP+ZM1p KzZtPBcQqrx2pSYcbnO/F0SR4dWsJmvropQaUUGD1eLsrU0cM+m0i2eLoPvYoWUX4H/v nVTQ== X-Gm-Message-State: AIkVDXJKPh9vEA6Qccq/4QJJh3sbFX7564KM1iw6bkhcclIFBMHXTc5WThSqFfkoMmMiib0Hma0379m+2VrRjw== X-Received: by 10.36.135.194 with SMTP id f185mr1729441ite.85.1486140567619; Fri, 03 Feb 2017 08:49:27 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Fri, 3 Feb 2017 08:49:27 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <1486140447.3017.189.camel@freebsd.org> References: <201702031639.v13GdAXQ074031@repo.freebsd.org> <1486140447.3017.189.camel@freebsd.org> From: Warner Losh Date: Fri, 3 Feb 2017 09:49:27 -0700 X-Google-Sender-Auth: drL7QisL4-XDiROGwtxjolJ7lZM Message-ID: Subject: Re: svn commit: r313166 - head/sys/boot/efi/libefi To: Ian Lepore Cc: Toomas Soome , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:49:28 -0000 On Fri, Feb 3, 2017 at 9:47 AM, Ian Lepore wrote: > On Fri, 2017-02-03 at 16:39 +0000, Toomas Soome wrote: >> Author: tsoome >> Date: Fri Feb 3 16:39:10 2017 >> New Revision: 313166 >> URL: https://svnweb.freebsd.org/changeset/base/313166 >> >> Log: >> loader: libefi/env.c warnings in arm build >> >> The arm build has revealed some of the warnings, the fix for CHAR16 >> warning is to switch the warning off for env.c (same as for >> efinet.c). >> > > How is disabling the warning instead of just fixing it the right thing > to do? I think disabling a printf format warning is never the right > thing to do, it just turns a compile warning into a runtime failure. Because clang's understanding of %S in the bootloader doesn't match how it's actually used and there's no casting that will fix that. Warner > -- Ian > >> For error code we need to use macro. >> >> Reported by: gjb >> Reviewed by: imp >> Approved by: imp (mentor) >> Differential Revision: https://reviews.freebsd.org/D9422 >> >> Modified: >> head/sys/boot/efi/libefi/Makefile >> head/sys/boot/efi/libefi/env.c >> >> Modified: head/sys/boot/efi/libefi/Makefile >> ===================================================================== >> ========= >> --- head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:36:14 2017 >> (r313165) >> +++ head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:39:10 2017 >> (r313166) >> @@ -26,6 +26,7 @@ SRCS+= time_event.c >> # of a short. There's no good cast to use here so just ignore the >> # warnings for now. >> CWARNFLAGS.efinet.c+= -Wno-format >> +CWARNFLAGS.env.c+= -Wno-format >> >> .if ${MACHINE_CPUARCH} == "aarch64" >> CFLAGS+= -msoft-float -mgeneral-regs-only >> >> Modified: head/sys/boot/efi/libefi/env.c >> ===================================================================== >> ========= >> --- head/sys/boot/efi/libefi/env.c Fri Feb 3 16:36:14 2017 >> (r313165) >> +++ head/sys/boot/efi/libefi/env.c Fri Feb 3 16:39:10 2017 >> (r313166) >> @@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU >> status = RS->GetVariable(varnamearg, matchguid, &attr, >> &datasz, NULL); >> if (status != EFI_BUFFER_TOO_SMALL) { >> - printf("Can't get the variable: error %#lx\n", >> status); >> + printf("Can't get the variable: error %#lx\n", >> + EFI_ERROR_CODE(status)); >> return (CMD_ERROR); >> } >> data = malloc(datasz); >> status = RS->GetVariable(varnamearg, matchguid, &attr, >> &datasz, data); >> if (status != EFI_SUCCESS) { >> - printf("Can't get the variable: error %#lx\n", >> status); >> + printf("Can't get the variable: error %#lx\n", >> + EFI_ERROR_CODE(status)); >> return (CMD_ERROR); >> } >> uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); >> > From owner-svn-src-all@freebsd.org Fri Feb 3 16:52:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8A71CCE728; Fri, 3 Feb 2017 16:52:54 +0000 (UTC) (envelope-from tsoome@me.com) Received: from st13p35im-asmtp002.me.com (st13p35im-asmtp002.me.com [17.164.199.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0DE7394; Fri, 3 Feb 2017 16:52:54 +0000 (UTC) (envelope-from tsoome@me.com) Received: from process-dkim-sign-daemon.st13p35im-asmtp002.me.com by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OKT00C005ES0H00@st13p35im-asmtp002.me.com>; Fri, 03 Feb 2017 16:52:48 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1486140768; bh=Nq/fDc7Y6OSrZ5c5SjailiQAqZTp0Fyf0BJL3z9+QOw=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=dz75ThfSYabfgeLC8qttlPnB0oejmY5t7IpJgdW0j0Bb2ZxtSsaXSvqF8qybpisq8 IaViPtwvsFBkeRJNL31+dXvbXYBqvlQ6IrJ4v7ScPgjl41Fc3Bhlz91GLyl9nf751l FkUISg3x88ksHNJinRzgWjBfksof8KPWlDmVAcGMxG2+w1Oc03pmpK8dfpQJGz1J4u +Jl2kzAghQzytsaXzYisQtfw1RV38dTzZlIdQ0cKp6Y+Qag4zWTBWgfc+uNVX3YkW6 QgpZ/UgTrkHyrIlJDTCnGWm4/5yauOky5vrhgKHRCT5sanO4/toBoDjxy8O/0owPsF 5tbHnbNj6yUzA== Received: from icloud.com ([127.0.0.1]) by st13p35im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OKT0036M5JXSS40@st13p35im-asmtp002.me.com>; Fri, 03 Feb 2017 16:52:48 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-03_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1702030162 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: svn commit: r313166 - head/sys/boot/efi/libefi From: Toomas Soome In-reply-to: <1486140447.3017.189.camel@freebsd.org> Date: Fri, 03 Feb 2017 18:52:45 +0200 Cc: Toomas Soome , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-transfer-encoding: quoted-printable Message-id: <19994E26-42EE-4E12-9867-1E53FA2A7F81@me.com> References: <201702031639.v13GdAXQ074031@repo.freebsd.org> <1486140447.3017.189.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3259) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:52:55 -0000 > On 3. veebr 2017, at 18:47, Ian Lepore wrote: >=20 > On Fri, 2017-02-03 at 16:39 +0000, Toomas Soome wrote: >> Author: tsoome >> Date: Fri Feb 3 16:39:10 2017 >> New Revision: 313166 >> URL: https://svnweb.freebsd.org/changeset/base/313166 >>=20 >> Log: >> loader: libefi/env.c warnings in arm build >> =20 >> The arm build has revealed some of the warnings, the fix for CHAR16 >> warning is to switch the warning off for env.c (same as for >> efinet.c). >> =20 >=20 > How is disabling the warning instead of just fixing it the right thing > to do? I think disabling a printf format warning is never the right > thing to do, it just turns a compile warning into a runtime failure. I would love to see the correct fix - as all UEFI chars are 2 byte; but = thats up to arm experts. I just do not know the details why the arm is = stuck with 4 byte wchar_t there - Im sure they do not have this just for = fun:) rgds, toomas >=20 > -- Ian >=20 >> For error code we need to use macro. >> =20 >> Reported by: gjb >> Reviewed by: imp >> Approved by: imp (mentor) >> Differential Revision: https://reviews.freebsd.org/D9422 >>=20 >> Modified: >> head/sys/boot/efi/libefi/Makefile >> head/sys/boot/efi/libefi/env.c >>=20 >> Modified: head/sys/boot/efi/libefi/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:36:14 2017 >> (r313165) >> +++ head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:39:10 2017 >> (r313166) >> @@ -26,6 +26,7 @@ SRCS+=3D time_event.c >> # of a short. There's no good cast to use here so just ignore the >> # warnings for now. >> CWARNFLAGS.efinet.c+=3D -Wno-format >> +CWARNFLAGS.env.c+=3D -Wno-format >> =20 >> .if ${MACHINE_CPUARCH} =3D=3D "aarch64" >> CFLAGS+=3D -msoft-float -mgeneral-regs-only >>=20 >> Modified: head/sys/boot/efi/libefi/env.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/boot/efi/libefi/env.c Fri Feb 3 16:36:14 2017=09 >> (r313165) >> +++ head/sys/boot/efi/libefi/env.c Fri Feb 3 16:39:10 2017=09 >> (r313166) >> @@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU >> status =3D RS->GetVariable(varnamearg, matchguid, &attr, >> &datasz, NULL); >> if (status !=3D EFI_BUFFER_TOO_SMALL) { >> - printf("Can't get the variable: error %#lx\n", >> status); >> + printf("Can't get the variable: error %#lx\n", >> + EFI_ERROR_CODE(status)); >> return (CMD_ERROR); >> } >> data =3D malloc(datasz); >> status =3D RS->GetVariable(varnamearg, matchguid, &attr, >> &datasz, data); >> if (status !=3D EFI_SUCCESS) { >> - printf("Can't get the variable: error %#lx\n", >> status); >> + printf("Can't get the variable: error %#lx\n", >> + EFI_ERROR_CODE(status)); >> return (CMD_ERROR); >> } >> uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); >>=20 From owner-svn-src-all@freebsd.org Fri Feb 3 16:57:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 746D3CCE831; Fri, 3 Feb 2017 16:57:15 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40FC77C3; Fri, 3 Feb 2017 16:57:15 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13GvE4E081781; Fri, 3 Feb 2017 16:57:14 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13GvEWV081780; Fri, 3 Feb 2017 16:57:14 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702031657.v13GvEWV081780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Fri, 3 Feb 2017 16:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313167 - stable/11/bin/dd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 16:57:15 -0000 Author: sevan (doc committer) Date: Fri Feb 3 16:57:14 2017 New Revision: 313167 URL: https://svnweb.freebsd.org/changeset/base/313167 Log: Add history section for dd(1) First version of UNIX to include dd found using TUHS http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c PR: 211777 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104 Modified: stable/11/bin/dd/dd.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/dd/dd.1 ============================================================================== --- stable/11/bin/dd/dd.1 Fri Feb 3 16:39:10 2017 (r313166) +++ stable/11/bin/dd/dd.1 Fri Feb 3 16:57:14 2017 (r313167) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd February 28, 2016 +.Dd October 5, 2016 .Dt DD 1 .Os .Sh NAME @@ -447,6 +447,11 @@ and values are extensions to the .Tn POSIX standard. +.Sh HISTORY +A +.Nm +command appeared in +.At v5 . .Sh BUGS Protection mechanisms in the .Xr geom 4 From owner-svn-src-all@freebsd.org Fri Feb 3 17:02:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF70BCCEA79; Fri, 3 Feb 2017 17:02:58 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ED6FBD3; Fri, 3 Feb 2017 17:02:58 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13H2vVr085601; Fri, 3 Feb 2017 17:02:57 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13H2v8m085599; Fri, 3 Feb 2017 17:02:57 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201702031702.v13H2v8m085599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Fri, 3 Feb 2017 17:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313168 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 17:02:58 -0000 Author: pkelsey Date: Fri Feb 3 17:02:57 2017 New Revision: 313168 URL: https://svnweb.freebsd.org/changeset/base/313168 Log: Fix VIMAGE-related bugs in TFO. The autokey callout vnet context was not being initialized, and the per-vnet fastopen context was only being initialized for the default vnet. PR: 216613 Reported by: Alex Deiter MFC after: 1 week Modified: head/sys/netinet/tcp_fastopen.c head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_fastopen.c ============================================================================== --- head/sys/netinet/tcp_fastopen.c Fri Feb 3 16:57:14 2017 (r313167) +++ head/sys/netinet/tcp_fastopen.c Fri Feb 3 17:02:57 2017 (r313168) @@ -209,6 +209,7 @@ tcp_fastopen_init(void) rm_init(&V_tcp_fastopen_keylock, "tfo_keylock"); callout_init_rm(&V_tcp_fastopen_autokey_ctx.c, &V_tcp_fastopen_keylock, 0); + V_tcp_fastopen_autokey_ctx.v = curvnet; V_tcp_fastopen_keys.newest = TCP_FASTOPEN_MAX_KEYS - 1; } Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Fri Feb 3 16:57:14 2017 (r313167) +++ head/sys/netinet/tcp_subr.c Fri Feb 3 17:02:57 2017 (r313168) @@ -679,6 +679,10 @@ tcp_init(void) V_sack_hole_zone = uma_zcreate("sackhole", sizeof(struct sackhole), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); +#ifdef TCP_RFC7413 + tcp_fastopen_init(); +#endif + /* Skip initialization of globals for non-default instances. */ if (!IS_DEFAULT_VNET(curvnet)) return; @@ -732,10 +736,6 @@ tcp_init(void) #ifdef TCPPCAP tcp_pcap_init(); #endif - -#ifdef TCP_RFC7413 - tcp_fastopen_init(); -#endif } #ifdef VIMAGE From owner-svn-src-all@freebsd.org Fri Feb 3 18:20:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D69DECCF97F for ; Fri, 3 Feb 2017 18:20:25 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAAB1116 for ; Fri, 3 Feb 2017 18:20:25 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 67f13715-ea3d-11e6-b3c2-c9f38144898e 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 outbound2.ore.mailhop.org (Halon) with ESMTPSA id 67f13715-ea3d-11e6-b3c2-c9f38144898e; Fri, 03 Feb 2017 18:20:14 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v13IKHx1024545; Fri, 3 Feb 2017 11:20:17 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1486146017.3017.193.camel@freebsd.org> Subject: Re: svn commit: r313166 - head/sys/boot/efi/libefi From: Ian Lepore To: Toomas Soome Cc: Toomas Soome , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 03 Feb 2017 11:20:17 -0700 In-Reply-To: <19994E26-42EE-4E12-9867-1E53FA2A7F81@me.com> References: <201702031639.v13GdAXQ074031@repo.freebsd.org> <1486140447.3017.189.camel@freebsd.org> <19994E26-42EE-4E12-9867-1E53FA2A7F81@me.com> 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 18:20:25 -0000 On Fri, 2017-02-03 at 18:52 +0200, Toomas Soome wrote: > > > > On 3. veebr 2017, at 18:47, Ian Lepore wrote: > > > > On Fri, 2017-02-03 at 16:39 +0000, Toomas Soome wrote: > > > > > > Author: tsoome > > > Date: Fri Feb3 16:39:10 2017 > > > New Revision: 313166 > > > URL: https://svnweb.freebsd.org/changeset/base/313166 > > > > > > Log: > > > loader: libefi/env.c warnings in arm build > > > > > > The arm build has revealed some of the warnings, the fix for > > > CHAR16 > > > warning is to switch the warning off for env.c (same as for > > > efinet.c). > > > > > How is disabling the warning instead of just fixing it the right > > thing > > to do?I think disabling a printf format warning is never the > > right > > thing to do, it just turns a compile warning into a runtime > > failure. > > I would love to see the correct fix - as all UEFI chars are 2 byte; > but thats up to arm experts. I just do not know the details why the > arm is stuck with 4 byte wchar_t there - Im sure they do not have > this just for fun:) > > rgds, > toomas Hmm, looks like the right fix is to add -fshort-wchar to CFLAGS, but it's got to be consistant across all the libraries that get linked, and some of them are used in the non-efi case too. I'll have a closer look at whether we can fix it properly over the next few days. -- Ian From owner-svn-src-all@freebsd.org Fri Feb 3 19:09:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEFE3CCF644; Fri, 3 Feb 2017 19:09:48 +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 C6C756B9; Fri, 3 Feb 2017 19:09:48 +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 v13J9l9s035895; Fri, 3 Feb 2017 19:09:47 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13J9kGN035880; Fri, 3 Feb 2017 19:09:46 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201702031909.v13J9kGN035880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 3 Feb 2017 19:09:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313169 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:09:49 -0000 Author: wblock (doc committer) Date: Fri Feb 3 19:09:46 2017 New Revision: 313169 URL: https://svnweb.freebsd.org/changeset/base/313169 Log: Clarify some option descriptions, add a line of text to makeman to add the slightest hint of a shade of a clue of what it does. Sponsored by: iXsystems Modified: head/tools/build/options/WITHOUT_BLACKLIST head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP head/tools/build/options/WITHOUT_CROSS_COMPILER head/tools/build/options/WITHOUT_DIALOG head/tools/build/options/WITHOUT_DMAGENT head/tools/build/options/WITHOUT_DOCCOMPRESS head/tools/build/options/WITHOUT_GPL_DTC head/tools/build/options/WITHOUT_INSTALLLIB head/tools/build/options/WITHOUT_KERBEROS head/tools/build/options/WITH_CCACHE_BUILD head/tools/build/options/WITH_DIRDEPS_BUILD head/tools/build/options/WITH_INSTALL_AS_USER head/tools/build/options/WITH_META_MODE head/tools/build/options/WITH_STAGING_MAN head/tools/build/options/makeman Modified: head/tools/build/options/WITHOUT_BLACKLIST ============================================================================== --- head/tools/build/options/WITHOUT_BLACKLIST Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITHOUT_BLACKLIST Fri Feb 3 19:09:46 2017 (r313169) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set this if you do not want to build blacklistd / blacklistctl. +Set this if you do not want to build blacklistd/blacklistctl. Modified: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP ============================================================================== --- head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP Fri Feb 3 19:09:46 2017 (r313169) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. -You must enable either gcc or clang bootstrap to be able to build the system, -unless an alternative compiler is provided via -XCC. +Set to not build the Clang C/C++ compiler during the bootstrap phase of +the build. +To be able to build the system, either gcc or clang bootstrap must be +enabled unless an alternate compiler is provided via XCC. Modified: head/tools/build/options/WITHOUT_CROSS_COMPILER ============================================================================== --- head/tools/build/options/WITHOUT_CROSS_COMPILER Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITHOUT_CROSS_COMPILER Fri Feb 3 19:09:46 2017 (r313169) @@ -1,10 +1,10 @@ .\" $FreeBSD$ Set to not build any cross compiler in the cross-tools stage of buildworld. -If you are compiling a different version of +When compiling a different version of .Fx -than what is installed on the system, you will need to provide an alternate +than what is installed on the system, provide an alternate compiler with XCC to ensure success. -If you are compiling with an identical version of +When compiling with an identical version of .Fx to the host, this option may be safely used. This option may also be safe when the host version of Modified: head/tools/build/options/WITHOUT_DIALOG ============================================================================== --- head/tools/build/options/WITHOUT_DIALOG Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITHOUT_DIALOG Fri Feb 3 19:09:46 2017 (r313169) @@ -1,2 +1,7 @@ .\" $FreeBSD$ -Set to not build dialog(1), dialog(1,3), and dpv(1,3). +Set to not build +.Xr dialog 1 , +.Xr dialog 3 , +.Xr dpv 1 , +and +.Xr dpv 3 . Modified: head/tools/build/options/WITHOUT_DMAGENT ============================================================================== --- head/tools/build/options/WITHOUT_DMAGENT Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITHOUT_DMAGENT Fri Feb 3 19:09:46 2017 (r313169) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to not build dma Mail Transport Agent +Set to not build dma Mail Transport Agent. Modified: head/tools/build/options/WITHOUT_DOCCOMPRESS ============================================================================== --- head/tools/build/options/WITHOUT_DOCCOMPRESS Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITHOUT_DOCCOMPRESS Fri Feb 3 19:09:46 2017 (r313169) @@ -1,3 +1,3 @@ .\" $FreeBSD$ -Set to not to install compressed system documentation. +Set to not install compressed system documentation. Only the uncompressed version will be installed. Modified: head/tools/build/options/WITHOUT_GPL_DTC ============================================================================== --- head/tools/build/options/WITHOUT_GPL_DTC Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITHOUT_GPL_DTC Fri Feb 3 19:09:46 2017 (r313169) @@ -1,3 +1,3 @@ .\" $FreeBSD$ -Set to build the BSD licensed version of the device tree compiler, instead of the -GPL'd one from elinux.org. +Set to build the BSD licensed version of the device tree compiler rather +than the GPLed one from elinux.org. Modified: head/tools/build/options/WITHOUT_INSTALLLIB ============================================================================== --- head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb 3 19:09:46 2017 (r313169) @@ -1,6 +1,6 @@ .\" $FreeBSD$ -Set this if you do not want to install optional libraries. -For example when creating a +Set this if to not install optional libraries. +For example, when creating a .Xr nanobsd 8 image. .Bf -symbolic Modified: head/tools/build/options/WITHOUT_KERBEROS ============================================================================== --- head/tools/build/options/WITHOUT_KERBEROS Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITHOUT_KERBEROS Fri Feb 3 19:09:46 2017 (r313169) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set this if you do not want to build Kerberos 5 (KTH Heimdal). +Set this to not build Kerberos 5 (KTH Heimdal). Modified: head/tools/build/options/WITH_CCACHE_BUILD ============================================================================== --- head/tools/build/options/WITH_CCACHE_BUILD Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITH_CCACHE_BUILD Fri Feb 3 19:09:46 2017 (r313169) @@ -5,9 +5,9 @@ for the build. No configuration is required except to install the .Sy devel/ccache package. -Using with -.Xr distcc 1 -should set +When using with +.Xr distcc 1 , +set .Sy CCACHE_PREFIX=/usr/local/bin/distcc . The default cache directory of .Pa $HOME/.ccache Modified: head/tools/build/options/WITH_DIRDEPS_BUILD ============================================================================== --- head/tools/build/options/WITH_DIRDEPS_BUILD Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITH_DIRDEPS_BUILD Fri Feb 3 19:09:46 2017 (r313169) @@ -11,23 +11,24 @@ Makefile.depend files found in each dire .Pp The build can be started from anywhere, and behaves the same. The initial instance of -.Xr make 1 +.Xr make 1 recursively reads .Va DIRDEPS -from Makefile.depend +from +.Pa Makefile.depend , computing a graph of tree dependencies from the current origin. Setting .Va NO_DIRDEPS -will skip checking dirdep dependencies and will only build in the current +skips checking dirdep dependencies and will only build in the current and child directories. .Va NO_DIRDEPS_BELOW -will skip building any dirdeps and only build the current directory. +skips building any dirdeps and only build the current directory. .Pp This also utilizes the .Va WITH_META_MODE logic for incremental builds. .Pp -The build will hide commands ran unless +The build hides commands executed unless .Va NO_SILENT is defined. .Pp Modified: head/tools/build/options/WITH_INSTALL_AS_USER ============================================================================== --- head/tools/build/options/WITH_INSTALL_AS_USER Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITH_INSTALL_AS_USER Fri Feb 3 19:09:46 2017 (r313169) @@ -4,6 +4,6 @@ files with owner and group attributes se the .Xr make 1 command. -The user still has to set the +The user still must set the .Va DESTDIR variable to point to a directory where the user has write permissions. Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITH_META_MODE Fri Feb 3 19:09:46 2017 (r313169) @@ -1,22 +1,22 @@ .\" $FreeBSD$ -Creates +Create .Xr make 1 meta files when building, which can provide a reliable incremental build when using .Xr filemon 4 . -The meta file is created in the OBJDIR as +The meta file is created in OBJDIR as .Pa target.meta . -These meta files track the command ran, its output, and the current directory. +These meta files track the command that was executed, its output, and the +current directory. The .Xr filemon 4 module is required unless .Va NO_FILEMON is defined. -When the module is loaded, any files used by the commands executed will be -tracked as -dependencies for the target in its meta file. -The target will be considered out-of-date and rebuilt if any of the following -are true compared to the last build: +When the module is loaded, any files used by the commands executed are +tracked as dependencies for the target in its meta file. +The target is considered out-of-date and rebuilt if any of these +conditions are true compared to the last build: .Bl -bullet -compact .It The command to execute changes. @@ -38,10 +38,10 @@ Files read, written, executed or linked .El The meta files can also be useful for debugging. .Pp -The build will hide commands ran unless +The build hides commands that are executed unless .Va NO_SILENT is defined. -Errors will cause +Errors cause .Xr make 1 to show some of its environment for further debugging. .Pp Modified: head/tools/build/options/WITH_STAGING_MAN ============================================================================== --- head/tools/build/options/WITH_STAGING_MAN Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/WITH_STAGING_MAN Fri Feb 3 19:09:46 2017 (r313169) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Enable staging of MAN pages to stage tree. +Enable staging of man pages to stage tree. Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Fri Feb 3 17:02:57 2017 (r313168) +++ head/tools/build/options/makeman Fri Feb 3 19:09:46 2017 (r313169) @@ -8,7 +8,7 @@ export LC_ALL=C ident='$FreeBSD$' t=$(mktemp -d -t makeman) -trap 'test -d $t && rm -rf $t' exit +# trap 'test -d $t && rm -rf $t' exit srcdir=$(realpath ../../..) make="make -C $srcdir -m $srcdir/share/mk" @@ -124,6 +124,7 @@ show() main() { + echo "building src.conf.5 man page from files in ${PWD}" >&2 ident=${ident#$} ident=${ident% $} @@ -217,11 +218,11 @@ even if they would be set to .Dq Li FALSE or .Dq Li NO . -Just the existence of an option will cause -it to be honoured by +The presence of an option causes +it to be honored by .Xr make 1 . .Pp -The following list provides a name and short description for variables +This list provides a name and short description for variables that can be used for source builds. .Bl -tag -width indent EOF @@ -246,7 +247,7 @@ EOF sed -e's/\$\(FreeBSD: .*\) \$/from \1/' ${opt} if [ -n "${targets}" ] ; then echo '.Pp' - echo 'It is a default setting on' + echo 'This is a default setting on' echo $(echo ${targets} | sed -e's/ /, /g' -e's/\(.*\), /\1 and /'). fi @@ -278,7 +279,7 @@ EOF havedeps=0 if [ -s $t/deps ] ; then havedeps=1 - echo 'When set, it also enforces the following options:' + echo 'When set, it enforces these options:' echo '.Pp' echo '.Bl -item -compact' while read opt2 ; do @@ -292,7 +293,7 @@ EOF if [ ${havedeps} -eq 1 ] ; then echo '.Pp' fi - echo 'When set, the following options are also in effect:' + echo 'When set, these options are also in effect:' echo '.Pp' echo '.Bl -inset -compact' while read opt2 ; do From owner-svn-src-all@freebsd.org Fri Feb 3 19:12:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C293CCF7DA; Fri, 3 Feb 2017 19:12:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2475AAFB; Fri, 3 Feb 2017 19:12:56 +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 v13JCtYd039696; Fri, 3 Feb 2017 19:12:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13JCsAS039690; Fri, 3 Feb 2017 19:12:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702031912.v13JCsAS039690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 3 Feb 2017 19:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313170 - in stable/11/contrib/llvm: include/llvm/Analysis lib/Analysis lib/Transforms/Scalar X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:12:56 -0000 Author: dim Date: Fri Feb 3 19:12:54 2017 New Revision: 313170 URL: https://svnweb.freebsd.org/changeset/base/313170 Log: MFC r312832: Pull in r278160 from upstream llvm trunk (by Wei Mi): Recommit "Use ValueOffsetPair to enhance value reuse during SCEV expansion". The fix for PR28705 will be committed consecutively. In D12090, the ExprValueMap was added to reuse existing value during SCEV expansion. However, const folding and sext/zext distribution can make the reuse still difficult. A simplified case is: suppose we know S1 expands to V1 in ExprValueMap, and S1 = S2 + C_a S3 = S2 + C_b where C_a and C_b are different SCEVConstants. Then we'd like to expand S3 as V1 - C_a + C_b instead of expanding S2 literally. It is helpful when S2 is a complex SCEV expr and S2 has no entry in ExprValueMap, which is usually caused by the fact that S3 is generated from S1 after const folding. In order to do that, we represent ExprValueMap as a mapping from SCEV to ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a} into the ExprValueMap when we create SCEV for V1. When S3 is expanded, it will first expand S2 to V1 - C_a because of S2->{V1, C_a} in the map, then expand S3 to V1 - C_a + C_b. Differential Revision: https://reviews.llvm.org/D21313 Pull in r278161 from upstream llvm trunk (by Wei Mi): Fix the runtime error caused by "Use ValueOffsetPair to enhance value reuse during SCEV expansion". The patch is to fix the bug in PR28705. It was caused by setting wrong return value for SCEVExpander::findExistingExpansion. The return values of findExistingExpansion have different meanings when the function is used in different ways so it is easy to make mistake. The fix creates two new interfaces to replace SCEVExpander::findExistingExpansion, and specifies where each interface is expected to be used. Differential Revision: https://reviews.llvm.org/D22942 Pull in r281439 from upstream llvm trunk (by Wei Mi): Create a getelementptr instead of sub expr for ValueOffsetPair if the value is a pointer. This patch is to fix PR30213. When expanding an expr based on ValueOffsetPair, if the value is of pointer type, we can only create a getelementptr instead of sub expr. Differential Revision: https://reviews.llvm.org/D24088 This should fix assertion failures when building OpenCV >= 3.1, and also allow building lang/spidermonkey24 without any further assertions. PR: 215649 Modified: stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h Fri Feb 3 19:12:54 2017 (r313170) @@ -495,10 +495,29 @@ namespace llvm { /// The typedef for ExprValueMap. /// - typedef DenseMap> ExprValueMapType; + typedef std::pair ValueOffsetPair; + typedef DenseMap> ExprValueMapType; /// ExprValueMap -- This map records the original values from which /// the SCEV expr is generated from. + /// + /// We want to represent the mapping as SCEV -> ValueOffsetPair instead + /// of SCEV -> Value: + /// Suppose we know S1 expands to V1, and + /// S1 = S2 + C_a + /// S3 = S2 + C_b + /// where C_a and C_b are different SCEVConstants. Then we'd like to + /// expand S3 as V1 - C_a + C_b instead of expanding S2 literally. + /// It is helpful when S2 is a complex SCEV expr. + /// + /// In order to do that, we represent ExprValueMap as a mapping from + /// SCEV to ValueOffsetPair. We will save both S1->{V1, 0} and + /// S2->{V1, C_a} into the map when we create SCEV for V1. When S3 + /// is expanded, it will first expand S2 to V1 - C_a because of + /// S2->{V1, C_a} in the map, then expand S3 to V1 - C_a + C_b. + /// + /// Note: S->{V, Offset} in the ExprValueMap means S can be expanded + /// to V - Offset. ExprValueMapType ExprValueMap; /// The typedef for ValueExprMap. @@ -1181,7 +1200,7 @@ namespace llvm { bool containsAddRecurrence(const SCEV *S); /// Return the Value set from which the SCEV expr is generated. - SetVector *getSCEVValues(const SCEV *S); + SetVector *getSCEVValues(const SCEV *S); /// Erase Value from ValueExprMap and ExprValueMap. void eraseValueFromMap(Value *V); Modified: stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h Fri Feb 3 19:12:54 2017 (r313170) @@ -14,6 +14,7 @@ #ifndef LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H #define LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H +#include "llvm/ADT/Optional.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/ScalarEvolutionNormalization.h" #include "llvm/Analysis/TargetFolder.h" @@ -284,7 +285,15 @@ namespace llvm { void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); } - /// \brief Try to find LLVM IR value for S available at the point At. + /// Try to find existing LLVM IR value for S available at the point At. + Value *getExactExistingExpansion(const SCEV *S, const Instruction *At, + Loop *L); + + /// Try to find the ValueOffsetPair for S. The function is mainly + /// used to check whether S can be expanded cheaply. + /// If this returns a non-None value, we know we can codegen the + /// `ValueOffsetPair` into a suitable expansion identical with S + /// so that S can be expanded cheaply. /// /// L is a hint which tells in which loop to look for the suitable value. /// On success return value which is equivalent to the expanded S at point @@ -292,7 +301,9 @@ namespace llvm { /// /// Note that this function does not perform an exhaustive search. I.e if it /// didn't find any value it does not mean that there is no such value. - Value *findExistingExpansion(const SCEV *S, const Instruction *At, Loop *L); + /// + Optional + getRelatedExistingExpansion(const SCEV *S, const Instruction *At, Loop *L); private: LLVMContext &getContext() const { return SE.getContext(); } @@ -325,7 +336,8 @@ namespace llvm { PointerType *PTy, Type *Ty, Value *V); /// \brief Find a previous Value in ExprValueMap for expand. - Value *FindValueInExprValueMap(const SCEV *S, const Instruction *InsertPt); + ScalarEvolution::ValueOffsetPair + FindValueInExprValueMap(const SCEV *S, const Instruction *InsertPt); Value *expand(const SCEV *S); Modified: stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/lib/Analysis/ScalarEvolution.cpp Fri Feb 3 19:12:54 2017 (r313170) @@ -3378,8 +3378,28 @@ bool ScalarEvolution::containsAddRecurre return F.FoundOne; } -/// Return the Value set from S. -SetVector *ScalarEvolution::getSCEVValues(const SCEV *S) { +/// Try to split a SCEVAddExpr into a pair of {SCEV, ConstantInt}. +/// If \p S is a SCEVAddExpr and is composed of a sub SCEV S' and an +/// offset I, then return {S', I}, else return {\p S, nullptr}. +static std::pair splitAddExpr(const SCEV *S) { + const auto *Add = dyn_cast(S); + if (!Add) + return {S, nullptr}; + + if (Add->getNumOperands() != 2) + return {S, nullptr}; + + auto *ConstOp = dyn_cast(Add->getOperand(0)); + if (!ConstOp) + return {S, nullptr}; + + return {Add->getOperand(1), ConstOp->getValue()}; +} + +/// Return the ValueOffsetPair set for \p S. \p S can be represented +/// by the value and offset from any ValueOffsetPair in the set. +SetVector * +ScalarEvolution::getSCEVValues(const SCEV *S) { ExprValueMapType::iterator SI = ExprValueMap.find_as(S); if (SI == ExprValueMap.end()) return nullptr; @@ -3387,24 +3407,31 @@ SetVector *ScalarEvolution::get if (VerifySCEVMap) { // Check there is no dangling Value in the set returned. for (const auto &VE : SI->second) - assert(ValueExprMap.count(VE)); + assert(ValueExprMap.count(VE.first)); } #endif return &SI->second; } -/// Erase Value from ValueExprMap and ExprValueMap. If ValueExprMap.erase(V) is -/// not used together with forgetMemoizedResults(S), eraseValueFromMap should be -/// used instead to ensure whenever V->S is removed from ValueExprMap, V is also -/// removed from the set of ExprValueMap[S]. +/// Erase Value from ValueExprMap and ExprValueMap. ValueExprMap.erase(V) +/// cannot be used separately. eraseValueFromMap should be used to remove +/// V from ValueExprMap and ExprValueMap at the same time. void ScalarEvolution::eraseValueFromMap(Value *V) { ValueExprMapType::iterator I = ValueExprMap.find_as(V); if (I != ValueExprMap.end()) { const SCEV *S = I->second; - SetVector *SV = getSCEVValues(S); - // Remove V from the set of ExprValueMap[S] - if (SV) - SV->remove(V); + // Remove {V, 0} from the set of ExprValueMap[S] + if (SetVector *SV = getSCEVValues(S)) + SV->remove({V, nullptr}); + + // Remove {V, Offset} from the set of ExprValueMap[Stripped] + const SCEV *Stripped; + ConstantInt *Offset; + std::tie(Stripped, Offset) = splitAddExpr(S); + if (Offset != nullptr) { + if (SetVector *SV = getSCEVValues(Stripped)) + SV->remove({V, Offset}); + } ValueExprMap.erase(V); } } @@ -3419,11 +3446,26 @@ const SCEV *ScalarEvolution::getSCEV(Val S = createSCEV(V); // During PHI resolution, it is possible to create two SCEVs for the same // V, so it is needed to double check whether V->S is inserted into - // ValueExprMap before insert S->V into ExprValueMap. + // ValueExprMap before insert S->{V, 0} into ExprValueMap. std::pair Pair = ValueExprMap.insert({SCEVCallbackVH(V, this), S}); - if (Pair.second) - ExprValueMap[S].insert(V); + if (Pair.second) { + ExprValueMap[S].insert({V, nullptr}); + + // If S == Stripped + Offset, add Stripped -> {V, Offset} into + // ExprValueMap. + const SCEV *Stripped = S; + ConstantInt *Offset = nullptr; + std::tie(Stripped, Offset) = splitAddExpr(S); + // If stripped is SCEVUnknown, don't bother to save + // Stripped -> {V, offset}. It doesn't simplify and sometimes even + // increase the complexity of the expansion code. + // If V is GetElementPtrInst, don't save Stripped -> {V, offset} + // because it may generate add/sub instead of GEP in SCEV expansion. + if (Offset != nullptr && !isa(Stripped) && + !isa(V)) + ExprValueMap[Stripped].insert({V, Offset}); + } } return S; } @@ -3436,8 +3478,8 @@ const SCEV *ScalarEvolution::getExisting const SCEV *S = I->second; if (checkValidity(S)) return S; + eraseValueFromMap(V); forgetMemoizedResults(S); - ValueExprMap.erase(I); } return nullptr; } @@ -3675,8 +3717,8 @@ void ScalarEvolution::forgetSymbolicName if (!isa(I) || !isa(Old) || (I != PN && Old == SymName)) { + eraseValueFromMap(It->first); forgetMemoizedResults(Old); - ValueExprMap.erase(It); } } @@ -4055,7 +4097,7 @@ const SCEV *ScalarEvolution::createAddRe // to create an AddRecExpr for this PHI node. We can not keep this temporary // as it will prevent later (possibly simpler) SCEV expressions to be added // to the ValueExprMap. - ValueExprMap.erase(PN); + eraseValueFromMap(PN); } return nullptr; @@ -5435,8 +5477,8 @@ ScalarEvolution::getBackedgeTakenInfo(co // case, createNodeForPHI will perform the necessary updates on its // own when it gets to that point. if (!isa(I) || !isa(Old)) { + eraseValueFromMap(It->first); forgetMemoizedResults(Old); - ValueExprMap.erase(It); } if (PHINode *PN = dyn_cast(I)) ConstantEvolutionLoopExitValue.erase(PN); @@ -5481,8 +5523,8 @@ void ScalarEvolution::forgetLoop(const L ValueExprMapType::iterator It = ValueExprMap.find_as(static_cast(I)); if (It != ValueExprMap.end()) { + eraseValueFromMap(It->first); forgetMemoizedResults(It->second); - ValueExprMap.erase(It); if (PHINode *PN = dyn_cast(I)) ConstantEvolutionLoopExitValue.erase(PN); } @@ -5515,8 +5557,8 @@ void ScalarEvolution::forgetValue(Value ValueExprMapType::iterator It = ValueExprMap.find_as(static_cast(I)); if (It != ValueExprMap.end()) { + eraseValueFromMap(It->first); forgetMemoizedResults(It->second); - ValueExprMap.erase(It); if (PHINode *PN = dyn_cast(I)) ConstantEvolutionLoopExitValue.erase(PN); } Modified: stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp Fri Feb 3 19:12:54 2017 (r313170) @@ -1625,9 +1625,10 @@ Value *SCEVExpander::expandCodeFor(const return V; } -Value *SCEVExpander::FindValueInExprValueMap(const SCEV *S, - const Instruction *InsertPt) { - SetVector *Set = SE.getSCEVValues(S); +ScalarEvolution::ValueOffsetPair +SCEVExpander::FindValueInExprValueMap(const SCEV *S, + const Instruction *InsertPt) { + SetVector *Set = SE.getSCEVValues(S); // If the expansion is not in CanonicalMode, and the SCEV contains any // sub scAddRecExpr type SCEV, it is required to expand the SCEV literally. if (CanonicalMode || !SE.containsAddRecurrence(S)) { @@ -1636,21 +1637,21 @@ Value *SCEVExpander::FindValueInExprValu // Choose a Value from the set which dominates the insertPt. // insertPt should be inside the Value's parent loop so as not to break // the LCSSA form. - for (auto const &Ent : *Set) { + for (auto const &VOPair : *Set) { + Value *V = VOPair.first; + ConstantInt *Offset = VOPair.second; Instruction *EntInst = nullptr; - if (Ent && isa(Ent) && - (EntInst = cast(Ent)) && - S->getType() == Ent->getType() && + if (V && isa(V) && (EntInst = cast(V)) && + S->getType() == V->getType() && EntInst->getFunction() == InsertPt->getFunction() && SE.DT.dominates(EntInst, InsertPt) && (SE.LI.getLoopFor(EntInst->getParent()) == nullptr || - SE.LI.getLoopFor(EntInst->getParent())->contains(InsertPt))) { - return Ent; - } + SE.LI.getLoopFor(EntInst->getParent())->contains(InsertPt))) + return {V, Offset}; } } } - return nullptr; + return {nullptr, nullptr}; } // The expansion of SCEV will either reuse a previous Value in ExprValueMap, @@ -1698,11 +1699,33 @@ Value *SCEVExpander::expand(const SCEV * Builder.SetInsertPoint(InsertPt); // Expand the expression into instructions. - Value *V = FindValueInExprValueMap(S, InsertPt); + ScalarEvolution::ValueOffsetPair VO = FindValueInExprValueMap(S, InsertPt); + Value *V = VO.first; if (!V) V = visit(S); - + else if (VO.second) { + if (PointerType *Vty = dyn_cast(V->getType())) { + Type *Ety = Vty->getPointerElementType(); + int64_t Offset = VO.second->getSExtValue(); + int64_t ESize = SE.getTypeSizeInBits(Ety); + if ((Offset * 8) % ESize == 0) { + ConstantInt *Idx = + ConstantInt::getSigned(VO.second->getType(), -(Offset * 8) / ESize); + V = Builder.CreateGEP(Ety, V, Idx, "scevgep"); + } else { + ConstantInt *Idx = + ConstantInt::getSigned(VO.second->getType(), -Offset); + unsigned AS = Vty->getAddressSpace(); + V = Builder.CreateBitCast(V, Type::getInt8PtrTy(SE.getContext(), AS)); + V = Builder.CreateGEP(Type::getInt8Ty(SE.getContext()), V, Idx, + "uglygep"); + V = Builder.CreateBitCast(V, Vty); + } + } else { + V = Builder.CreateSub(V, VO.second); + } + } // Remember the expanded value for this SCEV at this location. // // This is independent of PostIncLoops. The mapped value simply materializes @@ -1887,8 +1910,18 @@ unsigned SCEVExpander::replaceCongruentI return NumElim; } -Value *SCEVExpander::findExistingExpansion(const SCEV *S, - const Instruction *At, Loop *L) { +Value *SCEVExpander::getExactExistingExpansion(const SCEV *S, + const Instruction *At, Loop *L) { + Optional VO = + getRelatedExistingExpansion(S, At, L); + if (VO && VO.getValue().second == nullptr) + return VO.getValue().first; + return nullptr; +} + +Optional +SCEVExpander::getRelatedExistingExpansion(const SCEV *S, const Instruction *At, + Loop *L) { using namespace llvm::PatternMatch; SmallVector ExitingBlocks; @@ -1906,22 +1939,23 @@ Value *SCEVExpander::findExistingExpansi continue; if (SE.getSCEV(LHS) == S && SE.DT.dominates(LHS, At)) - return LHS; + return ScalarEvolution::ValueOffsetPair(LHS, nullptr); if (SE.getSCEV(RHS) == S && SE.DT.dominates(RHS, At)) - return RHS; + return ScalarEvolution::ValueOffsetPair(RHS, nullptr); } // Use expand's logic which is used for reusing a previous Value in // ExprValueMap. - if (Value *Val = FindValueInExprValueMap(S, At)) - return Val; + ScalarEvolution::ValueOffsetPair VO = FindValueInExprValueMap(S, At); + if (VO.first) + return VO; // There is potential to make this significantly smarter, but this simple // heuristic already gets some interesting cases. // Can not find suitable value. - return nullptr; + return None; } bool SCEVExpander::isHighCostExpansionHelper( @@ -1930,7 +1964,7 @@ bool SCEVExpander::isHighCostExpansionHe // If we can find an existing value for this scev avaliable at the point "At" // then consider the expression cheap. - if (At && findExistingExpansion(S, At, L) != nullptr) + if (At && getRelatedExistingExpansion(S, At, L)) return false; // Zero/One operand expressions @@ -1978,7 +2012,7 @@ bool SCEVExpander::isHighCostExpansionHe // involving division. This is just a simple search heuristic. if (!At) At = &ExitingBB->back(); - if (!findExistingExpansion( + if (!getRelatedExistingExpansion( SE.getAddExpr(S, SE.getConstant(S->getType(), 1)), At, L)) return true; } Modified: stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Fri Feb 3 19:09:46 2017 (r313169) +++ stable/11/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Fri Feb 3 19:12:54 2017 (r313170) @@ -481,7 +481,7 @@ Value *IndVarSimplify::expandSCEVIfNeede Type *ResultTy) { // Before expanding S into an expensive LLVM expression, see if we can use an // already existing value as the expansion for S. - if (Value *ExistingValue = Rewriter.findExistingExpansion(S, InsertPt, L)) + if (Value *ExistingValue = Rewriter.getExactExistingExpansion(S, InsertPt, L)) if (ExistingValue->getType() == ResultTy) return ExistingValue; From owner-svn-src-all@freebsd.org Fri Feb 3 19:15:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 167C0CCF926; Fri, 3 Feb 2017 19:15: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 D9C0DD3B; Fri, 3 Feb 2017 19:15:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13JFrHW039881; Fri, 3 Feb 2017 19:15:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13JFrWO039880; Fri, 3 Feb 2017 19:15:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702031915.v13JFrWO039880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 3 Feb 2017 19:15:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313171 - stable/11/contrib/llvm/lib/Transforms/Scalar X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:15:55 -0000 Author: dim Date: Fri Feb 3 19:15:53 2017 New Revision: 313171 URL: https://svnweb.freebsd.org/changeset/base/313171 Log: MFC r312993: Pull in r279454 from upstream llvm trunk (by James Molloy): [SROA] Remove incorrect assertion Confirmed with aprantl, this assertion is incorrect - code can get here (for example 80-bit FP types) and if it does it's benign. This is exposed by a completely unrelated patch of mine, so stop the compiler falling over. Original differential: http://reviews.llvm.org/D16187 aprantl's advice to remove assertion: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382129.html This should fix assertions when building the math/opensolaris-libm port. Reported by: marino Modified: stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Fri Feb 3 19:12:54 2017 (r313170) +++ stable/11/contrib/llvm/lib/Transforms/Scalar/SROA.cpp Fri Feb 3 19:15:53 2017 (r313171) @@ -4040,9 +4040,6 @@ bool SROA::splitAlloca(AllocaInst &AI, A Size = std::min(Size, AbsEnd - Start); } PieceExpr = DIB.createBitPieceExpression(Start, Size); - } else { - assert(Pieces.size() == 1 && - "partition is as large as original alloca"); } // Remove any existing dbg.declare intrinsic describing the same alloca. From owner-svn-src-all@freebsd.org Fri Feb 3 19:17:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09B98CCF9BA; Fri, 3 Feb 2017 19:17:26 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7371E8E; Fri, 3 Feb 2017 19:17:25 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cZjMC-0001Uy-So; Fri, 03 Feb 2017 20:17:17 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Warren Block" Subject: Re: svn commit: r313169 - head/tools/build/options References: <201702031909.v13J9kGN035880@repo.freebsd.org> Date: Fri, 03 Feb 2017 20:17:16 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201702031909.v13J9kGN035880@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: a8ecdd0179e5342c74548fafd5461917 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:17:26 -0000 On Fri, 03 Feb 2017 20:09:46 +0100, Warren Block wrote: > Modified: head/tools/build/options/WITHOUT_INSTALLLIB > ============================================================================== > --- head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb 3 17:02:57 > 2017 (r313168) > +++ head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb 3 19:09:46 > 2017 (r313169) > @@ -1,6 +1,6 @@ > .\" $FreeBSD$ > -Set this if you do not want to install optional libraries. > -For example when creating a > +Set this if to not install optional libraries. > +For example, when creating a > .Xr nanobsd 8 > image. > .Bf -symbolic I think this sentence did not become what you meant it to be. Cheers, Ronald. From owner-svn-src-all@freebsd.org Fri Feb 3 19:21:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BFF5CCFA7D; Fri, 3 Feb 2017 19:21:29 +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 390C718E; Fri, 3 Feb 2017 19:21:29 +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 v13JLSQh042969; Fri, 3 Feb 2017 19:21:28 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13JLSXT042968; Fri, 3 Feb 2017 19:21:28 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201702031921.v13JLSXT042968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 3 Feb 2017 19:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313172 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:21:29 -0000 Author: wblock (doc committer) Date: Fri Feb 3 19:21:28 2017 New Revision: 313172 URL: https://svnweb.freebsd.org/changeset/base/313172 Log: Decromulate an extra "if". Reported by: rpokala Sponsored by: iXsystems Modified: head/tools/build/options/WITHOUT_INSTALLLIB Modified: head/tools/build/options/WITHOUT_INSTALLLIB ============================================================================== --- head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb 3 19:15:53 2017 (r313171) +++ head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb 3 19:21:28 2017 (r313172) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -Set this if to not install optional libraries. +Set this to not install optional libraries. For example, when creating a .Xr nanobsd 8 image. From owner-svn-src-all@freebsd.org Fri Feb 3 19:27:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88E08CCFC7F; Fri, 3 Feb 2017 19:27:10 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 524CF8B0; Fri, 3 Feb 2017 19:27:10 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id v13JR8aO035801 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Feb 2017 12:27:08 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id v13JR8cq035798; Fri, 3 Feb 2017 12:27:08 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 3 Feb 2017 12:27:08 -0700 (MST) From: Warren Block To: Ronald Klop cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Warren Block Subject: Re: svn commit: r313169 - head/tools/build/options In-Reply-To: Message-ID: References: <201702031909.v13J9kGN035880@repo.freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (wonkity.com [127.0.0.1]); Fri, 03 Feb 2017 12:27:08 -0700 (MST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:27:10 -0000 On Fri, 3 Feb 2017, Ronald Klop wrote: > On Fri, 03 Feb 2017 20:09:46 +0100, Warren Block wrote: > >> Modified: head/tools/build/options/WITHOUT_INSTALLLIB >> ============================================================================== >> --- head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb 3 17:02:57 >> 2017 (r313168) >> +++ head/tools/build/options/WITHOUT_INSTALLLIB Fri Feb 3 19:09:46 >> 2017 (r313169) >> @@ -1,6 +1,6 @@ >> .\" $FreeBSD$ >> -Set this if you do not want to install optional libraries. >> -For example when creating a >> +Set this if to not install optional libraries. >> +For example, when creating a >> .Xr nanobsd 8 >> image. >> .Bf -symbolic > > I think this sentence did not become what you meant it to be. Er... yes. Already decromulated. But please keep an eye out for others. Thanks! From owner-svn-src-all@freebsd.org Fri Feb 3 19:36:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58670CCFEA2; Fri, 3 Feb 2017 19:36:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 413A3D5C; Fri, 3 Feb 2017 19:36:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v13Ja5OD008616 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Feb 2017 11:36:05 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v13Ja5NS008615; Fri, 3 Feb 2017 11:36:05 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 3 Feb 2017 11:36:04 -0800 From: Gleb Smirnoff To: Hartmut.Brandt@dlr.de Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313043 - head/sys/kern Message-ID: <20170203193604.GC2556@FreeBSD.org> References: <201702011312.v11DC7WJ085025@repo.freebsd.org> <20170201180816.GF3334@FreeBSD.org> <611243783F62AF48AFB07BC25FA4B1061CED9FD9@DLREXMBX01.intra.dlr.de> <20170202192411.GK3334@FreeBSD.org> <611243783F62AF48AFB07BC25FA4B1061CEDA7DC@DLREXMBX01.intra.dlr.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <611243783F62AF48AFB07BC25FA4B1061CEDA7DC@DLREXMBX01.intra.dlr.de> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:36:16 -0000 On Fri, Feb 03, 2017 at 07:51:24AM +0000, Hartmut.Brandt@dlr.de wrote: H> It was attached to my mail, but maybe got removed somewhere. Here it is. It does not use asio, but reproduces the same sequence of system calls. You start it and the try to connect with telnet to port 10000. I was blind, sorry :( And thanks for all replies. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Feb 3 19:36:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C5D1CCFEE6; Fri, 3 Feb 2017 19:36:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E89C3E87; Fri, 3 Feb 2017 19:36:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v13JaVDa008631 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Feb 2017 11:36:32 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v13JaVUJ008630; Fri, 3 Feb 2017 11:36:31 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 3 Feb 2017 11:36:31 -0800 From: Gleb Smirnoff To: Renato Botelho Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313048 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump Message-ID: <20170203193631.GD2556@FreeBSD.org> References: <201702012026.v11KQgS3069932@repo.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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 19:36:33 -0000 On Fri, Feb 03, 2017 at 06:26:49AM -0200, Renato Botelho wrote: R> > Author: glebius R> > Date: Wed Feb 1 20:26:42 2017 R> > New Revision: 313048 R> > URL: https://svnweb.freebsd.org/changeset/base/313048 R> > R> > Log: R> > Update tcpdump to 4.9.0. R> > R> > It fixes many buffer overflow in different protocol parsers, but none of R> > them are critical, even in absense of Capsicum. R> > R> > Security: CVE-2016-7922, CVE-2016-7923, CVE-2016-7924, CVE-2016-7925 R> > Security: CVE-2016-7926, CVE-2016-7927, CVE-2016-7928, CVE-2016-7929 R> > Security: CVE-2016-7930, CVE-2016-7931, CVE-2016-7932, CVE-2016-7933 R> > Security: CVE-2016-7934, CVE-2016-7935, CVE-2016-7936, CVE-2016-7937 R> > Security: CVE-2016-7938, CVE-2016-7939, CVE-2016-7940, CVE-2016-7973 R> > Security: CVE-2016-7974, CVE-2016-7975, CVE-2016-7983, CVE-2016-7984 R> > Security: CVE-2016-7985, CVE-2016-7986, CVE-2016-7992, CVE-2016-7993 R> > Security: CVE-2016-8574, CVE-2016-8575, CVE-2017-5202, CVE-2017-5203 R> > Security: CVE-2017-5204, CVE-2017-5205, CVE-2017-5341, CVE-2017-5342 R> > Security: CVE-2017-5482, CVE-2017-5483, CVE-2017-5484, CVE-2017-5485 R> > Security: CVE-2017-5486 R> R> Hi Gleb, R> R> Do you plan to MFC it to stable/11 and stable/10? Yes, after 3 days. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Feb 3 20:14:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F19B1CCE995; Fri, 3 Feb 2017 20:14:21 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B430C12B5; Fri, 3 Feb 2017 20:14:21 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id e4so2206041pfg.0; Fri, 03 Feb 2017 12:14:21 -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=GQ2XoclVG0jP1Ebu0b4YAwtvEZBVuyFVmCtLSqmUrY8=; b=DqZhRx7Trx8UPLg1vi/3z2BTSvAwmoPhX/JCa/W2kX2YuHtBzmMc/7H3MAnrcJinx4 /4Ea8WvSZdSXmfe5byPGh3VJHDpW3ImT+YFzofDZLbRG1SZ01XoUpjq0qslcz4khMoJi Rd6pYJkPjXsU65m8XWwwLT7mSl3S0Dse1a54/6TV2FLhltLM7auRLlVQzrrUUxcGJSfl bPc9l4Vfn3qJ3mAlWzGR4DtYJQcfCND43a/ohDhZa6gbM5/6sr5G9YOroPtzA4VSA7dT Jzsa+luNxQO8MD7+lhYwfmNUBYNcqgArb0FYLa4x/CQ4X3gyOfBJY2L3MVQ2LJsyi+WQ HyTg== 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=GQ2XoclVG0jP1Ebu0b4YAwtvEZBVuyFVmCtLSqmUrY8=; b=rhwcHmFWhmUkEjzOTiGKn9rjvel2FBKJJcV8779HmJRGI17V37YpXHOwtHn2xH2+36 3619d29AU46WHpbyz1dGSObUr52DbfXRHARsd2DsSIzanTw4SN7gENuWYfCGMbqiHkzI fo+0IZq6+YJyMs6vpUPvvIkNqC6DWHhxRQWj/Xv3E5OflbdXDN9O55WAmDW7gbeF0X3Y 4uKTZa+f5H+X85Qa40hw/YFalHlEF3gwmSKKQNdMD8Xcu9q1qhhV1JQ8Y6goLqM9XhGA Fz7GWY2ud5LQYDi/iUIpSn3dJmghpzv+RcvLsYQCqRu2fzLvgRGEFAtNLrjQXAgxhTlb mBcQ== X-Gm-Message-State: AIkVDXIjGlW/iihRlLDR1Au3NvhTjvfxFzrFamBMFZfH/NjKOTcnSd8YdWLv9FJQzSec0g== X-Received: by 10.99.64.69 with SMTP id n66mr20300577pga.1.1486152861061; Fri, 03 Feb 2017 12:14:21 -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 v4sm69247914pfb.36.2017.02.03.12.14.19 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Feb 2017 12:14:20 -0800 (PST) Subject: Re: svn commit: r313169 - head/tools/build/options Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DD5A81EA-6F64-4AF1-92FB-1D6798D2118A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201702031909.v13J9kGN035880@repo.freebsd.org> Date: Fri, 3 Feb 2017 12:14:20 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201702031909.v13J9kGN035880@repo.freebsd.org> To: Warren Block X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 20:14:22 -0000 --Apple-Mail=_DD5A81EA-6F64-4AF1-92FB-1D6798D2118A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 3, 2017, at 11:09, Warren Block wrote: >=20 > Author: wblock (doc committer) > Date: Fri Feb 3 19:09:46 2017 > New Revision: 313169 > URL: https://svnweb.freebsd.org/changeset/base/313169 >=20 > Log: > Clarify some option descriptions, add a line of text to makeman to > add the slightest hint of a shade of a clue of what it does. >=20 > Sponsored by: iXsystems >=20 > Modified: > head/tools/build/options/WITHOUT_BLACKLIST > head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP > head/tools/build/options/WITHOUT_CROSS_COMPILER > head/tools/build/options/WITHOUT_DIALOG > head/tools/build/options/WITHOUT_DMAGENT > head/tools/build/options/WITHOUT_DOCCOMPRESS > head/tools/build/options/WITHOUT_GPL_DTC > head/tools/build/options/WITHOUT_INSTALLLIB > head/tools/build/options/WITHOUT_KERBEROS > head/tools/build/options/WITH_CCACHE_BUILD > head/tools/build/options/WITH_DIRDEPS_BUILD > head/tools/build/options/WITH_INSTALL_AS_USER > head/tools/build/options/WITH_META_MODE > head/tools/build/options/WITH_STAGING_MAN > head/tools/build/options/makeman I=E2=80=99m ok with the overall change, but next time, could changes to = makeman be committed separately from the WITH* options to make it easier = to MFC? Also, speaking of MFCing the change, will this ever be MFCed? Thanks, -Ngie --Apple-Mail=_DD5A81EA-6F64-4AF1-92FB-1D6798D2118A 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 iQIcBAEBCgAGBQJYlOSdAAoJEPWDqSZpMIYVIcQP/jgL4yjz57XP3NKCBxZ+WYKH SfQNrn7Eq/ZTzgIvEQ4Zmzn5pfZ/AqmKTUwZry6+1Os82BQIwLQiwzpWkJqI3naW QcTIf2t78XH1bcsf75rnbsKoE0eg8ON/KkCcMVU58ur2cJLC2FrQbcUXiZLSZOIl vgzW+SYZjQAjXdGyXOq3kwxeemYb1+a5iL6+DV2/4Y5RIQnFesbGV3GiLToOb/5w EXlr2bS7CnUUnxyrLo+nRQPBTTJmF0jET13IiSbDkazA4GX2Yk+Hzk7x/1lnL/Vv +QhHBYubcv3x9G/76Gror+jMkV+/j7U70ZT+M2F2U6df3qsNWYLnqOe/ysu//SXw lX2qvTgarazDNKo3zR/2wzE1SV4cV2lYQZDhhO4K/QjFzFzHB/r2GiijC4XOPOZe 554nY5PPBPwQQve4K3Q5GjnKe0JBblROcFPSxaOVSh+CM8gQ+XofrKDyH43Mv/Qx EpMPs/RFtqMoKrz2uAAYsrOj13cUCbrCDyHqe9OI9AZ6G1ihYh2RD7/j0FaOKxpF 6LmXLzV5Si23tYZ+5d8BuCQWGw+P9rG9X7ZRfhsAqirBdp/1G03z81PWJUMgb5vH DTeF6tevpXlYYRbM5SiswCeI8fL/cd6eu11fPj3aNOnOVm2Jj/fc/6QPbaMjxpva 5KbkzJowO5AYknOaCBSz =69Xj -----END PGP SIGNATURE----- --Apple-Mail=_DD5A81EA-6F64-4AF1-92FB-1D6798D2118A-- From owner-svn-src-all@freebsd.org Fri Feb 3 20:17:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C4A3CCEB28; Fri, 3 Feb 2017 20:17:55 +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 596111502; Fri, 3 Feb 2017 20:17:55 +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 v13KHsru064170; Fri, 3 Feb 2017 20:17:54 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13KHsQx064169; Fri, 3 Feb 2017 20:17:54 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201702032017.v13KHsQx064169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 3 Feb 2017 20:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313173 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 20:17:55 -0000 Author: wblock (doc committer) Date: Fri Feb 3 20:17:54 2017 New Revision: 313173 URL: https://svnweb.freebsd.org/changeset/base/313173 Log: Re-enable an accidentally-disabled temp directory creation test. Reported by: bjk Sponsored by: iXsystems Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Fri Feb 3 19:21:28 2017 (r313172) +++ head/tools/build/options/makeman Fri Feb 3 20:17:54 2017 (r313173) @@ -8,7 +8,7 @@ export LC_ALL=C ident='$FreeBSD$' t=$(mktemp -d -t makeman) -# trap 'test -d $t && rm -rf $t' exit +trap 'test -d $t && rm -rf $t' exit srcdir=$(realpath ../../..) make="make -C $srcdir -m $srcdir/share/mk" From owner-svn-src-all@freebsd.org Fri Feb 3 20:26:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49605CCEF72 for ; Fri, 3 Feb 2017 20:26:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::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 10FBE1C47 for ; Fri, 3 Feb 2017 20:26:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x241.google.com with SMTP id q20so3366657ioi.3 for ; Fri, 03 Feb 2017 12:26:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PNm/6vxbSaOYpJ4dWEjHZYYaviKRz9VLA2rwDvT0NQQ=; b=IM9Ao80b0+U1QfD2JKHJr3RiMLGIqiAgOoq8aCn5a3TRbBfDtRvbvyd7TQe6nYhoMB h/7dl2qaG9/S8jb/fWBSljsLGV4fStkfl7nM70QQYgLnz5MVScDzZQCd5pfUAtt425ih nX2OWwcz2ukyqpHUDygwlm5NuwhiwZdRd1wgBm5diP7TgnTCE1fZeRZqWdaXlOrIU64z dhUdFhN6OS8XbQjV2Y84gp7DiYXWha81KzP8JEnxR8WVfKce2mF1BqN8hQhjkoNEsHFJ uUq8fYwc89vO9/G9nNL94st6/sfNNBErEKrLkmnlrQIZojqzbQPStfR0yi2tvBOkLzPz uIww== 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=PNm/6vxbSaOYpJ4dWEjHZYYaviKRz9VLA2rwDvT0NQQ=; b=A+v6pEbzHhqY98eGJSs2j+hESc1s3V+Mi28n66SMywUMTFQffdawMQN8Ij8K0qH3EP l+K1GbzEq8k5Zp5w8IStlNPjuYP2gA9Ictu4eaOYo/iEVOt4YYbBJcQVIkwWltzX/R38 ebHXdZpiH5F6WBPeviQflYB4ndTwa/MkoJqhbvAkCzQs/lihd7zYq+U2iYJSggNDoqFg hfxbKQr0qOpWhUFfqt2QHPWCNFbsBqgI3ArJMju1NlVwcS8klc+yBvcC8RcOyzRT04WX WylC5SC6TxfbbDfzo8amts3GIdI9ih9xXJHfOnHYmbtlMUzVQWS4EVd0P+FKD8IeVo0j dlmw== X-Gm-Message-State: AIkVDXI8k9/6tI3D/r0O9OPyvVFsOWGB4P/htG0dFevHJhBZoOnHDQuWmY5AUI7gx5hosb7GuLQ3lIe0xTgq4A== X-Received: by 10.107.139.131 with SMTP id n125mr13027983iod.166.1486153560353; Fri, 03 Feb 2017 12:26:00 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Fri, 3 Feb 2017 12:25:59 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <1486146017.3017.193.camel@freebsd.org> References: <201702031639.v13GdAXQ074031@repo.freebsd.org> <1486140447.3017.189.camel@freebsd.org> <19994E26-42EE-4E12-9867-1E53FA2A7F81@me.com> <1486146017.3017.193.camel@freebsd.org> From: Warner Losh Date: Fri, 3 Feb 2017 13:25:59 -0700 X-Google-Sender-Auth: bA3BXWXgoFG-1d6GGfEowPTF958 Message-ID: Subject: Re: svn commit: r313166 - head/sys/boot/efi/libefi To: Ian Lepore Cc: Toomas Soome , Toomas Soome , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 20:26:01 -0000 On Fri, Feb 3, 2017 at 11:20 AM, Ian Lepore wrote: > On Fri, 2017-02-03 at 18:52 +0200, Toomas Soome wrote: >> > >> > On 3. veebr 2017, at 18:47, Ian Lepore wrote: >> > >> > On Fri, 2017-02-03 at 16:39 +0000, Toomas Soome wrote: >> > > >> > > Author: tsoome >> > > Date: Fri Feb 3 16:39:10 2017 >> > > New Revision: 313166 >> > > URL: https://svnweb.freebsd.org/changeset/base/313166 >> > > >> > > Log: >> > > loader: libefi/env.c warnings in arm build >> > > >> > > The arm build has revealed some of the warnings, the fix for >> > > CHAR16 >> > > warning is to switch the warning off for env.c (same as for >> > > efinet.c). >> > > >> > How is disabling the warning instead of just fixing it the right >> > thing >> > to do? I think disabling a printf format warning is never the >> > right >> > thing to do, it just turns a compile warning into a runtime >> > failure. >> >> I would love to see the correct fix - as all UEFI chars are 2 byte; >> but thats up to arm experts. I just do not know the details why the >> arm is stuck with 4 byte wchar_t there - Im sure they do not have >> this just for fun:) >> >> rgds, >> toomas > > Hmm, looks like the right fix is to add -fshort-wchar to CFLAGS, but > it's got to be consistant across all the libraries that get linked, and > some of them are used in the non-efi case too. I'll have a closer look > at whether we can fix it properly over the next few days. I just wonder why that isn't the default.... And the consistency matters only of wchar_t is used in the library... Lemme know what you come up with... Warner From owner-svn-src-all@freebsd.org Fri Feb 3 20:33:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02E10CCF146; Fri, 3 Feb 2017 20:33:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CED9F1FE; Fri, 3 Feb 2017 20:33:24 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13KXNmI072387; Fri, 3 Feb 2017 20:33:23 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13KXNhI072385; Fri, 3 Feb 2017 20:33:23 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201702032033.v13KXNhI072385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 3 Feb 2017 20:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313174 - in head: lib/libc/sys share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 20:33:25 -0000 Author: jilles Date: Fri Feb 3 20:33:23 2017 New Revision: 313174 URL: https://svnweb.freebsd.org/changeset/base/313174 Log: Clean up documentation of AF_UNIX control messages. Document AF_UNIX control messages in unix(4) only, not split between unix(4) and recv(2). Also, warn about LOCAL_CREDS effective uid/gid fields, since the write could be from a setuid or setgid program (with the explicit SCM_CREDS and LOCAL_PEERCRED, the credentials are read at such a time that it can be assumed that the process intends for them to be used in this context). Reviewed by: wblock MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9298 Modified: head/lib/libc/sys/recv.2 head/share/man/man4/unix.4 Modified: head/lib/libc/sys/recv.2 ============================================================================== --- head/lib/libc/sys/recv.2 Fri Feb 3 20:17:54 2017 (r313173) +++ head/lib/libc/sys/recv.2 Fri Feb 3 20:33:23 2017 (r313174) @@ -28,7 +28,7 @@ .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd August 18, 2016 +.Dd February 3, 2017 .Dt RECV 2 .Os .Sh NAME @@ -266,57 +266,10 @@ with no data buffer provided immediately .Fn accept system call. .Pp -Open file descriptors are now passed as ancillary data for +With .Dv AF_UNIX -domain sockets, with -.Fa cmsg_level -set to -.Dv SOL_SOCKET -and -.Fa cmsg_type -set to -.Dv SCM_RIGHTS . -The close-on-exec flag on received descriptors is set according to the -.Dv MSG_CMSG_CLOEXEC -flag passed to -.Fn recvmsg . -.Pp -Process credentials can also be passed as ancillary data for -.Dv AF_UNIX -domain sockets using a -.Fa cmsg_type -of -.Dv SCM_CREDS . -In this case, -.Fa cmsg_data -should be a structure of type -.Fa cmsgcred , -which is defined in -.In sys/socket.h -as follows: -.Bd -literal -struct cmsgcred { - pid_t cmcred_pid; /* PID of sending process */ - uid_t cmcred_uid; /* real UID of sending process */ - uid_t cmcred_euid; /* effective UID of sending process */ - gid_t cmcred_gid; /* real GID of sending process */ - short cmcred_ngroups; /* number or groups */ - gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ -}; -.Ed -.Pp -If a sender supplies ancillary data with enough space for the above struct -tagged as -.Dv SCM_CREDS -control message type to the -.Fn sendmsg -system call, then kernel will fill in the credential information of the -sending process and deliver it to the receiver. -Since receiver usually has no control over a sender, this method of retrieving -credential information isn't reliable. -For reliable retrieval of remote side credentials it is advised to use the -.Dv LOCAL_CREDS -socket option on the receiving socket. +domain sockets, ancillary data can be used to pass file descriptors and +process credentials. See .Xr unix 4 for details. Modified: head/share/man/man4/unix.4 ============================================================================== --- head/share/man/man4/unix.4 Fri Feb 3 20:17:54 2017 (r313173) +++ head/share/man/man4/unix.4 Fri Feb 3 20:33:23 2017 (r313174) @@ -28,7 +28,7 @@ .\" @(#)unix.4 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd March 19, 2013 +.Dd February 3, 2017 .Dt UNIX 4 .Os .Sh NAME @@ -119,12 +119,12 @@ of a or .Xr sendto 2 must be writable. -.Sh PASSING FILE DESCRIPTORS +.Sh CONTROL MESSAGES The .Ux Ns -domain sockets support the communication of .Ux -file descriptors through the use of the +file descriptors and process credentials through the use of the .Va msg_control field in the .Fa msg @@ -132,13 +132,12 @@ argument to .Xr sendmsg 2 and .Xr recvmsg 2 . -.Pp -Any valid descriptor may be sent in a message. -The file descriptor(s) to be passed are described using a +The items to be passed are described using a .Vt "struct cmsghdr" that is defined in the include file .In sys/socket.h . -The type of the message is +.Pp +To send file descriptors, the type of the message is .Dv SCM_RIGHTS , and the data portion of the messages is an array of integers representing the file descriptors to be passed. @@ -161,6 +160,39 @@ call. Descriptors that are awaiting delivery, or that are purposely not received, are automatically closed by the system when the destination socket is closed. +.Pp +Credentials of the sending process can be transmitted explicitly using a +control message of type +.Dv SCM_CREDS +with a data portion of type +.Vt "struct cmsgcred" , +defined in +.In sys/socket.h +as follows: +.Bd -literal +struct cmsgcred { + pid_t cmcred_pid; /* PID of sending process */ + uid_t cmcred_uid; /* real UID of sending process */ + uid_t cmcred_euid; /* effective UID of sending process */ + gid_t cmcred_gid; /* real GID of sending process */ + short cmcred_ngroups; /* number of groups */ + gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ +}; +.Ed +.Pp +The sender should pass a zeroed buffer which will be filled in by the system. +.Pp +The group list is truncated to at most +.Dv CMGROUP_MAX +GIDs. +.Pp +The process ID +.Fa cmcred_pid +should not be looked up (such as via the +.Dv KERN_PROC_PID +sysctl) for making security decisions. +The sending process could have exited and its process ID already been +reused for a new process. .Sh SOCKET OPTIONS .Tn UNIX domain sockets support a number of socket options which can be set with @@ -176,7 +208,13 @@ or a .Dv SOCK_STREAM socket. This option provides a mechanism for the receiver to -receive the credentials of the process as a +receive the credentials of the process calling +.Xr write 2 , +.Xr send 2 , +.Xr sendto 2 +or +.Xr sendmsg 2 +as a .Xr recvmsg 2 control message. The @@ -201,6 +239,10 @@ struct sockcred { }; .Ed .Pp +The current implementation truncates the group list to at most +.Dv CMGROUP_MAX +groups. +.Pp The .Fn SOCKCREDSIZE macro computes the size of the @@ -221,7 +263,28 @@ On and .Dv SOCK_SEQPACKET sockets credentials are passed only on the first read from a socket, -then system clears the option on socket. +then the system clears the option on the socket. +.Pp +This option and the above explicit +.Vt "struct cmsgcred" +both use the same value +.Dv SCM_CREDS +but incompatible control messages. +If this option is enabled and the sender attached a +.Dv SCM_CREDS +control message with a +.Vt "struct cmsgcred" , +it will be discarded and a +.Vt "struct sockcred" +will be included. +.Pp +Many setuid programs will +.Xr write 2 +data at least partially controlled by the invoker, +such as error messages. +Therefore, a message accompanied by a particular +.Fa sc_euid +value should not be trusted as being from that user. .It Dv LOCAL_CONNWAIT Used with .Dv SOCK_STREAM From owner-svn-src-all@freebsd.org Fri Feb 3 20:44:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 861DFCCF489 for ; Fri, 3 Feb 2017 20:44:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68061A6B for ; Fri, 3 Feb 2017 20:44:59 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 9cc4439b-ea51-11e6-b3c2-c9f38144898e 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 outbound2.ore.mailhop.org (Halon) with ESMTPSA id 9cc4439b-ea51-11e6-b3c2-c9f38144898e; Fri, 03 Feb 2017 20:44:53 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v13KiujP024845; Fri, 3 Feb 2017 13:44:56 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1486154696.3017.201.camel@freebsd.org> Subject: Re: svn commit: r313166 - head/sys/boot/efi/libefi From: Ian Lepore To: Warner Losh Cc: Toomas Soome , Toomas Soome , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Fri, 03 Feb 2017 13:44:56 -0700 In-Reply-To: References: <201702031639.v13GdAXQ074031@repo.freebsd.org> <1486140447.3017.189.camel@freebsd.org> <19994E26-42EE-4E12-9867-1E53FA2A7F81@me.com> <1486146017.3017.193.camel@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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 20:44:59 -0000 On Fri, 2017-02-03 at 13:25 -0700, Warner Losh wrote: > On Fri, Feb 3, 2017 at 11:20 AM, Ian Lepore wrote: > > > > On Fri, 2017-02-03 at 18:52 +0200, Toomas Soome wrote: > > > > > > > > > > > > > > > On 3. veebr 2017, at 18:47, Ian Lepore wrote: > > > > > > > > On Fri, 2017-02-03 at 16:39 +0000, Toomas Soome wrote: > > > > > > > > > > > > > > > Author: tsoome > > > > > Date: Fri Feb3 16:39:10 2017 > > > > > New Revision: 313166 > > > > > URL: https://svnweb.freebsd.org/changeset/base/313166 > > > > > > > > > > Log: > > > > > loader: libefi/env.c warnings in arm build > > > > > > > > > > The arm build has revealed some of the warnings, the fix > > > > > for > > > > > CHAR16 > > > > > warning is to switch the warning off for env.c (same as for > > > > > efinet.c). > > > > > > > > > How is disabling the warning instead of just fixing it the > > > > right > > > > thing > > > > to do?I think disabling a printf format warning is never the > > > > right > > > > thing to do, it just turns a compile warning into a runtime > > > > failure. > > > I would love to see the correct fix - as all UEFI chars are 2 > > > byte; > > > but thats up to arm experts. I just do not know the details why > > > the > > > arm is stuck with 4 byte wchar_t there - Im sure they do not have > > > this just for fun:) > > > > > > rgds, > > > toomas > > Hmm, looks like the right fix is to add -fshort-wchar to CFLAGS, > > but > > it's got to be consistant across all the libraries that get linked, > > and > > some of them are used in the non-efi case too.I'll have a closer > > look > > at whether we can fix it properly over the next few days. > I just wonder why that isn't the default.... And the consistency > matters only of wchar_t is used in the library... Lemme know what you > come up with... > > Warner ARM's abi definition requires 4-byte wchar_t, but allows "certain virtual environments" to use different sizes (without any explanation about what that might mean or how to achieve it). I'm not sure about the "only matters if" part -- the linker was spitting out hundreds of warnings about mismatched wchar_t sizes, as if it were part of object file metadata that failed a sanity check or something (or there are a lot more references to wchar_t in libstand and libfdt than I would have imagined). -- Ian From owner-svn-src-all@freebsd.org Fri Feb 3 20:48:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26B7FCCF5C1 for ; Fri, 3 Feb 2017 20:48:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E18DECBA for ; Fri, 3 Feb 2017 20:48:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x241.google.com with SMTP id e137so2771872itc.0 for ; Fri, 03 Feb 2017 12:48:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5RyxMGoWjX6TlCVwAbLNDF+FG5pXSLEPzXkarUcTghY=; b=RuQZYvtPqlKyBknN7rZIlsdOLTbAOT9K7KPCFvnCxbzFh/TlWRrugMAMBjUl9Nivlr YP/RmbjdCGC1DqhcVTgHE1OQmkgHmPT+Ix/WqKIFxu/NAOEg3Jx/byl6HSSajj9d1N/K Fc1StqTyLhcbJTXOmP9p1ynbiHJ3qh0uRgEhmmOoJWUo6DGtdxlT5yajEe4xIYHf1nAX i6fep9OWKbdF+AeYhseJiiQjMePvqrqX3qmw3IrH7c5Zx4iJyuebcd/sriFSHhx8ApIn nFgtnrRABqHM0zNkvfAsrDkAK4sQf3QX9ACjyV8QZioPHj/DAauDKggK/gXO+6jp9Mv6 wqiw== 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=5RyxMGoWjX6TlCVwAbLNDF+FG5pXSLEPzXkarUcTghY=; b=W3fXVdxGF10nAuH6Xufee3MffwYURoM0bE0GylYhSWXnzJp8GpEJ4QcriXGdfupQRb G05jXVxD7LrxHvv/1UA9IDwlw/7R3N2o9l3vHna6GvO+nVLUlmHeXZuLfCeV1ATwL1Ju 9zCbDIUmTBIOmBbSsqvXKqavlBNj+yRcQ6QQ7n/xK1lzTgauX726CWQFFAJM7rdS+PAo USIf7Q9MGplNxsp/0AMkO6K7PRsRDkkQtNKWBk6/Ijuaq0iKWlBhUbltndrzQmPWCeJU c+aKA2cVy34OmpkooJHNkj+qgQhr1kFOqMiR2Gs92d2/MFbpgYxEQxDH4eNb8zeNNU3S vV+g== X-Gm-Message-State: AIkVDXIiie2K4eiHCD3FuOd+OlFw0KsBMGbEgrYb086e2AIh1wJbZ24KRCzia2eRWXIgAPv+60wBXHCtUF4rvg== X-Received: by 10.36.93.213 with SMTP id w204mr2790486ita.60.1486154936234; Fri, 03 Feb 2017 12:48:56 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Fri, 3 Feb 2017 12:48:55 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <1486154696.3017.201.camel@freebsd.org> References: <201702031639.v13GdAXQ074031@repo.freebsd.org> <1486140447.3017.189.camel@freebsd.org> <19994E26-42EE-4E12-9867-1E53FA2A7F81@me.com> <1486146017.3017.193.camel@freebsd.org> <1486154696.3017.201.camel@freebsd.org> From: Warner Losh Date: Fri, 3 Feb 2017 13:48:55 -0700 X-Google-Sender-Auth: TSI_To4bZNgaldyhQ93jzaSq4y0 Message-ID: Subject: Re: svn commit: r313166 - head/sys/boot/efi/libefi To: Ian Lepore Cc: Toomas Soome , Toomas Soome , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 20:48:57 -0000 On Fri, Feb 3, 2017 at 1:44 PM, Ian Lepore wrote: > On Fri, 2017-02-03 at 13:25 -0700, Warner Losh wrote: >> On Fri, Feb 3, 2017 at 11:20 AM, Ian Lepore wrote: >> > >> > On Fri, 2017-02-03 at 18:52 +0200, Toomas Soome wrote: >> > > >> > > > >> > > > >> > > > On 3. veebr 2017, at 18:47, Ian Lepore wrote: >> > > > >> > > > On Fri, 2017-02-03 at 16:39 +0000, Toomas Soome wrote: >> > > > > >> > > > > >> > > > > Author: tsoome >> > > > > Date: Fri Feb 3 16:39:10 2017 >> > > > > New Revision: 313166 >> > > > > URL: https://svnweb.freebsd.org/changeset/base/313166 >> > > > > >> > > > > Log: >> > > > > loader: libefi/env.c warnings in arm build >> > > > > >> > > > > The arm build has revealed some of the warnings, the fix >> > > > > for >> > > > > CHAR16 >> > > > > warning is to switch the warning off for env.c (same as for >> > > > > efinet.c). >> > > > > >> > > > How is disabling the warning instead of just fixing it the >> > > > right >> > > > thing >> > > > to do? I think disabling a printf format warning is never the >> > > > right >> > > > thing to do, it just turns a compile warning into a runtime >> > > > failure. >> > > I would love to see the correct fix - as all UEFI chars are 2 >> > > byte; >> > > but thats up to arm experts. I just do not know the details why >> > > the >> > > arm is stuck with 4 byte wchar_t there - Im sure they do not have >> > > this just for fun:) >> > > >> > > rgds, >> > > toomas >> > Hmm, looks like the right fix is to add -fshort-wchar to CFLAGS, >> > but >> > it's got to be consistant across all the libraries that get linked, >> > and >> > some of them are used in the non-efi case too. I'll have a closer >> > look >> > at whether we can fix it properly over the next few days. >> I just wonder why that isn't the default.... And the consistency >> matters only of wchar_t is used in the library... Lemme know what you >> come up with... >> >> Warner > > ARM's abi definition requires 4-byte wchar_t, but allows "certain > virtual environments" to use different sizes (without any explanation > about what that might mean or how to achieve it). > > I'm not sure about the "only matters if" part -- the linker was > spitting out hundreds of warnings about mismatched wchar_t sizes, as if > it were part of object file metadata that failed a sanity check or > something (or there are a lot more references to wchar_t in libstand > and libfdt than I would have imagined). Gotcha. I know the linker records various details in the .o's for sanity checking. Didn't think this was one of them, so, yea, it looks like you're right. We may have to build a separate copy of such libraries for UEFI since it has a different ABI. Warner From owner-svn-src-all@freebsd.org Fri Feb 3 21:37:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5190CCCF0FB; Fri, 3 Feb 2017 21:37:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F318BC1D; Fri, 3 Feb 2017 21:37:28 +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 v13LbS3E097064; Fri, 3 Feb 2017 21:37:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13LbSKt097063; Fri, 3 Feb 2017 21:37:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702032137.v13LbSKt097063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 3 Feb 2017 21:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313175 - stable/11/sys/dev/cxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 21:37:29 -0000 Author: jhb Date: Fri Feb 3 21:37:27 2017 New Revision: 313175 URL: https://svnweb.freebsd.org/changeset/base/313175 Log: MFC 313020: Fix a couple of issues with t4iov probe and attach. - Check for Chelsio vendor ID in probe routines. - Fail attach instead of faulting if pci_find_dbsf() doesn't find a device. PR: 216539 Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/t4_iov.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_iov.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_iov.c Fri Feb 3 20:33:23 2017 (r313174) +++ stable/11/sys/dev/cxgbe/t4_iov.c Fri Feb 3 21:37:27 2017 (r313175) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #endif +#include "common/common.h" #include "t4_if.h" struct t4iov_softc { @@ -106,6 +107,9 @@ t4iov_probe(device_t dev) uint16_t d; size_t i; + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + d = pci_get_device(dev); for (i = 0; i < nitems(t4iov_pciids); i++) { if (d == t4iov_pciids[i].device) { @@ -123,6 +127,9 @@ t5iov_probe(device_t dev) uint16_t d; size_t i; + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + d = pci_get_device(dev); for (i = 0; i < nitems(t5iov_pciids); i++) { if (d == t5iov_pciids[i].device) { @@ -140,6 +147,9 @@ t6iov_probe(device_t dev) uint16_t d; size_t i; + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + d = pci_get_device(dev); for (i = 0; i < nitems(t6iov_pciids); i++) { if (d == t6iov_pciids[i].device) { @@ -161,6 +171,8 @@ t4iov_attach(device_t dev) sc->sc_main = pci_find_dbsf(pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), 4); + if (sc->sc_main == NULL) + return (ENXIO); if (T4_IS_MAIN_READY(sc->sc_main) == 0) return (t4iov_attach_child(dev)); return (0); From owner-svn-src-all@freebsd.org Fri Feb 3 22:13:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CA02CCFEE4; Fri, 3 Feb 2017 22:13:38 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA56685; Fri, 3 Feb 2017 22:13:37 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id v13MDbsb078223 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Feb 2017 15:13:37 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id v13MDauK078220; Fri, 3 Feb 2017 15:13:37 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 3 Feb 2017 15:13:36 -0700 (MST) From: Warren Block To: "Ngie Cooper (yaneurabeya)" cc: Warren Block , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313169 - head/tools/build/options In-Reply-To: Message-ID: References: <201702031909.v13J9kGN035880@repo.freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (wonkity.com [127.0.0.1]); Fri, 03 Feb 2017 15:13:37 -0700 (MST) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 22:13:38 -0000 On Fri, 3 Feb 2017, Ngie Cooper (yaneurabeya) wrote: > >> On Feb 3, 2017, at 11:09, Warren Block wrote: >> >> Author: wblock (doc committer) >> Date: Fri Feb 3 19:09:46 2017 >> New Revision: 313169 >> URL: https://svnweb.freebsd.org/changeset/base/313169 >> >> Log: >> Clarify some option descriptions, add a line of text to makeman to >> add the slightest hint of a shade of a clue of what it does. >> >> Sponsored by: iXsystems >> >> Modified: >> head/tools/build/options/WITHOUT_BLACKLIST >> head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP >> head/tools/build/options/WITHOUT_CROSS_COMPILER >> head/tools/build/options/WITHOUT_DIALOG >> head/tools/build/options/WITHOUT_DMAGENT >> head/tools/build/options/WITHOUT_DOCCOMPRESS >> head/tools/build/options/WITHOUT_GPL_DTC >> head/tools/build/options/WITHOUT_INSTALLLIB >> head/tools/build/options/WITHOUT_KERBEROS >> head/tools/build/options/WITH_CCACHE_BUILD >> head/tools/build/options/WITH_DIRDEPS_BUILD >> head/tools/build/options/WITH_INSTALL_AS_USER >> head/tools/build/options/WITH_META_MODE >> head/tools/build/options/WITH_STAGING_MAN >> head/tools/build/options/makeman > > I’m ok with the overall change, but next time, could changes to makeman be committed separately from the WITH* options to make it easier to MFC? Also, speaking of MFCing the change, will this ever be MFCed? Sorry, was not planning on MFCing the makeman change, although it wouldn't hurt. From owner-svn-src-all@freebsd.org Fri Feb 3 22:26:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF00CCCF24E; Fri, 3 Feb 2017 22:26:21 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E92EE01; Fri, 3 Feb 2017 22:26:21 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13MQKjC018115; Fri, 3 Feb 2017 22:26:20 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13MQKHG018109; Fri, 3 Feb 2017 22:26:20 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201702032226.v13MQKHG018109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Fri, 3 Feb 2017 22:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313176 - in head/sys: cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/sys modules/dtrace/dtrace modules/dtrace/fasttrap modules/dtrace/systrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 22:26:21 -0000 Author: gnn Date: Fri Feb 3 22:26:19 2017 New Revision: 313176 URL: https://svnweb.freebsd.org/changeset/base/313176 Log: Replace the implementation of DTrace's RAND subroutine for generating low-quality random numbers with a modern implementation (xoroshiro128+) that is capable of generating better quality randomness without compromising performance. Submitted by: Graeme Jenkinson Reviewed by: markj MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9051 Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h head/sys/modules/dtrace/dtrace/Makefile head/sys/modules/dtrace/fasttrap/Makefile head/sys/modules/dtrace/systrace/Makefile Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Feb 3 22:26:19 2017 (r313176) @@ -124,6 +124,7 @@ #include #include #include +#include #include #include #include @@ -136,6 +137,8 @@ #include "dtrace_debug.c" #endif +#include "dtrace_xoroshiro128_plus.h" + /* * DTrace Tunable Variables * @@ -298,7 +301,6 @@ static kmutex_t dtrace_meta_lock; /* me #define vuprintf vprintf #define ttoproc(_a) ((_a)->td_proc) #define crgetzoneid(_a) 0 -#define NCPU MAXCPU #define SNOCD 0 #define CPU_ON_INTR(_a) 0 @@ -4236,7 +4238,8 @@ dtrace_dif_subr(uint_t subr, uint_t rd, switch (subr) { case DIF_SUBR_RAND: - regs[rd] = (dtrace_gethrtime() * 2416 + 374441) % 1771875; + regs[rd] = dtrace_xoroshiro128_plus_next( + state->dts_rstate[curcpu]); break; #ifdef illumos @@ -14495,6 +14498,7 @@ dtrace_state_create(struct cdev *dev, st dtrace_state_t *state; dtrace_optval_t *opt; int bufsize = NCPU * sizeof (dtrace_buffer_t), i; + int cpu_it; ASSERT(MUTEX_HELD(&dtrace_lock)); ASSERT(MUTEX_HELD(&cpu_lock)); @@ -14550,6 +14554,21 @@ dtrace_state_create(struct cdev *dev, st state->dts_buffer = kmem_zalloc(bufsize, KM_SLEEP); state->dts_aggbuffer = kmem_zalloc(bufsize, KM_SLEEP); + /* + * Allocate and initialise the per-process per-CPU random state. + * SI_SUB_RANDOM < SI_SUB_DTRACE_ANON therefore entropy device is + * assumed to be seeded at this point (if from Fortuna seed file). + */ + (void) read_random(&state->dts_rstate[0], 2 * sizeof(uint64_t)); + for (cpu_it = 1; cpu_it < NCPU; cpu_it++) { + /* + * Each CPU is assigned a 2^64 period, non-overlapping + * subsequence. + */ + dtrace_xoroshiro128_plus_jump(state->dts_rstate[cpu_it-1], + state->dts_rstate[cpu_it]); + } + #ifdef illumos state->dts_cleaner = CYCLIC_NONE; state->dts_deadman = CYCLIC_NONE; Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Fri Feb 3 22:26:19 2017 (r313176) @@ -50,6 +50,7 @@ extern "C" { */ #include + #ifndef illumos #ifdef __sparcv9 typedef uint32_t pc_t; @@ -65,6 +66,10 @@ typedef u_long greg_t; #define DTRACE_MAXPROPLEN 128 #define DTRACE_DYNVAR_CHUNKSIZE 256 +#ifdef __FreeBSD__ +#define NCPU MAXCPU +#endif /* __FreeBSD__ */ + struct dtrace_probe; struct dtrace_ecb; struct dtrace_predicate; @@ -1169,6 +1174,7 @@ struct dtrace_state { dtrace_cred_t dts_cred; /* credentials */ size_t dts_nretained; /* number of retained enabs */ int dts_getf; /* number of getf() calls */ + uint64_t dts_rstate[NCPU][2]; /* per-CPU random state */ }; struct dtrace_provider { Modified: head/sys/modules/dtrace/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/dtrace/Makefile Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/modules/dtrace/dtrace/Makefile Fri Feb 3 22:26:19 2017 (r313176) @@ -12,6 +12,7 @@ ARCHDIR= ${MACHINE_CPUARCH} KMOD= dtrace SRCS= dtrace.c \ + dtrace_xoroshiro128_plus.c \ dtrace_asm.S \ dtrace_subr.c @@ -42,6 +43,7 @@ CFLAGS+= -I${SYSDIR}/cddl/compat/opensol -I${SYSDIR}/cddl/dev/dtrace \ -I${SYSDIR}/cddl/dev/dtrace/${ARCHDIR} \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ + -I${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace \ -I${SYSDIR}/cddl/contrib/opensolaris/common/util \ -I${SYSDIR} -DDIS_MEM Modified: head/sys/modules/dtrace/fasttrap/Makefile ============================================================================== --- head/sys/modules/dtrace/fasttrap/Makefile Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/modules/dtrace/fasttrap/Makefile Fri Feb 3 22:26:19 2017 (r313176) @@ -10,6 +10,7 @@ SRCS+= vnode_if.h CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ + -I${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace \ -I${SYSDIR} .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" Modified: head/sys/modules/dtrace/systrace/Makefile ============================================================================== --- head/sys/modules/dtrace/systrace/Makefile Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/modules/dtrace/systrace/Makefile Fri Feb 3 22:26:19 2017 (r313176) @@ -10,6 +10,7 @@ SRCS+= vnode_if.h CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ + -I${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace \ -I${SYSDIR} .include From owner-svn-src-all@freebsd.org Fri Feb 3 22:39:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9AAFCCF565; Fri, 3 Feb 2017 22:39:58 +0000 (UTC) (envelope-from bdrewery@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 7934F687; Fri, 3 Feb 2017 22:39:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id AEF222DC8; Fri, 3 Feb 2017 22:39:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id A3E762BEF1; Fri, 3 Feb 2017 22:39:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id ftn9_fQLGwBI; Fri, 3 Feb 2017 22:39:35 +0000 (UTC) Subject: Re: svn commit: r313169 - head/tools/build/options DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 731FA2BED4 To: Warren Block , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702031909.v13J9kGN035880@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <99761ce8-5851-6e78-af1d-3fc89f9d6494@FreeBSD.org> Date: Fri, 3 Feb 2017 14:39:36 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <201702031909.v13J9kGN035880@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wOVs3qouTqtiEPQUEdeqPPbhq1UU61trs" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 22:39:58 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wOVs3qouTqtiEPQUEdeqPPbhq1UU61trs Content-Type: multipart/mixed; boundary="ARnJpJSNhUu2qNocdUNOIociResLgItfG"; protected-headers="v1" From: Bryan Drewery To: Warren Block , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <99761ce8-5851-6e78-af1d-3fc89f9d6494@FreeBSD.org> Subject: Re: svn commit: r313169 - head/tools/build/options References: <201702031909.v13J9kGN035880@repo.freebsd.org> In-Reply-To: <201702031909.v13J9kGN035880@repo.freebsd.org> --ARnJpJSNhUu2qNocdUNOIociResLgItfG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/3/2017 11:09 AM, Warren Block wrote: > Modified: head/tools/build/options/makeman > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/tools/build/options/makeman Fri Feb 3 17:02:57 2017 (r313168)= > +++ head/tools/build/options/makeman Fri Feb 3 19:09:46 2017 (r313169)= > @@ -8,7 +8,7 @@ export LC_ALL=3DC > ident=3D'$FreeBSD$' > =20 > t=3D$(mktemp -d -t makeman) > -trap 'test -d $t && rm -rf $t' exit > +# trap 'test -d $t && rm -rf $t' exit Woops, you committed a debug change. --=20 Regards, Bryan Drewery --ARnJpJSNhUu2qNocdUNOIociResLgItfG-- --wOVs3qouTqtiEPQUEdeqPPbhq1UU61trs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJYlQaoAAoJEDXXcbtuRpfPYRMH/inaMGRjT8LCxrrCGGg+v1xi fIeVmgXUMHZNhGyjbksyJYmw9VLUZ8pNbYxuJmGO3WU8Om0p0pUQw/gxyDUw48LR IOlQX7ST4qzBBI2LZkVGcmSDSSQq18JzihzsP4YAZzbwNeqpeMVkH9dv2J6CmYeg XohkDKVEO0qAkSJPqowgj4wFRG4YDlyNlubVvg3Cmp8cr3I+t1wVAlT0/nU136rZ 072H/OhkTokTl+f/U0M5OyVaEvUzpzyO5QFHN89PpKzN6vhH4FBO1A9HS7hZaN+T qbdkZiNAr6g9/X+DrypS7+8bsmg02fonPi6i6lurAKv21/4RBKzE8bzQkaGaE/Q= =cdor -----END PGP SIGNATURE----- --wOVs3qouTqtiEPQUEdeqPPbhq1UU61trs-- From owner-svn-src-all@freebsd.org Fri Feb 3 22:40:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A56ECCF5C3; Fri, 3 Feb 2017 22:40:15 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E05A17FC; Fri, 3 Feb 2017 22:40:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13MeEnx022197; Fri, 3 Feb 2017 22:40:14 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13MeDg1022196; Fri, 3 Feb 2017 22:40:13 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201702032240.v13MeDg1022196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Fri, 3 Feb 2017 22:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313177 - 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 22:40:15 -0000 Author: gnn Date: Fri Feb 3 22:40:13 2017 New Revision: 313177 URL: https://svnweb.freebsd.org/changeset/base/313177 Log: Files which implement the new random number system code for DTrace Submitted by: Graeme Jenkinson MFC after: 2 weeks Sponsored by: DARPA, AFRL Added: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c (contents, props changed) head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h (contents, props changed) Added: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c Fri Feb 3 22:40:13 2017 (r313177) @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2016 (Graeme Jenkinson) + * All rights reserved. + * + * This software was developed by BAE Systems, the University of Cambridge + * Computer Laboratory, and Memorial University under DARPA/AFRL contract + * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing + * (TC) research program. + * + * 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 + +#include "dtrace_xoroshiro128_plus.h" + +static __inline uint64_t +rotl(const uint64_t x, int k) +{ + return (x << k) | (x >> (64 - k)); +} + +/* + * This is the jump function for the generator. It is equivalent to 2^64 calls + * to next(); it can be used to generate 2^64 non-overlapping subsequences for + * parallel computations. + */ +void +dtrace_xoroshiro128_plus_jump(uint64_t * const state, + uint64_t * const jump_state) +{ + static const uint64_t JUMP[] = { 0xbeac0467eba5facb, + 0xd86b048b86aa9922 }; + + uint64_t s0 = 0; + uint64_t s1 = 0; + int i = 0; + int b = 0; + for (i = 0; i < sizeof JUMP / sizeof *JUMP; i++) { + for (b = 0; b < 64; b++) { + if (JUMP[i] & 1ULL << b) { + s0 ^= state[0]; + s1 ^= state[1]; + } + dtrace_xoroshiro128_plus_next(state); + } + } + jump_state[0] = s0; + jump_state[1] = s1; +} + +/* + * xoroshiro128+ - XOR/rotate/shift/rotate + * xorshift.di.unimi.it + */ +uint64_t +dtrace_xoroshiro128_plus_next(uint64_t * const state) +{ + const uint64_t s0 = state[0]; + uint64_t s1 = state[1]; + uint64_t result; + result = s0 + s1; + + s1 ^= s0; + state[0] = rotl(s0, 55) ^ s1 ^ (s1 << 14); + state[1] = rotl(s1, 36); + + return result; +} Added: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.h Fri Feb 3 22:40:13 2017 (r313177) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2016 (Graeme Jenkinson) + * All rights reserved. + * + * This software was developed by BAE Systems, the University of Cambridge + * Computer Laboratory, and Memorial University under DARPA/AFRL contract + * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing + * (TC) research program. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#ifndef _DTRACE_XOROSHIRO128_PLUS_H +#define _DTRACE_XOROSHIRO128_PLUS_H +#endif + +#include + +extern void dtrace_xoroshiro128_plus_jump(uint64_t * const, uint64_t * const); +extern uint64_t dtrace_xoroshiro128_plus_next(uint64_t * const); From owner-svn-src-all@freebsd.org Fri Feb 3 22:42:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0546FCCF752; Fri, 3 Feb 2017 22:42:11 +0000 (UTC) (envelope-from bdrewery@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 B4CC6BC1; Fri, 3 Feb 2017 22:42:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id F182B3013; Fri, 3 Feb 2017 22:42:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 225422BF23; Fri, 3 Feb 2017 22:42:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id vhjeDDcexArF; Fri, 3 Feb 2017 22:41:56 +0000 (UTC) Subject: Re: svn commit: r313169 - head/tools/build/options DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com A85D92BF1D To: Warren Block , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201702031909.v13J9kGN035880@repo.freebsd.org> <99761ce8-5851-6e78-af1d-3fc89f9d6494@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <27b89dcd-76c2-246b-eaea-01e5816b5551@FreeBSD.org> Date: Fri, 3 Feb 2017 14:41:58 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <99761ce8-5851-6e78-af1d-3fc89f9d6494@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="naw2m9wKqpvIoUmb4F1uOsSJSe5iqM8Ab" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 22:42:11 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --naw2m9wKqpvIoUmb4F1uOsSJSe5iqM8Ab Content-Type: multipart/mixed; boundary="xCj3Uoq4WhdDgj5gXgmWHXOVdN6Ww9peB"; protected-headers="v1" From: Bryan Drewery To: Warren Block , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <27b89dcd-76c2-246b-eaea-01e5816b5551@FreeBSD.org> Subject: Re: svn commit: r313169 - head/tools/build/options References: <201702031909.v13J9kGN035880@repo.freebsd.org> <99761ce8-5851-6e78-af1d-3fc89f9d6494@FreeBSD.org> In-Reply-To: <99761ce8-5851-6e78-af1d-3fc89f9d6494@FreeBSD.org> --xCj3Uoq4WhdDgj5gXgmWHXOVdN6Ww9peB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/3/2017 2:39 PM, Bryan Drewery wrote: > On 2/3/2017 11:09 AM, Warren Block wrote: >> Modified: head/tools/build/options/makeman >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/tools/build/options/makeman Fri Feb 3 17:02:57 2017 (r313168= ) >> +++ head/tools/build/options/makeman Fri Feb 3 19:09:46 2017 (r313169= ) >> @@ -8,7 +8,7 @@ export LC_ALL=3DC >> ident=3D'$FreeBSD$' >> =20 >> t=3D$(mktemp -d -t makeman) >> -trap 'test -d $t && rm -rf $t' exit >> +# trap 'test -d $t && rm -rf $t' exit >=20 > Woops, you committed a debug change. >=20 Nm, already fixed. --=20 Regards, Bryan Drewery --xCj3Uoq4WhdDgj5gXgmWHXOVdN6Ww9peB-- --naw2m9wKqpvIoUmb4F1uOsSJSe5iqM8Ab Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJYlQc2AAoJEDXXcbtuRpfPl9MH/02aLvmsIIBZXkePIJy81dug +8Ad7jRPL7TtBM9hgsiShiiKVkfYqba5rNpn7nxlEL2O3I84amszkkSm2GMlAqCI ouSn6xZjzt2Nmv24IOOcrU8wCC86YSFITS8dw5CHFkJgXSBtQfG0qDeEcCxuMS/f BTCJz3EhvTMGCPMbP1zam7EkAT9n6T80c6Y0LgisWD25f8qYc/5gEzMUT0oTrT32 ZnyQ5oavwEBYy41eIMbA5XP8zlUa2my/jjNMRt+gRkQUbiFHxbzVkBRqwa6heMIw wkAHcUi1ZFKpFe5/ZMpo4IOivFr/O+Wgd0bGTB/ydXNLZ7D9Ykxg81m2lKdmzOQ= =862R -----END PGP SIGNATURE----- --naw2m9wKqpvIoUmb4F1uOsSJSe5iqM8Ab-- From owner-svn-src-all@freebsd.org Fri Feb 3 22:42:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE241CCF7AE; Fri, 3 Feb 2017 22:42:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A79FD45; Fri, 3 Feb 2017 22:42:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id 19so2379946pfo.3; Fri, 03 Feb 2017 14:42:44 -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=p3YazZosGfT4LPqvbtl+jXd3u9vvFFiW2oK5dfVsib4=; b=fmj2R+kqpDh1zcMoswwiVl3Q0vanjqm+bcupnLEoXkbub+61HWRjUlv1UtzMZSXg37 p7Xuffmjyd/kgMNVeQ7BMOolRTOCp8eTxkDUDFPK8yUZACkAhP2dB2waXBhto9RLUPuw YiHo0271Udt2XTmLaRUsckZMFrMvDCEvzmYbeRT5e1AGyZF8uKkoywgqqc0HGw6rLpWY JlY7YKDadUkYvhf88QYXtkMZlUpgDirsyBJgeSPcmkFVCPAr35Imv6vLb8dS17qLod6e Ce7ZdYuz528AefxEdQJ8RJdFQcysmI4HkRMBPLDW06HjRIQF2AE/eoFxF21Imt3SpZ8q 79iA== 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=p3YazZosGfT4LPqvbtl+jXd3u9vvFFiW2oK5dfVsib4=; b=TsehhKG2tnCHdkN6KnapooI/YkFjRCqaAt96R6wJlm97gT94vzbPHTE54p3CLoVhUk 3KxSh9YnlRIwNfiHvBl1FI5RxRaaX4dxzgd2YvDkvpGF3/PRPes3Yxv4iK+jH+AmF6Tc sr6O42oopkxbQlSmvJbkCf/saY5hqxoJAK0dKA1plnB9r0xOpYvmWsK8H7fu0O3A1aV7 Whd17PKMEh3UsnJR8EkZFL6Bzkj0S52AvTGhB8Iox45saYjBWCE8mkl186BC3e4s/3X4 nyu9oVm7eoGkxhCe+zx2ngafb4UA94c11cCsZoPQ0TuEO6IDP7FN8Nr4URVibVPOFXJ6 DsmA== X-Gm-Message-State: AIkVDXKvhezi+723VaWqh3L1acQFZvfseKElGaLLEqlZmY3rZVaGVKaoOFltnohVR0vjDg== X-Received: by 10.98.25.21 with SMTP id 21mr21171958pfz.46.1486161763988; Fri, 03 Feb 2017 14:42:43 -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 19sm69595840pft.46.2017.02.03.14.42.43 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Feb 2017 14:42:43 -0800 (PST) Subject: Re: svn commit: r313169 - head/tools/build/options Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_31E5BB45-2493-42CE-A594-0B7A4AF5F57F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <99761ce8-5851-6e78-af1d-3fc89f9d6494@FreeBSD.org> Date: Fri, 3 Feb 2017 14:42:44 -0800 Cc: Warren Block , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <2726EE89-5708-4745-B391-31F8E4477641@gmail.com> References: <201702031909.v13J9kGN035880@repo.freebsd.org> <99761ce8-5851-6e78-af1d-3fc89f9d6494@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 22:42:44 -0000 --Apple-Mail=_31E5BB45-2493-42CE-A594-0B7A4AF5F57F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Feb 3, 2017, at 14:39, Bryan Drewery wrote: >=20 > On 2/3/2017 11:09 AM, Warren Block wrote: >> Modified: head/tools/build/options/makeman >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/tools/build/options/makeman Fri Feb 3 17:02:57 2017 = (r313168) >> +++ head/tools/build/options/makeman Fri Feb 3 19:09:46 2017 = (r313169) >> @@ -8,7 +8,7 @@ export LC_ALL=3DC >> ident=3D'$FreeBSD$' >>=20 >> t=3D$(mktemp -d -t makeman) >> -trap 'test -d $t && rm -rf $t' exit >> +# trap 'test -d $t && rm -rf $t' exit >=20 > Woops, you committed a debug change. wblock fixed it in r313173. -Ngie --Apple-Mail=_31E5BB45-2493-42CE-A594-0B7A4AF5F57F 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 iQIcBAEBCgAGBQJYlQdkAAoJEPWDqSZpMIYVfsIQALth4uZRl20FQ44Vowjl6uYR F313nX5WqfM+g2rELGPjuPsx13RnN36QAHVk8WJQzZAqy2TM4+wtIWyEh7utrjPx Td5tizMA3h/BPEgqUv36prqijp9/cPK6QPOP+dTqP4K5+4blPXt7CkdcjSXHj6pI N8VblpNyTWjTbsf4KWdPnNBCaNjErPvn1bZ/UFMnUARvs5EhCyqxzDumUmsZK+7q JXyhHnvoFqLgm+N8jlOwKZ3E6wToeDT73Fa3iu2Gy1V7wJLsIMjr3meCUcAo1jxo /0XlBpjU4RAwdq9J3Fnr8u6Umzz7/dHmqi03xVbkHSx4Hjlk4Aa5O5X3q0exhcok hn0Q5KVGlumglb24m7o9DoRYXP/jcoQLbsBBPu1ipJm+qinyqfImSDY53o9XeuNW CA0iKsNJay1Ng0M17/I2bceRH0lLp21Lk6zqMTcGWZMdzW9RlcANsvwAe7RTKGSY mTR2/gPIZD/mqaWfa0yuyBjhFpo2uTS+ACDZSclX/+zt6ZiN0l0QofOR6TKvQJx1 8zLuYS58Zw8NcN8W6df9QSU+GlNgR/uNvMzShGZhTu8+QbDUztg2VjKgkzIMl0ZO rZ2+aowQq5abQIrhNv3VsHQFcy6qFNQqjLiIX62kattXgKVjoTZ/yQOtor2qEczc +xcI4qeUaBVSpAr2vd4M =5pBQ -----END PGP SIGNATURE----- --Apple-Mail=_31E5BB45-2493-42CE-A594-0B7A4AF5F57F-- From owner-svn-src-all@freebsd.org Fri Feb 3 22:46:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2D22CCF85F; Fri, 3 Feb 2017 22:46:57 +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 7AA2EEC9; Fri, 3 Feb 2017 22:46:57 +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 v13MkqTC001609 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 4 Feb 2017 00:46:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v13MkqTC001609 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v13Mkq6g001608; Sat, 4 Feb 2017 00:46:52 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 4 Feb 2017 00:46:52 +0200 From: Konstantin Belousov To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313177 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <20170203224652.GC2092@kib.kiev.ua> References: <201702032240.v13MeDg1022196@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201702032240.v13MeDg1022196@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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 22:46:58 -0000 On Fri, Feb 03, 2017 at 10:40:13PM +0000, George V. Neville-Neil wrote: > + > +#ifndef _DTRACE_XOROSHIRO128_PLUS_H > +#define _DTRACE_XOROSHIRO128_PLUS_H > +#endif This protective define is useless unless #endif is placed properly. > + > +#include > + > +extern void dtrace_xoroshiro128_plus_jump(uint64_t * const, uint64_t * const); extern keywords there are useless as well. > +extern uint64_t dtrace_xoroshiro128_plus_next(uint64_t * const); From owner-svn-src-all@freebsd.org Fri Feb 3 23:33:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EB63CCE3CE; Fri, 3 Feb 2017 23:33:08 +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 DAB951AA8; Fri, 3 Feb 2017 23:33:07 +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 v13NX68c046620; Fri, 3 Feb 2017 23:33:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13NX6MR046615; Fri, 3 Feb 2017 23:33:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702032333.v13NX6MR046615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 3 Feb 2017 23:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313178 - in stable: 10/sys/dev/cxgbe/tom 11/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 23:33:08 -0000 Author: jhb Date: Fri Feb 3 23:33:06 2017 New Revision: 313178 URL: https://svnweb.freebsd.org/changeset/base/313178 Log: MFC 312906: Unregister CPL handlers for TOE-related messages when unloading TOM. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/dev/cxgbe/tom/t4_tom.c stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c stable/11/sys/dev/cxgbe/tom/t4_listen.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_connect.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/10/sys/dev/cxgbe/tom/t4_connect.c Fri Feb 3 23:33:06 2017 (r313178) @@ -275,6 +275,14 @@ t4_init_connect_cpl_handlers(void) t4_register_cpl_handler(CPL_ACT_OPEN_RPL, do_act_open_rpl); } +void +t4_uninit_connect_cpl_handlers(void) +{ + + t4_register_cpl_handler(CPL_ACT_ESTABLISH, NULL); + t4_register_cpl_handler(CPL_ACT_OPEN_RPL, NULL); +} + #define DONT_OFFLOAD_ACTIVE_OPEN(x) do { \ reason = __LINE__; \ rc = (x); \ Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb 3 23:33:06 2017 (r313178) @@ -1798,11 +1798,11 @@ void t4_uninit_cpl_io_handlers(void) { - t4_register_cpl_handler(CPL_PEER_CLOSE, do_peer_close); - t4_register_cpl_handler(CPL_CLOSE_CON_RPL, do_close_con_rpl); - t4_register_cpl_handler(CPL_ABORT_REQ_RSS, do_abort_req); - t4_register_cpl_handler(CPL_ABORT_RPL_RSS, do_abort_rpl); - t4_register_cpl_handler(CPL_RX_DATA, do_rx_data); - t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack); + t4_register_cpl_handler(CPL_PEER_CLOSE, NULL); + t4_register_cpl_handler(CPL_CLOSE_CON_RPL, NULL); + t4_register_cpl_handler(CPL_ABORT_REQ_RSS, NULL); + t4_register_cpl_handler(CPL_ABORT_RPL_RSS, NULL); + t4_register_cpl_handler(CPL_RX_DATA, NULL); + t4_register_cpl_handler(CPL_FW4_ACK, NULL); } #endif Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_listen.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/10/sys/dev/cxgbe/tom/t4_listen.c Fri Feb 3 23:33:06 2017 (r313178) @@ -1677,4 +1677,14 @@ t4_init_listen_cpl_handlers(void) t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, do_pass_accept_req); t4_register_cpl_handler(CPL_PASS_ESTABLISH, do_pass_establish); } + +void +t4_uninit_listen_cpl_handlers(void) +{ + + t4_register_cpl_handler(CPL_PASS_OPEN_RPL, NULL); + t4_register_cpl_handler(CPL_CLOSE_LISTSRV_RPL, NULL); + t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, NULL); + t4_register_cpl_handler(CPL_PASS_ESTABLISH, NULL); +} #endif Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 23:33:06 2017 (r313178) @@ -1225,6 +1225,10 @@ t4_tom_mod_unload(void) t4_ddp_mod_unload(); + t4_uninit_connect_cpl_handlers(); + t4_uninit_listen_cpl_handlers(); + t4_uninit_cpl_io_handlers(); + return (0); } #endif /* TCP_OFFLOAD */ Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Fri Feb 3 22:40:13 2017 (r313177) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Fri Feb 3 23:33:06 2017 (r313178) @@ -298,12 +298,14 @@ void release_lip(struct tom_data *, stru /* t4_connect.c */ void t4_init_connect_cpl_handlers(void); +void t4_uninit_connect_cpl_handlers(void); int t4_connect(struct toedev *, struct socket *, struct rtentry *, struct sockaddr *); void act_open_failure_cleanup(struct adapter *, u_int, u_int); /* t4_listen.c */ void t4_init_listen_cpl_handlers(void); +void t4_uninit_listen_cpl_handlers(void); int t4_listen_start(struct toedev *, struct tcpcb *); int t4_listen_stop(struct toedev *, struct tcpcb *); void t4_syncache_added(struct toedev *, void *); From owner-svn-src-all@freebsd.org Fri Feb 3 23:33:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B15D6CCE3D5; Fri, 3 Feb 2017 23:33:08 +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 8A8AD1AA9; Fri, 3 Feb 2017 23:33:08 +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 v13NX7C8046630; Fri, 3 Feb 2017 23:33:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13NX7m9046625; Fri, 3 Feb 2017 23:33:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702032333.v13NX7m9046625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 3 Feb 2017 23:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313178 - in stable: 10/sys/dev/cxgbe/tom 11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 23:33:08 -0000 Author: jhb Date: Fri Feb 3 23:33:06 2017 New Revision: 313178 URL: https://svnweb.freebsd.org/changeset/base/313178 Log: MFC 312906: Unregister CPL handlers for TOE-related messages when unloading TOM. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c stable/11/sys/dev/cxgbe/tom/t4_listen.c stable/11/sys/dev/cxgbe/tom/t4_tom.c stable/11/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/cxgbe/tom/t4_connect.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/dev/cxgbe/tom/t4_tom.c stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_connect.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_connect.c Fri Feb 3 23:33:06 2017 (r313178) @@ -275,6 +275,14 @@ t4_init_connect_cpl_handlers(void) t4_register_cpl_handler(CPL_ACT_OPEN_RPL, do_act_open_rpl); } +void +t4_uninit_connect_cpl_handlers(void) +{ + + t4_register_cpl_handler(CPL_ACT_ESTABLISH, NULL); + t4_register_cpl_handler(CPL_ACT_OPEN_RPL, NULL); +} + #define DONT_OFFLOAD_ACTIVE_OPEN(x) do { \ reason = __LINE__; \ rc = (x); \ Modified: stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Feb 3 23:33:06 2017 (r313178) @@ -1848,12 +1848,12 @@ void t4_uninit_cpl_io_handlers(void) { - t4_register_cpl_handler(CPL_PEER_CLOSE, do_peer_close); - t4_register_cpl_handler(CPL_CLOSE_CON_RPL, do_close_con_rpl); - t4_register_cpl_handler(CPL_ABORT_REQ_RSS, do_abort_req); - t4_register_cpl_handler(CPL_ABORT_RPL_RSS, do_abort_rpl); - t4_register_cpl_handler(CPL_RX_DATA, do_rx_data); - t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack); + t4_register_cpl_handler(CPL_PEER_CLOSE, NULL); + t4_register_cpl_handler(CPL_CLOSE_CON_RPL, NULL); + t4_register_cpl_handler(CPL_ABORT_REQ_RSS, NULL); + t4_register_cpl_handler(CPL_ABORT_RPL_RSS, NULL); + t4_register_cpl_handler(CPL_RX_DATA, NULL); + t4_register_cpl_handler(CPL_FW4_ACK, NULL); } /* Modified: stable/11/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_listen.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_listen.c Fri Feb 3 23:33:06 2017 (r313178) @@ -1622,4 +1622,14 @@ t4_init_listen_cpl_handlers(void) t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, do_pass_accept_req); t4_register_cpl_handler(CPL_PASS_ESTABLISH, do_pass_establish); } + +void +t4_uninit_listen_cpl_handlers(void) +{ + + t4_register_cpl_handler(CPL_PASS_OPEN_RPL, NULL); + t4_register_cpl_handler(CPL_CLOSE_LISTSRV_RPL, NULL); + t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, NULL); + t4_register_cpl_handler(CPL_PASS_ESTABLISH, NULL); +} #endif Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 23:33:06 2017 (r313178) @@ -1229,6 +1229,10 @@ t4_tom_mod_unload(void) t4_ddp_mod_unload(); + t4_uninit_connect_cpl_handlers(); + t4_uninit_listen_cpl_handlers(); + t4_uninit_cpl_io_handlers(); + return (0); } #endif /* TCP_OFFLOAD */ Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.h Fri Feb 3 22:40:13 2017 (r313177) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.h Fri Feb 3 23:33:06 2017 (r313178) @@ -326,12 +326,14 @@ void release_lip(struct tom_data *, stru /* t4_connect.c */ void t4_init_connect_cpl_handlers(void); +void t4_uninit_connect_cpl_handlers(void); int t4_connect(struct toedev *, struct socket *, struct rtentry *, struct sockaddr *); void act_open_failure_cleanup(struct adapter *, u_int, u_int); /* t4_listen.c */ void t4_init_listen_cpl_handlers(void); +void t4_uninit_listen_cpl_handlers(void); int t4_listen_start(struct toedev *, struct tcpcb *); int t4_listen_stop(struct toedev *, struct tcpcb *); void t4_syncache_added(struct toedev *, void *); From owner-svn-src-all@freebsd.org Fri Feb 3 23:48:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44410CCE7CC; Fri, 3 Feb 2017 23:48:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 139AE1E9; Fri, 3 Feb 2017 23:48:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13NmviX050779; Fri, 3 Feb 2017 23:48:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13NmvEk050778; Fri, 3 Feb 2017 23:48:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201702032348.v13NmvEk050778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 3 Feb 2017 23:48:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313179 - stable/11/sys/dev/cxgbe/tom X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 23:48:58 -0000 Author: jhb Date: Fri Feb 3 23:48:56 2017 New Revision: 313179 URL: https://svnweb.freebsd.org/changeset/base/313179 Log: MFC 312904: Don't drop a reference to the TOE PCB in undo_offload_socket(). undo_offload_socket() is only called by t4_connect() during a connection setup failure, but t4_connect() still owns the TOE PCB and frees ita after undo_offload_socket() returns. Release a reference in undo_offload_socket() resulted in a double-free which panicked when t4_connect() performed the second free. The reference release was added to undo_offload_socket() incorrectly in r299210. Sponsored by: Chelsio Communications Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/11/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 23:33:06 2017 (r313178) +++ stable/11/sys/dev/cxgbe/tom/t4_tom.c Fri Feb 3 23:48:56 2017 (r313179) @@ -273,8 +273,6 @@ undo_offload_socket(struct socket *so) mtx_lock(&td->toep_list_lock); TAILQ_REMOVE(&td->toep_list, toep, link); mtx_unlock(&td->toep_list_lock); - - free_toepcb(toep); } static void From owner-svn-src-all@freebsd.org Sat Feb 4 00:34:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CB84CCF560; Sat, 4 Feb 2017 00:34:02 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D44418EB; Sat, 4 Feb 2017 00:34:02 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v140Y1AQ071002; Sat, 4 Feb 2017 00:34:01 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v140Y1ME070999; Sat, 4 Feb 2017 00:34:01 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702040034.v140Y1ME070999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 4 Feb 2017 00:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313180 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 00:34:02 -0000 Author: vangyzen Date: Sat Feb 4 00:34:00 2017 New Revision: 313180 URL: https://svnweb.freebsd.org/changeset/base/313180 Log: PCIe HotPlug: remove tests for DL active link capability As of r313097, the HotPlug code requires the link to support reporting of the data-link status. Remove tests for this capability from code that can now assume its presence. Suggested by: jhb Reviewed by: jhb MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D9431 Modified: head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_private.h Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Fri Feb 3 23:48:56 2017 (r313179) +++ head/sys/dev/pci/pci_pci.c Sat Feb 4 00:34:00 2017 (r313180) @@ -918,6 +918,7 @@ static void pcib_probe_hotplug(struct pcib_softc *sc) { device_t dev; + uint32_t link_cap; uint16_t link_sta, slot_sta; if (!pci_enable_pcie_hp) @@ -930,12 +931,12 @@ pcib_probe_hotplug(struct pcib_softc *sc if (!(pcie_read_config(dev, PCIER_FLAGS, 2) & PCIEM_FLAGS_SLOT)) return; - sc->pcie_link_cap = pcie_read_config(dev, PCIER_LINK_CAP, 4); sc->pcie_slot_cap = pcie_read_config(dev, PCIER_SLOT_CAP, 4); if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_HPC) == 0) return; - if ((sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) == 0) + link_cap = pcie_read_config(dev, PCIER_LINK_CAP, 4); + if ((link_cap & PCIEM_LINK_CAP_DL_ACTIVE) == 0) return; /* @@ -947,8 +948,7 @@ pcib_probe_hotplug(struct pcib_softc *sc * If there is an open MRL but the Data Link Layer is active, * the MRL is not real. */ - if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP) != 0 && - (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) != 0) { + if ((sc->pcie_slot_cap & PCIEM_SLOT_CAP_MRLSP) != 0) { link_sta = pcie_read_config(dev, PCIER_LINK_STA, 2); slot_sta = pcie_read_config(dev, PCIER_SLOT_STA, 2); if ((slot_sta & PCIEM_SLOT_STA_MRLSS) != 0 && @@ -1061,10 +1061,8 @@ pcib_hotplug_present(struct pcib_softc * return (0); /* Require the Data Link Layer to be active. */ - if (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) { - if (!(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE)) - return (0); - } + if (!(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE)) + return (0); return (-1); } @@ -1121,20 +1119,18 @@ pcib_pcie_hotplug_update(struct pcib_sof * changed on this interrupt. Stop any scheduled timer if * the Data Link Layer is active. */ - if (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) { - if (card_inserted && - !(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) && - sc->pcie_slot_sta & - (PCIEM_SLOT_STA_MRLSC | PCIEM_SLOT_STA_PDC)) { - if (cold) - device_printf(sc->dev, - "Data Link Layer inactive\n"); - else - callout_reset(&sc->pcie_dll_timer, hz, - pcib_pcie_dll_timeout, sc); - } else if (sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) - callout_stop(&sc->pcie_dll_timer); - } + if (card_inserted && + !(sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) && + sc->pcie_slot_sta & + (PCIEM_SLOT_STA_MRLSC | PCIEM_SLOT_STA_PDC)) { + if (cold) + device_printf(sc->dev, + "Data Link Layer inactive\n"); + else + callout_reset(&sc->pcie_dll_timer, hz, + pcib_pcie_dll_timeout, sc); + } else if (sc->pcie_link_sta & PCIEM_LINK_STA_DL_ACTIVE) + callout_stop(&sc->pcie_dll_timer); pcib_pcie_hotplug_command(sc, val, mask); @@ -1384,7 +1380,7 @@ pcib_setup_hotplug(struct pcib_softc *sc mask = PCIEM_SLOT_CTL_DLLSCE | PCIEM_SLOT_CTL_HPIE | PCIEM_SLOT_CTL_CCIE | PCIEM_SLOT_CTL_PDCE | PCIEM_SLOT_CTL_MRLSCE | PCIEM_SLOT_CTL_PFDE | PCIEM_SLOT_CTL_ABPE; - val = PCIEM_SLOT_CTL_PDCE | PCIEM_SLOT_CTL_HPIE; + val = PCIEM_SLOT_CTL_DLLSCE | PCIEM_SLOT_CTL_HPIE | PCIEM_SLOT_CTL_PDCE; if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_APB) val |= PCIEM_SLOT_CTL_ABPE; if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_PCP) @@ -1393,8 +1389,6 @@ pcib_setup_hotplug(struct pcib_softc *sc val |= PCIEM_SLOT_CTL_MRLSCE; if (!(sc->pcie_slot_cap & PCIEM_SLOT_CAP_NCCS)) val |= PCIEM_SLOT_CTL_CCIE; - if (sc->pcie_link_cap & PCIEM_LINK_CAP_DL_ACTIVE) - val |= PCIEM_SLOT_CTL_DLLSCE; /* Turn the attention indicator off. */ if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_AIP) { Modified: head/sys/dev/pci/pcib_private.h ============================================================================== --- head/sys/dev/pci/pcib_private.h Fri Feb 3 23:48:56 2017 (r313179) +++ head/sys/dev/pci/pcib_private.h Sat Feb 4 00:34:00 2017 (r313180) @@ -132,7 +132,6 @@ struct pcib_softc uint16_t bridgectl; /* bridge control register */ uint16_t pcie_link_sta; uint16_t pcie_slot_sta; - uint32_t pcie_link_cap; uint32_t pcie_slot_cap; struct resource *pcie_irq; void *pcie_ihand; From owner-svn-src-all@freebsd.org Sat Feb 4 00:37:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25D85CCF5FD; Sat, 4 Feb 2017 00:37:27 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4AED1A9C; Sat, 4 Feb 2017 00:37:26 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v140bPmG071203; Sat, 4 Feb 2017 00:37:25 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v140bPri071202; Sat, 4 Feb 2017 00:37:25 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201702040037.v140bPri071202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 4 Feb 2017 00:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313181 - head/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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 00:37:27 -0000 Author: vangyzen Date: Sat Feb 4 00:37:25 2017 New Revision: 313181 URL: https://svnweb.freebsd.org/changeset/base/313181 Log: Fix grammar in getpeereid(3) Modified: head/lib/libc/gen/getpeereid.3 Modified: head/lib/libc/gen/getpeereid.3 ============================================================================== --- head/lib/libc/gen/getpeereid.3 Sat Feb 4 00:34:00 2017 (r313180) +++ head/lib/libc/gen/getpeereid.3 Sat Feb 4 00:37:25 2017 (r313181) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2001 +.Dd February 3, 2017 .Dt GETPEEREID 3 .Os .Sh NAME @@ -57,8 +57,8 @@ on which either .Xr connect 2 or .Xr listen 2 -have been called. -The effective used ID is placed in +has been called. +The effective user ID is placed in .Fa euid , and the effective group ID in .Fa egid . From owner-svn-src-all@freebsd.org Sat Feb 4 01:21:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66943CCF3D0; Sat, 4 Feb 2017 01:21: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 36773112B; Sat, 4 Feb 2017 01:21: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 v141LmEo090560; Sat, 4 Feb 2017 01:21:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v141Lmhf090559; Sat, 4 Feb 2017 01:21:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702040121.v141Lmhf090559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 01:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313182 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 01:21:49 -0000 Author: ngie Date: Sat Feb 4 01:21:48 2017 New Revision: 313182 URL: https://svnweb.freebsd.org/changeset/base/313182 Log: Fix typo in variable name (_REDUNDENT_LIB_DIRS -> _REDUNDANT_LIB_DIRS) MFC after: 3 days Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Feb 4 00:37:25 2017 (r313181) +++ head/Makefile.inc1 Sat Feb 4 01:21:48 2017 (r313182) @@ -242,10 +242,10 @@ SUBDIR+= ${_DIR} # of a LOCAL_DIRS directory. This allows LOCAL_DIRS=foo and # LOCAL_LIB_DIRS=foo/lib to behave as expected. .for _DIR in ${LOCAL_DIRS:M*/} ${LOCAL_DIRS:N*/:S|$|/|} -_REDUNDENT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} +_REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} .endfor .for _DIR in ${LOCAL_LIB_DIRS} -.if empty(_REDUNDENT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile) +.if empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile) SUBDIR+= ${_DIR} .else .warning ${_DIR} not added to SUBDIR list. See UPDATING 20141121. From owner-svn-src-all@freebsd.org Sat Feb 4 01:24:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 549CDCCF6C8; Sat, 4 Feb 2017 01:24: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 239821538; Sat, 4 Feb 2017 01:24: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 v141OLRv091562; Sat, 4 Feb 2017 01:24:21 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v141OL6J091561; Sat, 4 Feb 2017 01:24:21 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201702040124.v141OL6J091561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 4 Feb 2017 01:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313183 - stable/11/sys/boot/arm/uboot X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 01:24:22 -0000 Author: gonzo Date: Sat Feb 4 01:24:21 2017 New Revision: 313183 URL: https://svnweb.freebsd.org/changeset/base/313183 Log: MFC r310124 (by andrew): Add -fPIC to the ubldr build. Without this the self relocation code will try to use an absolute address in a switch statement, jumping to an invalid memory location. Sponsored by: ABT Systems Ltd PR: 216504 Modified: stable/11/sys/boot/arm/uboot/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/arm/uboot/Makefile ============================================================================== --- stable/11/sys/boot/arm/uboot/Makefile Sat Feb 4 01:21:48 2017 (r313182) +++ stable/11/sys/boot/arm/uboot/Makefile Sat Feb 4 01:24:21 2017 (r313183) @@ -109,6 +109,8 @@ CFLAGS+= -I${.OBJDIR}/../../uboot/lib # where to get libstand from CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ +CFLAGS+= -fPIC + # clang doesn't understand %D as a specifier to printf NO_WERROR.clang= From owner-svn-src-all@freebsd.org Sat Feb 4 02:15:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32C6BCCF4A9; Sat, 4 Feb 2017 02:15:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3A65127A; Sat, 4 Feb 2017 02:15:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v142FoZH011871; Sat, 4 Feb 2017 02:15:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v142Fobx011870; Sat, 4 Feb 2017 02:15:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201702040215.v142Fobx011870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 4 Feb 2017 02:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313184 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 02:15:51 -0000 Author: bdrewery Date: Sat Feb 4 02:15:49 2017 New Revision: 313184 URL: https://svnweb.freebsd.org/changeset/base/313184 Log: Remove LOCAL_LIB_DIRS warning added in r275839. The case for which this was added, r274807, causes this warning to always show. LOCAL_DIRS=foo LOCAL_LIB_DIRS=foo/lib. The only case in which r274807 is a problem is if foo/Makefile does not contain SUBDIR+=lib, which is a normal convention. LOCAL_LIB_DIRS is a special hack only to get a library into the _generic_libs list for the 'make libraries' bootstrapping phase. The old behavior changed in r274807 was only in head during the 10.0 cycle, so the warning was only ever needed until release anyhow. Reported by: ngie MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Feb 4 01:24:21 2017 (r313183) +++ head/Makefile.inc1 Sat Feb 4 02:15:49 2017 (r313184) @@ -247,8 +247,6 @@ _REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIR .for _DIR in ${LOCAL_LIB_DIRS} .if empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile) SUBDIR+= ${_DIR} -.else -.warning ${_DIR} not added to SUBDIR list. See UPDATING 20141121. .endif .endfor From owner-svn-src-all@freebsd.org Sat Feb 4 04:12:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B196CD0B22; Sat, 4 Feb 2017 04:12:48 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::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 EDD2C1486; Sat, 4 Feb 2017 04:12:47 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by mail-qt0-x243.google.com with SMTP id h53so8314146qth.3; Fri, 03 Feb 2017 20:12:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=bCbWnuAKfVf+lM7mvTpa5afRC47dyNjKFfA40qMLk3Y=; b=A8KQ18ySSa2oLfGkN7thNXnppErCAYWdSatcTS4kvnmxMwaYdSeWvKzCKgkBQgevCf ggEndMpGSZ5PDwz3FsGLjXVvwp/ff/0XckmE3z9dOqaaBvPfPG5XbRponSbEUJ2xn0R6 PDdBu+WPiKwHPXKXiF97dx400d7NUJ2MLn974ENL4ceCXiKmLxd6HZZ56uEqjbJ0RcV8 Qw7Vh9Mn45rs8DxVYjCcfZLucWZITZByiNojpiTfAHtSkeXWYEgaS6qSBMR/oPd8JlFT kManySAp6a+63wzlOLVajQpjzI5p2WZdPCKiZKwX5UEG7v7u5dwPfRVtys8i/PLDWHK0 O8Yg== 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:in-reply-to :references:mime-version; bh=bCbWnuAKfVf+lM7mvTpa5afRC47dyNjKFfA40qMLk3Y=; b=F/SlbXQFgJAosKoP9erzxMTQTJimtlglg4PfmESk7eOXdW1MJ+jOviSCnNqgM7pQ7H /jTAm9Z5t+zGkVTgeGytncCVZ8XHARqRdHKLzgRSxWE1BIvUEkYtUTWtxBjDUwkZfIOa xURvzwsGeLxwJmq6luf8mKYErfKLU3O2VdAa1xiqmYiiPaxgAQI0cWDb9mANbq6yBnGC 4HWPajjT1h9F/0xGtgm3GRI9L317UB84+K64XHz1/F0r+Za5UgPM62YqDisVAbvLpst0 rJheoyhraPFPxFDPqPRxOBag5Drw34E4j+K8ibFPyU3mjFopypaacSSs/h3crtlJ48Iz yEEQ== X-Gm-Message-State: AMke39mO6oxRZuxdDO57DiSN5ejRd+Fz8pQljW1+YtOUWE+t12+mgnPFEhzpH569DvtwZQ== X-Received: by 10.200.43.115 with SMTP id 48mr372168qtv.157.1486181566715; Fri, 03 Feb 2017 20:12:46 -0800 (PST) Received: from kan ([2601:18f:802:4680:226:18ff:fe00:232e]) by smtp.gmail.com with ESMTPSA id d52sm26422460qtc.2.2017.02.03.20.12.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Feb 2017 20:12:43 -0800 (PST) Date: Fri, 3 Feb 2017 23:12:38 -0500 From: Alexander Kabaev To: "Jason A. Harmening" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include Message-ID: <20170203231238.0675c289@kan> In-Reply-To: <201702010332.v113WnYf041362@repo.freebsd.org> References: <201702010332.v113WnYf041362@repo.freebsd.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/qc8uWeVfq6fCjBto+huGfjq"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 04:12:48 -0000 --Sig_/qc8uWeVfq6fCjBto+huGfjq Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 1 Feb 2017 03:32:49 +0000 (UTC) "Jason A. Harmening" wrote: > Author: jah > Date: Wed Feb 1 03:32:49 2017 > New Revision: 313037 > URL: https://svnweb.freebsd.org/changeset/base/313037 >=20 > Log: > Implement get_pcpu() for the remaining architectures and use it to > replace pcpu_find(curcpu) in MI code. >=20 > Modified: > head/sys/amd64/include/pcpu.h > head/sys/kern/kern_rmlock.c > head/sys/mips/include/pcpu.h > head/sys/net/netisr.c > head/sys/powerpc/include/cpufunc.h > head/sys/powerpc/include/pcpu.h > head/sys/sparc64/include/pcpu.h >=20 Hi, this change was not reviewed nor testing was thought for all architectures it touches. The change happens to break MIPS quite thoroughly, since MIPS is using different pointers when accessing PCPU area locally and when doing iterations using cpu_to_cpuid array. I therefore officially am requesting this change to be reverted until reasonable solution is found to unbreak architectures that use wired TLBs to access local per-CPU data. --=20 Alexander Kabaev --Sig_/qc8uWeVfq6fCjBto+huGfjq Content-Type: application/pgp-signature Content-Description: Цифровая подпись OpenPGP -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEExffZlZm2QeE8UVaRBxMimZJ5Ln4FAliVVLZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEM1 RjdEOTk1OTlCNjQxRTEzQzUxNTY5MTA3MTMyMjk5OTI3OTJFN0UACgkQBxMimZJ5 Ln5C5BAAi+BeKHGRfGjrUvBD1Bkx6bRcIoFJMgrZ1bLrRtH+ibGeMeGnwnLwZ6Th lmkWFj1hDJ0UEem6KXtyM+8LQm0BKkJr+5Vc6Fdt9QDIAmagsct6jpQFgmh4Q+/5 Gh0hBWMlHUJW4MsMW6bT8v8qw3jmDxf7UE6lrivrW/ul7zn4x8WCIW9NXB3DG70G Cf/JVHM7lcYj9S+7kxdU4v5Ct+xkOT4AUWiumVUKbO+DPdh973QoMgr1fsVGU7Nv O/ykcvJwdscGwp8eDgIWuwsFEEl1gZzBNQGZyRIBt9qt06AJmpvQ9rq0/bMA2I1L HulsIWq9QU5+ghTBuz8xcwL9Jc7NcykFWJhnBopxR+2Yr6rTjsNPv4WqzyigwakO 6+qYvCWCC+lTyZV9BkczUu9uXFHIgMxxfRKogNxRQ1ukUH/pPbJSY15f82MAmCQi MxvjnTwF8j6QSjsmwM1tfZOTEuGmVBXTTZCI2H5EFow/9FwZhSXNxa0JgqfuyXCq VClSqSS6tEdnCZS+kHVYgmzj1886iDzYJ4v+qSb0/18l677xSdVnpriFLKfLiKMH ObEUzRQlLcELOeRSjFIoS9h/Mi/1ylrlWtela95QDeXxfOiLHNCs5WWuJysWj77H oNUjkrDqoNfmpRReqKstEi3ojbsr9h7PlNwp1SR9cwLa0f8ZlLo= =4S6O -----END PGP SIGNATURE----- --Sig_/qc8uWeVfq6fCjBto+huGfjq-- From owner-svn-src-all@freebsd.org Sat Feb 4 05:09:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6568CD0087; Sat, 4 Feb 2017 05:09:48 +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 7387D1563; Sat, 4 Feb 2017 05:09:48 +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 v1459lex081997; Sat, 4 Feb 2017 05:09:47 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1459llj081996; Sat, 4 Feb 2017 05:09:47 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201702040509.v1459llj081996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 4 Feb 2017 05:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313185 - head/sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 05:09:48 -0000 Author: ae Date: Sat Feb 4 05:09:47 2017 New Revision: 313185 URL: https://svnweb.freebsd.org/changeset/base/313185 Log: Check that primary GPT header is valid before wiping partitioning. This allows safely destroy corrupted GPT when primary header was rewritten by some data, that do not want to destroy. MFC after: 1 week Modified: head/sys/geom/part/g_part_gpt.c Modified: head/sys/geom/part/g_part_gpt.c ============================================================================== --- head/sys/geom/part/g_part_gpt.c Sat Feb 4 02:15:49 2017 (r313184) +++ head/sys/geom/part/g_part_gpt.c Sat Feb 4 05:09:47 2017 (r313185) @@ -687,10 +687,11 @@ g_part_gpt_destroy(struct g_part_table * table->hdr = NULL; /* - * Wipe the first 2 sectors to clear the partitioning. Wipe the last - * sector only if it has valid secondary header. + * Wipe the first 2 sectors and last one to clear the partitioning. + * Wipe sectors only if they have valid metadata. */ - basetable->gpt_smhead |= 3; + if (table->state[GPT_ELT_PRIHDR] == GPT_STATE_OK) + basetable->gpt_smhead |= 3; if (table->state[GPT_ELT_SECHDR] == GPT_STATE_OK && table->lba[GPT_ELT_SECHDR] == pp->mediasize / pp->sectorsize - 1) basetable->gpt_smtail |= 1; From owner-svn-src-all@freebsd.org Sat Feb 4 05:23:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CA4BCD0598; Sat, 4 Feb 2017 05:23:13 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC87D1EFE; Sat, 4 Feb 2017 05:23:11 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v145NA7A090102; Sat, 4 Feb 2017 05:23:10 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v145NAHd090101; Sat, 4 Feb 2017 05:23:10 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201702040523.v145NAHd090101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 4 Feb 2017 05:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313186 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 05:23:13 -0000 Author: alc Date: Sat Feb 4 05:23:10 2017 New Revision: 313186 URL: https://svnweb.freebsd.org/changeset/base/313186 Log: Over the years, the code and comments in vm_page_startup() have diverged in one respect. When determining how many page structures to allocate, contrary to what the comments say, the code does not account for the overhead of a page structure per page of physical memory. This revision changes the code to match the comments. Reviewed by: kib, markj MFC after: 6 weeks Differential Revision: https://reviews.freebsd.org/D9081 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat Feb 4 05:09:47 2017 (r313185) +++ head/sys/vm/vm_page.c Sat Feb 4 05:23:10 2017 (r313186) @@ -421,17 +421,16 @@ vm_page_domain_init(struct vm_domain *vm /* * vm_page_startup: * - * Initializes the resident memory module. - * - * Allocates memory for the page cells, and - * for the object/offset-to-page hash table headers. - * Each page cell is initialized and placed on the free list. + * Initializes the resident memory module. Allocates physical memory for + * bootstrapping UMA and some data structures that are used to manage + * physical pages. Initializes these structures, and populates the free + * page queues. */ vm_offset_t vm_page_startup(vm_offset_t vaddr) { vm_offset_t mapped; - vm_paddr_t page_range; + vm_paddr_t high_avail, low_avail, page_range, size; vm_paddr_t new_end; int i; vm_paddr_t pa; @@ -439,7 +438,6 @@ vm_page_startup(vm_offset_t vaddr) char *list, *listend; vm_paddr_t end; vm_paddr_t biggestsize; - vm_paddr_t low_water, high_water; int biggestone; int pages_per_zone; @@ -451,27 +449,12 @@ vm_page_startup(vm_offset_t vaddr) phys_avail[i] = round_page(phys_avail[i]); phys_avail[i + 1] = trunc_page(phys_avail[i + 1]); } - - low_water = phys_avail[0]; - high_water = phys_avail[1]; - - for (i = 0; i < vm_phys_nsegs; i++) { - if (vm_phys_segs[i].start < low_water) - low_water = vm_phys_segs[i].start; - if (vm_phys_segs[i].end > high_water) - high_water = vm_phys_segs[i].end; - } for (i = 0; phys_avail[i + 1]; i += 2) { - vm_paddr_t size = phys_avail[i + 1] - phys_avail[i]; - + size = phys_avail[i + 1] - phys_avail[i]; if (size > biggestsize) { biggestone = i; biggestsize = size; } - if (phys_avail[i] < low_water) - low_water = phys_avail[i]; - if (phys_avail[i + 1] > high_water) - high_water = phys_avail[i + 1]; } end = phys_avail[biggestone+1]; @@ -486,7 +469,7 @@ vm_page_startup(vm_offset_t vaddr) vm_page_domain_init(&vm_dom[i]); /* - * Almost all of the pages needed for boot strapping UMA are used + * Almost all of the pages needed for bootstrapping UMA are used * for zone structures, so if the number of CPUs results in those * structures taking more than one page each, we set aside more pages * in proportion to the zone structure size. @@ -537,6 +520,16 @@ vm_page_startup(vm_offset_t vaddr) new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE); bzero((void *)vm_page_dump, vm_page_dump_size); #endif +#if defined(__aarch64__) || defined(__amd64__) || defined(__mips__) + /* + * Include the UMA bootstrap pages and vm_page_dump in a crash dump. + * When pmap_map() uses the direct map, they are not automatically + * included. + */ + for (pa = new_end; pa < end; pa += PAGE_SIZE) + dump_add_page(pa); +#endif + phys_avail[biggestone + 1] = new_end; #ifdef __amd64__ /* * Request that the physical pages underlying the message buffer be @@ -552,20 +545,48 @@ vm_page_startup(vm_offset_t vaddr) #endif /* * Compute the number of pages of memory that will be available for - * use (taking into account the overhead of a page structure per - * page). + * use, taking into account the overhead of a page structure per page. + * In other words, solve + * "available physical memory" - round_page(page_range * + * sizeof(struct vm_page)) = page_range * PAGE_SIZE + * for page_range. */ - first_page = low_water / PAGE_SIZE; -#ifdef VM_PHYSSEG_SPARSE - page_range = 0; + low_avail = phys_avail[0]; + high_avail = phys_avail[1]; for (i = 0; i < vm_phys_nsegs; i++) { - page_range += atop(vm_phys_segs[i].end - - vm_phys_segs[i].start); + if (vm_phys_segs[i].start < low_avail) + low_avail = vm_phys_segs[i].start; + if (vm_phys_segs[i].end > high_avail) + high_avail = vm_phys_segs[i].end; + } + /* Skip the first chunk. It is already accounted for. */ + for (i = 2; phys_avail[i + 1] != 0; i += 2) { + if (phys_avail[i] < low_avail) + low_avail = phys_avail[i]; + if (phys_avail[i + 1] > high_avail) + high_avail = phys_avail[i + 1]; } + first_page = low_avail / PAGE_SIZE; +#ifdef VM_PHYSSEG_SPARSE + size = 0; + for (i = 0; i < vm_phys_nsegs; i++) + size += vm_phys_segs[i].end - vm_phys_segs[i].start; for (i = 0; phys_avail[i + 1] != 0; i += 2) - page_range += atop(phys_avail[i + 1] - phys_avail[i]); + size += phys_avail[i + 1] - phys_avail[i]; + page_range = size / (PAGE_SIZE + sizeof(struct vm_page)); #elif defined(VM_PHYSSEG_DENSE) - page_range = high_water / PAGE_SIZE - first_page; + /* + * In the VM_PHYSSEG_DENSE case, the number of pages can account for + * the overhead of a page structure per page only if vm_page_array is + * allocated from the last physical memory chunk. Otherwise, we must + * allocate page structures representing the physical memory + * underlying vm_page_array, even though they will not be used. + */ + if (new_end == high_avail) + page_range = (high_avail - low_avail) / (PAGE_SIZE + + sizeof(struct vm_page)); + else + page_range = high_avail / PAGE_SIZE - first_page; #else #error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." #endif @@ -573,12 +594,13 @@ vm_page_startup(vm_offset_t vaddr) /* * Reserve an unmapped guard page to trap access to vm_page_array[-1]. + * However, because this page is allocated from KVM, out-of-bounds + * accesses using the direct map will not be trapped. */ vaddr += PAGE_SIZE; /* - * Initialize the mem entry structures now, and put them in the free - * queue. + * Allocate physical memory for the page structures, and map it. */ new_end = trunc_page(end - page_range * sizeof(struct vm_page)); mapped = pmap_map(&vaddr, new_end, end, @@ -586,19 +608,18 @@ vm_page_startup(vm_offset_t vaddr) vm_page_array = (vm_page_t) mapped; #if VM_NRESERVLEVEL > 0 /* - * Allocate memory for the reservation management system's data - * structures. + * Allocate physical memory for the reservation management system's + * data structures, and map it. */ - new_end = vm_reserv_startup(&vaddr, new_end, high_water); + if (high_avail == end) + high_avail = new_end; + new_end = vm_reserv_startup(&vaddr, new_end, high_avail); #endif #if defined(__aarch64__) || defined(__amd64__) || defined(__mips__) /* - * pmap_map on arm64, amd64, and mips can come out of the direct-map, - * not kvm like i386, so the pages must be tracked for a crashdump to - * include this data. This includes the vm_page_array and the early - * UMA bootstrap pages. + * Include vm_page_array and vm_reserv_array in a crash dump. */ - for (pa = new_end; pa < phys_avail[biggestone + 1]; pa += PAGE_SIZE) + for (pa = new_end; pa < end; pa += PAGE_SIZE) dump_add_page(pa); #endif phys_avail[biggestone + 1] = new_end; From owner-svn-src-all@freebsd.org Sat Feb 4 05:29:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5D38CD071B; Sat, 4 Feb 2017 05:29:34 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-ot0-x244.google.com (mail-ot0-x244.google.com [IPv6:2607:f8b0:4003:c0f::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 6A7181F8; Sat, 4 Feb 2017 05:29:34 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-ot0-x244.google.com with SMTP id 73so4565164otj.1; Fri, 03 Feb 2017 21:29:34 -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=gk010vl6EJwcICvv1ayMUmErJYVyyoHdo5+VvUMsgkA=; b=NYuTg9tmm1DA6H1XExg5S7tvUAwYGzkSS9fNq4j0sW4QRBkYW3mta1A8z59n0X8NHt 2fZNlFhr0VkGDSFVQqCR1Jt+hJnZA0mFMwLP16QGnxbC0hrJvPCi3rElNHhnX6uH3ari Fjkal9s7JpP4LuSaFxyaft9pldgLLO4UseoVPebkIFpBtGV7569+kACxxcyRQrTZDaVI v6Upv5SM5cCRA0lY8UqgAVUwnnbDGgB8d/mmW7k2hatOqKsahJOj8uZ1N30lEzq0IAh+ VA9UZDGdyag1GtITStCEtZ0Ky7Da5oy0RJk0iYCQpglWvyMF2dR+mMJsJg+oAXUBrDsC OKXQ== 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=gk010vl6EJwcICvv1ayMUmErJYVyyoHdo5+VvUMsgkA=; b=QOGO7RTr1sGZ7oLy57MenjaK/cvx/0XyH/PliTxqBBg7kC9jh6/sJB7V7gy0RXR8Gw URpBhE5OPTvZ9OfIelmWZoUl6d1z4fdGsGmvILH+Hfen/UoYwmtJmd6/b91tnYXxnnDT d2TBdcTK1CcId01lyvA9LvkTU5BcToc5+YaqrULr5gC/E9WPvEs9I5OKjXHTCi3+Nl7+ GAqUeKNcyDOwZ6qky/EsjuVaX/Khr4x7w7pZKA3WnwTysnfuFKQAA0ia7Hg0jc785vIq VBODaJuNAK3wO4SMtlJkPrYXsx7GCORwPiiToO77Id1jXOJ8ekf9NmpQaerkH+3BhyCc Pv3A== X-Gm-Message-State: AIkVDXIEdVu3ErZRz8bM8UHW2uL068uPzi732c1GDgz2AqX3JmpkRrNpHYPUMyy3TYPyZqznVf8Jh//iQOYsvQ== X-Received: by 10.157.7.53 with SMTP id 50mr239549ote.91.1486186173526; Fri, 03 Feb 2017 21:29:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.51.7 with HTTP; Fri, 3 Feb 2017 21:29:33 -0800 (PST) In-Reply-To: <20170203231238.0675c289@kan> References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> From: Jason Harmening Date: Fri, 3 Feb 2017 21:29:33 -0800 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Alexander Kabaev Cc: "Jason A. Harmening" , 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 05:29:34 -0000 Hi, I'm a bit confused as to how this change breaks MIPS. The new function, get_pcpu() is intended to be used only to access the per-cpu data pointer locally. It returns pcpup, which is the per-cpu pointer wired into the local TLB to translate to the local CPU's physical data region, correct? This is the same value used by the per-CPU accessors such as PCPU_ADD and PCPU_GET. The MI portions of this change only use get_pcpu() to access the local CPU's data, e.g. under a critical section in the rmlock. It is not intended to be used for iterating all CPUs. If I've missed something and MIPS is truly broken by this, then I'll gladly revert, but (maybe because it's late) I'm not seeing where this goes wrong on MIPS. Thanks, Jason On Fri, Feb 3, 2017 at 8:12 PM, Alexander Kabaev wrote: > On Wed, 1 Feb 2017 03:32:49 +0000 (UTC) > "Jason A. Harmening" wrote: > > > Author: jah > > Date: Wed Feb 1 03:32:49 2017 > > New Revision: 313037 > > URL: https://svnweb.freebsd.org/changeset/base/313037 > > > > Log: > > Implement get_pcpu() for the remaining architectures and use it to > > replace pcpu_find(curcpu) in MI code. > > > > Modified: > > head/sys/amd64/include/pcpu.h > > head/sys/kern/kern_rmlock.c > > head/sys/mips/include/pcpu.h > > head/sys/net/netisr.c > > head/sys/powerpc/include/cpufunc.h > > head/sys/powerpc/include/pcpu.h > > head/sys/sparc64/include/pcpu.h > > > > Hi, > > this change was not reviewed nor testing was thought for all > architectures it touches. The change happens to break MIPS quite > thoroughly, since MIPS is using different pointers when accessing PCPU > area locally and when doing iterations using cpu_to_cpuid array. I > therefore officially am requesting this change to be reverted until > reasonable solution is found to unbreak architectures that use wired > TLBs to access local per-CPU data. > > -- > Alexander Kabaev > From owner-svn-src-all@freebsd.org Sat Feb 4 05:52:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB251CD0E5D; Sat, 4 Feb 2017 05:52:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAF6810A6; Sat, 4 Feb 2017 05:52:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v145qoZH002622; Sat, 4 Feb 2017 05:52:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v145qouO002621; Sat, 4 Feb 2017 05:52:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702040552.v145qouO002621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 4 Feb 2017 05:52:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313188 - head/sbin/nvmecontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 05:52:52 -0000 Author: imp Date: Sat Feb 4 05:52:50 2017 New Revision: 313188 URL: https://svnweb.freebsd.org/changeset/base/313188 Log: Put the arguments to aligned_alloc in the right order. Modified: head/sbin/nvmecontrol/firmware.c Modified: head/sbin/nvmecontrol/firmware.c ============================================================================== --- head/sbin/nvmecontrol/firmware.c Sat Feb 4 05:52:14 2017 (r313187) +++ head/sbin/nvmecontrol/firmware.c Sat Feb 4 05:52:50 2017 (r313188) @@ -114,7 +114,7 @@ update_firmware(int fd, uint8_t *payload off = 0; resid = payload_size; - if ((chunk = aligned_alloc(NVME_MAX_XFER_SIZE, PAGE_SIZE)) == NULL) + if ((chunk = aligned_alloc(PAGE_SIZE, NVME_MAX_XFER_SIZE)) == NULL) errx(1, "unable to malloc %d bytes", NVME_MAX_XFER_SIZE); while (resid > 0) { From owner-svn-src-all@freebsd.org Sat Feb 4 05:52:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 433C5CD0E69; Sat, 4 Feb 2017 05:52:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 130AC10A8; Sat, 4 Feb 2017 05:52:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v145qqa7002667; Sat, 4 Feb 2017 05:52:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v145qqaO002666; Sat, 4 Feb 2017 05:52:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702040552.v145qqaO002666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 4 Feb 2017 05:52:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313189 - head/tools/tools/nanobsd/embedded X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 05:52:53 -0000 Author: imp Date: Sat Feb 4 05:52:51 2017 New Revision: 313189 URL: https://svnweb.freebsd.org/changeset/base/313189 Log: Back off using CPUTYPE for the moment. There's still some issues with that. Modified: head/tools/tools/nanobsd/embedded/rpi2.cfg Modified: head/tools/tools/nanobsd/embedded/rpi2.cfg ============================================================================== --- head/tools/tools/nanobsd/embedded/rpi2.cfg Sat Feb 4 05:52:50 2017 (r313188) +++ head/tools/tools/nanobsd/embedded/rpi2.cfg Sat Feb 4 05:52:51 2017 (r313189) @@ -31,6 +31,5 @@ NANO_KERNEL=RPI2 NANO_DRIVE=mmcsd0 NANO_NAME=rpi2 NANO_BOOT_PKG=u-boot-rpi2 -NANO_CPUTYPE=cortex-a7 . common # Pull in common definitions, keep last From owner-svn-src-all@freebsd.org Sat Feb 4 05:52:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC45CCD0E7E; Sat, 4 Feb 2017 05:52:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EDE010B9; Sat, 4 Feb 2017 05:52:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v145qrT9002712; Sat, 4 Feb 2017 05:52:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v145qrAH002710; Sat, 4 Feb 2017 05:52:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702040552.v145qrAH002710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 4 Feb 2017 05:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313190 - head/sbin/nvmecontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 05:52:54 -0000 Author: imp Date: Sat Feb 4 05:52:53 2017 New Revision: 313190 URL: https://svnweb.freebsd.org/changeset/base/313190 Log: Move the usage and command name lookup into functions. Modified: head/sbin/nvmecontrol/nvmecontrol.c head/sbin/nvmecontrol/nvmecontrol.h Modified: head/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.c Sat Feb 4 05:52:51 2017 (r313189) +++ head/sbin/nvmecontrol/nvmecontrol.c Sat Feb 4 05:52:53 2017 (r313190) @@ -45,13 +45,8 @@ __FBSDID("$FreeBSD$"); #include "nvmecontrol.h" -typedef void (*nvme_fn_t)(int argc, char *argv[]); -static struct nvme_function { - const char *name; - nvme_fn_t fn; - const char *usage; -} funcs[] = { +static struct nvme_function funcs[] = { {"devlist", devlist, DEVLIST_USAGE}, {"identify", identify, IDENTIFY_USAGE}, {"perftest", perftest, PERFTEST_USAGE}, @@ -62,12 +57,10 @@ static struct nvme_function { {NULL, NULL, NULL}, }; -static void -usage(void) +void +gen_usage(struct nvme_function *f) { - struct nvme_function *f; - f = funcs; fprintf(stderr, "usage:\n"); while (f->name != NULL) { fprintf(stderr, "%s", f->usage); @@ -76,6 +69,21 @@ usage(void) exit(1); } +void +dispatch(int argc, char *argv[], struct nvme_function *tbl) +{ + struct nvme_function *f = tbl; + + while (f->name != NULL) { + if (strcmp(argv[1], f->name) == 0) + f->fn(argc-1, &argv[1]); + f++; + } + + fprintf(stderr, "Unknown command: %s\n", argv[1]); + gen_usage(tbl); +} + static void print_bytes(void *data, uint32_t length) { @@ -217,19 +225,11 @@ parse_ns_str(const char *ns_str, char *c int main(int argc, char *argv[]) { - struct nvme_function *f; if (argc < 2) - usage(); - - f = funcs; - while (f->name != NULL) { - if (strcmp(argv[1], f->name) == 0) - f->fn(argc-1, &argv[1]); - f++; - } + gen_usage(funcs); - usage(); + dispatch(argc, argv, funcs); return (0); } Modified: head/sbin/nvmecontrol/nvmecontrol.h ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.h Sat Feb 4 05:52:51 2017 (r313189) +++ head/sbin/nvmecontrol/nvmecontrol.h Sat Feb 4 05:52:53 2017 (r313190) @@ -31,6 +31,14 @@ #include +typedef void (*nvme_fn_t)(int argc, char *argv[]); + +struct nvme_function { + const char *name; + nvme_fn_t fn; + const char *usage; +}; + #define NVME_CTRLR_PREFIX "nvme" #define NVME_NS_PREFIX "ns" @@ -73,6 +81,8 @@ void read_namespace_data(int fd, int nsi void print_hex(void *data, uint32_t length); void read_logpage(int fd, uint8_t log_page, int nsid, void *payload, uint32_t payload_size); +void gen_usage(struct nvme_function *); +void dispatch(int argc, char *argv[], struct nvme_function *f); #endif From owner-svn-src-all@freebsd.org Sat Feb 4 05:53:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6610CD0ECD; Sat, 4 Feb 2017 05:53:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7340611AC; Sat, 4 Feb 2017 05:53:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v145r1ZU002781; Sat, 4 Feb 2017 05:53:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v145r1wB002775; Sat, 4 Feb 2017 05:53:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702040553.v145r1wB002775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 4 Feb 2017 05:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313191 - head/sbin/nvmecontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 05:53:02 -0000 Author: imp Date: Sat Feb 4 05:53:00 2017 New Revision: 313191 URL: https://svnweb.freebsd.org/changeset/base/313191 Log: Implement 5 wdc-specific nvme control options for their HGST drives: wdc cap-diag Capture diagnostic data from drive wdc drive-log Capture drive history data from drive wdc get-crash-dump Retrieve firmware crash dump from drive Added: head/sbin/nvmecontrol/wdc.c (contents, props changed) Modified: head/sbin/nvmecontrol/Makefile head/sbin/nvmecontrol/nvmecontrol.8 head/sbin/nvmecontrol/nvmecontrol.c head/sbin/nvmecontrol/nvmecontrol.h Modified: head/sbin/nvmecontrol/Makefile ============================================================================== --- head/sbin/nvmecontrol/Makefile Sat Feb 4 05:52:53 2017 (r313190) +++ head/sbin/nvmecontrol/Makefile Sat Feb 4 05:53:00 2017 (r313191) @@ -3,7 +3,7 @@ PACKAGE=runtime PROG= nvmecontrol SRCS= nvmecontrol.c devlist.c firmware.c identify.c logpage.c \ - perftest.c reset.c nvme_util.c power.c + perftest.c reset.c nvme_util.c power.c wdc.c MAN= nvmecontrol.8 .PATH: ${.CURDIR}/../../sys/dev/nvme Modified: head/sbin/nvmecontrol/nvmecontrol.8 ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.8 Sat Feb 4 05:52:53 2017 (r313190) +++ head/sbin/nvmecontrol/nvmecontrol.8 Sat Feb 4 05:53:00 2017 (r313191) @@ -75,6 +75,24 @@ .Op Fl l .Op Fl p power_state .Op fl w workload_hint +.Nm +.Ic wdc cap-diag +.Op Fl o path_template +.Aq device id +.Nm +.Ic wdc drive-log +.Op Fl o path_template +.Aq device id +.Nm +.Ic wdc get-crash-dump +.Op Fl o path_template +.Aq device id +.\" .Nm +.\" .Ic wdc purge +.\" .Aq device id +.\" .Nm +.\" .Ic wdc purge-monitor +.\" .Aq device id .Sh DESCRIPTION NVM Express (NVMe) is a storage protocol standard, for SSDs and other high-speed storage devices over PCI Express. Modified: head/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.c Sat Feb 4 05:52:53 2017 (r313190) +++ head/sbin/nvmecontrol/nvmecontrol.c Sat Feb 4 05:53:00 2017 (r313191) @@ -54,6 +54,7 @@ static struct nvme_function funcs[] = { {"logpage", logpage, LOGPAGE_USAGE}, {"firmware", firmware, FIRMWARE_USAGE}, {"power", power, POWER_USAGE}, + {"wdc", wdc, WDC_USAGE}, {NULL, NULL, NULL}, }; Modified: head/sbin/nvmecontrol/nvmecontrol.h ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.h Sat Feb 4 05:52:53 2017 (r313190) +++ head/sbin/nvmecontrol/nvmecontrol.h Sat Feb 4 05:53:00 2017 (r313191) @@ -66,6 +66,9 @@ struct nvme_function { #define POWER_USAGE \ " nvmecontrol power [-l] [-p new-state [-w workload-hint]] \n" +#define WDC_USAGE \ +" nvmecontrol wdc (cap-diag|drive-log|get-crash-dump|purge|purge-montior)\n" + void devlist(int argc, char *argv[]); void identify(int argc, char *argv[]); void perftest(int argc, char *argv[]); @@ -73,6 +76,7 @@ void reset(int argc, char *argv[]); void logpage(int argc, char *argv[]); void firmware(int argc, char *argv[]); void power(int argc, char *argv[]); +void wdc(int argc, char *argv[]); int open_dev(const char *str, int *fd, int show_error, int exit_on_error); void parse_ns_str(const char *ns_str, char *ctrlr_str, int *nsid); Added: head/sbin/nvmecontrol/wdc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/nvmecontrol/wdc.c Sat Feb 4 05:53:00 2017 (r313191) @@ -0,0 +1,341 @@ +/*- + * Copyright (c) 2017 Netflix, Inc + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "nvmecontrol.h" + +#define WDC_NVME_TOC_SIZE 8 + +#define WDC_NVME_CAP_DIAG_OPCODE 0xe6 +#define WDC_NVME_CAP_DIAG_CMD 0x0000 + +#define WDC_NVME_DIAG_OPCODE 0xc6 +#define WDC_NVME_DRIVE_LOG_SIZE_CMD 0x0120 +#define WDC_NVME_DRIVE_LOG_CMD 0x0020 +#define WDC_NVME_CRASH_DUMP_SIZE_CMD 0x0320 +#define WDC_NVME_CRASH_DUMP_CMD 0x0420 +#define WDC_NVME_PFAIL_DUMP_SIZE_CMD 0x0520 +#define WDC_NVME_PFAIL_DUMP_CMD 0x0620 + +#define WDC_NVME_CLEAR_DUMP_OPCODE 0xff +#define WDC_NVME_CLEAR_CRASH_DUMP_CMD 0x0503 +#define WDC_NVME_CLEAR_PFAIL_DUMP_CMD 0x0603 + +static void wdc_cap_diag(int argc, char *argv[]); +static void wdc_drive_log(int argc, char *argv[]); +static void wdc_get_crash_dump(int argc, char *argv[]); +static void wdc_purge(int argc, char *argv[]); +static void wdc_purge_monitor(int argc, char *argv[]); + +#define WDC_CAP_DIAG_USAGE "\tnvmecontrol wdc cap-diag [-o path-template]\n" +#define WDC_DRIVE_LOG_USAGE "\tnvmecontrol wdc drive-log [-o path-template]\n" +#define WDC_GET_CRASH_DUMP_USAGE "\tnvmecontrol wdc get-crash-dump [-o path-template]\n" +#define WDC_PURGE_USAGE "\tnvmecontrol wdc purge [-o path-template]\n" +#define WDC_PURGE_MONITOR_USAGE "\tnvmecontrol wdc purge-montor\n" + +static struct nvme_function wdc_funcs[] = { + {"cap-diag", wdc_cap_diag, WDC_CAP_DIAG_USAGE}, + {"drive-log", wdc_drive_log, WDC_DRIVE_LOG_USAGE}, + {"get-crash-dump", wdc_get_crash_dump, WDC_GET_CRASH_DUMP_USAGE}, + {"purge", wdc_purge, WDC_PURGE_USAGE}, + {"purge_monitor", wdc_purge_monitor, WDC_PURGE_MONITOR_USAGE}, + {NULL, NULL, NULL}, +}; + +static void +wdc_append_serial_name(int fd, char *buf, size_t len, const char *suffix) +{ + struct nvme_controller_data cdata; + char sn[NVME_SERIAL_NUMBER_LENGTH + 1]; + char *walker; + + len -= strlen(buf); + buf += strlen(buf); + read_controller_data(fd, &cdata); + memcpy(sn, cdata.sn, NVME_SERIAL_NUMBER_LENGTH); + walker = sn + NVME_SERIAL_NUMBER_LENGTH - 1; + while (walker > sn && *walker == ' ') + walker--; + *walker = '\0'; + snprintf(buf, len, "%s%s.bin", sn, suffix); +} + +static void +wdc_get_data(int fd, uint32_t opcode, uint32_t len, uint32_t off, uint32_t cmd, + uint8_t *buffer, size_t buflen) +{ + struct nvme_pt_command pt; + + memset(&pt, 0, sizeof(pt)); + pt.cmd.opc = opcode; + pt.cmd.cdw10 = len / sizeof(uint32_t); /* - 1 like all the others ??? */ + pt.cmd.cdw11 = off / sizeof(uint32_t); + pt.cmd.cdw12 = cmd; + pt.buf = buffer; + pt.len = buflen; + pt.is_read = 1; +// printf("opcode %#x cdw10(len) %#x cdw11(offset?) %#x cdw12(cmd/sub) %#x buflen %zd\n", +// (int)opcode, (int)cdw10, (int)cdw11, (int)cdw12, buflen); + + if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) + err(1, "wdc_get_data request failed"); + if (nvme_completion_is_error(&pt.cpl)) + errx(1, "wdc_get_data request returned error"); +} + +static void +wdc_do_dump(int fd, char *tmpl, const char *suffix, uint32_t opcode, + uint32_t size_cmd, uint32_t cmd, int len_off) +{ + int fd2; + uint8_t *buf; + uint32_t len, resid, offset; + + wdc_append_serial_name(fd, tmpl, MAXPATHLEN, suffix); + + buf = aligned_alloc(PAGE_SIZE, WDC_NVME_TOC_SIZE); + if (buf == NULL) + errx(1, "Can't get buffer to get size"); + wdc_get_data(fd, opcode, WDC_NVME_TOC_SIZE, + 0, size_cmd, buf, WDC_NVME_TOC_SIZE); + len = be32dec(buf + len_off); + + if (len == 0) + errx(1, "No data for %s", suffix); + + printf("Dumping %d bytes to %s\n", len, tmpl); + /* XXX overwrite protection? */ + fd2 = open(tmpl, O_WRONLY | O_CREAT | O_TRUNC); + if (fd2 < 0) + err(1, "open %s", tmpl); + offset = 0; + buf = aligned_alloc(PAGE_SIZE, NVME_MAX_XFER_SIZE); + if (buf == NULL) + errx(1, "Can't get buffer to read dump"); + while (len > 0) { + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); + if (write(fd2, buf, resid) != resid) + err(1, "write"); + offset += resid; + len -= resid; + } + free(buf); + close(fd2); +} + +static void +wdc_do_clear_dump(int fd, uint32_t opcode, uint32_t cmd) +{ + struct nvme_pt_command pt; + + memset(&pt, 0, sizeof(pt)); + pt.cmd.opc = opcode; + pt.cmd.cdw12 = cmd; + if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) + err(1, "wdc_do_clear_dump request failed"); + if (nvme_completion_is_error(&pt.cpl)) + errx(1, "wdc_do_clear_dump request returned error"); +} + +static void +wdc_cap_diag_usage() +{ + fprintf(stderr, "usage:\n"); + fprintf(stderr, WDC_CAP_DIAG_USAGE); + exit(1); +} + +static void +wdc_cap_diag(int argc, char *argv[]) +{ + char path_tmpl[MAXPATHLEN]; + int ch, fd; + + path_tmpl[0] = '\0'; + while ((ch = getopt(argc, argv, "o:")) != -1) { + switch ((char)ch) { + case 'o': + strlcpy(path_tmpl, optarg, MAXPATHLEN); + break; + default: + wdc_cap_diag_usage(); + } + } + /* Check that a controller was specified. */ + if (optind >= argc) + wdc_cap_diag_usage(); + open_dev(argv[optind], &fd, 1, 1); + + wdc_do_dump(fd, path_tmpl, "cap_diag", WDC_NVME_CAP_DIAG_OPCODE, + WDC_NVME_CAP_DIAG_CMD, WDC_NVME_CAP_DIAG_CMD, 4); + + close(fd); + + exit(1); +} + +static void +wdc_drive_log_usage() +{ + fprintf(stderr, "usage:\n"); + fprintf(stderr, WDC_DRIVE_LOG_USAGE); + exit(1); +} + +static void +wdc_drive_log(int argc, char *argv[]) +{ + char path_tmpl[MAXPATHLEN]; + int ch, fd; + + path_tmpl[0] = '\0'; + while ((ch = getopt(argc, argv, "o:")) != -1) { + switch ((char)ch) { + case 'o': + strlcpy(path_tmpl, optarg, MAXPATHLEN); + break; + default: + wdc_drive_log_usage(); + } + } + /* Check that a controller was specified. */ + if (optind >= argc) + wdc_drive_log_usage(); + open_dev(argv[optind], &fd, 1, 1); + + wdc_do_dump(fd, path_tmpl, "drive_log", WDC_NVME_DIAG_OPCODE, + WDC_NVME_DRIVE_LOG_SIZE_CMD, WDC_NVME_DRIVE_LOG_CMD, 0); + + close(fd); + + exit(1); +} + +static void +wdc_get_crash_dump_usage() +{ + fprintf(stderr, "usage:\n"); + fprintf(stderr, WDC_CAP_DIAG_USAGE); + exit(1); +} + +static void +wdc_get_crash_dump(int argc, char *argv[]) +{ + char path_tmpl[MAXPATHLEN]; + int ch, fd; + + while ((ch = getopt(argc, argv, "o:")) != -1) { + switch ((char)ch) { + case 'o': + strlcpy(path_tmpl, optarg, MAXPATHLEN); + break; + default: + wdc_get_crash_dump_usage(); + } + } + /* Check that a controller was specified. */ + if (optind >= argc) + wdc_get_crash_dump_usage(); + open_dev(argv[optind], &fd, 1, 1); + + wdc_do_dump(fd, path_tmpl, "crash_dump", WDC_NVME_DIAG_OPCODE, + WDC_NVME_CRASH_DUMP_SIZE_CMD, WDC_NVME_CRASH_DUMP_CMD, 0); + wdc_do_clear_dump(fd, WDC_NVME_CLEAR_DUMP_OPCODE, + WDC_NVME_CLEAR_CRASH_DUMP_CMD); +// wdc_led_beacon_disable(fd); + wdc_do_dump(fd, path_tmpl, "pfail_dump", WDC_NVME_DIAG_OPCODE, + WDC_NVME_PFAIL_DUMP_SIZE_CMD, WDC_NVME_PFAIL_DUMP_CMD, 0); + wdc_do_clear_dump(fd, WDC_NVME_CLEAR_DUMP_OPCODE, + WDC_NVME_CLEAR_PFAIL_DUMP_CMD); + + close(fd); + + exit(1); +} + +static void +wdc_purge(int argc, char *argv[]) +{ + char path_tmpl[MAXPATHLEN]; + int ch; + + while ((ch = getopt(argc, argv, "o:")) != -1) { + switch ((char)ch) { + case 'o': + strlcpy(path_tmpl, optarg, MAXPATHLEN); + break; + default: + wdc_cap_diag_usage(); + } + } + + printf("purge has not been implemented.\n"); + exit(1); +} + +static void +wdc_purge_monitor(int argc, char *argv[]) +{ + char path_tmpl[MAXPATHLEN]; + int ch; + + while ((ch = getopt(argc, argv, "o:")) != -1) { + switch ((char)ch) { + case 'o': + strlcpy(path_tmpl, optarg, MAXPATHLEN); + break; + default: + wdc_cap_diag_usage(); + } + } + + printf("purge has not been implemented.\n"); + exit(1); +} + +void +wdc(int argc, char *argv[]) +{ + + dispatch(argc, argv, wdc_funcs); +} From owner-svn-src-all@freebsd.org Sat Feb 4 05:54:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6ABBCD0FAC; Sat, 4 Feb 2017 05:54:17 +0000 (UTC) (envelope-from lidl@pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C2C511654; Sat, 4 Feb 2017 05:54:17 +0000 (UTC) (envelope-from lidl@pix.net) Received: from torb.pix.net (torb.pix.net [IPv6:2001:470:e254:10:1042:6a31:1deb:9f8a]) (authenticated bits=0) by hydra.pix.net (8.16.0.19/8.15.2) with ESMTPA id v145sF9k051864; Sat, 4 Feb 2017 00:54:16 -0500 (EST) (envelope-from lidl@pix.net) Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Jason Harmening , Alexander Kabaev References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> Cc: "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste From: Kurt Lidl Message-ID: <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> Date: Sat, 4 Feb 2017 00:54:15 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 05:54:18 -0000 Having just spent a couple of hours bisecting what broke the kernel on my mips64 machine, I can definitively state it was this commit. With this commit in place, the kernel hangs early in the autoconfiguration: gcc version 4.2.1 20070831 patched [FreeBSD] Preloaded elf kernel "kernel" at 0xffffffff80aa96a0. real memory = 523239424 (510976K bytes) Physical memory chunk(s): 0x00bf3000 - 0x080d5fff, 122564608 bytes (29923 pages) 0x08101000 - 0x0ff00fff, 132120576 bytes (32256 pages) 0x410000000 - 0x41f196fff, 253325312 bytes (61847 pages) avail memory = 504360960 (480MB) Create COP2 context zone AP #1 started! FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs ---- hangs here ---- -Kurt On 2/4/17 12:29 AM, Jason Harmening wrote: > Hi, > > I'm a bit confused as to how this change breaks MIPS. The new function, > get_pcpu() is intended to be used only to access the per-cpu data > pointer locally. It returns pcpup, which is the per-cpu pointer wired > into the local TLB to translate to the local CPU's physical data region, > correct? > > This is the same value used by the per-CPU accessors such as PCPU_ADD > and PCPU_GET. The MI portions of this change only use get_pcpu() to > access the local CPU's data, e.g. under a critical section in the > rmlock. It is not intended to be used for iterating all CPUs. > > If I've missed something and MIPS is truly broken by this, then I'll > gladly revert, but (maybe because it's late) I'm not seeing where this > goes wrong on MIPS. > > Thanks, > Jason > > On Fri, Feb 3, 2017 at 8:12 PM, Alexander Kabaev > wrote: > > On Wed, 1 Feb 2017 03:32:49 +0000 (UTC) > "Jason A. Harmening" wrote: > > > Author: jah > > Date: Wed Feb 1 03:32:49 2017 > > New Revision: 313037 > > URL: https://svnweb.freebsd.org/changeset/base/313037 > > > > > Log: > > Implement get_pcpu() for the remaining architectures and use it to > > replace pcpu_find(curcpu) in MI code. > > > > Modified: > > head/sys/amd64/include/pcpu.h > > head/sys/kern/kern_rmlock.c > > head/sys/mips/include/pcpu.h > > head/sys/net/netisr.c > > head/sys/powerpc/include/cpufunc.h > > head/sys/powerpc/include/pcpu.h > > head/sys/sparc64/include/pcpu.h > > > > Hi, > > this change was not reviewed nor testing was thought for all > architectures it touches. The change happens to break MIPS quite > thoroughly, since MIPS is using different pointers when accessing PCPU > area locally and when doing iterations using cpu_to_cpuid array. I > therefore officially am requesting this change to be reverted until > reasonable solution is found to unbreak architectures that use wired > TLBs to access local per-CPU data. > > -- > Alexander Kabaev > > From owner-svn-src-all@freebsd.org Sat Feb 4 06:12:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE669CD046B; Sat, 4 Feb 2017 06:12:49 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9655C67; Sat, 4 Feb 2017 06:12:49 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v146Cm2E010779; Sat, 4 Feb 2017 06:12:48 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v146CmwT010775; Sat, 4 Feb 2017 06:12:48 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201702040612.v146CmwT010775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 4 Feb 2017 06:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313192 - in head/sbin: hastctl hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 06:12:49 -0000 Author: allanjude Date: Sat Feb 4 06:12:48 2017 New Revision: 313192 URL: https://svnweb.freebsd.org/changeset/base/313192 Log: Switch hastctl and hastd to libmd instead of openssl for sha256 Reviewed by: bapt, brnrd, pjd Approved by: pjd (maintainer) Sponsored by: ScaleEngine Inc., FOSDEM DevSummit Differential Revision: https://reviews.freebsd.org/D9423 Modified: head/sbin/hastctl/Makefile head/sbin/hastd/Makefile head/sbin/hastd/hast_checksum.c head/sbin/hastd/hast_proto.c Modified: head/sbin/hastctl/Makefile ============================================================================== --- head/sbin/hastctl/Makefile Sat Feb 4 05:53:00 2017 (r313191) +++ head/sbin/hastctl/Makefile Sat Feb 4 06:12:48 2017 (r313192) @@ -33,11 +33,7 @@ CFLAGS+=-DINET6 CFLAGS+=-DYY_NO_UNPUT CFLAGS+=-DYY_NO_INPUT -LIBADD= util -.if ${MK_OPENSSL} != "no" -LIBADD+= crypto -CFLAGS+=-DHAVE_CRYPTO -.endif +LIBADD= md util YFLAGS+=-v Modified: head/sbin/hastd/Makefile ============================================================================== --- head/sbin/hastd/Makefile Sat Feb 4 05:53:00 2017 (r313191) +++ head/sbin/hastd/Makefile Sat Feb 4 06:12:48 2017 (r313192) @@ -31,11 +31,7 @@ CFLAGS+=-DINET CFLAGS+=-DINET6 .endif -LIBADD= geom pthread util -.if ${MK_OPENSSL} != "no" -LIBADD+= crypto -CFLAGS+=-DHAVE_CRYPTO -.endif +LIBADD= geom md pthread util YFLAGS+=-v Modified: head/sbin/hastd/hast_checksum.c ============================================================================== --- head/sbin/hastd/hast_checksum.c Sat Feb 4 05:53:00 2017 (r313191) +++ head/sbin/hastd/hast_checksum.c Sat Feb 4 06:12:48 2017 (r313192) @@ -31,22 +31,15 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef HAVE_CRYPTO -#include -#endif - #include #include #include +#include #include #include "hast_checksum.h" -#ifdef HAVE_CRYPTO #define MAX_HASH_SIZE SHA256_DIGEST_LENGTH -#else -#define MAX_HASH_SIZE 4 -#endif static void hast_crc32_checksum(const unsigned char *data, size_t size, @@ -60,7 +53,6 @@ hast_crc32_checksum(const unsigned char *hsizep = sizeof(crc); } -#ifdef HAVE_CRYPTO static void hast_sha256_checksum(const unsigned char *data, size_t size, unsigned char *hash, size_t *hsizep) @@ -72,7 +64,6 @@ hast_sha256_checksum(const unsigned char SHA256_Final(hash, &ctx); *hsizep = SHA256_DIGEST_LENGTH; } -#endif /* HAVE_CRYPTO */ const char * checksum_name(int num) @@ -102,11 +93,9 @@ checksum_send(const struct hast_resource case HAST_CHECKSUM_CRC32: hast_crc32_checksum(*datap, *sizep, hash, &hsize); break; -#ifdef HAVE_CRYPTO case HAST_CHECKSUM_SHA256: hast_sha256_checksum(*datap, *sizep, hash, &hsize); break; -#endif default: PJDLOG_ABORT("Invalid checksum: %d.", res->hr_checksum); } @@ -138,10 +127,8 @@ checksum_recv(const struct hast_resource } if (strcmp(algo, "crc32") == 0) hast_crc32_checksum(*datap, *sizep, chash, &chsize); -#ifdef HAVE_CRYPTO else if (strcmp(algo, "sha256") == 0) hast_sha256_checksum(*datap, *sizep, chash, &chsize); -#endif else { pjdlog_error("Unknown checksum algorithm '%s'.", algo); return (-1); /* Unknown checksum algorithm. */ Modified: head/sbin/hastd/hast_proto.c ============================================================================== --- head/sbin/hastd/hast_proto.c Sat Feb 4 05:53:00 2017 (r313191) +++ head/sbin/hastd/hast_proto.c Sat Feb 4 06:12:48 2017 (r313192) @@ -42,9 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef HAVE_CRYPTO #include "hast_checksum.h" -#endif #include "hast_compression.h" #include "hast_proto.h" @@ -68,9 +66,7 @@ struct hast_pipe_stage { static struct hast_pipe_stage pipeline[] = { { "compression", compression_send, compression_recv }, -#ifdef HAVE_CRYPTO { "checksum", checksum_send, checksum_recv } -#endif }; /* From owner-svn-src-all@freebsd.org Sat Feb 4 06:24:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D500ECD06E0; Sat, 4 Feb 2017 06:24:51 +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 AD07B7BA; Sat, 4 Feb 2017 06:24:51 +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 v146OoAY015122; Sat, 4 Feb 2017 06:24:50 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v146Oo5s015115; Sat, 4 Feb 2017 06:24:50 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201702040624.v146Oo5s015115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sat, 4 Feb 2017 06:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313193 - in head/sys: amd64/include kern mips/include net powerpc/include 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 06:24:51 -0000 Author: jah Date: Sat Feb 4 06:24:49 2017 New Revision: 313193 URL: https://svnweb.freebsd.org/changeset/base/313193 Log: Revert r313037 The switch to get_pcpu() in MI code seems to cause hangs on MIPS. Back out until we can get a better idea of what's happening there. Reported by: kan, lidl Modified: head/sys/amd64/include/pcpu.h head/sys/kern/kern_rmlock.c head/sys/mips/include/pcpu.h head/sys/net/netisr.c head/sys/powerpc/include/cpufunc.h head/sys/powerpc/include/pcpu.h head/sys/sparc64/include/pcpu.h Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Sat Feb 4 06:12:48 2017 (r313192) +++ head/sys/amd64/include/pcpu.h Sat Feb 4 06:24:49 2017 (r313193) @@ -78,7 +78,6 @@ extern struct pcpu *pcpup; -#define get_pcpu() (pcpup) #define PCPU_GET(member) (pcpup->pc_ ## member) #define PCPU_ADD(member, val) (pcpup->pc_ ## member += (val)) #define PCPU_INC(member) PCPU_ADD(member, 1) @@ -204,15 +203,6 @@ extern struct pcpu *pcpup; } \ } -#define get_pcpu() __extension__ ({ \ - struct pcpu *__pc; \ - \ - __asm __volatile("movq %%gs:%1,%0" \ - : "=r" (__pc) \ - : "m" (*(struct pcpu *)(__pcpu_offset(pc_prvspace)))); \ - __pc; \ -}) - #define PCPU_GET(member) __PCPU_GET(pc_ ## member) #define PCPU_ADD(member, val) __PCPU_ADD(pc_ ## member, val) #define PCPU_INC(member) __PCPU_INC(pc_ ## member) Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Sat Feb 4 06:12:48 2017 (r313192) +++ head/sys/kern/kern_rmlock.c Sat Feb 4 06:24:49 2017 (r313193) @@ -156,7 +156,7 @@ unlock_rm(struct lock_object *lock) */ critical_enter(); td = curthread; - pc = get_pcpu(); + pc = pcpu_find(curcpu); for (queue = pc->pc_rm_queue.rmq_next; queue != &pc->pc_rm_queue; queue = queue->rmq_next) { tracker = (struct rm_priotracker *)queue; @@ -258,7 +258,7 @@ rm_cleanIPI(void *arg) struct rmlock *rm = arg; struct rm_priotracker *tracker; struct rm_queue *queue; - pc = get_pcpu(); + pc = pcpu_find(curcpu); for (queue = pc->pc_rm_queue.rmq_next; queue != &pc->pc_rm_queue; queue = queue->rmq_next) { @@ -355,7 +355,7 @@ _rm_rlock_hard(struct rmlock *rm, struct struct pcpu *pc; critical_enter(); - pc = get_pcpu(); + pc = pcpu_find(curcpu); /* Check if we just need to do a proper critical_exit. */ if (!CPU_ISSET(pc->pc_cpuid, &rm->rm_writecpus)) { @@ -416,7 +416,7 @@ _rm_rlock_hard(struct rmlock *rm, struct } critical_enter(); - pc = get_pcpu(); + pc = pcpu_find(curcpu); CPU_CLR(pc->pc_cpuid, &rm->rm_writecpus); rm_tracker_add(pc, tracker); sched_pin(); @@ -641,7 +641,7 @@ _rm_rlock_debug(struct rmlock *rm, struc #ifdef INVARIANTS if (!(rm->lock_object.lo_flags & LO_RECURSABLE) && !trylock) { critical_enter(); - KASSERT(rm_trackers_present(get_pcpu(), rm, + KASSERT(rm_trackers_present(pcpu_find(curcpu), rm, curthread) == 0, ("rm_rlock: recursed on non-recursive rmlock %s @ %s:%d\n", rm->lock_object.lo_name, file, line)); @@ -771,7 +771,7 @@ _rm_assert(const struct rmlock *rm, int } critical_enter(); - count = rm_trackers_present(get_pcpu(), rm, curthread); + count = rm_trackers_present(pcpu_find(curcpu), rm, curthread); critical_exit(); if (count == 0) @@ -797,7 +797,7 @@ _rm_assert(const struct rmlock *rm, int rm->lock_object.lo_name, file, line); critical_enter(); - count = rm_trackers_present(get_pcpu(), rm, curthread); + count = rm_trackers_present(pcpu_find(curcpu), rm, curthread); critical_exit(); if (count != 0) Modified: head/sys/mips/include/pcpu.h ============================================================================== --- head/sys/mips/include/pcpu.h Sat Feb 4 06:12:48 2017 (r313192) +++ head/sys/mips/include/pcpu.h Sat Feb 4 06:24:49 2017 (r313193) @@ -65,7 +65,6 @@ extern char pcpu_space[MAXCPU][PAGE_SIZE extern struct pcpu *pcpup; #define PCPUP pcpup -#define get_pcpu() (pcpup) #define PCPU_ADD(member, value) (PCPUP->pc_ ## member += (value)) #define PCPU_GET(member) (PCPUP->pc_ ## member) #define PCPU_INC(member) PCPU_ADD(member, 1) Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Sat Feb 4 06:12:48 2017 (r313192) +++ head/sys/net/netisr.c Sat Feb 4 06:24:49 2017 (r313193) @@ -1268,7 +1268,9 @@ netisr_start_swi(u_int cpuid, struct pcp static void netisr_init(void *arg) { +#ifdef EARLY_AP_STARTUP struct pcpu *pc; +#endif NETISR_LOCK_INIT(); if (netisr_maxthreads == 0 || netisr_maxthreads < -1 ) @@ -1306,8 +1308,7 @@ netisr_init(void *arg) netisr_start_swi(pc->pc_cpuid, pc); } #else - pc = get_pcpu(); - netisr_start_swi(pc->pc_cpuid, pc); + netisr_start_swi(curcpu, pcpu_find(curcpu)); #endif } SYSINIT(netisr_init, SI_SUB_SOFTINTR, SI_ORDER_FIRST, netisr_init, NULL); Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Sat Feb 4 06:12:48 2017 (r313192) +++ head/sys/powerpc/include/cpufunc.h Sat Feb 4 06:24:49 2017 (r313193) @@ -201,7 +201,7 @@ intr_restore(register_t msr) } static __inline struct pcpu * -get_pcpu(void) +powerpc_get_pcpup(void) { struct pcpu *ret; Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Sat Feb 4 06:12:48 2017 (r313192) +++ head/sys/powerpc/include/pcpu.h Sat Feb 4 06:24:49 2017 (r313193) @@ -142,7 +142,7 @@ struct pvo_entry; #ifdef _KERNEL -#define pcpup (get_pcpu()) +#define pcpup ((struct pcpu *) powerpc_get_pcpup()) static __inline __pure2 struct thread * __curthread(void) Modified: head/sys/sparc64/include/pcpu.h ============================================================================== --- head/sys/sparc64/include/pcpu.h Sat Feb 4 06:12:48 2017 (r313192) +++ head/sys/sparc64/include/pcpu.h Sat Feb 4 06:24:49 2017 (r313193) @@ -74,7 +74,6 @@ struct pcpu; register struct pcb *curpcb __asm__(__XSTRING(PCB_REG)); register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG)); -#define get_pcpu() (pcpup) #define PCPU_GET(member) (pcpup->pc_ ## member) static __inline __pure2 struct thread * From owner-svn-src-all@freebsd.org Sat Feb 4 06:27:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69228CD075F; Sat, 4 Feb 2017 06:27:32 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-ot0-x241.google.com (mail-ot0-x241.google.com [IPv6:2607:f8b0:4003:c0f::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 2B964934; Sat, 4 Feb 2017 06:27:32 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-ot0-x241.google.com with SMTP id 65so4643214otq.2; Fri, 03 Feb 2017 22:27: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=V6Y8LXo1sFhYnQ++2JlnTTuJbbpmt7WD9BhqEOVvjhA=; b=kvv4kckN9Vdpzi1EIsuM4UO8oLaL/Rn0YzTi6H5aJqrdO3UqOUmh/076BzBolY3xSL 2YuqxDKMUnuWEO3avyAI6K6SRRhdBDStzLo1ZeRhw1d3K7SETTK6gy4QqQDGUTmoaIQC 0i6eOBJ5RoYAm3+399KNwSPsg7tlcFXAv0QpS5PVZODM9o2gvTOY0mVA787MTjKaDqU+ Br+fJ7MCFNk5DNCx5OCJqNVD5nAaV+Z4EASoEx9wWgmlLPenyhsoU1YXFy0Udgr1Uz0B shUfY07juUx+FWtWk1mbwyKbDwWRUhZDISRFSGWQVrGUmi52V+dqz5DI9V6vgXvfejiz sweQ== 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=V6Y8LXo1sFhYnQ++2JlnTTuJbbpmt7WD9BhqEOVvjhA=; b=P6d/ZGYBUbfqIvgZKYd5Is4p/h3Ae5/+RrwI0etWAekY9wx0JaKPQ2JlCMCfdAn2mK s5M5j8vw42bmbPFeISYnTe4X88vlEFEO9r59V8MhdOlYKcFWov+sOcsDOPvi351jbiNB oTIHlRYBnN1deRK9ldJenekyaTuRqAXbeZXRIUFsQ+zzfea0kqCBycawoA/gG+TlfUMA MYM6JtLP/2j/r9KTKitEJ3QUrti7brdwGySpQ3cDWda+I8cXLHV+ggQgFVUX4fGH5VxR /KmLIHwiRS9N2GhurSwPCeeB/hHaNNVzJTk2DzYtfUfQyA1mLtE4IsJCpsnzV2ptHbsn zsRg== X-Gm-Message-State: AMke39kuum+IIsExMLv1SgK82LRUXzgDSNtsAGATuB9hA1B0zjcswsBSsV+zK9cxWG95ruxp7ebjU/TktK29jQ== X-Received: by 10.157.41.173 with SMTP id n42mr312752otb.158.1486189651370; Fri, 03 Feb 2017 22:27:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.51.7 with HTTP; Fri, 3 Feb 2017 22:27:30 -0800 (PST) In-Reply-To: <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> From: Jason Harmening Date: Fri, 3 Feb 2017 22:27:30 -0800 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Kurt Lidl Cc: Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 06:27:32 -0000 It's hard to argue with that:) I've backed it out until we can figure out what's going on. Sorry for the breakage. On Fri, Feb 3, 2017 at 9:54 PM, Kurt Lidl wrote: > Having just spent a couple of hours bisecting what broke the kernel on > my mips64 machine, I can definitively state it was this commit. > > With this commit in place, the kernel hangs early in the > autoconfiguration: > > gcc version 4.2.1 20070831 patched [FreeBSD] > Preloaded elf kernel "kernel" at 0xffffffff80aa96a0. > real memory = 523239424 (510976K bytes) > Physical memory chunk(s): > 0x00bf3000 - 0x080d5fff, 122564608 bytes (29923 pages) > 0x08101000 - 0x0ff00fff, 132120576 bytes (32256 pages) > 0x410000000 - 0x41f196fff, 253325312 bytes (61847 pages) > avail memory = 504360960 (480MB) > Create COP2 context zone > AP #1 started! > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs > ---- hangs here ---- > > -Kurt > > On 2/4/17 12:29 AM, Jason Harmening wrote: > >> Hi, >> >> I'm a bit confused as to how this change breaks MIPS. The new function, >> get_pcpu() is intended to be used only to access the per-cpu data >> pointer locally. It returns pcpup, which is the per-cpu pointer wired >> into the local TLB to translate to the local CPU's physical data region, >> correct? >> >> This is the same value used by the per-CPU accessors such as PCPU_ADD >> and PCPU_GET. The MI portions of this change only use get_pcpu() to >> access the local CPU's data, e.g. under a critical section in the >> rmlock. It is not intended to be used for iterating all CPUs. >> >> If I've missed something and MIPS is truly broken by this, then I'll >> gladly revert, but (maybe because it's late) I'm not seeing where this >> goes wrong on MIPS. >> >> Thanks, >> Jason >> >> On Fri, Feb 3, 2017 at 8:12 PM, Alexander Kabaev > > wrote: >> >> On Wed, 1 Feb 2017 03:32:49 +0000 (UTC) >> "Jason A. Harmening" wrote: >> >> > Author: jah >> > Date: Wed Feb 1 03:32:49 2017 >> > New Revision: 313037 >> > URL: https://svnweb.freebsd.org/changeset/base/313037 >> >> > >> > Log: >> > Implement get_pcpu() for the remaining architectures and use it to >> > replace pcpu_find(curcpu) in MI code. >> > >> > Modified: >> > head/sys/amd64/include/pcpu.h >> > head/sys/kern/kern_rmlock.c >> > head/sys/mips/include/pcpu.h >> > head/sys/net/netisr.c >> > head/sys/powerpc/include/cpufunc.h >> > head/sys/powerpc/include/pcpu.h >> > head/sys/sparc64/include/pcpu.h >> > >> >> Hi, >> >> this change was not reviewed nor testing was thought for all >> architectures it touches. The change happens to break MIPS quite >> thoroughly, since MIPS is using different pointers when accessing PCPU >> area locally and when doing iterations using cpu_to_cpuid array. I >> therefore officially am requesting this change to be reverted until >> reasonable solution is found to unbreak architectures that use wired >> TLBs to access local per-CPU data. >> >> -- >> Alexander Kabaev >> >> >> > From owner-svn-src-all@freebsd.org Sat Feb 4 09:25:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDAA9CCEC54; Sat, 4 Feb 2017 09:25:34 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E2EC1FE0; Sat, 4 Feb 2017 09:25:34 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 28FB2C8393; Sat, 4 Feb 2017 10:25:30 +0100 (CET) Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Jason Harmening , Kurt Lidl References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> Cc: Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste From: Andreas Tobler Message-ID: <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> Date: Sat, 4 Feb 2017 10:25:29 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: Obelix Submit on 127.0.1.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 09:25:34 -0000 On 04.02.17 07:27, Jason Harmening wrote: > It's hard to argue with that:) I've backed it out until we can figure > out what's going on. > Sorry for the breakage. For the record, powerpc64 was also affected. Andreas > > On Fri, Feb 3, 2017 at 9:54 PM, Kurt Lidl > wrote: > > Having just spent a couple of hours bisecting what broke the kernel on > my mips64 machine, I can definitively state it was this commit. > > With this commit in place, the kernel hangs early in the > autoconfiguration: > > gcc version 4.2.1 20070831 patched [FreeBSD] > Preloaded elf kernel "kernel" at 0xffffffff80aa96a0. > real memory = 523239424 (510976K bytes) > Physical memory chunk(s): > 0x00bf3000 - 0x080d5fff, 122564608 bytes (29923 pages) > 0x08101000 - 0x0ff00fff, 132120576 bytes (32256 pages) > 0x410000000 - 0x41f196fff, 253325312 bytes (61847 pages) > avail memory = 504360960 (480MB) > Create COP2 context zone > AP #1 started! > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs > ---- hangs here ---- > > -Kurt > > On 2/4/17 12:29 AM, Jason Harmening wrote: > > Hi, > > I'm a bit confused as to how this change breaks MIPS. The new > function, > get_pcpu() is intended to be used only to access the per-cpu data > pointer locally. It returns pcpup, which is the per-cpu pointer > wired > into the local TLB to translate to the local CPU's physical data > region, > correct? > > This is the same value used by the per-CPU accessors such as > PCPU_ADD > and PCPU_GET. The MI portions of this change only use get_pcpu() to > access the local CPU's data, e.g. under a critical section in the > rmlock. It is not intended to be used for iterating all CPUs. > > If I've missed something and MIPS is truly broken by this, then I'll > gladly revert, but (maybe because it's late) I'm not seeing > where this > goes wrong on MIPS. > > Thanks, > Jason > > On Fri, Feb 3, 2017 at 8:12 PM, Alexander Kabaev > > >> wrote: > > On Wed, 1 Feb 2017 03:32:49 +0000 (UTC) > "Jason A. Harmening" wrote: > > > Author: jah > > Date: Wed Feb 1 03:32:49 2017 > > New Revision: 313037 > > URL: https://svnweb.freebsd.org/changeset/base/313037 > > > > > > > Log: > > Implement get_pcpu() for the remaining architectures and > use it to > > replace pcpu_find(curcpu) in MI code. > > > > Modified: > > head/sys/amd64/include/pcpu.h > > head/sys/kern/kern_rmlock.c > > head/sys/mips/include/pcpu.h > > head/sys/net/netisr.c > > head/sys/powerpc/include/cpufunc.h > > head/sys/powerpc/include/pcpu.h > > head/sys/sparc64/include/pcpu.h > > > > Hi, > > this change was not reviewed nor testing was thought for all > architectures it touches. The change happens to break MIPS quite > thoroughly, since MIPS is using different pointers when > accessing PCPU > area locally and when doing iterations using cpu_to_cpuid > array. I > therefore officially am requesting this change to be > reverted until > reasonable solution is found to unbreak architectures that > use wired > TLBs to access local per-CPU data. > > -- > Alexander Kabaev > > > > From owner-svn-src-all@freebsd.org Sat Feb 4 12:26:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AA88CCD73F; Sat, 4 Feb 2017 12:26:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A0561D64; Sat, 4 Feb 2017 12:26:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14CQdLX066152; Sat, 4 Feb 2017 12:26:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14CQcFw066144; Sat, 4 Feb 2017 12:26:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702041226.v14CQcFw066144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Feb 2017 12:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313194 - in head/sys: arm/include arm64/include mips/include powerpc/include riscv/include sparc64/include sys x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 12:26:40 -0000 Author: kib Date: Sat Feb 4 12:26:38 2017 New Revision: 313194 URL: https://svnweb.freebsd.org/changeset/base/313194 Log: Define the vm_ooffset_t and vm_pindex_t types as machine-independend. The types are for the byte offset and page index in vm object. They are similar to off_t, which is defined as 64bit MI integer. Using MI definitions will allow to provide consistent MD values of vm object-related maximum sizes. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/arm/include/_types.h head/sys/arm64/include/_types.h head/sys/mips/include/_types.h head/sys/powerpc/include/_types.h head/sys/riscv/include/_types.h head/sys/sparc64/include/_types.h head/sys/sys/types.h head/sys/x86/include/_types.h Modified: head/sys/arm/include/_types.h ============================================================================== --- head/sys/arm/include/_types.h Sat Feb 4 06:24:49 2017 (r313193) +++ head/sys/arm/include/_types.h Sat Feb 4 12:26:38 2017 (r313194) @@ -100,9 +100,7 @@ typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint32_t __u_register_t; typedef __uint32_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; typedef __uint32_t __vm_paddr_t; -typedef __uint64_t __vm_pindex_t; typedef __uint32_t __vm_size_t; typedef unsigned int ___wchar_t; Modified: head/sys/arm64/include/_types.h ============================================================================== --- head/sys/arm64/include/_types.h Sat Feb 4 06:24:49 2017 (r313193) +++ head/sys/arm64/include/_types.h Sat Feb 4 12:26:38 2017 (r313194) @@ -88,9 +88,7 @@ typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; -typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; typedef unsigned int ___wchar_t; Modified: head/sys/mips/include/_types.h ============================================================================== --- head/sys/mips/include/_types.h Sat Feb 4 06:24:49 2017 (r313193) +++ head/sys/mips/include/_types.h Sat Feb 4 12:26:38 2017 (r313194) @@ -143,8 +143,6 @@ typedef __uint64_t __vm_paddr_t; typedef __uint32_t __vm_paddr_t; #endif -typedef __int64_t __vm_ooffset_t; -typedef __uint64_t __vm_pindex_t; typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ Modified: head/sys/powerpc/include/_types.h ============================================================================== --- head/sys/powerpc/include/_types.h Sat Feb 4 06:24:49 2017 (r313193) +++ head/sys/powerpc/include/_types.h Sat Feb 4 12:26:38 2017 (r313194) @@ -135,8 +135,6 @@ typedef __uint32_t __vm_paddr_t; #endif typedef __uint32_t __vm_size_t; #endif -typedef __int64_t __vm_ooffset_t; -typedef __uint64_t __vm_pindex_t; typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ Modified: head/sys/riscv/include/_types.h ============================================================================== --- head/sys/riscv/include/_types.h Sat Feb 4 06:24:49 2017 (r313193) +++ head/sys/riscv/include/_types.h Sat Feb 4 12:26:38 2017 (r313194) @@ -88,9 +88,7 @@ typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; -typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; typedef int ___wchar_t; Modified: head/sys/sparc64/include/_types.h ============================================================================== --- head/sys/sparc64/include/_types.h Sat Feb 4 06:24:49 2017 (r313193) +++ head/sys/sparc64/include/_types.h Sat Feb 4 12:26:38 2017 (r313194) @@ -88,9 +88,7 @@ typedef __uint32_t __uint_least32_t; typedef __uint64_t __uint_least64_t; typedef __uint64_t __u_register_t; typedef __uint64_t __vm_offset_t; -typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; -typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; typedef int ___wchar_t; Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Sat Feb 4 06:24:49 2017 (r313193) +++ head/sys/sys/types.h Sat Feb 4 12:26:38 2017 (r313194) @@ -250,9 +250,9 @@ typedef struct cap_rights cap_rights_t; #endif typedef __vm_offset_t vm_offset_t; -typedef __vm_ooffset_t vm_ooffset_t; +typedef __int64_t vm_ooffset_t; typedef __vm_paddr_t vm_paddr_t; -typedef __vm_pindex_t vm_pindex_t; +typedef __uint64_t vm_pindex_t; typedef __vm_size_t vm_size_t; typedef __rman_res_t rman_res_t; Modified: head/sys/x86/include/_types.h ============================================================================== --- head/sys/x86/include/_types.h Sat Feb 4 06:24:49 2017 (r313193) +++ head/sys/x86/include/_types.h Sat Feb 4 12:26:38 2017 (r313194) @@ -142,8 +142,6 @@ typedef __uint32_t __vm_paddr_t; #endif typedef __uint32_t __vm_size_t; #endif -typedef __int64_t __vm_ooffset_t; -typedef __uint64_t __vm_pindex_t; typedef int ___wchar_t; #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ From owner-svn-src-all@freebsd.org Sat Feb 4 14:10:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 376A7CCF466; Sat, 4 Feb 2017 14:10:18 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0181EF78; Sat, 4 Feb 2017 14:10:17 +0000 (UTC) (envelope-from def@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14EAHBj007172; Sat, 4 Feb 2017 14:10:17 GMT (envelope-from def@FreeBSD.org) Received: (from def@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14EAGAn007170; Sat, 4 Feb 2017 14:10:16 GMT (envelope-from def@FreeBSD.org) Message-Id: <201702041410.v14EAGAn007170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: def set sender to def@FreeBSD.org using -f From: Konrad Witaszczyk Date: Sat, 4 Feb 2017 14:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313195 - in head/sbin: decryptcore savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 14:10:18 -0000 Author: def Date: Sat Feb 4 14:10:16 2017 New Revision: 313195 URL: https://svnweb.freebsd.org/changeset/base/313195 Log: Fix bugs found by Coverity in decryptcore(8) and savecore(8): - Perform final decryption and write decrypted data in case of non-block aligned input data; - Use strlcpy(3) instead of strncpy(3) to verify if paths aren't too long; - Check errno after calling unlink(2) instead of calling stat(2) in order to verify if a decrypted core was created by a child process; - Free dumpkey. Reported by: Coverity, cem, pfg Suggested by: cem CID: 1366936, 1366942, 1366951, 1366952 Approved by: pjd (mentor) Modified: head/sbin/decryptcore/decryptcore.c head/sbin/savecore/savecore.c Modified: head/sbin/decryptcore/decryptcore.c ============================================================================== --- head/sbin/decryptcore/decryptcore.c Sat Feb 4 12:26:38 2017 (r313194) +++ head/sbin/decryptcore/decryptcore.c Sat Feb 4 14:10:16 2017 (r313195) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -232,8 +231,6 @@ decrypt(const char *privkeyfile, const c pjdlog_errno(LOG_ERR, "Unable to read data from %s", input); goto failed; - } else if (bytes == 0) { - break; } if (bytes > 0) { @@ -249,10 +246,7 @@ decrypt(const char *privkeyfile, const c } } - if (olen == 0) - continue; - - if (write(ofd, buf, olen) != olen) { + if (olen > 0 && write(ofd, buf, olen) != olen) { pjdlog_errno(LOG_ERR, "Unable to write data to %s", output); goto failed; @@ -274,7 +268,6 @@ int main(int argc, char **argv) { char core[PATH_MAX], encryptedcore[PATH_MAX], keyfile[PATH_MAX]; - struct stat sb; const char *crashdir, *dumpnr, *privatekey; int ch, debug; size_t ii; @@ -297,16 +290,23 @@ main(int argc, char **argv) usesyslog = true; break; case 'c': - strncpy(core, optarg, sizeof(core)); + if (strlcpy(core, optarg, sizeof(core)) >= sizeof(core)) + pjdlog_exitx(1, "Core file path is too long."); break; case 'd': crashdir = optarg; break; case 'e': - strncpy(encryptedcore, optarg, sizeof(encryptedcore)); + if (strlcpy(encryptedcore, optarg, + sizeof(encryptedcore)) >= sizeof(encryptedcore)) { + pjdlog_exitx(1, "Encrypted core file path is too long."); + } break; case 'k': - strncpy(keyfile, optarg, sizeof(keyfile)); + if (strlcpy(keyfile, optarg, sizeof(keyfile)) >= + sizeof(keyfile)) { + pjdlog_exitx(1, "Key file path is too long."); + } break; case 'n': dumpnr = optarg; @@ -362,7 +362,7 @@ main(int argc, char **argv) pjdlog_debug_set(debug); if (!decrypt(privatekey, keyfile, encryptedcore, core)) { - if (stat(core, &sb) == 0 && unlink(core) != 0) + if (unlink(core) == -1 && errno != ENOENT) pjdlog_exit(1, "Unable to remove core"); exit(1); } Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Sat Feb 4 12:26:38 2017 (r313194) +++ head/sbin/savecore/savecore.c Sat Feb 4 14:10:16 2017 (r313195) @@ -478,6 +478,7 @@ DoFile(const char *savedir, const char * bool isencrypted, ret; bounds = getbounds(); + dumpkey = NULL; mediasize = 0; status = STATUS_UNKNOWN; @@ -816,6 +817,7 @@ nuke: } xo_close_container_h(xostdout, "crashdump"); xo_finish_h(xostdout); + free(dumpkey); free(temp); close(fd); return; @@ -824,6 +826,7 @@ closeall: fclose(fp); closefd: + free(dumpkey); free(temp); close(fd); } From owner-svn-src-all@freebsd.org Sat Feb 4 15:41:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25543CD0055; Sat, 4 Feb 2017 15:41:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8E381CDB; Sat, 4 Feb 2017 15:41:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FfjOs046252; Sat, 4 Feb 2017 15:41:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Ffj3h046251; Sat, 4 Feb 2017 15:41:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041541.v14Ffj3h046251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313196 - stable/11/sys/modules X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:41:46 -0000 Author: ngie Date: Sat Feb 4 15:41:44 2017 New Revision: 313196 URL: https://svnweb.freebsd.org/changeset/base/313196 Log: MFC r312935: Remove duplicate bhnd SUBDIR entry PR: 216413 Modified: stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Sat Feb 4 14:10:16 2017 (r313195) +++ stable/11/sys/modules/Makefile Sat Feb 4 15:41:44 2017 (r313196) @@ -50,7 +50,6 @@ SUBDIR= \ ${_auxio} \ ${_bce} \ bfe \ - bhnd \ bge \ bhnd \ ${_bxe} \ From owner-svn-src-all@freebsd.org Sat Feb 4 15:42:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 195F9CD00AA; Sat, 4 Feb 2017 15:42:01 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCFBE1EED; Sat, 4 Feb 2017 15:42:00 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Fg0Ql047191; Sat, 4 Feb 2017 15:42:00 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Ffx77047190; Sat, 4 Feb 2017 15:41:59 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041541.v14Ffx77047190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313197 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:42:01 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:41:59 2017 New Revision: 313197 URL: https://svnweb.freebsd.org/changeset/base/313197 Log: Belatedly add FreeBSD 11.0 and 12.0 to the family tree file. Submitted by: des (a while back) Sponsored by: The FreeBSD Foundation Modified: stable/11/share/misc/bsd-family-tree Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:41:44 2017 (r313196) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:41:59 2017 (r313197) @@ -339,7 +339,11 @@ FreeBSD 5.2 | | | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | | | | | | -FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current + *--FreeBSD | | | | + | 11.0 | | | | + | | | | | + | | | | | +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -687,6 +691,8 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +FreeBSD 11.0 2016-06-08 [FBD] +FreeBSD 12.0 2016-06-09 [FBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Sat Feb 4 15:43:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E450CD027F; Sat, 4 Feb 2017 15:43:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29F5E25A; Sat, 4 Feb 2017 15:43:55 +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 v14Fhsde048000; Sat, 4 Feb 2017 15:43:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FhseR047999; Sat, 4 Feb 2017 15:43:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041543.v14FhseR047999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313198 - stable/11/lib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:43:55 -0000 Author: ngie Date: Sat Feb 4 15:43:54 2017 New Revision: 313198 URL: https://svnweb.freebsd.org/changeset/base/313198 Log: MFC r312937: Fix typo in lib/Makefile The SUBDIR_DEPEND variable should be for librpcsec_gss, not liblibrpc_gss PR: 216409 Modified: stable/11/lib/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/Makefile ============================================================================== --- stable/11/lib/Makefile Sat Feb 4 15:41:59 2017 (r313197) +++ stable/11/lib/Makefile Sat Feb 4 15:43:54 2017 (r313198) @@ -142,7 +142,7 @@ SUBDIR_DEPEND_libdevstat= libkvm SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil SUBDIR_DEPEND_libedit= ncurses SUBDIR_DEPEND_libgeom= libexpat libsbuf -SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi +SUBDIR_DEPEND_librpcsec_gss= libgssapi SUBDIR_DEPEND_libmagic= libz SUBDIR_DEPEND_libmemstat= libkvm SUBDIR_DEPEND_libopie= libmd From owner-svn-src-all@freebsd.org Sat Feb 4 15:44:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F97BCD02E7; Sat, 4 Feb 2017 15:44: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 5F2BD3C5; Sat, 4 Feb 2017 15:44: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 v14FinKl048126; Sat, 4 Feb 2017 15:44:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Finuh048125; Sat, 4 Feb 2017 15:44:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041544.v14Finuh048125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313199 - stable/10/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:44:50 -0000 Author: ngie Date: Sat Feb 4 15:44:49 2017 New Revision: 313199 URL: https://svnweb.freebsd.org/changeset/base/313199 Log: MFC r312937: Fix typo in lib/Makefile The SUBDIR_DEPEND variable should be for librpcsec_gss, not liblibrpc_gss PR: 216409 Modified: stable/10/lib/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Sat Feb 4 15:43:54 2017 (r313198) +++ stable/10/lib/Makefile Sat Feb 4 15:44:49 2017 (r313199) @@ -130,7 +130,7 @@ SUBDIR_DEPEND_libdpv= libfigpar ncurses SUBDIR_DEPEND_libedit= ncurses SUBDIR_DEPEND_libg++= msun SUBDIR_DEPEND_libgeom= libexpat libsbuf -SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi +SUBDIR_DEPEND_librpcsec_gss= libgssapi SUBDIR_DEPEND_libmagic= libz SUBDIR_DEPEND_libmemstat= libkvm SUBDIR_DEPEND_libopie= libmd From owner-svn-src-all@freebsd.org Sat Feb 4 15:45:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC7B6CD036E; Sat, 4 Feb 2017 15:45:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BDC3779; Sat, 4 Feb 2017 15:45: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 v14FjdO2048338; Sat, 4 Feb 2017 15:45:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FjdE7048337; Sat, 4 Feb 2017 15:45:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041545.v14FjdE7048337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313200 - stable/11/contrib/bsnmp/lib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:45:40 -0000 Author: ngie Date: Sat Feb 4 15:45:39 2017 New Revision: 313200 URL: https://svnweb.freebsd.org/changeset/base/313200 Log: MFC r311263: Use calloc instead of malloc with buffers in snmp_{recv,send}_packet This doesn't fix the issue noted in the PR, but at the very least it cleans up the error so it looks a bit more sane, and in the event that bsnmp did wander off into the weeds, the likelihood of it crashing with more sensible output is greater, in my opinion MFC counter set high so I have enough time to resolve the real underlying bug in bsnmpwalk PR: 215721 Modified: stable/11/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- stable/11/contrib/bsnmp/lib/snmpclient.c Sat Feb 4 15:44:49 2017 (r313199) +++ stable/11/contrib/bsnmp/lib/snmpclient.c Sat Feb 4 15:45:39 2017 (r313200) @@ -1234,7 +1234,7 @@ snmp_send_packet(struct snmp_pdu * pdu) struct asn_buf b; ssize_t ret; - if ((buf = malloc(snmp_client.txbuflen)) == NULL) { + if ((buf = calloc(1, snmp_client.txbuflen)) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); return (-1); } @@ -1259,7 +1259,7 @@ snmp_send_packet(struct snmp_pdu * pdu) } free(buf); - return pdu->request_id; + return (pdu->request_id); } /* @@ -1355,7 +1355,7 @@ snmp_receive_packet(struct snmp_pdu *pdu socklen_t optlen; #endif - if ((buf = malloc(snmp_client.rxbuflen)) == NULL) { + if ((buf = calloc(1, snmp_client.rxbuflen)) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); return (-1); } From owner-svn-src-all@freebsd.org Sat Feb 4 15:45:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D016DCD03D8; Sat, 4 Feb 2017 15:45:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CD4E84F; Sat, 4 Feb 2017 15:45: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 v14FjpEY048453; Sat, 4 Feb 2017 15:45:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FjpRP048452; Sat, 4 Feb 2017 15:45:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041545.v14FjpRP048452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313201 - stable/10/contrib/bsnmp/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:45:52 -0000 Author: ngie Date: Sat Feb 4 15:45:51 2017 New Revision: 313201 URL: https://svnweb.freebsd.org/changeset/base/313201 Log: MFC r311263: Use calloc instead of malloc with buffers in snmp_{recv,send}_packet This doesn't fix the issue noted in the PR, but at the very least it cleans up the error so it looks a bit more sane, and in the event that bsnmp did wander off into the weeds, the likelihood of it crashing with more sensible output is greater, in my opinion MFC counter set high so I have enough time to resolve the real underlying bug in bsnmpwalk PR: 215721 Modified: stable/10/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- stable/10/contrib/bsnmp/lib/snmpclient.c Sat Feb 4 15:45:39 2017 (r313200) +++ stable/10/contrib/bsnmp/lib/snmpclient.c Sat Feb 4 15:45:51 2017 (r313201) @@ -1234,7 +1234,7 @@ snmp_send_packet(struct snmp_pdu * pdu) struct asn_buf b; ssize_t ret; - if ((buf = malloc(snmp_client.txbuflen)) == NULL) { + if ((buf = calloc(1, snmp_client.txbuflen)) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); return (-1); } @@ -1259,7 +1259,7 @@ snmp_send_packet(struct snmp_pdu * pdu) } free(buf); - return pdu->request_id; + return (pdu->request_id); } /* @@ -1355,7 +1355,7 @@ snmp_receive_packet(struct snmp_pdu *pdu socklen_t optlen; #endif - if ((buf = malloc(snmp_client.rxbuflen)) == NULL) { + if ((buf = calloc(1, snmp_client.rxbuflen)) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); return (-1); } From owner-svn-src-all@freebsd.org Sat Feb 4 15:48:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72F54CD0522; Sat, 4 Feb 2017 15:48:54 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC5FB01; Sat, 4 Feb 2017 15:48:54 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FmrCL048783; Sat, 4 Feb 2017 15:48:53 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FmrxJ048782; Sat, 4 Feb 2017 15:48:53 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041548.v14FmrxJ048782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313202 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:48:54 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:48:53 2017 New Revision: 313202 URL: https://svnweb.freebsd.org/changeset/base/313202 Log: Fix the previous commit to the family tree file. It is too early to list 11.0, and we do not list -CURRENT here. Submitted by: maxim Sponsored by: The FreeBSD Foundation Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:45:51 2017 (r313201) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:48:53 2017 (r313202) @@ -691,8 +691,6 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] -FreeBSD 11.0 2016-06-08 [FBD] -FreeBSD 12.0 2016-06-09 [FBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Sat Feb 4 15:49:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E08C7CD0641; Sat, 4 Feb 2017 15:49:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92E47DFD; Sat, 4 Feb 2017 15:49:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Fno3Q049012; Sat, 4 Feb 2017 15:49:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FnopW049010; Sat, 4 Feb 2017 15:49:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041549.v14FnopW049010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313203 - stable/11/usr.sbin/inetd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:49:52 -0000 Author: ngie Date: Sat Feb 4 15:49:50 2017 New Revision: 313203 URL: https://svnweb.freebsd.org/changeset/base/313203 Log: MFC r312105,r312162: r312105: Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS This will allow inetd to stand by itself without libwrap. Relnotes: yes r312162: 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. Pointyhat to: ngie Modified: stable/11/usr.sbin/inetd/Makefile stable/11/usr.sbin/inetd/inetd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/inetd/Makefile ============================================================================== --- stable/11/usr.sbin/inetd/Makefile Sat Feb 4 15:48:53 2017 (r313202) +++ stable/11/usr.sbin/inetd/Makefile Sat Feb 4 15:49:50 2017 (r313203) @@ -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: stable/11/usr.sbin/inetd/inetd.c ============================================================================== --- stable/11/usr.sbin/inetd/inetd.c Sat Feb 4 15:48:53 2017 (r313202) +++ stable/11/usr.sbin/inetd/inetd.c Sat Feb 4 15:49:50 2017 (r313203) @@ -138,7 +138,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef LIBWRAP #include +#endif #include #include "inetd.h" @@ -297,6 +299,7 @@ getvalue(const char *arg, int *value, co return 0; /* success */ } +#ifdef LIBWRAP static sa_family_t whichaf(struct request_info *req) { @@ -310,6 +313,7 @@ whichaf(struct request_info *req) return AF_INET; return sa->sa_family; } +#endif int main(int argc, char **argv) @@ -324,9 +328,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; @@ -736,6 +742,7 @@ main(int argc, char **argv) _exit(0); } } +#ifdef LIBWRAP if (ISWRAP(sep)) { inetd_setproctitle("wrapping", ctrl); service = sep->se_server_name ? @@ -764,6 +771,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-all@freebsd.org Sat Feb 4 15:50:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A614CD07AA; Sat, 4 Feb 2017 15:50:48 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66DC1FAD; Sat, 4 Feb 2017 15:50:48 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Fol2R049123; Sat, 4 Feb 2017 15:50:47 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Folio049122; Sat, 4 Feb 2017 15:50:47 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041550.v14Folio049122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313204 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:50:48 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:50:47 2017 New Revision: 313204 URL: https://svnweb.freebsd.org/changeset/base/313204 Log: DragonFly 4.6.0 release added. Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:49:50 2017 (r313203) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:50:47 2017 (r313204) @@ -338,7 +338,7 @@ FreeBSD 5.2 | | | | | | | DragonFly 4.4.1 | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | - | | | | | + | | | | DragonFly 4.6.0 *--FreeBSD | | | | | 11.0 | | | | | | | | | @@ -691,6 +691,7 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +DragonFly 4.6.0 2016-08-02 [DFB] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Sat Feb 4 15:51:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4387CD0A9C; Sat, 4 Feb 2017 15:51:46 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80B6A1226; Sat, 4 Feb 2017 15:51:46 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FpjuS049878; Sat, 4 Feb 2017 15:51:45 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FpjV8049877; Sat, 4 Feb 2017 15:51:45 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041551.v14FpjV8049877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313205 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:51:46 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:51:45 2017 New Revision: 313205 URL: https://svnweb.freebsd.org/changeset/base/313205 Log: OpenBSD 6.0 added. Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:50:47 2017 (r313204) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:51:45 2017 (r313205) @@ -339,7 +339,7 @@ FreeBSD 5.2 | | | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | | | | | DragonFly 4.6.0 - *--FreeBSD | | | | + *--FreeBSD | | OpenBSD 6.0 | | 11.0 | | | | | | | | | | | | | | @@ -692,6 +692,7 @@ DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] DragonFly 4.6.0 2016-08-02 [DFB] +OpenBSD 6.0 2016-09-01 [OBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Sat Feb 4 15:52:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B8F8CD0AFB; Sat, 4 Feb 2017 15:52: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 05EEE1354; Sat, 4 Feb 2017 15:52:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Fq8vK053051; Sat, 4 Feb 2017 15:52:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Fq80M053049; Sat, 4 Feb 2017 15:52:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041552.v14Fq80M053049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313206 - stable/10/usr.sbin/inetd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:52:10 -0000 Author: ngie Date: Sat Feb 4 15:52:08 2017 New Revision: 313206 URL: https://svnweb.freebsd.org/changeset/base/313206 Log: MFC r312105,r312162: r312105: Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS This will allow inetd to stand by itself without libwrap. Relnotes: yes r312162: 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. Pointyhat to: ngie Modified: stable/10/usr.sbin/inetd/Makefile stable/10/usr.sbin/inetd/inetd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/inetd/Makefile ============================================================================== --- stable/10/usr.sbin/inetd/Makefile Sat Feb 4 15:51:45 2017 (r313205) +++ stable/10/usr.sbin/inetd/Makefile Sat Feb 4 15:52:08 2017 (r313206) @@ -16,8 +16,14 @@ CFLAGS+= -DLOGIN_CAP CFLAGS+= -DINET6 .endif -DPADD= ${LIBUTIL} ${LIBWRAP} -LDADD= -lutil -lwrap +DPADD+= ${LIBUTIL} +LDADD+= -lutil + +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +DPADD+= ${LIBWRAP} +LDADD+= -lwrap +.endif # XXX for src/release/picobsd .if !defined(RELEASE_CRUNCH) Modified: stable/10/usr.sbin/inetd/inetd.c ============================================================================== --- stable/10/usr.sbin/inetd/inetd.c Sat Feb 4 15:51:45 2017 (r313205) +++ stable/10/usr.sbin/inetd/inetd.c Sat Feb 4 15:52:08 2017 (r313206) @@ -138,7 +138,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef LIBWRAP #include +#endif #include #include "inetd.h" @@ -297,6 +299,7 @@ getvalue(const char *arg, int *value, co return 0; /* success */ } +#ifdef LIBWRAP static sa_family_t whichaf(struct request_info *req) { @@ -310,6 +313,7 @@ whichaf(struct request_info *req) return AF_INET; return sa->sa_family; } +#endif int main(int argc, char **argv) @@ -324,9 +328,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; @@ -736,6 +742,7 @@ main(int argc, char **argv) _exit(0); } } +#ifdef LIBWRAP if (ISWRAP(sep)) { inetd_setproctitle("wrapping", ctrl); service = sep->se_server_name ? @@ -764,6 +771,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-all@freebsd.org Sat Feb 4 15:52:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F0ABCD0B8F; Sat, 4 Feb 2017 15:52:51 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4CFE16AA; Sat, 4 Feb 2017 15:52:50 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FqnST053155; Sat, 4 Feb 2017 15:52:49 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Fqnum053154; Sat, 4 Feb 2017 15:52:49 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041552.v14Fqnum053154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313207 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:52:51 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:52:49 2017 New Revision: 313207 URL: https://svnweb.freebsd.org/changeset/base/313207 Log: Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree. Ammend the position of NetBSD 6.0.2 release in the tree as it came after OpenBSD[1] & DragonFlyBSD[2] release according to the release information. The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from NetBSD CVS copy) and confirmed with history page[3] [1] http://www.openbsd.org/53.html [2] https://www.dragonflybsd.org/releases/ [3] http://netbsd.org/releases/formal.html#history Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8099 Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:52:08 2017 (r313206) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:52:49 2017 (r313207) @@ -258,6 +258,9 @@ FreeBSD 5.2 | | | | 8.3 | | | | | | | | | | | | NetBSD | | | | | | | | 5.1.3 | | + | | | | | | | | | + | | | | | | NetBSD | | + | | | | | | 5.1.4 | | | | | | | | OpenBSD 5.1 | | | | Mac OS X | `----. | | | | | 10.8 | \ | | @@ -268,14 +271,17 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | | | | NetBSD | | | | | | | | | 5.2.1 | | + | | | | | | | | | | + | | | | | | | NetBSD | | + | | | | | | | 5.2.2 | | | | | | | | | | | | | | | | | \ | | | | | | | | NetBSD | | | | | | | | 6.0.1 | | - | | | | | | | | | + | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 | | | | | | NetBSD | | | | | | | | 6.0.2 | | - | | | | | | | OpenBSD 5.3 DragonFly 3.4.1 + | | | | | | | | | | | | | | | NetBSD | | | | | | | | 6.0.3 | | | | | | | | | | | @@ -338,6 +344,7 @@ FreeBSD 5.2 | | | | | | | DragonFly 4.4.1 | FreeBSD | | OpenBSD 5.9 | | 10.3 | | | | + | | NetBSD 7.0.1 | | | | | | DragonFly 4.6.0 *--FreeBSD | | OpenBSD 6.0 | | 11.0 | | | | @@ -661,12 +668,14 @@ Mac OS X 10.9 2013-10-22 [APL] OpenBSD 5.4 2013-11-01 [OBD] DragonFly 3.6.0 2013-11-25 [DFB] FreeBSD 10.0 2014-01-20 [FBD] -NetBSD 6.0.4 2014-01-27 [NBD] -NetBSD 6.1.3 2014-01-27 [NBD] +NetBSD 5.1.4 2014-01-25 [NBD] +NetBSD 5.2.2 2014-01-25 [NBD] +NetBSD 6.0.4 2014-01-25 [NBD] +NetBSD 6.1.3 2014-01-25 [NBD] DragonFly 3.6.1 2014-02-22 [DFB] DragonFly 3.6.2 2014-04-10 [DFB] -NetBSD 6.0.5 2014-04-19 [NDB] -NetBSD 6.1.4 2014-04-19 [NDB] +NetBSD 6.0.5 2014-04-12 [NDB] +NetBSD 6.1.4 2014-04-12 [NDB] OpenBSD 5.5 2014-05-01 [OBD] DragonFly 3.8.0 2014-06-04 [DFB] DragonFly 3.8.1 2014-06-16 [DFB] @@ -691,6 +700,7 @@ OpenBSD 5.8 2015-10-18 [OBD] DragonFly 4.4.1 2015-12-07 [DFB] OpenBSD 5.9 2016-03-29 [OBD] FreeBSD 10.3 2016-04-04 [FBD] +NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] From owner-svn-src-all@freebsd.org Sat Feb 4 15:53:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D206CD0C48; Sat, 4 Feb 2017 15:53:36 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7181181A; Sat, 4 Feb 2017 15:53:35 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FrYg8053271; Sat, 4 Feb 2017 15:53:34 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FrYAU053270; Sat, 4 Feb 2017 15:53:34 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201702041553.v14FrYAU053270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 4 Feb 2017 15:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313208 - stable/11/share/misc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:53:36 -0000 Author: sevan (doc committer) Date: Sat Feb 4 15:53:34 2017 New Revision: 313208 URL: https://svnweb.freebsd.org/changeset/base/313208 Log: FreeBSD 11.0 release date added. Modified: stable/11/share/misc/bsd-family-tree Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/bsd-family-tree ============================================================================== --- stable/11/share/misc/bsd-family-tree Sat Feb 4 15:52:49 2017 (r313207) +++ stable/11/share/misc/bsd-family-tree Sat Feb 4 15:53:34 2017 (r313208) @@ -703,6 +703,7 @@ FreeBSD 10.3 2016-04-04 [FBD] NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.0 2016-08-02 [DFB] OpenBSD 6.0 2016-09-01 [OBD] +FreeBSD 11.0 2016-10-10 [FBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Sat Feb 4 15:55:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88019CD0CBB; Sat, 4 Feb 2017 15:55:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57142196C; Sat, 4 Feb 2017 15:55:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14FtVb6053423; Sat, 4 Feb 2017 15:55:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FtVH4053422; Sat, 4 Feb 2017 15:55:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041555.v14FtVH4053422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313209 - stable/10/usr.sbin/rpcbind X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:55:32 -0000 Author: ngie Date: Sat Feb 4 15:55:31 2017 New Revision: 313209 URL: https://svnweb.freebsd.org/changeset/base/313209 Log: MFC r311470: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into rpcbind. Modified: stable/10/usr.sbin/rpcbind/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpcbind/Makefile ============================================================================== --- stable/10/usr.sbin/rpcbind/Makefile Sat Feb 4 15:53:34 2017 (r313208) +++ stable/10/usr.sbin/rpcbind/Makefile Sat Feb 4 15:55:31 2017 (r313209) @@ -8,19 +8,25 @@ MAN= rpcbind.8 SRCS= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \ rpcb_svc.c rpcb_svc_com.c security.c warmstart.c util.c -CFLAGS+= -DPORTMAP -DLIBWRAP +CFLAGS+= -DPORTMAP .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +DPADD+= ${LIBWRAP} +LDADD+= -lwrap +.endif + .if ${MK_TESTS} != "no" SUBDIR+= tests .endif -WARNS?= 1 +DPADD+= ${LIBUTIL} +LDADD+= -lutil -DPADD= ${LIBWRAP} ${LIBUTIL} -LDADD= -lwrap -lutil +WARNS?= 1 .include From owner-svn-src-all@freebsd.org Sat Feb 4 15:56:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6469CD0D6C; Sat, 4 Feb 2017 15:56: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 72FBC1BC1; Sat, 4 Feb 2017 15:56: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 v14FuOB0053615; Sat, 4 Feb 2017 15:56:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14FuOI6053614; Sat, 4 Feb 2017 15:56:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041556.v14FuOI6053614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 15:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313210 - stable/11/usr.sbin/rpcbind X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 15:56:25 -0000 Author: ngie Date: Sat Feb 4 15:56:24 2017 New Revision: 313210 URL: https://svnweb.freebsd.org/changeset/base/313210 Log: MFC r311470: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into rpcbind. Modified: stable/11/usr.sbin/rpcbind/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/rpcbind/Makefile ============================================================================== --- stable/11/usr.sbin/rpcbind/Makefile Sat Feb 4 15:55:31 2017 (r313209) +++ stable/11/usr.sbin/rpcbind/Makefile Sat Feb 4 15:56:24 2017 (r313210) @@ -8,18 +8,21 @@ MAN= rpcbind.8 SRCS= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \ rpcb_svc.c rpcb_svc_com.c security.c warmstart.c util.c -CFLAGS+= -DPORTMAP -DLIBWRAP +CFLAGS+= -DPORTMAP .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif + .if ${MK_TESTS} != "no" SUBDIR+= tests .endif WARNS?= 1 -LIBADD= wrap - .include From owner-svn-src-all@freebsd.org Sat Feb 4 16:00:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF3C2CD0E05; Sat, 4 Feb 2017 16:00: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 AE2231D0D; Sat, 4 Feb 2017 16:00: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 v14G0Jg5053883; Sat, 4 Feb 2017 16:00:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14G0Jf4053880; Sat, 4 Feb 2017 16:00:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041600.v14G0Jf4053880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313211 - in stable/11/usr.sbin/amd: amd include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:00:21 -0000 Author: ngie Date: Sat Feb 4 16:00:19 2017 New Revision: 313211 URL: https://svnweb.freebsd.org/changeset/base/313211 Log: MFC r311472: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into amd(8). Modified: stable/11/usr.sbin/amd/amd/Makefile stable/11/usr.sbin/amd/include/config.h Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/amd/amd/Makefile ============================================================================== --- stable/11/usr.sbin/amd/amd/Makefile Sat Feb 4 15:56:24 2017 (r313210) +++ stable/11/usr.sbin/amd/amd/Makefile Sat Feb 4 16:00:19 2017 (r313211) @@ -30,7 +30,7 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/a -I${SRCTOP}/contrib/amd/include \ -I${.OBJDIR}/../../../include/rpcsvc -LIBADD= amu wrap +LIBADD= amu SRCS+= conf_parse.c conf_parse.h conf_tok.c SRCS+= sun_map_parse.c sun_map_parse.h sun_map_tok.c @@ -73,4 +73,9 @@ CFLAGS+= -DHAVE_MAP_HESIOD SRCS+= info_nis.c .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DHAVE_LIBWRAP -DHAVE_TCPD_H +LIBADD+= wrap +.endif + .include Modified: stable/11/usr.sbin/amd/include/config.h ============================================================================== --- stable/11/usr.sbin/amd/include/config.h Sat Feb 4 15:56:24 2017 (r313210) +++ stable/11/usr.sbin/amd/include/config.h Sat Feb 4 16:00:19 2017 (r313211) @@ -530,7 +530,7 @@ /* #undef HAVE_LIBRT */ /* does libwrap exist? */ -#define HAVE_LIBWRAP 1 +/* #undef HAVE_LIBWRAP */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -1207,7 +1207,7 @@ #define HAVE_SYS_WAIT_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_TCPD_H 1 +/* #undef HAVE_TCPD_H */ /* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 From owner-svn-src-all@freebsd.org Sat Feb 4 16:00:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97252CD0E70; Sat, 4 Feb 2017 16:00:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A1531E7D; Sat, 4 Feb 2017 16:00: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 v14G0pxO055549; Sat, 4 Feb 2017 16:00:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14G0pIW055547; Sat, 4 Feb 2017 16:00:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041600.v14G0pIW055547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313212 - in stable/10/usr.sbin/amd: amd include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:00:52 -0000 Author: ngie Date: Sat Feb 4 16:00:51 2017 New Revision: 313212 URL: https://svnweb.freebsd.org/changeset/base/313212 Log: MFC r311472: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into amd(8). Modified: stable/10/usr.sbin/amd/amd/Makefile stable/10/usr.sbin/amd/include/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/amd/amd/Makefile ============================================================================== --- stable/10/usr.sbin/amd/amd/Makefile Sat Feb 4 16:00:19 2017 (r313211) +++ stable/10/usr.sbin/amd/amd/Makefile Sat Feb 4 16:00:51 2017 (r313212) @@ -30,8 +30,8 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/a -I${SRCTOP}/contrib/amd/include \ -I${.OBJDIR}/../../../include/rpcsvc -DPADD= ${LIBAMU} ${LIBWRAP} -LDADD= ${LIBAMU} -lwrap +DPADD= ${LIBAMU} +LDADD= ${LIBAMU} SRCS+= conf_parse.c conf_parse.h conf_tok.c SRCS+= sun_map_parse.c sun_map_parse.h sun_map_tok.c @@ -74,4 +74,10 @@ CFLAGS+= -DHAVE_MAP_HESIOD SRCS+= info_nis.c .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DHAVE_LIBWRAP -DHAVE_TCPD_H +DPADD+= ${LIBWRAP} +LDADD+= -lwrap +.endif + .include Modified: stable/10/usr.sbin/amd/include/config.h ============================================================================== --- stable/10/usr.sbin/amd/include/config.h Sat Feb 4 16:00:19 2017 (r313211) +++ stable/10/usr.sbin/amd/include/config.h Sat Feb 4 16:00:51 2017 (r313212) @@ -530,7 +530,7 @@ /* #undef HAVE_LIBRT */ /* does libwrap exist? */ -#define HAVE_LIBWRAP 1 +/* #undef HAVE_LIBWRAP */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -1207,7 +1207,7 @@ #define HAVE_SYS_WAIT_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_TCPD_H 1 +/* #undef HAVE_TCPD_H */ /* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 From owner-svn-src-all@freebsd.org Sat Feb 4 16:02:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F571CD0011; Sat, 4 Feb 2017 16:02: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 4EA4E278; Sat, 4 Feb 2017 16:02: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 v14G2mqq057835; Sat, 4 Feb 2017 16:02:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14G2mUT057834; Sat, 4 Feb 2017 16:02:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041602.v14G2mUT057834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:02:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313213 - stable/11/tests/sys/kern/acct X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:02:49 -0000 Author: ngie Date: Sat Feb 4 16:02:48 2017 New Revision: 313213 URL: https://svnweb.freebsd.org/changeset/base/313213 Log: MFC r312119,r312216,r312226: r312119: 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) Tested with: clang, gcc 4.2.1, gcc 4.9 r312216: Revert r312119 and reword the intent to fix -Wshadow issues between exp(3) and `exp` var. The approach taken previously was not ideal for multiple functional and stylistic reasons. Add to existing sed call in Makefile to replace `exp` with `exponent` instead. Requested by: bde r312226: Fix typo in r312216 I meant to replace "exp" with "exponent", not "expected" Pointyhat to: ngie Modified: stable/11/tests/sys/kern/acct/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/kern/acct/Makefile ============================================================================== --- stable/11/tests/sys/kern/acct/Makefile Sat Feb 4 16:00:51 2017 (r313212) +++ stable/11/tests/sys/kern/acct/Makefile Sat Feb 4 16:02:48 2017 (r313213) @@ -13,6 +13,7 @@ acct_test.o: convert.c convert.c: ${SRCTOP}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ + -e 's/exp/exponent/g' \ -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} From owner-svn-src-all@freebsd.org Sat Feb 4 16:02:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D2EBCD001A; Sat, 4 Feb 2017 16:02:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDF2F27A; Sat, 4 Feb 2017 16:02: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 v14G2od3057881; Sat, 4 Feb 2017 16:02:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14G2ole057880; Sat, 4 Feb 2017 16:02:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041602.v14G2ole057880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:02:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313214 - stable/10/tests/sys/kern/acct X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:02:51 -0000 Author: ngie Date: Sat Feb 4 16:02:49 2017 New Revision: 313214 URL: https://svnweb.freebsd.org/changeset/base/313214 Log: MFC r312119,r312216,r312226: r312119: 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) Tested with: clang, gcc 4.2.1, gcc 4.9 r312216: Revert r312119 and reword the intent to fix -Wshadow issues between exp(3) and `exp` var. The approach taken previously was not ideal for multiple functional and stylistic reasons. Add to existing sed call in Makefile to replace `exp` with `exponent` instead. Requested by: bde r312226: Fix typo in r312216 I meant to replace "exp" with "exponent", not "expected" Pointyhat to: ngie Modified: stable/10/tests/sys/kern/acct/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/acct/Makefile ============================================================================== --- stable/10/tests/sys/kern/acct/Makefile Sat Feb 4 16:02:48 2017 (r313213) +++ stable/10/tests/sys/kern/acct/Makefile Sat Feb 4 16:02:49 2017 (r313214) @@ -13,6 +13,7 @@ acct_test.o: convert.c convert.c: ${.CURDIR:H:H:H:H}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ + -e 's/exp/exponent/g' \ -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} From owner-svn-src-all@freebsd.org Sat Feb 4 16:09:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54876CD0132; Sat, 4 Feb 2017 16:09:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23BF47B5; Sat, 4 Feb 2017 16:09:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14G97kp058211; Sat, 4 Feb 2017 16:09:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14G97eC058210; Sat, 4 Feb 2017 16:09:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041609.v14G97eC058210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313215 - stable/10/lib/libnetbsd/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:09:08 -0000 Author: ngie Date: Sat Feb 4 16:09:07 2017 New Revision: 313215 URL: https://svnweb.freebsd.org/changeset/base/313215 Log: MFC r311972: Add __BIT and __BITS macros from NetBSD to help support new testcases Modified: stable/10/lib/libnetbsd/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libnetbsd/sys/cdefs.h ============================================================================== --- stable/10/lib/libnetbsd/sys/cdefs.h Sat Feb 4 16:02:49 2017 (r313214) +++ stable/10/lib/libnetbsd/sys/cdefs.h Sat Feb 4 16:09:07 2017 (r313215) @@ -69,4 +69,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-all@freebsd.org Sat Feb 4 16:15:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A22EECD0342; Sat, 4 Feb 2017 16:15: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 7149CB9B; Sat, 4 Feb 2017 16:15: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 v14GFQph062012; Sat, 4 Feb 2017 16:15:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GFQHN062011; Sat, 4 Feb 2017 16:15:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041615.v14GFQHN062011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313216 - stable/10/tests/sys/mac/bsdextended X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:15:27 -0000 Author: ngie Date: Sat Feb 4 16:15:26 2017 New Revision: 313216 URL: https://svnweb.freebsd.org/changeset/base/313216 Log: MFC r312120: Fix warnings - Staticize test_num - Promote i to size_t to deal with -Wsign-compare issues Tested with: clang, gcc, gcc49 Modified: stable/10/tests/sys/mac/bsdextended/ugidfw_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/mac/bsdextended/ugidfw_test.c ============================================================================== --- stable/10/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:09:07 2017 (r313215) +++ stable/10/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:15:26 2017 (r313216) @@ -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-all@freebsd.org Sat Feb 4 16:16:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BAFACD03B9; Sat, 4 Feb 2017 16:16: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 CF46BCCA; Sat, 4 Feb 2017 16:16: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 v14GGfCN062115; Sat, 4 Feb 2017 16:16:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GGfQJ062114; Sat, 4 Feb 2017 16:16:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041616.v14GGfQJ062114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313217 - stable/10/tests/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:16:43 -0000 Author: ngie Date: Sat Feb 4 16:16:41 2017 New Revision: 313217 URL: https://svnweb.freebsd.org/changeset/base/313217 Log: MFC r312110: Fix -Wsign-compare warnings The loop index (i) doesn't need to be size_t as its comparison is signed Modified: stable/10/tests/sys/vm/mmap_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/vm/mmap_test.c ============================================================================== --- stable/10/tests/sys/vm/mmap_test.c Sat Feb 4 16:15:26 2017 (r313216) +++ stable/10/tests/sys/vm/mmap_test.c Sat Feb 4 16:16:41 2017 (r313217) @@ -192,8 +192,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); @@ -205,7 +204,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); @@ -232,8 +231,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); @@ -245,7 +243,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-all@freebsd.org Sat Feb 4 16:29:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6667ECD0696; Sat, 4 Feb 2017 16: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 331BC12C2; Sat, 4 Feb 2017 16: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 v14GTNsU066411; Sat, 4 Feb 2017 16:29:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GTNIB066410; Sat, 4 Feb 2017 16:29:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041629.v14GTNIB066410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313218 - stable/10/tests/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:29:24 -0000 Author: ngie Date: Sat Feb 4 16:29:23 2017 New Revision: 313218 URL: https://svnweb.freebsd.org/changeset/base/313218 Log: MFC r312114,r312194: r312114: Enable WARNS?= 6 across all of tests/sys r312194: 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 Tested with: make tinderbox Added: stable/10/tests/sys/Makefile.inc - copied unchanged from r312114, head/tests/sys/Makefile.inc Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/tests/sys/Makefile.inc (from r312114, head/tests/sys/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tests/sys/Makefile.inc Sat Feb 4 16:29:23 2017 (r313218, copy of r312114, head/tests/sys/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +WARNS?= 6 From owner-svn-src-all@freebsd.org Sat Feb 4 16:31:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE5AACD0733; Sat, 4 Feb 2017 16:31: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 95EFA14E6; Sat, 4 Feb 2017 16:31: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 v14GVO7x069699; Sat, 4 Feb 2017 16:31:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GVO5e069698; Sat, 4 Feb 2017 16:31:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041631.v14GVO5e069698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313219 - stable/10/tests/sys/mac/bsdextended X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:31:25 -0000 Author: ngie Date: Sat Feb 4 16:31:24 2017 New Revision: 313219 URL: https://svnweb.freebsd.org/changeset/base/313219 Log: MFC r312164: Fix -Wformat issue Use %zu for printing out results from nitems, as it's size_t based Modified: stable/10/tests/sys/mac/bsdextended/ugidfw_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/mac/bsdextended/ugidfw_test.c ============================================================================== --- stable/10/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:29:23 2017 (r313218) +++ stable/10/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:31:24 2017 (r313219) @@ -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-all@freebsd.org Sat Feb 4 16:34:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B88BCD08C5; Sat, 4 Feb 2017 16:34:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5537D1862; Sat, 4 Feb 2017 16:34:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14GYi94070635; Sat, 4 Feb 2017 16:34:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GYioI070634; Sat, 4 Feb 2017 16:34:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041634.v14GYioI070634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313220 - stable/10/usr.sbin/ypserv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:34:45 -0000 Author: ngie Date: Sat Feb 4 16:34:44 2017 New Revision: 313220 URL: https://svnweb.freebsd.org/changeset/base/313220 Log: MFC r311469: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into ypserv. Modified: stable/10/usr.sbin/ypserv/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ypserv/Makefile ============================================================================== --- stable/10/usr.sbin/ypserv/Makefile Sat Feb 4 16:31:24 2017 (r313219) +++ stable/10/usr.sbin/ypserv/Makefile Sat Feb 4 16:34:44 2017 (r313220) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + RPCDIR= ${.CURDIR}/../../include/rpcsvc .PATH: ${RPCDIR} @@ -8,12 +10,15 @@ MAN= ypserv.8 ypinit.8 SRCS= yp_svc.c yp_server.c yp_dblookup.c yp_dnslookup.c \ ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c -CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I. +CFLAGS+= -DDB_CACHE -I. WARNS?= 0 -DPADD= ${LIBWRAP} -LDADD= -lwrap +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCP_WRAPPER +DPADD+= ${LIBWRAP} +LDADD+= -lwrap +.endif CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h From owner-svn-src-all@freebsd.org Sat Feb 4 16:36:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E935CD094B; Sat, 4 Feb 2017 16:36:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B43B19D7; Sat, 4 Feb 2017 16:36:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Ga7KG070758; Sat, 4 Feb 2017 16:36:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Ga7K2070757; Sat, 4 Feb 2017 16:36:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041636.v14Ga7K2070757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313221 - stable/10/lib/libc/regex/grot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:36:08 -0000 Author: ngie Date: Sat Feb 4 16:36:07 2017 New Revision: 313221 URL: https://svnweb.freebsd.org/changeset/base/313221 Log: MFC r312332: Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of unnecessarily long relative path .PATH values with make Modified: stable/10/lib/libc/regex/grot/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/regex/grot/Makefile ============================================================================== --- stable/10/lib/libc/regex/grot/Makefile Sat Feb 4 16:34:44 2017 (r313220) +++ stable/10/lib/libc/regex/grot/Makefile Sat Feb 4 16:36:07 2017 (r313221) @@ -5,7 +5,7 @@ # Do not take -DPOSIX_MISTAKE out. REGCFLAGS isn't important to you (it's # for my use in some special contexts). -PATHS= ${.CURDIR}/.. ${.CURDIR}/../../locale ${.CURDIR}/../../../../include +PATHS= ${.CURDIR:H} ${.CURDIR:H:H}/locale ${SRCTOP}/include .PATH: ${PATHS} CFLAGS+= -static -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) From owner-svn-src-all@freebsd.org Sat Feb 4 16:37:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 231CDCD09D6; Sat, 4 Feb 2017 16:37:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF7671B38; Sat, 4 Feb 2017 16:37:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Gbix3070885; Sat, 4 Feb 2017 16:37:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GbirE070884; Sat, 4 Feb 2017 16:37:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041637.v14GbirE070884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313222 - stable/10/contrib/bsnmp/snmp_usm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:37:45 -0000 Author: ngie Date: Sat Feb 4 16:37:43 2017 New Revision: 313222 URL: https://svnweb.freebsd.org/changeset/base/313222 Log: MFC r311394: op_usm_users: don't deref uusers if it's NULL when SETting the value Add an XXX comment to note that the conditional seems suspect given how it's handled elsewhere in the SNMP_OP_SET case. CID: 1008573 Modified: stable/10/contrib/bsnmp/snmp_usm/usm_snmp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/bsnmp/snmp_usm/usm_snmp.c ============================================================================== --- stable/10/contrib/bsnmp/snmp_usm/usm_snmp.c Sat Feb 4 16:36:07 2017 (r313221) +++ stable/10/contrib/bsnmp/snmp_usm/usm_snmp.c Sat Feb 4 16:37:43 2017 (r313222) @@ -169,8 +169,12 @@ op_usm_users(struct snmp_context *ctx, s val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) return (SNMP_ERR_NOSUCHNAME); + /* + * XXX (ngie): need to investigate the MIB to determine how + * this is possible given some of the transitions below. + */ if (community != COMM_INITIALIZE && - uuser->type == StorageType_readOnly) + uuser != NULL && uuser->type == StorageType_readOnly) return (SNMP_ERR_NOT_WRITEABLE); switch (val->var.subs[sub - 1]) { From owner-svn-src-all@freebsd.org Sat Feb 4 16:40:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 966A4CD0B43; Sat, 4 Feb 2017 16:40:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7125F1D12; Sat, 4 Feb 2017 16:40:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14GeT7I071094; Sat, 4 Feb 2017 16:40:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GeTYU071089; Sat, 4 Feb 2017 16:40:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041640.v14GeTYU071089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313223 - in stable/10: share/mk usr.sbin/bsnmpd/modules usr.sbin/bsnmpd/modules/snmp_hostres usr.sbin/bsnmpd/modules/snmp_mibII X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:40:30 -0000 Author: ngie Date: Sat Feb 4 16:40:28 2017 New Revision: 313223 URL: https://svnweb.freebsd.org/changeset/base/313223 Log: MFC r311744,r312328,r312329,r312330: r311744: Document bsd.snmpmod.mk from a high-level r312328: Add a make target (smilint) for running smilint tool against BMIBS Running smilint against MIB definitions is useful in finding functional problems with MIB definitions/descriptions. This is inspired by the smilint targets defined in usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile Document all of the variables that are involved in running the smilint target, as well as all of the prerequisites to running it. r312329: Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328 r312330: Add smilint target to subdir targets so "make smilint" here will run the smilint target in subdirs While here, convert a path that's .CURDIR relative to SRCTOP Modified: stable/10/share/mk/bsd.README stable/10/share/mk/bsd.snmpmod.mk stable/10/usr.sbin/bsnmpd/modules/Makefile stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile stable/10/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.README ============================================================================== --- stable/10/share/mk/bsd.README Sat Feb 4 16:37:43 2017 (r313222) +++ stable/10/share/mk/bsd.README Sat Feb 4 16:40:28 2017 (r313223) @@ -350,6 +350,82 @@ 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 implements the following additional targets: + + smilint: + execute smilint on the MIBs defined by BMIBS. + + The net-mgmt/libsmi package must be installed before + executing this target. The net-mgmt/net-snmp package + should be installed as well to reduce false positives + from smilint. + +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. + +LOCALBASE The package root where smilint and the net-snmp + definitions can be found + +MOD The bsnmpd module name. + +SMILINT smilint binary to use with the smilint make target. + +SMILINT_FLAGS flags to pass to smilint. + +SMIPATH A colon-separated directory path where MIBs definitions + can be found. See "SMIPATH" in smi_config for more + details. + +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 Modified: stable/10/share/mk/bsd.snmpmod.mk ============================================================================== --- stable/10/share/mk/bsd.snmpmod.mk Sat Feb 4 16:37:43 2017 (r313222) +++ stable/10/share/mk/bsd.snmpmod.mk Sat Feb 4 16:40:28 2017 (r313223) @@ -24,4 +24,18 @@ FILESGROUPS+= BMIBS BMIBSDIR= ${SHAREDIR}/snmp/mibs .endif +.if !target(smilint) && !empty(BMIBS) +LOCALBASE?= /usr/local + +SMILINT?= ${LOCALBASE}/bin/smilint + +SMIPATH?= ${BMIBSDIR}:${LOCALBASE}/share/snmp/mibs + +SMILINT_FLAGS?= -c /dev/null -l6 -i group-membership + +smilint: ${BMIBS} + SMIPATH=${SMIPATH} ${SMILINT} ${SMILINT_FLAGS} ${.ALLSRC} +.endif +smilint: .PHONY + .include Modified: stable/10/usr.sbin/bsnmpd/modules/Makefile ============================================================================== --- stable/10/usr.sbin/bsnmpd/modules/Makefile Sat Feb 4 16:37:43 2017 (r313222) +++ stable/10/usr.sbin/bsnmpd/modules/Makefile Sat Feb 4 16:40:28 2017 (r313223) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../../contrib/bsnmp/snmpd +.PATH: ${SRCTOP}/contrib/bsnmp/snmpd .if ${MK_ATM} != "no" _snmp_atm= snmp_atm @@ -35,4 +35,6 @@ SUBDIR+=snmp_wlan INCS= snmpmod.h INCSDIR= ${INCLUDEDIR}/bsnmp +SUBDIR_TARGETS+= smilint + .include Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sat Feb 4 16:37:43 2017 (r313222) +++ stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sat Feb 4 16:40:28 2017 (r313223) @@ -76,8 +76,3 @@ LDADD= -lkvm -ldevinfo -lm -lgeom -lmems printcap.So: printcap.c ${CC} ${PICFLAG} -DPIC ${CFLAGS:C/^-W.*//} -c ${.IMPSRC} -o ${.TARGET} - -smilint: .PHONY -smilint: ${BMIBS} - env SMIPATH=.:/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile ============================================================================== --- stable/10/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Sat Feb 4 16:37:43 2017 (r313222) +++ stable/10/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Sat Feb 4 16:40:28 2017 (r313223) @@ -21,8 +21,3 @@ INCS= snmp_${MOD}.h BMIBS= BEGEMOT-IP-MIB.txt BEGEMOT-MIB2-MIB.txt .include - -smilint: .PHONY -smilint: ${BMIBS} - env SMIPATH=/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} From owner-svn-src-all@freebsd.org Sat Feb 4 16:43:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05F3DCD0D92; Sat, 4 Feb 2017 16:43: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 C966512B; Sat, 4 Feb 2017 16:43: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 v14GhZ2o074736; Sat, 4 Feb 2017 16:43:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GhZiB074735; Sat, 4 Feb 2017 16:43:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041643.v14GhZiB074735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313224 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:43:37 -0000 Author: ngie Date: Sat Feb 4 16:43:35 2017 New Revision: 313224 URL: https://svnweb.freebsd.org/changeset/base/313224 Log: MFC r310467: Provide some guidance when dealing with sections and variables contained within them For example, using variables designated for %usm requires uncommenting %usm section header Modified: stable/10/etc/snmpd.config Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/snmpd.config ============================================================================== --- stable/10/etc/snmpd.config Sat Feb 4 16:40:28 2017 (r313223) +++ stable/10/etc/snmpd.config Sat Feb 4 16:43:35 2017 (r313224) @@ -116,6 +116,14 @@ snmpEnableAuthenTraps = 2 # modules # +# Control configuration for the modules in the module specific sections, e.g. +# the "usm" module (begemotSnmpdModulePath."usm") can be controlled in the +# %usm specific section. You must uncomment the section specific header in +# order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)` +# can only be used if %usm is uncommented. +# + +# # Bridge module # This requires the mibII module. # From owner-svn-src-all@freebsd.org Sat Feb 4 16:45:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE078CD0E12; Sat, 4 Feb 2017 16:45:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA45F2DD; Sat, 4 Feb 2017 16:45:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Gjiua074888; Sat, 4 Feb 2017 16:45:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GjidQ074887; Sat, 4 Feb 2017 16:45:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041645.v14GjidQ074887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313225 - stable/10/usr.sbin/sendmail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:45:46 -0000 Author: ngie Date: Sat Feb 4 16:45:44 2017 New Revision: 313225 URL: https://svnweb.freebsd.org/changeset/base/313225 Log: MFC r311471: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into sendmail. Modified: stable/10/usr.sbin/sendmail/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sendmail/Makefile ============================================================================== --- stable/10/usr.sbin/sendmail/Makefile Sat Feb 4 16:43:35 2017 (r313224) +++ stable/10/usr.sbin/sendmail/Makefile Sat Feb 4 16:45:44 2017 (r313225) @@ -37,7 +37,7 @@ NIS= -DNIS MAPS= -DMAP_REGEX -DDNSMAP CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I. -CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS ${MAPS} +CFLAGS+= ${DBMDEF} ${NIS} ${MAPS} .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DNETINET6 -DIPV6_FULL=0 @@ -45,8 +45,8 @@ CFLAGS+= -DNETINET6 -DIPV6_FULL=0 WARNS?= 0 -DPADD= ${LIBUTIL} ${LIBWRAP} -LDADD= -lutil -lwrap +DPADD= ${LIBUTIL} +LDADD= -lutil LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a @@ -67,6 +67,12 @@ DPADD+= ${LIBSSL} ${LIBCRYPTO} LDADD+= -lssl -lcrypto .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCPWRAPPERS +DPADD+= ${LIBWRAP} +LDADD+= -lwrap +.endif + # User customizations to the sendmail build environment CFLAGS+=${SENDMAIL_CFLAGS} DPADD+=${SENDMAIL_DPADD} From owner-svn-src-all@freebsd.org Sat Feb 4 16:47:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AEBFCD0F47; Sat, 4 Feb 2017 16:47: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 4F1CE75F; Sat, 4 Feb 2017 16:47: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 v14GlZFw075006; Sat, 4 Feb 2017 16:47:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GlZ8A075004; Sat, 4 Feb 2017 16:47:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041647.v14GlZ8A075004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313226 - stable/10/libexec/tftpd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:47:36 -0000 Author: ngie Date: Sat Feb 4 16:47:35 2017 New Revision: 313226 URL: https://svnweb.freebsd.org/changeset/base/313226 Log: MFC r311473: Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard This will allow the code to stand by itself without libwrap Modified: stable/10/libexec/tftpd/Makefile stable/10/libexec/tftpd/tftpd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/tftpd/Makefile ============================================================================== --- stable/10/libexec/tftpd/Makefile Sat Feb 4 16:45:44 2017 (r313225) +++ stable/10/libexec/tftpd/Makefile Sat Feb 4 16:47:35 2017 (r313226) @@ -1,13 +1,18 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ +.include + PROG= tftpd MAN= tftpd.8 SRCS= tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c SRCS+= tftpd.c WFORMAT=0 -DPADD= ${LIBWRAP} -LDADD= -lwrap +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +DPADD+= ${LIBWRAP} +LDADD+= -lwrap +.endif .include Modified: stable/10/libexec/tftpd/tftpd.c ============================================================================== --- stable/10/libexec/tftpd/tftpd.c Sat Feb 4 16:45:44 2017 (r313225) +++ stable/10/libexec/tftpd/tftpd.c Sat Feb 4 16:47:35 2017 (r313226) @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "tftp-file.h" @@ -75,6 +74,10 @@ __FBSDID("$FreeBSD$"); #include "tftp-transfer.h" #include "tftp-options.h" +#ifdef LIBWRAP +#include +#endif + static void tftp_wrq(int peer, char *, ssize_t); static void tftp_rrq(int peer, char *, ssize_t); @@ -281,6 +284,7 @@ main(int argc, char *argv[]) } } +#ifdef LIBWRAP /* * See if the client is allowed to talk to me. * (This needs to be done before the chroot()) @@ -329,6 +333,7 @@ main(int argc, char *argv[]) "Full access allowed" "in /etc/hosts.allow"); } +#endif /* * Since we exit here, we should do that only after the above From owner-svn-src-all@freebsd.org Sat Feb 4 16:48:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9B3ACD0FC9; Sat, 4 Feb 2017 16:48: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 80D32890; Sat, 4 Feb 2017 16:48: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 v14GlxjA075092; Sat, 4 Feb 2017 16:47:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Glu2w075061; Sat, 4 Feb 2017 16:47:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041647.v14Glu2w075061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313227 - in stable/11: contrib/netbsd-tests/lib/libc contrib/netbsd-tests/lib/libc/c063 contrib/netbsd-tests/lib/libc/gen contrib/netbsd-tests/lib/libc/gen/posix_spawn contrib/netbsd-t... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:48:01 -0000 Author: ngie Date: Sat Feb 4 16:47:56 2017 New Revision: 313227 URL: https://svnweb.freebsd.org/changeset/base/313227 Log: MFC r311925,r311968,r311969,r312102,r312108: r311925: 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). In collaboration with: christos@NetBSD.org r311968: Fix lib/libc/sys/access_test after r311925 sys/param.h needs to be #included in order for __FreeBSD_version to be checked r311969: 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 . r312102: Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD r312108: Delete trailing whitespace and use __arraycount instead of nitems in contrib code Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_openat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c stable/11/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_assert.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_dir.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_sleep.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_time.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c stable/11/contrib/netbsd-tests/lib/libc/gen/t_vis.c stable/11/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c stable/11/contrib/netbsd-tests/lib/libc/string/t_strchr.c stable/11/contrib/netbsd-tests/lib/libc/string/t_strerror.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_access.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_chroot.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_mincore.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_mmap.c stable/11/contrib/netbsd-tests/lib/libc/sys/t_wait.c stable/11/contrib/netbsd-tests/lib/libc/t_cdb.c stable/11/lib/libc/tests/stdlib/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_openat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_openat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_openat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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); Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_assert.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_assert.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_assert.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/gen/t_dir.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_dir.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_dir.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/gen/t_sleep.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifdef __FreeBSD__ +/* kqueue(2) on FreeBSD requires sys/types.h for uintptr_t; NetBSD doesn't. */ +#include +#endif +#include +#include +#include +#include /* for TIMESPEC_TO_TIMEVAL on FreeBSD */ + #include #include +#include #include #include #include @@ -35,10 +45,6 @@ #include #include -#include -#include -#include - #include "isqemu.h" #define BILLION 1000000000LL /* nano-seconds per second */ @@ -49,11 +55,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: stable/11/contrib/netbsd-tests/lib/libc/gen/t_time.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_time.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_time.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/gen/t_vis.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_vis.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_vis.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/string/t_strchr.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/string/t_strchr.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/string/t_strchr.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/string/t_strerror.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/string/t_strerror.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/string/t_strerror.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/sys/t_access.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_access.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_access.c Sat Feb 4 16:47:56 2017 (r313227) @@ -1,4 +1,4 @@ -/* $NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_access.c,v 2.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,15 @@ * 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 $"); + +#ifdef __FreeBSD__ +#include /* For __FreeBSD_version */ +#endif + +#include + +#include #include #include @@ -38,13 +46,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: stable/11/contrib/netbsd-tests/lib/libc/sys/t_chroot.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_chroot.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_chroot.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/sys/t_mincore.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_mincore.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/sys/t_mmap.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_mmap.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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: stable/11/contrib/netbsd-tests/lib/libc/sys/t_wait.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_wait.c Sat Feb 4 16:47:35 2017 (r313226) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_wait.c Sat Feb 4 16:47:56 2017 (r313227) @@ -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); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Feb 4 16:49:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1686CD0060; Sat, 4 Feb 2017 16:49:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0AFC9DA; Sat, 4 Feb 2017 16:49:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Gno6S075247; Sat, 4 Feb 2017 16:49:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GnoHo075246; Sat, 4 Feb 2017 16:49:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041649.v14GnoHo075246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313228 - stable/11/lib/libnetbsd/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:49:51 -0000 Author: ngie Date: Sat Feb 4 16:49:50 2017 New Revision: 313228 URL: https://svnweb.freebsd.org/changeset/base/313228 Log: MFC r311972: Add __BIT and __BITS macros from NetBSD to help support new testcases Modified: stable/11/lib/libnetbsd/sys/cdefs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libnetbsd/sys/cdefs.h ============================================================================== --- stable/11/lib/libnetbsd/sys/cdefs.h Sat Feb 4 16:47:56 2017 (r313227) +++ stable/11/lib/libnetbsd/sys/cdefs.h Sat Feb 4 16:49:50 2017 (r313228) @@ -69,4 +69,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-all@freebsd.org Sat Feb 4 16:52:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD867CD0242; Sat, 4 Feb 2017 16:52: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 7CB26D95; Sat, 4 Feb 2017 16:52: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 v14GqmxV078932; Sat, 4 Feb 2017 16:52:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Gqms4078931; Sat, 4 Feb 2017 16:52:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041652.v14Gqms4078931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313229 - stable/11/usr.sbin/ypserv X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:52:49 -0000 Author: ngie Date: Sat Feb 4 16:52:48 2017 New Revision: 313229 URL: https://svnweb.freebsd.org/changeset/base/313229 Log: MFC r311469: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into ypserv. Modified: stable/11/usr.sbin/ypserv/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ypserv/Makefile ============================================================================== --- stable/11/usr.sbin/ypserv/Makefile Sat Feb 4 16:49:50 2017 (r313228) +++ stable/11/usr.sbin/ypserv/Makefile Sat Feb 4 16:52:48 2017 (r313229) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + RPCDIR= ${.CURDIR}/../../include/rpcsvc .PATH: ${RPCDIR} \ ${.CURDIR}/common @@ -10,11 +12,14 @@ SRCS= yp_svc.c yp_server.c yp_dblookup.c ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c \ yplib_host.c -CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I. +CFLAGS+= -DDB_CACHE -I. WARNS?= 0 -LIBADD= wrap +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCP_WRAPPER +LIBADD+= wrap +.endif CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h From owner-svn-src-all@freebsd.org Sat Feb 4 16:54:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9506DCD0325; Sat, 4 Feb 2017 16:54:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64452EFA; Sat, 4 Feb 2017 16:54:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14GsiYS079061; Sat, 4 Feb 2017 16:54:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GsiWs079060; Sat, 4 Feb 2017 16:54:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041654.v14GsiWs079060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313230 - stable/11/usr.sbin/sendmail X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:54:45 -0000 Author: ngie Date: Sat Feb 4 16:54:44 2017 New Revision: 313230 URL: https://svnweb.freebsd.org/changeset/base/313230 Log: MFC r311471: Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into sendmail. Modified: stable/11/usr.sbin/sendmail/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/sendmail/Makefile ============================================================================== --- stable/11/usr.sbin/sendmail/Makefile Sat Feb 4 16:52:48 2017 (r313229) +++ stable/11/usr.sbin/sendmail/Makefile Sat Feb 4 16:54:44 2017 (r313230) @@ -38,7 +38,7 @@ NIS= -DNIS MAPS= -DMAP_REGEX -DDNSMAP CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I. -CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS ${MAPS} +CFLAGS+= ${DBMDEF} ${NIS} ${MAPS} .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DNETINET6 @@ -46,7 +46,7 @@ CFLAGS+= -DNETINET6 WARNS?= 0 -LIBADD= util wrap sm smutil +LIBADD= util sm smutil SRCS+= sm_os.h CLEANFILES+=sm_os.h @@ -57,6 +57,11 @@ CFLAGS+= -DSTARTTLS -D_FFR_TLS_1 LIBADD+= ssl crypto .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DTCPWRAPPERS +LIBADD+= wrap +.endif + # User customizations to the sendmail build environment CFLAGS+=${SENDMAIL_CFLAGS} DPADD+=${SENDMAIL_DPADD} From owner-svn-src-all@freebsd.org Sat Feb 4 16:55:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39398CD0397; Sat, 4 Feb 2017 16:55:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFF361026; Sat, 4 Feb 2017 16:55:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14GtkaG079183; Sat, 4 Feb 2017 16:55:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Gtktm079181; Sat, 4 Feb 2017 16:55:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041655.v14Gtktm079181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313231 - stable/11/libexec/tftpd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:55:48 -0000 Author: ngie Date: Sat Feb 4 16:55:46 2017 New Revision: 313231 URL: https://svnweb.freebsd.org/changeset/base/313231 Log: MFC r311473: Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard This will allow the code to stand by itself without libwrap Modified: stable/11/libexec/tftpd/Makefile stable/11/libexec/tftpd/tftpd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/tftpd/Makefile ============================================================================== --- stable/11/libexec/tftpd/Makefile Sat Feb 4 16:54:44 2017 (r313230) +++ stable/11/libexec/tftpd/Makefile Sat Feb 4 16:55:46 2017 (r313231) @@ -1,12 +1,17 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ +.include + PROG= tftpd MAN= tftpd.8 SRCS= tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c SRCS+= tftpd.c WFORMAT=0 +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP LIBADD= wrap +.endif .include Modified: stable/11/libexec/tftpd/tftpd.c ============================================================================== --- stable/11/libexec/tftpd/tftpd.c Sat Feb 4 16:54:44 2017 (r313230) +++ stable/11/libexec/tftpd/tftpd.c Sat Feb 4 16:55:46 2017 (r313231) @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "tftp-file.h" @@ -75,6 +74,10 @@ __FBSDID("$FreeBSD$"); #include "tftp-transfer.h" #include "tftp-options.h" +#ifdef LIBWRAP +#include +#endif + static void tftp_wrq(int peer, char *, ssize_t); static void tftp_rrq(int peer, char *, ssize_t); @@ -281,6 +284,7 @@ main(int argc, char *argv[]) } } +#ifdef LIBWRAP /* * See if the client is allowed to talk to me. * (This needs to be done before the chroot()) @@ -329,6 +333,7 @@ main(int argc, char *argv[]) "Full access allowed" "in /etc/hosts.allow"); } +#endif /* * Since we exit here, we should do that only after the above From owner-svn-src-all@freebsd.org Sat Feb 4 16:56:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 362CBCD0426; Sat, 4 Feb 2017 16:56: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 02346115F; Sat, 4 Feb 2017 16:56: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 v14Guq2R079281; Sat, 4 Feb 2017 16:56:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14GuqVm079280; Sat, 4 Feb 2017 16:56:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041656.v14GuqVm079280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313232 - stable/11/tests/sys/mac/bsdextended X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:56:53 -0000 Author: ngie Date: Sat Feb 4 16:56:51 2017 New Revision: 313232 URL: https://svnweb.freebsd.org/changeset/base/313232 Log: MFC r312164: Fix -Wformat issue Use %zu for printing out results from nitems, as it's size_t based Modified: stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/mac/bsdextended/ugidfw_test.c ============================================================================== --- stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:55:46 2017 (r313231) +++ stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 16:56:51 2017 (r313232) @@ -221,7 +221,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-all@freebsd.org Sat Feb 4 16:58:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCF04CD04D1; Sat, 4 Feb 2017 16:58: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 89ACD12A4; Sat, 4 Feb 2017 16:58: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 v14Gw6jT079402; Sat, 4 Feb 2017 16:58:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Gw6sk079401; Sat, 4 Feb 2017 16:58:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041658.v14Gw6sk079401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 16:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313233 - stable/11/tests/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 16:58:07 -0000 Author: ngie Date: Sat Feb 4 16:58:06 2017 New Revision: 313233 URL: https://svnweb.freebsd.org/changeset/base/313233 Log: MFC r312110: Fix -Wsign-compare warnings The loop index (i) doesn't need to be size_t as its comparison is signed Modified: stable/11/tests/sys/vm/mmap_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/vm/mmap_test.c ============================================================================== --- stable/11/tests/sys/vm/mmap_test.c Sat Feb 4 16:56:51 2017 (r313232) +++ stable/11/tests/sys/vm/mmap_test.c Sat Feb 4 16:58:06 2017 (r313233) @@ -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-all@freebsd.org Sat Feb 4 17:00:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C819CD07AC; Sat, 4 Feb 2017 17:00: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 123B71598; Sat, 4 Feb 2017 17:00: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 v14H0m4E079623; Sat, 4 Feb 2017 17:00:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H0m1B079621; Sat, 4 Feb 2017 17:00:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041700.v14H0m1B079621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313234 - in stable/10: crypto/openssh secure/usr.sbin/sshd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:00:49 -0000 Author: ngie Date: Sat Feb 4 17:00:47 2017 New Revision: 313234 URL: https://svnweb.freebsd.org/changeset/base/313234 Log: MFC r311585: Conditionalize building libwrap support into sshd Only build libwrap support into sshd if MK_TCP_WRAPPERS != no This will unbreak the build if libwrap has been removed from the system PR: 210141 Modified: stable/10/crypto/openssh/config.h stable/10/secure/usr.sbin/sshd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssh/config.h ============================================================================== --- stable/10/crypto/openssh/config.h Sat Feb 4 16:58:06 2017 (r313233) +++ stable/10/crypto/openssh/config.h Sat Feb 4 17:00:47 2017 (r313234) @@ -1408,7 +1408,7 @@ /* #undef LASTLOG_WRITE_PUTUTXLINE */ /* Define if you want TCP Wrappers support */ -#define LIBWRAP 1 +/* #undef LIBWRAP */ /* Define to whatever link() returns for "not supported" if it doesn't return EOPNOTSUPP. */ Modified: stable/10/secure/usr.sbin/sshd/Makefile ============================================================================== --- stable/10/secure/usr.sbin/sshd/Makefile Sat Feb 4 16:58:06 2017 (r313233) +++ stable/10/secure/usr.sbin/sshd/Makefile Sat Feb 4 17:00:47 2017 (r313234) @@ -25,8 +25,8 @@ MAN= sshd.8 sshd_config.5 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h SRCS+= ssh_namespace.h -DPADD= ${LIBSSH} ${LIBUTIL} ${LIBWRAP} ${LIBPAM} -LDADD= -lssh -lutil -lwrap ${MINUSLPAM} +DPADD= ${LIBSSH} ${LIBUTIL} ${LIBPAM} +LDADD= -lssh -lutil ${MINUSLPAM} USEPRIVATELIB= ssh .if ${MK_LDNS} != "no" @@ -51,6 +51,12 @@ LDADD+= -lgssapi_krb5 -lgssapi -lkrb5 - -lcom_err -lroken -lwind -lheimbase -lheimipcc .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +DPADD+= ${LIBWRAP} +LDADD+= -lwrap +.endif + DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} LDADD+= -lcrypt -lcrypto -lz From owner-svn-src-all@freebsd.org Sat Feb 4 17:01:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAEF7CD09EC; Sat, 4 Feb 2017 17:01: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 95C0619FA; Sat, 4 Feb 2017 17:01: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 v14H1r66081246; Sat, 4 Feb 2017 17:01:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H1rTO081245; Sat, 4 Feb 2017 17:01:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041701.v14H1rTO081245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313235 - stable/11/tests/sys/mac/bsdextended X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:01:54 -0000 Author: ngie Date: Sat Feb 4 17:01:53 2017 New Revision: 313235 URL: https://svnweb.freebsd.org/changeset/base/313235 Log: MFC r312120: Fix warnings - Staticize test_num - Promote i to size_t to deal with -Wsign-compare issues Tested with: clang, gcc, gcc49 Modified: stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/mac/bsdextended/ugidfw_test.c ============================================================================== --- stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 17:00:47 2017 (r313234) +++ stable/11/tests/sys/mac/bsdextended/ugidfw_test.c Sat Feb 4 17:01:53 2017 (r313235) @@ -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-all@freebsd.org Sat Feb 4 17:02:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D1D4CD0B36; Sat, 4 Feb 2017 17:02: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 0C6DD1BF3; Sat, 4 Feb 2017 17:02:55 +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 v14H2tCd083614; Sat, 4 Feb 2017 17:02:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H2tFx083613; Sat, 4 Feb 2017 17:02:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041702.v14H2tFx083613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:02:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313236 - stable/11/tests/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:02:56 -0000 Author: ngie Date: Sat Feb 4 17:02:54 2017 New Revision: 313236 URL: https://svnweb.freebsd.org/changeset/base/313236 Log: MFC r312114: Enable WARNS?= 6 across all of tests/sys Added: stable/11/tests/sys/Makefile.inc - copied unchanged from r312114, head/tests/sys/Makefile.inc Modified: Directory Properties: stable/11/ (props changed) Copied: stable/11/tests/sys/Makefile.inc (from r312114, head/tests/sys/Makefile.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tests/sys/Makefile.inc Sat Feb 4 17:02:54 2017 (r313236, copy of r312114, head/tests/sys/Makefile.inc) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +WARNS?= 6 From owner-svn-src-all@freebsd.org Sat Feb 4 17:06:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DEC1CD0D03; Sat, 4 Feb 2017 17:06: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 05D711E49; Sat, 4 Feb 2017 17:06: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 v14H6qco083860; Sat, 4 Feb 2017 17:06:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H6peL083858; Sat, 4 Feb 2017 17:06:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041706.v14H6peL083858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313237 - stable/11/lib/msun/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:06:53 -0000 Author: ngie Date: Sat Feb 4 17:06:51 2017 New Revision: 313237 URL: https://svnweb.freebsd.org/changeset/base/313237 Log: MFC r303841,r312012,r312213: r303841 (by bdrewery): Revert r298434 which should be fixed by r301287, r301394, and r301403. PR: 208703, 208963 r312012: fmaxmin_test still fails with clang 3.9.x.. bypass the test PR: 208703 r312213: Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check of the clang version This works around breakage on ^/stable/10 when running installworld from a ^/stable/10 host where the test wouldn't be compiled on the first go-around and would be missing when make installworld is run. PR: 208703 Modified: stable/11/lib/msun/tests/Makefile stable/11/lib/msun/tests/fmaxmin_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/tests/Makefile ============================================================================== --- stable/11/lib/msun/tests/Makefile Sat Feb 4 17:02:54 2017 (r313236) +++ stable/11/lib/msun/tests/Makefile Sat Feb 4 17:06:51 2017 (r313237) @@ -52,16 +52,7 @@ TAP_TESTS_C+= ctrig_test 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 -# -# XXX: depending on this compiler version check doesn't work at -# buildworld/installworld time, which results in jenkins failures (bug 208963) -# because the build is run on a 10.x instance, which has an older clang -# compiler. -# -#.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} == 30800) -#TAP_TESTS_C+= fmaxmin_test -#.endif +TAP_TESTS_C+= fmaxmin_test TAP_TESTS_C+= ilogb_test TAP_TESTS_C+= invtrig_test TAP_TESTS_C+= invctrig_test Modified: stable/11/lib/msun/tests/fmaxmin_test.c ============================================================================== --- stable/11/lib/msun/tests/fmaxmin_test.c Sat Feb 4 17:02:54 2017 (r313236) +++ stable/11/lib/msun/tests/fmaxmin_test.c Sat Feb 4 17:06:51 2017 (r313237) @@ -86,6 +86,8 @@ testall_r(long double big, long double s return (ok); } +const char *comment = NULL; + /* * Test all the functions: fmaxf, fmax, fmaxl, fminf, fmin, and fminl, * in all rounding modes and with the arguments in different orders. @@ -107,10 +109,17 @@ testall(int testnum, long double big, lo break; } } - printf("%sok %d - big = %.20Lg, small = %.20Lg\n", - (i == 4) ? "" : "not ", testnum, big, small); + printf("%sok %d - big = %.20Lg, small = %.20Lg%s\n", + (i == 4) ? "" : "not ", testnum, big, small, + comment == NULL ? "" : comment); } +/* Clang 3.8.0+ fails the invariants for testcase 6, 7, 10, and 11. */ +#if defined(__clang__) && \ + (__clang_major__ >= 3 && __clang_minor__ >= 8 && __clang_patchlevel__ >= 0) +#define affected_by_bug_208703 +#endif + int main(int argc, char *argv[]) { @@ -122,15 +131,23 @@ main(int argc, char *argv[]) testall(3, nextafterf(42.0, INFINITY), 42.0); testall(4, -5.0, -5.0); testall(5, -3.0, -4.0); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 6-7 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(6, 1.0, NAN); testall(7, INFINITY, NAN); + comment = NULL; testall(8, INFINITY, 1.0); testall(9, -3.0, -INFINITY); testall(10, 3.0, -INFINITY); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 11-12 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(11, NAN, NAN); /* This test isn't strictly required to work by C99. */ testall(12, 0.0, -0.0); + comment = NULL; return (0); } From owner-svn-src-all@freebsd.org Sat Feb 4 17:08:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A640DCD0DA2; Sat, 4 Feb 2017 17: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 753781FA6; Sat, 4 Feb 2017 17: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 v14H8Lma084033; Sat, 4 Feb 2017 17:08:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H8LDh084032; Sat, 4 Feb 2017 17:08:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041708.v14H8LDh084032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313238 - stable/11/etc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:08:22 -0000 Author: ngie Date: Sat Feb 4 17:08:21 2017 New Revision: 313238 URL: https://svnweb.freebsd.org/changeset/base/313238 Log: MFC r310467: Provide some guidance when dealing with sections and variables contained within them For example, using variables designated for %usm requires uncommenting %usm section header Modified: stable/11/etc/snmpd.config Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/snmpd.config ============================================================================== --- stable/11/etc/snmpd.config Sat Feb 4 17:06:51 2017 (r313237) +++ stable/11/etc/snmpd.config Sat Feb 4 17:08:21 2017 (r313238) @@ -116,6 +116,14 @@ snmpEnableAuthenTraps = 2 # modules # +# Control configuration for the modules in the module specific sections, e.g. +# the "usm" module (begemotSnmpdModulePath."usm") can be controlled in the +# %usm specific section. You must uncomment the section specific header in +# order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)` +# can only be used if %usm is uncommented. +# + +# # Bridge module # This requires the mibII module. # From owner-svn-src-all@freebsd.org Sat Feb 4 17:10:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90479CD0E26; Sat, 4 Feb 2017 17:10: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 6819A132; Sat, 4 Feb 2017 17:10: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 v14HAKQk084221; Sat, 4 Feb 2017 17:10:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HAKDN084216; Sat, 4 Feb 2017 17:10:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041710.v14HAKDN084216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:10:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313239 - in stable/11: share/mk usr.sbin/bsnmpd/modules usr.sbin/bsnmpd/modules/snmp_hostres usr.sbin/bsnmpd/modules/snmp_mibII X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:10:21 -0000 Author: ngie Date: Sat Feb 4 17:10:19 2017 New Revision: 313239 URL: https://svnweb.freebsd.org/changeset/base/313239 Log: MFC r311744,r312328,r312329,r312330: r311744: Document bsd.snmpmod.mk from a high-level r312328: Add a make target (smilint) for running smilint tool against BMIBS Running smilint against MIB definitions is useful in finding functional problems with MIB definitions/descriptions. This is inspired by the smilint targets defined in usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile Document all of the variables that are involved in running the smilint target, as well as all of the prerequisites to running it. r312329: Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328 r312330: Add smilint target to subdir targets so "make smilint" here will run the smilint target in subdirs While here, convert a path that's .CURDIR relative to SRCTOP Modified: stable/11/share/mk/bsd.README stable/11/share/mk/bsd.snmpmod.mk stable/11/usr.sbin/bsnmpd/modules/Makefile stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile stable/11/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.README ============================================================================== --- stable/11/share/mk/bsd.README Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/share/mk/bsd.README Sat Feb 4 17:10:19 2017 (r313239) @@ -410,6 +410,82 @@ 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 implements the following additional targets: + + smilint: + execute smilint on the MIBs defined by BMIBS. + + The net-mgmt/libsmi package must be installed before + executing this target. The net-mgmt/net-snmp package + should be installed as well to reduce false positives + from smilint. + +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. + +LOCALBASE The package root where smilint and the net-snmp + definitions can be found + +MOD The bsnmpd module name. + +SMILINT smilint binary to use with the smilint make target. + +SMILINT_FLAGS flags to pass to smilint. + +SMIPATH A colon-separated directory path where MIBs definitions + can be found. See "SMIPATH" in smi_config for more + details. + +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 Modified: stable/11/share/mk/bsd.snmpmod.mk ============================================================================== --- stable/11/share/mk/bsd.snmpmod.mk Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/share/mk/bsd.snmpmod.mk Sat Feb 4 17:10:19 2017 (r313239) @@ -25,4 +25,18 @@ FILESGROUPS+= BMIBS BMIBSDIR?= ${SHAREDIR}/snmp/mibs .endif +.if !target(smilint) && !empty(BMIBS) +LOCALBASE?= /usr/local + +SMILINT?= ${LOCALBASE}/bin/smilint + +SMIPATH?= ${BMIBSDIR}:${LOCALBASE}/share/snmp/mibs + +SMILINT_FLAGS?= -c /dev/null -l6 -i group-membership + +smilint: ${BMIBS} + SMIPATH=${SMIPATH} ${SMILINT} ${SMILINT_FLAGS} ${.ALLSRC} +.endif +smilint: .PHONY + .include Modified: stable/11/usr.sbin/bsnmpd/modules/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/modules/Makefile Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/usr.sbin/bsnmpd/modules/Makefile Sat Feb 4 17:10:19 2017 (r313239) @@ -2,7 +2,7 @@ .include -.PATH: ${.CURDIR}/../../../contrib/bsnmp/snmpd +.PATH: ${SRCTOP}/contrib/bsnmp/snmpd .if ${MK_ATM} != "no" _snmp_atm= snmp_atm @@ -36,4 +36,6 @@ SUBDIR+=snmp_wlan INCS= snmpmod.h INCSDIR= ${INCLUDEDIR}/bsnmp +SUBDIR_TARGETS+= smilint + .include Modified: stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile Sat Feb 4 17:10:19 2017 (r313239) @@ -75,8 +75,3 @@ LIBADD= kvm devinfo m geom memstat printcap.pico: printcap.c ${CC} ${PICFLAG} -DPIC ${CFLAGS:C/^-W.*//} -c ${.IMPSRC} -o ${.TARGET} - -smilint: .PHONY -smilint: ${BMIBS} - env SMIPATH=.:/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} Modified: stable/11/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Sat Feb 4 17:08:21 2017 (r313238) +++ stable/11/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile Sat Feb 4 17:10:19 2017 (r313239) @@ -21,8 +21,3 @@ INCS= snmp_${MOD}.h BMIBS= BEGEMOT-IP-MIB.txt BEGEMOT-MIB2-MIB.txt .include - -smilint: .PHONY -smilint: ${BMIBS} - env SMIPATH=/usr/share/snmp/mibs:/usr/local/share/snmp/mibs \ - smilint -c /dev/null -l6 -i group-membership ${.ALLSRC} From owner-svn-src-all@freebsd.org Sat Feb 4 17:17:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57673CD00D0; Sat, 4 Feb 2017 17:17: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 17965A93; Sat, 4 Feb 2017 17:17:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14HHe50088309; Sat, 4 Feb 2017 17:17:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HHc4O088295; Sat, 4 Feb 2017 17:17:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041717.v14HHc4O088295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:17:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313240 - in stable/11/lib/libc: . arm/aeabi capability gdtoa gen iconv md posix1e regex/grot resolv stdlib/jemalloc stdtime string sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:17:41 -0000 Author: ngie Date: Sat Feb 4 17:17:38 2017 New Revision: 313240 URL: https://svnweb.freebsd.org/changeset/base/313240 Log: MFC r312332,r312446,r312451: r312332: Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of unnecessarily long relative path .PATH values with make r312446 (by emaste): libc: remove reference to nonexistent lib/locale directory As far as I can tell this was introduced in r72406 and updated in several subsequent revisions, but the lib/locale directory it referenced never existed. r312451: Replace dot-dot relative pathing with SRCTOP-relative paths where possible This reduces build output, need for recalculating paths, and makes it clearer which paths are relative to what areas in the source tree. The change in performance over a locally mounted UFS filesystem was negligible in my testing, but this may more positively impact other filesystems like NFS. LIBC_SRCTOP was left alone so Juniper (and other users) can continue to manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as include Makefiles with custom options. Discussed with: marcel, sjg Modified: stable/11/lib/libc/Makefile stable/11/lib/libc/arm/aeabi/Makefile.inc stable/11/lib/libc/capability/Makefile.inc stable/11/lib/libc/gdtoa/Makefile.inc stable/11/lib/libc/gen/Makefile.inc stable/11/lib/libc/iconv/Makefile.inc stable/11/lib/libc/md/Makefile.inc stable/11/lib/libc/posix1e/Makefile.inc stable/11/lib/libc/regex/grot/Makefile stable/11/lib/libc/resolv/Makefile.inc stable/11/lib/libc/stdlib/jemalloc/Makefile.inc stable/11/lib/libc/stdtime/Makefile.inc stable/11/lib/libc/string/Makefile.inc stable/11/lib/libc/sys/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/Makefile ============================================================================== --- stable/11/lib/libc/Makefile Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/Makefile Sat Feb 4 17:17:38 2017 (r313240) @@ -32,7 +32,7 @@ SHLIB_MAJOR= 7 SHLIB_LDSCRIPT=libc.ldscript SHLIB_LDSCRIPT_LINKS=libxnet.so WARNS?= 2 -CFLAGS+=-I${LIBC_SRCTOP}/include -I${LIBC_SRCTOP}/../../include +CFLAGS+=-I${LIBC_SRCTOP}/include -I${SRCTOP}/include CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH} .if ${MK_NLS} != "no" CFLAGS+=-DNLS Modified: stable/11/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- stable/11/lib/libc/arm/aeabi/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/arm/aeabi/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -21,7 +21,7 @@ SRCS+= aeabi_vfp_double.S \ # libc. This causes issues when other parts of libc call these functions. # We work around this by including these functions in libc but mark them as # hidden so users of libc will not pick up these versions. -.PATH: ${LIBC_SRCTOP}/../../contrib/compiler-rt/lib/builtins/arm +.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/arm SRCS+= aeabi_memcmp.S \ aeabi_memcpy.S \ Modified: stable/11/lib/libc/capability/Makefile.inc ============================================================================== --- stable/11/lib/libc/capability/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/capability/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -1,7 +1,7 @@ # $FreeBSD$ # capability sources -.PATH: ${LIBC_SRCTOP}/../../sys/kern ${LIBC_SRCTOP}/capability +.PATH: ${SRCTOP}/sys/kern ${LIBC_SRCTOP}/capability SRCS+= subr_capability.c Modified: stable/11/lib/libc/gdtoa/Makefile.inc ============================================================================== --- stable/11/lib/libc/gdtoa/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/gdtoa/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -10,11 +10,11 @@ GDTOASRCS+=dmisc.c dtoa.c gdtoa.c gethex SYM_MAPS+=${LIBC_SRCTOP}/gdtoa/Symbol.map -CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/gdtoa +CFLAGS+=-I${SRCTOP}/contrib/gdtoa .for src in ${GDTOASRCS} MISRCS+=gdtoa_${src} CLEANFILES+=gdtoa_${src} -gdtoa_${src}: ${LIBC_SRCTOP}/../../contrib/gdtoa/${src} .NOMETA +gdtoa_${src}: ${SRCTOP}/contrib/gdtoa/${src} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .endfor Modified: stable/11/lib/libc/gen/Makefile.inc ============================================================================== --- stable/11/lib/libc/gen/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/gen/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -150,11 +150,11 @@ SRCS+= fts-compat.c \ unvis-compat.c .endif -.PATH: ${LIBC_SRCTOP}/../../contrib/libc-pwcache +.PATH: ${SRCTOP}/contrib/libc-pwcache SRCS+= pwcache.c pwcache.h -.PATH: ${LIBC_SRCTOP}/../../contrib/libc-vis -CFLAGS+= -I${LIBC_SRCTOP}/../../contrib/libc-vis +.PATH: ${SRCTOP}/contrib/libc-vis +CFLAGS+= -I${SRCTOP}/contrib/libc-vis SRCS+= unvis.c vis.c MISRCS+=modf.c Modified: stable/11/lib/libc/iconv/Makefile.inc ============================================================================== --- stable/11/lib/libc/iconv/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/iconv/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -22,5 +22,5 @@ SRCS+= iconv_compat.c SYM_MAPS+= ${LIBC_SRCTOP}/iconv/Symbol.map .if ${MK_ICONV} == yes -.include "${LIBC_SRCTOP}/../libc_nonshared/Makefile.iconv" +.include "${SRCTOP}/lib/libc_nonshared/Makefile.iconv" .endif Modified: stable/11/lib/libc/md/Makefile.inc ============================================================================== --- stable/11/lib/libc/md/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/md/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -1,5 +1,5 @@ # $FreeBSD$ -.PATH: ${LIBC_SRCTOP}/../libmd +.PATH: ${SRCTOP}/lib/libmd SRCS+= md5c.c Modified: stable/11/lib/libc/posix1e/Makefile.inc ============================================================================== --- stable/11/lib/libc/posix1e/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/posix1e/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -5,7 +5,7 @@ CFLAGS+=-D_ACL_PRIVATE # Copy kern/subr_acl_nfs4.c to the libc object directory. -subr_acl_nfs4.c: ${LIBC_SRCTOP}/../../sys/kern/subr_acl_nfs4.c +subr_acl_nfs4.c: ${SRCTOP}/sys/kern/subr_acl_nfs4.c cat ${.ALLSRC} > ${.TARGET} SRCS+= acl_branding.c \ Modified: stable/11/lib/libc/regex/grot/Makefile ============================================================================== --- stable/11/lib/libc/regex/grot/Makefile Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/regex/grot/Makefile Sat Feb 4 17:17:38 2017 (r313240) @@ -5,7 +5,7 @@ # Do not take -DPOSIX_MISTAKE out. REGCFLAGS isn't important to you (it's # for my use in some special contexts). -PATHS= ${.CURDIR}/.. ${.CURDIR}/../../locale ${.CURDIR}/../../../../include +PATHS= ${LIBC_SRCTOP}/regex ${LIBC_SRCTOP}/locale ${SRCTOP}/include .PATH: ${PATHS} CFLAGS+= -static -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) Modified: stable/11/lib/libc/resolv/Makefile.inc ============================================================================== --- stable/11/lib/libc/resolv/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/resolv/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -9,4 +9,4 @@ SRCS+= herror.c h_errno.c mtctxres.c res SYM_MAPS+= ${LIBC_SRCTOP}/resolv/Symbol.map -CFLAGS+=-I${LIBC_SRCTOP}/../libmd +CFLAGS+=-I${SRCTOP}/lib/libmd Modified: stable/11/lib/libc/stdlib/jemalloc/Makefile.inc ============================================================================== --- stable/11/lib/libc/stdlib/jemalloc/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/stdlib/jemalloc/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -9,18 +9,18 @@ JEMALLOCSRCS:= jemalloc.c arena.c atomic SYM_MAPS+=${LIBC_SRCTOP}/stdlib/jemalloc/Symbol.map -CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/jemalloc/include +CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include .for src in ${JEMALLOCSRCS} MISRCS+=jemalloc_${src} CLEANFILES+=jemalloc_${src} -jemalloc_${src}: ${LIBC_SRCTOP}/../../contrib/jemalloc/src/${src} .NOMETA +jemalloc_${src}: ${SRCTOP}/contrib/jemalloc/src/${src} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .endfor MAN+=jemalloc.3 CLEANFILES+=jemalloc.3 -jemalloc.3: ${LIBC_SRCTOP}/../../contrib/jemalloc/doc/jemalloc.3 .NOMETA +jemalloc.3: ${SRCTOP}/contrib/jemalloc/doc/jemalloc.3 .NOMETA ln -sf ${.ALLSRC} ${.TARGET} MLINKS+= \ Modified: stable/11/lib/libc/stdtime/Makefile.inc ============================================================================== --- stable/11/lib/libc/stdtime/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/stdtime/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -1,15 +1,14 @@ # Makefile.inc,v 1.2 1994/09/13 21:26:01 wollman Exp # $FreeBSD$ -.PATH: ${LIBC_SRCTOP}/stdtime ${LIBC_SRCTOP}/../locale \ - ${LIBC_SRCTOP}/../../contrib/tzcode/stdtime +.PATH: ${LIBC_SRCTOP}/stdtime ${SRCTOP}/contrib/tzcode/stdtime SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c timelocal.c \ time32.c SYM_MAPS+= ${LIBC_SRCTOP}/stdtime/Symbol.map -CFLAGS+= -I${LIBC_SRCTOP}/../../contrib/tzcode/stdtime -I${LIBC_SRCTOP}/stdtime +CFLAGS+= -I${SRCTOP}/contrib/tzcode/stdtime -I${LIBC_SRCTOP}/stdtime CFLAGS.localtime.c= -fwrapv Modified: stable/11/lib/libc/string/Makefile.inc ============================================================================== --- stable/11/lib/libc/string/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/string/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -2,7 +2,7 @@ # $FreeBSD$ .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string ${LIBC_SRCTOP}/string -.PATH: ${LIBC_SRCTOP}/../../sys/libkern +.PATH: ${SRCTOP}/sys/libkern CFLAGS+= -I${LIBC_SRCTOP}/locale Modified: stable/11/lib/libc/sys/Makefile.inc ============================================================================== --- stable/11/lib/libc/sys/Makefile.inc Sat Feb 4 17:10:19 2017 (r313239) +++ stable/11/lib/libc/sys/Makefile.inc Sat Feb 4 17:17:38 2017 (r313240) @@ -6,7 +6,7 @@ # Include the generated makefile containing the *complete* list # of syscall names in MIASM. -.include "${LIBC_SRCTOP}/../../sys/sys/syscall.mk" +.include "${SRCTOP}/sys/sys/syscall.mk" # Include machine dependent definitions. # From owner-svn-src-all@freebsd.org Sat Feb 4 17:18:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49AD5CD019E; Sat, 4 Feb 2017 17:18:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 165AECD2; Sat, 4 Feb 2017 17:18:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14HIoPG088536; Sat, 4 Feb 2017 17:18:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HIolP088535; Sat, 4 Feb 2017 17:18:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041718.v14HIolP088535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313241 - stable/11/contrib/bsnmp/snmp_usm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:18:51 -0000 Author: ngie Date: Sat Feb 4 17:18:49 2017 New Revision: 313241 URL: https://svnweb.freebsd.org/changeset/base/313241 Log: MFC r311394: op_usm_users: don't deref uusers if it's NULL when SETting the value Add an XXX comment to note that the conditional seems suspect given how it's handled elsewhere in the SNMP_OP_SET case. CID: 1008573 Modified: stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c ============================================================================== --- stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c Sat Feb 4 17:17:38 2017 (r313240) +++ stable/11/contrib/bsnmp/snmp_usm/usm_snmp.c Sat Feb 4 17:18:49 2017 (r313241) @@ -169,8 +169,12 @@ op_usm_users(struct snmp_context *ctx, s val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) return (SNMP_ERR_NOSUCHNAME); + /* + * XXX (ngie): need to investigate the MIB to determine how + * this is possible given some of the transitions below. + */ if (community != COMM_INITIALIZE && - uuser->type == StorageType_readOnly) + uuser != NULL && uuser->type == StorageType_readOnly) return (SNMP_ERR_NOT_WRITEABLE); switch (val->var.subs[sub - 1]) { From owner-svn-src-all@freebsd.org Sat Feb 4 17:21:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 794ACCD03CE; Sat, 4 Feb 2017 17:21: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 3926BFE7; Sat, 4 Feb 2017 17:21: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 v14HLIOd089574; Sat, 4 Feb 2017 17:21:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HLHb6089570; Sat, 4 Feb 2017 17:21:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041721.v14HLHb6089570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313242 - in stable/11: . usr.sbin/bsnmpd/tools usr.sbin/bsnmpd/tools/bsnmptools usr.sbin/bsnmpd/tools/libbsnmptools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:21:19 -0000 Author: ngie Date: Sat Feb 4 17:21:17 2017 New Revision: 313242 URL: https://svnweb.freebsd.org/changeset/base/313242 Log: MFC r311174: Make /usr/lib/libbsnmptools.so.0 into an INTERRNALLIB Although it increases the size of the bsnmp{get,set,walk} binaries by four on my [amd64] system, it removes the need for producing .debug files, profiled libraries, and for installing the library itself, reducing the overall size use on disk by the utilities noted previously. Plus, it guards against ABI/API compatibility issues with the library as it's only used internal to the tools themselves. Modified: stable/11/ObsoleteFiles.inc stable/11/usr.sbin/bsnmpd/tools/Makefile stable/11/usr.sbin/bsnmpd/tools/bsnmptools/Makefile stable/11/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Sat Feb 4 17:18:49 2017 (r313241) +++ stable/11/ObsoleteFiles.inc Sat Feb 4 17:21:17 2017 (r313242) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20170103: libbsnmptools.so made into an INTERNALLIB +OLD_FILES+=usr/lib/libbsnmptools.a +OLD_FILES+=usr/lib/libbsnmptools_p.a +OLD_LIBS+=usr/lib/libbsnmptools.so.0 +OLD_LIBS+=usr/lib/libbsnmptools.so # 20170112: sysdecode_getfsstat_flags() renamed to sysdecode_getfsstat_mode() OLD_FILES+=usr/share/man/man3/sysdecode_getfsstat_flags.3.gz # 20161229: Three files from gnop tests consolidated into one Modified: stable/11/usr.sbin/bsnmpd/tools/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/tools/Makefile Sat Feb 4 17:18:49 2017 (r313241) +++ stable/11/usr.sbin/bsnmpd/tools/Makefile Sat Feb 4 17:21:17 2017 (r313242) @@ -4,4 +4,8 @@ SUBDIR= libbsnmptools \ bsnmptools +SUBDIR_DEPEND_bsnmptools= libbsnmptools + +SUBDIR_PARALLEL= + .include Modified: stable/11/usr.sbin/bsnmpd/tools/bsnmptools/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Sat Feb 4 17:18:49 2017 (r313241) +++ stable/11/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Sat Feb 4 17:21:17 2017 (r313242) @@ -8,7 +8,9 @@ PROG= bsnmpget LIBADD= bsnmp bsnmptools -CFLAGS+= -I${.CURDIR}/../libbsnmptools + +CFLAGS+= -I${.CURDIR:H}/libbsnmptools +LDFLAGS+= -L${.OBJDIR:H}/libbsnmptools LINKS= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpwalk LINKS+= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpset Modified: stable/11/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile ============================================================================== --- stable/11/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile Sat Feb 4 17:18:49 2017 (r313241) +++ stable/11/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile Sat Feb 4 17:21:17 2017 (r313242) @@ -5,9 +5,9 @@ .PATH: ${.CURDIR} LIB= bsnmptools -#INTERNALLIB= + SRCS= bsnmpimport.c bsnmpmap.c bsnmptools.c bsnmptc.c -SHLIB_MAJOR= 0 +INTERNALLIB= .include From owner-svn-src-all@freebsd.org Sat Feb 4 17:26:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 307A7CD05D8; Sat, 4 Feb 2017 17:26:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3A3314BE; Sat, 4 Feb 2017 17:26: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 v14HQTec092743; Sat, 4 Feb 2017 17:26:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14HQScO092741; Sat, 4 Feb 2017 17:26:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041726.v14HQScO092741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313243 - in stable/11: crypto/openssh secure/usr.sbin/sshd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:26:30 -0000 Author: ngie Date: Sat Feb 4 17:26:28 2017 New Revision: 313243 URL: https://svnweb.freebsd.org/changeset/base/313243 Log: MFC r311585: Conditionalize building libwrap support into sshd Only build libwrap support into sshd if MK_TCP_WRAPPERS != no This will unbreak the build if libwrap has been removed from the system PR: 210141 Modified: stable/11/crypto/openssh/config.h stable/11/secure/usr.sbin/sshd/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssh/config.h ============================================================================== --- stable/11/crypto/openssh/config.h Sat Feb 4 17:21:17 2017 (r313242) +++ stable/11/crypto/openssh/config.h Sat Feb 4 17:26:28 2017 (r313243) @@ -1408,7 +1408,7 @@ /* #undef LASTLOG_WRITE_PUTUTXLINE */ /* Define if you want TCP Wrappers support */ -#define LIBWRAP 1 +/* #undef LIBWRAP */ /* Define to whatever link() returns for "not supported" if it doesn't return EOPNOTSUPP. */ Modified: stable/11/secure/usr.sbin/sshd/Makefile ============================================================================== --- stable/11/secure/usr.sbin/sshd/Makefile Sat Feb 4 17:21:17 2017 (r313242) +++ stable/11/secure/usr.sbin/sshd/Makefile Sat Feb 4 17:26:28 2017 (r313243) @@ -27,7 +27,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa SRCS+= ssh_namespace.h # pam should always happen before ssh here for static linking -LIBADD= pam ssh util wrap +LIBADD= pam ssh util .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -53,6 +53,11 @@ SRCS+= krb5_config.h LIBADD+= gssapi_krb5 gssapi krb5 .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif + LIBADD+= crypto .if defined(LOCALBASE) From owner-svn-src-all@freebsd.org Sat Feb 4 18:11:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FD0DCCF7B0; Sat, 4 Feb 2017 18:11: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 0DADE140F; Sat, 4 Feb 2017 18:11: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 v14IBn7W012651; Sat, 4 Feb 2017 18:11:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14IBnWu012649; Sat, 4 Feb 2017 18:11:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041811.v14IBnWu012649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 18:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313245 - in vendor/NetBSD/tests/dist: dev/audio fs/vfs kernel lib/libm net/bpf net/if X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 18:11:50 -0000 Author: ngie Date: Sat Feb 4 18:11:48 2017 New Revision: 313245 URL: https://svnweb.freebsd.org/changeset/base/313245 Log: Pull in some minor updates to netbsd-tests from upstream Added: vendor/NetBSD/tests/dist/fs/vfs/t_mtime_otrunc.c (contents, props changed) vendor/NetBSD/tests/dist/fs/vfs/t_rwtoro.c (contents, props changed) Modified: vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue vendor/NetBSD/tests/dist/kernel/t_ptrace_wait.c vendor/NetBSD/tests/dist/lib/libm/t_pow.c vendor/NetBSD/tests/dist/net/bpf/t_bpf.c vendor/NetBSD/tests/dist/net/if/t_ifconfig.sh Modified: vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue ============================================================================== --- vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue Sat Feb 4 18:06:09 2017 (r313244) +++ vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue Sat Feb 4 18:11:48 2017 (r313245) @@ -1,1040 +1,1035 @@ begin 644 t_pad_output.bz2 -M0EIH.3%!629360S39&D`>;SS,K;%2@`2::%N=I -MVR86:*KOO>O99MMM-XP&76N]W/6T=[SW@<[G'3H:Z'K1F?=WON]WO>]S=WN^ -ML]W>^WN[[W;V\VW>[OMN^WW;;3+3/=TK*Y5E4LVE#-E5H:"S530#1IB5LS:V -MJHK6!JVA2M9LR*V:MFUJ55JBM:Q4*EL,5$`50)L6M11:P55:V%+55:U5C!I3 -M1L,BU5-5JV-%F55-5EL;:@5:K+%5:S--;5-;:M5MJVZZ[:V]>[:7NTN>][;> -M[O/MO-M[NYOM]WN^[K69ON\^][WO(Q/N8ZZ![N''=O3VP[V/>RCRX[0VJ7FW -M-FQJ%7-G0R;9MB*N\G'>PTM*5H%``-LF2NKF=-LQFU*50444`446P`&FV06V -MUE17-HDJB[#--!MBC$-1L#;!MF@JALFIM-IE3-30"JH#2D`$`!,F$R83(830 -M--,AD!H&AH`R#$9`:&AHR`Q-`,":8)D8C`3)@FF":8@P"9,$,"&)D#0)@$&D -MD$TPF@`)@```````-`"8`)@"8F$R8`F3$`)@`:&F@),R83":8$Q---,"8"8( -M,:1D#!,H--)2:$$VF##`"#329,1A-!,Q$:F)A-#$-3TT4>F4]">IZ0&U#3:@ -MVC4#`-(/4#3T@#30&@/1/1#0#1D``#$-!HR:-!)I2E$H&3TVPVH\BE/QIHC1 -M3,34T4]IE-I0WD4?IJ33T0`R:&T0`9!IM0&CRC(`!HT&AZ@`&@`````````` -M``TI$#1IHIFU,F`T:F*>"G@$F:3TP"-3T9&"&FT*/3"3R,33)I/":&C(T&(T -M4\T-`GIDR-,$T:GIJ>1B831II/(&D\C4S(::8F)HU-02:E)*!#5/%/>V,B-H -MB&"-#(TF(Q38BFVE3_48AM!-(]4_*GJ:>4>-4V*'IIE/RFIY-3RFU#$S4WJA -MH](](]&H::/1/4:>IZFF:0/2!DVIZAH-J9`>4!H:?.1!_\Q4%G*&;V=R9PT='B<1$&>Y2K7;'1?;`L!0$`X6":FH$!$6!]N]*1& -M`>)4`P7%5$G@V]E5TZFK&($]>M7]W^OSGV?[[OM^+/=V,U7MZH"`7P^J9Y.4XK0O)T]ML=,$]>C2&`+KJIP7B%-.A(A^%=L6PJT7:EU�$"\C_*-.JQ+2^W+*<`+ -M[7C&UXHH9B@ULW[I"-T:`@7%]:`B#,.N],:_+:SN\[:H0"]MG;I((-):D9I@ -MEY+M.9\`=/Z'Y5'G)UUBI`$7\=-,6\WB0M^K1(IGM("()_S^&EB%H$,(T:^: -MUJXAFG+?)LZ=2(B>DJ4`+\#0+:GW.!F9[Y0"67\4D'5N=?C<2IH"`B?%D\H0 -MGG&E/!&")G6)];))G]L??MF>!#;?]*:P<1'/-^\77VA0`%Z]R -ME-$,ZC*8W\V[=O*,`"`LNLU]SC!;I4"KG=/S#X!?7Y]N/BU*2;"=,Y6JXJ7( -M\0$Q,LORY367(RS2IZ5>L>\@(%\(7%0'&&F:-KRF&'2:+-/TMFDH`&<+FRQ] -M2/+>LL58^19Q"!7L,11[)RREOK.2B(B\T[XU`#;W%RR(G[K(5$X17%G>A! -M5%N-\(U<88J#4CQIX2R!95&T"Z:FJFOLXD$6)JV@!^C#B[K7^`23@`L&RH8#R4AD93YM`Q3];.J--PN6QM[K)JH -M(O;C-[U@O)%QFS:U:_'AEV+O+ML-FTP(.3(!E'S>H'.(0@#>MJ$"'FJI*?4K -MJ(^8_>2M:QGP"F_OWH5:].!EVM>UB'TW=R@(I#\VT2P%KT]_6]DV]DSX*:$B -M$\P$5TX-N@FLFP9/6Z#&OW(]F)2R!;.(FW!F6.80[RE%T=?O6H/*`%S(]JQ[ -MR7,>5IA_&NS_C[WLV",$5K/Y3CA9I<=R)5=2;=$"#3;X4$!A3SS<4MFG&3LO -M(C(AK8$A:MCVU5]2F6(!3!"(X/?9Y:@`ZT))M.B\B78]MY1`BX"?4#9]!56Z -M)(%K(4E%,HP1?M]'(C@/O^H")>Y@&LC0T?.?#9A!9W#]194/2$B@/0R$+"9F]7%, -M*1BYC&C`#LQ@*O)X;[/:@Q((+?>_Z#+K*>EX6<1R+?T&:\=DJ!\#0UPA_,^E -MKZ<2Y.D"5H,L:04L5`\;Q^3FH0!$N<-%2!`?/ZS>I:''+V&_V'MP$I)`W;W0 -M<("[Y"-384_['P.#[FK55I#5ZVMM[DH!4-F!?_"G;WQ+<>IO:.A1D`8W/]@0M8>%BW/(+<-&H2+N=9T(HE -M8\PHC>;Y(&31@"8(L>$>5^/YP&:Y@'%$18BM3_NBBG3?7>!ZKL^1-#L?/ -MI`&OUVRZ_+Y/!HD`*"]TF31QJ9YV"1#B\R/?U",@5[-@I;.4&_W%90)LS8U+ -M`,#YI0(2X6ML1-K;[$WRF]A\#Y!IMEPB$/?B%:LF@SS8@#$1(96`NH:/6&-` -M!:=-[T<("%]0_N*VT8X/5G4]+'5W>2@57]UECJP$[[:29VK4&^<0`O3I=VF? -MKR@)6"J[:JVG6:T`(X0_F^G'Y[@#IX#*^6`L@0>X[PUGR@1M8&GY?GK+(:KI -M_U,(@U>K55\YIW+R5A#A_I*4^UE*=FQJ$`;GLX^GP`%VFAMHQLA -MVW-FEG)_<:*\3(P705=2"A.U_T1]?;OU(#\LK5$7LA$\:N3_/7'@3_L2$4!K -MJ6$S1,[?R[77H`%;Q,<;P<]WB#C?6PY9\/V7UF*!4\2`M<&]Z=&$0`^[XVX` -MP>#"!:ZO,V=QZ_BB!8WP5-F0XF%^[*`J8WXH"<]L!5-)?B8P\`,YVUF%`M%7EW:-*$+>N64?@;# -M6+FLFTL@'_E2321+T;G=ZYGMTB0'"&+[8**(!6Z&96X#]H(:2NZ%,2"$GFN, -M1!^?3G/A^`L*^I@/+HZ6G:DLBAZ_E30+MJ_"3C6J2\[8"57T0*Q`"%5OI.Y. -M:BNS&C[E[K4@%]-&1?WDI(=$YDICRZ]&1/M.`*SX?V1W6>I79`5A)E)=C -MC=S#.CUY].X/Z]T\1.%B=8L[(9KD:Y=]^`D`AJ=I:%X(.1-A<7W`!S-]'$IU -M%-,2`BN_0O@K[OJ'6R\VPY5,3$:,BZ"HE]\AB;53X3@H[X^"Q3E2>4%#6-2: -M>^%"&#=/Z`@,;KO?/M\""U$)66_)4NJ?&F2ZTN,QPSL<'S\O.`#\I/;_'\T\ -M\-UI3`?SYZ:\L#\%AH`3:"O?XZN.EK961YEOS49"&]N%ZP3[JVOQ(P=(?G.6 -M@"M:W;)3<$\42B["?O/^=:1F#6]NZ$72@W50#Y79>"J>K0,*`@N)KT"+ -MZ#V_U(:?,N,'9\5&MI`$7^7$@&/KSB6TZC+HW]3$;[NL`N)UQ1FMLA(2OD\, -MU-4^]`5TS)K^W:"%9?8I@#2TGV8,J0KY?V?HZW)%R@*_M:XB%7\[7[?P:+XG -M]Q&X;\NX'>`&K2Z:_Q+0S=C1O(G$9#64P!8K][WE]U4>TJFLWGKV#V18-2@R -M8+PTOK0G!;/I"G/^B\0/-;"WIP@_PRA]#,0B6+V)K?EQ=JK2J^C(DC[`S_#X -MY"3TWE]1\OSVL0(N;%("2?M9ZI%FL[0`%"TQ] -MLWN_%Q7@Q^2]DUETH`>JNY1%N_++1LROZ>56$Q,7?.DD3?D:TBT$%+8?@O=, -MI("V5)HR`5A@RVJDL_?A(029R?[YENFJ2&8AT% -MAH6LF-70$`OWGS?-)?`A8JG!J?%BHFQ9=TR**BD@F:4QF(@.L`,57(WQ!&7* -MGC:=$3`_\4$,7F=+;N-@^ORPA65Q4U)$1_U9=>^G^O)/=\V,['3Z#NE@24'X -M=@U7X)-@E=Q@E'!@5_O2O$2"(_!93W=VB(#"F-EGAUAGK"PI/7HT9!#`D5[Y -M\+'#?L&`?+99C>0W1!!Z[=:J17*V6,CT(^FX5>=WB+G?#?J>A=T@<1CRU($& -M2/KW2SC-%H(8X0R]O``AJ6;Q6%^K*1B208.WI0!J4>@[T4Z6:D(9;.)+M_1- -MD"V&FA!;[J;:O3>;"4Q<%,4Y9Y.."\W*KZ:-!PZ3;$/=\"N4*'#KN#<9_N@B -MQ2=Z3G3EXJ/09W=Q:+STH`I>+,97UO,$WD!()PS]%F:D('H[F.JU@(>YN9OAUH:$_GW-1*(O^MOQS@06;P87 -M:-R?;K+]`04'98(@+A!K949?(_%S,4L9H$=7%`"GS.&9\=+H:;/X_;W^YMH< -M"`NS4-HBV;9?TX0@D-MV//U([Z4A$+WJ^K::^5S2ZJW[N0=5QIYEJ -M=&Z\W[TBD`7-[6J=-74GF61-$`:NXFO.%)=[[['PD6!H:;V/CZ?H.Q@V*Y3) -M(*(U*S_(`/X`@=4A8N1X;%PR]WU'P@+J3H?%;:O%,!M`$NVB]R")87^3W$@Z@#S-W_E3`9X%)L4B] -M6_71C'P<+:@@B2Q8.33:?)*X7!K<\Y@""[>-"CM-^)"A0$'ZQ -MUML"Y6[R\SL]`>$W58Z2ZL/G<&BN`"S?9P>JEF>9LK)Z?`TF2@=J?D?SU%]\ -MW2C2*QY;KIS^#>[A@(M]1Q3>IZ28P$!0&!DN>1#QKZ+6SW.]/5S;\E4CTD_V -MU!):LAW$J=&UU6.(N$C -MLD@@W6RR($]+)$-=IJ=G_\M`\%7E[I+&X(JO-968S9V4N@0@/FM[:` -M_DOHOVK;9]H"`YSN@MDXZ5!^\;IM^0"ZT[=\^+)':SZM<12_B%("*PA+=^-6 -M4X_PN14]E.7-."Q^B5'&6TA[JYMVGDV@!"6IH/Z6JH@=S^?QJF3 -M!%)(6*9O6O[NA.NF%0*E0`7VVG[["W;V*1;OZ\T -MW:K[M91`=CW>?L7]P`2I.^9+5TYAQM`E(0%F$ZV>R`(-RC7H&]XXFP:UY%BC -M`)R"D*N0[730$"U_3>;"DF%<'PC3?1;![F/0$!`7,+9HVZ(Q&0*AY&)ULVCY -M+1$(Q-SG5-O"<=//)P//$5`7SK)KA'4P'#J4"OU;LGD;/`VB,,ES0$FE7$DK=#UHE`B"R(_/."6="48`%=C -MEUSNIQ$$'36Q-I&5Q98XY)(("#_'Q/I0`.M?]'YG8[&O\#T,WD(20@3N/DL_0J^9;`\([->'9A>G7GCX\9E -M0@!M=I66J/(],51@(@0?HS\478WX*Y0T*XJ_O=U@*6WFC3'B"(E.&1'DANP8 -MA"9[NDG#6V]/W#46R."#QGG`O/#C)\[4?2`5H^5G3W+1P5.,(-QBP&W;-.%? -M>-((FRE+9_]=P/6!9$?X[H"/MB#IS`3J?[;1Z39%A=G\K;XFA6OI;)8DN$C" -M7BML%@PI!R4,UBVE3B=_ZKF<0@AH@GWQH836)<,FH8K\Z1<`_]C"$EEWC%^! -M/Y>[K2`I79%TH]PM=ML)@!SW*@GM%S$@J3N28M)R-`A+=E0XY^IL#V`"]FQ+ -M^_4^]%/H2!_ZO.Z:1OO/.8$>DXQ6NJ6@RJ$@&7W`;:(MKWWPFQW;(@(#-U?F -M5&F]RJ`A#+VFVB@-@,'YAF.IL?V!1W3A`*O%]39V9A:^=$086@"=9YY/=SI% -MP.43I]O%5,)TL*VCMQ>K<+1@HN)6`Y+R!4_X_[?Z1FD()>SVM"YCWW&/D(N1E:+:6?SS"^T^ -M>=9VH1@3/V1P?4WZR_1P%2B?BLO6(!4HEY]22&L[0O;91=\SO%,3IA"MH[!B -M%CFMX;((MF&F@-:$#^/NR4^?H#P+/T?`(?"H1O\3JUR+0$3,YUPX/"V!XHN$ -M4I81(I##TI)/`O^DT'P/ALO4[G$M3G3UU0\M=O((04/Q>A^QPA4[V'_/X-$'J#` -MO++H<>8QCBZ$W -M)UR&A$!99;W<4^-+"5>D]I#=H>!H8G2&P7(Q_(!?:3VM_H>=M^AN) -M]$08[0JX/,N;+V:J5'I6(6V.$(:0ZX_O4^QL.>\MF$P#[-^RDL0I]Q%IA\Z7&&FQAHOC`D/9^WQY/_D&5RP';_%[KSXRXR"- -MF8_*GR>O=!,]"!HE3EGA09H#U/^0V%;4=#9/YAX%'X,O\!"!B0Q? -M0.$N*`P//0.Z40@-,IF["EION'/2:'+N!#DP74'%[`W6W$.LT!L1>2LAH-3&4=%D#P&9C[JB -M];D8SD-)BOV;`_Z^+M/#??G`.L6]X+VMQ,0,SZ)HV(7+922%)EYPV/>7YUQJ -M!F5L#3[/:P0.`4%JR2QH)>8$]JHLV*0:[,(?IQ8<-C8[FQCJ78RA5_6X:=%? -ML;9!'+Z7+@8YD,W0.Z!V<.E@:$%BG_<]G3G5ZM]/H,].8:E4@PJ!J(D)H".9OD;4' -M"EQJXO^TH/ZS1L+=5L$%Z]`8O]7IOZY=8C-N1>,Q1=^BFR@T+P:'@C3,3:*. -M3`"L]U%/UP=A9X#@_-05U7IC2>XUP/.GC'>F"Y[4=*YQM^4F*N%V!PAFPKE1 -M6C!"G!@N@+W^R3SZV=E77GWPH-/N38#!++$4!=X:K+&1A2:W][17AS990I0; -M_Y#W\L@\:%VI#A:K9PY?,VY!>'`[-/7_S]GZET(W$\(#P:6IV9-1`H;VP=R? -M$`$G:%9(6N(ABM$"PMCR#P^[&TL]\"<,%S_QL -MQ(0B^P3W;T0R$$,%O,Q.5^I:K:OQNEMR8W^HR9"+KL.A[&]/%$`O)-.G_<7: -MIEO@!2J#72LI4S)[\@T]>'F\[H=F?&BM:7\O0^-ICQSRP&+Y9<=`EM^-,*'X -M?.R(5S.U$/)84-J#B5/5X#K<8L^0]0=L2#DD7]O],#(!9[U@83@F_Q:-[OF*D/&+-'5/=5`+VG)*RF0!&^C -M6JEQSUE0R*U.P`*S^=SAK8%RM=JW9#^Y\7`(?6_56S7G8;R>EHQ[,XHQCI_6 -M:2&_SJDYG\[4`..FZBLFED?N/A(KAL;1^9VFA:LF05>S^-5\:T/A\T.W2`9Z -MCR5SH84"^^CO0=:VV;P.D748UHW-!?N2_1E1I$^UWXVY#??7?O7MSNQE*Y-H -M`P:-/D3G!;1RA!ZK]T"0R3#7TR$X)IH7CXG#@3499,D8:^1/?H!S7?-HM(@Q -M5K9@4,%"4ZEMT/"_\0SAXXEGRN_`)&U1H,4XI9J%((D#1[,AX1TPPPPBAZA& -M!3:"V2`C$8#"*&6;GU'3+`_,_6_`]S@AW#.X23A3AL[JPI?;_?6!8+%_D?YJ -M"=RQ9,"'UT26,!(G^/'S\&#HPY'/H]/]YA#ZW![^Q`)_(&S?W>C!PZDI$S*_ -MUF+Y[5.P1GTK/PX0EJ?`18=(:`&YJA^N]`U#AQ"+T\#6/?[DT&&`FCR7_5SE -M3GT=O`34]-,T2!`[DP:*Y=PT_6.H1]9U[%)JHU=TQC$I`Y;L,@;.$8:7L$%I -MM"XSG]H0%WK:P_]@,2PP)2Z[_1E93+*BL864BUC^]U@OC2?, -M5HK_HTJ(^6Z-<^88P#OK\;*<(OS,[<;O2_HSYBTHY1P_+Q'R&J6YG@G!0OC: -M>\X;HTP3T>WODBO/KV&');,/W9PJI3G"N7[P80""\*]K-:J[PN8WX-`')Z0Q -M--X#0N7R,,".J0^Z!RMW)_]S`QNHH4L"$:\H;!ENOD+(_R]9VD9X/7%Q)JQ[ -MY9[BYU8,+$#4ST5"'!V*CZA;H/`[?D#]_FIH,]/BKM(!O7/T:`3.2LX]F,#- -M[&$7Y@#SAXL^MW08\-[)B=,(V35`ZHLV.H?2C%@DT.Q^0G;L;W8S,YX'S5FQ -M0]`-49S:KL`7G8CO5,>\PM[OA%:@E#8=HV(YA%,P&#W:#`)SIG$0JJYFRR/@ -M(+%6W79$,W]AO<]5W6UR([/ON4,7;95RLCA'%$_H<%;3OAEL?Y*9]>;#3](/ -M-R@-JH$4LK_`R'1W(2^VPAL`8/K@^'`+$>7=IVL\&G3>NVAYP3\X<%:[TM`< -M+"9Y@CBSG?P=]85NZ'DQNQPA!/)PX)?/^[,<+7DFE6(ATIMM]^U008;L8X"W -M[8QF_,%\FX'5WG$,N8?F+;B7G56R`2>UAA`.;N#K#>-B/V":GQTZEP/"@+2& -MM-+T9%?KWB3'YE+;FW'U5"7A(PKWH;VK.F%=ZR -MS(3]Q`&IWIBP]V+H4P=LP3L=6"K5"Q!G2@<(:94)[VKP&H^:!QE?V@6C?E), -MA4_]'=&O[1+0WBN:K)FZG#59EBBC)ZRR15_BZIL0V4+V[VH?0'#+A<$__@*: -M1$AF]*;V'!.;(TG+1/DO!74UZ1,RB[-,9@O7`ZQMR^81(%,/IHK.9)N=HY+J -M37V]PXP0V*+*^_O=>@,TN;S0AFDU#U+)-BRD?9MJ[U>W/BZE9/])=8,]$&EZ -M-Z39$`8='K/B)J?HK#-E2]+<55)7Y&H@J2T:"NY[7`PCXUIG0`QX[;&;C@%; -M;&NIZ^J,7XHX7#2P-7?AB>�K5LYFY=Y -M?>J;Q;S[(`!>@[EW>7(]]!87MS_!V'$>`/2*"7SXXURC&\UN(&G0';=SP@7+ -MVNAG47FKWFQVT\M&VP^@";ZN!DB&`R26G&XEN>YYQSY0TZ!(-B`EO>HF'`86 -M,#9Z;[R_`0AA)_K.`#-#T?P?T.UTGTR5.Y9\QA/20\KYWM?DZ1I*,56:J`?J -M`<%`JBA\SG0%)YC\Y]/C';2K_N94D+)VP-.#6J[.J0D"*&/'$1Z#4\9?C"_#R^!U=*?2B4 -M$O5>N6J@)VM%-A"%>T7Z<[%`W1,_8CPJVZ!]I2H'MGX\859[G^:;[;.ZT@K2 -MXD/QA?6&O;P39*5)-]]-!88S!6L>*9IUY)MRD(OKWQ;C(LFW*,/)LR0&.IS0 -M*BDINQ+[8/GQ$OIDDC.$:;IWCB5CYV4MA6Y_[PU[)W.K'OOG!J605KP./&_@ -M9>_3AG1%CUH("==L#X3WT%UMUM>O>8O<#OH@O#>DK+CV8J]I]Z++#\?\@"3# -M7&*,YQ)VG)<3AKJ..-128TQGSL\E]G]MT*S_L+849W@I1C>-;)FK,/*H7KR -M*W'9T`MJ,UV%J)E-X;(.TQAC=CV63Q[;`TQ;6EC-6^OAH?ZY8X^W%YHPXYOK -MJ(5*.U*W0]@^VE4!(N%D;#CC&>YZ^\K[=.QZ/N-%]TS/3O=.$KLF<=V7_@8D -MHVW1N<_W4^R#N&+6H:W2S0Q&@,=)Z,/G9'J=O#[2:X"KS4 *4E+FJA=+MIBA.]H>Q78=?8#9:.G@*9W:JJLW@HI>6Y-:[VB4+=@Q!O_T -M+^?.I*GUM.AGE44K_[PI*NZJ?YG3[DQE+;!QH$J:`F&I85,[_J>UR$]Y]_I" -MK)#L[22+9XSI4+CC[9*R]'64IG+*KR`;=.Z@-L4Q/O:%,3V%7LE%ZIN\$_.* -MP$987+OB2FN'*F\M11A6MHY1E(\4D2Q#D%*M1\WXSIE=;*?9F(IYT@BI`M;J -MNBC-P7<#+SYY$?:&(Q/G>KJQ\YFKXWW -M-2QBHGCI#\_Z"C;C2F;(0AX=:D/T[3!P -MI`RQ@#5U=#2]%(&<_6$$_"-&P-D9]??T^\>AAG.&@009*9,DAU:7U#7-GS.' -M*,*!ECV-23)VX_1Z/B2_,G,]"D@5?7P^_8<@@Z7 -MF'?9XZ6-B]O:`*R;E1.X09Z#%H="PVY^^%3V8'!+@[^L%Z'D3&DV-TR -MFN"DMW,-!*[?E')VOE]F>QWJ(A8L/M8+YZ<[KPVC8&7>"7QC#%NYJ.S,6C_T -M-@_IZ6L9^@>G\N*69H*7-C3#1>G7:]J'0,*RPG7S2<%$P;,:#3$K_',B;KIZ -MSXKNY@.[6\S:F"CV1;.5!DPVKB<(UB:]*WR9AL!_2_HG[SZJ.T_!NSEW/$>! -M@O%K:V5/"!V&RTS?S^7YG+-?W4;LU\A"F04VLZ1Q!@8,9?1&+%T/K-K+\.YO -M';3N&L19V=E=\CB<'`0]I'&==V-<_L<+@ENI+=&QR?OF9:_&OEDL.^U@UII< -MZX6RLGR&GS/8THS3VLF;@^@B3U%!/QDMP>GU6`HMCRX`C\,[(Q\ -M@0%&)S2>O$Z9H/7A0@*%^XUITX;\A1`KPKDO<6/Z,\PCEM(BC-884!CC8HM) -MF=3146A@FSQ@F=<)^_*J3W8>!#NO7?.T\&D#)_9W.5\[`*)Z]I)*G\9I(P:U -M@I"4D8JJJ'OT@?I&8^6(=28]6\HNX8$I&&YF3 -M#L#OXN;7LJ`2/!&SDLZ(O5Q_5&*.Y$*FK#:9XQQ?)!?Y!,&CT2=^,HFS1G]: -MPN.WO7,A!3)$*G4#^YNOJR8'Z"+T"J'(Y0-]'XUPJA@YM>>C!L,>NE'1S]*# -MAKO>,3+%V9K>L#BU.W;)-\BV]74>NU\SE422.BPFD&\VN#BM&<,6?0$S2&+T -MW]7@6U%Y$^]M.P'_MMDGHW'F3[+0<%!C<]8!*31_W\--]';+?ZN=6U6XG7'L -M6Q+(UV2OW3G<:O"7P0MI=BGUEJQ#UVL?+A995B40&\&@$M&#I:C&EH`\]^!S -M8,,5$QEJ?/8NL<0K]&F&;BSOK1.X]L_HOOUE)8;YF+\S'Q5S`U2DEM%B[A5] -MT*`UM3&Q[BV77-G;(8KL^<3:0\$!`B@@2S%RH>QY:"L@$HN8;\):5)UN6*SJ -M4G1AOW9J++H*\.;=PM)^E'%VAA;PX$G'_#5O4^T#BHY&\AK+_92,K777?5!8 -MR&YA<51GK$?5I<]H;30:ZPPL+%PKO7ODJ4NYZQKSK%@[&,J=(OS.=NKG%<8F -M7U^NFS]-&;2+S^R@=DQ&,-='/FH^4R[JXD.52=G*4X'"/^O^\_@'Z?[#$^4_ -M*:2GZEA\J*J"2%$MH,(?F2?^J*463X2'FH&F\OT(A\J6/@3M/E>?91+.U>UY -M':#DQ]1O^?//&`6!F<`/#M&2X#MI9<4G:9)1R'.,9EU.,WG:_?,WJZH-K%=H -MNUL]B1!8ST=)^)J:N9N=^JJ.U.IW-2U/(R -MWEA5-[O-YQ`\BDI=4)3VRASN)S_;M@;9A3;7=UT]NG -M+Z[I4\NG40>U>!4_+;-$;9]^4I]?J1W*)7HWJ]X431VG$X'>T\.]Z%'73#F'= -M\+IW)V:S-N-MI:`K)]=A;K@;D#N)0K-RH5Z,\0N+,1YL.'&=5Z=QKF!>G7MN -MP_CJH79C-W_7>1JF>`6J>XPY"ZAB8\"J>/2>B'HR>B",/D(3X1]TDUFR(18!]L`OVC2,8B0]J -MQ?1%$\"CW#)MOQL`,[H]YZ/5\9.58>E`/=0W&PLL[:D]/&NCG*/$9WEB.63# -MG4,ZXCF2EYQEE=1P[9J+D!24HTMQ5?P3J1`&;-R;YZDZ:;XSNB,Z_AE'5\=M -MO_?)W9V+YIZ=LD'S#5TE_`QX,[2.C2)7I)V"9F6674*J89HTKQF7:%1J`&=R -M=0E):BI7,U^#R&M02/K5]QE;?)\\/S<[?N+,R]Z9UV]BW")?Z5W_U2WEMRY3 -MY)3Z>H5`V7\5E):H#U[Z17"1ZW[@38>KC\RV75A(A21Q!TVQ4N[G(YU$H)./ -MG*:"=GUPVKV5+1+V??9_"17,E9L>^S.GD1*;&$:'A<@Y)+(654C@ZR -M_U"SG(2TF9^;EA2P#.V-_ZJC$V5PE/M-EIY_6I4V&$N8/([%`C.&W[BJ\[4[ -M=_;>H;I\_R4O^)`N-$L'WXRK)K84< -M&/WZ$ON<:V&ZDJ7B]D[2?[0ZJWB12F"=#'/#/%H!7-42(#,'E=8'R"+>VT\* -M11-):53)F$*Q4)454&*EJ'ER#G!4C.VS,/5NQY.L$I0$D99I3C7+4Y4T.*VC -MFKFF,_&S0CA<`7!CQP%0+(*J&_/=V58(![P01B23`3Y[`XA^ZH4" -M$\!.F!'@'(R\5?FAFHZUKS"",#APY>A&^M\T;\Q)U^\71U1^\U!J8NHD?YE= -M6:=%?L2P/%9U_\>'1&0?JNM+D+[0_8$P.;GEFDEYO)9?E1QIS?([>FCD(>U7DO*-5?3(_]?\^C$`OQ"4SWG7/^)3 -MJ,2\KBKG>H@#B_Y$9R>49,K^1_A/7B1"MTW&!BH6N5_RG$M8@6PK7*B)JU6$ -MD1.SSE\\&P")E#IAR59+U.;ZX3K[,Q]+29>45>#`E$Q<4O>N>=X-0_-4B%*< -MG9\PW@0YAV[%,M2Y]>I40C!EVJ;H8&OKZ\43D#YHVO.,15X,8Q@5>_FH#QWL -MM%Q23`#!8P"GXE#W.*%]#&(3$^_5U'N@8@>%B?$>8&!'?70')C&1&'5[EF=; -M"[@M3IU_K3F6Z-'_!2+SC0?L5K&.J?1C1T=,YD^&+&?%K4\W_: -MV]+LM_T3'&@UX?,975H)WBA!&>-C)1*R\-N_$1OU!YZ;`<:*$9A23T/^DXMI -MSHBHF.AXALIVVFQ$$39-S1Y5B19.KZ&6"91#_^CYB&E;V5S4BNK#;E%M-GEWK)S.;)!QT9`6>V;59[F9I17'5]56"L/N?S_QNGZ6_&E1`U3XS1 -M$?C6L5!0AB82X&LC4DF((*DGS__?V*?32_$?8^F/JWZ3ZA_2?&^^=I_H8)T- -M;)X;/R6:%FFF-UE?HY,.\K7^B'L-Q\YI.JL]>OP!?HL2U7))C-\XDE#^8R.L -M`3!O/`;5JPR?N):V_[&BH3AZ&GCDY[;#I\\U?5N?*#.1]@B=-NI+MBLG; -M2-=DA72[K4NO!O^RL.L8_Q+EP8*$4S&V*[^W9,W?RF.R.<[O[>%T -MMTNP3*[&EWEE1HK],U,8>WBVU*?RIY_^*=E^Q1J![C6L.KR3<:RCUIR,P& -M*./;G"OU6+H4"'9^MU9T+$0"'O#1T250J*7,Y>XM=H%,V=ZM+DP<+2+MQUD= -M+Z[(.8F7?ZD_U?:M(_QZ#&@V#FUN27XM:J[0S$M(3X3KI^!S5^)8BIR>SRO5 -M03_W/V=I;_!7EL>L\O4X].]R:VK]>.3Y71'E`'G]$#6Z*E#'7Q>QC!B?+I\0 -M]8%#X@5GQ`8,A[)%5!1@'Q(.+*_$M)*(Q9/\#)[7XV'M,GS8L]_@^74..E)8 -MC%+!&(.NPI3G`VH#-A4U`$4QQODU]-]=_%]]]I)=65.1W[#)Q:%$E4/_?+W1 -MJ/2(591#`U1B6PS2WZ\ -M3KQBC`Z\3KLIB@E,A'_ZUX+0E51&!$KUO??&70LJZM*#WG%AB"PJ;%DA^/B^AK5WJ9G>/>Y92TS@^_\+P.Q.W4H#K]=@J=M!8PBC`>/[OKZ7@PU.=@6G9P#9A@H?N=R'4;OUI]*--R$ -M^QCC0K]".78^3M:(>I]K(ZFG8D<1!LK>NMR7YA#Q1>'YC4B>$,*DV[&F -M3="[\K=SM.Z=-:26I@ME67XJ@IU<^E/T[W578(WS\KL-[G1=MU%3D5`0JV_K -MJW?)ECVU'P5W?:^>QR>9\/^]WL?'YOL8C>HYSWR)-76D\?U]ZR+VV51NW5 -M2W3?A(\VM^OR'D_?6SZZ>V:\K*R^D5TYMEHZ'$O>:"/;O7O"-!3X5\75%\3; -M\R^55##>!1!JW@PL*"\JHHD.7(V5(3!9*6EB?AR%`YB%3DX:I[KJ\3V7%F9 -M[4R'2_.XU#Z6<:$(J#NQY[J]7D4ME0K>!->H;NN+QET"'-CT,>41/*%M -M\EJP/1A@LL8HPA0\M*=M)/*HL8R%%\L4/'N'Y_W?Q?DX^M^@\?V/^>S]2M/^ -M5('7UH43YAK'&C\IK_5,GY9ZL*7\Z\ZA34=NO3JLS*B8F)B6IID1U%)(9U%1 -M,V&5X_J%2;LD^['7T<)P@=84LWJ["X%58BFQ@#X&"%0H.`K*2?+ZH5'4V0]* -M+'595;2J"D@4K2J*B<"$_G,*(H:G,/;#XO.5CQY_"7R\J!$ -M#!UAE@0?>SV8KTH]NKB/'#JP0GK\_^VF$TCF+QT;%><8EWI=+8ATM/0_ZT)U -MKXH[:AMN3]/;]7-FY_'H:.C-H;)7!@3/;)2\0+J!+H'HTL)Y8#/*T60/F`8P -M#M34'C\IY4\MFK4&]644U:'0FFM=:89IE#4-P':R4OE_)767%M#W?^2;TE[G -MK$Y?=NG]Z6;.)_X9SIX2?DJDYW1:XDV<]HZ&A/GT&O9^\XU-[<#T[K]?QQU^ -MNCOE1*IP_0X=D@GKC:4/3/`13TP5%MD/3#T[8B*0*1&&,"$"#$8B?P($B@!` -M92`%?.>U]//U#\&CJ5M;\1W_9BP1^9M%W.(OBCW+!722E4!#8G:E%9)2;4*B -MFHI2F=4E9%4*C4YXE1-JYQ7554]B$2F^Y0S*0H9B9H^,\9XIXY'QM)12*2>- -M%C)/'(L$45(&S!LJF!RE#Q?S]^6;^^=GLO9GG6><\H\?@\X]?\OZW_O@MN7R -M^R;_/`C7LCDC_<,/-.5DQR5(K)TZ*8Q^4K^SF6EH@6M,)AW7'>7,4M+O)@\I -MY3R]VWRH."(J>BA&"(^6R1D&*G+9!D5FPTL)RYO"[X;^_X1RPY1O?M#P/F?G -M>_[S_3[>B=?H_3C#]G.[ZUVE^[S'S/*-;5T2HK+"!26$B965UA6D5@UTZ.-. -MX'W(`YR;P7?.P[*8MD:RUHJPG?`4BD#O@,$-Y@";SQX\#$1X$&\2`_XP<*AQ -M'A9'0:T.-[R^ZE4?RW9PULTP3\I0>_IUAT:=DF6U=5W2PL!7D5@R.BD5135U -M9RBUR>U*TN1;J8&=',\8YU=01XF,Y$Y"G(!$G(%7!5$G()QV4"(@'((B(SD, -M`10Y%%:4"SD,ZJ1UO<]]7XE)Q05/`'S/@[!.Q(7P'9BP,0$ -MB*C`-01B/F/'@<8$`XD#YYP.(.).`!.)$'%0Y=>2DOWN?5R=GL=?X/P^;?[& -M?Z%@J*R1CV@TIEI*IIT"1(B3)FX-Q7T>*2/W\W[Q]QK>3N\?DKE9?_6:<[C=MG<7.\FV]O7,_5ZU"74`U)%E%=E<<> -MNP%*Z,`8:D.R`B(R3L`8*(L)V1[]I;";SS@0/GS`CX?KGZSJX3CF&VC$'IZ<=-$W)#ID' -M%*,DP$1('3`0W65(%*S+I@GO:AA]/JGSQ?4GF4[V]K;#@TZ.2E09\O+A2UZ% -M2:$62Q=N''J0GSZFJ)7I41(TY]\?"2`,X,SDT,Z='-99@55@=$!0#4`Q(I)T -M0$42((2D8@4*D"".,$I<7Q'>'5'+'L?.NY#X7SO-6A_KZ'Q5Q?A\8 -MYEWNNZX.Z'CBE(HDIJHDTS5D$[18&9D@`21'2$ZGMZBA.N3J=6*BI)VB#&2= -M8J6AVE"3`:P44SS%-7XS,'Q/35_O][^OW9FYOF9F5-9W/F=B3Z81B$/I3B5" -M!JF<6]IE!+R")8R3,$1BA+R*<:RP+%*9`SR*9V0<[%0YA6@T<#P56NZQU-?[ -M.GL?(7V$S[S/RO:Y?TPRYO[?I)NL-IHB8LL@8D5[5`8;S -MJ/$?(_^_@OM'X1_I^S[J9_B)GP9ARB+WN.+T#%])3%/H11$$8!1>5]'G7P%0 -M$@/R,$PPB2,04`\R?Y63Q8I#FYJ%)0)A!!3%$!C)&QL$;(Q[7K?6_%_J4?*] -M\&?!THIK2S,UP-W)KH9%TV`F;;0V$&,`I%-*4`I%#X?^RF$`VQ19#:&&YVB( -MR;1=GN'':NUV:;2,?T'-BXKZ?^>0;0K[,S*YN[[`3=T6>_S1W-+>-.,4XU@( -M2DA+"!8PI"6`,5D-$-#0D*DSZ*JEA?H4T'@?'ZY[3D\?]*SXA6'$G,-WV/?7 -M)R26Y*+C((8(H&2,23.`L,TE$%@%D.]I@PQD"BDHA<"E7`C@.JZCJCE[!'3N -M7!<'3V;U304:PX6'/'UWNMVW.+HZ?,H;CP[N@=U.W=R*FY0Z";MV,&+8&)'= -MC`%(@Q0#S)#@Q0FZ&Z=&X$W;J4W8W,8(QW,(-/#'2C'F7_F?OG^;Z,F239\K -M+JVI))!4J@T@0#5J`K#J#!TITI2=4!0PRKAG:=6H@(`BLD-X;XHL-_>.KK\/ -MU)^-]3B]CZ#RXO)C7R)EQY''DJ8'&6&*<>5!RM[=I#``P1BH$U23)"JR%F+3 -M)`3C9K$P?`?>?YS_PK'O?52^U"JSGRZ4L4`?AAA8(5?"@0A49"D!$!!0YI, -M/M\6`8`YJ59#5`2TAB#4LAS/T=4+4JBI3B0Z3=TR].!%%#I)4.C$LW$:ZL0#I`6*2:4@@PFL/#)6?0QT9] -M[6=WZW('^3W^3FV]+IDCC(51!5@?@-6`0`0/92I?>)2I*A%(8`%`8J!F(7H5-)HA8"F:J-*B -M@,&"^7R^\O+\RGXI;SN=YG&Y^J8C%BLX\!KJ:[18%`8Q83B(1=:2H2@+B2HL -M0"HI#$8@Q&$TN)O'=_=\;V78/B\.FF?H["OHMNW -M;MMJS8;`V$B1)-A(QMI)L@B(,)LE2&@LV"S9-'9,>34)7>-S-V=I_:[S?M>C -M\OM?%P]C#4X5MX=E=8U:H*&J"13!.L:JH*H=0JR=00WR`Q"=4#:J&,4628)U -M")TQ(S?U8O4>HUITG3N[/G.#LX.$0M)PCPV,X8*3AD'SF@<)$49#A(JPX8<" -M`]NV]U<7#P4Z9@N,8JG%Q);.'B3A:K#B)@(L!$(< -M4`4!&!Q(09!96Q(<0<3*K`H-M8<)QYA#FQ\/1<04H"QG?D.N>'T^][W -M^)V/,/E'$,/>;NQ3KHFN.LVFXW4-VXW&X,,^:W0E0W2+)4A@DPR&Z;DHDH"P -MW!NYIR'SG>]#BX3SNY[@IYQYPGVN;G"*O@W-6U5'3#P>+HVXE"S;5:);2;`VPVMU6&" -M0VR.VPVLL@L\MJ(3`;:63;W:S4=W4?,X*88SQHWV4%')[)PCA=73-HPHX=/" -MZ?J,(!44DTY#U6G4+)@LLD&"L0-,FDP1TVI4X6F;6$1PF?1\'_]X?P>Y\?J= -M/Q'=R[^^90R$RY4B9%,L+$#*112,3"$^;@*:`&@"Z`NAGIHII,>?NC\/C^#E -MET''T=SBG&'$!QR+#4T8%@HLG&V#`*"@H&%JIAF'"JDTS"\+3>5IZQV*.EP> -M4<0MD%4)?(4P"AA+Y!S5"\:35LAJLP -M!>WE&D7]HB9CH'-YN74W=BTR,@^)")UN@Z:*0TU9WK-F>S #%LU0!$V#") -M(B$-@9LLQ0-D48DV;'ME(Z"7`Z*LC^K`.7JPUN@L>W6Y8VXWX4$+KY?4OHPA -M'D`*(&8A@0*6(+`,Q+&6)8D#,"Y@S/JKZL#X84?#I>#SSVN_:EF2BB*(-$4J -M;;%4-D$$&&:9R@LSF;4K(R+(*C"9P-25@9)+DH5)35%(7)DEMK=;;R"V[9V\ -MV*RL2'(@R&1:0Y`#6E0EA%J`:IER8Q+@7HRZ.CQ -M`X#@AP+.`X`[A%(I#@(+.!A1"4.!(482G`R<%CLN,&-O5Q;S$&_;O -MG,WN9;CXMYQC.)D9YMUN:FWY/OL.FF_APFSR!YJ.V6VQ86VU518I:$Q45`*`+:H -M"H18@BD,9,:6RC;93C*;"ZG:W]OB[&R=YT?7[?V#SNQL9LQ>,OU:S5F#,&:J -M*#5@9DF:2*!F@"A,TFJA%S4F;5U5.?O;18]'I]WN=W=B;;;=BZ7-Q=<"PN@" -M(8$)=)%N0&`7(,I!;BZZ1@**C=E&W-MP8*[PK5N[K8._V7ZIBA;?@54@$*HJ -M0@F$"@IG@+)>@(19*HI9#/(L!B`0H(%4E`H2$&%0215$1A+CNS4W\F+'P>]> -MU'7W@\'L]FPQ2DP(FPBPV$FP`1)L:K(%(I%`U(*IJ:E4U-0U#*<7:-KF'P_` -M\0Z1T.AO8]2LAW]FP[_F+ML=NQVM*K#;)L9J2;2&Q-KB(':A%6$1$M(8@I#: -MJAVE)M=NW%QC3R.P[WI^+DY.3(UIDVH:SCXZ:\8M7C+27CQ36@DPUEA-:'"S -MM)J%9-4%FM"MM(4(:33`Q&'$X>,.C?+76YG&/E_@>VXN7+K,R!DUDMRN5L0H -M&AR,#1-22D%%"2(DF@02M(:@&,F8::6K*&?1H:7O!R^\3.^KN]\?!-_NGO\H -MLPEK:VA:%J*`DM8%*(2C&DM5F(D"D,=JUPJ!0&TO(V5Y*[TB"YZ`M"`/R/R60(!`820J/D)M>:.W%MW&V6%P7<*ZHEU2@*A%)<$BPN`6Y%` -M$$$@H)JFB0TBI4!*417<;-2JQ7'7*CF*WM[7!+++@KX-_2/5Z3U^`WS=OF^% -M`63>3I0F]PA+#>P4*)"R,2&H%WUM$-Z8E4W[YTG@ZK>;/S/Z6_=V#?Y60RW< -M?4W>1<270B@72`H7$+A"((@U06F,PG%.KL^J['<]R:'U&@-!ZE70%06/J+*J -MB0[D$8L1`P0AW"=Q(49"QY[`9P8L*//7@YN+G\FO[MX-#/3CXQUVX[E[I\_!JIA%("`LEZJ%^>+G=JL^7I9MKD^)ENZ&[LC= -M26VX\0ACH$06&,BP%DR(&2*1DR061F6+*Q3&1@'7BTV2TV=FPV+ -M1\%U#J*Z*[^OE$*,@Z>'L?5[/7C'!>IZE010QTMDD,!(I*JBD-S64W+#HW8P -M%DE0P!AFYA$)N8544H`UV"&LZ[14=PX865?P^9?SN#>Z8I;QK;MS)F -M"N"F95+99,[9+(*3,DF<)4R64%0469%#(7!=MUN97*5@W#K=#+73U>KR_+_$ -M];S^?LZ-&?GV:VC6UBHZU)K2:R1@YZ*36`UF00%U(2C`H0Z$*DL1%)T3H;;$ -M7G._HUJ2M'!P>%YENT;NW5IERY,EQD,BY$%R3(B0,CD:P&`YV!,$6$L%,Q?8[IM[7/]CO\GDFK?Q.A9FSCG0M3/FS1'U?V_9Z7:^LZ'@9!6QI;K6Y: -MLE0520)!()$D((`I$P];!0U,DH2'7"*2M9`[0**#U2=<[3U^EZ7D\G3O3YCR -MY9>+(USAXSC*IQ/&%(LX(*063CA[9EM4EMD&0X[:K`2+%XV$#3G:-?2[@Z80\"#%-D%AM2,!=+8%(*;6 -MH4!$V@B<7535,SR6^KS8W=!7=^R\C#Q3C5=CT[2K32LJTM):T(=K)%EB"22T -M!8"P+8*H6B*A;9;I60*QVS';Q>-TJW#P#Q/6&R4%! -M2<QAY=KK]CT^;Z/W1[_X?) -MHZ6Z.AG.72FD,$-"(PT0C"+-&+4EA&(&@+!3"32:(AI;=#0T>3E?==\ZGR[? -MA7?V3+J#$R:F295LHI"Z"@HC)E`4,TE8&@3#%K`J.FB)H6!- -M-5MTS;VW9LFT4NOHUXFT>5O]W?CN6W&;5MR71EJ5+B199!9+DIA*@+%+F`PB -MA<%PXJ"KK<&.[:K(59RKNZ/$Y'(,G/XG%Z=KMJ,V&CH:&,8#!HS29H3225(# -M,THU*P*`NCIC!3,\MKEVIJ%:F7+E$\.[J'J -M-YH;-DTQ39IJ4V!*`[*3)DE"2M8%D-C(NR@,N>-A7>5VHGC\/N6[3U?A9[M' -MT)X.0U\>NNO!R)9S2W3?GLFP-C$--$@;&1D58-L$"960U`E299J+%#B'$-O*V'&G'KI@ACMXQ),$!9,3C<3`4!(LF*63%7%H.+: -M0ZSAV<1OZN.KKJZS6S70X]=5)8:TK)0BG$U`FL#"5#6)#N!;22 -MNH;&\3QE$UFTR[J<_=X]-?M[9PG$\1Q3A9Q2SAXJ*1%DK(,A\Q98"PE`4.)# -MB8,%.YCAQQ%'BEO:.'3R5O,>3C^0>5Y.^\Z.A\43O-I8KJ3O3[. -MG?'MX/>_#\X\T/-`\T?-IAPPP",\U&`I)YI'53V[A@%`$S@G&`SCG`L*A?50HA"^!20+V\*9FO? -M@??6-&`,AAUT(AWN=DYCCH=E>$K@!!)<#S%#H#H*&E:1`V6HA4(@(A)LA.5) -M-@1U)BA0ZF4C@=!+0;/)F3E%R.)R(B3)C".5@(19#4 -M0RAK:Y5JAE8:A4(50)P$$^"<34H[M/I=Y"R+I/6]YR -M?-\4Z^2\.OCA;:3B8DX^*DL!2!\N"BDX`Z>4C)RD!A0%=*WIB8=,8A@O]OP& -M.,SUU1#1BGK08)FGHKM"V"DM)C9*82T)%@=J1<"L@@E*`H@3Q"U0AA6$V,&K -M2Q]O+8@3E0+)M8(XHLH2OF$B$1E)D*ASAS@*$YN>R,F.>P#4!4!0$.=B<]0\ -M'90IJQNQ3<[NSG?+NW>EIGU\NLKDG)D:U!89`:T)A)D3#!9(D4U6S#)E%->4 -MRM*9996]KC,CJZS+T#;Z'=RUNOAUZ^[52S*M!CKRP(2=LD,,(D63)BU@6"<% -M`82*!H">9P>&D=FW);ZG5\;)S;//%VS=$`Y4,4-81"*(@1*1SU"JG.\Z!8%$ -M@L%(,#GPXP!4("B$@")2!#$"I`6M&D:U!%2@Y]*ET-W#>VZ5J%\/O^#;7:[3 -M:&U@R*38R(0VB#)4VS:@[5`4!5=5Y2'@+3MI2MK738AYF[=KMB=(1GT$GT"$ -MG@G#C$*0R*$ULF`J`I$FL>/A,)IJJ3Y\,!,*4*%&MJ;_=7(&[AN -M2@2W'@^7PKKX)0H'B'X%(4R%`3-)#,&IJ$U"RM3-FU;"K.'@U.=T^\ZW1QF' -M3PF$4TTPE1285=-L9"P`PC2!*`1TQBP8*+#2CIE"85KA5I\+6-WA<%>-XVT: -MF'A8<,:#"89A2+!`PB19!A%@I,)#2*3@9R@,14G#3$Y70P2J1++;W[&*ICK4 -M6@:`*2**+0A:TRXL8PI+D4&%S(H#`+:J0N&DP,L9!)%DP%K:RZ68++"Q2[2T -M2W15Q='4RMJKT.#HCMUX;>$85A$,0-R,"4B.E218J2$4@01&2`W*$4W)$G1N -MH3%I!"88,4-U3=T(IK)0J7P_,<=!KNUEKUQ`+NON6!8YO=]J$6=F[ -M=><>5XTIA=HP8&UBD$21@;4A&!M9*@*@<((NE2CR/@O91+ZZH>U0^[=L[[UY -MJPTW8U[-<6'WMH(FT(;0-J0ML!(H;=MA8"BS;JHF4WS)EU*W^AUNIQ.O<8C" -M;V+>JRK`V"L=6QP5@3`$Y&,!UF+@AR0-0@5)0,D.1(4B@HD,,E"B)&DUFV]9 -MDNL+@Q&H([I:#=%)[2-L50V6P!E0F=L4!0LF8RVDY&2@%%Y3EN9N!IQI%+E& -MBG.UZ^OT.&H[P:NKRN4+0BE,,4:K"(B1$!$JDA9)SI&0YTA&$?<\^"525I:D -MYL&+B)$]!++#6V;0CR/.--$4:%$UE::1HD(TQ0%"--*C"&%)I,)4(8$(R!OO>CV>\.IZO)I-$'/2C8&C"I2& -M@)HR4`MLBDJ10B0-#,-#/E'+R?2?1:^K7EEN-W3>DY,N2.+AR)#(AQY9 -M^7WO3Z)X=Y;=YOW[T(].^H4FY@DG2[V`LC(;TA$F$I:"*;T97?.># -MTUZ-V[U+=&&JVXW;&!W4P/K,>#QUGV!0I?1]'T?(*%]'R"`'Q4B$T=HCMI*( -M#(*3NF%D=4\,/=">3R9Z?;^SW>S/EUAQAPG`\4XJ)PZN+$L"H09)CZ2J&Q@" -MD*)IL,,PH)IX>'P\8O#MUWQ^CWW%Q'$.0Y^@^+MUAPG$<4XD0XI#B& -M2,#B8%0BH!ID(`43301H-,%#.5=/2&CIQY:RSL->Q8M0B%(6J$M+;J*A<8L% -MDL`7`W,9+FE0E0ERU4QL@6`=LG;(%!
&1$,4R/;TW5?@V<'3M.?S]?=,= -MMI5J+Q)IRU0N8EP%R10&`H%Q)C808%R%S"F)"XN$9=K&//F-7KXC@4X7@G<< -M/`BIC@08IP`<`E9"R`=Q!)W!!)>"BP[EG`IP2[-W:O%W4TZOA^'U_5^B]3PO -M6>'V=_H7];EZVML:VP*:]:VNA>)KDUXTT$UHA%!A->(%C"@FE-"1'2HUR]T& -MN;LX=.SO.]X1N]CFY;CC&+);+;JA4N1EP&)4@R2YE,-)AA(DG*%L`*2L*P#E -M(\M(RV\@AQ,G1YHWN`&).GJ@ -M(2QBP!(I[9`C)-;$8+(,.);36@,GJJ,)#"1'2I-,!:HK1I4J0^>MX/'Q9:S7KUUG&+-=:)#6C$@R>X8L4(A*R37`UH -MZDUFOCFLXSPY%6VW9L#48>IFF7H -M(`I57A?FOIH63-$!(7LO8&9D+))8(H2,EZC(DS5I6&!#!8MYN!Q'<.6?8<%W -M(WN-M:N4KQZTR3)$UZJ9281)DP*)*2(A-5Y?/Z''W-75GH&9PK/4$S@9XR,#.,!(=N8K=JW$8C$XL6*;N.K,:%D,:U8-A0MD!RK1H" -M0R6,D8&3"*1(9(I!@8V%)4QHP3'0.[L)L;`<38YG,Z7K-[>^S^IS?"OX7`>7 -ML\'N_2,%WZK9OW0WUWW>;]Y.G>"I;8;[90-[(,DWH=QA$@+(L*3>MHM#I:XJ -M3`*B5`;MZE9JFH-_'(`>*K$)M&*$0@:2;;8%DVS -M:;5/+AAM#"-47;6NXWW^,\V_9U7WWA8%FQ8$2Q!D0B2)%B$02)2H*A8//8DG -M/&%9*0.<1>=,)#!,+%DSH"YR^N7?L>'U>MCV/5N\W6W8[2ZQ+;"J,%B%I<)< -ML;@+FJJQMLI8R%S$06"@,)B#*A9(ZZJ)1"ARL8=Y[]--.]WYXPET5[\N#G]G -M:V(ADA@@2!'GH'P\Q]A1@1]'E141'R2@P(4`8$8@1D,S*J9E-3-6:HCSK]+9 -MV>#G=WN=+JV[=VW95MUPN,+;:*)*D+;92K","4#""%HD2*6I$TY;L[)A[O:P -M]/OSUIAPCAT8G$8ISZ^U@Q,C5(9%M"9*PC(&0K("0F0!0*$%8F4!1,(:1HBC -M"WNW.=_KW?A['AS,&&S#!L/P)`D#X#^I9?@)@D+T!9&0TE1$(P+QI%)4?(,! -M"E++Y#[N)*NQBPX<*]K4:]2.QW_,]+UQ?&LB"'-,)`1WH&<#/,ZYZE0J(S., -M8"@L,\!K!@2]`L9*A+V(D4$)>BD&&2\-4=E*+[+S.5VD";F&41[TQ8^ -M?B'[PS*73W1PQZT<,$*&`/@/E($`5"JA!>BRRJ%`9"]$0@D+U$IL9"R-ZH^Z -M00_OZ[YX>''C&+O?W+)/;M-!+#5E2'`X`X2CA!28FA,Y-$6`@#I94`I(9KHV -M1=3J6()@L*H4,U+`+H:O:EF\Z[O^-S9_O!WG=6!V;(LQ\J&/BB-(S@J#'<'1 -MT$O17%J(0J=`D%((06($@0",A"$"F,1V2BZHIS!@8H8":AIXQ-CAQX+.KZ3I -M]QU3.='1HOSN?D:,XYH7@S.R@#.P82]%`OLHI(%A`SK%C(1)+`O`SU11GSWG -M(T&^+]NYN5>Q]&/[5.3JZL#T&3"Q^)3"(8AE$BT8U0QI&A)1G0`/0=%QA)$A -M@8&I`H'0:K"PZ$*PO0C.@>@]R?\C+?EOGI^QRW,SY6YN>I,IE4RRJ51=83(8 -M*023*VLB@,#(XV@H0HBL51/!*3Y*%2D.EX>6.'@=HNKOBAL41'1I4G'`CB(X -M$8:#!@9HB08&>E6$0*K`9&DH="E)WCO!YA!.]@N?(YP/J.D?!ZW&F9=:LXV' -M&W$+B.%P#1@@*&B,#1(P-+;I0"DK`$FB$D.(V&P7)-B^+PW>5M2][XBU9'', -MUM*(:((:#01JBH2B7,D9`L$1!06022T48"2Y@+0)%%#14M)N%NYMB87'=9ZN -M_[?WPS^7Z?AO=/+NY=Y<."G4J4JEM3L\'4=3$'J+$G4C;0.HAU'N+)9`JC%D -M6"0ZA!.IB'56JAU([ZG2=._6['W!^'[\;>CO%QO76RRKANA;<#:TA9=)@C`2 -M2X4&"!+A1D%D0ESC9*N1+`:IH"RI*M4;)U!U/3=2YX&[T=99_9F>&O/Q#E=G -M%,]-L,S!?(UQKZ^OJ20WQ3U)M<4V0V4P5*-F!LJH39C(R!LCZ^@H"RJD9-D8 -M,=H-C:VJH\*7.N?F>B%33,!RY9%$DY(R`R&0B -MA$DM&4A"C&8S&KCG/.6/4]GD[O*?+^]Y9H\SW9@^KVGH].PXF'ZB_@_/UN"W -M5R"13(E6XA-220)(B"1"$!*`$H"(=<0,(4`ZV(BP$A.N3K\5QVZ&(:A9)*TQ -M;B!O;2& -M^,G&ED-Z()!(=+`0!4*E0:52H*@VAWFUL[:J-K9Z(R;>YW"R_BZGD>L\ZM\T -MF:S^(?2;?>]EESR?J.QHYG4&)/$'AZUFV"+9-H@I:-FT&%"B*2"AA-U&)!0$ -MDW>.E$C`I%@,..[J0L8!9)U;(Q!,>/&RWT*P<_F')^>#/&V]OF%'"0YM.EUS -M-=`61V5C:6)[=@@&R(HI-3(6`9B5(5`%#4&4A0:AJ`<\QMV3(7\'?]??W_?: -M?'U+.MES%WQQ<76R9J1"+C"!Q%>#Q0@`NA7D"*'B%"(0!*(_9-#`,#(5),R. -M:B5"D49F-LW)?8Q1!,@R:@QV`O*^B_]_G/?+TU+;=E'`XX'"`J@.%M"0@629 -MXM(@P!SJQ96`4GT[,W"30,&A<#2,NNDN!VP>$>*871ZFQ-FM^5HCE.I5>6\' -MV&]`^CP!'=E3NL9#;W8V%1@%ML[I3`X=3"P-#E$$(^&/$/DADR8\+L!H^$R2 -MM=A'=I%O1_1?U^3[8*SS!,[:;FOU3<#-29H:I)F8D6$*3,J]HU`0F98R1D-$ -M8Q(NQD0[LV]V=V)2FW;W9>SQESJ+%9$74Y7ZI]13IJO=[WL?9YAS-KGU,7+Y -MN.]>S*Z7M0D2"N2!6,H+V+(8[Z6"0[%U4A8!JB/<;(,#L)(F%$"H*Y))"$5Z -MQ%>NQE<>TEEEDJYW_,Q?FL.9X(HT+:YTJ[DN2ZW(`JQDF12+&#"*9%5,B62C -M(@9X9D@S.6T6?`G(^(/$XWC7,RIDS,S.5V?"J;8I;A$<Z$.\%PPF\8+`0B\3)&!OB#.E!FIK,`UQSY&A\;CHS,.#>W -M_#?;FR;>8>/T/L,I*2&C1(=R>OZ^0O&XZ/;FX-W>'I-HVDVMI-FD3:-IC`-H -M8,8LB!':H7OL"R%&"3OVV=X.\>^;_;Q[#V>`>]X/7^H[Q^K_'>M]B=\50Q[< -MY=#9_/\M2D<*:?$]/N--0`.L^[4!Q.A.)G%R/`XQB#B8@`Y2.$LAX4AJ"ZKX -M7!"HP1@'A13PTJQ8,DE8PQ3[;[JS4P0E8LG`R6$]T&,408SFY&-0.CI31)C& -MBG4'.@5;M/=?EU3>C2YU`;QW!IK^E)Z]2%50'T;'<_':SGA6[:67D5L8ED$L -MH!E80)0@ST!!((0"4@@D9)J`BG[MA6\R3(:7091!;_.B^16,K)$RDDC'1&G8A#Q(BA%5QC=ZFZ^O-K#QY`E2HD*1,C;F]O.3*]((9;Y9)R>\OX5`BJTE.2[A`H?=/3DHWX$I(E% -MM53ID_`*X:9C,R?8T&GO*'/9XX@1_!SP>RC$4WP,%]+XY!*)?))`%])P*D&$ -MY?!5>SP6260F`58P0YLLLK@?=5Q^QZW0[Y>3V>?;GKHS?6PH@.72DER'WJ1% -MGXH_C6;QJS,BKTA2UTT<67=3C;7<&*ONQ2FK)')M3>1HZ5W:$+S>?GOS1EU7 -M+_7P+'F8.O@&QID%X['6()V+&%$PL"RBE3G!.ZYJ0&#S6F1"%,1((84Q@'X/ -MQQ5ICP/&VC!.U,[!D8X5=6__5G*"&H8`T5G#4.HPLN.C8<.2KE:$VJ$1U\:S -M*BD\[GXBYL-+QO?"<\7%^T0"4G/^M/)3_B^S]TA16EA&K4!H.L8[+BOP$SV# -MN*AFM2X7JG;;W=ET^U[7M?*]KLX>W:;EJJ.;$=9QHIF[O+J?G+G\?X].@X_F5ZC?<5HI];CP";5'!!K0[O -MIQZCQUQ[W&WMX&7<&X8=Q#U/-A!:DL1/?64(8<,^CLLFI)0CZ@'94P.*P,!" -M@XGPQQQ0D(LLT\IZA2^^=CU+511^)T=?+Y4W+R51&&;XJWMCT:;9X[UG0D5- -M@L_]$U-&P4M?^[&J\J$QG7NHM>_-3,@/M'XI,]8NH:UM77%E"Q++>SS\GEO2 -M)G1^$']+Q=^+[`8QZ5/=)OAD8GW[<^HJF*45!8 -M/XE5H$IWUK1(Y!=6!FE8CIJ=F><]ITN/OZK6?!%4I<;/H"'DT!QTW\>,;&(; -MJ!TD(,1*(F\0C$023Q^K3#*J2,">8"B`L$DA#'&(X&!BA(0IUD7+RB]2KOLY/\L`MPF^%6\;P5+ -M!JLX$:-M6W;]U;,)XEE?FAZ5KZE6=TR]-N64R6$3#_#[G/\9KCNP1:(AU./9 -MBG\D2Z?(&]:?MV_%\7Q)I$W0J[K4P)O,*(46RDGJH -MB*1@1]2GJHQ!2"2-OC:@C``XH009[LPL*1]BA-!!C=PK!TP>P.N;Z,O#\88J -M&=[]?R47F.05_'3\*KZ6&S<90WQRFJ3\YP\2V0'85ONGK/6A.(I#$(DV-.=N -M>8O@AAE/M02W+(>=JD@Q`%+D:/$H4.0+[E+HYVBNC]34KW)*&5=I5[=W4QG7P_6SI_LAZ?0`R[D/SOL>DA['KSV#RZ -MF'L+IUV'L`"GF/KJ/KVR"`5FB44D7UXP9JU7']J_[/A':/4K\+ZO\K]J?P># -M'^GH_GGQX05G5H'G4\]L-"7^CZ?-2 -M1R]Q62]"--Q":-2O=;YU41UM?.$6AO-8!_!QK.BSXT"?H*JW>DWN?<;,NUAS -MHFQ]&YRSA\/U)_3\@\=>G,&,+.S7B'9;&@YW9/8V45`]@QBHD#Z -M%B)'YBU!8PD^A7V2D*2?0C#W]D&5!C`XP,+V;$V@WQX#&0FD)T/8G1.Y-C-^ -M:>!T?MG!Z<5V(G7QF7XB90:MPP_`P[_IW9(#ZS[S$0>T([/X+JG1BX]^3>-: -MX&;*'+*FO.[?SL9BS%G._KD6I^C5*._G&0P=>=3%96Y\L]+=P8/3YU$?!?X/*LX>VI;M0_* -M[5RV#CX]G4Y'?[O"T/Z!<.^''WG.\;L@]D-P1AT/%G34#<3Q1Y]`4V0DKJTQ -M1$121)/H$^+[6,!QI23S^U0M*OHM6LP.('P4S,'21\^`<5&?.AAZ#CIL!%-F -M!LY.#@GL._:L)2/YGF8O&"UTM/LHR%*%=DGIT:#X?ZYYC%#RW"ZG:-=PL`\H -M#L"B93=3J+#1(REMQ5K=&"'RBHM1Y\$+<`SP0Z72HK[?X-@5Y5\OP4:Y\ANR -MLV1@8O[RY[_ADI^"8,^.-56_^\JB^U$/ZN]N0C^H-!6%88H, -M.)BZK/-)G>9-@R9_#NNML\IS5H^/-!RG&A44_;(/I].P';K[QYQW%Q&5V>?_ -M;F:\+MG7-->[9>MGI@,#;NTG74#&M]CS=K0MK,[O$`,\*WQPVGXGB\3:\5U: -MH23QY)A>^O-45MF@\M;UIK6(4X"G<33\?>O]_9.A*+Q[K(S.5M;(MP7:GT.; -M4'&D.@:S46EA'N+Q9NHPW(">J871RD_*T3O<.P>*K_HIC9GDG]9MK(/<#F%J -M@9OL8M)F(A>JC\7I-)75DS9'/U\8.;T%[`9W#O1UE60@G-7S5RW1NTX;DA:]H+*WY<)( -MQF-], -M(FH2;>HO:)NB1HJJBLK)I#Q%1=:82-D:.,ZRA(E27/EGPC?;%MS(7LZ4 -MZ;]<]6NDWG2M#"CSH*B-G,-(AJ$)'U(QQC-YX@V@B1&(P]!""JL//8!1"9D0 -M]"O@V4L(STR*LG\=F.W>VIAL_5_(IB'RXD?91A]4S^&?)^2?)[5+\A$#P3=O -MYBZ0]KYKW"N-%K1B3#/ZTIR9K8Z8?2<-]RR"5YY0J`G1N?TPW/WAG2=ILJ#FIQ$!C)ZUK!$H"_Z%"?\VV6O_@/.IQAA`/ -M5V=Y?D21G+"JRD%'45&W\\&G)7V,GLBU1Z$QGR^U -MNL9E&EN#\2B-A-WEF#15&?,+"#_+>S-O*P.7COG?7);1GP-0[1+G?MW_NA.0 -MPT3(-8GJ,R^R$)N[*=EA,VLS53L.X_;_<$^AX*['$WO?,][[H^/ZRR?%$9UZ_:DGQ8JF1D#ZT% -M8#"'UJJOXNU7ZS_/<)'SE2'A9!"XQGS1#1))!!<(`#C$A`T0'4,+,&-A%PM( -M'NWHN!HL?0&?I=,W7`S]M/N9S6Z"-X!@Y3G@V?8VCW?K+8 -MUZABR2.V2LRL4=T!J4(]?)\B1CO=8*Q;\J[*\_#R@G4@5C,X["?OPP@S\BD> -M^*86+UQ87_SS03E=_[\<6;_0?GE&^:[?EXMOC4T?[C.6,WA_7-^N+#"^X\W2 -M*N*Z(<6W5;#F5K#V+.)QY?-6-8"5OQ%Q?I1ZL:1]7ZJJPV*`''9"@4=E,#+L -M8!I75BTTP:(_!OH_"5^)4C;1NY]"LJ),CEL9I\#@+OHK7`#PT47>Q6%7<<-= -M8-!#!3*M)!B -M2F1^/XQP56^Z9=#E(B_,PWN@.U7\"NO626++K%8769KM;`TFPQW0!=>H'(9, -M#9@'CBU^>@4*.C1X078$XT4N_@;)+S?2O;]V?>7OAOA2)8 -M>*.+JES6;(WV\_@+?UP@5G)E,!^@G*3":[L"T5RF,#@BIK'?CF#=IF+I(HUI -MQ&'?:!B+>,$QGT!C!J?@CF`L+P_>*X"QC9@:58\1@.Q/O2VMR&2)M8_MMH.$ -M[&A8-&.[E5?"T4KG993<-<(RR-Z-!::Q@&L._;-9?`,#K[:+!P5)O,WN,^IO -M3>24)IS]CB[LZ.;U=?#(2%BZ5X3L.MKVNTQF6UIH2KPAZXAL]`1_I>!$9#Q$ -M=-Y/-BX@NC+ODES$3']Z?6J8T+5BNMY.N?,?3G)#N^]2U>(SZETO>'SE7&E\ -MA$YMPSDP,,*U<CQAZ-0_HA6C -M1R)V!I-3^NTT5C;(<3@V@_H=Z;$*=10AFUU@I?M#^I<%O%IP,#++Q;[%?BAM -M$R<4*?,[D36.,,#G.,3PJ:9LW>IW>*C6`8:S -M+["BV=P-9?/%HU3=4S`->/RGH*X,/D??G-AY_`L,?*RFI^79U&-B.1!6$(Z" -MGVF"NM`75`?*3.9[$B=+E,L'DM!QK:>-K-PQ]C?SGUC/(AVWV_Q_LI]D_+4GZ/45('SV)44'Z]*2 -M'[%"7]L%BS\"DLD%#ML/G62P#C!D,1'!,8B<]^-^:M:R4(4![.FM!Z#Y;^\, -M[UXC^!3*OD/!(O;#1;K8=QH,#LISY!^"4><5/N&77I&:[I4'&\\"S-,QM'5; -MLJSY/GA4'E[]YLLX@+]>D?NPF/02AS=\(P1>;D')55L&@UGD*\P!!,N6*F'9 -M-#GQ_!&I>)3IW#';>;WD'.1G;YY)'5#\U8]CRE;@6Y:2]Y>@LVS_9O<'M4N< -M3P9FS)PKX6X9-.\*$(!Y,WW4>[1796#-IJ2?2"%Q/_C=O+55UI(X[ICO`XG+ -MQ8K*@=D@7)H?F.&+=^IV-D+E!M;5"V<6PU]%\=/Z&%#OMS]L`-88.C\7I[77 -MH:*0_9B7>V/;(8,*/^>1.ST]1&+QSSI#=D].F#U;>",^2(O>8#M-YI/2$Z&1 -M;R?K=.@,R7UP@8B;-#:]\QGB/XC)LHV8-$NR#G4RR.BP\?C[Y-](1,&_G'IP -MG/`G./=A>:IAO#"9/7^%VT0_4QX$EH@<[]QCPH]);ST[7[5/J)]EB_6\DC=&V3PZ@SC.81#:^D42JT/%;#U%3)\< -M0"`OFE&A3H%+9GV?@"`HZ17?R3U?#6C+H^@\)$:)<8]Q!&PXH&NYL;!;.DTI*7I\+Q:=;Y]O*2S*.594W8F -M8B!%$9\RM>*:,':\!H$[#Q:TP&S(L(DXL>?C'$_F('U/:=4<+:%UKLP&>!L@ -MX"Z5E,\`_&,)\P!'EIVJL8(P)_<0GD,XKU+*1)]JE3]@Q83\WK4?XG^MCJ!Z -M5#OJZEFE.W$[4'Z"?;6'XS/`\_T,!_50[F0YAD7#R9P`X6:L@V;9S-V<>9P: -M->LR"$':8UMS6OTY9.M,%6:%%KX75H+P(4 -MJ/E\WS?^<^)8[8+=IER"5WYCW?:BC?(50M_E1CBD/=EZ/TD,D(/H6&* -MD=>:\3G3<[T&K.EMG'FJ[-Y38'J/*OPHS9:K.MV.I^FI^,!!JKTM@B16#[A6 -M)Q!5UM[@M!I2S-I=X;R!>Z)._Q"H]J!`:+U'@8[;EZQVY3"C/7X14+[PP#I0 -M'R'L3IS_^["D$SQ5F-?=ICG`/S\-4;)KH66.#=9>T-OMWTE[=Q4.'@?+B3P> -M8H51@E//_BC17&A;UX9]^-#_8PN]JW(Q8XYD,:"]7_07=\\DTYN(;K*HX+SZ -MAHH..,&B5$VPMN8,"%HQ%ZXEMM[+O+,_QYLKQG+G3H.$-KIM4>,3:2IK!Q_. -M8!5XB*5C=KVS`G`*1DH6B&^>(F -M4M#.L-Y*[FAC!'.5O5-0Y'5+L&.TC[0X<]7H-]&&A+]_5&FO[CR5C!HLA*!I -M-N?KQB@_ES9Y78I8WGM-J-EU3N*3]LWHM][SAH<]F!9W8XQNX)^4AMN6K-%[ -M4ON#XJ!;-F8SD]-3D3BM*@A%F'1YW!*02JW+X'-N(M49N*+A&L:PM:X"IZ:X -MX%]2V-`7'JCG&R+/=F>..D&:WZ89_M\'TTVFEU'-[3%E->6;XU-K,J!J!NS5 -ME!DX*%I1;WLOI3R*(LV_-\LB=C"`L#"`8K0NN>E)CGYASQNCXGW8@<\UM?BH -MP1)^QL/<,Z7]'=^-G]N?Y[/I6*'+H; -MMZ[X#U=X_=3"!O0ZQ7^3&[=&/I]5`!OIRP16/M1@.WYHES'A;!X:KIAW6PL+ -MW]SO..`/Y1AVBL389V6:]C0X1`:J%JWKEE&)CM:W=&P^7_'F[<05#O^S -M?"[^DGR^(FB!35P"CWLAM_(OZLQ6TFDM&W6F9EAP`^5N&3%:7946I%#_`5PJ -MY]\PP-VD6VSZAY'YD1+M<+_2^#$':4.F_/J!H?KML?!T#H8:`X$30]SDW@#! -MA+>"*3H:+@FBN(\#:,30Y[I3NR67I->C!*J1K0U;EWUT0=*:_GQ_G@KA;ZK_ -ML,IM7E=E>]#K-_D-D+3#51HABC0+5:+M-FDNZ$6MC\K_-VBI_0-<=LS"TM18 -M?UNTT[]$K4]TGB&R%"X\TV(0Y&!GRR<\=]('37I$V%`3'U.X('US+_^C>;M* -MNTC##KS-6,_SX0\3EA;V:E#B'!@^'N%OZP#\#UA5J5YDFX^+8&$K:A^4_U*M -MR0/-Z<28[[754/#JC@V;KG5)PC.1*Z -MP:@%I]/86BI*FA>+WJ`K6PG;'XZ[0_LD`=_#K?^"/WU0/H3O@'#-:,H*>@!^ -M[L#P"MAE:UF1N?)Q3B7IU;'5,JP/^CQ2EF<'H<\L7.B?=7D\0@?3OQPILT(E -MJ%M46O3_[1"_9OAB:PFR=`T9VB]$1\F"J`AZD>0W=,)@M%:5$''FBN/')CXI -M-3[_F@Y]=9Q`&R\^\-CG#]\@U,!19S0UCA:C`;S6LDKJC,LZ^.]D1#C`.SSE -M4S(23!(R];LJ9)=+[O'3/=]Q5+[E3UQXG<_#U6MWAH5\N(&.+2U/FXP"F8N2 -MK>"I-YY@"WS)PP.:L_PS^C"@3AVU3>%^NS.T2[M158(_O/'8RI*%X)W(?O-% -M311H2/&>0/!Y;UN.#RKN]=ZB0+"P%/1G-05OX=:;)NVE",$PY0PX)4D9R@'6 -M\XZ!05/A)9P/O%2XT*7>7JWVF:7`TCT!S3`\T=Y5N`+,Q_$T*,Z4[Z_2+72M -M-@-?J[\M:QFH^^0\/M[VB`[>X-*X/L[^/-+.6H+H?#G&X)H;RHJ#>_SQ[XA^ -MK9(GBR+039BE)9<"V]0=+U\$E5M.B0.3M=Q;'[ORRDF\SI"+TDN>_;Z6!Y+- -M/2F2,AM/SW'>+CK`B4^R:N6!.RCK8C2N1V3*D7>?CBX6(VG!.OXP'A,].!"\ -M*T[,VG*-W1W%N_VK,+'\3"7H-@:PZ`)K9&4\48PJXP+7KQODI]3["<$1J&\X -M:K>TN#/K"W3J7BQ&K450P!+G>#0G+2>]%[0B#U)>WR$BE/:8"]"LJ6OX_.XJ -M9#9X]O'%4@]ICX+*/,6M_S'*2,GFTUG8\9(##ML9Q3L'^ -MOOZ`)`8O_>@X$^L-<:F^]HQ?S(-W=XT0N]MDQ)+<9@E77VB[ZNR"07W@X44D -MI+P"8_)CPA$`EV"&R=]K/G`!%%:BBE^*N);6US>=77`)/46)(*Y_'[A%[T$ -M223UUM4?$JX"^C0A_#T;U,@!:W11GF-MM76UAV!`L\RB(@];9_DTVACSQ%#9 -M>U;ZX9_<#^SP#^(B0A)S+,)%39;7SV6Z=V>";*47CN?AR?82O$-%9IV"J]A$ -MZK7ZZJ2')\.;J`?!,6*RQ316:^O[?H_1_K?W2D0A?5LL=P'B("*OI$H_7#EG -M@]+_RR:%0_G?C:_4A(O!]C^[;3&EQFPOJAXENW)3PY45$,<2!\_/`&DT5\;* -M5G]\KX49P-6[S8+;VM)K1E&AAW2-_/$!D5(?D: -MW7'R*S1Y_D$-!;..@[3OW:KCMO$`M',%>X^O]1\OO^R7BRWTA^JB0_I"0YF& -MS1HNFC.;F$_Z_4B*0Z6K\3CG1G/Q@^N?)0\03)L)Y]EI,^!\_;D1_7+;&R.N -M,CN%F^-@L1HLY/Y;,W?X`&T272NQ9*^.J:3Z0G,/@K;B8.P&P_R[]1G6S]CX -M2L/HC6Y/<0HP&P%;BWN""6_G7R_YZG#1@.!>O4<]YD3E&Q9S'3J_VSUYLMMJ -M)#"BRIEWN&RV<[\74L9G:K.'`-*0.Q(]'\Y#VX'R39&@]8UFG%W,+Z:<"[C; -M'5_6,8YLT!/;2$QE-F_N0AC2ARARL%S-E+:J'*MJ(@Z<'#A77>TPE)33FR=9 -M=^=C964X[T`Z_RD[!_1P/0AOD'21@/8W94&:.U4'=&3F:0J]*3I_SWX7)'[# -MY!^J*V_J"_@\9H4;UU9PO99[92.#K[VF`YM8)XV%SY4V]:(73M)T@TES\PY' -M\@K:T^"6FJ9NIP5M8X&@.?@=@P@#UL:!?3),=!RZ>]^AH24S8&P20?Z[6+^_ -M-%3_Y[FP4]^#F-*:D*O9N.\20490'$F29KM9G$D%\EWIOQ#.M;DN)5"C -M^B`$#L\O.M"BI0.*^S9YC!:;4+SC;<:*/D(,Y'^3#.%/_FNWV@+T8V/*:9`0 -MJ?IXO>WQBX5/_`R"D367BP-&<&_I+9(,36'BG9H_?+"^^R@#"XZ[X.$(>`W& -M0TP$IY:$V.UZ<^:'F+=\HU$Q>9F9+*YVQP.WEK_+] -M"]:0J/F08O&5=^G0V4U=Q_O?30?Z`IJ^&_-@5:/S-6S539%E8O)AC=6&3.%- -M_]3XWCYWT]-Q_!"`5O`6#N^@;`F^L^Z;4$,)TLV6Y.ET.]X@-1I&7\XN/YM& -M@(/V$#;G<&R(TI3A-VKE`+<..U.X -M)T:O(R.#*?@T7H3MCFR*&I,+1!DA*7R?/@^I&"Z;W;1+40NEBN/'MSRAIT%; -M$4*`AQ_]VO!:#Q.&!W"GI'3^8^`_=W;;4A;:F&5#@#.^U)>I8-"PW4:!MYZ* -M-@Y"@-V8K+2_O#Q*,;%@EEJW.@8[4@L&.JG)TXQXM;H -M,>1>^8/I7(L0O%F;W7U)P2?"@048V.YLJU>ZA:6`I:-+XRJ?`W -MJY9=,+.+A38T'W)/@2JH#Q4:[X#Q";_%(!2;6UAY`Z!,KG&`F97!7#CAV"&/ -MZF0VIS-N&GZ?S7=H:*8*[C36JHB%)WM!8#69@\4_W5&#@$K_`*;!S'4!;\1I -M;X1>W+;":.%.S_7(O;M\3:JW2V!\JC@D7O^-W\$?!BCXV&G(LJQSWO.-O/`< -ML*LZV?.B)$.TFFW#&9,&4ZW.J`)1\5=4<5-(/'7-OKE07O^UW6R9T;[C2(`8 -M_J$=P&V67*1``XZ>Y"MCS59"D#O9-)'JHB*TOSZ,E0!,C$1S$M6QXD_N@IG_H>A.)7 -M0QKP11RIQGGA9L\+_B^$%R\&ZW4/MTILWR$$?3.3(\8A&Y3B(D1TN+PN81*N -M'&3[+BSQ#07,&X\T"&L-.;^($Y;Z,V-7^=X0S[;`476`$E08QU.%(<2!(6SD -M:9(TOC4Z#/R/[1NB5`'/P^(V7ZM-!]."(B'-#O)N;`;ES.;8Y -M"<,`;JW06_'T!ZI(O5#;%IHR[/ISOMJB&F=30HUG'H6T`-6XK(J"_H>&#"43 -MW18#G5=TJ"\[\3XAWUOF7)#[4,=%G^)GR+N=MD6M)I$-R0G,%LN;!`-=Z,^U6=X$:'-?R*D80&O,`7])GB$#?8C -M-,K4"5"Y\I@4@9,]JS8S]$"67+-,]%^M_1`2PR(S9O/._)_`I31J -M[VN((A>8+I5TR"O@P`Q6&AAF,(!6`KMGU:*&07I90U!:[(AG:J3W9#@=;J'K -MY?JO#%0!`5.ZOO)VO+T(Q$X$X=P63&=-Q<^0'S:F*?C_ZYT`7>ORN[/C65I$ -M^*\0;%_H(RA`#)7]X[\H0#%KDA*'7\X\)8_#(FAH5\QB4M/YW7QH4,@:?S^EZ[_SI$#5A/,R?;_2]7I0#\9)#5 -M2/?45*?-[;XGCL@0`$-IUN+NXK_=,I$`$WJY!S"8^1;/Y\@2<.WS>^,J[I1'UT1W8G];+J"`$'Y9>L/[3 -M"2?MF_[V-H8>`)4X%5OW2ET&[2>'^?=:.W)UC"VY-$1$C5M%R^!7X7D]5KZ; -M7C/MK&]]6I`@BMS")#GF_/UY#W+R1$"&U1_3LMQA:JN -MVRLLTT3W'S-(0"GOFD[_48TU>OJ\86EGB!BXGM?;<22F`00=MWO.9Y8EPYS' -MR6B4VU9RW2!1T=4!!GIOPD/*]MT[-=W,S'DX1$[32"TX+I):?''N/D`I/IM' -M4OBO@J$>9X2@^`-HD<_V2GNMVOYN#7DD/$Y>ADA;'?[BO4P!W*N*CHVV>W+\ -M9Q84@"C5^1-0&SEE[#`97J331$WN<>*2Q/D!^#\+&.UU<<<`"6G]6]3'FJ^G -M92&9E=;K50=H?!!.3=$G6*J\]@X<7B*0!,-/C125LA;!O[9$%/*D&T>2@`1[?E_6BXQA<='_(;Y>7#JGTJ8`9(T["8PF>E%_ -ME6^"4.OQOY.HR!>=P@2W@[ZM7YA-QSAGQED0(+ZL*M=+4!*WPFN3_9<^"&IW -M?VY3P6\H-XPM4FFU.1K5K[A[$IQ&? -M4[C]X^*D/,671D`)/LW;,Z2(T[*F\1[NXN%0`$OW'2U?8`B&G&77Z>XBO(T; -MIP3I$'-5B/L/=U#&XMBPY0SBDD`N=R[07^H+BZ-@=&C -ME)`*>1:EL0:3C9@(Y,245D=UZC&WX,-)A`!OL2NPA -M=U9HR!)=)XERANOX4R`;(G\IO,1$0;E -M#I3)2^`/W+)&X;9'QLR(`!\SNI[]:!W:.O>N'$L:=K1DHR!62?0_FNE?;76W -M5W:)AFO\4R+W5N7TV07)UA_`_"UL(-$`%WSVXC9^<ZD_O-)1$6O^4M.4Y"S'+V.I<;/6'P%.R\!3FZBN -M'O,K*'CX(8RSB=6NNM^"TE9`-^`J\@);/\T1`:A\@DKJ -MMX"5DZ5($U#F\/HH"*1EG6G)H8H=LF"_`ANFJWT]"339WT)`<7YR+V!A_O:7COO> -MQ.ZO,>;EOJ2`73]8%-ON2*W]T!X",9R*)=+]=CWYU<8FOC;*PLJ9+(A0<`%C -M';J6GLB=4,ZU]5$17%S@>SME_81ZY.3H(D^!.O`"]E]Q -MS^<.YZB^7N5:`X7'?K3T1Y`7_S>W)P\A""&KN&H\-W-G``!B-W9LDY[',0*7 -MXWP\Y[ZP+;TZM$TWTPF86+23"ROSX&< -MQL'G[;HY7B2R$%/]T$P;O/PWCKZ3;/G7LZ[\K*41!O;VHKGDJ_$B-68=..Y\ -M`17>(35W$KZ)1OCY%#3X$91/KA1#'>IR-_)"0&+I'1=-/(2<]N6[29K#I4!$ -M_VQ%Z*C`Y]6:];]D,"O`I`!PW\%YOX$X]3Z3VW-XI@LTZ^A/)C6B!-SR!?>IK$\GH`>!YU:_G^[U^).")MO_$0;<7L+$\*:%.^U$1?80>5H]SP -MH30D,]RUB)?DL`#\=6D()@LHJY]S.P'P2Y<2P']T]3T4:/JGR"UU,@G@@\=+ -M0O`E)A?Z:TA&GC@@WBA6,&X/`KN^NV0@*599L!]YSO)<;@IC:<7,JE$!_,EJ -M`C!0Z5OMOF,2ML&A@41$VZ>YK`,+,<6VF]4C/D2GS>Q)$$<7OVR\.B]F,]NP -M0J1*+?#9LBR=1)QVL71]4"-)(IL`4+.=%A"OVM^CM2#:;;'A,J#;&F$1+V+O -M`%BI;**:12N[VO%:Z5((@QQ$@25,M;D-_)GB&Y5/F14?\V7B_[;0:B@`?,Y2 -M$5_]MPU?N#$1UU3!$(C(M%U;DAB/Y5_YGL=LSH`7$L%?T`6NC0C[N'A?7*&0 -MD"_G6!?!\CY[,H]YQXK/2QD<]YT@`?2& -MC%7R$)5.#(;#':[*O(O2S_6!YCFLGP/3X2`3+T9A9ZG6C,NUT"(A[D\^"QTO -MZ^AL>DEZ=(EM/*+DL%1G9<1WF.D,"\<7KR-5-2XC5;PT!]JF" -M#UF91M0-]]8`AN+`OF5IBLRVA<=>4]UTI%?=AGG""_<=#19D,)+/T0$!F'2S -M(9J,WF.FD>=P6!4X*,B\^.TO@(\YD#SD@`9_G@#ZJ/L6!B)[#D4CZJI"+>@!PXK>5-1R%,%[J.C -M(@DX%)%]!C?*VB4P+_;8&^(J;`8H,W"3CC-:(A%9"80+R@"OEA5",&HL?,?7!KS01D4[R@KS)`#K*,/Q,M>"5DJ(9=$"VA`+75HX9);&Q/1!0?D9!DF=41,JW]1WJCH -M,0/D/ART_6D,OO_'^^M!8[9(`*LBZ2![=N^?EQ3H"%A1,#\`557[T6^2=M,V -M)FO6T8"9>)FM($_92'&Q@?#ZIGO+HFV5^207VA#'Q\K2(-UV\/7`"[U%.QGW -MD1D^D@L5>`N?K\MJ3@M.?Z"9NE'GWXZ"B5D@57]J39)"JX;MHQ_2[FX&7:/( -MZ,B<"''G)T`,5W7%G7=P23Y(LGU"'1U?2'!T,YD2;T`(37A9I'^IW5(AU]9J -M[+2\#*=#Q(2%CE)@$/=R/Q!B5\"*50$HU7GE.^^D0F$(AL\6E:X0$ -MQ=_M83[A&7=\MMQB+(72,(T>YZQ\OB[\=M?P0]%UYUZ8Q.^/W:GO39"FEB)P -M1\S0+W1K]!CT),'6UR20%#&CNO24EI3OCWFX1@KV*(A4V6EKEP920LI%,C`Y -M'6@EEKY1$&#=;FO5;T;F-9HVY/)")6\DO3S0!?/RZO:IZKF=]PU4,C%++$!. -M>!IA'K8\Q$C,0D6[\4H"&P2,8?*DUH57*'54 -M8"Z9_2'37'/[0RX\3:`@XUW*?B!8_2I?VH8:HE76#3IY(%S.]($2P]=G^N_L -MAFC,I$+C"A/>^0$XBEK^U\7Z$`Y<0\W--KIV;`!P%VIW5B#70XH!8O!:+=Q"BFS.;<*U -M>N4T@E`%NJ_>2Q`FY+&EWE'G)%+=*9$!5.1`-3_<_7&C?QF1YTX/9 -M(#+SV6'HZDHD+R`ONS@M/H/'-R$EESXY+HJ`F#.OBQ#Y2?#TE4R';(MEFOL6 -M6","$N_U-%=$0_JTL+% -MQ."K+3NKY7&"0%G?*G_EV?2`W4-\HDJEJQ$*D!3L1`+"U/8F%3/?81!@4:ST -MVY$&&HLNFO)]AH]!91%J*A,`)>`,0)96L"M3OQR>L9:"'"=3I4P`N&0B!]4K -MN!/0DP@R\,>4R&BLR!2'3W.X2LZ'CYCAOI$*R`/J=XO(9I1>T/L]O1:QJ6($ -M!3:!D\(M=7G&R/;)::;4P:-6Z8.B(DBT^K/SDU[J:P`N503,`J5.4].I[Z(./"X?*S^K!%">>`:5F[[4A>1%E]1X+D@+/^?,'_.8\2$.U -MOE,%`(9D@!8S]XO7S"U.1IX=^+1CR->#];K^:A=IIF>.EDU7RT\/AHB`JWRHS6Q#^:243'3F_ -M(AG9*`W5/L$QXC'0;3BG2#>1)C(R/#9H4&10%C)/1D1;#<^N8-P5TIB80#S4 -MS3UB(O1%^-ZFK+/UVVW$L:!`.L5);#2]JH];,FP8E*XJ`18[2J?OU>9//>>A -M49:?*\:BE\H")IH'SHQ50P#:QH4POC=G`+_KO018+U=]G@IMT8/S&I*8$AM6 -MGNWC.`34J\+R*F@,J-4>A&1B7.D@*]:(`0@B'!1HDS@'C2:WKJNC"EJP1:O> -M]Q,V-OVT0S*NG(R$'2>?H]?]%L$!SV;C+ZJDRSY'_UFHUNAE0F9L,1$$/1@E -M.`VORJ]R8,'C?VX,>-#"F`OEZ:.]TMVO*Z5]+>B-,=LX1,!!_8W=WQ^A_NW2 -MU$]I<80'?F$?$T:TQ<-`7?_J>Z[KURF99P`.KXYJ2I[?7'X+[_/R.WORQ$3( -MEV;"IG=`U0"QHCJUEUHP3H2CI%@RFV5L]!.[""+>TSWP,+L5@5^0QHYKD@`);D%:,NF9"A%(V1LK_TIM+)7S",$083.2HU,IAAFT'XT4$ -M?KD3U7')$I1"I._]\#P!!78-ZZX%HIIC4@)GI="3J]'-G"($!/F";"$X;)_"2&TDDA)\#BWJV=LP`]FAV799YS"0\=-?CU[U[ -M]/CISW_1L5^$A`#N#].H2;S%@=VHZ>RV_5"=L-6G!$*Q=R5^L65DQ&(P(P&2:S4C7` -MI8:*T>=/$0=6%U>^QJ]19]OB[<$K&%()RS

-M2X_PW\A4?`_T,KO6V2"`&K3MT,)!CK(Q.$F)Q>PD._D?Y*B^4D*2DD`6%-K8_P_JX2!'5M`WMGAS"KQWJHOF+*UVOQ:T[Y9-3P0*:WWIXLJ?C- -MUZV=DJTK6B``2W7?Q^C,9G.S@>+J0P=!_WD]A`#3_>Y.LY!9N]=.H@! -M5<3DW_A4"O%8FJ8(JMD+#XY#2LZ&2YJ4@!!8^J9Q;X_04\]2WO:]/KHT8(N#N? -M.RP'[7_8W^LB&QHZJGJ<0EMX$D^/^9T'!QBWAHT1$+>ZL+"U4V0E\.+S$-7& -M?.E_'!DT,GI3P(DFW0K0NYLF4^AB>9#5?NG)A+!%U^U&1$P=C,+:I:Z(R=?"9MF:$RKNC2@@'_$L?IRA.PM&PI@"V4DW;=.NQE$!G*O0 -M<2FBEN>ST^PK:4`G?N8HG(2#9=4[9NBPU,@75J,&4W(#B$5)7,">)F//)?JD -M(AAW?&JOS\C;2`8+C-,ECG&;S4V'-F2`BPY76`6C*^TZ<3!ICXBW8Q+(R(IJ -MPD=_V;-<]R\W$)-FF7_LY%TD10_/HQ$.J)0(EAUOI;$\Z-U/"3#'J)?$)`D@ -MT\)L()ABS_02AY,@?!#2]]K`&)V-5J5[<\[M]U\$4M_NV6/ZE)Y$6/%P&&)" -M@##\T3#,]>TX^FMTL@4^0$9,B46EIO_7PTT?JDP$5D\SBBVD6P38:VFJ"(9> -MFWL4HA?5`(4HB`C77YOO')]QKNZYYI^/"QJ>B(%>Q4-LY?.D'#;^-D.`AO\Z -MRP:C/<+\M"$$70[\XF(*$95EYG<%2A1GP0B/7`R#]N4>DDNA506P\X(M\*3B -MYPB@%N)A+!NKIQ7;$^,XIB`^[6,,>0'(WC733>(+6T3*<5RPD$`Q[ZGZQ%$R -MK>_NCIQV9E4NK]JWP)0!6HSR:0_@Y;)SFUH?^7TF^51@A083IZWJJ'*;HWE[ -M!B3-9KT$IQ=$D`$VR-[!;XBS"*"^;+RLFF!H0@#Q6<6D..:(%V[6?%W$:[E: -MW1;9L;^3PJK7V5/0H2U_DO1=@J$OY%>3:5662$!$.'F[;RI9 -M"GX^Q74GI[))>;981@$CSTG`D#;II8WJ2D_P9URN*!((B=OJ<[I%%/N23OH] -M,.9U_'>;^(20![J&#(A5/G*P8MXF7!FZ+CJFH1P7?K$)I$*S-9JV#BFLC)JW -M?,)92?8D\_[=:E``13__IP%L$]^JMVD*JLCH@_%VK58MEKU\E-(`:KZ10`? -M%J[A`OY&P2@0ZF.Z8`A5S7YA.I5[$)0]#8KPJ2`%&7(N_@Y[!`:/8C^SL -M7UN+$XNDTE6R5"40'77+[7T9"S7[+0O]A0LS,XL28`%+NXOFS/%6`JZC?-]M -MM.AUDM2>%,!;B?!+":PA6=>AIF!SS4LBL_CJT)$XYC7R'FL>]VVNNK_O[)I$ -M*F?/_ZR$!E\D.K!KH5LHV)LD:SUT]/4KLCG"(N7\G^9($?A?^_KWHR_G_Y\; -M4[1.VL/[3@0U4S%LY$)Z,P`ZZG4U%#5?#"1D7S[WW[9%XNB_<=]O]3PNVG64 -MDGI((2KQ#XC[B71.G5+,;_A\3XW:(`#X)-!4:M>(N\XL;V]*4&H[/M9*)%92 -MM7FVB:``R3`!2HD$A^&FX*?Q3O$<61]KDD@BHU4!>R?]8Z^?][&\>5$"'8B- -M-)D`Z2./Q[,EG+YQE=6>W`'Y3P0P1C -MP;\VHB%?D)99.NY(&`&/>9NBD%\4BHID!;K7NR"&3LY+AOU0_;[1J -MVX;__9AP3@ABJ4B`$WG;6*"X79OW62Q*;A)B`P5+H31`?$7O5G7UG-#JS-=Y -M]+3[M4(#SNW(GM*1"3'.T>SU\0C)U2E7AA_7T%Y(^M(!#@-W]D0I:`SS,V"W -M=J02^2-RUZ-"1"N7[T`2O/2K%7?^0W]M,9!2Z^8]\FF`$R9ER4D/:(=^]8 -MN/4)\\G>JG9PC(!IK`_=?&[B:NG*;0$`P_CQ+$:0&42BW*HF4$JW-L+N)K6I -M(*XFZOP@3@T]+P`-/@T&,KZK7``L\OLPB>Z0SFL -M9T+85;%-("3U;S5$6WE_,-,FUW?8,V\)O-MTD`?09,@DP&)E(_HU9\"C=MKP -MB(;[,X#:Y=-S"O=6'1:%I88?3!)I`>F@[)`<&6/G#O>:^>Y&0ZR30R!$ -M(/Z]I?I+A6C$(++YCND`G\G1-QW2Z3N>WP -MDB!?R#!.&Y^9%VG.LA+W^89(0'[/I$4P\>F$D-S0^X0]OG]:.]2<"4 -MJP@)^C^ML,>]8_QX:PB+4;/9^0$&.$_#_Y_BT?7=+#+E?8.3AY]"FD`X8Z:(0F-E -M$Z2S"6DZEPH2`#8@O(FHYW?+_X6UWA?QB)0!B(9C:$1Z\"I9RD'']_5,-=7# -MG7T>ED0JZF;N_NUT><`%6I9Y^<6]`G]Z;T",`;JTL:4@/WRF7DC8\^)RW;DD -M0'X3N>"&^?&5N&_2\\\]])<497ZK'=4B*][<)H;]8E;L;)9V,ZN[+?)8&]6: -M,A%#:O^@VN#*.OB6Z%&1>AZ:@`)SVIC6F]QG=]FH#(]"SGZK=*.^3@3]KI/T -MN<`1#G?\S=B^5J!^J8Y=1C8U$,1$E?#Y?N6]29WZ.CAD$I$V]T@*+N?]9 -MEBHVFE$`&YR1%RT&CE+E:VNC^2$BQZ\1#NOFKV4$_I?CY(Z.\%#FTR'ME4`) -M*7*^8`-I.])!NZ*3'*3^!/J\%,0&E@"`NZE-9P.'=8?0J=ED:FQH)-Y64XB' -M<]OV[G7_3R"*.0Q+=UZ=5XO#9.%RUBCLXGDP`P_0H`$8""BP8R\=N5BNYRD@ -MN[2I``[T``5GK,GSKOPI_QC,>Y+(03KWXQK(#.B8\.&F0U.MIT]#XT -M<2BB9=,!"+Y5!X&7;`%LCKDM>2'S6K<%WO(P1^2'FWM6N(0.1GY'^RI`>;"]N+7P4@9XL172P.,X -M$0ZW98YYBB=#JM+/61X.>C[2<0%B`5(W5>C$!WT9CXW+1N=EWW163@O4WVH` -M'<43H?//N?_:2-6`GKQ`[U2CDX%#V,URIF:(AYQ]]:T*W12,,;1HP.MJ7D@3 -M(E^;+3JHF[$.E<)?;N/TL^IPX/5^5:(%(,?BH0!P4=YH>OG-UU--,)9!G]*; -M3P4(1!0QZ;)L^D'U$H*,DS'0&74[G>@%NH7&Y%.BV1QUVG&])T@Y*3Z/Q!"N -MJ0>.N4BQ;VRE:),!6K6"%VOX1FZM/!?I2]UECP,^;SE`F$!.PVY\6.%!9@O' *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Feb 4 18:13:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E255FCCF8B8; Sat, 4 Feb 2017 18:13:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97BA01715; Sat, 4 Feb 2017 18:13:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14IDFKb013586; Sat, 4 Feb 2017 18:13:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14IDFjj013585; Sat, 4 Feb 2017 18:13:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041813.v14IDFjj013585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 18:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r313246 - vendor/NetBSD/tests/02.04.2017_10.12 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 18:13:17 -0000 Author: ngie Date: Sat Feb 4 18:13:15 2017 New Revision: 313246 URL: https://svnweb.freebsd.org/changeset/base/313246 Log: Copy ^/vendor/NetBSD/tests/dist to ^/vendor/NetBSD/tests/02.04.2017_10.12 Added: vendor/NetBSD/tests/02.04.2017_10.12/ - copied from r313245, vendor/NetBSD/tests/dist/ From owner-svn-src-all@freebsd.org Sat Feb 4 18:25:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4C64CCFD82; Sat, 4 Feb 2017 18:25:10 +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 A48F71E85; Sat, 4 Feb 2017 18:25:10 +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 v14IP9Pb017873; Sat, 4 Feb 2017 18:25:09 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14IP95F017872; Sat, 4 Feb 2017 18:25:09 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201702041825.v14IP95F017872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sat, 4 Feb 2017 18:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313248 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 18:25:10 -0000 Author: sbruno Date: Sat Feb 4 18:25:09 2017 New Revision: 313248 URL: https://svnweb.freebsd.org/changeset/base/313248 Log: Delete duplicate break. Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat Feb 4 18:20:07 2017 (r313247) +++ head/sys/net/iflib.c Sat Feb 4 18:25:09 2017 (r313248) @@ -3422,8 +3422,6 @@ iflib_if_ioctl(if_t ifp, u_long command, ctx->ifc_if_flags = if_getflags(ifp); CTX_UNLOCK(ctx); break; - - break; case SIOCADDMULTI: case SIOCDELMULTI: if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { From owner-svn-src-all@freebsd.org Sat Feb 4 19:16:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1042CD0A85; Sat, 4 Feb 2017 19:16: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 85A8616A9; Sat, 4 Feb 2017 19:16:20 +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 v14JGJ8s037734; Sat, 4 Feb 2017 19:16:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14JGJxp037733; Sat, 4 Feb 2017 19:16:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201702041916.v14JGJxp037733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Feb 2017 19:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313249 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 19:16:20 -0000 Author: kib Date: Sat Feb 4 19:16:19 2017 New Revision: 313249 URL: https://svnweb.freebsd.org/changeset/base/313249 Log: Style, use tab after #define. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/vm/vm_object.h Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Sat Feb 4 18:25:09 2017 (r313248) +++ head/sys/vm/vm_object.h Sat Feb 4 19:16:19 2017 (r313249) @@ -183,8 +183,8 @@ struct vm_object { #define OBJ_DISCONNECTWNT 0x4000 /* disconnect from vnode wanted */ #define OBJ_TMPFS 0x8000 /* has tmpfs vnode allocated */ -#define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT) -#define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT)) +#define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT) +#define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT)) #ifdef _KERNEL From owner-svn-src-all@freebsd.org Sat Feb 4 19:35:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09570CD104C; Sat, 4 Feb 2017 19:35:40 +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 B4D961F30; Sat, 4 Feb 2017 19:35:39 +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 v14JZcmK045952; Sat, 4 Feb 2017 19:35:38 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14JZc2U045946; Sat, 4 Feb 2017 19:35:38 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201702041935.v14JZc2U045946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 4 Feb 2017 19:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313250 - in head/sys/dev: mmc sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 19:35:40 -0000 Author: marius Date: Sat Feb 4 19:35:38 2017 New Revision: 313250 URL: https://svnweb.freebsd.org/changeset/base/313250 Log: Fix some more overly long lines, whitespace and other bugs according to style(9) as well as spelling in comments. Modified: head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmcreg.h head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h head/sys/dev/sdhci/sdhci_fdt.c head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sat Feb 4 19:16:19 2017 (r313249) +++ head/sys/dev/mmc/mmc.c Sat Feb 4 19:35:38 2017 (r313250) @@ -111,14 +111,15 @@ struct mmc_ivars { char card_sn_string[16];/* Formatted serial # for disk->d_ident */ }; -#define CMD_RETRIES 3 +#define CMD_RETRIES 3 #define CARD_ID_FREQUENCY 400000 /* Spec requires 400kHz max during ID phase. */ static SYSCTL_NODE(_hw, OID_AUTO, mmc, CTLFLAG_RD, NULL, "mmc driver"); static int mmc_debug; -SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RWTUN, &mmc_debug, 0, "Debug level"); +SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RWTUN, &mmc_debug, 0, + "Debug level"); /* bus entry points */ static int mmc_acquire_bus(device_t busdev, device_t dev); @@ -137,14 +138,14 @@ static int mmc_wait_for_request(device_t static int mmc_write_ivar(device_t bus, device_t child, int which, uintptr_t value); -#define MMC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define MMC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define MMC_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define MMC_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ +#define MMC_LOCK_INIT(_sc) \ + mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->dev), \ "mmc", MTX_DEF) -#define MMC_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#define MMC_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +#define MMC_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx); +#define MMC_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED); +#define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED); static int mmc_all_send_cid(struct mmc_softc *sc, uint32_t *rawcid); static void mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr *scr); @@ -744,9 +745,9 @@ mmc_set_card_bus_width(struct mmc_softc static int mmc_set_timing(struct mmc_softc *sc, int timing) { + u_char switch_res[64]; int err; uint8_t value; - u_char switch_res[64]; switch (timing) { case bus_timing_normal: @@ -1161,9 +1162,9 @@ mmc_app_send_scr(struct mmc_softc *sc, u static int mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd) { - int err; struct mmc_command cmd; struct mmc_data data; + int err; memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); @@ -1185,9 +1186,9 @@ mmc_send_ext_csd(struct mmc_softc *sc, u static int mmc_app_sd_status(struct mmc_softc *sc, uint16_t rca, uint32_t *rawsdstatus) { - int err, i; struct mmc_command cmd; struct mmc_data data; + int err, i; memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); @@ -1393,7 +1394,7 @@ mmc_discover_cards(struct mmc_softc *sc) * commands, although the state tables / diagrams in the * standard suggest they go back to the transfer state. * Other cards don't become deselected, and if we - * atttempt to blindly re-select them, we get timeout + * attempt to blindly re-select them, we get timeout * errors from some controllers. So we deselect then * reselect to handle all situations. The only thing we * use from the sd_status is the erase sector size, but @@ -1534,7 +1535,7 @@ mmc_discover_cards(struct mmc_softc *sc) static void mmc_rescan_cards(struct mmc_softc *sc) { - struct mmc_ivars *ivar = NULL; + struct mmc_ivars *ivar; device_t *devlist; int err, i, devcount; @@ -1664,14 +1665,13 @@ mmc_go_discovery(struct mmc_softc *sc) static int mmc_calculate_clock(struct mmc_softc *sc) { - int max_dtr, max_hs_dtr, max_timing; - int nkid, i, f_max; device_t *kids; struct mmc_ivars *ivar; + int i, f_max, max_dtr, max_hs_dtr, max_timing, nkid; f_max = mmcbr_get_f_max(sc->dev); max_dtr = max_hs_dtr = f_max; - if ((mmcbr_get_caps(sc->dev) & MMC_CAP_HSPEED)) + if (mmcbr_get_caps(sc->dev) & MMC_CAP_HSPEED) max_timing = bus_timing_hs; else max_timing = bus_timing_normal; Modified: head/sys/dev/mmc/mmcreg.h ============================================================================== --- head/sys/dev/mmc/mmcreg.h Sat Feb 4 19:16:19 2017 (r313249) +++ head/sys/dev/mmc/mmcreg.h Sat Feb 4 19:35:38 2017 (r313250) @@ -100,7 +100,7 @@ struct mmc_command { #define MMC_ERR_FAILED 4 #define MMC_ERR_INVALID 5 #define MMC_ERR_NO_MEMORY 6 -#define MMC_ERR_MAX 6 +#define MMC_ERR_MAX 6 struct mmc_data *data; /* Data segment with cmd */ struct mmc_request *mrq; /* backpointer to request */ }; @@ -291,47 +291,47 @@ struct mmc_request { /* * EXT_CSD fields */ -#define EXT_CSD_ERASE_GRP_DEF 175 /* R/W */ -#define EXT_CSD_BUS_WIDTH 183 /* R/W */ -#define EXT_CSD_HS_TIMING 185 /* R/W */ -#define EXT_CSD_CARD_TYPE 196 /* RO */ -#define EXT_CSD_REV 192 /* RO */ -#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ -#define EXT_CSD_ERASE_TO_MULT 223 /* RO */ -#define EXT_CSD_ERASE_GRP_SIZE 224 /* RO */ +#define EXT_CSD_ERASE_GRP_DEF 175 /* R/W */ +#define EXT_CSD_BUS_WIDTH 183 /* R/W */ +#define EXT_CSD_HS_TIMING 185 /* R/W */ +#define EXT_CSD_CARD_TYPE 196 /* RO */ +#define EXT_CSD_REV 192 /* RO */ +#define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ +#define EXT_CSD_ERASE_TO_MULT 223 /* RO */ +#define EXT_CSD_ERASE_GRP_SIZE 224 /* RO */ /* * EXT_CSD field definitions */ -#define EXT_CSD_CMD_SET_NORMAL 1 -#define EXT_CSD_CMD_SET_SECURE 2 -#define EXT_CSD_CMD_SET_CPSECURE 4 - -#define EXT_CSD_CARD_TYPE_26 1 -#define EXT_CSD_CARD_TYPE_52 2 - -#define EXT_CSD_BUS_WIDTH_1 0 -#define EXT_CSD_BUS_WIDTH_4 1 -#define EXT_CSD_BUS_WIDTH_8 2 +#define EXT_CSD_CMD_SET_NORMAL 1 +#define EXT_CSD_CMD_SET_SECURE 2 +#define EXT_CSD_CMD_SET_CPSECURE 4 + +#define EXT_CSD_CARD_TYPE_26 1 +#define EXT_CSD_CARD_TYPE_52 2 + +#define EXT_CSD_BUS_WIDTH_1 0 +#define EXT_CSD_BUS_WIDTH_4 1 +#define EXT_CSD_BUS_WIDTH_8 2 -#define MMC_TYPE_26_MAX_HS 26000000 -#define MMC_TYPE_52_MAX_HS 52000000 +#define MMC_TYPE_26_MAX_HS 26000000 +#define MMC_TYPE_52_MAX_HS 52000000 /* * SD bus widths */ -#define SD_BUS_WIDTH_1 0 -#define SD_BUS_WIDTH_4 2 +#define SD_BUS_WIDTH_1 0 +#define SD_BUS_WIDTH_4 2 /* * SD Switch */ -#define SD_SWITCH_MODE_CHECK 0 -#define SD_SWITCH_MODE_SET 1 -#define SD_SWITCH_GROUP1 0 -#define SD_SWITCH_NORMAL_MODE 0 -#define SD_SWITCH_HS_MODE 1 -#define SD_SWITCH_NOCHANGE 0xF +#define SD_SWITCH_MODE_CHECK 0 +#define SD_SWITCH_MODE_SET 1 +#define SD_SWITCH_GROUP1 0 +#define SD_SWITCH_NORMAL_MODE 0 +#define SD_SWITCH_HS_MODE 1 +#define SD_SWITCH_NOCHANGE 0xF #define SD_CLR_CARD_DETECT 0 #define SD_SET_CARD_DETECT 1 @@ -419,8 +419,8 @@ struct mmc_scr { unsigned char sda_vsn; unsigned char bus_widths; -#define SD_SCR_BUS_WIDTH_1 (1<<0) -#define SD_SCR_BUS_WIDTH_4 (1<<2) +#define SD_SCR_BUS_WIDTH_1 (1 << 0) +#define SD_SCR_BUS_WIDTH_4 (1 << 2) }; struct mmc_sd_status @@ -443,6 +443,6 @@ struct mmc_sd_status * byte sector size anywhere, so we assume that such cards are very rare * and only note their existence in passing here... */ -#define MMC_SECTOR_SIZE 512 +#define MMC_SECTOR_SIZE 512 #endif /* DEV_MMCREG_H */ Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sat Feb 4 19:16:19 2017 (r313249) +++ head/sys/dev/sdhci/sdhci.c Sat Feb 4 19:35:38 2017 (r313250) @@ -55,18 +55,19 @@ __FBSDID("$FreeBSD$"); SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLAG_RD, 0, "sdhci driver"); static int sdhci_debug; -SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, "Debug level"); +SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, + "Debug level"); -#define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off)) -#define RD2(slot, off) SDHCI_READ_2((slot)->bus, (slot), (off)) -#define RD4(slot, off) SDHCI_READ_4((slot)->bus, (slot), (off)) -#define RD_MULTI_4(slot, off, ptr, count) \ +#define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off)) +#define RD2(slot, off) SDHCI_READ_2((slot)->bus, (slot), (off)) +#define RD4(slot, off) SDHCI_READ_4((slot)->bus, (slot), (off)) +#define RD_MULTI_4(slot, off, ptr, count) \ SDHCI_READ_MULTI_4((slot)->bus, (slot), (off), (ptr), (count)) -#define WR1(slot, off, val) SDHCI_WRITE_1((slot)->bus, (slot), (off), (val)) -#define WR2(slot, off, val) SDHCI_WRITE_2((slot)->bus, (slot), (off), (val)) -#define WR4(slot, off, val) SDHCI_WRITE_4((slot)->bus, (slot), (off), (val)) -#define WR_MULTI_4(slot, off, ptr, count) \ +#define WR1(slot, off, val) SDHCI_WRITE_1((slot)->bus, (slot), (off), (val)) +#define WR2(slot, off, val) SDHCI_WRITE_2((slot)->bus, (slot), (off), (val)) +#define WR4(slot, off, val) SDHCI_WRITE_4((slot)->bus, (slot), (off), (val)) +#define WR_MULTI_4(slot, off, ptr, count) \ SDHCI_WRITE_MULTI_4((slot)->bus, (slot), (off), (ptr), (count)) static void sdhci_set_clock(struct sdhci_slot *slot, uint32_t clock); @@ -77,13 +78,13 @@ static void sdhci_card_poll(void *); static void sdhci_card_task(void *, int); /* helper routines */ -#define SDHCI_LOCK(_slot) mtx_lock(&(_slot)->mtx) +#define SDHCI_LOCK(_slot) mtx_lock(&(_slot)->mtx) #define SDHCI_UNLOCK(_slot) mtx_unlock(&(_slot)->mtx) -#define SDHCI_LOCK_INIT(_slot) \ +#define SDHCI_LOCK_INIT(_slot) \ mtx_init(&_slot->mtx, "SD slot mtx", "sdhci", MTX_DEF) -#define SDHCI_LOCK_DESTROY(_slot) mtx_destroy(&_slot->mtx); -#define SDHCI_ASSERT_LOCKED(_slot) mtx_assert(&_slot->mtx, MA_OWNED); -#define SDHCI_ASSERT_UNLOCKED(_slot) mtx_assert(&_slot->mtx, MA_NOTOWNED); +#define SDHCI_LOCK_DESTROY(_slot) mtx_destroy(&_slot->mtx); +#define SDHCI_ASSERT_LOCKED(_slot) mtx_assert(&_slot->mtx, MA_OWNED); +#define SDHCI_ASSERT_UNLOCKED(_slot) mtx_assert(&_slot->mtx, MA_NOTOWNED); #define SDHCI_DEFAULT_MAX_FREQ 50 @@ -97,20 +98,20 @@ static void sdhci_card_task(void *, int) * Broadcom BCM577xx Controller Constants */ /* Maximum divider supported by the default clock source. */ -#define BCM577XX_DEFAULT_MAX_DIVIDER 256 +#define BCM577XX_DEFAULT_MAX_DIVIDER 256 /* Alternative clock's base frequency. */ -#define BCM577XX_ALT_CLOCK_BASE 63000000 - -#define BCM577XX_HOST_CONTROL 0x198 -#define BCM577XX_CTRL_CLKSEL_MASK 0xFFFFCFFF -#define BCM577XX_CTRL_CLKSEL_SHIFT 12 -#define BCM577XX_CTRL_CLKSEL_DEFAULT 0x0 -#define BCM577XX_CTRL_CLKSEL_64MHZ 0x3 +#define BCM577XX_ALT_CLOCK_BASE 63000000 +#define BCM577XX_HOST_CONTROL 0x198 +#define BCM577XX_CTRL_CLKSEL_MASK 0xFFFFCFFF +#define BCM577XX_CTRL_CLKSEL_SHIFT 12 +#define BCM577XX_CTRL_CLKSEL_DEFAULT 0x0 +#define BCM577XX_CTRL_CLKSEL_64MHZ 0x3 static void sdhci_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { + if (error != 0) { printf("getaddr: error %d\n", error); return; @@ -136,6 +137,7 @@ slot_printf(struct sdhci_slot *slot, con static void sdhci_dumpregs(struct sdhci_slot *slot) { + slot_printf(slot, "============== REGISTER DUMP ==============\n"); @@ -498,9 +500,10 @@ sdhci_transfer_pio(struct sdhci_slot *sl } static void -sdhci_card_task(void *arg, int pending) +sdhci_card_task(void *arg, int pending __unused) { struct sdhci_slot *slot = arg; + device_t d; SDHCI_LOCK(slot); if (SDHCI_GET_CARD_PRESENT(slot->bus, slot)) { @@ -519,7 +522,7 @@ sdhci_card_task(void *arg, int pending) /* If no card present - detach mmc bus. */ if (bootverbose || sdhci_debug) slot_printf(slot, "Card removed\n"); - device_t d = slot->dev; + d = slot->dev; slot->dev = NULL; SDHCI_UNLOCK(slot); device_delete_child(slot->bus, d); @@ -739,6 +742,7 @@ sdhci_init_slot(device_t dev, struct sdh void sdhci_start_slot(struct sdhci_slot *slot) { + sdhci_card_task(slot, 0); } @@ -774,6 +778,7 @@ sdhci_cleanup_slot(struct sdhci_slot *sl int sdhci_generic_suspend(struct sdhci_slot *slot) { + sdhci_reset(slot, SDHCI_RESET_ALL); return (0); @@ -782,6 +787,7 @@ sdhci_generic_suspend(struct sdhci_slot int sdhci_generic_resume(struct sdhci_slot *slot) { + sdhci_init(slot); return (0); @@ -790,6 +796,7 @@ sdhci_generic_resume(struct sdhci_slot * uint32_t sdhci_generic_min_freq(device_t brdev, struct sdhci_slot *slot) { + if (slot->version >= SDHCI_SPEC_300) return (slot->max_clk / SDHCI_300_MAX_DIVIDER); else @@ -869,7 +876,7 @@ sdhci_timeout(void *arg) if (slot->curcmd != NULL) { slot_printf(slot, " Controller timeout\n"); sdhci_dumpregs(slot); - sdhci_reset(slot, SDHCI_RESET_CMD|SDHCI_RESET_DATA); + sdhci_reset(slot, SDHCI_RESET_CMD | SDHCI_RESET_DATA); slot->curcmd->error = MMC_ERR_TIMEOUT; sdhci_req_done(slot); } else { @@ -1122,6 +1129,7 @@ void sdhci_finish_data(struct sdhci_slot *slot) { struct mmc_data *data = slot->curcmd->data; + size_t left; /* Interrupt aggregation: Restore command interrupt. * Auxiliary restore point for the case when data interrupt @@ -1133,7 +1141,7 @@ sdhci_finish_data(struct sdhci_slot *slo /* Unload rest of data from DMA buffer. */ if (!slot->data_done && (slot->flags & SDHCI_USE_DMA)) { if (data->flags & MMC_DATA_READ) { - size_t left = data->len - slot->offset; + left = data->len - slot->offset; bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_POSTREAD); memcpy((u_char*)data->data + slot->offset, slot->dmamem, @@ -1433,7 +1441,7 @@ sdhci_generic_intr(struct sdhci_slot *sl /* Handle data interrupts. */ if (intmask & SDHCI_INT_DATA_MASK) { WR4(slot, SDHCI_INT_STATUS, intmask & SDHCI_INT_DATA_MASK); - /* Dont call data_irq in case of errored command */ + /* Don't call data_irq in case of errored command. */ if ((intmask & SDHCI_INT_CMD_ERROR_MASK) == 0) sdhci_data_irq(slot, intmask & SDHCI_INT_DATA_MASK); } Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sat Feb 4 19:16:19 2017 (r313249) +++ head/sys/dev/sdhci/sdhci.h Sat Feb 4 19:35:38 2017 (r313250) @@ -28,246 +28,246 @@ #ifndef __SDHCI_H__ #define __SDHCI_H__ -#define DMA_BLOCK_SIZE 4096 -#define DMA_BOUNDARY 0 /* DMA reload every 4K */ +#define DMA_BLOCK_SIZE 4096 +#define DMA_BOUNDARY 0 /* DMA reload every 4K */ /* Controller doesn't honor resets unless we touch the clock register */ -#define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0) +#define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1 << 0) /* Controller really supports DMA */ -#define SDHCI_QUIRK_FORCE_DMA (1<<1) +#define SDHCI_QUIRK_FORCE_DMA (1 << 1) /* Controller has unusable DMA engine */ -#define SDHCI_QUIRK_BROKEN_DMA (1<<2) +#define SDHCI_QUIRK_BROKEN_DMA (1 << 2) /* Controller doesn't like to be reset when there is no card inserted. */ -#define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<3) +#define SDHCI_QUIRK_NO_CARD_NO_RESET (1 << 3) /* Controller has flaky internal state so reset it on each ios change */ -#define SDHCI_QUIRK_RESET_ON_IOS (1<<4) +#define SDHCI_QUIRK_RESET_ON_IOS (1 << 4) /* Controller can only DMA chunk sizes that are a multiple of 32 bits */ -#define SDHCI_QUIRK_32BIT_DMA_SIZE (1<<5) +#define SDHCI_QUIRK_32BIT_DMA_SIZE (1 << 5) /* Controller needs to be reset after each request to stay stable */ -#define SDHCI_QUIRK_RESET_AFTER_REQUEST (1<<6) +#define SDHCI_QUIRK_RESET_AFTER_REQUEST (1 << 6) /* Controller has an off-by-one issue with timeout value */ -#define SDHCI_QUIRK_INCR_TIMEOUT_CONTROL (1<<7) +#define SDHCI_QUIRK_INCR_TIMEOUT_CONTROL (1 << 7) /* Controller has broken read timings */ -#define SDHCI_QUIRK_BROKEN_TIMINGS (1<<8) +#define SDHCI_QUIRK_BROKEN_TIMINGS (1 << 8) /* Controller needs lowered frequency */ -#define SDHCI_QUIRK_LOWER_FREQUENCY (1<<9) +#define SDHCI_QUIRK_LOWER_FREQUENCY (1 << 9) /* Data timeout is invalid, should use SD clock */ -#define SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK (1<<10) +#define SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK (1 << 10) /* Timeout value is invalid, should be overriden */ -#define SDHCI_QUIRK_BROKEN_TIMEOUT_VAL (1<<11) +#define SDHCI_QUIRK_BROKEN_TIMEOUT_VAL (1 << 11) /* SDHCI_CAPABILITIES is invalid */ -#define SDHCI_QUIRK_MISSING_CAPS (1<<12) +#define SDHCI_QUIRK_MISSING_CAPS (1 << 12) /* Hardware shifts the 136-bit response, don't do it in software. */ -#define SDHCI_QUIRK_DONT_SHIFT_RESPONSE (1<<13) +#define SDHCI_QUIRK_DONT_SHIFT_RESPONSE (1 << 13) /* Wait to see reset bit asserted before waiting for de-asserted */ -#define SDHCI_QUIRK_WAITFOR_RESET_ASSERTED (1<<14) +#define SDHCI_QUIRK_WAITFOR_RESET_ASSERTED (1 << 14) /* Leave controller in standard mode when putting card in HS mode. */ -#define SDHCI_QUIRK_DONT_SET_HISPD_BIT (1<<15) +#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) +#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) +#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) +#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) +#define SDHCI_QUIRK_DATA_TIMEOUT_1MHZ (1 << 20) /* * Controller registers */ -#define SDHCI_DMA_ADDRESS 0x00 +#define SDHCI_DMA_ADDRESS 0x00 -#define SDHCI_BLOCK_SIZE 0x04 -#define SDHCI_MAKE_BLKSZ(dma, blksz) (((dma & 0x7) << 12) | (blksz & 0xFFF)) +#define SDHCI_BLOCK_SIZE 0x04 +#define SDHCI_MAKE_BLKSZ(dma, blksz) (((dma & 0x7) << 12) | (blksz & 0xFFF)) -#define SDHCI_BLOCK_COUNT 0x06 +#define SDHCI_BLOCK_COUNT 0x06 -#define SDHCI_ARGUMENT 0x08 +#define SDHCI_ARGUMENT 0x08 -#define SDHCI_TRANSFER_MODE 0x0C -#define SDHCI_TRNS_DMA 0x01 -#define SDHCI_TRNS_BLK_CNT_EN 0x02 -#define SDHCI_TRNS_ACMD12 0x04 -#define SDHCI_TRNS_READ 0x10 -#define SDHCI_TRNS_MULTI 0x20 - -#define SDHCI_COMMAND_FLAGS 0x0E -#define SDHCI_CMD_RESP_NONE 0x00 -#define SDHCI_CMD_RESP_LONG 0x01 -#define SDHCI_CMD_RESP_SHORT 0x02 -#define SDHCI_CMD_RESP_SHORT_BUSY 0x03 -#define SDHCI_CMD_RESP_MASK 0x03 -#define SDHCI_CMD_CRC 0x08 -#define SDHCI_CMD_INDEX 0x10 -#define SDHCI_CMD_DATA 0x20 -#define SDHCI_CMD_TYPE_NORMAL 0x00 -#define SDHCI_CMD_TYPE_SUSPEND 0x40 -#define SDHCI_CMD_TYPE_RESUME 0x80 -#define SDHCI_CMD_TYPE_ABORT 0xc0 -#define SDHCI_CMD_TYPE_MASK 0xc0 - -#define SDHCI_COMMAND 0x0F - -#define SDHCI_RESPONSE 0x10 - -#define SDHCI_BUFFER 0x20 - -#define SDHCI_PRESENT_STATE 0x24 -#define SDHCI_CMD_INHIBIT 0x00000001 -#define SDHCI_DAT_INHIBIT 0x00000002 -#define SDHCI_DAT_ACTIVE 0x00000004 -#define SDHCI_RETUNE_REQUEST 0x00000008 -#define SDHCI_DOING_WRITE 0x00000100 -#define SDHCI_DOING_READ 0x00000200 -#define SDHCI_SPACE_AVAILABLE 0x00000400 -#define SDHCI_DATA_AVAILABLE 0x00000800 -#define SDHCI_CARD_PRESENT 0x00010000 -#define SDHCI_CARD_STABLE 0x00020000 -#define SDHCI_CARD_PIN 0x00040000 -#define SDHCI_WRITE_PROTECT 0x00080000 -#define SDHCI_STATE_DAT_MASK 0x00f00000 -#define SDHCI_STATE_CMD 0x01000000 - -#define SDHCI_HOST_CONTROL 0x28 -#define SDHCI_CTRL_LED 0x01 -#define SDHCI_CTRL_4BITBUS 0x02 -#define SDHCI_CTRL_HISPD 0x04 -#define SDHCI_CTRL_SDMA 0x08 -#define SDHCI_CTRL_ADMA2 0x10 -#define SDHCI_CTRL_ADMA264 0x18 -#define SDHCI_CTRL_DMA_MASK 0x18 -#define SDHCI_CTRL_8BITBUS 0x20 -#define SDHCI_CTRL_CARD_DET 0x40 -#define SDHCI_CTRL_FORCE_CARD 0x80 - -#define SDHCI_POWER_CONTROL 0x29 -#define SDHCI_POWER_ON 0x01 -#define SDHCI_POWER_180 0x0A -#define SDHCI_POWER_300 0x0C -#define SDHCI_POWER_330 0x0E - -#define SDHCI_BLOCK_GAP_CONTROL 0x2A - -#define SDHCI_WAKE_UP_CONTROL 0x2B - -#define SDHCI_CLOCK_CONTROL 0x2C -#define SDHCI_DIVIDER_MASK 0xff -#define SDHCI_DIVIDER_MASK_LEN 8 -#define SDHCI_DIVIDER_SHIFT 8 -#define SDHCI_DIVIDER_HI_MASK 3 -#define SDHCI_DIVIDER_HI_SHIFT 6 -#define SDHCI_CLOCK_CARD_EN 0x0004 -#define SDHCI_CLOCK_INT_STABLE 0x0002 -#define SDHCI_CLOCK_INT_EN 0x0001 -#define SDHCI_DIVIDERS_MASK \ +#define SDHCI_TRANSFER_MODE 0x0C +#define SDHCI_TRNS_DMA 0x01 +#define SDHCI_TRNS_BLK_CNT_EN 0x02 +#define SDHCI_TRNS_ACMD12 0x04 +#define SDHCI_TRNS_READ 0x10 +#define SDHCI_TRNS_MULTI 0x20 + +#define SDHCI_COMMAND_FLAGS 0x0E +#define SDHCI_CMD_RESP_NONE 0x00 +#define SDHCI_CMD_RESP_LONG 0x01 +#define SDHCI_CMD_RESP_SHORT 0x02 +#define SDHCI_CMD_RESP_SHORT_BUSY 0x03 +#define SDHCI_CMD_RESP_MASK 0x03 +#define SDHCI_CMD_CRC 0x08 +#define SDHCI_CMD_INDEX 0x10 +#define SDHCI_CMD_DATA 0x20 +#define SDHCI_CMD_TYPE_NORMAL 0x00 +#define SDHCI_CMD_TYPE_SUSPEND 0x40 +#define SDHCI_CMD_TYPE_RESUME 0x80 +#define SDHCI_CMD_TYPE_ABORT 0xc0 +#define SDHCI_CMD_TYPE_MASK 0xc0 + +#define SDHCI_COMMAND 0x0F + +#define SDHCI_RESPONSE 0x10 + +#define SDHCI_BUFFER 0x20 + +#define SDHCI_PRESENT_STATE 0x24 +#define SDHCI_CMD_INHIBIT 0x00000001 +#define SDHCI_DAT_INHIBIT 0x00000002 +#define SDHCI_DAT_ACTIVE 0x00000004 +#define SDHCI_RETUNE_REQUEST 0x00000008 +#define SDHCI_DOING_WRITE 0x00000100 +#define SDHCI_DOING_READ 0x00000200 +#define SDHCI_SPACE_AVAILABLE 0x00000400 +#define SDHCI_DATA_AVAILABLE 0x00000800 +#define SDHCI_CARD_PRESENT 0x00010000 +#define SDHCI_CARD_STABLE 0x00020000 +#define SDHCI_CARD_PIN 0x00040000 +#define SDHCI_WRITE_PROTECT 0x00080000 +#define SDHCI_STATE_DAT_MASK 0x00f00000 +#define SDHCI_STATE_CMD 0x01000000 + +#define SDHCI_HOST_CONTROL 0x28 +#define SDHCI_CTRL_LED 0x01 +#define SDHCI_CTRL_4BITBUS 0x02 +#define SDHCI_CTRL_HISPD 0x04 +#define SDHCI_CTRL_SDMA 0x08 +#define SDHCI_CTRL_ADMA2 0x10 +#define SDHCI_CTRL_ADMA264 0x18 +#define SDHCI_CTRL_DMA_MASK 0x18 +#define SDHCI_CTRL_8BITBUS 0x20 +#define SDHCI_CTRL_CARD_DET 0x40 +#define SDHCI_CTRL_FORCE_CARD 0x80 + +#define SDHCI_POWER_CONTROL 0x29 +#define SDHCI_POWER_ON 0x01 +#define SDHCI_POWER_180 0x0A +#define SDHCI_POWER_300 0x0C +#define SDHCI_POWER_330 0x0E + +#define SDHCI_BLOCK_GAP_CONTROL 0x2A + +#define SDHCI_WAKE_UP_CONTROL 0x2B + +#define SDHCI_CLOCK_CONTROL 0x2C +#define SDHCI_DIVIDER_MASK 0xff +#define SDHCI_DIVIDER_MASK_LEN 8 +#define SDHCI_DIVIDER_SHIFT 8 +#define SDHCI_DIVIDER_HI_MASK 3 +#define SDHCI_DIVIDER_HI_SHIFT 6 +#define SDHCI_CLOCK_CARD_EN 0x0004 +#define SDHCI_CLOCK_INT_STABLE 0x0002 +#define SDHCI_CLOCK_INT_EN 0x0001 +#define SDHCI_DIVIDERS_MASK \ ((SDHCI_DIVIDER_MASK << SDHCI_DIVIDER_SHIFT) | \ (SDHCI_DIVIDER_HI_MASK << SDHCI_DIVIDER_HI_SHIFT)) -#define SDHCI_TIMEOUT_CONTROL 0x2E +#define SDHCI_TIMEOUT_CONTROL 0x2E -#define SDHCI_SOFTWARE_RESET 0x2F -#define SDHCI_RESET_ALL 0x01 -#define SDHCI_RESET_CMD 0x02 -#define SDHCI_RESET_DATA 0x04 - -#define SDHCI_INT_STATUS 0x30 -#define SDHCI_INT_ENABLE 0x34 -#define SDHCI_SIGNAL_ENABLE 0x38 -#define SDHCI_INT_RESPONSE 0x00000001 -#define SDHCI_INT_DATA_END 0x00000002 -#define SDHCI_INT_BLOCK_GAP 0x00000004 -#define SDHCI_INT_DMA_END 0x00000008 -#define SDHCI_INT_SPACE_AVAIL 0x00000010 -#define SDHCI_INT_DATA_AVAIL 0x00000020 -#define SDHCI_INT_CARD_INSERT 0x00000040 -#define SDHCI_INT_CARD_REMOVE 0x00000080 -#define SDHCI_INT_CARD_INT 0x00000100 -#define SDHCI_INT_INT_A 0x00000200 -#define SDHCI_INT_INT_B 0x00000400 -#define SDHCI_INT_INT_C 0x00000800 -#define SDHCI_INT_RETUNE 0x00001000 -#define SDHCI_INT_ERROR 0x00008000 -#define SDHCI_INT_TIMEOUT 0x00010000 -#define SDHCI_INT_CRC 0x00020000 -#define SDHCI_INT_END_BIT 0x00040000 -#define SDHCI_INT_INDEX 0x00080000 -#define SDHCI_INT_DATA_TIMEOUT 0x00100000 -#define SDHCI_INT_DATA_CRC 0x00200000 -#define SDHCI_INT_DATA_END_BIT 0x00400000 -#define SDHCI_INT_BUS_POWER 0x00800000 -#define SDHCI_INT_ACMD12ERR 0x01000000 -#define SDHCI_INT_ADMAERR 0x02000000 -#define SDHCI_INT_TUNEERR 0x04000000 +#define SDHCI_SOFTWARE_RESET 0x2F +#define SDHCI_RESET_ALL 0x01 +#define SDHCI_RESET_CMD 0x02 +#define SDHCI_RESET_DATA 0x04 + +#define SDHCI_INT_STATUS 0x30 +#define SDHCI_INT_ENABLE 0x34 +#define SDHCI_SIGNAL_ENABLE 0x38 +#define SDHCI_INT_RESPONSE 0x00000001 +#define SDHCI_INT_DATA_END 0x00000002 +#define SDHCI_INT_BLOCK_GAP 0x00000004 +#define SDHCI_INT_DMA_END 0x00000008 +#define SDHCI_INT_SPACE_AVAIL 0x00000010 +#define SDHCI_INT_DATA_AVAIL 0x00000020 +#define SDHCI_INT_CARD_INSERT 0x00000040 +#define SDHCI_INT_CARD_REMOVE 0x00000080 +#define SDHCI_INT_CARD_INT 0x00000100 +#define SDHCI_INT_INT_A 0x00000200 +#define SDHCI_INT_INT_B 0x00000400 +#define SDHCI_INT_INT_C 0x00000800 +#define SDHCI_INT_RETUNE 0x00001000 +#define SDHCI_INT_ERROR 0x00008000 +#define SDHCI_INT_TIMEOUT 0x00010000 +#define SDHCI_INT_CRC 0x00020000 +#define SDHCI_INT_END_BIT 0x00040000 +#define SDHCI_INT_INDEX 0x00080000 +#define SDHCI_INT_DATA_TIMEOUT 0x00100000 +#define SDHCI_INT_DATA_CRC 0x00200000 +#define SDHCI_INT_DATA_END_BIT 0x00400000 +#define SDHCI_INT_BUS_POWER 0x00800000 +#define SDHCI_INT_ACMD12ERR 0x01000000 +#define SDHCI_INT_ADMAERR 0x02000000 +#define SDHCI_INT_TUNEERR 0x04000000 -#define SDHCI_INT_NORMAL_MASK 0x00007FFF -#define SDHCI_INT_ERROR_MASK 0xFFFF8000 +#define SDHCI_INT_NORMAL_MASK 0x00007FFF +#define SDHCI_INT_ERROR_MASK 0xFFFF8000 -#define SDHCI_INT_CMD_ERROR_MASK (SDHCI_INT_TIMEOUT | \ +#define SDHCI_INT_CMD_ERROR_MASK (SDHCI_INT_TIMEOUT | \ SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX) -#define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_CMD_ERROR_MASK) +#define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_CMD_ERROR_MASK) -#define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ +#define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \ SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ SDHCI_INT_DATA_END_BIT) -#define SDHCI_ACMD12_ERR 0x3C -#define SDHCI_HOST_CONTROL2 0x3E +#define SDHCI_ACMD12_ERR 0x3C +#define SDHCI_HOST_CONTROL2 0x3E -#define SDHCI_CAPABILITIES 0x40 -#define SDHCI_TIMEOUT_CLK_MASK 0x0000003F -#define SDHCI_TIMEOUT_CLK_SHIFT 0 -#define SDHCI_TIMEOUT_CLK_UNIT 0x00000080 -#define SDHCI_CLOCK_BASE_MASK 0x00003F00 -#define SDHCI_CLOCK_V3_BASE_MASK 0x0000FF00 -#define SDHCI_CLOCK_BASE_SHIFT 8 -#define SDHCI_MAX_BLOCK_MASK 0x00030000 -#define SDHCI_MAX_BLOCK_SHIFT 16 -#define SDHCI_CAN_DO_8BITBUS 0x00040000 -#define SDHCI_CAN_DO_ADMA2 0x00080000 -#define SDHCI_CAN_DO_HISPD 0x00200000 -#define SDHCI_CAN_DO_DMA 0x00400000 -#define SDHCI_CAN_DO_SUSPEND 0x00800000 -#define SDHCI_CAN_VDD_330 0x01000000 -#define SDHCI_CAN_VDD_300 0x02000000 -#define SDHCI_CAN_VDD_180 0x04000000 -#define SDHCI_CAN_DO_64BIT 0x10000000 -#define SDHCI_CAN_ASYNC_INTR 0x20000000 - -#define SDHCI_CAPABILITIES2 0x44 -#define SDHCI_CAN_SDR50 0x00000001 -#define SDHCI_CAN_SDR104 0x00000002 -#define SDHCI_CAN_DDR50 0x00000004 -#define SDHCI_CAN_DRIVE_TYPE_A 0x00000010 -#define SDHCI_CAN_DRIVE_TYPE_B 0x00000020 -#define SDHCI_CAN_DRIVE_TYPE_C 0x00000040 -#define SDHCI_RETUNE_CNT_MASK 0x00000F00 -#define SDHCI_RETUNE_CNT_SHIFT 8 -#define SDHCI_TUNE_SDR50 0x00002000 -#define SDHCI_RETUNE_MODES_MASK 0x0000C000 -#define SDHCI_RETUNE_MODES_SHIFT 14 -#define SDHCI_CLOCK_MULT_MASK 0x00FF0000 -#define SDHCI_CLOCK_MULT_SHIFT 16 - -#define SDHCI_MAX_CURRENT 0x48 -#define SDHCI_FORCE_AUTO_EVENT 0x50 -#define SDHCI_FORCE_INTR_EVENT 0x52 -#define SDHCI_ADMA_ERR 0x54 -#define SDHCI_ADMA_ADDRESS_LOW 0x58 -#define SDHCI_ADMA_ADDRESS_HI 0x5C -#define SDHCI_PRESET_VALUE 0x60 -#define SDHCI_SHARED_BUS_CTRL 0xE0 - -#define SDHCI_SLOT_INT_STATUS 0xFC - -#define SDHCI_HOST_VERSION 0xFE -#define SDHCI_VENDOR_VER_MASK 0xFF00 -#define SDHCI_VENDOR_VER_SHIFT 8 -#define SDHCI_SPEC_VER_MASK 0x00FF -#define SDHCI_SPEC_VER_SHIFT 0 +#define SDHCI_CAPABILITIES 0x40 +#define SDHCI_TIMEOUT_CLK_MASK 0x0000003F +#define SDHCI_TIMEOUT_CLK_SHIFT 0 +#define SDHCI_TIMEOUT_CLK_UNIT 0x00000080 +#define SDHCI_CLOCK_BASE_MASK 0x00003F00 +#define SDHCI_CLOCK_V3_BASE_MASK 0x0000FF00 +#define SDHCI_CLOCK_BASE_SHIFT 8 +#define SDHCI_MAX_BLOCK_MASK 0x00030000 +#define SDHCI_MAX_BLOCK_SHIFT 16 +#define SDHCI_CAN_DO_8BITBUS 0x00040000 +#define SDHCI_CAN_DO_ADMA2 0x00080000 +#define SDHCI_CAN_DO_HISPD 0x00200000 +#define SDHCI_CAN_DO_DMA 0x00400000 +#define SDHCI_CAN_DO_SUSPEND 0x00800000 +#define SDHCI_CAN_VDD_330 0x01000000 +#define SDHCI_CAN_VDD_300 0x02000000 +#define SDHCI_CAN_VDD_180 0x04000000 +#define SDHCI_CAN_DO_64BIT 0x10000000 +#define SDHCI_CAN_ASYNC_INTR 0x20000000 + +#define SDHCI_CAPABILITIES2 0x44 +#define SDHCI_CAN_SDR50 0x00000001 +#define SDHCI_CAN_SDR104 0x00000002 +#define SDHCI_CAN_DDR50 0x00000004 +#define SDHCI_CAN_DRIVE_TYPE_A 0x00000010 +#define SDHCI_CAN_DRIVE_TYPE_B 0x00000020 +#define SDHCI_CAN_DRIVE_TYPE_C 0x00000040 +#define SDHCI_RETUNE_CNT_MASK 0x00000F00 +#define SDHCI_RETUNE_CNT_SHIFT 8 +#define SDHCI_TUNE_SDR50 0x00002000 +#define SDHCI_RETUNE_MODES_MASK 0x0000C000 +#define SDHCI_RETUNE_MODES_SHIFT 14 +#define SDHCI_CLOCK_MULT_MASK 0x00FF0000 +#define SDHCI_CLOCK_MULT_SHIFT 16 + +#define SDHCI_MAX_CURRENT 0x48 +#define SDHCI_FORCE_AUTO_EVENT 0x50 +#define SDHCI_FORCE_INTR_EVENT 0x52 +#define SDHCI_ADMA_ERR 0x54 +#define SDHCI_ADMA_ADDRESS_LOW 0x58 +#define SDHCI_ADMA_ADDRESS_HI 0x5C +#define SDHCI_PRESET_VALUE 0x60 +#define SDHCI_SHARED_BUS_CTRL 0xE0 + +#define SDHCI_SLOT_INT_STATUS 0xFC + +#define SDHCI_HOST_VERSION 0xFE +#define SDHCI_VENDOR_VER_MASK 0xFF00 +#define SDHCI_VENDOR_VER_SHIFT 8 +#define SDHCI_SPEC_VER_MASK 0x00FF +#define SDHCI_SPEC_VER_SHIFT 0 #define SDHCI_SPEC_100 0 #define SDHCI_SPEC_200 1 #define SDHCI_SPEC_300 2 @@ -310,10 +310,10 @@ struct sdhci_slot { u_char cmd_done; /* CMD command part done flag */ u_char data_done; /* DAT command part done flag */ u_char flags; /* Request execution flags */ -#define CMD_STARTED 1 -#define STOP_STARTED 2 -#define SDHCI_USE_DMA 4 /* Use DMA for this req. */ -#define PLATFORM_DATA_STARTED 8 /* Data xfer is handled by platform */ +#define CMD_STARTED 1 +#define STOP_STARTED 2 +#define SDHCI_USE_DMA 4 /* Use DMA for this req. */ +#define PLATFORM_DATA_STARTED 8 /* Data xfer is handled by platform */ struct mtx mtx; /* Slot mutex */ }; Modified: head/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- head/sys/dev/sdhci/sdhci_fdt.c Sat Feb 4 19:16:19 2017 (r313249) +++ head/sys/dev/sdhci/sdhci_fdt.c Sat Feb 4 19:35:38 2017 (r313250) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include "mmcbr_if.h" #include "sdhci_if.h" -#define MAX_SLOTS 6 +#define MAX_SLOTS 6 struct sdhci_fdt_softc { device_t dev; /* Controller device */ @@ -68,7 +68,7 @@ struct sdhci_fdt_softc { u_int caps; /* If we override SDHCI_CAPABILITIES */ uint32_t max_clk; /* Max possible freq */ struct resource *irq_res; /* IRQ resource */ - void *intrhand; /* Interrupt handle */ + void *intrhand; /* Interrupt handle */ int num_slots; /* Number of slots on this controller*/ struct sdhci_slot slots[MAX_SLOTS]; @@ -79,14 +79,16 @@ static uint8_t sdhci_fdt_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + return (bus_read_1(sc->mem_res[slot->num], off)); } static void sdhci_fdt_write_1(device_t dev, struct sdhci_slot *slot, bus_size_t off, - uint8_t val) + uint8_t val) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + bus_write_1(sc->mem_res[slot->num], off, val); } @@ -94,14 +96,16 @@ static uint16_t sdhci_fdt_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t off) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + return (bus_read_2(sc->mem_res[slot->num], off)); } static void sdhci_fdt_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, - uint16_t val) + uint16_t val) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + bus_write_2(sc->mem_res[slot->num], off, val); } @@ -109,14 +113,16 @@ static uint32_t sdhci_fdt_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + return (bus_read_4(sc->mem_res[slot->num], off)); } static void sdhci_fdt_write_4(device_t dev, struct sdhci_slot *slot, bus_size_t off, - uint32_t val) + uint32_t val) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + bus_write_4(sc->mem_res[slot->num], off, val); } @@ -125,6 +131,7 @@ sdhci_fdt_read_multi_4(device_t dev, str bus_size_t off, uint32_t *data, bus_size_t count) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + bus_read_multi_4(sc->mem_res[slot->num], off, data, count); } @@ -133,6 +140,7 @@ sdhci_fdt_write_multi_4(device_t dev, st bus_size_t off, uint32_t *data, bus_size_t count) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + bus_write_multi_4(sc->mem_res[slot->num], off, data, count); } @@ -142,10 +150,8 @@ sdhci_fdt_intr(void *arg) struct sdhci_fdt_softc *sc = (struct sdhci_fdt_softc *)arg; int i; - for (i = 0; i < sc->num_slots; i++) { - struct sdhci_slot *slot = &sc->slots[i]; - sdhci_generic_intr(slot); - } + for (i = 0; i < sc->num_slots; i++) + sdhci_generic_intr(&sc->slots[i]); } static int @@ -187,6 +193,7 @@ static int sdhci_fdt_attach(device_t dev) { struct sdhci_fdt_softc *sc = device_get_softc(dev); + struct sdhci_slot *slot; int err, slots, rid, i; sc->dev = dev; @@ -194,7 +201,7 @@ sdhci_fdt_attach(device_t dev) /* Allocate IRQ. */ rid = 0; sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_ACTIVE); + RF_ACTIVE); if (sc->irq_res == NULL) { device_printf(dev, "Can't allocate IRQ\n"); return (ENOMEM); @@ -204,15 +211,15 @@ sdhci_fdt_attach(device_t dev) slots = sc->num_slots; /* number of slots determined in probe(). */ sc->num_slots = 0; for (i = 0; i < slots; i++) { - struct sdhci_slot *slot = &sc->slots[sc->num_slots]; + slot = &sc->slots[sc->num_slots]; /* Allocate memory. */ rid = 0; sc->mem_res[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem_res[i] == NULL) { - device_printf(dev, "Can't allocate memory for " - "slot %d\n", i); + device_printf(dev, + "Can't allocate memory for slot %d\n", i); continue; } @@ -236,10 +243,8 @@ sdhci_fdt_attach(device_t dev) } /* Process cards detection. */ - for (i = 0; i < sc->num_slots; i++) { - struct sdhci_slot *slot = &sc->slots[i]; - sdhci_start_slot(slot); - } + for (i = 0; i < sc->num_slots; i++) + sdhci_start_slot(&sc->slots[i]); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Feb 4 19:54:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23FEECD14E0; Sat, 4 Feb 2017 19:54:55 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D300CADD; Sat, 4 Feb 2017 19:54:54 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-oi0-x22e.google.com with SMTP id s203so28930263oie.1; Sat, 04 Feb 2017 11:54:54 -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=18RR8Gc0wtR4qq87ghFluNik2juWBFQQO57H36KkeMw=; b=fbzRJq4wxBPb8ZvQBY3c6LcQbd2s2EUWLo2Q0NS50484wV64OcK7VEDB81nAxdwtz7 Ebv6FXPQHbExvhYMmu6BE+TuEWfRz/WM8E1UJmLIIq2Tc0YI4/b3I2huuNcaL0zmnxPa vd5+8Hf52lZJq3zy8cOX8QB9IOIPjbQeH7J3ekBon1BQjOi/WwvWrPDjAivWz7Gg7+9R Z3w3o5AQy+NVc1SYP+W+Fo9SvC8+dT3bDzJHaCWEnP02e1jlWWCMStjJ9CjtQu7Br/7G l3l4mG6x1Qc5Glmhzfwzc4TF8zMEibgPJUT5ooK/jnHhd/ZTLWJHvVWEumGzuLrKY8xg Z5jA== 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=18RR8Gc0wtR4qq87ghFluNik2juWBFQQO57H36KkeMw=; b=jpYUh9/k5C/zRj/h1hWHPP+Rh52d3BfGg/HlCqse81S6yPSCZ6EWF8ptozU46AdrZH HAZkQ0NI06MaotNVCSzOo3ssYJu1hMR4ujX3TBMfVJnSygkTANc77ac36y0lqKzLMkfU xKhQmwC8vvgG+MWExEgX+5csenUTu9mRujuKlSUXpShonPsTAAvaJCpRsFZtCvCOnfZ1 QyxjaE3AZ5U04o4+NDOJITtk/WoOE1k/unb2jcjIcxfP8NomiMkrwAyNmneFKuO39bNi GYYldpGLe/XPJuLY9DlPRx5YT2KmIIDkX4vpIxLI97lk67U1zW1uUl/6KFWaQFM2ATFO es0g== X-Gm-Message-State: AMke39lmpypCiNd/DIaT4YD7uskj0cMsxJ+N9h5S/HLBVBP7Ev3tSaV+l7K7KT31X69Gg5HAAmK/Mg4yhChtFA== X-Received: by 10.202.105.70 with SMTP id e67mr1864187oic.26.1486238094117; Sat, 04 Feb 2017 11:54:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.51.7 with HTTP; Sat, 4 Feb 2017 11:54:53 -0800 (PST) In-Reply-To: <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> From: Jason Harmening Date: Sat, 4 Feb 2017 11:54:53 -0800 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Andreas Tobler Cc: Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 19:54:55 -0000 I suspect this broke rmlocks for mips because the rmlock implementation takes the address of the per-CPU pc_rm_queue when building tracker lists. That address may be later accessed from another CPU and will then translate to the wrong physical region if the address was taken relative to the globally-constant pcpup VA used on mips. Regardless, for mips get_pcpup() should be implemented as pcpu_find(curcpu) since returning an address that may mean something different depending on the CPU seems like a big POLA violation if nothing else. I'm more concerned about the report of powerpc breakage. For powerpc we simply take each pcpu pointer from the pc_allcpu list (which is the same value stored in the cpuid_to_pcpu array) and pass it through the ap_pcpu global to each AP's startup code, which then stores it in sprg0. It should be globally unique and won't have the variable-translation issues seen on mips. Andreas, are you certain this change was responsible the breakage you saw, and was it the same sort of hang observed on mips? On Sat, Feb 4, 2017 at 1:25 AM, Andreas Tobler wrote: > On 04.02.17 07:27, Jason Harmening wrote: > >> It's hard to argue with that:) I've backed it out until we can figure >> out what's going on. >> Sorry for the breakage. >> > > > For the record, powerpc64 was also affected. > > Andreas > >> >> On Fri, Feb 3, 2017 at 9:54 PM, Kurt Lidl > > wrote: >> >> Having just spent a couple of hours bisecting what broke the kernel on >> my mips64 machine, I can definitively state it was this commit. >> >> With this commit in place, the kernel hangs early in the >> autoconfiguration: >> >> gcc version 4.2.1 20070831 patched [FreeBSD] >> Preloaded elf kernel "kernel" at 0xffffffff80aa96a0. >> real memory = 523239424 (510976K bytes) >> Physical memory chunk(s): >> 0x00bf3000 - 0x080d5fff, 122564608 bytes (29923 pages) >> 0x08101000 - 0x0ff00fff, 132120576 bytes (32256 pages) >> 0x410000000 - 0x41f196fff, 253325312 bytes (61847 pages) >> avail memory = 504360960 (480MB) >> Create COP2 context zone >> AP #1 started! >> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs >> ---- hangs here ---- >> >> -Kurt >> >> On 2/4/17 12:29 AM, Jason Harmening wrote: >> >> Hi, >> >> I'm a bit confused as to how this change breaks MIPS. The new >> function, >> get_pcpu() is intended to be used only to access the per-cpu data >> pointer locally. It returns pcpup, which is the per-cpu pointer >> wired >> into the local TLB to translate to the local CPU's physical data >> region, >> correct? >> >> This is the same value used by the per-CPU accessors such as >> PCPU_ADD >> and PCPU_GET. The MI portions of this change only use get_pcpu() >> to >> access the local CPU's data, e.g. under a critical section in the >> rmlock. It is not intended to be used for iterating all CPUs. >> >> If I've missed something and MIPS is truly broken by this, then >> I'll >> gladly revert, but (maybe because it's late) I'm not seeing >> where this >> goes wrong on MIPS. >> >> Thanks, >> Jason >> >> On Fri, Feb 3, 2017 at 8:12 PM, Alexander Kabaev >> >> >> wrote: >> >> On Wed, 1 Feb 2017 03:32:49 +0000 (UTC) >> "Jason A. Harmening" wrote: >> >> > Author: jah >> > Date: Wed Feb 1 03:32:49 2017 >> > New Revision: 313037 >> > URL: https://svnweb.freebsd.org/changeset/base/313037 >> >> > > >> > >> > Log: >> > Implement get_pcpu() for the remaining architectures and >> use it to >> > replace pcpu_find(curcpu) in MI code. >> > >> > Modified: >> > head/sys/amd64/include/pcpu.h >> > head/sys/kern/kern_rmlock.c >> > head/sys/mips/include/pcpu.h >> > head/sys/net/netisr.c >> > head/sys/powerpc/include/cpufunc.h >> > head/sys/powerpc/include/pcpu.h >> > head/sys/sparc64/include/pcpu.h >> > >> >> Hi, >> >> this change was not reviewed nor testing was thought for all >> architectures it touches. The change happens to break MIPS >> quite >> thoroughly, since MIPS is using different pointers when >> accessing PCPU >> area locally and when doing iterations using cpu_to_cpuid >> array. I >> therefore officially am requesting this change to be >> reverted until >> reasonable solution is found to unbreak architectures that >> use wired >> TLBs to access local per-CPU data. >> >> -- >> Alexander Kabaev >> >> >> >> >> > From owner-svn-src-all@freebsd.org Sat Feb 4 19:56:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C743DCD155E; Sat, 4 Feb 2017 19:56:44 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::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 7C846C53; Sat, 4 Feb 2017 19:56:44 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by mail-qt0-x243.google.com with SMTP id w20so10041538qtb.1; Sat, 04 Feb 2017 11:56:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=5y8bwiMsyQEfw48sVCUuCpy5bi/F/El656V/XsUAbYc=; b=B3pwtjYmNGsmnYcOxoVpVt4dGXKlnwW9hn50qT6KLB5/HS3JEd+67xLuvJ2/QRwlL/ YfFxir7PaVLQyOXr/yI7YrCQzTRO7gh5cxbQpaCkKZz9Q0t0/gHBkoGyk7mfhh+6L2LX OAsy08XideK/jDV4Vfw/gF9GgAMDAFdB5sY+OfnJzDCrhrDxJd5eWRHiBJpE0FcGzwZt ny+nE67orPxSttZvLBZvh4YWc5JmRbZ8BAjSO3cl5Wxa4DbrC+zb2t5Sqyab43THZdhe tynT0pu4B0A+Q4Dzrw+fXTe88vr4MQYAWFiyZm5mPZrKiyJMzHlNNqMBtNkI+1BBd2QD Nb/A== 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:in-reply-to :references:mime-version; bh=5y8bwiMsyQEfw48sVCUuCpy5bi/F/El656V/XsUAbYc=; b=L60QGhuyuCtwjlTplnIvDzpImbYBffIizhnmiLIIriXvYLKV0R9qJ51ymetRcrkqen gT+PxoLsnTZ91RTLPqCx85uAK5ydVnvDlb6mpI8F7AEXgUXkQC2D6XBfGR4YH5wiIkuc 2BGgCG+uXaG0t6dzinPc7vSAv25vSu5aJlMS7QGuhsMepEx1SEMl1HLKnwjX4D1NUtSN WvO1fGS8t9B7taFzqLA0MJ1ZxG1ZsxHWkytpycnh1eAGqVL/WbVVZExMhbwqjkjwbMUA Upahlql8n7PePi0oRXxbE+41SgJQ8fw1mgpUjqkWh831rZnMcVJMJQj1TN8G6JCjb8ZO GNaQ== X-Gm-Message-State: AMke39lZ3wZSZ0nZT2xz+8bODp5IiW0NiEdOpN22Fi/mQ7TaR7hXHa0Kk4EnS63miRkugw== X-Received: by 10.237.33.209 with SMTP id m17mr3289440qtc.59.1486238203435; Sat, 04 Feb 2017 11:56:43 -0800 (PST) Received: from kan ([2601:18f:802:4680:226:18ff:fe00:232e]) by smtp.gmail.com with ESMTPSA id h124sm28386818qke.40.2017.02.04.11.56.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Feb 2017 11:56:42 -0800 (PST) Date: Sat, 4 Feb 2017 14:56:37 -0500 From: Alexander Kabaev To: "Jason A. Harmening" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Andreas Tobler , Kurt Lidl Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include Message-ID: <20170204145637.0324f015@kan> In-Reply-To: References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/tT+G97w/.cXn85LaPanxYVX"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 19:56:44 -0000 --Sig_/tT+G97w/.cXn85LaPanxYVX Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 3 Feb 2017 21:29:33 -0800 Jason Harmening wrote: > Hi, >=20 > I'm a bit confused as to how this change breaks MIPS. The new > function, get_pcpu() is intended to be used only to access the > per-cpu data pointer locally. It returns pcpup, which is the per-cpu > pointer wired into the local TLB to translate to the local CPU's > physical data region, correct? >=20 > This is the same value used by the per-CPU accessors such as PCPU_ADD > and PCPU_GET. The MI portions of this change only use get_pcpu() to > access the local CPU's data, e.g. under a critical section in the > rmlock. It is not intended to be used for iterating all CPUs. >=20 > If I've missed something and MIPS is truly broken by this, then I'll > gladly revert, but (maybe because it's late) I'm not seeing where > this goes wrong on MIPS. >=20 > Thanks, > Jason The hang is actually due to _rmlock_assert spinning in rm_trackers_present with interrupts disabled, due to this constructs: for (queue =3D pc->pc_rm_queue.rmq_next; queue !=3D &pc->pc_rm_queue; queue =3D queue->rmq_next) { You changed the code to pass get_pcpu() results instead of direct pointer to the corresponding pcpu storage and that is NOT the pointer that was being used in pcpu_init. On architectures that rig TLB to make local PCPU available at constant address from each CPU, these two are generally not same, so while empty pc_rm_queue is a cyclic list consisting of just one element pc_rm_queue, the loop terminating condition will never be met, as &pc->pc_rm_qeue value will be very different from the one that pc->pc_rm_queue.rmq_next was set at initialisation time. This affects MIPS in SMP configuration only, UP configs do not bother with TLB hackery. --=20 Alexander Kabaev --Sig_/tT+G97w/.cXn85LaPanxYVX Content-Type: application/pgp-signature Content-Description: Цифровая подпись OpenPGP -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEExffZlZm2QeE8UVaRBxMimZJ5Ln4FAliWMfVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEM1 RjdEOTk1OTlCNjQxRTEzQzUxNTY5MTA3MTMyMjk5OTI3OTJFN0UACgkQBxMimZJ5 Ln7gZg/+OrJ/rUQ+gm0P5DzMAf7aZ4rSOVNe244TWr+3Vu69zCEY9290HzxvKGd1 IhNY2P+4s5OFzbtYm/3ppjSrIziYr/hhIR0ZglunBEzsKtMwMGM2/mmi0n8fkMJW Ls0ndnQLgpNvInf6hKgvumqoxW/ak+WIet4AgqRfETPl5NfEHmaPKtrXT6qapP4c 8lGD1Lg4Sv/nOI7/VkeULMWXxGY9opFTZ08x68jOJKtxgNO/7g9D9LKg2JlO0FED GPA50APGetUuzkxLAItOYx1zr6SDeZqkwOokBr8gAbL4OI2oTND7lIFdqn+gkJM0 UCGul7AtgwOOSHsDp31rVok5OEs12S4AGb8RY5aRkG03g6NsCTY06JpvmbLI9S3e WvC/18ZSqVPjq7HkZnK2bSBwF3pwq2uIAXuKy8+0WCRn8d7OrW0+w4d5HaT58ACh XfadjjgCf8nBe7cde7AmckORU7cCGqV0ik8RVDUoqVgEGbqbOBHn8xXhCFoON00T nRUpHgzhYqWRX0MJ8Br800MXbNx/Dv/uljI6tfhF75+39TOOdQItdB7jpllvf+ox NmFbvQxVAJ5ShYEDprj4yEZuJKmxVZn7v4zaHCIJLAr+KQEl0OQAH2LiXSdPtPa7 eWZ87NIFjHmvIRTa8m7y8JWqXe1Rbvk7Ckq3h28/hUul+q0fALA= =kIAL -----END PGP SIGNATURE----- --Sig_/tT+G97w/.cXn85LaPanxYVX-- From owner-svn-src-all@freebsd.org Sat Feb 4 20:22:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD7D2CD1B85; Sat, 4 Feb 2017 20:22:32 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [IPv6:2001:4060:1:1001::13:196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F9EA185F; Sat, 4 Feb 2017 20:22:32 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 49CB4C53F9; Sat, 4 Feb 2017 21:22:27 +0100 (CET) Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Jason Harmening References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> Cc: Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits From: Andreas Tobler Message-ID: <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> Date: Sat, 4 Feb 2017 21:22:27 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: Idefix Submit on 127.0.1.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 20:22:33 -0000 On 04.02.17 20:54, Jason Harmening wrote: > I suspect this broke rmlocks for mips because the rmlock implementation > takes the address of the per-CPU pc_rm_queue when building tracker > lists. That address may be later accessed from another CPU and will > then translate to the wrong physical region if the address was taken > relative to the globally-constant pcpup VA used on mips. > > Regardless, for mips get_pcpup() should be implemented as > pcpu_find(curcpu) since returning an address that may mean something > different depending on the CPU seems like a big POLA violation if > nothing else. > > I'm more concerned about the report of powerpc breakage. For powerpc we > simply take each pcpu pointer from the pc_allcpu list (which is the same > value stored in the cpuid_to_pcpu array) and pass it through the ap_pcpu > global to each AP's startup code, which then stores it in sprg0. It > should be globally unique and won't have the variable-translation issues > seen on mips. Andreas, are you certain this change was responsible the > breakage you saw, and was it the same sort of hang observed on mips? I'm really sure. 313036 booted fine, allowed me to execute heavy compilation jobs, np. 313037 on the other side gave me various patterns of panics. During startup, but I also succeeded to get into multiuser and then the panic happend during port building. I have no deeper inside where pcpu data is used. Justin mentioned netisr? Andreas From owner-svn-src-all@freebsd.org Sat Feb 4 20:39:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E2EDCD1F4F; Sat, 4 Feb 2017 20:39:31 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-ot0-x243.google.com (mail-ot0-x243.google.com [IPv6:2607:f8b0:4003:c0f::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 CB9931E8A; Sat, 4 Feb 2017 20:39:30 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-ot0-x243.google.com with SMTP id 65so6166015otq.2; Sat, 04 Feb 2017 12:39:30 -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=W7AQFNRW6Pso0h2MUXQhud6LmcjyZuHP2BvW5JOP/7g=; b=c+rcJQWGoT4PtXGUUGzRjHC42j9Fc1M5Oygy+rVNMFgLpqcG0dOz8YGGsETAMaNbSa 2apIYs/BfdkK0HuuBZjBsp52nK7aWBeHUdieHLwvx5bqJZ783Ga/FDPn8HLU66X9HIRd vle7jqlloK9YId7quPc18TalQFO7XyxpFp3tWKTScFByle2u8gQ9hTh59f7Gez1Ebnr8 dhZHV0FLgwe+sKo8MpLZiX9BX3J9N21m4gqP77I5PvSWiPRoD2brXqe0Vp5xbI3/sw5S 7Iae6BOHUNYWNsMTFZGYVP1Kfc5xSyN2qf6chiuiIqLw5x+OFds2AsRPxTE6t1zs5aXG SCug== 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=W7AQFNRW6Pso0h2MUXQhud6LmcjyZuHP2BvW5JOP/7g=; b=k4JXt81L2s9vNHJfwRUe5nZvV4EtUB8dBQ4rqTCMggcAAQtrrln0y5rrepurwq+enB 7O0OGQKKM2WApnxfTooltX8XO60LQwp3Ri1LEiMadoApXJm6IrH+bkEWUkOiN9yhL6wO wuiZzS//jLVQIsN6tctFCO3SPigPv4iLGxzrjzEKiK4Bi0zeKQ/qv7unCDtltOVLl/d9 QUZKIGjSLeI3ePgfaBzNu6o79glulu7+ovS+aYshl+7g76D75FMNjUNVc3vSXp5cyWso 1yQLAAprLsvjyGjf+Obwjxp0YYNCeyHSCKKJLzidvrj44/Rdocy4VJwNFQB+i2yBhABL 9zrg== X-Gm-Message-State: AIkVDXKERdFrwiqsHy0M1/oj0LHH1Mya2jUOwfHeef5m/TP9tIiS5VxksaFzzieFw5dvnchBB1HaUI1GdFuFkg== X-Received: by 10.157.27.208 with SMTP id v16mr1577762otv.200.1486240770032; Sat, 04 Feb 2017 12:39:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.51.7 with HTTP; Sat, 4 Feb 2017 12:39:29 -0800 (PST) In-Reply-To: <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> From: Jason Harmening Date: Sat, 4 Feb 2017 12:39:29 -0800 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Andreas Tobler Cc: Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 20:39:31 -0000 Can you post an example of such panic? Only 2 MI pieces were changed, netisr and rmlock. I haven't seen problems on my own amd64/i386/arm testing of this, so a backtrace might help to narrow down the cause. On Sat, Feb 4, 2017 at 12:22 PM, Andreas Tobler wrote: > On 04.02.17 20:54, Jason Harmening wrote: > >> I suspect this broke rmlocks for mips because the rmlock implementation >> takes the address of the per-CPU pc_rm_queue when building tracker >> lists. That address may be later accessed from another CPU and will >> then translate to the wrong physical region if the address was taken >> relative to the globally-constant pcpup VA used on mips. >> >> Regardless, for mips get_pcpup() should be implemented as >> pcpu_find(curcpu) since returning an address that may mean something >> different depending on the CPU seems like a big POLA violation if >> nothing else. >> >> I'm more concerned about the report of powerpc breakage. For powerpc we >> simply take each pcpu pointer from the pc_allcpu list (which is the same >> value stored in the cpuid_to_pcpu array) and pass it through the ap_pcpu >> global to each AP's startup code, which then stores it in sprg0. It >> should be globally unique and won't have the variable-translation issues >> seen on mips. Andreas, are you certain this change was responsible the >> breakage you saw, and was it the same sort of hang observed on mips? >> > > I'm really sure. 313036 booted fine, allowed me to execute heavy > compilation jobs, np. 313037 on the other side gave me various patterns of > panics. During startup, but I also succeeded to get into multiuser and then > the panic happend during port building. > > I have no deeper inside where pcpu data is used. Justin mentioned netisr? > > Andreas > > From owner-svn-src-all@freebsd.org Sat Feb 4 20:43:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73673CCE151; Sat, 4 Feb 2017 20:43:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 433EF352; Sat, 4 Feb 2017 20:43:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Khjai073762; Sat, 4 Feb 2017 20:43:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14KhjUM073761; Sat, 4 Feb 2017 20:43:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702042043.v14KhjUM073761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 4 Feb 2017 20:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313251 - head/sbin/nvmecontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 20:43:46 -0000 Author: imp Date: Sat Feb 4 20:43:45 2017 New Revision: 313251 URL: https://svnweb.freebsd.org/changeset/base/313251 Log: Fix a typo in usage string for unimplemented command. Modified: head/sbin/nvmecontrol/wdc.c Modified: head/sbin/nvmecontrol/wdc.c ============================================================================== --- head/sbin/nvmecontrol/wdc.c Sat Feb 4 19:35:38 2017 (r313250) +++ head/sbin/nvmecontrol/wdc.c Sat Feb 4 20:43:45 2017 (r313251) @@ -69,7 +69,7 @@ static void wdc_purge_monitor(int argc, #define WDC_DRIVE_LOG_USAGE "\tnvmecontrol wdc drive-log [-o path-template]\n" #define WDC_GET_CRASH_DUMP_USAGE "\tnvmecontrol wdc get-crash-dump [-o path-template]\n" #define WDC_PURGE_USAGE "\tnvmecontrol wdc purge [-o path-template]\n" -#define WDC_PURGE_MONITOR_USAGE "\tnvmecontrol wdc purge-montor\n" +#define WDC_PURGE_MONITOR_USAGE "\tnvmecontrol wdc purge-monitor\n" static struct nvme_function wdc_funcs[] = { {"cap-diag", wdc_cap_diag, WDC_CAP_DIAG_USAGE}, From owner-svn-src-all@freebsd.org Sat Feb 4 20:43:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDC23CCE186; Sat, 4 Feb 2017 20:43:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B73833E5; Sat, 4 Feb 2017 20:43:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14KhsJc073808; Sat, 4 Feb 2017 20:43:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Khs2A073807; Sat, 4 Feb 2017 20:43:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702042043.v14Khs2A073807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 4 Feb 2017 20:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313252 - head/sbin/nvmecontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 20:43:56 -0000 Author: imp Date: Sat Feb 4 20:43:54 2017 New Revision: 313252 URL: https://svnweb.freebsd.org/changeset/base/313252 Log: Fix off by one error that truncated the serial number for filenames. Modified: head/sbin/nvmecontrol/wdc.c Modified: head/sbin/nvmecontrol/wdc.c ============================================================================== --- head/sbin/nvmecontrol/wdc.c Sat Feb 4 20:43:45 2017 (r313251) +++ head/sbin/nvmecontrol/wdc.c Sat Feb 4 20:43:54 2017 (r313252) @@ -94,7 +94,7 @@ wdc_append_serial_name(int fd, char *buf walker = sn + NVME_SERIAL_NUMBER_LENGTH - 1; while (walker > sn && *walker == ' ') walker--; - *walker = '\0'; + *++walker = '\0'; snprintf(buf, len, "%s%s.bin", sn, suffix); } From owner-svn-src-all@freebsd.org Sat Feb 4 20:57:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DAF1CCE72F; Sat, 4 Feb 2017 20:57:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AAEEDC8; Sat, 4 Feb 2017 20:57:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14Kv9bW078145; Sat, 4 Feb 2017 20:57:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14Kv99A078144; Sat, 4 Feb 2017 20:57:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702042057.v14Kv99A078144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 4 Feb 2017 20:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313253 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 20:57:10 -0000 Author: adrian Date: Sat Feb 4 20:57:09 2017 New Revision: 313253 URL: https://svnweb.freebsd.org/changeset/base/313253 Log: [net80211] fix quiet_duration parameter to match what is provided in the manpage. Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Sat Feb 4 20:43:54 2017 (r313252) +++ head/sbin/ifconfig/ifieee80211.c Sat Feb 4 20:57:09 2017 (r313253) @@ -5594,12 +5594,12 @@ static struct cmd ieee80211_cmds[] = { DEF_CMD_ARG("bgscanidle", set80211bgscanidle), DEF_CMD_ARG("bgscanintvl", set80211bgscanintvl), DEF_CMD_ARG("scanvalid", set80211scanvalid), - DEF_CMD("quiet", 1, set80211quiet), - DEF_CMD("-quiet", 0, set80211quiet), - DEF_CMD_ARG("quiet_count", set80211quietcount), - DEF_CMD_ARG("quiet_period", set80211quietperiod), - DEF_CMD_ARG("quiet_dur", set80211quietduration), - DEF_CMD_ARG("quiet_offset", set80211quietoffset), + DEF_CMD("quiet", 1, set80211quiet), + DEF_CMD("-quiet", 0, set80211quiet), + DEF_CMD_ARG("quiet_count", set80211quietcount), + DEF_CMD_ARG("quiet_period", set80211quietperiod), + DEF_CMD_ARG("quiet_duration", set80211quietduration), + DEF_CMD_ARG("quiet_offset", set80211quietoffset), DEF_CMD_ARG("roam:rssi", set80211roamrssi), DEF_CMD_ARG("roam:rate", set80211roamrate), DEF_CMD_ARG("mcastrate", set80211mcastrate), From owner-svn-src-all@freebsd.org Sat Feb 4 21:34:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE8DACD02F3; Sat, 4 Feb 2017 21:34:21 +0000 (UTC) (envelope-from onwahe@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 98537299; Sat, 4 Feb 2017 21:34:21 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by mail-it0-x243.google.com with SMTP id e137so4802733itc.0; Sat, 04 Feb 2017 13:34:21 -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=NgWGi9AQOO+WCRLgPn8mfmFPopErTFXhJFLJfmCITt8=; b=HGuxgv8vh8u+wXk3WLsgDRPh0CvutijD3F/59ROcqvwXO0nDE+6YrW0tha0DzZ9NsN 1O8rLUa52wp5uVdp8h+RNGUmJgSv52l4lKtYbbpV+7NX6lmoimdwjN5j5T1AsxCTUDXn +I2m7E4pZb+Yt2jsc8j+Jh6b7HyDYR05aK1Z20dqkHIe3PYhArB9Qiy2X3p/f8obB+Vx Ld8i5CH4P3lMT0JrX0taPCQ+OWlIQ/gudcqHK753awquWqKby8LGyaQa6vEdVP+tYO20 dfQkw2h3yJZwIKfWN3XtBVY03AYPHI1w3jgB9KAuBW3GgyoFpZwgyu/ncpjkO1e2+CQV JWVg== 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=NgWGi9AQOO+WCRLgPn8mfmFPopErTFXhJFLJfmCITt8=; b=XOl3Sage+W+wRKOkY+AMdk+iS44Tyy2MlzABWhE0/ol2v7fc/JQgVs+sjiZQkt4iRJ ewYa8id3tWVqS18gxXWWi9O8gkR0YBY54BxWhUUnUoki000KMvAb1RqgDPAadAou3Vlp cLkDD9ZOABKvsbEgjT/sbJlZzLO3KPv2jl0hOab5NjWyNxs8hqA7vMyxoyez98UFmsUy 7zWbQV2yv8tBgeWLg8L/M8XEMWfUIKYLsm+p24XRyhlmBtPZEfh3OmVsjX/g+sxoKXr4 /Pp3n9L+N3uWoTrLaN2j7A3D6Vao0LiF7vqTYUjiLrrV11knbsw4ENGn6B5t5iKxfhrJ PFsw== X-Gm-Message-State: AIkVDXIi7o4YPSe212xZx7bcEdEE/bJ5pWFnb9ytdip3Tr0U7HlxpfyJX5FDuDUMAtn8inRwPM34sFQok/psGQ== X-Received: by 10.36.40.198 with SMTP id h189mr2440181ith.114.1486244060930; Sat, 04 Feb 2017 13:34:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.101.194 with HTTP; Sat, 4 Feb 2017 13:34:20 -0800 (PST) In-Reply-To: References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan> <8523aaa5-6c30-9f9f-40f0-fdf82cdf1669@pix.net> <6bf86e46-9714-c7e9-8d47-845761e2de24@FreeBSD.org> <8a2f7f7d-14c3-8e75-e060-fc41213ce389@FreeBSD.org> From: Svatopluk Kraus Date: Sat, 4 Feb 2017 22:34:20 +0100 Message-ID: Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include To: Jason Harmening Cc: Andreas Tobler , Kurt Lidl , Alexander Kabaev , "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Ed Maste , Justin Hibbits Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Sat, 04 Feb 2017 22:58:12 +0000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 21:34:22 -0000 Probably not related. But when I took short look to the patch to see what could go wrong, I walked into the following comment in _rm_wlock(): "Assumes rm->rm_writecpus update is visible on other CPUs before rm_cleanIPI is called." There is no explicit barrier to ensure it. However, there might be some barriers inside of smp_rendezvous_cpus(). I have no idea what could happened if this assumption is not met. Note that rm_cleanIPI() is affected by the patch. On Sat, Feb 4, 2017 at 9:39 PM, Jason Harmening wrote: > Can you post an example of such panic? Only 2 MI pieces were changed, > netisr and rmlock. I haven't seen problems on my own amd64/i386/arm testing > of this, so a backtrace might help to narrow down the cause. > > On Sat, Feb 4, 2017 at 12:22 PM, Andreas Tobler > wrote: >> >> On 04.02.17 20:54, Jason Harmening wrote: >>> >>> I suspect this broke rmlocks for mips because the rmlock implementation >>> takes the address of the per-CPU pc_rm_queue when building tracker >>> lists. That address may be later accessed from another CPU and will >>> then translate to the wrong physical region if the address was taken >>> relative to the globally-constant pcpup VA used on mips. >>> >>> Regardless, for mips get_pcpup() should be implemented as >>> pcpu_find(curcpu) since returning an address that may mean something >>> different depending on the CPU seems like a big POLA violation if >>> nothing else. >>> >>> I'm more concerned about the report of powerpc breakage. For powerpc we >>> simply take each pcpu pointer from the pc_allcpu list (which is the same >>> value stored in the cpuid_to_pcpu array) and pass it through the ap_pcpu >>> global to each AP's startup code, which then stores it in sprg0. It >>> should be globally unique and won't have the variable-translation issues >>> seen on mips. Andreas, are you certain this change was responsible the >>> breakage you saw, and was it the same sort of hang observed on mips? >> >> >> I'm really sure. 313036 booted fine, allowed me to execute heavy >> compilation jobs, np. 313037 on the other side gave me various patterns of >> panics. During startup, but I also succeeded to get into multiuser and then >> the panic happend during port building. >> >> I have no deeper inside where pcpu data is used. Justin mentioned netisr? >> >> Andreas >> >