From owner-svn-src-stable-9@freebsd.org Mon May 9 13:13:56 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F181DB334F9; Mon, 9 May 2016 13:13:56 +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 A9600149A; Mon, 9 May 2016 13:13:56 +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 u49DDtlg076676; Mon, 9 May 2016 13:13:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u49DDth5076675; Mon, 9 May 2016 13:13:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201605091313.u49DDth5076675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 9 May 2016 13:13:55 +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: r299261 - stable/9/etc/devd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2016 13:13:57 -0000 Author: hselasky Date: Mon May 9 13:13:55 2016 New Revision: 299261 URL: https://svnweb.freebsd.org/changeset/base/299261 Log: MFC r298783: Regenerate usb.conf . Modified: stable/9/etc/devd/usb.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/devd/usb.conf ============================================================================== --- stable/9/etc/devd/usb.conf Mon May 9 13:12:12 2016 (r299260) +++ stable/9/etc/devd/usb.conf Mon May 9 13:13:55 2016 (r299261) @@ -1721,7 +1721,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x07b8"; - match "product" "(0x8178|0x8188|0x8189)"; + match "product" "(0x8178|0x8179|0x8188|0x8189)"; action "kldload -n if_urtwn"; }; @@ -3161,7 +3161,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0df6"; - match "product" "(0x0052|0x005c|0x0061)"; + match "product" "0x0052"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; + match "product" "0x0056"; + action "kldload -n if_axe"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; + match "product" "(0x005c|0x0061)"; action "kldload -n if_urtwn"; }; @@ -4633,7 +4649,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x17e9"; - match "product" "(0x0059|0x0100|0x0117|0x0136|0x0138|0x0141|0x015a|0x0198|0x019b|0x01ba|0x01bb|0x01d4|0x01d7|0x01e2|0x0215|0x024c|0x02a9|0x0377|0x03e0|0x401a)"; + match "product" "(0x0059|0x0100|0x0117|0x0136|0x0138|0x0141|0x015a|0x0198|0x019b|0x01ba|0x01bb|0x01d4|0x01d7|0x01e2|0x0215|0x024c|0x02a9|0x02e9|0x0377|0x03e0|0x401a)"; action "kldload -n udl"; }; @@ -5801,5 +5817,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2719 USB entries processed +# 2722 USB entries processed From owner-svn-src-stable-9@freebsd.org Tue May 10 02:15:11 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10207B35DD2; Tue, 10 May 2016 02:15:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D656D184B; Tue, 10 May 2016 02:15:10 +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 u4A2FAxL022600; Tue, 10 May 2016 02:15:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4A2FAcQ022599; Tue, 10 May 2016 02:15:10 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201605100215.u4A2FAcQ022599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 10 May 2016 02:15:10 +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: r299296 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2016 02:15:11 -0000 Author: pfg Date: Tue May 10 02:15:09 2016 New Revision: 299296 URL: https://svnweb.freebsd.org/changeset/base/299296 Log: MFC r298609: ext2fs: make use of the howmany() macro when available. We have a howmany() macro in the header that is convenient to re-use as it makes things easier to read. Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Tue May 10 02:13:17 2016 (r299295) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Tue May 10 02:15:09 2016 (r299296) @@ -357,10 +357,10 @@ compute_sb_data(struct vnode *devvp, str fs->e2fs_ipb = fs->e2fs_bsize / EXT2_INODE_SIZE(fs); fs->e2fs_itpg = fs->e2fs_ipg / fs->e2fs_ipb; /* s_resuid / s_resgid ? */ - fs->e2fs_gcount = (es->e2fs_bcount - es->e2fs_first_dblock + - EXT2_BLOCKS_PER_GROUP(fs) - 1) / EXT2_BLOCKS_PER_GROUP(fs); + fs->e2fs_gcount = howmany(es->e2fs_bcount - es->e2fs_first_dblock, + EXT2_BLOCKS_PER_GROUP(fs)); e2fs_descpb = fs->e2fs_bsize / sizeof(struct ext2_gd); - db_count = (fs->e2fs_gcount + e2fs_descpb - 1) / e2fs_descpb; + db_count = howmany(fs->e2fs_gcount, e2fs_descpb); fs->e2fs_gdbcount = db_count; fs->e2fs_gd = malloc(db_count * fs->e2fs_bsize, M_EXT2MNT, M_WAITOK); @@ -964,7 +964,7 @@ ext2_vget(struct mount *mp, ino_t ino, i */ if (!(ip->i_flag & IN_E4EXTENTS) && (S_ISDIR(ip->i_mode) || S_ISREG(ip->i_mode))) { - used_blocks = (ip->i_size+fs->e2fs_bsize-1) / fs->e2fs_bsize; + used_blocks = howmany(ip->i_size, fs->e2fs_bsize); for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++) ip->i_db[i] = 0; } From owner-svn-src-stable-9@freebsd.org Tue May 10 02:44:24 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5300B34A3C; Tue, 10 May 2016 02:44:24 +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 84FCD1CEA; Tue, 10 May 2016 02:44:24 +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 u4A2iNCc031803; Tue, 10 May 2016 02:44:23 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4A2iNEW031800; Tue, 10 May 2016 02:44:23 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201605100244.u4A2iNEW031800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 10 May 2016 02:44:23 +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: r299300 - stable/9/sys/dev/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2016 02:44:24 -0000 Author: davidcs Date: Tue May 10 02:44:23 2016 New Revision: 299300 URL: https://svnweb.freebsd.org/changeset/base/299300 Log: MFC r298294 1. modify fwdump (a.k.a grcdump) so that grcdump memory is allocated and freed on as needed basis. 2. grcdump can be taken at failure points by invoking bxe_grc_dump() when trigger_grcdump sysctl flag is set. When grcdump is taken grcdump_done sysctl flag is set. 3. grcdump_done can be monitored by the user to retrieve the grcdump Submitted by:vaishali.kulkarni@qlogic.com Modified: stable/9/sys/dev/bxe/bxe.c stable/9/sys/dev/bxe/bxe.h stable/9/sys/dev/bxe/bxe_stats.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Tue May 10 02:35:13 2016 (r299299) +++ stable/9/sys/dev/bxe/bxe.c Tue May 10 02:44:23 2016 (r299300) @@ -683,7 +683,6 @@ static void bxe_handle_fp_tq(void *conte static int bxe_add_cdev(struct bxe_softc *sc); static void bxe_del_cdev(struct bxe_softc *sc); -static int bxe_grc_dump(struct bxe_softc *sc); static int bxe_alloc_buf_rings(struct bxe_softc *sc); static void bxe_free_buf_rings(struct bxe_softc *sc); @@ -3460,6 +3459,10 @@ bxe_watchdog(struct bxe_softc *sc, } BLOGE(sc, "TX watchdog timeout on fp[%02d], resetting!\n", fp->index); + if(sc->trigger_grcdump) { + /* taking grcdump */ + bxe_grc_dump(sc); + } BXE_FP_TX_UNLOCK(fp); @@ -15677,30 +15680,6 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS) } static int -bxe_sysctl_trigger_grcdump(SYSCTL_HANDLER_ARGS) -{ - struct bxe_softc *sc; - int error, result; - - result = 0; - error = sysctl_handle_int(oidp, &result, 0, req); - - if (error || !req->newptr) { - return (error); - } - - if (result == 1) { - sc = (struct bxe_softc *)arg1; - - BLOGI(sc, "... grcdump start ...\n"); - bxe_grc_dump(sc); - BLOGI(sc, "... grcdump done ...\n"); - } - - return (error); -} - -static int bxe_sysctl_eth_stat(SYSCTL_HANDLER_ARGS) { struct bxe_softc *sc = (struct bxe_softc *)arg1; @@ -15851,14 +15830,16 @@ bxe_add_sysctls(struct bxe_softc *sc) "debug logging mode"); #endif /* #if __FreeBSD_version >= 900000 */ - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "trigger_grcdump", - CTLTYPE_UINT | CTLFLAG_RW, sc, 0, - bxe_sysctl_trigger_grcdump, "IU", - "set by driver when a grcdump is needed"); + sc->trigger_grcdump = 0; + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "trigger_grcdump", + CTLFLAG_RW, &sc->trigger_grcdump, 0, + "trigger grcdump should be invoked" + " before collecting grcdump"); + sc->grcdump_started = 0; sc->grcdump_done = 0; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "grcdump_done", - CTLFLAG_RW, &sc->grcdump_done, 0, + CTLFLAG_RD, &sc->grcdump_done, 0, "set by driver when grcdump is done"); sc->rx_budget = bxe_rx_budget; @@ -18690,7 +18671,7 @@ bxe_get_preset_regs(struct bxe_softc *sc return 0; } -static int +int bxe_grc_dump(struct bxe_softc *sc) { int rval = 0; @@ -18698,12 +18679,53 @@ bxe_grc_dump(struct bxe_softc *sc) uint8_t *buf; uint32_t size; struct dump_header *d_hdr; + uint32_t i; + uint32_t reg_val; + uint32_t reg_addr; + uint32_t cmd_offset; + int context_size; + int allocated; + struct ecore_ilt *ilt = SC_ILT(sc); + struct bxe_fastpath *fp; + struct ilt_client_info *ilt_cli; + int grc_dump_size; - if (sc->grcdump_done) + + if (sc->grcdump_done || sc->grcdump_started) return (rval); + sc->grcdump_started = 1; + BLOGI(sc, "Started collecting grcdump\n"); + + grc_dump_size = (bxe_get_total_regs_len32(sc) * sizeof(uint32_t)) + + sizeof(struct dump_header); + + sc->grc_dump = malloc(grc_dump_size, M_DEVBUF, M_NOWAIT); + + if (sc->grc_dump == NULL) { + BLOGW(sc, "Unable to allocate memory for grcdump collection\n"); + return(ENOMEM); + } + + + + /* Disable parity attentions as long as following dump may + * cause false alarms by reading never written registers. We + * will re-enable parity attentions right after the dump. + */ + + /* Disable parity on path 0 */ + bxe_pretend_func(sc, 0); + ecore_disable_blocks_parity(sc); + /* Disable parity on path 1 */ + bxe_pretend_func(sc, 1); + ecore_disable_blocks_parity(sc); + + /* Return to current function */ + bxe_pretend_func(sc, SC_ABS_FUNC(sc)); + buf = sc->grc_dump; d_hdr = sc->grc_dump; @@ -18735,7 +18757,7 @@ bxe_grc_dump(struct bxe_softc *sc) (preset_idx == 11)) continue; - rval = bxe_get_preset_regs(sc, sc->grc_dump, preset_idx); + rval = bxe_get_preset_regs(sc, (uint32_t *)buf, preset_idx); if (rval) break; @@ -18745,9 +18767,81 @@ bxe_grc_dump(struct bxe_softc *sc) buf += size; } + bxe_pretend_func(sc, 0); + ecore_clear_blocks_parity(sc); + ecore_enable_blocks_parity(sc); + + bxe_pretend_func(sc, 1); ecore_clear_blocks_parity(sc); ecore_enable_blocks_parity(sc); + /* Return to current function */ + bxe_pretend_func(sc, SC_ABS_FUNC(sc)); + + + context_size = (sizeof(union cdu_context) * BXE_L2_CID_COUNT(sc)); + for (i = 0, allocated = 0; allocated < context_size; i++) { + + BLOGI(sc, "cdu_context i %d paddr %#jx vaddr %p size 0x%zx\n", i, + (uintmax_t)sc->context[i].vcxt_dma.paddr, + sc->context[i].vcxt_dma.vaddr, + sc->context[i].size); + allocated += sc->context[i].size; + } + BLOGI(sc, "fw stats start_paddr %#jx end_paddr %#jx vaddr %p size 0x%x\n", + (uintmax_t)sc->fw_stats_req_mapping, + (uintmax_t)sc->fw_stats_data_mapping, + sc->fw_stats_req, (sc->fw_stats_req_size + sc->fw_stats_data_size)); + BLOGI(sc, "def_status_block paddr %p vaddr %p size 0x%zx\n", + (void *)sc->def_sb_dma.paddr, sc->def_sb, + sizeof(struct host_sp_status_block)); + BLOGI(sc, "event_queue paddr %#jx vaddr %p size 0x%x\n", + (uintmax_t)sc->eq_dma.paddr, sc->eq_dma.vaddr, BCM_PAGE_SIZE); + BLOGI(sc, "slow path paddr %#jx vaddr %p size 0x%zx\n", + (uintmax_t)sc->sp_dma.paddr, sc->sp_dma.vaddr, + sizeof(struct bxe_slowpath)); + BLOGI(sc, "slow path queue paddr %#jx vaddr %p size 0x%x\n", + (uintmax_t)sc->spq_dma.paddr, sc->spq_dma.vaddr, BCM_PAGE_SIZE); + BLOGI(sc, "fw_buf paddr %#jx vaddr %p size 0x%x\n", + (uintmax_t)sc->gz_buf_dma.paddr, sc->gz_buf_dma.vaddr, + FW_BUF_SIZE); + for (i = 0; i < sc->num_queues; i++) { + fp = &sc->fp[i]; + BLOGI(sc, "FP status block fp %d paddr %#jx vaddr %p size 0x%zx\n", i, + (uintmax_t)fp->sb_dma.paddr, fp->sb_dma.vaddr, + sizeof(union bxe_host_hc_status_block)); + BLOGI(sc, "TX BD CHAIN fp %d paddr %#jx vaddr %p size 0x%x\n", i, + (uintmax_t)fp->tx_dma.paddr, fp->tx_dma.vaddr, + (BCM_PAGE_SIZE * TX_BD_NUM_PAGES)); + BLOGI(sc, "RX BD CHAIN fp %d paddr %#jx vaddr %p size 0x%x\n", i, + (uintmax_t)fp->rx_dma.paddr, fp->rx_dma.vaddr, + (BCM_PAGE_SIZE * RX_BD_NUM_PAGES)); + BLOGI(sc, "RX RCQ CHAIN fp %d paddr %#jx vaddr %p size 0x%zx\n", i, + (uintmax_t)fp->rcq_dma.paddr, fp->rcq_dma.vaddr, + (BCM_PAGE_SIZE * RCQ_NUM_PAGES)); + BLOGI(sc, "RX SGE CHAIN fp %d paddr %#jx vaddr %p size 0x%x\n", i, + (uintmax_t)fp->rx_sge_dma.paddr, fp->rx_sge_dma.vaddr, + (BCM_PAGE_SIZE * RX_SGE_NUM_PAGES)); + } + + ilt_cli = &ilt->clients[1]; + for (i = ilt_cli->start; i <= ilt_cli->end; i++) { + BLOGI(sc, "ECORE_ILT paddr %#jx vaddr %p size 0x%x\n", + (uintmax_t)(((struct bxe_dma *)((&ilt->lines[i])->page))->paddr), + ((struct bxe_dma *)((&ilt->lines[i])->page))->vaddr, BCM_PAGE_SIZE); + } + + + cmd_offset = DMAE_REG_CMD_MEM; + for (i = 0; i < 224; i++) { + reg_addr = (cmd_offset +(i * 4)); + reg_val = REG_RD(sc, reg_addr); + BLOGI(sc, "DMAE_REG_CMD_MEM i=%d reg_addr 0x%x reg_val 0x%08x\n",i, + reg_addr, reg_val); + } + + + BLOGI(sc, "Collection of grcdump done\n"); sc->grcdump_done = 1; return(rval); } @@ -18755,21 +18849,10 @@ bxe_grc_dump(struct bxe_softc *sc) static int bxe_add_cdev(struct bxe_softc *sc) { - int grc_dump_size; - - grc_dump_size = (bxe_get_total_regs_len32(sc) * sizeof(uint32_t)) + - sizeof(struct dump_header); - - sc->grc_dump = malloc(grc_dump_size, M_DEVBUF, M_NOWAIT); - - if (sc->grc_dump == NULL) - return (-1); - sc->eeprom = malloc(BXE_EEPROM_MAX_DATA_LEN, M_DEVBUF, M_NOWAIT); if (sc->eeprom == NULL) { BLOGW(sc, "Unable to alloc for eeprom size buffer\n"); - free(sc->grc_dump, M_DEVBUF); sc->grc_dump = NULL; return (-1); } @@ -18782,11 +18865,8 @@ bxe_add_cdev(struct bxe_softc *sc) if_name(sc->ifnet)); if (sc->ioctl_dev == NULL) { - - free(sc->grc_dump, M_DEVBUF); free(sc->eeprom, M_DEVBUF); sc->eeprom = NULL; - return (-1); } @@ -18801,13 +18881,11 @@ bxe_del_cdev(struct bxe_softc *sc) if (sc->ioctl_dev != NULL) destroy_dev(sc->ioctl_dev); - if (sc->grc_dump != NULL) - free(sc->grc_dump, M_DEVBUF); - if (sc->eeprom != NULL) { free(sc->eeprom, M_DEVBUF); sc->eeprom = NULL; } + sc->ioctl_dev = NULL; return; } @@ -18985,15 +19063,26 @@ bxe_eioctl(struct cdev *dev, u_long cmd, grc_dump_size = (bxe_get_total_regs_len32(sc) * sizeof(uint32_t)) + sizeof(struct dump_header); - - if ((sc->grc_dump == NULL) || (dump->grcdump == NULL) || - (dump->grcdump_size < grc_dump_size) || (!sc->grcdump_done)) { + if ((!sc->trigger_grcdump) || (dump->grcdump == NULL) || + (dump->grcdump_size < grc_dump_size)) { rval = EINVAL; break; } - dump->grcdump_dwords = grc_dump_size >> 2; - rval = copyout(sc->grc_dump, dump->grcdump, grc_dump_size); - sc->grcdump_done = 0; + + if((sc->trigger_grcdump) && (!sc->grcdump_done) && + (!sc->grcdump_started)) { + rval = bxe_grc_dump(sc); + } + + if((!rval) && (sc->grcdump_done) && (sc->grcdump_started) && + (sc->grc_dump != NULL)) { + dump->grcdump_dwords = grc_dump_size >> 2; + rval = copyout(sc->grc_dump, dump->grcdump, grc_dump_size); + free(sc->grc_dump, M_DEVBUF); + sc->grc_dump = NULL; + sc->grcdump_started = 0; + sc->grcdump_done = 0; + } break; @@ -19013,6 +19102,7 @@ bxe_eioctl(struct cdev *dev, u_long cmd, snprintf(drv_infop->bus_info, BXE_BUS_INFO_LENGTH, "%d:%d:%d", sc->pcie_bus, sc->pcie_device, sc->pcie_func); break; + case BXE_DEV_SETTING: dev_p = (bxe_dev_setting_t *)data; bxe_get_settings(sc, &dev_set); @@ -19031,20 +19121,20 @@ bxe_eioctl(struct cdev *dev, u_long cmd, reg_p = (bxe_get_regs_t *)data; grc_dump_size = reg_p->reg_buf_len; - if (sc->grc_dump == NULL) { - rval = EINVAL; - break; - } - - if(!sc->grcdump_done) { + if((!sc->grcdump_done) && (!sc->grcdump_started)) { bxe_grc_dump(sc); } - if(sc->grcdump_done) { + if((sc->grcdump_done) && (sc->grcdump_started) && + (sc->grc_dump != NULL)) { rval = copyout(sc->grc_dump, reg_p->reg_buf, grc_dump_size); + free(sc->grc_dump, M_DEVBUF); + sc->grc_dump = NULL; + sc->grcdump_started = 0; sc->grcdump_done = 0; } break; + case BXE_RDW_REG: reg_rdw_p = (bxe_reg_rdw_t *)data; if((reg_rdw_p->reg_cmd == BXE_READ_REG_CMD) && Modified: stable/9/sys/dev/bxe/bxe.h ============================================================================== --- stable/9/sys/dev/bxe/bxe.h Tue May 10 02:35:13 2016 (r299299) +++ stable/9/sys/dev/bxe/bxe.h Tue May 10 02:44:23 2016 (r299300) @@ -1786,8 +1786,12 @@ struct bxe_softc { int panic; struct cdev *ioctl_dev; + void *grc_dump; - int grcdump_done; + unsigned int trigger_grcdump; + unsigned int grcdump_done; + unsigned int grcdump_started; + void *eeprom; }; /* struct bxe_softc */ @@ -2293,7 +2297,7 @@ void bxe_dump_mem(struct bxe_softc *sc, uint8_t *mem, uint32_t len); void bxe_dump_mbuf_data(struct bxe_softc *sc, char *pTag, struct mbuf *m, uint8_t contents); - +extern int bxe_grc_dump(struct bxe_softc *sc); #if __FreeBSD_version >= 800000 #if __FreeBSD_version >= 1000000 Modified: stable/9/sys/dev/bxe/bxe_stats.c ============================================================================== --- stable/9/sys/dev/bxe/bxe_stats.c Tue May 10 02:35:13 2016 (r299299) +++ stable/9/sys/dev/bxe/bxe_stats.c Tue May 10 02:44:23 2016 (r299300) @@ -234,6 +234,10 @@ bxe_stats_comp(struct bxe_softc *sc) while (*stats_comp != DMAE_COMP_VAL) { if (!cnt) { BLOGE(sc, "Timeout waiting for stats finished\n"); + if(sc->trigger_grcdump) { + /* taking grcdump */ + bxe_grc_dump(sc); + } break; } @@ -1310,8 +1314,12 @@ bxe_stats_update(struct bxe_softc *sc) if (bxe_storm_stats_update(sc)) { if (sc->stats_pending++ == 3) { if (sc->ifnet->if_drv_flags & IFF_DRV_RUNNING) { - atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT); - taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); + if(sc->trigger_grcdump) { + /* taking grcdump */ + bxe_grc_dump(sc); + } + atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT); + taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); } } return; From owner-svn-src-stable-9@freebsd.org Tue May 10 02:47:42 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2289DB34C2D; Tue, 10 May 2016 02:47:42 +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 D46EB1EC2; Tue, 10 May 2016 02:47:41 +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 u4A2leKa031975; Tue, 10 May 2016 02:47:40 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4A2le7D031974; Tue, 10 May 2016 02:47:40 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201605100247.u4A2le7D031974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 10 May 2016 02:47:40 +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: r299301 - stable/9/sys/dev/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2016 02:47:42 -0000 Author: davidcs Date: Tue May 10 02:47:40 2016 New Revision: 299301 URL: https://svnweb.freebsd.org/changeset/base/299301 Log: MFC r298496 Remove Unused/Dead Code Modified: stable/9/sys/dev/bxe/bxe.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Tue May 10 02:44:23 2016 (r299300) +++ stable/9/sys/dev/bxe/bxe.c Tue May 10 02:47:40 2016 (r299301) @@ -4440,115 +4440,6 @@ bxe_ifmedia_status(struct ifnet *ifp, st } } -static int -bxe_ioctl_nvram(struct bxe_softc *sc, - uint32_t priv_op, - struct ifreq *ifr) -{ - struct bxe_nvram_data nvdata_base; - struct bxe_nvram_data *nvdata; - int len; - int error = 0; - - copyin(ifr->ifr_data, &nvdata_base, sizeof(nvdata_base)); - - len = (sizeof(struct bxe_nvram_data) + - nvdata_base.len - - sizeof(uint32_t)); - - if (len > sizeof(struct bxe_nvram_data)) { - if ((nvdata = (struct bxe_nvram_data *) - malloc(len, M_DEVBUF, - (M_NOWAIT | M_ZERO))) == NULL) { - BLOGE(sc, "BXE_IOC_RD_NVRAM malloc failed priv_op 0x%x " - " len = 0x%x\n", priv_op, len); - return (1); - } - memcpy(nvdata, &nvdata_base, sizeof(struct bxe_nvram_data)); - } else { - nvdata = &nvdata_base; - } - - if (priv_op == BXE_IOC_RD_NVRAM) { - BLOGD(sc, DBG_IOCTL, "IOC_RD_NVRAM 0x%x %d\n", - nvdata->offset, nvdata->len); - error = bxe_nvram_read(sc, - nvdata->offset, - (uint8_t *)nvdata->value, - nvdata->len); - copyout(nvdata, ifr->ifr_data, len); - } else { /* BXE_IOC_WR_NVRAM */ - BLOGD(sc, DBG_IOCTL, "IOC_WR_NVRAM 0x%x %d\n", - nvdata->offset, nvdata->len); - copyin(ifr->ifr_data, nvdata, len); - error = bxe_nvram_write(sc, - nvdata->offset, - (uint8_t *)nvdata->value, - nvdata->len); - } - - if (len > sizeof(struct bxe_nvram_data)) { - free(nvdata, M_DEVBUF); - } - - return (error); -} - -static int -bxe_ioctl_stats_show(struct bxe_softc *sc, - uint32_t priv_op, - struct ifreq *ifr) -{ - const size_t str_size = (BXE_NUM_ETH_STATS * STAT_NAME_LEN); - const size_t stats_size = (BXE_NUM_ETH_STATS * sizeof(uint64_t)); - caddr_t p_tmp; - uint32_t *offset; - int i; - - switch (priv_op) - { - case BXE_IOC_STATS_SHOW_NUM: - memset(ifr->ifr_data, 0, sizeof(union bxe_stats_show_data)); - ((union bxe_stats_show_data *)ifr->ifr_data)->desc.num = - BXE_NUM_ETH_STATS; - ((union bxe_stats_show_data *)ifr->ifr_data)->desc.len = - STAT_NAME_LEN; - return (0); - - case BXE_IOC_STATS_SHOW_STR: - memset(ifr->ifr_data, 0, str_size); - p_tmp = ifr->ifr_data; - for (i = 0; i < BXE_NUM_ETH_STATS; i++) { - strcpy(p_tmp, bxe_eth_stats_arr[i].string); - p_tmp += STAT_NAME_LEN; - } - return (0); - - case BXE_IOC_STATS_SHOW_CNT: - memset(ifr->ifr_data, 0, stats_size); - p_tmp = ifr->ifr_data; - for (i = 0; i < BXE_NUM_ETH_STATS; i++) { - offset = ((uint32_t *)&sc->eth_stats + - bxe_eth_stats_arr[i].offset); - switch (bxe_eth_stats_arr[i].size) { - case 4: - *((uint64_t *)p_tmp) = (uint64_t)*offset; - break; - case 8: - *((uint64_t *)p_tmp) = HILO_U64(*offset, *(offset + 1)); - break; - default: - *((uint64_t *)p_tmp) = 0; - } - p_tmp += sizeof(uint64_t); - } - return (0); - - default: - return (-1); - } -} - static void bxe_handle_chip_tq(void *context, int pending) @@ -4588,8 +4479,6 @@ bxe_ioctl(struct ifnet *ifp, { struct bxe_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; - struct bxe_nvram_data *nvdata; - uint32_t priv_op; int mask = 0; int reinit = 0; int error = 0; @@ -4774,36 +4663,6 @@ bxe_ioctl(struct ifnet *ifp, error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, command); break; - case SIOCGPRIVATE_0: - copyin(ifr->ifr_data, &priv_op, sizeof(priv_op)); - - switch (priv_op) - { - case BXE_IOC_RD_NVRAM: - case BXE_IOC_WR_NVRAM: - nvdata = (struct bxe_nvram_data *)ifr->ifr_data; - BLOGD(sc, DBG_IOCTL, - "Received Private NVRAM ioctl addr=0x%x size=%u\n", - nvdata->offset, nvdata->len); - error = bxe_ioctl_nvram(sc, priv_op, ifr); - break; - - case BXE_IOC_STATS_SHOW_NUM: - case BXE_IOC_STATS_SHOW_STR: - case BXE_IOC_STATS_SHOW_CNT: - BLOGD(sc, DBG_IOCTL, "Received Private Stats ioctl (%d)\n", - priv_op); - error = bxe_ioctl_stats_show(sc, priv_op, ifr); - break; - - default: - BLOGW(sc, "Received Private Unknown ioctl (%d)\n", priv_op); - error = EINVAL; - break; - } - - break; - default: BLOGD(sc, DBG_IOCTL, "Received Unknown Ioctl (cmd=%lu)\n", (command & 0xff)); From owner-svn-src-stable-9@freebsd.org Tue May 10 02:50:56 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51373B34D91; Tue, 10 May 2016 02:50:56 +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 1E14510C3; Tue, 10 May 2016 02:50:56 +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 u4A2otPI032189; Tue, 10 May 2016 02:50:55 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4A2otDV032187; Tue, 10 May 2016 02:50:55 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201605100250.u4A2otDV032187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 10 May 2016 02:50:55 +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: r299302 - in stable/9/sys: dev/bxe modules/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2016 02:50:56 -0000 Author: davidcs Date: Tue May 10 02:50:54 2016 New Revision: 299302 URL: https://svnweb.freebsd.org/changeset/base/299302 Log: MFC r298591 1. Removed -Wno-shift-negative-value from Makefile 2. Fixed warning its absence caused in bxe_elink.c Modified: stable/9/sys/dev/bxe/bxe_elink.c stable/9/sys/modules/bxe/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/bxe/bxe_elink.c ============================================================================== --- stable/9/sys/dev/bxe/bxe_elink.c Tue May 10 02:47:40 2016 (r299301) +++ stable/9/sys/dev/bxe/bxe_elink.c Tue May 10 02:50:54 2016 (r299302) @@ -11969,8 +11969,8 @@ static elink_status_t elink_54618se_conf elink_eee_disable(phy, params, vars); } } else { - vars->eee_status &= ~SHMEM_EEE_1G_ADV << - SHMEM_EEE_SUPPORTED_SHIFT; + vars->eee_status &= ((uint32_t)(~SHMEM_EEE_1G_ADV) << + SHMEM_EEE_SUPPORTED_SHIFT); if (phy->flags & ELINK_FLAGS_EEE) { /* Handle legacy auto-grEEEn */ Modified: stable/9/sys/modules/bxe/Makefile ============================================================================== --- stable/9/sys/modules/bxe/Makefile Tue May 10 02:47:40 2016 (r299301) +++ stable/9/sys/modules/bxe/Makefile Tue May 10 02:50:54 2016 (r299302) @@ -14,6 +14,5 @@ SRCS += bxe.c \ 57712_init_values.c CFLAGS += -I${BXE} -#CFLAGS += -Wno-shift-negative-value .include From owner-svn-src-stable-9@freebsd.org Wed May 11 00:37:17 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1848AB36E21; Wed, 11 May 2016 00:37:17 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E40DE11EA; Wed, 11 May 2016 00:37:16 +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 u4B0bGEA036949; Wed, 11 May 2016 00:37:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4B0bFfE036944; Wed, 11 May 2016 00:37:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201605110037.u4B0bFfE036944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 11 May 2016 00:37:15 +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: r299398 - in stable/9/sys/geom: . mirror raid virstor X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 00:37:17 -0000 Author: pfg Date: Wed May 11 00:37:15 2016 New Revision: 299398 URL: https://svnweb.freebsd.org/changeset/base/299398 Log: MFC r298698: geom: unsign some types to match their definitions and avoid overflows. In struct:gctl_req, nargs is unsigned. In mirror: g_mirror_syncreqs is unsigned. In raid: in struct:g_raid_volume, v_disks_count is unsigned. In virstor: in struct:g_virstor_softc, n_components is unsigned. Modified: stable/9/sys/geom/geom_ctl.c stable/9/sys/geom/mirror/g_mirror.c stable/9/sys/geom/raid/md_promise.c stable/9/sys/geom/raid/md_sii.c stable/9/sys/geom/virstor/g_virstor.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_ctl.c ============================================================================== --- stable/9/sys/geom/geom_ctl.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/geom_ctl.c Wed May 11 00:37:15 2016 (r299398) @@ -135,7 +135,7 @@ gctl_copyin(struct gctl_req *req) { struct gctl_req_arg *ap; char *p; - int i; + u_int i; ap = geom_alloc_copyin(req, req->arg, req->narg * sizeof(*ap)); if (ap == NULL) { @@ -212,7 +212,7 @@ gctl_copyout(struct gctl_req *req) static void gctl_free(struct gctl_req *req) { - int i; + u_int i; sbuf_delete(req->serror); if (req->arg == NULL) @@ -270,7 +270,7 @@ int gctl_set_param(struct gctl_req *req, const char *param, void const *ptr, int len) { - int i; + u_int i; struct gctl_req_arg *ap; for (i = 0; i < req->narg; i++) { @@ -311,7 +311,7 @@ gctl_set_param_err(struct gctl_req *req, void * gctl_get_param(struct gctl_req *req, const char *param, int *len) { - int i; + u_int i; void *p; struct gctl_req_arg *ap; @@ -332,7 +332,7 @@ gctl_get_param(struct gctl_req *req, con char const * gctl_get_asciiparam(struct gctl_req *req, const char *param) { - int i; + u_int i; char const *p; struct gctl_req_arg *ap; Modified: stable/9/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/mirror/g_mirror.c Wed May 11 00:37:15 2016 (r299398) @@ -1119,7 +1119,7 @@ g_mirror_sync_collision(struct g_mirror_ struct g_mirror_disk *disk; struct bio *sbp; off_t rstart, rend, sstart, send; - int i; + u_int i; if (sc->sc_sync.ds_ndisks == 0) return (0); Modified: stable/9/sys/geom/raid/md_promise.c ============================================================================== --- stable/9/sys/geom/raid/md_promise.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/raid/md_promise.c Wed May 11 00:37:15 2016 (r299398) @@ -893,7 +893,7 @@ g_raid_md_promise_start(struct g_raid_vo struct g_raid_md_promise_perdisk *pd; struct g_raid_md_promise_pervolume *pv; struct promise_raid_conf *meta; - int i; + u_int i; sc = vol->v_softc; md = sc->sc_md; Modified: stable/9/sys/geom/raid/md_sii.c ============================================================================== --- stable/9/sys/geom/raid/md_sii.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/raid/md_sii.c Wed May 11 00:37:15 2016 (r299398) @@ -1481,7 +1481,7 @@ g_raid_md_write_sii(struct g_raid_md_obj struct g_raid_md_sii_object *mdi; struct g_raid_md_sii_perdisk *pd; struct sii_raid_conf *meta; - int i; + u_int i; sc = md->mdo_softc; mdi = (struct g_raid_md_sii_object *)md; Modified: stable/9/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/9/sys/geom/virstor/g_virstor.c Wed May 11 00:36:31 2016 (r299397) +++ stable/9/sys/geom/virstor/g_virstor.c Wed May 11 00:37:15 2016 (r299398) @@ -475,7 +475,7 @@ static void update_metadata(struct g_virstor_softc *sc) { struct g_virstor_metadata md; - int n; + u_int n; if (virstor_valid_components(sc) != sc->n_components) return; /* Incomplete device */ @@ -932,7 +932,7 @@ virstor_geom_destroy(struct g_virstor_so { struct g_provider *pp; struct g_geom *gp; - int n; + u_int n; g_topology_assert(); From owner-svn-src-stable-9@freebsd.org Wed May 11 22:07:06 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89016B37E75; Wed, 11 May 2016 22:07:06 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55ECB151F; Wed, 11 May 2016 22:07:06 +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 u4BM75aa034836; Wed, 11 May 2016 22:07:05 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4BM751w034835; Wed, 11 May 2016 22:07:05 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201605112207.u4BM751w034835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 11 May 2016 22:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299486 - stable/9/sys/x86/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 22:07:06 -0000 Author: vangyzen Date: Wed May 11 22:07:05 2016 New Revision: 299486 URL: https://svnweb.freebsd.org/changeset/base/299486 Log: MFC r299004: Work around (ignore) broken SRAT tables Modified: stable/9/sys/x86/acpica/srat.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/x86/acpica/srat.c ============================================================================== --- stable/9/sys/x86/acpica/srat.c Wed May 11 22:06:28 2016 (r299485) +++ stable/9/sys/x86/acpica/srat.c Wed May 11 22:07:05 2016 (r299486) @@ -104,8 +104,12 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *e "enabled" : "disabled"); if (!(cpu->Flags & ACPI_SRAT_CPU_ENABLED)) break; - KASSERT(!cpus[cpu->ApicId].enabled, - ("Duplicate local APIC ID %u", cpu->ApicId)); + if (cpus[cpu->ApicId].enabled) { + printf("SRAT: Duplicate local APIC ID %u\n", + cpu->ApicId); + *(int *)arg = ENXIO; + break; + } cpus[cpu->ApicId].domain = domain; cpus[cpu->ApicId].enabled = 1; break; From owner-svn-src-stable-9@freebsd.org Wed May 11 22:13:52 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3038CB381C1; Wed, 11 May 2016 22:13:52 +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 F1854106E; Wed, 11 May 2016 22:13:51 +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 u4BMDpXf038247; Wed, 11 May 2016 22:13:51 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4BMDpFS038246; Wed, 11 May 2016 22:13:51 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201605112213.u4BMDpFS038246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Wed, 11 May 2016 22:13:51 +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: r299488 - stable/9/bin/sh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 22:13:52 -0000 Author: vangyzen Date: Wed May 11 22:13:50 2016 New Revision: 299488 URL: https://svnweb.freebsd.org/changeset/base/299488 Log: MFC r299035: sh: Handle empty hostname and $PWD when building prompt If the hostname is empty and \h is used in $PS1, the remainder of the prompt following \h will be empty. Likewise for $PWD and \w. Fix it. Modified: stable/9/bin/sh/parser.c Directory Properties: stable/9/bin/sh/ (props changed) Modified: stable/9/bin/sh/parser.c ============================================================================== --- stable/9/bin/sh/parser.c Wed May 11 22:11:37 2016 (r299487) +++ stable/9/bin/sh/parser.c Wed May 11 22:13:50 2016 (r299488) @@ -1982,8 +1982,9 @@ getprompt(void *unused __unused) gethostname(&ps[i], PROMPTLEN - i); /* Skip to end of hostname. */ trim = (*fmt == 'h') ? '.' : '\0'; - while ((ps[i+1] != '\0') && (ps[i+1] != trim)) + while ((ps[i] != '\0') && (ps[i] != trim)) i++; + --i; break; /* @@ -1995,7 +1996,7 @@ getprompt(void *unused __unused) case 'W': case 'w': pwd = lookupvar("PWD"); - if (pwd == NULL) + if (pwd == NULL || *pwd == '\0') pwd = "?"; if (*fmt == 'W' && *pwd == '/' && pwd[1] != '\0') From owner-svn-src-stable-9@freebsd.org Thu May 12 00:46:40 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F4BFB36312; Thu, 12 May 2016 00:46:40 +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 014D41DB1; Thu, 12 May 2016 00:46:39 +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 u4C0kdjI083564; Thu, 12 May 2016 00:46:39 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4C0kcNF083561; Thu, 12 May 2016 00:46:38 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201605120046.u4C0kcNF083561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 12 May 2016 00:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299498 - in stable/9/sys/geom: journal raid X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2016 00:46:40 -0000 Author: pfg Date: Thu May 12 00:46:38 2016 New Revision: 299498 URL: https://svnweb.freebsd.org/changeset/base/299498 Log: MFC r298755: sys/geom: spelling fixes. These affect debugging messages. Modified: stable/9/sys/geom/journal/g_journal.h stable/9/sys/geom/raid/g_raid_ctl.c stable/9/sys/geom/raid/md_ddf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/journal/g_journal.h ============================================================================== --- stable/9/sys/geom/journal/g_journal.h Thu May 12 00:45:57 2016 (r299497) +++ stable/9/sys/geom/journal/g_journal.h Thu May 12 00:46:38 2016 (r299498) @@ -224,7 +224,7 @@ struct g_journal_entry { #define GJ_VALIDATE_OFFSET(offset, sc) do { \ if ((offset) + GJ_RECORD_MAX_SIZE(sc) >= (sc)->sc_jend) { \ (offset) = (sc)->sc_jstart; \ - GJ_DEBUG(2, "Starting from the begining (%s).", \ + GJ_DEBUG(2, "Starting from the beginning (%s).", \ (sc)->sc_name); \ } \ } while (0) Modified: stable/9/sys/geom/raid/g_raid_ctl.c ============================================================================== --- stable/9/sys/geom/raid/g_raid_ctl.c Thu May 12 00:45:57 2016 (r299497) +++ stable/9/sys/geom/raid/g_raid_ctl.c Thu May 12 00:46:38 2016 (r299498) @@ -117,7 +117,7 @@ g_raid_ctl_label(struct gctl_req *req, s } format = gctl_get_asciiparam(req, "arg0"); if (format == NULL) { - gctl_error(req, "No format recieved."); + gctl_error(req, "No format received."); return; } crstatus = g_raid_create_node_format(format, req, &geom); @@ -164,7 +164,7 @@ g_raid_ctl_stop(struct gctl_req *req, st } nodename = gctl_get_asciiparam(req, "arg0"); if (nodename == NULL) { - gctl_error(req, "No array name recieved."); + gctl_error(req, "No array name received."); return; } sc = g_raid_find_node(mp, nodename); @@ -204,7 +204,7 @@ g_raid_ctl_other(struct gctl_req *req, s } nodename = gctl_get_asciiparam(req, "arg0"); if (nodename == NULL) { - gctl_error(req, "No array name recieved."); + gctl_error(req, "No array name received."); return; } sc = g_raid_find_node(mp, nodename); Modified: stable/9/sys/geom/raid/md_ddf.c ============================================================================== --- stable/9/sys/geom/raid/md_ddf.c Thu May 12 00:45:57 2016 (r299497) +++ stable/9/sys/geom/raid/md_ddf.c Thu May 12 00:46:38 2016 (r299498) @@ -257,7 +257,7 @@ g_raid_md_ddf_print(struct ddf_meta *met printf("BBM Log %u:%u\n", GET32(meta, hdr->bbmlog_section), GET32(meta, hdr->bbmlog_length)); printf("Diagnostic Space %u:%u\n", GET32(meta, hdr->Diagnostic_Space), GET32(meta, hdr->Diagnostic_Space_Length)); printf("Vendor_Specific_Logs %u:%u\n", GET32(meta, hdr->Vendor_Specific_Logs), GET32(meta, hdr->Vendor_Specific_Logs_Length)); - printf("**** Controler Data ****\n"); + printf("**** Controller Data ****\n"); printf("Controller_GUID "); print_guid(meta->cdr->Controller_GUID); printf("\n"); From owner-svn-src-stable-9@freebsd.org Fri May 13 08:04:04 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FA5CB38E72; Fri, 13 May 2016 08:04:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C3E0183E; Fri, 13 May 2016 08:04:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4D843fb055408; Fri, 13 May 2016 08:04:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D843dG055407; Fri, 13 May 2016 08:04:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130804.u4D843dG055407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 08:04:03 +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: r299614 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 08:04:04 -0000 Author: ngie Date: Fri May 13 08:04:03 2016 New Revision: 299614 URL: https://svnweb.freebsd.org/changeset/base/299614 Log: MFstable/10 r299613: MFC r298678: r298678 (by cem): posix4_mib: Don't overrun facility_initialized array The facility_initialized and facility arrays are the same size and were intended to be indexed the same. I believe this mismatch was just a typo/braino in r208731. CID: 1017430 Modified: stable/9/sys/kern/posix4_mib.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/posix4_mib.c ============================================================================== --- stable/9/sys/kern/posix4_mib.c Fri May 13 07:56:14 2016 (r299613) +++ stable/9/sys/kern/posix4_mib.c Fri May 13 08:04:03 2016 (r299614) @@ -114,9 +114,9 @@ p31b_sysctl_proc(SYSCTL_HANDLER_ARGS) num = arg2; if (!P31B_VALID(num)) return (EINVAL); - val = facility_initialized[num] ? facility[num - 1] : 0; + val = facility_initialized[num - 1] ? facility[num - 1] : 0; error = sysctl_handle_int(oidp, &val, 0, req); - if (error == 0 && req->newptr != NULL && facility_initialized[num]) + if (error == 0 && req->newptr != NULL && facility_initialized[num - 1]) facility[num - 1] = val; return (error); } @@ -138,7 +138,7 @@ p31b_unsetcfg(int num) { facility[num - 1] = 0; - facility_initialized[num -1] = 0; + facility_initialized[num - 1] = 0; } int From owner-svn-src-stable-9@freebsd.org Fri May 13 08:25:18 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABEF3B396C5; Fri, 13 May 2016 08:25:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D3DF1ABA; Fri, 13 May 2016 08:25:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4D8PHRR062005; Fri, 13 May 2016 08:25:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D8PHaQ062004; Fri, 13 May 2016 08:25:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130825.u4D8PHaQ062004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 08:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299618 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 08:25:18 -0000 Author: ngie Date: Fri May 13 08:25:17 2016 New Revision: 299618 URL: https://svnweb.freebsd.org/changeset/base/299618 Log: MFstable/10 r299616: MFC r298333: r298333 (by cem): Make Racct macro slightly more gracious given RACCT_UNDEFINED rctl_string_to_rule could previously index below the zeroth element of racct_types via the macro. Maybe it shouldn't use the macro on RACCT_UNDEFINED. But given every other RACCT_ definition is non-negative, it seems pretty easy to foot-shoot this one without the check. CID: 1305574 Modified: stable/9/sys/sys/racct.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/racct.h ============================================================================== --- stable/9/sys/sys/racct.h Fri May 13 08:25:06 2016 (r299617) +++ stable/9/sys/sys/racct.h Fri May 13 08:25:17 2016 (r299618) @@ -88,7 +88,8 @@ extern int racct_types[]; * visible to the userland. It gets fixed up when retrieving resource * usage or adding rules. */ -#define RACCT_IS_IN_MILLIONS(X) (racct_types[X] & RACCT_IN_MILLIONS) +#define RACCT_IS_IN_MILLIONS(X) \ + ((X) != RACCT_UNDEFINED && (racct_types[(X)] & RACCT_IN_MILLIONS) != 0) /* * Resource usage can drop, as opposed to only grow. When the process From owner-svn-src-stable-9@freebsd.org Fri May 13 08:34:55 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DFEBB3994A; Fri, 13 May 2016 08:34: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 E42AC1111; Fri, 13 May 2016 08:34: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 u4D8Ysaj065099; Fri, 13 May 2016 08:34:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D8Ysrv065098; Fri, 13 May 2016 08:34:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130834.u4D8Ysrv065098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 08:34:54 +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: r299620 - stable/9/sys/rpc/rpcsec_gss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 08:34:55 -0000 Author: ngie Date: Fri May 13 08:34:53 2016 New Revision: 299620 URL: https://svnweb.freebsd.org/changeset/base/299620 Log: MFstable/10 r299619: MFC r298336: r298336 (by cem): kgssapi(4): Fix string overrun in Kerberos principal construction 'buf.value' was previously treated as a nul-terminated string, but only allocated with strlen() space. Rectify this. CID: 1007639 Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Fri May 13 08:30:26 2016 (r299619) +++ stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Fri May 13 08:34:53 2016 (r299620) @@ -334,7 +334,7 @@ rpc_gss_get_principal_name(rpc_gss_princ * Construct a gss_buffer containing the full name formatted * as "name/node@domain" where node and domain are optional. */ - namelen = strlen(name); + namelen = strlen(name) + 1; if (node) { namelen += strlen(node) + 1; } From owner-svn-src-stable-9@freebsd.org Fri May 13 08:42:22 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCF1BB39B0E; Fri, 13 May 2016 08:42: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 A78711A91; Fri, 13 May 2016 08:42: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 u4D8gLHA068192; Fri, 13 May 2016 08:42:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D8gLW7068191; Fri, 13 May 2016 08:42:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130842.u4D8gLW7068191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 08:42: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: r299624 - stable/9/sys/dev/pty X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 08:42:23 -0000 Author: ngie Date: Fri May 13 08:42:21 2016 New Revision: 299624 URL: https://svnweb.freebsd.org/changeset/base/299624 Log: MFstable/10 r299623: MFC r298337: r298337 (by cem): pty(4): Use strlcpy to guarantee destination buffer isn't overrun The devtoname() name is strcpyed into a small stack buffer. Sure, we always expect the name to be ttyXX (or ptyXX). If that's the case, strlcpy() doesn't hurt. CID: 1006768 Modified: stable/9/sys/dev/pty/pty.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/pty/pty.c ============================================================================== --- stable/9/sys/dev/pty/pty.c Fri May 13 08:41:09 2016 (r299623) +++ stable/9/sys/dev/pty/pty.c Fri May 13 08:42:21 2016 (r299624) @@ -67,7 +67,7 @@ ptydev_fdopen(struct cdev *dev, int ffla return (EBUSY); /* Generate device name and create PTY. */ - strcpy(name, devtoname(dev)); + strlcpy(name, devtoname(dev), sizeof(name)); name[0] = 't'; error = pts_alloc_external(fflags & (FREAD|FWRITE), td, fp, dev, name); From owner-svn-src-stable-9@freebsd.org Fri May 13 08:46:14 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71F1CB39CBA; Fri, 13 May 2016 08:46:14 +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 441A41DF3; Fri, 13 May 2016 08:46:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4D8kDTJ068470; Fri, 13 May 2016 08:46:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D8kDC0068469; Fri, 13 May 2016 08:46:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130846.u4D8kDC0068469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 08:46:13 +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: r299626 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 08:46:14 -0000 Author: ngie Date: Fri May 13 08:46:13 2016 New Revision: 299626 URL: https://svnweb.freebsd.org/changeset/base/299626 Log: MFstable/10 r299625: MFC r298677: r298677 (by cem): subr_mbpool: Don't free bogus pointer in error paths An mbpool is allocated with a contiguous array of mbpages. Freeing an individual mbpage has never been valid. Don't do it. This bug has been present since this code was introduced in r117624 (2003). CID: 1009687 Modified: stable/9/sys/kern/subr_mbpool.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_mbpool.c ============================================================================== --- stable/9/sys/kern/subr_mbpool.c Fri May 13 08:44:59 2016 (r299625) +++ stable/9/sys/kern/subr_mbpool.c Fri May 13 08:46:13 2016 (r299626) @@ -209,16 +209,13 @@ mbp_alloc_page(struct mbpool *p) pg = &p->pages[p->npages]; error = bus_dmamem_alloc(p->dmat, &pg->va, BUS_DMA_NOWAIT, &pg->map); - if (error != 0) { - free(pg, M_MBPOOL); + if (error != 0) return; - } error = bus_dmamap_load(p->dmat, pg->map, pg->va, p->page_size, mbp_callback, &pg->phy, 0); if (error != 0) { bus_dmamem_free(p->dmat, pg->va, pg->map); - free(pg, M_MBPOOL); return; } From owner-svn-src-stable-9@freebsd.org Fri May 13 08:51:52 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49886B3901D; Fri, 13 May 2016 08:51: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 1A28E1287; Fri, 13 May 2016 08:51: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 u4D8ppJV071401; Fri, 13 May 2016 08:51:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D8ppDC071400; Fri, 13 May 2016 08:51:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130851.u4D8ppDC071400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 08:51:51 +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: r299628 - stable/9/sys/netipsec X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 08:51:52 -0000 Author: ngie Date: Fri May 13 08:51:51 2016 New Revision: 299628 URL: https://svnweb.freebsd.org/changeset/base/299628 Log: MFstable/10 r299627: MFC r298676: r298676 (by cem): netipsec: Don't leak memory when deep copy fails CID: 1331693 Modified: stable/9/sys/netipsec/ipsec.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/netipsec/ipsec.c ============================================================================== --- stable/9/sys/netipsec/ipsec.c Fri May 13 08:49:29 2016 (r299627) +++ stable/9/sys/netipsec/ipsec.c Fri May 13 08:51:51 2016 (r299628) @@ -936,6 +936,7 @@ fail: ipsec_delisr(p); p = NULL; } + KEY_FREESP(&dst); return (NULL); } From owner-svn-src-stable-9@freebsd.org Fri May 13 08:59:50 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5225B3930C; Fri, 13 May 2016 08:59: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 968151B35; Fri, 13 May 2016 08:59: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 u4D8xn4S072043; Fri, 13 May 2016 08:59:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D8xndU072042; Fri, 13 May 2016 08:59:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130859.u4D8xndU072042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 08:59:49 +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: r299631 - stable/9/sys/dev/sym X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 08:59:50 -0000 Author: ngie Date: Fri May 13 08:59:49 2016 New Revision: 299631 URL: https://svnweb.freebsd.org/changeset/base/299631 Log: MFstable/10 r299630: MFC r298340: r298340 (by cem): sym(4): Don't double-free 'sim' in failure case CID: 1006106 Modified: stable/9/sys/dev/sym/sym_hipd.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/9/sys/dev/sym/sym_hipd.c Fri May 13 08:58:49 2016 (r299630) +++ stable/9/sys/dev/sym/sym_hipd.c Fri May 13 08:59:49 2016 (r299631) @@ -8891,6 +8891,7 @@ static int sym_cam_attach(hcb_p np) if (xpt_bus_register(sim, np->device, 0) != CAM_SUCCESS) goto fail; np->sim = sim; + sim = NULL; if (xpt_create_path(&path, NULL, cam_sim_path(np->sim), CAM_TARGET_WILDCARD, From owner-svn-src-stable-9@freebsd.org Fri May 13 09:02:29 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF61AB3964B; Fri, 13 May 2016 09:02:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A15341083; Fri, 13 May 2016 09:02: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 u4D92S5Q074877; Fri, 13 May 2016 09:02:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D92SOg074876; Fri, 13 May 2016 09:02:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130902.u4D92SOg074876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 09:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299633 - stable/9/sys/dev/sound/midi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 09:02:29 -0000 Author: ngie Date: Fri May 13 09:02:28 2016 New Revision: 299633 URL: https://svnweb.freebsd.org/changeset/base/299633 Log: MFstable/10 r299632: MFC r298339: r298339 (by cem): sound(4): Don't use-after-free in midi module unload Also, use ANSI function parameter definitions (void) while here. CID: 1006107 Modified: stable/9/sys/dev/sound/midi/midi.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/midi/midi.c ============================================================================== --- stable/9/sys/dev/sound/midi/midi.c Fri May 13 09:01:20 2016 (r299632) +++ stable/9/sys/dev/sound/midi/midi.c Fri May 13 09:02:28 2016 (r299633) @@ -1397,7 +1397,7 @@ midi_destroy(struct snd_midi *m, int mid */ static int -midi_load() +midi_load(void) { mtx_init(&midistat_lock, "midistat lock", NULL, 0); TAILQ_INIT(&midi_devs); /* Initialize the queue. */ @@ -1410,9 +1410,9 @@ midi_load() } static int -midi_unload() +midi_unload(void) { - struct snd_midi *m; + struct snd_midi *m, *tmp; int retval; MIDI_DEBUG(1, printf("midi_unload()\n")); @@ -1421,7 +1421,7 @@ midi_unload() if (midistat_isopen) goto exit0; - TAILQ_FOREACH(m, &midi_devs, link) { + TAILQ_FOREACH_SAFE(m, &midi_devs, link, tmp) { mtx_lock(&m->lock); if (m->busy) retval = EBUSY; From owner-svn-src-stable-9@freebsd.org Fri May 13 09:07:43 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9A61B39846; Fri, 13 May 2016 09:07: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 85BE01658; Fri, 13 May 2016 09:07:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4D97gdK075301; Fri, 13 May 2016 09:07:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D97gEv075300; Fri, 13 May 2016 09:07:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130907.u4D97gEv075300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 09:07:42 +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: r299636 - stable/9/sys/dev/aacraid X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 09:07:43 -0000 Author: ngie Date: Fri May 13 09:07:42 2016 New Revision: 299636 URL: https://svnweb.freebsd.org/changeset/base/299636 Log: MFstable/10 r299635: MFC r298665: r298665 (by cem): aacraid(4): Fix some mostly trivial buffer overruns strcpy(3) emits a trailing nul byte, trampling fields after the intended destination. Instead, use strncpy(3), intentionally leaving these fields not nul-terminated. CIDs: 1031024, 1305463, 1305494, 1305545 Modified: stable/9/sys/dev/aacraid/aacraid_cam.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- stable/9/sys/dev/aacraid/aacraid_cam.c Fri May 13 09:06:52 2016 (r299635) +++ stable/9/sys/dev/aacraid/aacraid_cam.c Fri May 13 09:07:42 2016 (r299636) @@ -570,9 +570,11 @@ aac_container_special_command(struct cam p->additional_length = 31; p->flags = SID_WBus16|SID_Sync|SID_CmdQue; /* OEM Vendor defines */ - strcpy(p->vendor,"Adaptec "); - strcpy(p->product,"Array "); - strcpy(p->revision,"V1.0"); + strncpy(p->vendor, "Adaptec ", sizeof(p->vendor)); + strncpy(p->product, "Array ", + sizeof(p->product)); + strncpy(p->revision, "V1.0", + sizeof(p->revision)); } } else { if (inq->page_code == SVPD_SUPPORTED_PAGE_LIST) { From owner-svn-src-stable-9@freebsd.org Fri May 13 09:16:02 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89ED0B39C92; Fri, 13 May 2016 09:16: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 5BD971EFC; Fri, 13 May 2016 09:16: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 u4D9G186078600; Fri, 13 May 2016 09:16:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D9G13L078599; Fri, 13 May 2016 09:16:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130916.u4D9G13L078599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 09:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299639 - stable/9/contrib/bsnmp/snmp_mibII X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 09:16:02 -0000 Author: ngie Date: Fri May 13 09:16:01 2016 New Revision: 299639 URL: https://svnweb.freebsd.org/changeset/base/299639 Log: MFstable/10 r299638: MFC r298462: Return `ret` in op_ifentry(..) to mute a -Wunused-but-set-variable warning This will also now detect error conditions with value->var.subs[sub - 1] == LEAF_ifPhysAddress where `string_get(..)` could fail if iifp->physaddr and/or iifp->physaddrlen were deemed invalid. CID: 1006551 Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/bsnmp/ (props changed) stable/9/contrib/bsnmp/snmp_mibII/ (props changed) Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c ============================================================================== --- stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Fri May 13 09:14:43 2016 (r299638) +++ stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Fri May 13 09:16:01 2016 (r299639) @@ -356,7 +356,7 @@ op_ifentry(struct snmp_context *ctx, str value->v.oid = ifp->spec_oid; break; } - return (SNMP_ERR_NOERROR); + return (ret); } /* From owner-svn-src-stable-9@freebsd.org Fri May 13 09:32:06 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B0C4B372FE; Fri, 13 May 2016 09:32:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 185461E0E; Fri, 13 May 2016 09:32:06 +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 u4D9W5Eh084832; Fri, 13 May 2016 09:32:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D9W5pU084831; Fri, 13 May 2016 09:32:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130932.u4D9W5pU084831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 09:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299644 - stable/9/sys/ufs/ufs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 09:32:06 -0000 Author: ngie Date: Fri May 13 09:32:05 2016 New Revision: 299644 URL: https://svnweb.freebsd.org/changeset/base/299644 Log: MFstable/10 r299640: MFC r298463: Add FEATURE knob for testing for UFS extended attribute kernel support Support can be verified via `feature_present("ufs_extattr")`, etc. Relnotes: yes Modified: stable/9/sys/ufs/ufs/ufs_extattr.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- stable/9/sys/ufs/ufs/ufs_extattr.c Fri May 13 09:31:40 2016 (r299643) +++ stable/9/sys/ufs/ufs/ufs_extattr.c Fri May 13 09:32:05 2016 (r299644) @@ -69,6 +69,8 @@ __FBSDID("$FreeBSD$"); #ifdef UFS_EXTATTR +FEATURE(ufs_extattr, "ufs extended attribute support"); + static MALLOC_DEFINE(M_UFS_EXTATTR, "ufs_extattr", "ufs extended attribute"); static int ufs_extattr_sync = 0; From owner-svn-src-stable-9@freebsd.org Fri May 13 09:33:49 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5805B3739F; Fri, 13 May 2016 09:33: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 9D6F01FD7; Fri, 13 May 2016 09:33: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 u4D9Xmgb084961; Fri, 13 May 2016 09:33:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D9XmeP084959; Fri, 13 May 2016 09:33:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130933.u4D9XmeP084959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 09:33:48 +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: r299645 - in stable/9: share/man/man8 tools/build/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 09:33:50 -0000 Author: ngie Date: Fri May 13 09:33:48 2016 New Revision: 299645 URL: https://svnweb.freebsd.org/changeset/base/299645 Log: MFstable/10 r299643: MFC r299162,r299163: r299162: Only install NIS section 8 manpages if MK_NIS != no r299163: Fix r299162 share/man/man8/Makefile: - Add src.opts.mk so MK_NIS can be tested - Fix typo in MK_NIS conditional tools/build/mk/OptionalObsoleteFiles.inc: - Remove WIP diff from ^/user/ngie/detangle-rc Modified: stable/9/share/man/man8/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man8/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/share/man/man8/Makefile ============================================================================== --- stable/9/share/man/man8/Makefile Fri May 13 09:32:05 2016 (r299644) +++ stable/9/share/man/man8/Makefile Fri May 13 09:33:48 2016 (r299645) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ +.include + MAN= crash.8 \ diskless.8 \ intro.8 \ @@ -10,7 +12,6 @@ MAN= crash.8 \ rc.sendmail.8 \ rc.subr.8 \ rescue.8 \ - yp.8 MLINKS= rc.8 rc.atm.8 \ rc.8 rc.d.8 \ @@ -20,8 +21,13 @@ MLINKS= rc.8 rc.atm.8 \ rc.8 rc.pccard.8 \ rc.8 rc.serial.8 \ rc.8 rc.shutdown.8 + +.if ${MK_NIS} != "no" +MAN+= yp.8 + MLINKS+=yp.8 NIS.8 \ yp.8 nis.8 \ yp.8 YP.8 +.endif .include Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri May 13 09:32:05 2016 (r299644) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri May 13 09:33:48 2016 (r299645) @@ -3256,6 +3256,10 @@ OLD_FILES+=usr/share/man/man5/netid.5.gz OLD_FILES+=usr/share/man/man8/mknetid.8.gz OLD_FILES+=usr/share/man/man8/rpc.yppasswdd.8.gz OLD_FILES+=usr/share/man/man8/rpc.ypxfrd.8.gz +OLD_FILES+=usr/share/man/man8/NIS.8.gz +OLD_FILES+=usr/share/man/man8/YP.8.gz +OLD_FILES+=usr/share/man/man8/yp.8.gz +OLD_FILES+=usr/share/man/man8/nis.8.gz OLD_FILES+=usr/share/man/man8/yp_mkdb.8.gz OLD_FILES+=usr/share/man/man8/ypbind.8.gz OLD_FILES+=usr/share/man/man8/ypinit.8.gz From owner-svn-src-stable-9@freebsd.org Fri May 13 09:50:39 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6685B377F2; Fri, 13 May 2016 09:50:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A786A1D1E; Fri, 13 May 2016 09:50:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4D9ocRM088532; Fri, 13 May 2016 09:50:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D9ocxe088531; Fri, 13 May 2016 09:50:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130950.u4D9ocxe088531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 09:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299650 - stable/9/lib/libkvm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 09:50:39 -0000 Author: ngie Date: Fri May 13 09:50:38 2016 New Revision: 299650 URL: https://svnweb.freebsd.org/changeset/base/299650 Log: MFstable/10 r299649: MFC r298842: Don't leak PML4 in _amd64_initvtop(..) if kvm_read2(..) fails CID: 1341474 Modified: stable/9/lib/libkvm/kvm_amd64.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libkvm/ (props changed) Modified: stable/9/lib/libkvm/kvm_amd64.c ============================================================================== --- stable/9/lib/libkvm/kvm_amd64.c Fri May 13 09:49:52 2016 (r299649) +++ stable/9/lib/libkvm/kvm_amd64.c Fri May 13 09:50:38 2016 (r299650) @@ -200,6 +200,7 @@ _kvm_initvtop(kvm_t *kd) PML4 = _kvm_malloc(kd, PAGE_SIZE); if (kvm_read(kd, pa, PML4, PAGE_SIZE) != PAGE_SIZE) { _kvm_err(kd, kd->program, "cannot read KPML4phys"); + free(PML4); return (-1); } kd->vmst->PML4 = PML4; From owner-svn-src-stable-9@freebsd.org Fri May 13 09:54:16 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DABE9B37A66; Fri, 13 May 2016 09:54: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 ABBDA11FD; Fri, 13 May 2016 09:54: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 u4D9sF1M091461; Fri, 13 May 2016 09:54:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4D9sFe9091460; Fri, 13 May 2016 09:54:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605130954.u4D9sFe9091460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 May 2016 09:54:15 +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: r299652 - stable/9/lib/libkvm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 09:54:17 -0000 Author: ngie Date: Fri May 13 09:54:15 2016 New Revision: 299652 URL: https://svnweb.freebsd.org/changeset/base/299652 Log: MFstable/10 r299651: MFC r298839: Fix memory allocation edgecases in kvm_argv(..) - Don't leak nbufp on realloc failure in kvm_argv - Catch malloc errors with bufp - Set buflen last in the "buflen == 0" case to ensure that bufp/nbufp is properly reallocated on the next go around Modified: stable/9/lib/libkvm/kvm_proc.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libkvm/ (props changed) Modified: stable/9/lib/libkvm/kvm_proc.c ============================================================================== --- stable/9/lib/libkvm/kvm_proc.c Fri May 13 09:52:39 2016 (r299651) +++ stable/9/lib/libkvm/kvm_proc.c Fri May 13 09:54:15 2016 (r299652) @@ -642,6 +642,7 @@ kvm_argv(kvm_t *kd, const struct kinfo_p static char *buf, *p; static char **bufp; static int argc; + char **nbufp; if (!ISALIVE(kd)) { _kvm_err(kd, kd->program, @@ -657,9 +658,15 @@ kvm_argv(kvm_t *kd, const struct kinfo_p _kvm_err(kd, kd->program, "cannot allocate memory"); return (0); } - buflen = nchr; argc = 32; bufp = malloc(sizeof(char *) * argc); + if (bufp == NULL) { + free(buf); + buf = NULL; + _kvm_err(kd, kd->program, "cannot allocate memory"); + return (NULL); + } + buflen = nchr; } else if (nchr > buflen) { p = realloc(buf, nchr); if (p != NULL) { @@ -693,8 +700,10 @@ kvm_argv(kvm_t *kd, const struct kinfo_p p += strlen(p) + 1; if (i >= argc) { argc += argc; - bufp = realloc(bufp, - sizeof(char *) * argc); + nbufp = realloc(bufp, sizeof(char *) * argc); + if (nbufp == NULL) + return (NULL); + bufp = nbufp; } } while (p < buf + bufsz); bufp[i++] = 0; From owner-svn-src-stable-9@freebsd.org Fri May 13 21:05:10 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCB9FB39D21; Fri, 13 May 2016 21:05:10 +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 8BD181BC8; Fri, 13 May 2016 21:05:10 +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 u4DL59ij001655; Fri, 13 May 2016 21:05:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4DL59Ar001654; Fri, 13 May 2016 21:05:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201605132105.u4DL59Ar001654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 13 May 2016 21:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r299696 - stable/9/sys/dev/sym X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 21:05:10 -0000 Author: markj Date: Fri May 13 21:05:09 2016 New Revision: 299696 URL: https://svnweb.freebsd.org/changeset/base/299696 Log: MFC r299694: Fix a bug in r298340: "sim" was referenced after being unset. Modified: stable/9/sys/dev/sym/sym_hipd.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/9/sys/dev/sym/sym_hipd.c Fri May 13 20:58:25 2016 (r299695) +++ stable/9/sys/dev/sym/sym_hipd.c Fri May 13 21:05:09 2016 (r299696) @@ -8903,7 +8903,7 @@ static int sym_cam_attach(hcb_p np) /* * Establish our async notification handler. */ - if (xpt_register_async(AC_LOST_DEVICE, sym_async, sim, path) != + if (xpt_register_async(AC_LOST_DEVICE, sym_async, np->sim, path) != CAM_REQ_CMP) goto fail;