From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 00:43:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B610C106564A; Sun, 22 Apr 2012 00:43:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 967888FC0A; Sun, 22 Apr 2012 00:43:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M0hWi9011798; Sun, 22 Apr 2012 00:43:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M0hWT7011795; Sun, 22 Apr 2012 00:43:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204220043.q3M0hWT7011795@svn.freebsd.org> From: Marius Strobl Date: Sun, 22 Apr 2012 00:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234560 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 00:43:32 -0000 Author: marius Date: Sun Apr 22 00:43:32 2012 New Revision: 234560 URL: http://svn.freebsd.org/changeset/base/234560 Log: - Add support for MCI1 revision 2xx controllers and a work-around for their "Data Write Operation and number of bytes" erratum. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: head/sys/arm/at91/at91_mci.c head/sys/arm/at91/at91_mcireg.h Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Sat Apr 21 20:22:02 2012 (r234559) +++ head/sys/arm/at91/at91_mci.c Sun Apr 22 00:43:32 2012 (r234560) @@ -113,6 +113,7 @@ static void at91_mci_intr(void *); /* helper routines */ static int at91_mci_activate(device_t dev); static void at91_mci_deactivate(device_t dev); +static int at91_mci_is_mci1rev2xx(void); #define AT91_MCI_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define AT91_MCI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) @@ -141,11 +142,16 @@ static void at91_mci_init(device_t dev) { struct at91_mci_softc *sc = device_get_softc(dev); + uint32_t val; WR4(sc, MCI_CR, MCI_CR_MCIEN); /* Enable controller */ WR4(sc, MCI_IDR, 0xffffffff); /* Turn off interrupts */ WR4(sc, MCI_DTOR, MCI_DTOR_DTOMUL_1M | 1); - WR4(sc, MCI_MR, 0x834a); // XXX GROSS HACK FROM LINUX + val = MCI_MR_PDCMODE; + val |= 0x34a; /* PWSDIV = 3; CLKDIV = 74 */ + if (at91_mci_is_mci1rev2xx()) + val |= MCI_MR_RDPROOF | MCI_MR_WRPROOF; + WR4(sc, MCI_MR, val); #ifndef AT91_MCI_SLOT_B WR4(sc, MCI_SDCR, 0); /* SLOT A, 1 bit bus */ #else @@ -303,6 +309,29 @@ at91_mci_deactivate(device_t dev) return; } +static int +at91_mci_is_mci1rev2xx(void) +{ + + switch (AT91_CPU(at91_chip_id)) { + case AT91_CPU_SAM9260: + case AT91_CPU_SAM9263: +#ifdef notyet + case AT91_CPU_CAP9: +#endif + case AT91_CPU_SAM9G10: + case AT91_CPU_SAM9G20: +#ifdef notyet + case AT91_CPU_SAM9RL: +#endif + case AT91_CPU_SAM9XE128: + case AT91_CPU_SAM9XE256: + case AT91_CPU_SAM9XE512: + return(1); + } + return (0); +} + static void at91_mci_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { @@ -346,6 +375,7 @@ at91_mci_update_ios(device_t brdev, devi static void at91_mci_start_cmd(struct at91_mci_softc *sc, struct mmc_command *cmd) { + size_t len; uint32_t cmdr, ier = 0, mr; uint32_t *src, *dst; int i; @@ -397,6 +427,7 @@ at91_mci_start_cmd(struct at91_mci_softc WR4(sc, MCI_MR, mr | (data->len << 16) | MCI_MR_PDCMODE); WR4(sc, PDC_PTCR, PDC_PTCR_RXTDIS | PDC_PTCR_TXTDIS); if (cmdr & MCI_CMDR_TRCMD_START) { + len = data->len; if (cmdr & MCI_CMDR_TRDIR) vaddr = cmd->data->data; else { @@ -411,6 +442,15 @@ at91_mci_start_cmd(struct at91_mci_softc vaddr = sc->bounce_buffer; src = (uint32_t *)cmd->data->data; dst = (uint32_t *)vaddr; + /* + * If this is MCI1 revision 2xx controller, apply + * a work-around for the "Data Write Operation and + * number of bytes" erratum. + */ + if (at91_mci_is_mci1rev2xx() && data->len < 12) { + len = 12; + memset(dst, 0, 12); + } if (sc->sc_cap & CAP_NEEDS_BYTESWAP) { for (i = 0; i < data->len / 4; i++) dst[i] = bswap32(src[i]); @@ -418,7 +458,7 @@ at91_mci_start_cmd(struct at91_mci_softc memcpy(dst, src, data->len); } data->xfer_len = 0; - if (bus_dmamap_load(sc->dmatag, sc->map, vaddr, data->len, + if (bus_dmamap_load(sc->dmatag, sc->map, vaddr, len, at91_mci_getaddr, &paddr, 0) != 0) { cmd->error = MMC_ERR_NO_MEMORY; sc->req = NULL; @@ -430,12 +470,12 @@ at91_mci_start_cmd(struct at91_mci_softc if (cmdr & MCI_CMDR_TRDIR) { bus_dmamap_sync(sc->dmatag, sc->map, BUS_DMASYNC_PREREAD); WR4(sc, PDC_RPR, paddr); - WR4(sc, PDC_RCR, data->len / 4); + WR4(sc, PDC_RCR, len / 4); ier = MCI_SR_ENDRX; } else { bus_dmamap_sync(sc->dmatag, sc->map, BUS_DMASYNC_PREWRITE); WR4(sc, PDC_TPR, paddr); - WR4(sc, PDC_TCR, data->len / 4); + WR4(sc, PDC_TCR, len / 4); ier = MCI_SR_TXBUFE; } } @@ -769,7 +809,7 @@ static device_method_t at91_mci_methods[ DEVMETHOD(mmcbr_acquire_host, at91_mci_acquire_host), DEVMETHOD(mmcbr_release_host, at91_mci_release_host), - {0, 0}, + DEVMETHOD_END }; static driver_t at91_mci_driver = { @@ -777,7 +817,8 @@ static driver_t at91_mci_driver = { at91_mci_methods, sizeof(struct at91_mci_softc), }; -static devclass_t at91_mci_devclass; +static devclass_t at91_mci_devclass; -DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, 0, 0); +DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, NULL, + NULL); Modified: head/sys/arm/at91/at91_mcireg.h ============================================================================== --- head/sys/arm/at91/at91_mcireg.h Sat Apr 21 20:22:02 2012 (r234559) +++ head/sys/arm/at91/at91_mcireg.h Sun Apr 22 00:43:32 2012 (r234560) @@ -54,6 +54,9 @@ /* -------- MCI_MR : (MCI Offset: 0x4) MCI Mode Register -------- */ #define MCI_MR_CLKDIV (0xffu << 0) /* (MCI) Clock Divider */ #define MCI_MR_PWSDIV (0x3fu << 8) /* (MCI) Power Saving Divider */ +#define MCI_MR_RDPROOF (0x1u << 11) /* (MCI) Read Proof Enable */ +#define MCI_MR_WRPROOF (0x1u << 12) /* (MCI) Write Proof Enable */ +#define MCI_MR_PDCFBYTE (0x1u << 13) /* (MCI) PDC Force Byte Transfer */ #define MCI_MR_PDCPADV (0x1u << 14) /* (MCI) PDC Padding Value */ #define MCI_MR_PDCMODE (0x1u << 15) /* (MCI) PDC Oriented Mode */ #define MCI_MR_BLKLEN 0x3fff0000ul /* (MCI) Data Block Length */ From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 00:58:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71F2D106566C; Sun, 22 Apr 2012 00:58:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 534A08FC17; Sun, 22 Apr 2012 00:58:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M0w5K8012264; Sun, 22 Apr 2012 00:58:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M0w5nd012262; Sun, 22 Apr 2012 00:58:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204220058.q3M0w5nd012262@svn.freebsd.org> From: Marius Strobl Date: Sun, 22 Apr 2012 00:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234561 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 00:58:05 -0000 Author: marius Date: Sun Apr 22 00:58:04 2012 New Revision: 234561 URL: http://svn.freebsd.org/changeset/base/234561 Log: Interrupts must be disabled while handling a partial cache line flush, as otherwise the interrupt handling code may modify data in the non-DMA part of the cache line while we have it stashed away in the temporary stack buffer, then we end up restoring a stale value. PR: 160431 Submitted by: Ian Lepore MFC after: 1 week Modified: head/sys/arm/arm/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Sun Apr 22 00:43:32 2012 (r234560) +++ head/sys/arm/arm/busdma_machdep.c Sun Apr 22 00:58:04 2012 (r234561) @@ -1091,14 +1091,16 @@ static void bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op) { char _tmp_cl[arm_dcache_align], _tmp_clend[arm_dcache_align]; + register_t s; + int partial; if ((op & BUS_DMASYNC_PREWRITE) && !(op & BUS_DMASYNC_PREREAD)) { cpu_dcache_wb_range((vm_offset_t)buf, len); cpu_l2cache_wb_range((vm_offset_t)buf, len); } + partial = (((vm_offset_t)buf) | len) & arm_dcache_align_mask; if (op & BUS_DMASYNC_PREREAD) { - if (!(op & BUS_DMASYNC_PREWRITE) && - ((((vm_offset_t)(buf) | len) & arm_dcache_align_mask) == 0)) { + if (!(op & BUS_DMASYNC_PREWRITE) && !partial) { cpu_dcache_inv_range((vm_offset_t)buf, len); cpu_l2cache_inv_range((vm_offset_t)buf, len); } else { @@ -1107,27 +1109,32 @@ bus_dmamap_sync_buf(void *buf, int len, } } if (op & BUS_DMASYNC_POSTREAD) { - if ((vm_offset_t)buf & arm_dcache_align_mask) { - memcpy(_tmp_cl, (void *)((vm_offset_t)buf & ~ - arm_dcache_align_mask), - (vm_offset_t)buf & arm_dcache_align_mask); - } - if (((vm_offset_t)buf + len) & arm_dcache_align_mask) { - memcpy(_tmp_clend, (void *)((vm_offset_t)buf + len), - arm_dcache_align - (((vm_offset_t)(buf) + len) & - arm_dcache_align_mask)); + if (partial) { + s = intr_disable(); + if ((vm_offset_t)buf & arm_dcache_align_mask) + memcpy(_tmp_cl, (void *)((vm_offset_t)buf & + ~arm_dcache_align_mask), + (vm_offset_t)buf & arm_dcache_align_mask); + if (((vm_offset_t)buf + len) & arm_dcache_align_mask) + memcpy(_tmp_clend, + (void *)((vm_offset_t)buf + len), + arm_dcache_align - (((vm_offset_t)(buf) + + len) & arm_dcache_align_mask)); } cpu_dcache_inv_range((vm_offset_t)buf, len); cpu_l2cache_inv_range((vm_offset_t)buf, len); - - if ((vm_offset_t)buf & arm_dcache_align_mask) - memcpy((void *)((vm_offset_t)buf & - ~arm_dcache_align_mask), _tmp_cl, - (vm_offset_t)buf & arm_dcache_align_mask); - if (((vm_offset_t)buf + len) & arm_dcache_align_mask) - memcpy((void *)((vm_offset_t)buf + len), _tmp_clend, - arm_dcache_align - (((vm_offset_t)(buf) + len) & - arm_dcache_align_mask)); + if (partial) { + if ((vm_offset_t)buf & arm_dcache_align_mask) + memcpy((void *)((vm_offset_t)buf & + ~arm_dcache_align_mask), _tmp_cl, + (vm_offset_t)buf & arm_dcache_align_mask); + if (((vm_offset_t)buf + len) & arm_dcache_align_mask) + memcpy((void *)((vm_offset_t)buf + len), + _tmp_clend, arm_dcache_align - + (((vm_offset_t)(buf) + len) & + arm_dcache_align_mask)); + intr_restore(s); + } } } From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 04:36:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B513D1065670; Sun, 22 Apr 2012 04:36:25 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A02108FC0C; Sun, 22 Apr 2012 04:36:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M4aP9c020197; Sun, 22 Apr 2012 04:36:25 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M4aPwA020195; Sun, 22 Apr 2012 04:36:25 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201204220436.q3M4aPwA020195@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 22 Apr 2012 04:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234564 - head/sys/pc98/pc98 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 04:36:25 -0000 Author: nyan Date: Sun Apr 22 04:36:25 2012 New Revision: 234564 URL: http://svn.freebsd.org/changeset/base/234564 Log: MFi386: revisions 234074 and 234105 - Adding the BSP as an interrupt target directly in cpu_startup(). Modified: head/sys/pc98/pc98/machdep.c Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Sun Apr 22 03:57:33 2012 (r234563) +++ head/sys/pc98/pc98/machdep.c Sun Apr 22 04:36:25 2012 (r234564) @@ -271,6 +271,13 @@ cpu_startup(dummy) bufinit(); vm_pager_bufferinit(); cpu_setregs(); + +#ifdef SMP + /* + * Add BSP as an interrupt target. + */ + intr_add_cpu(0); +#endif } /* From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 07:42:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F9841065670; Sun, 22 Apr 2012 07:42:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AB598FC08; Sun, 22 Apr 2012 07:42:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M7gjEg025927; Sun, 22 Apr 2012 07:42:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M7gjsF025925; Sun, 22 Apr 2012 07:42:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204220742.q3M7gjsF025925@svn.freebsd.org> From: Xin LI Date: Sun, 22 Apr 2012 07:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234565 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 07:42:45 -0000 Author: delphij Date: Sun Apr 22 07:42:44 2012 New Revision: 234565 URL: http://svn.freebsd.org/changeset/base/234565 Log: Use 10.0 instead of 10 for FreeBSD version number. The latter undefined. Modified: head/share/man/man4/carp.4 Modified: head/share/man/man4/carp.4 ============================================================================== --- head/share/man/man4/carp.4 Sun Apr 22 04:36:25 2012 (r234564) +++ head/share/man/man4/carp.4 Sun Apr 22 07:42:44 2012 (r234565) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2012 +.Dd April 22, 2012 .Dt CARP 4 .Os .Sh NAME @@ -295,7 +295,7 @@ The device was imported into .Fx 5.4 . In -.Fx 10 +.Fx 10.0 the .Nm was significantly rewritten, and is no longer a pseudo-interface. From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 07:50:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58B15106564A; Sun, 22 Apr 2012 07:50:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43A108FC0A; Sun, 22 Apr 2012 07:50:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M7oPIt026206; Sun, 22 Apr 2012 07:50:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M7oPpA026204; Sun, 22 Apr 2012 07:50:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204220750.q3M7oPpA026204@svn.freebsd.org> From: Xin LI Date: Sun, 22 Apr 2012 07:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234566 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 07:50:25 -0000 Author: delphij Date: Sun Apr 22 07:50:24 2012 New Revision: 234566 URL: http://svn.freebsd.org/changeset/base/234566 Log: - Correct a typo which prevents 'lzjb' be displayed; - Use quotes when tab is used. Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Apr 22 07:42:44 2012 (r234565) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Apr 22 07:50:24 2012 (r234566) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2012 +.Dd April 22, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -833,7 +833,7 @@ disables integrity checking on user data a recommended practice. .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle Controls the compression algorithm used for this dataset. The -.CM lzjb +.Cm lzjb compression algorithm is optimized for performance while providing decent data compression. Setting compression to .Cm on @@ -1275,11 +1275,11 @@ for legacy mounts or the command for normal file systems, its mount options are set according to its properties. The correlation between properties and mount options is as follows: .Bl -column -offset 4n "PROPERTY" "MOUNT OPTION" -.It PROPERTY MOUNT OPTION -.It atime atime/noatime -.It exec exec/noexec -.It readonly ro/rw -.It setuid suid/nosuid +.It "PROPERTY MOUNT OPTION" +.It "atime atime/noatime" +.It "exec exec/noexec" +.It "readonly ro/rw" +.It "setuid suid/nosuid" .El .Pp In addition, these options can be set on a per-mount basis using the From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 07:51:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97D57106566C; Sun, 22 Apr 2012 07:51:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D808FC0A; Sun, 22 Apr 2012 07:51:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M7po3M026285; Sun, 22 Apr 2012 07:51:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M7po6h026283; Sun, 22 Apr 2012 07:51:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204220751.q3M7po6h026283@svn.freebsd.org> From: Xin LI Date: Sun, 22 Apr 2012 07:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234567 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 07:51:50 -0000 Author: delphij Date: Sun Apr 22 07:51:49 2012 New Revision: 234567 URL: http://svn.freebsd.org/changeset/base/234567 Log: - Use quote when tab is used; - Follow the same macros used in device driver manual pages. Modified: head/lib/libc/sys/setfib.2 Modified: head/lib/libc/sys/setfib.2 ============================================================================== --- head/lib/libc/sys/setfib.2 Sun Apr 22 07:50:24 2012 (r234566) +++ head/lib/libc/sys/setfib.2 Sun Apr 22 07:51:49 2012 (r234567) @@ -51,8 +51,9 @@ may be retrieved by the .Va net.fibs sysctl. The system maximum is set in the kernel configuration file with -.Pp -.Dl options ROUTETABLES= Ns Em N +.Bd -ragged -offset indent +.Cd "options ROUTETABLES=" Ns Em N +.Ed .Pp or in .Pa /boot/loader.conf From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 07:55:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57FC8106566B; Sun, 22 Apr 2012 07:55:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 410238FC08; Sun, 22 Apr 2012 07:55:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M7tvYC026456; Sun, 22 Apr 2012 07:55:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M7tue6026454; Sun, 22 Apr 2012 07:55:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204220755.q3M7tue6026454@svn.freebsd.org> From: Xin LI Date: Sun, 22 Apr 2012 07:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234568 - head/usr.bin/rctl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 07:55:57 -0000 Author: delphij Date: Sun Apr 22 07:55:56 2012 New Revision: 234568 URL: http://svn.freebsd.org/changeset/base/234568 Log: The .Fx macro needs the version number be in its own word separated by a space. This change have no visible effect for rendering. Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Sun Apr 22 07:51:49 2012 (r234567) +++ head/usr.bin/rctl/rctl.8 Sun Apr 22 07:55:56 2012 (r234568) @@ -186,7 +186,7 @@ Display all the rules applicable to proc The .Nm command appeared in -.Fx 9.0. +.Fx 9.0 . .Sh AUTHORS .An -nosplit The From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 08:35:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82EA6106564A; Sun, 22 Apr 2012 08:35:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx07.syd.optusnet.com.au (fallbackmx07.syd.optusnet.com.au [211.29.132.9]) by mx1.freebsd.org (Postfix) with ESMTP id F368E8FC12; Sun, 22 Apr 2012 08:35:30 +0000 (UTC) Received: from mail26.syd.optusnet.com.au (mail26.syd.optusnet.com.au [211.29.133.167]) by fallbackmx07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q3M8ZNLQ013588; Sun, 22 Apr 2012 18:35:23 +1000 Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail26.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q3M8ZDEo019262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 22 Apr 2012 18:35:15 +1000 Date: Sun, 22 Apr 2012 18:35:13 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh In-Reply-To: <201204211745.q3LHjeHx098154@svn.freebsd.org> Message-ID: <20120422182554.S901@besplex.bde.org> References: <201204211745.q3LHjeHx098154@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234549 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 08:35:31 -0000 On Sat, 21 Apr 2012, Warner Losh wrote: > Log: > Fix partially merged patch from my external compiler tree in r234546. > Define NM except when we're in strict POSIX mode. > > Modified: > head/share/mk/sys.mk > > Modified: head/share/mk/sys.mk > ============================================================================== > --- head/share/mk/sys.mk Sat Apr 21 16:27:50 2012 (r234548) > +++ head/share/mk/sys.mk Sat Apr 21 17:45:40 2012 (r234549) > @@ -141,6 +141,10 @@ YFLAGS ?= > YFLAGS ?= -d > .endif > > +.if !defined(%POSIX) > +NM ?= nm > +.endif > + > .if defined(%POSIX) > > # Posix 1003.2 mandated rules Any chance of defining NM in order? The existing list was sorted except for RANLIB being grouped with AR, CPP after CXX*, LD after LEX, LINTL* after LINTO* (flags are grouped with commands so the combined sorting is not fully alphabetical). Only NM is totally disordered (added at the end instead of inserted). The unsorted macros are associated with more namespace pollution than the sorted ones. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 08:49:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D168106566B; Sun, 22 Apr 2012 08:49:14 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 750788FC0A; Sun, 22 Apr 2012 08:49:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M8nEZU028238; Sun, 22 Apr 2012 08:49:14 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M8nEgb028222; Sun, 22 Apr 2012 08:49:14 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <201204220849.q3M8nEgb028222@svn.freebsd.org> From: Jason Evans Date: Sun, 22 Apr 2012 08:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234569 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 08:49:14 -0000 Author: jasone Date: Sun Apr 22 08:49:13 2012 New Revision: 234569 URL: http://svn.freebsd.org/changeset/base/234569 Log: Import jemalloc a8f8d7540d66ddee7337db80c92890916e1063ca (dev branch, prior to 3.0.0 release). This fixes several bugs related to memory initialization. Mangle __jemalloc_a0{malloc,calloc,free}() just like all the other library-internal symbols in jemalloc, and adjust the tls allocation code in libc to use the mangled names. Modified: head/contrib/jemalloc/ChangeLog head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/VERSION head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/chunk.h head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h head/contrib/jemalloc/include/jemalloc/internal/tsd.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/src/chunk.c head/contrib/jemalloc/src/chunk_dss.c head/contrib/jemalloc/src/chunk_mmap.c head/contrib/jemalloc/src/huge.c head/contrib/jemalloc/src/jemalloc.c head/lib/libc/gen/tls.c Modified: head/contrib/jemalloc/ChangeLog ============================================================================== --- head/contrib/jemalloc/ChangeLog Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/ChangeLog Sun Apr 22 08:49:13 2012 (r234569) @@ -70,6 +70,8 @@ found in the git revision history: invalid statistics and crashes. - Work around TLS dallocation via free() on Linux. This bug could cause write-after-free memory corruption. + - Fix chunk_alloc_dss() to stop claiming memory is zeroed. This bug could + cause memory corruption and crashes with --enable-dss specified. - Fix malloc_stats_print() to honor 'b' and 'l' in the opts parameter. - Fix realloc(p, 0) to act like free(p). - Do not enforce minimum alignment in memalign(). Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/FREEBSD-diffs Sun Apr 22 08:49:13 2012 (r234569) @@ -1,5 +1,5 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index f78f423..ce6df80 100644 +index e8a5722..cec85b5 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -51,12 +51,23 @@ @@ -82,17 +82,10 @@ index 8837ef5..d7133f4 100644 bool malloc_mutex_init(malloc_mutex_t *mutex); diff --git a/include/jemalloc/internal/private_namespace.h b/include/jemalloc/internal/private_namespace.h -index 15fe3c5..be94eb8 100644 +index bb1b63e..00eb169 100644 --- a/include/jemalloc/internal/private_namespace.h +++ b/include/jemalloc/internal/private_namespace.h -@@ -1,6 +1,3 @@ --#define a0calloc JEMALLOC_N(a0calloc) --#define a0free JEMALLOC_N(a0free) --#define a0malloc JEMALLOC_N(a0malloc) - #define arena_alloc_junk_small JEMALLOC_N(arena_alloc_junk_small) - #define arena_bin_index JEMALLOC_N(arena_bin_index) - #define arena_bin_info JEMALLOC_N(arena_bin_info) -@@ -167,7 +164,6 @@ +@@ -165,7 +165,6 @@ #define iqalloc JEMALLOC_N(iqalloc) #define iralloc JEMALLOC_N(iralloc) #define isalloc JEMALLOC_N(isalloc) @@ -195,7 +188,7 @@ index 0000000..2c5797f +#define pthread_mutex_lock _pthread_mutex_lock +#define pthread_mutex_unlock _pthread_mutex_unlock diff --git a/src/jemalloc.c b/src/jemalloc.c -index 00c2b23..729f4e1 100644 +index f9c8916..8e24a5a 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -8,6 +8,9 @@ malloc_tsd_data(, arenas, arena_t *, NULL) Modified: head/contrib/jemalloc/VERSION ============================================================================== --- head/contrib/jemalloc/VERSION Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/VERSION Sun Apr 22 08:49:13 2012 (r234569) @@ -1 +1 @@ -1.0.0-283-g606f1fdc3cdbc700717133ca56685313caea24bb +1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/doc/jemalloc.3 Sun Apr 22 08:49:13 2012 (r234569) @@ -2,12 +2,12 @@ .\" Title: JEMALLOC .\" Author: Jason Evans .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 04/20/2012 +.\" Date: 04/21/2012 .\" Manual: User Manual -.\" Source: jemalloc 1.0.0-283-g606f1fdc3cdbc700717133ca56685313caea24bb +.\" Source: jemalloc 1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca .\" Language: English .\" -.TH "JEMALLOC" "3" "04/20/2012" "jemalloc 1.0.0-283-g606f1fdc3c" "User Manual" +.TH "JEMALLOC" "3" "04/21/2012" "jemalloc 1.0.0-286-ga8f8d7540d" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 1\&.0\&.0\-283\-g606f1fdc3cdbc700717133ca56685313caea24bb\&. More information can be found at the +This manual describes jemalloc 1\&.0\&.0\-286\-ga8f8d7540d66ddee7337db80c92890916e1063ca\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: @@ -404,9 +404,9 @@ Traditionally, allocators have used to obtain memory, which is suboptimal for several reasons, including race conditions, increased fragmentation, and artificial limitations on maximum usable memory\&. If \fB\-\-enable\-dss\fR is specified during configuration, this allocator uses both -\fBsbrk\fR(2) +\fBmmap\fR(2) and -\fBmmap\fR(2), in that order of preference; otherwise only +\fBsbrk\fR(2), in that order of preference; otherwise only \fBmmap\fR(2) is used\&. .PP Modified: head/contrib/jemalloc/include/jemalloc/internal/chunk.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/chunk.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/internal/chunk.h Sun Apr 22 08:49:13 2012 (r234569) @@ -44,8 +44,7 @@ extern size_t arena_maxclass; /* Max si void *chunk_alloc(size_t size, size_t alignment, bool base, bool *zero); void chunk_dealloc(void *chunk, size_t size, bool unmap); -bool chunk_boot0(void); -bool chunk_boot1(void); +bool chunk_boot(void); #endif /* JEMALLOC_H_EXTERNS */ /******************************************************************************/ Modified: head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h Sun Apr 22 08:49:13 2012 (r234569) @@ -11,11 +11,9 @@ void pages_purge(void *addr, size_t length); -void *chunk_alloc_mmap(size_t size, size_t alignment); +void *chunk_alloc_mmap(size_t size, size_t alignment, bool *zero); bool chunk_dealloc_mmap(void *chunk, size_t size); -bool chunk_mmap_boot(void); - #endif /* JEMALLOC_H_EXTERNS */ /******************************************************************************/ #ifdef JEMALLOC_H_INLINES Modified: head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h Sun Apr 22 08:49:13 2012 (r234569) @@ -1,3 +1,6 @@ +#define a0calloc JEMALLOC_N(a0calloc) +#define a0free JEMALLOC_N(a0free) +#define a0malloc JEMALLOC_N(a0malloc) #define arena_alloc_junk_small JEMALLOC_N(arena_alloc_junk_small) #define arena_bin_index JEMALLOC_N(arena_bin_index) #define arena_bin_info JEMALLOC_N(arena_bin_info) @@ -71,8 +74,7 @@ #define chunk_alloc JEMALLOC_N(chunk_alloc) #define chunk_alloc_dss JEMALLOC_N(chunk_alloc_dss) #define chunk_alloc_mmap JEMALLOC_N(chunk_alloc_mmap) -#define chunk_boot0 JEMALLOC_N(chunk_boot0) -#define chunk_boot1 JEMALLOC_N(chunk_boot1) +#define chunk_boot JEMALLOC_N(chunk_boot) #define chunk_dealloc JEMALLOC_N(chunk_dealloc) #define chunk_dealloc_mmap JEMALLOC_N(chunk_dealloc_mmap) #define chunk_dss_boot JEMALLOC_N(chunk_dss_boot) @@ -80,7 +82,6 @@ #define chunk_dss_postfork_parent JEMALLOC_N(chunk_dss_postfork_parent) #define chunk_dss_prefork JEMALLOC_N(chunk_dss_prefork) #define chunk_in_dss JEMALLOC_N(chunk_in_dss) -#define chunk_mmap_boot JEMALLOC_N(chunk_mmap_boot) #define chunk_npages JEMALLOC_N(chunk_npages) #define chunks_mtx JEMALLOC_N(chunks_mtx) #define chunks_rtree JEMALLOC_N(chunks_rtree) @@ -188,10 +189,6 @@ #define malloc_write JEMALLOC_N(malloc_write) #define map_bias JEMALLOC_N(map_bias) #define mb_write JEMALLOC_N(mb_write) -#define mmap_unaligned_tsd_boot JEMALLOC_N(mmap_unaligned_tsd_boot) -#define mmap_unaligned_tsd_cleanup_wrapper JEMALLOC_N(mmap_unaligned_tsd_cleanup_wrapper) -#define mmap_unaligned_tsd_get JEMALLOC_N(mmap_unaligned_tsd_get) -#define mmap_unaligned_tsd_set JEMALLOC_N(mmap_unaligned_tsd_set) #define mutex_boot JEMALLOC_N(mutex_boot) #define narenas JEMALLOC_N(narenas) #define ncpus JEMALLOC_N(ncpus) Modified: head/contrib/jemalloc/include/jemalloc/internal/tsd.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/tsd.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/internal/tsd.h Sun Apr 22 08:49:13 2012 (r234569) @@ -111,7 +111,7 @@ a_name##_tsd_cleanup_wrapper(void) \ \ if (a_name##_initialized) { \ a_name##_initialized = false; \ - a_cleanup(&a_name##_tls); \ + a_cleanup(&a_name##_tls); \ } \ return (a_name##_initialized); \ } \ Modified: head/contrib/jemalloc/include/jemalloc/jemalloc.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/jemalloc.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/jemalloc.h Sun Apr 22 08:49:13 2012 (r234569) @@ -7,12 +7,12 @@ extern "C" { #include #include -#define JEMALLOC_VERSION "1.0.0-283-g606f1fdc3cdbc700717133ca56685313caea24bb" +#define JEMALLOC_VERSION "1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca" #define JEMALLOC_VERSION_MAJOR 1 #define JEMALLOC_VERSION_MINOR 0 #define JEMALLOC_VERSION_BUGFIX 0 -#define JEMALLOC_VERSION_NREV 283 -#define JEMALLOC_VERSION_GID "606f1fdc3cdbc700717133ca56685313caea24bb" +#define JEMALLOC_VERSION_NREV 286 +#define JEMALLOC_VERSION_GID "a8f8d7540d66ddee7337db80c92890916e1063ca" #include "jemalloc_defs.h" #include "jemalloc_FreeBSD.h" Modified: head/contrib/jemalloc/src/chunk.c ============================================================================== --- head/contrib/jemalloc/src/chunk.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/chunk.c Sun Apr 22 08:49:13 2012 (r234569) @@ -98,7 +98,10 @@ chunk_recycle(size_t size, size_t alignm if (node != NULL) base_node_dealloc(node); -#ifdef JEMALLOC_PURGE_MADVISE_FREE +#ifdef JEMALLOC_PURGE_MADVISE_DONTNEED + /* Pages are zeroed as a side effect of pages_purge(). */ + *zero = true; +#else if (*zero) { VALGRIND_MAKE_MEM_UNDEFINED(ret, size); memset(ret, 0, size); @@ -125,16 +128,16 @@ chunk_alloc(size_t size, size_t alignmen ret = chunk_recycle(size, alignment, zero); if (ret != NULL) goto label_return; + + ret = chunk_alloc_mmap(size, alignment, zero); + if (ret != NULL) + goto label_return; + if (config_dss) { ret = chunk_alloc_dss(size, alignment, zero); if (ret != NULL) goto label_return; } - ret = chunk_alloc_mmap(size, alignment); - if (ret != NULL) { - *zero = true; - goto label_return; - } /* All strategies for allocation failed. */ ret = NULL; @@ -161,7 +164,13 @@ label_return: if (config_prof && opt_prof && opt_prof_gdump && gdump) prof_gdump(); } + if (config_debug && *zero && ret != NULL) { + size_t i; + size_t *p = (size_t *)(uintptr_t)ret; + for (i = 0; i < size / sizeof(size_t); i++) + assert(p[i] == 0); + } assert(CHUNK_ADDR2BASE(ret) == ret); return (ret); } @@ -258,14 +267,14 @@ chunk_dealloc(void *chunk, size_t size, } if (unmap) { - if (chunk_dealloc_mmap(chunk, size) == false) - return; - chunk_record(chunk, size); + if ((config_dss && chunk_in_dss(chunk)) || + chunk_dealloc_mmap(chunk, size)) + chunk_record(chunk, size); } } bool -chunk_boot0(void) +chunk_boot(void) { /* Set variables according to the value of opt_lg_chunk. */ @@ -292,13 +301,3 @@ chunk_boot0(void) return (false); } - -bool -chunk_boot1(void) -{ - - if (chunk_mmap_boot()) - return (true); - - return (false); -} Modified: head/contrib/jemalloc/src/chunk_dss.c ============================================================================== --- head/contrib/jemalloc/src/chunk_dss.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/chunk_dss.c Sun Apr 22 08:49:13 2012 (r234569) @@ -89,7 +89,10 @@ chunk_alloc_dss(size_t size, size_t alig malloc_mutex_unlock(&dss_mtx); if (cpad_size != 0) chunk_dealloc(cpad, cpad_size, true); - *zero = true; + if (*zero) { + VALGRIND_MAKE_MEM_UNDEFINED(ret, size); + memset(ret, 0, size); + } return (ret); } } while (dss_prev != (void *)-1); Modified: head/contrib/jemalloc/src/chunk_mmap.c ============================================================================== --- head/contrib/jemalloc/src/chunk_mmap.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/chunk_mmap.c Sun Apr 22 08:49:13 2012 (r234569) @@ -2,23 +2,12 @@ #include "jemalloc/internal/jemalloc_internal.h" /******************************************************************************/ -/* Data. */ - -/* - * Used by chunk_alloc_mmap() to decide whether to attempt the fast path and - * potentially avoid some system calls. - */ -malloc_tsd_data(static, mmap_unaligned, bool, false) -malloc_tsd_funcs(JEMALLOC_INLINE, mmap_unaligned, bool, false, - malloc_tsd_no_cleanup) - -/******************************************************************************/ /* Function prototypes for non-inline static functions. */ static void *pages_map(void *addr, size_t size); static void pages_unmap(void *addr, size_t size); static void *chunk_alloc_mmap_slow(size_t size, size_t alignment, - bool unaligned); + bool unaligned, bool *zero); /******************************************************************************/ @@ -87,7 +76,7 @@ pages_purge(void *addr, size_t length) } static void * -chunk_alloc_mmap_slow(size_t size, size_t alignment, bool unaligned) +chunk_alloc_mmap_slow(size_t size, size_t alignment, bool unaligned, bool *zero) { void *ret, *pages; size_t alloc_size, leadsize, trailsize; @@ -112,23 +101,16 @@ chunk_alloc_mmap_slow(size_t size, size_ if (trailsize != 0) pages_unmap((void *)((uintptr_t)ret + size), trailsize); - /* - * If mmap() returned an aligned mapping, reset mmap_unaligned so that - * the next chunk_alloc_mmap() execution tries the fast allocation - * method. - */ - if (unaligned == false && mmap_unaligned_booted) { - bool mu = false; - mmap_unaligned_tsd_set(&mu); - } - + assert(ret != NULL); + *zero = true; return (ret); } void * -chunk_alloc_mmap(size_t size, size_t alignment) +chunk_alloc_mmap(size_t size, size_t alignment, bool *zero) { void *ret; + size_t offset; /* * Ideally, there would be a way to specify alignment to mmap() (like @@ -150,45 +132,37 @@ chunk_alloc_mmap(size_t size, size_t ali * * Another possible confounding factor is address space layout * randomization (ASLR), which causes mmap(2) to disregard the - * requested address. mmap_unaligned tracks whether the previous - * chunk_alloc_mmap() execution received any unaligned or relocated - * mappings, and if so, the current execution will immediately fall - * back to the slow method. However, we keep track of whether the fast - * method would have succeeded, and if so, we make a note to try the - * fast method next time. + * requested address. As such, repeatedly trying to extend unaligned + * mappings could result in an infinite loop, so if extension fails, + * immediately fall back to the reliable method of over-allocation + * followed by trimming. */ - if (mmap_unaligned_booted && *mmap_unaligned_tsd_get() == false) { - size_t offset; + ret = pages_map(NULL, size); + if (ret == NULL) + return (NULL); - ret = pages_map(NULL, size); - if (ret == NULL) - return (NULL); - - offset = ALIGNMENT_ADDR2OFFSET(ret, alignment); - if (offset != 0) { - bool mu = true; - mmap_unaligned_tsd_set(&mu); - /* Try to extend chunk boundary. */ - if (pages_map((void *)((uintptr_t)ret + size), - chunksize - offset) == NULL) { - /* - * Extension failed. Clean up, then revert to - * the reliable-but-expensive method. - */ - pages_unmap(ret, size); - ret = chunk_alloc_mmap_slow(size, alignment, - true); - } else { - /* Clean up unneeded leading space. */ - pages_unmap(ret, chunksize - offset); - ret = (void *)((uintptr_t)ret + (chunksize - - offset)); - } + offset = ALIGNMENT_ADDR2OFFSET(ret, alignment); + if (offset != 0) { + /* Try to extend chunk boundary. */ + if (pages_map((void *)((uintptr_t)ret + size), chunksize - + offset) == NULL) { + /* + * Extension failed. Clean up, then fall back to the + * reliable-but-expensive method. + */ + pages_unmap(ret, size); + return (chunk_alloc_mmap_slow(size, alignment, true, + zero)); + } else { + /* Clean up unneeded leading space. */ + pages_unmap(ret, chunksize - offset); + ret = (void *)((uintptr_t)ret + (chunksize - offset)); } - } else - ret = chunk_alloc_mmap_slow(size, alignment, false); + } + assert(ret != NULL); + *zero = true; return (ret); } @@ -201,21 +175,3 @@ chunk_dealloc_mmap(void *chunk, size_t s return (config_munmap == false); } - -bool -chunk_mmap_boot(void) -{ - - /* - * XXX For the non-TLS implementation of tsd, the first access from - * each thread causes memory allocation. The result is a bootstrapping - * problem for this particular use case, so for now just disable it by - * leaving it in an unbooted state. - */ -#ifdef JEMALLOC_TLS - if (mmap_unaligned_tsd_boot()) - return (true); -#endif - - return (false); -} Modified: head/contrib/jemalloc/src/huge.c ============================================================================== --- head/contrib/jemalloc/src/huge.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/huge.c Sun Apr 22 08:49:13 2012 (r234569) @@ -28,6 +28,7 @@ huge_palloc(size_t size, size_t alignmen void *ret; size_t csize; extent_node_t *node; + bool is_zeroed; /* Allocate one or more contiguous chunks for this request. */ @@ -42,7 +43,12 @@ huge_palloc(size_t size, size_t alignmen if (node == NULL) return (NULL); - ret = chunk_alloc(csize, alignment, false, &zero); + /* + * Copy zero into is_zeroed and pass the copy to chunk_alloc(), so that + * it is possible to make correct junk/zero fill decisions below. + */ + is_zeroed = zero; + ret = chunk_alloc(csize, alignment, false, &is_zeroed); if (ret == NULL) { base_node_dealloc(node); return (NULL); @@ -64,7 +70,7 @@ huge_palloc(size_t size, size_t alignmen if (config_fill && zero == false) { if (opt_junk) memset(ret, 0xa5, csize); - else if (opt_zero) + else if (opt_zero && is_zeroed == false) memset(ret, 0, csize); } Modified: head/contrib/jemalloc/src/jemalloc.c ============================================================================== --- head/contrib/jemalloc/src/jemalloc.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/jemalloc.c Sun Apr 22 08:49:13 2012 (r234569) @@ -638,7 +638,7 @@ malloc_init_hard(void) return (true); } - if (chunk_boot0()) { + if (chunk_boot()) { malloc_mutex_unlock(&init_lock); return (true); } @@ -715,11 +715,6 @@ malloc_init_hard(void) ncpus = malloc_ncpus(); malloc_mutex_lock(&init_lock); - if (chunk_boot1()) { - malloc_mutex_unlock(&init_lock); - return (true); - } - if (mutex_boot()) { malloc_mutex_unlock(&init_lock); return (true); Modified: head/lib/libc/gen/tls.c ============================================================================== --- head/lib/libc/gen/tls.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/lib/libc/gen/tls.c Sun Apr 22 08:49:13 2012 (r234569) @@ -40,9 +40,9 @@ #include "libc_private.h" /* Provided by jemalloc to avoid bootstrapping issues. */ -void *a0malloc(size_t size); -void *a0calloc(size_t num, size_t size); -void a0free(void *ptr); +void *__jemalloc_a0malloc(size_t size); +void *__jemalloc_a0calloc(size_t num, size_t size); +void __jemalloc_a0free(void *ptr); __weak_reference(__libc_allocate_tls, _rtld_allocate_tls); __weak_reference(__libc_free_tls, _rtld_free_tls); @@ -125,8 +125,8 @@ __libc_free_tls(void *tcb, size_t tcbsiz tls = (Elf_Addr **)((Elf_Addr)tcb + tcbsize - TLS_TCB_SIZE); dtv = tls[0]; - a0free(dtv); - a0free(tcb); + __jemalloc_a0free(dtv); + __jemalloc_a0free(tcb); } /* @@ -142,18 +142,18 @@ __libc_allocate_tls(void *oldtcb, size_t if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE) return (oldtcb); - tcb = a0calloc(1, tls_static_space + tcbsize - TLS_TCB_SIZE); + tcb = __jemalloc_a0calloc(1, tls_static_space + tcbsize - TLS_TCB_SIZE); tls = (Elf_Addr **)(tcb + tcbsize - TLS_TCB_SIZE); if (oldtcb != NULL) { memcpy(tls, oldtcb, tls_static_space); - a0free(oldtcb); + __jemalloc_a0free(oldtcb); /* Adjust the DTV. */ dtv = tls[0]; dtv[2] = (Elf_Addr)tls + TLS_TCB_SIZE; } else { - dtv = a0malloc(3 * sizeof(Elf_Addr)); + dtv = __jemalloc_a0malloc(3 * sizeof(Elf_Addr)); tls[0] = dtv; dtv[0] = 1; dtv[1] = 1; @@ -194,8 +194,8 @@ __libc_free_tls(void *tcb, size_t tcbsiz dtv = ((Elf_Addr**)tcb)[1]; tlsend = (Elf_Addr) tcb; tlsstart = tlsend - size; - a0free((void*) tlsstart); - a0free(dtv); + __jemalloc_a0free((void*) tlsstart); + __jemalloc_a0free(dtv); } /* @@ -213,8 +213,8 @@ __libc_allocate_tls(void *oldtls, size_t if (tcbsize < 2 * sizeof(Elf_Addr)) tcbsize = 2 * sizeof(Elf_Addr); - tls = a0calloc(1, size + tcbsize); - dtv = a0malloc(3 * sizeof(Elf_Addr)); + tls = __jemalloc_a0calloc(1, size + tcbsize); + dtv = __jemalloc_a0malloc(3 * sizeof(Elf_Addr)); segbase = (Elf_Addr)(tls + size); ((Elf_Addr*)segbase)[0] = segbase; From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 16:13:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3275106566C; Sun, 22 Apr 2012 16:13:23 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD60A8FC12; Sun, 22 Apr 2012 16:13:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MGDNMd047132; Sun, 22 Apr 2012 16:13:23 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MGDNcj047130; Sun, 22 Apr 2012 16:13:23 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204221613.q3MGDNcj047130@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sun, 22 Apr 2012 16:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234572 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 16:13:24 -0000 Author: melifaro Date: Sun Apr 22 16:13:23 2012 New Revision: 234572 URL: http://svn.freebsd.org/changeset/base/234572 Log: Do not require radix write lock to be held while dumping route table via sysctl(4) interface. This permits router not to stop forwarding packets while route table is being written to user-supplied buffer. Reported by: Pawel Tyll Approved by: kib(mentor) MFC after: 1 week Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Apr 22 09:19:19 2012 (r234571) +++ head/sys/net/rtsock.c Sun Apr 22 16:13:23 2012 (r234572) @@ -1884,10 +1884,10 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) for (error = 0; error == 0 && i <= lim; i++) { rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i); if (rnh != NULL) { - RADIX_NODE_HEAD_LOCK(rnh); + RADIX_NODE_HEAD_RLOCK(rnh); error = rnh->rnh_walktree(rnh, sysctl_dumpentry, &w); - RADIX_NODE_HEAD_UNLOCK(rnh); + RADIX_NODE_HEAD_RUNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; } From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 16:58:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A856106564A; Sun, 22 Apr 2012 16:58:15 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04D8D8FC0A; Sun, 22 Apr 2012 16:58:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MGwEXT048538; Sun, 22 Apr 2012 16:58:14 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MGwETN048536; Sun, 22 Apr 2012 16:58:14 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201204221658.q3MGwETN048536@svn.freebsd.org> From: David Chisnall Date: Sun, 22 Apr 2012 16:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234573 - head/include/xlocale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 16:58:15 -0000 Author: theraven Date: Sun Apr 22 16:58:14 2012 New Revision: 234573 URL: http://svn.freebsd.org/changeset/base/234573 Log: Fix a bug caused by some misplaced brackets. Reported by: das Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Sun Apr 22 16:13:23 2012 (r234572) +++ head/include/xlocale/_ctype.h Sun Apr 22 16:58:14 2012 (r234573) @@ -78,8 +78,8 @@ __maskrune_l(__ct_rune_t __c, unsigned l { int __limit; _RuneLocale *runes = __runes_for_locale(__loc, &__limit); - return (__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : - runes->__runetype[__c] & __f; + return ((__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : + runes->__runetype[__c]) & __f; } _XLOCALE_INLINE int From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 17:00:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B288106566C; Sun, 22 Apr 2012 17:00:53 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3638B8FC0A; Sun, 22 Apr 2012 17:00:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MH0r17048667; Sun, 22 Apr 2012 17:00:53 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MH0rDt048665; Sun, 22 Apr 2012 17:00:53 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204221700.q3MH0rDt048665@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sun, 22 Apr 2012 17:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234574 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:00:53 -0000 Author: melifaro Date: Sun Apr 22 17:00:52 2012 New Revision: 234574 URL: http://svn.freebsd.org/changeset/base/234574 Log: Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags. Tested by: Maxim Ignatenko Approved by: kib(mentor) MFC after: 3 days Modified: head/sys/netgraph/ng_patch.c Modified: head/sys/netgraph/ng_patch.c ============================================================================== --- head/sys/netgraph/ng_patch.c Sun Apr 22 16:58:14 2012 (r234573) +++ head/sys/netgraph/ng_patch.c Sun Apr 22 17:00:52 2012 (r234574) @@ -517,7 +517,7 @@ ng_patch_rcvdata(hook_p hook, item_p ite return (ENOMEM); } do_patch(priv, m); - m->m_flags |= priv->config->csum_flags; + m->m_pkthdr.csum_flags |= priv->config->csum_flags; } target = NULL; From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 17:10:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D73A106566B; Sun, 22 Apr 2012 17:10:29 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 255448FC14; Sun, 22 Apr 2012 17:10:29 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 5E384305; Sun, 22 Apr 2012 19:10:21 +0200 (CEST) Date: Sun, 22 Apr 2012 19:08:43 +0200 From: Pawel Jakub Dawidek To: Kirk McKusick Message-ID: <20120422170842.GA18403@garage.freebsd.pl> References: <201204200650.q3K6oiqO026673@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: <201204200650.q3K6oiqO026673@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234482 - in head/sys: fs/msdosfs fs/nfsserver kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:10:29 -0000 --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 20, 2012 at 06:50:44AM +0000, Kirk McKusick wrote: > Author: mckusick > Date: Fri Apr 20 06:50:44 2012 > New Revision: 234482 > URL: http://svn.freebsd.org/changeset/base/234482 >=20 > Log: > This change creates a new list of active vnodes associated with > a mount point. Active vnodes are those with a non-zero use or hold > count, e.g., those vnodes that are not on the free list. Note that > this list is in addition to the list of all the vnodes associated > with a mount point. > =20 > To avoid adding another set of linkage pointers to the vnode > structure, the active list uses the existing linkage pointers > used by the free list (previously named v_freelist, now renamed > v_actfreelist). > =20 > This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops > over just the active vnodes associated with a mount point (typically > less than 1% of the vnodes associated with the mount point). [...] > @@ -1099,6 +1128,14 @@ insmntque1(struct vnode *vp, struct moun > VNASSERT(mp->mnt_nvnodelistsize >=3D 0, vp, > ("neg mount point vnode list size")); > mp->mnt_nvnodelistsize++; > + KASSERT((vp->v_iflag & VI_ACTIVE) =3D=3D 0, > + ("Activating already active vnode")); > + vp->v_iflag |=3D VI_ACTIVE; > + mtx_lock(&vnode_free_list_mtx); > + TAILQ_INSERT_HEAD(&mp->mnt_activevnodelist, vp, v_actfreelist); > + mp->mnt_activevnodelistsize++; > + mtx_unlock(&vnode_free_list_mtx); > + VI_UNLOCK(vp); > MNT_IUNLOCK(mp); > return (0); > } Now, for every vnode that is activated, it has to go through global mutex, which seems like scalability issue to me. With ZFS it is typical to have a lot of file systems and this global mutex was not needed before (well, it was needed, but only to get vnode from the free list). If we require vnode interlock to be held during v_actfreelist manipulation then why can't we use interlock+vnode_free_list_mtx when operating on the free list and interlock+per-mountpoint-lock when operating on mnt_activevnodelist? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+UOxoACgkQForvXbEpPzQcEgCdH9HqdUGwVAV2AzaqSYbZO+lk yo4AoJBykS7Df3yDmlcPVn18J+J0YABX =Yjmx -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu-- From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 17:14:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBA79106564A; Sun, 22 Apr 2012 17:14:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B63C68FC08; Sun, 22 Apr 2012 17:14:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MHEBTj049105; Sun, 22 Apr 2012 17:14:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MHEBF2049103; Sun, 22 Apr 2012 17:14:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201204221714.q3MHEBF2049103@svn.freebsd.org> From: Warner Losh Date: Sun, 22 Apr 2012 17:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234575 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:14:11 -0000 Author: imp Date: Sun Apr 22 17:14:11 2012 New Revision: 234575 URL: http://svn.freebsd.org/changeset/base/234575 Log: Sort nm in order. Submitted by: bde Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Sun Apr 22 17:00:52 2012 (r234574) +++ head/share/mk/sys.mk Sun Apr 22 17:14:11 2012 (r234575) @@ -123,6 +123,10 @@ LINTLIBFLAGS ?= -cghapbxu -C ${LIB} MAKE ?= make +.if !defined(%POSIX) +NM ?= nm +.endif + OBJC ?= cc OBJCFLAGS ?= ${OBJCINCLUDES} ${CFLAGS} -Wno-import @@ -141,10 +145,6 @@ YFLAGS ?= YFLAGS ?= -d .endif -.if !defined(%POSIX) -NM ?= nm -.endif - .if defined(%POSIX) # Posix 1003.2 mandated rules From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 17:18:35 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50921106564A; Sun, 22 Apr 2012 17:18:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id F07CB8FC16; Sun, 22 Apr 2012 17:18:34 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id q3MHGCv1046479 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 Apr 2012 11:16:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20120422182554.S901@besplex.bde.org> Date: Sun, 22 Apr 2012 11:16:12 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <020867DB-8DDD-4A5F-9CC1-02D1A4864D11@bsdimp.com> References: <201204211745.q3LHjeHx098154@svn.freebsd.org> <20120422182554.S901@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 Apr 2012 11:16:12 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh Subject: Re: svn commit: r234549 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:18:35 -0000 On Apr 22, 2012, at 2:35 AM, Bruce Evans wrote: > On Sat, 21 Apr 2012, Warner Losh wrote: >> Log: >> Fix partially merged patch from my external compiler tree in r234546. >> Define NM except when we're in strict POSIX mode. >>=20 >> Modified: >> head/share/mk/sys.mk >>=20 >> Modified: head/share/mk/sys.mk >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/share/mk/sys.mk Sat Apr 21 16:27:50 2012 = (r234548) >> +++ head/share/mk/sys.mk Sat Apr 21 17:45:40 2012 = (r234549) >> @@ -141,6 +141,10 @@ YFLAGS ?=3D >> YFLAGS ?=3D -d >> .endif >>=20 >> +.if !defined(%POSIX) >> +NM ?=3D nm >> +.endif >> + >> .if defined(%POSIX) >>=20 >> # Posix 1003.2 mandated rules >=20 > Any chance of defining NM in order? >=20 > The existing list was sorted except for RANLIB being grouped with AR, > CPP after CXX*, LD after LEX, LINTL* after LINTO* (flags are grouped > with commands so the combined sorting is not fully alphabetical). >=20 > Only NM is totally disordered (added at the end instead of inserted). >=20 > The unsorted macros are associated with more namespace pollution than > the sorted ones. Yea, I added NM quickly after I discovered I'd forgotten it when I = converted the bare nm's in libgcc. Since my external cc tree was = different, I did this by hand. In that tree, it was sorted... But I've gone ahead and moved it until I can get the external compiler = stuff committed. Warner= From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 17:58:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15675106566C; Sun, 22 Apr 2012 17:58:31 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9FC18FC08; Sun, 22 Apr 2012 17:58:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MHwUWH050605; Sun, 22 Apr 2012 17:58:30 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MHwUXM050602; Sun, 22 Apr 2012 17:58:30 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204221758.q3MHwUXM050602@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 17:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234576 - in head/sys: powerpc/aim vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:58:31 -0000 Author: nwhitehorn Date: Sun Apr 22 17:58:30 2012 New Revision: 234576 URL: http://svn.freebsd.org/changeset/base/234576 Log: Avoid a lock order reversal in pmap_extract_and_hold() from relocking the page. This PMAP requires an additional lock besides the PMAP lock in pmap_extract_and_hold(), which vm_page_pa_tryrelock() did not release. Suggested by: kib MFC after: 4 days Modified: head/sys/powerpc/aim/mmu_oea64.c head/sys/vm/vm_page.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Sun Apr 22 17:14:11 2012 (r234575) +++ head/sys/powerpc/aim/mmu_oea64.c Sun Apr 22 17:58:30 2012 (r234576) @@ -1333,6 +1333,37 @@ moea64_extract(mmu_t mmu, pmap_t pm, vm_ * pmap and virtual address pair if that mapping permits the given * protection. */ + +extern int pa_tryrelock_restart; + +static int +vm_page_pa_tryrelock_moea64(pmap_t pmap, vm_paddr_t pa, vm_paddr_t *locked) +{ + /* + * This is a duplicate of vm_page_pa_tryrelock(), but with proper + * handling of the table lock + */ + vm_paddr_t lockpa; + + lockpa = *locked; + *locked = pa; + if (lockpa) { + PA_LOCK_ASSERT(lockpa, MA_OWNED); + if (PA_LOCKPTR(pa) == PA_LOCKPTR(lockpa)) + return (0); + PA_UNLOCK(lockpa); + } + if (PA_TRYLOCK(pa)) + return (0); + UNLOCK_TABLE_RD(); + PMAP_UNLOCK(pmap); + atomic_add_int(&pa_tryrelock_restart, 1); + PA_LOCK(pa); + LOCK_TABLE_RD(); + PMAP_LOCK(pmap); + return (EAGAIN); +} + vm_page_t moea64_extract_and_hold(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_prot_t prot) { @@ -1349,7 +1380,7 @@ retry: if (pvo != NULL && (pvo->pvo_pte.lpte.pte_hi & LPTE_VALID) && ((pvo->pvo_pte.lpte.pte_lo & LPTE_PP) == LPTE_RW || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, + if (vm_page_pa_tryrelock_moea64(pmap, pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, &pa)) goto retry; m = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Apr 22 17:14:11 2012 (r234575) +++ head/sys/vm/vm_page.c Sun Apr 22 17:58:30 2012 (r234576) @@ -131,7 +131,7 @@ TUNABLE_INT("vm.boot_pages", &boot_pages SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RD, &boot_pages, 0, "number of pages allocated for bootstrapping the VM system"); -static int pa_tryrelock_restart; +int pa_tryrelock_restart; SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD, &pa_tryrelock_restart, 0, "Number of tryrelock restarts"); From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 18:18:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0A9A106566B; Sun, 22 Apr 2012 18:18:49 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC7918FC08; Sun, 22 Apr 2012 18:18:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MIInIV051315; Sun, 22 Apr 2012 18:18:49 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MIIn4Y051313; Sun, 22 Apr 2012 18:18:49 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201204221818.q3MIIn4Y051313@svn.freebsd.org> From: Christian Brueffer Date: Sun, 22 Apr 2012 18:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234577 - head/usr.bin/stat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:18:50 -0000 Author: brueffer Date: Sun Apr 22 18:18:49 2012 New Revision: 234577 URL: http://svn.freebsd.org/changeset/base/234577 Log: Remove duplicate -l description. Submitted by: Rainer Hurling MFC after: 1 week Modified: head/usr.bin/stat/stat.1 Modified: head/usr.bin/stat/stat.1 ============================================================================== --- head/usr.bin/stat/stat.1 Sun Apr 22 17:58:30 2012 (r234576) +++ head/usr.bin/stat/stat.1 Sun Apr 22 18:18:49 2012 (r234577) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 5, 2010 +.Dd April 22, 2012 .Dt STAT 1 .Os .Sh NAME @@ -140,10 +140,6 @@ If the link is broken or the target does fall back on .Xr lstat 2 and report information about the link. -.It Fl l -Display output in -.Ic ls Fl lT -format. .It Fl n Do not force a newline to appear at the end of each piece of output. .It Fl q From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 18:45:54 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 561FC106564A; Sun, 22 Apr 2012 18:45:54 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 192C08FC12; Sun, 22 Apr 2012 18:45:54 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q3MIjrdY085398; Sun, 22 Apr 2012 11:45:53 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q3MIjrTx085397; Sun, 22 Apr 2012 11:45:53 -0700 (PDT) (envelope-from sgk) Date: Sun, 22 Apr 2012 11:45:53 -0700 From: Steve Kargl To: Christian Brueffer Message-ID: <20120422184553.GA85374@troutmask.apl.washington.edu> References: <201204221818.q3MIIn4Y051313@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201204221818.q3MIIn4Y051313@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r234577 - head/usr.bin/stat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:45:54 -0000 On Sun, Apr 22, 2012 at 06:18:49PM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Sun Apr 22 18:18:49 2012 > New Revision: 234577 > URL: http://svn.freebsd.org/changeset/base/234577 > > Log: > Remove duplicate -l description. > > Submitted by: Rainer Hurling > MFC after: 1 week The patch should have also fixed the misordering of the -n, -qi, and -x options. -- Steve From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 18:51:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BBB2F1065674; Sun, 22 Apr 2012 18:51:38 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A696C8FC1A; Sun, 22 Apr 2012 18:51:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MIpcK0052308; Sun, 22 Apr 2012 18:51:38 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MIpc52052306; Sun, 22 Apr 2012 18:51:38 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201204221851.q3MIpc52052306@svn.freebsd.org> From: David Chisnall Date: Sun, 22 Apr 2012 18:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234578 - head/lib/libc/locale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:51:38 -0000 Author: theraven Date: Sun Apr 22 18:51:38 2012 New Revision: 234578 URL: http://svn.freebsd.org/changeset/base/234578 Log: Fix some incorrect symbol versions. Reported by: das Modified: head/lib/libc/locale/Symbol.map Modified: head/lib/libc/locale/Symbol.map ============================================================================== --- head/lib/libc/locale/Symbol.map Sun Apr 22 18:18:49 2012 (r234577) +++ head/lib/libc/locale/Symbol.map Sun Apr 22 18:51:38 2012 (r234578) @@ -60,13 +60,9 @@ FBSD_1.0 { nextwctype; nl_langinfo; __maskrune; - __maskrune_l; __sbmaskrune; - __sbmaskrune_l; __istype; - __istype_l; __sbistype; - __sbistype_l; __isctype; __toupper; __sbtoupper; @@ -197,6 +193,10 @@ FBSD_1.3 { wcstoul_l; wcstoull_l; wcstoumax_l; + __sbistype_l; + __maskrune_l; + __sbmaskrune_l; + __istype_l; __runes_for_locale; _ThreadRuneLocale; }; From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 18:54:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 501B9106566B; Sun, 22 Apr 2012 18:54:52 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3931B8FC12; Sun, 22 Apr 2012 18:54:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MIsq4Z052445; Sun, 22 Apr 2012 18:54:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MIsqPg052441; Sun, 22 Apr 2012 18:54:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204221854.q3MIsqPg052441@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 18:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234579 - in head/sys/powerpc: include mpc85xx powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:54:52 -0000 Author: nwhitehorn Date: Sun Apr 22 18:54:51 2012 New Revision: 234579 URL: http://svn.freebsd.org/changeset/base/234579 Log: Replace eieio; sync for creating bus-space memory barriers with sync. sync performs a strict superset of the functions of eieio, so using both is redundant. While here, expand bus barriers to all bus_space operations, since many drivers do not correctly use bus_space_barrier(). In principle, we can also replace sync just with eieio, for a significant performance increase, but it remains to be seen whether any poorly-written drivers currently depend on the side effects of sync to properly function. MFC after: 1 week Modified: head/sys/powerpc/include/pio.h head/sys/powerpc/mpc85xx/mpc85xx.c head/sys/powerpc/powerpc/bus_machdep.c Modified: head/sys/powerpc/include/pio.h ============================================================================== --- head/sys/powerpc/include/pio.h Sun Apr 22 18:51:38 2012 (r234578) +++ head/sys/powerpc/include/pio.h Sun Apr 22 18:54:51 2012 (r234579) @@ -39,46 +39,52 @@ * I/O macros. */ +/* + * Note: this should be eieio, but many drivers expect ordering with + * main storage too. + */ +#define powerpc_iomb() __asm __volatile("sync" : : : "memory") + static __inline void __outb(volatile u_int8_t *a, u_int8_t v) { *a = v; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outw(volatile u_int16_t *a, u_int16_t v) { *a = v; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outl(volatile u_int32_t *a, u_int32_t v) { *a = v; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outll(volatile u_int64_t *a, u_int64_t v) { *a = v; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outwrb(volatile u_int16_t *a, u_int16_t v) { __asm__ volatile("sthbrx %0, 0, %1" :: "r"(v), "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outlrb(volatile u_int32_t *a, u_int32_t v) { __asm__ volatile("stwbrx %0, 0, %1" :: "r"(v), "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline u_int8_t @@ -87,7 +93,7 @@ __inb(volatile u_int8_t *a) u_int8_t _v_; _v_ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -97,7 +103,7 @@ __inw(volatile u_int16_t *a) u_int16_t _v_; _v_ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -107,7 +113,7 @@ __inl(volatile u_int32_t *a) u_int32_t _v_; _v_ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -117,7 +123,7 @@ __inll(volatile u_int64_t *a) u_int64_t _v_; _v_ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -127,7 +133,7 @@ __inwrb(volatile u_int16_t *a) u_int16_t _v_; __asm__ volatile("lhbrx %0, 0, %1" : "=r"(_v_) : "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -137,7 +143,7 @@ __inlrb(volatile u_int32_t *a) u_int32_t _v_; __asm__ volatile("lwbrx %0, 0, %1" : "=r"(_v_) : "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -175,7 +181,7 @@ __outsb(volatile u_int8_t *a, const u_in { while (c--) *a = *s++; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -183,7 +189,7 @@ __outsw(volatile u_int16_t *a, const u_i { while (c--) *a = *s++; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -191,7 +197,7 @@ __outsl(volatile u_int32_t *a, const u_i { while (c--) *a = *s++; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -199,7 +205,7 @@ __outsll(volatile u_int64_t *a, const u_ { while (c--) *a = *s++; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -207,7 +213,7 @@ __outswrb(volatile u_int16_t *a, const u { while (c--) __asm__ volatile("sthbrx %0, 0, %1" :: "r"(*s++), "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -215,7 +221,7 @@ __outslrb(volatile u_int32_t *a, const u { while (c--) __asm__ volatile("stwbrx %0, 0, %1" :: "r"(*s++), "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -223,7 +229,7 @@ __insb(volatile u_int8_t *a, u_int8_t *d { while (c--) *d++ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -231,7 +237,7 @@ __insw(volatile u_int16_t *a, u_int16_t { while (c--) *d++ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -239,7 +245,7 @@ __insl(volatile u_int32_t *a, u_int32_t { while (c--) *d++ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -247,7 +253,7 @@ __insll(volatile u_int64_t *a, u_int64_t { while (c--) *d++ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -255,7 +261,7 @@ __inswrb(volatile u_int16_t *a, u_int16_ { while (c--) __asm__ volatile("lhbrx %0, 0, %1" : "=r"(*d++) : "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -263,7 +269,7 @@ __inslrb(volatile u_int32_t *a, u_int32_ { while (c--) __asm__ volatile("lwbrx %0, 0, %1" : "=r"(*d++) : "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } #define outsb(a,s,c) (__outsb((volatile u_int8_t *)(a), s, c)) Modified: head/sys/powerpc/mpc85xx/mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/mpc85xx.c Sun Apr 22 18:51:38 2012 (r234578) +++ head/sys/powerpc/mpc85xx/mpc85xx.c Sun Apr 22 18:54:51 2012 (r234579) @@ -60,7 +60,7 @@ ccsr_write4(uintptr_t addr, uint32_t val volatile uint32_t *ptr = (void *)addr; *ptr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } int Modified: head/sys/powerpc/powerpc/bus_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/bus_machdep.c Sun Apr 22 18:51:38 2012 (r234578) +++ head/sys/powerpc/powerpc/bus_machdep.c Sun Apr 22 18:54:51 2012 (r234579) @@ -169,7 +169,8 @@ static void bs_gen_barrier(bus_space_handle_t bsh __unused, bus_size_t ofs __unused, bus_size_t size __unused, int flags __unused) { - __asm __volatile("eieio; sync" : : : "memory"); + + powerpc_iomb(); } /* @@ -183,6 +184,7 @@ bs_be_rs_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -195,6 +197,7 @@ bs_be_rs_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -207,6 +210,7 @@ bs_be_rs_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -219,6 +223,7 @@ bs_be_rs_8(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; + powerpc_iomb(); return (res); } @@ -253,7 +258,7 @@ bs_be_rr_1(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -263,7 +268,7 @@ bs_be_rr_2(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -273,7 +278,7 @@ bs_be_rr_4(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -283,7 +288,7 @@ bs_be_rr_8(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -293,7 +298,7 @@ bs_be_ws_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -304,7 +309,7 @@ bs_be_ws_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -315,7 +320,7 @@ bs_be_ws_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -326,7 +331,7 @@ bs_be_ws_8(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -365,7 +370,7 @@ bs_be_wr_1(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -376,7 +381,7 @@ bs_be_wr_2(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -387,7 +392,7 @@ bs_be_wr_4(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -398,7 +403,7 @@ bs_be_wr_8(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -408,7 +413,7 @@ bs_be_sm_1(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -418,7 +423,7 @@ bs_be_sm_2(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -428,7 +433,7 @@ bs_be_sm_4(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -438,7 +443,7 @@ bs_be_sm_8(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -448,7 +453,7 @@ bs_be_sr_1(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -458,7 +463,7 @@ bs_be_sr_2(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -468,7 +473,7 @@ bs_be_sr_4(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -478,7 +483,7 @@ bs_be_sr_8(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } /* @@ -492,7 +497,7 @@ bs_le_rs_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -505,7 +510,7 @@ bs_le_rs_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("lhbrx %0, 0, %1" : "=r"(res) : "r"(addr)); - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -518,7 +523,7 @@ bs_le_rs_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("lwbrx %0, 0, %1" : "=r"(res) : "r"(addr)); - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -560,7 +565,7 @@ bs_le_rr_1(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -570,7 +575,7 @@ bs_le_rr_2(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = in16rb(s++); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -580,7 +585,7 @@ bs_le_rr_4(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = in32rb(s++); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -596,6 +601,7 @@ bs_le_ws_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -606,6 +612,7 @@ bs_le_ws_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("sthbrx %0, 0, %1" :: "r"(val), "r"(addr)); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -616,6 +623,7 @@ bs_le_ws_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("stwbrx %0, 0, %1" :: "r"(val), "r"(addr)); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -661,7 +669,7 @@ bs_le_wr_1(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -672,7 +680,7 @@ bs_le_wr_2(bus_space_handle_t bsh, bus_s while (cnt--) out16rb(d++, *addr++); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -683,7 +691,7 @@ bs_le_wr_4(bus_space_handle_t bsh, bus_s while (cnt--) out32rb(d++, *addr++); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -700,7 +708,7 @@ bs_le_sm_1(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -710,7 +718,7 @@ bs_le_sm_2(bus_space_handle_t bsh, bus_s while (cnt--) out16rb(d, val); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -720,7 +728,7 @@ bs_le_sm_4(bus_space_handle_t bsh, bus_s while (cnt--) out32rb(d, val); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -736,7 +744,7 @@ bs_le_sr_1(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -746,7 +754,7 @@ bs_le_sr_2(bus_space_handle_t bsh, bus_s while (cnt--) out16rb(d++, val); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -756,7 +764,7 @@ bs_le_sr_4(bus_space_handle_t bsh, bus_s while (cnt--) out32rb(d++, val); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 18:56:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C2D1106564A; Sun, 22 Apr 2012 18:56:56 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 869A28FC16; Sun, 22 Apr 2012 18:56:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MIuuC4052558; Sun, 22 Apr 2012 18:56:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MIuuZU052555; Sun, 22 Apr 2012 18:56:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204221856.q3MIuuZU052555@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 18:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234580 - in head/sys: conf powerpc/include powerpc/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:56:56 -0000 Author: nwhitehorn Date: Sun Apr 22 18:56:56 2012 New Revision: 234580 URL: http://svn.freebsd.org/changeset/base/234580 Log: Remove dead code. The routines in atomic.S did not work properly anyway, and were everywhere unused. If we turn out to need them, they should be reimplemented. MFC after: 2 weeks Deleted: head/sys/powerpc/powerpc/atomic.S Modified: head/sys/conf/files.powerpc head/sys/powerpc/include/cpufunc.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Apr 22 18:54:51 2012 (r234579) +++ head/sys/conf/files.powerpc Sun Apr 22 18:56:56 2012 (r234580) @@ -170,7 +170,6 @@ powerpc/powermac/uninorthpci.c optional powerpc/powermac/vcoregpio.c optional powermac powerpc/powermac/windtunnel.c optional powermac windtunnel powerpc/powerpc/altivec.c optional aim -powerpc/powerpc/atomic.S standard powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.c standard powerpc/powerpc/bus_machdep.c standard Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Sun Apr 22 18:54:51 2012 (r234579) +++ head/sys/powerpc/include/cpufunc.h Sun Apr 22 18:56:56 2012 (r234580) @@ -29,16 +29,6 @@ #ifndef _MACHINE_CPUFUNC_H_ #define _MACHINE_CPUFUNC_H_ -/* - * Required for user-space atomic.h includes - */ -static __inline void -powerpc_mb(void) -{ - - __asm __volatile("eieio; sync" : : : "memory"); -} - #ifdef _KERNEL #include From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 19:00:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1174F106566B; Sun, 22 Apr 2012 19:00:52 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6E338FC08; Sun, 22 Apr 2012 19:00:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MJ0p5h052729; Sun, 22 Apr 2012 19:00:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MJ0p2k052726; Sun, 22 Apr 2012 19:00:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204221900.q3MJ0p2k052726@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 19:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234581 - in head/sys/powerpc: aim include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 19:00:52 -0000 Author: nwhitehorn Date: Sun Apr 22 19:00:51 2012 New Revision: 234581 URL: http://svn.freebsd.org/changeset/base/234581 Log: Use lwsync to provide memory barriers on systems that support it instead of sync (lwsync is an alternate encoding of sync on systems that do not support it, providing graceful fallback). This provides more than an order of magnitude reduction in the time required to acquire or release a mutex. MFC after: 2 months Modified: head/sys/powerpc/aim/slb.c head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Sun Apr 22 18:56:56 2012 (r234580) +++ head/sys/powerpc/aim/slb.c Sun Apr 22 19:00:51 2012 (r234581) @@ -139,7 +139,7 @@ make_new_leaf(uint64_t esid, uint64_t sl * that a lockless searcher always sees a valid path through * the tree. */ - powerpc_sync(); + mb(); idx = esid2idx(esid, parent->ua_level); parent->u.ua_child[idx] = child; @@ -187,7 +187,7 @@ make_intermediate(uint64_t esid, struct idx = esid2idx(child->ua_base, inter->ua_level); inter->u.ua_child[idx] = child; setbit(&inter->ua_alloc, idx); - powerpc_sync(); + mb(); /* Set up parent to point to intermediate node ... */ idx = esid2idx(inter->ua_base, parent->ua_level); Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun Apr 22 18:56:56 2012 (r234580) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 19:00:51 2012 (r234581) @@ -36,12 +36,10 @@ #error this file needs sys/cdefs.h as a prerequisite #endif -#define __ATOMIC_BARRIER \ - __asm __volatile("sync" : : : "memory") - -#define mb() __ATOMIC_BARRIER -#define wmb() mb() -#define rmb() mb() +/* NOTE: lwsync is equivalent to sync on systems without lwsync */ +#define mb() __asm __volatile("lwsync" : : : "memory") +#define wmb() __asm __volatile("lwsync" : : : "memory") +#define rmb() __asm __volatile("lwsync" : : : "memory") /* * atomic_add(p, v) @@ -94,13 +92,13 @@ atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_add_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ @@ -180,13 +178,13 @@ _ATOMIC_ADD(long) atomic_clear_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_clear_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_clear_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ @@ -282,13 +280,13 @@ _ATOMIC_CLEAR(long) atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_set_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ @@ -368,13 +366,13 @@ _ATOMIC_SET(long) atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_subtract_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_subtract_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_subtract_##type(p, v, t); \ } \ /* _ATOMIC_SUBTRACT */ @@ -481,14 +479,14 @@ atomic_load_acq_##TYPE(volatile u_##TYPE u_##TYPE v; \ \ v = *p; \ - __ATOMIC_BARRIER; \ + rmb(); \ return (v); \ } \ \ static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v) \ { \ - __ATOMIC_BARRIER; \ + wmb(); \ *p = v; \ } @@ -598,14 +596,14 @@ atomic_cmpset_acq_int(volatile u_int *p, int retval; retval = atomic_cmpset_int(p, cmpval, newval); - __ATOMIC_BARRIER; + rmb(); return (retval); } static __inline int atomic_cmpset_rel_int(volatile u_int *p, u_int cmpval, u_int newval) { - __ATOMIC_BARRIER; + wmb(); return (atomic_cmpset_int(p, cmpval, newval)); } @@ -615,14 +613,14 @@ atomic_cmpset_acq_long(volatile u_long * u_long retval; retval = atomic_cmpset_long(p, cmpval, newval); - __ATOMIC_BARRIER; + rmb(); return (retval); } static __inline int atomic_cmpset_rel_long(volatile u_long *p, u_long cmpval, u_long newval) { - __ATOMIC_BARRIER; + wmb(); return (atomic_cmpset_long(p, cmpval, newval)); } From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 20:23:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 946031065677; Sun, 22 Apr 2012 20:23:35 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8768FC16; Sun, 22 Apr 2012 20:23:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MKNZmn055283; Sun, 22 Apr 2012 20:23:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MKNZ0X055281; Sun, 22 Apr 2012 20:23:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204222023.q3MKNZ0X055281@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 20:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234583 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 20:23:35 -0000 Author: nwhitehorn Date: Sun Apr 22 20:23:34 2012 New Revision: 234583 URL: http://svn.freebsd.org/changeset/base/234583 Log: On non-64-bit systems (which generally don't have lwsync), use eieio and isync to implement read and write barriers, following Appendix B.2 of Book II of the architecture manual. This provides a 25% speed increase to fork() on the PowerPC G4. Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun Apr 22 20:14:33 2012 (r234582) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 20:23:34 2012 (r234583) @@ -38,8 +38,13 @@ /* NOTE: lwsync is equivalent to sync on systems without lwsync */ #define mb() __asm __volatile("lwsync" : : : "memory") +#ifdef __powerpc64__ #define wmb() __asm __volatile("lwsync" : : : "memory") #define rmb() __asm __volatile("lwsync" : : : "memory") +#else +#define wmb() __asm __volatile("eieio" : : : "memory") +#define rmb() __asm __volatile("isync" : : : "memory") +#endif /* * atomic_add(p, v) From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 20:41:59 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B137C1065676; Sun, 22 Apr 2012 20:41:59 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 40AA98FC12; Sun, 22 Apr 2012 20:41:58 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q3MKfmZo087338; Sun, 22 Apr 2012 22:41:51 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4F946D0C.9000900@FreeBSD.org> Date: Sun, 22 Apr 2012 22:41:48 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Dimitry Andric References: <201204162136.q3GLaurU051667@svn.freebsd.org> In-Reply-To: <201204162136.q3GLaurU051667@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 20:41:59 -0000 On 16.04.12 23:36, Dimitry Andric wrote: > Author: dim > Date: Mon Apr 16 21:36:55 2012 > New Revision: 234356 > URL: http://svn.freebsd.org/changeset/base/234356 > > Log: > Work around an issue on 32-bit PowerPC, where clang executable can get > too big, causing 'relocation truncated to fit' errors at link time. > > Reviewed by: nwhitehorn Did you build and boot a 32-bit world with gcc? I get an unusable install with this commit, every command segfaults. This is on a G5 SMP with 32-bit OS, gcc built. 64-bit world/kernel did boot. Andreas From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 21:11:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C23C51065670; Sun, 22 Apr 2012 21:11:01 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC0B18FC14; Sun, 22 Apr 2012 21:11:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLB1hj057708; Sun, 22 Apr 2012 21:11:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLB1t3057705; Sun, 22 Apr 2012 21:11:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204222111.q3MLB1t3057705@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 21:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234584 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:11:01 -0000 Author: nwhitehorn Date: Sun Apr 22 21:11:01 2012 New Revision: 234584 URL: http://svn.freebsd.org/changeset/base/234584 Log: Clarify what we are doing in r234583 a little better: eieio and isync do not provide general barriers, but only barriers in the context of the atomic sequences here. As such, make them private and keep the global *mb() routines using a variant of sync. Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun Apr 22 20:23:34 2012 (r234583) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 21:11:01 2012 (r234584) @@ -37,13 +37,21 @@ #endif /* NOTE: lwsync is equivalent to sync on systems without lwsync */ -#define mb() __asm __volatile("lwsync" : : : "memory") +#define mb() __asm __volatile("lwsync" : : : "memory") +#define wmb() __asm __volatile("lwsync" : : : "memory") +#define rmb() __asm __volatile("lwsync" : : : "memory") + +/* + * The __ATOMIC_XMB() macros provide memory barriers only in conjunction + * with the atomic lXarx/stXcx. sequences below. See Appendix B.2 of Book II + * of the architecture manual. + */ #ifdef __powerpc64__ -#define wmb() __asm __volatile("lwsync" : : : "memory") -#define rmb() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_WMB() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_RMB() __asm __volatile("lwsync" : : : "memory") #else -#define wmb() __asm __volatile("eieio" : : : "memory") -#define rmb() __asm __volatile("isync" : : : "memory") +#define __ATOMIC_WMB() __asm __volatile("eieio" : : : "memory") +#define __ATOMIC_RMB() __asm __volatile("isync" : : : "memory") #endif /* @@ -97,13 +105,13 @@ atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_add_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ @@ -183,13 +191,13 @@ _ATOMIC_ADD(long) atomic_clear_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_clear_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_clear_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ @@ -285,13 +293,13 @@ _ATOMIC_CLEAR(long) atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_set_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ @@ -371,13 +379,13 @@ _ATOMIC_SET(long) atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_subtract_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_subtract_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_subtract_##type(p, v, t); \ } \ /* _ATOMIC_SUBTRACT */ @@ -601,7 +609,7 @@ atomic_cmpset_acq_int(volatile u_int *p, int retval; retval = atomic_cmpset_int(p, cmpval, newval); - rmb(); + __ATOMIC_RMB(); return (retval); } @@ -618,7 +626,7 @@ atomic_cmpset_acq_long(volatile u_long * u_long retval; retval = atomic_cmpset_long(p, cmpval, newval); - rmb(); + __ATOMIC_RMB(); return (retval); } From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 21:18:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBBE11065672; Sun, 22 Apr 2012 21:18:41 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5FB28FC0C; Sun, 22 Apr 2012 21:18:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLIfP2058641; Sun, 22 Apr 2012 21:18:41 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLIftC058638; Sun, 22 Apr 2012 21:18:41 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204222118.q3MLIftC058638@svn.freebsd.org> From: David Schultz Date: Sun, 22 Apr 2012 21:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234585 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:18:41 -0000 Author: das Date: Sun Apr 22 21:18:41 2012 New Revision: 234585 URL: http://svn.freebsd.org/changeset/base/234585 Log: Refactor scanf to improve modularity. Conversions are now performed by separate conversion functions. This will hopefully make bugs more noticeable (I noticed several already) and provide opportunities to reduce code duplication. Modified: head/lib/libc/stdio/vfscanf.c head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfscanf.c ============================================================================== --- head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:11:01 2012 (r234584) +++ head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:18:41 2012 (r234585) @@ -107,6 +107,418 @@ static int parsefloat(FILE *, char *, ch __weak_reference(__vfscanf, vfscanf); /* + * Conversion functions are passed a pointer to this object instead of + * a real parameter to indicate that the assignment-suppression (*) + * flag was specified. We could use a NULL pointer to indicate this, + * but that would mask bugs in applications that call scanf() with a + * NULL pointer. + */ +static const int suppress; +#define SUPPRESS_PTR ((void *)&suppress) + +static const mbstate_t initial_mbs; + +/* + * The following conversion functions return the number of characters consumed, + * or -1 on input failure. Character class conversion returns 0 on match + * failure. + */ + +static __inline int +convert_char(FILE *fp, char * __restrict p, int width) +{ + int n, nread; + + nread = 0; + if (p == SUPPRESS_PTR) { + size_t sum = 0; + for (;;) { + if ((n = fp->_r) < width) { + sum += n; + width -= n; + fp->_p += n; + if (__srefill(fp)) { + if (sum == 0) + return (-1); + break; + } + } else { + sum += width; + fp->_r -= width; + fp->_p += width; + break; + } + } + nread += sum; + } else { + size_t r = __fread(p, 1, width, fp); + + if (r == 0) + return (-1); + nread += r; + } + return (nread); +} + +static __inline int +convert_wchar(FILE *fp, wchar_t *wcp, int width) +{ + mbstate_t mbs; + size_t nconv; + int n, nread; + char buf[MB_CUR_MAX]; + + nread = 0; + n = 0; + while (width != 0) { + if (n == MB_CUR_MAX) { + fp->_flags |= __SERR; + return (-1); + } + buf[n++] = *fp->_p; + fp->_p++; + fp->_r--; + mbs = initial_mbs; + nconv = mbrtowc(wcp, buf, n, &mbs); + if (nconv == (size_t)-1) { + fp->_flags |= __SERR; + return (-1); + } + if (nconv == 0 && wcp != SUPPRESS_PTR) + *wcp = L'\0'; + if (nconv != (size_t)-2) { + nread += n; + width--; + if (wcp != SUPPRESS_PTR) + wcp++; + n = 0; + } + if (fp->_r <= 0 && __srefill(fp)) { + if (n != 0) { + fp->_flags |= __SERR; + return (-1); + } + break; + } + } + return (nread); +} + +static __inline int +convert_ccl(FILE *fp, char * __restrict p, int width, const char *ccltab) +{ + char *p0; + int n; + + if (p == SUPPRESS_PTR) { + n = 0; + while (ccltab[*fp->_p]) { + n++, fp->_r--, fp->_p++; + if (--width == 0) + break; + if (fp->_r <= 0 && __srefill(fp)) { + if (n == 0) + return (-1); + break; + } + } + } else { + p0 = p; + while (ccltab[*fp->_p]) { + fp->_r--; + *p++ = *fp->_p++; + if (--width == 0) + break; + if (fp->_r <= 0 && __srefill(fp)) { + if (p == p0) + return (-1); + break; + } + } + n = p - p0; + if (n == 0) + return (0); + *p = 0; + } + return (n); +} + +static __inline int +convert_wccl(FILE *fp, wchar_t *wcp, int width, const char *ccltab) +{ + mbstate_t mbs; + wchar_t twc; + int n, nchars, nconv, nread; + char buf[MB_CUR_MAX]; + + if (wcp == SUPPRESS_PTR) + wcp = &twc; + n = nread = 0; + nchars = 0; + while (width != 0) { + if (n == MB_CUR_MAX) { + fp->_flags |= __SERR; + return (-1); + } + buf[n++] = *fp->_p; + fp->_p++; + fp->_r--; + mbs = initial_mbs; + nconv = mbrtowc(wcp, buf, n, &mbs); + if (nconv == (size_t)-1) { + fp->_flags |= __SERR; + return (-1); + } + if (nconv == 0) + *wcp = L'\0'; + if (nconv != (size_t)-2) { + if (wctob(*wcp) != EOF && !ccltab[wctob(*wcp)]) { + while (n != 0) { + n--; + __ungetc(buf[n], fp); + } + break; + } + nread += n; + width--; + if (wcp != &twc) + wcp++; + nchars++; + n = 0; + } + if (fp->_r <= 0 && __srefill(fp)) { + if (n != 0) { + fp->_flags |= __SERR; + return (-1); + } + break; + } + } + if (n != 0) { + fp->_flags |= __SERR; + return (-1); + } + n = nchars; + if (n == 0) + return (0); + *wcp = L'\0'; + /* XXX This matches historical behavior, but it's wrong. */ + return (nread + n); +} + +static __inline int +convert_string(FILE *fp, char * __restrict p, int width) +{ + char *p0; + int n; + + if (p == SUPPRESS_PTR) { + n = 0; + while (!isspace(*fp->_p)) { + n++, fp->_r--, fp->_p++; + if (--width == 0) + break; + if (fp->_r <= 0 && __srefill(fp)) + break; + } + } else { + p0 = p; + while (!isspace(*fp->_p)) { + fp->_r--; + *p++ = *fp->_p++; + if (--width == 0) + break; + if (fp->_r <= 0 && __srefill(fp)) + break; + } + *p = 0; + n = p - p0; + } + return (n); +} + +static __inline int +convert_wstring(FILE *fp, wchar_t *wcp, int width) +{ + mbstate_t mbs; + wchar_t twc; + int n, nconv, nread; + char buf[MB_CUR_MAX]; + + if (wcp == SUPPRESS_PTR) + wcp = &twc; + n = nread = 0; + while (!isspace(*fp->_p) && width != 0) { + if (n == MB_CUR_MAX) { + fp->_flags |= __SERR; + return (-1); + } + buf[n++] = *fp->_p; + fp->_p++; + fp->_r--; + mbs = initial_mbs; + nconv = mbrtowc(wcp, buf, n, &mbs); + if (nconv == (size_t)-1) { + fp->_flags |= __SERR; + return (-1); + } + if (nconv == 0) + *wcp = L'\0'; + if (nconv != (size_t)-2) { + if (iswspace(*wcp)) { + while (n != 0) { + n--; + __ungetc(buf[n], fp); + } + break; + } + nread += n; + width--; + if (wcp != &twc) + wcp++; + n = 0; + } + if (fp->_r <= 0 && __srefill(fp)) { + if (n != 0) { + fp->_flags |= __SERR; + return (-1); + } + break; + } + } + *wcp = L'\0'; + return (nread); +} + +/* + * Read an integer, storing it in buf. The only relevant bit in the + * flags argument is PFXOK. + * + * Return 0 on a match failure, and the number of characters read + * otherwise. + */ +static __inline int +parseint(FILE *fp, char * __restrict buf, int width, int base, int flags) +{ + /* `basefix' is used to avoid `if' tests */ + static const short basefix[17] = + { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + char *p; + int c; + + flags |= SIGNOK | NDIGITS | NZDIGITS; + for (p = buf; width; width--) { + c = *fp->_p; + /* + * Switch on the character; `goto ok' if we accept it + * as a part of number. + */ + switch (c) { + + /* + * The digit 0 is always legal, but is special. For + * %i conversions, if no digits (zero or nonzero) have + * been scanned (only signs), we will have base==0. + * In that case, we should set it to 8 and enable 0x + * prefixing. Also, if we have not scanned zero + * digits before this, do not turn off prefixing + * (someone else will turn it off if we have scanned + * any nonzero digits). + */ + case '0': + if (base == 0) { + base = 8; + flags |= PFXOK; + } + if (flags & NZDIGITS) + flags &= ~(SIGNOK|NZDIGITS|NDIGITS); + else + flags &= ~(SIGNOK|PFXOK|NDIGITS); + goto ok; + + /* 1 through 7 always legal */ + case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + base = basefix[base]; + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* digits 8 and 9 ok iff decimal or hex */ + case '8': case '9': + base = basefix[base]; + if (base <= 8) + break; /* not legal here */ + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* letters ok iff hex */ + case 'A': case 'B': case 'C': + case 'D': case 'E': case 'F': + case 'a': case 'b': case 'c': + case 'd': case 'e': case 'f': + /* no need to fix base here */ + if (base <= 10) + break; /* not legal here */ + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* sign ok only as first character */ + case '+': case '-': + if (flags & SIGNOK) { + flags &= ~SIGNOK; + flags |= HAVESIGN; + goto ok; + } + break; + + /* + * x ok iff flag still set & 2nd char (or 3rd char if + * we have a sign). + */ + case 'x': case 'X': + if (flags & PFXOK && p == + buf + 1 + !!(flags & HAVESIGN)) { + base = 16; /* if %i */ + flags &= ~PFXOK; + goto ok; + } + break; + } + + /* + * If we got here, c is not a legal character for a + * number. Stop accumulating digits. + */ + break; + ok: + /* + * c is legal: store it and look at the next. + */ + *p++ = c; + if (--fp->_r > 0) + fp->_p++; + else if (__srefill(fp)) + break; /* EOF */ + } + /* + * If we had only a sign, it is no good; push back the sign. + * If the number ends in `x', it was [sign] '0' 'x', so push + * back the x and treat it as [sign] '0'. + */ + if (flags & NDIGITS) { + if (p > buf) + (void) __ungetc(*(u_char *)--p, fp); + return (0); + } + c = ((u_char *)p)[-1]; + if (c == 'x' || c == 'X') { + --p; + (void) __ungetc(c, fp); + } + return (p - buf); +} + +/* * __vfscanf - MT-safe version */ int @@ -137,27 +549,18 @@ vfscanf_l(FILE *fp, locale_t locale, cha int __svfscanf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) { +#define GETARG(type) ((flags & SUPPRESS) ? SUPPRESS_PTR : va_arg(ap, type)) const u_char *fmt = (const u_char *)fmt0; int c; /* character from format, or conversion */ size_t width; /* field width, or 0 */ - char *p; /* points into all kinds of strings */ - int n; /* handy integer */ int flags; /* flags as defined above */ - char *p0; /* saves original value of p when necessary */ int nassigned; /* number of fields assigned */ int nconversions; /* number of conversions */ + int nr; /* characters read by the current conversion */ int nread; /* number of characters consumed from fp */ int base; /* base argument to conversion function */ char ccltab[256]; /* character class table for %[...] */ - char buf[BUF]; /* buffer for numeric and mb conversions */ - wchar_t *wcp; /* handy wide character pointer */ - size_t nconv; /* length of multibyte sequence converted */ - static const mbstate_t initial; - mbstate_t mbs; - - /* `basefix' is used to avoid `if' tests in the integer scanner */ - static short basefix[17] = - { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + char buf[BUF]; /* buffer for numeric conversions */ ORIENT(fp, -1); @@ -366,178 +769,32 @@ literal: if (width == 0) width = 1; if (flags & LONG) { - if ((flags & SUPPRESS) == 0) - wcp = va_arg(ap, wchar_t *); - else - wcp = NULL; - n = 0; - while (width != 0) { - if (n == MB_CUR_MAX) { - fp->_flags |= __SERR; - goto input_failure; - } - buf[n++] = *fp->_p; - fp->_p++; - fp->_r--; - mbs = initial; - nconv = mbrtowc(wcp, buf, n, &mbs); - if (nconv == (size_t)-1) { - fp->_flags |= __SERR; - goto input_failure; - } - if (nconv == 0 && !(flags & SUPPRESS)) - *wcp = L'\0'; - if (nconv != (size_t)-2) { - nread += n; - width--; - if (!(flags & SUPPRESS)) - wcp++; - n = 0; - } - if (fp->_r <= 0 && __srefill(fp)) { - if (n != 0) { - fp->_flags |= __SERR; - goto input_failure; - } - break; - } - } - if (!(flags & SUPPRESS)) - nassigned++; - } else if (flags & SUPPRESS) { - size_t sum = 0; - for (;;) { - if ((n = fp->_r) < width) { - sum += n; - width -= n; - fp->_p += n; - if (__srefill(fp)) { - if (sum == 0) - goto input_failure; - break; - } - } else { - sum += width; - fp->_r -= width; - fp->_p += width; - break; - } - } - nread += sum; + nr = convert_wchar(fp, GETARG(wchar_t *), + width); } else { - size_t r = __fread((void *)va_arg(ap, char *), 1, - width, fp); - - if (r == 0) - goto input_failure; - nread += r; - nassigned++; + nr = convert_char(fp, GETARG(char *), width); } - nconversions++; + if (nr < 0) + goto input_failure; break; case CT_CCL: /* scan a (nonempty) character class (sets NOSKIP) */ if (width == 0) width = (size_t)~0; /* `infinity' */ - /* take only those things in the class */ if (flags & LONG) { - wchar_t twc; - int nchars; - - if ((flags & SUPPRESS) == 0) - wcp = va_arg(ap, wchar_t *); - else - wcp = &twc; - n = 0; - nchars = 0; - while (width != 0) { - if (n == MB_CUR_MAX) { - fp->_flags |= __SERR; - goto input_failure; - } - buf[n++] = *fp->_p; - fp->_p++; - fp->_r--; - mbs = initial; - nconv = mbrtowc(wcp, buf, n, &mbs); - if (nconv == (size_t)-1) { - fp->_flags |= __SERR; - goto input_failure; - } - if (nconv == 0) - *wcp = L'\0'; - if (nconv != (size_t)-2) { - if (wctob(*wcp) != EOF && - !ccltab[wctob(*wcp)]) { - while (n != 0) { - n--; - __ungetc(buf[n], - fp); - } - break; - } - nread += n; - width--; - if (!(flags & SUPPRESS)) - wcp++; - nchars++; - n = 0; - } - if (fp->_r <= 0 && __srefill(fp)) { - if (n != 0) { - fp->_flags |= __SERR; - goto input_failure; - } - break; - } - } - if (n != 0) { - fp->_flags |= __SERR; - goto input_failure; - } - n = nchars; - if (n == 0) - goto match_failure; - if (!(flags & SUPPRESS)) { - *wcp = L'\0'; - nassigned++; - } - } else if (flags & SUPPRESS) { - n = 0; - while (ccltab[*fp->_p]) { - n++, fp->_r--, fp->_p++; - if (--width == 0) - break; - if (fp->_r <= 0 && __srefill(fp)) { - if (n == 0) - goto input_failure; - break; - } - } - if (n == 0) - goto match_failure; + nr = convert_wccl(fp, GETARG(wchar_t *), width, + ccltab); } else { - p0 = p = va_arg(ap, char *); - while (ccltab[*fp->_p]) { - fp->_r--; - *p++ = *fp->_p++; - if (--width == 0) - break; - if (fp->_r <= 0 && __srefill(fp)) { - if (p == p0) - goto input_failure; - break; - } - } - n = p - p0; - if (n == 0) + nr = convert_ccl(fp, GETARG(char *), width, + ccltab); + } + if (nr <= 0) { + if (nr < 0) + goto input_failure; + else /* nr == 0 */ goto match_failure; - *p = 0; - nassigned++; } - nread += n; - nconversions++; break; case CT_STRING: @@ -545,82 +802,14 @@ literal: if (width == 0) width = (size_t)~0; if (flags & LONG) { - wchar_t twc; - - if ((flags & SUPPRESS) == 0) - wcp = va_arg(ap, wchar_t *); - else - wcp = &twc; - n = 0; - while (!isspace(*fp->_p) && width != 0) { - if (n == MB_CUR_MAX) { - fp->_flags |= __SERR; - goto input_failure; - } - buf[n++] = *fp->_p; - fp->_p++; - fp->_r--; - mbs = initial; - nconv = mbrtowc(wcp, buf, n, &mbs); - if (nconv == (size_t)-1) { - fp->_flags |= __SERR; - goto input_failure; - } - if (nconv == 0) - *wcp = L'\0'; - if (nconv != (size_t)-2) { - if (iswspace(*wcp)) { - while (n != 0) { - n--; - __ungetc(buf[n], - fp); - } - break; - } - nread += n; - width--; - if (!(flags & SUPPRESS)) - wcp++; - n = 0; - } - if (fp->_r <= 0 && __srefill(fp)) { - if (n != 0) { - fp->_flags |= __SERR; - goto input_failure; - } - break; - } - } - if (!(flags & SUPPRESS)) { - *wcp = L'\0'; - nassigned++; - } - } else if (flags & SUPPRESS) { - n = 0; - while (!isspace(*fp->_p)) { - n++, fp->_r--, fp->_p++; - if (--width == 0) - break; - if (fp->_r <= 0 && __srefill(fp)) - break; - } - nread += n; + nr = convert_wstring(fp, GETARG(wchar_t *), + width); } else { - p0 = p = va_arg(ap, char *); - while (!isspace(*fp->_p)) { - fp->_r--; - *p++ = *fp->_p++; - if (--width == 0) - break; - if (fp->_r <= 0 && __srefill(fp)) - break; - } - *p = 0; - nread += p - p0; - nassigned++; + nr = convert_string(fp, GETARG(char *), width); } - nconversions++; - continue; + if (nr < 0) + goto input_failure; + break; case CT_INT: /* scan an integer as if by the conversion function */ @@ -633,122 +822,13 @@ literal: width = sizeof(buf) - 2; width++; #endif - flags |= SIGNOK | NDIGITS | NZDIGITS; - for (p = buf; width; width--) { - c = *fp->_p; - /* - * Switch on the character; `goto ok' - * if we accept it as a part of number. - */ - switch (c) { - - /* - * The digit 0 is always legal, but is - * special. For %i conversions, if no - * digits (zero or nonzero) have been - * scanned (only signs), we will have - * base==0. In that case, we should set - * it to 8 and enable 0x prefixing. - * Also, if we have not scanned zero digits - * before this, do not turn off prefixing - * (someone else will turn it off if we - * have scanned any nonzero digits). - */ - case '0': - if (base == 0) { - base = 8; - flags |= PFXOK; - } - if (flags & NZDIGITS) - flags &= ~(SIGNOK|NZDIGITS|NDIGITS); - else - flags &= ~(SIGNOK|PFXOK|NDIGITS); - goto ok; - - /* 1 through 7 always legal */ - case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - base = basefix[base]; - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* digits 8 and 9 ok iff decimal or hex */ - case '8': case '9': - base = basefix[base]; - if (base <= 8) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* letters ok iff hex */ - case 'A': case 'B': case 'C': - case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': - case 'd': case 'e': case 'f': - /* no need to fix base here */ - if (base <= 10) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* sign ok only as first character */ - case '+': case '-': - if (flags & SIGNOK) { - flags &= ~SIGNOK; - flags |= HAVESIGN; - goto ok; - } - break; - - /* - * x ok iff flag still set & 2nd char (or - * 3rd char if we have a sign). - */ - case 'x': case 'X': - if (flags & PFXOK && p == - buf + 1 + !!(flags & HAVESIGN)) { - base = 16; /* if %i */ - flags &= ~PFXOK; - goto ok; - } - break; - } - - /* - * If we got here, c is not a legal character - * for a number. Stop accumulating digits. - */ - break; - ok: - /* - * c is legal: store it and look at the next. - */ - *p++ = c; - if (--fp->_r > 0) - fp->_p++; - else if (__srefill(fp)) - break; /* EOF */ - } - /* - * If we had only a sign, it is no good; push - * back the sign. If the number ends in `x', - * it was [sign] '0' 'x', so push back the x - * and treat it as [sign] '0'. - */ - if (flags & NDIGITS) { - if (p > buf) - (void) __ungetc(*(u_char *)--p, fp); + nr = parseint(fp, buf, width, base, flags); + if (nr == 0) goto match_failure; - } - c = ((u_char *)p)[-1]; - if (c == 'x' || c == 'X') { - --p; - (void) __ungetc(c, fp); - } if ((flags & SUPPRESS) == 0) { uintmax_t res; - *p = 0; + buf[nr] = '\0'; if ((flags & UNSIGNED) == 0) res = strtoimax_l(buf, (char **)NULL, base, locale); else @@ -772,10 +852,7 @@ literal: *va_arg(ap, size_t *) = res; else *va_arg(ap, int *) = res; - nassigned++; } - nread += p - buf; - nconversions++; break; #ifndef NO_FLOATING_POINT @@ -783,26 +860,30 @@ literal: /* scan a floating point number as if by strtod */ if (width == 0 || width > sizeof(buf) - 1) width = sizeof(buf) - 1; - if ((width = parsefloat(fp, buf, buf + width, locale)) == 0) + nr = parsefloat(fp, buf, buf + width, locale); + if (nr == 0) goto match_failure; if ((flags & SUPPRESS) == 0) { if (flags & LONGDBL) { - long double res = strtold_l(buf, &p, locale); + long double res = strtold_l(buf, NULL, + locale); *va_arg(ap, long double *) = res; } else if (flags & LONG) { - double res = strtod_l(buf, &p, locale); + double res = strtod_l(buf, NULL, + locale); *va_arg(ap, double *) = res; } else { - float res = strtof_l(buf, &p, locale); + float res = strtof_l(buf, NULL, locale); *va_arg(ap, float *) = res; } - nassigned++; } - nread += width; - nconversions++; break; #endif /* !NO_FLOATING_POINT */ } + if (!(flags & SUPPRESS)) + nassigned++; + nread += nr; + nconversions++; } input_failure: return (nconversions != 0 ? nassigned : EOF); Modified: head/lib/libc/stdio/vfwscanf.c ============================================================================== --- head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:11:01 2012 (r234584) +++ head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:18:41 2012 (r234585) @@ -101,13 +101,359 @@ __FBSDID("$FreeBSD$"); static int parsefloat(FILE *, wchar_t *, wchar_t *, locale_t); #endif -#define INCCL(_c) \ - (cclcompl ? (wmemchr(ccls, (_c), ccle - ccls) == NULL) : \ - (wmemchr(ccls, (_c), ccle - ccls) != NULL)) +struct ccl { + const wchar_t *start; /* character class start */ + const wchar_t *end; /* character class end */ + int compl; /* ccl is complemented? */ +}; + +static __inline int +inccl(const struct ccl *ccl, wint_t wi) +{ + + if (ccl->compl) { + return (wmemchr(ccl->start, wi, ccl->end - ccl->start) + == NULL); + } else { + return (wmemchr(ccl->start, wi, ccl->end - ccl->start) != NULL); + } +} + +/* + * Conversion functions are passed a pointer to this object instead of + * a real parameter to indicate that the assignment-suppression (*) + * flag was specified. We could use a NULL pointer to indicate this, + * but that would mask bugs in applications that call scanf() with a + * NULL pointer. + */ +static const int suppress; +#define SUPPRESS_PTR ((void *)&suppress) static const mbstate_t initial_mbs; /* + * The following conversion functions return the number of characters consumed, + * or -1 on input failure. Character class conversion returns 0 on match + * failure. + */ + +static __inline int +convert_char(FILE *fp, char * __restrict mbp, int width, locale_t locale) +{ + mbstate_t mbs; + size_t nconv; + wint_t wi; + int n; + char mbbuf[MB_LEN_MAX]; + + n = 0; + mbs = initial_mbs; + while (width != 0 && (wi = __fgetwc(fp, locale)) != WEOF) { + if (width >= MB_CUR_MAX && mbp != SUPPRESS_PTR) { + nconv = wcrtomb(mbp, wi, &mbs); + if (nconv == (size_t)-1) + return (-1); + } else { + nconv = wcrtomb(mbbuf, wi, &mbs); + if (nconv == (size_t)-1) + return (-1); + if (nconv > width) { + __ungetwc(wi, fp, locale); + break; + } + if (mbp != SUPPRESS_PTR) + memcpy(mbp, mbbuf, nconv); + } + if (mbp != SUPPRESS_PTR) + mbp += nconv; + width -= nconv; + n++; + } + if (n == 0) + return (-1); + return (n); +} + +static __inline int +convert_wchar(FILE *fp, wchar_t *wcp, int width, locale_t locale) +{ + wint_t wi; + int n; + + n = 0; + while (width-- != 0 && (wi = __fgetwc(fp, locale)) != WEOF) { + if (wcp != SUPPRESS_PTR) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 21:22:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A28821065672; Sun, 22 Apr 2012 21:22:14 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E6648FC1C; Sun, 22 Apr 2012 21:22:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLMEwK059107; Sun, 22 Apr 2012 21:22:14 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLME3L059104; Sun, 22 Apr 2012 21:22:14 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204222122.q3MLME3L059104@svn.freebsd.org> From: David Schultz Date: Sun, 22 Apr 2012 21:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234586 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:22:14 -0000 Author: das Date: Sun Apr 22 21:22:14 2012 New Revision: 234586 URL: http://svn.freebsd.org/changeset/base/234586 Log: Bugfix: %n doesn't count as a conversion, so sscanf("abc", "ab%ncd", &i) returns EOF, not 0. Modified: head/lib/libc/stdio/vfscanf.c head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfscanf.c ============================================================================== --- head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:18:41 2012 (r234585) +++ head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:22:14 2012 (r234586) @@ -703,7 +703,6 @@ literal: break; case 'n': - nconversions++; if (flags & SUPPRESS) /* ??? */ continue; if (flags & SHORTSHORT) Modified: head/lib/libc/stdio/vfwscanf.c ============================================================================== --- head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:18:41 2012 (r234585) +++ head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:22:14 2012 (r234586) @@ -650,7 +650,6 @@ literal: break; case 'n': - nconversions++; if (flags & SUPPRESS) /* ??? */ continue; if (flags & SHORTSHORT) From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 21:28:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C3941065672; Sun, 22 Apr 2012 21:28:15 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 183588FC12; Sun, 22 Apr 2012 21:28:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLSE5x059847; Sun, 22 Apr 2012 21:28:14 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLSENU059845; Sun, 22 Apr 2012 21:28:14 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204222128.q3MLSENU059845@svn.freebsd.org> From: David Schultz Date: Sun, 22 Apr 2012 21:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234587 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:28:15 -0000 Author: das Date: Sun Apr 22 21:28:14 2012 New Revision: 234587 URL: http://svn.freebsd.org/changeset/base/234587 Log: Bugfix: Correctly count the number of characters read for %l[ conversions. Modified: head/lib/libc/stdio/vfscanf.c Modified: head/lib/libc/stdio/vfscanf.c ============================================================================== --- head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:22:14 2012 (r234586) +++ head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:28:14 2012 (r234587) @@ -248,12 +248,12 @@ convert_wccl(FILE *fp, wchar_t *wcp, int { mbstate_t mbs; wchar_t twc; - int n, nchars, nconv, nread; + int n, nchars, nconv; char buf[MB_CUR_MAX]; if (wcp == SUPPRESS_PTR) wcp = &twc; - n = nread = 0; + n = 0; nchars = 0; while (width != 0) { if (n == MB_CUR_MAX) { @@ -279,7 +279,6 @@ convert_wccl(FILE *fp, wchar_t *wcp, int } break; } - nread += n; width--; if (wcp != &twc) wcp++; @@ -298,12 +297,10 @@ convert_wccl(FILE *fp, wchar_t *wcp, int fp->_flags |= __SERR; return (-1); } - n = nchars; - if (n == 0) + if (nchars == 0) return (0); *wcp = L'\0'; - /* XXX This matches historical behavior, but it's wrong. */ - return (nread + n); + return (nchars); } static __inline int From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 21:28:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E234010657C2; Sun, 22 Apr 2012 21:28:33 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE0508FC0A; Sun, 22 Apr 2012 21:28:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLSXt3059920; Sun, 22 Apr 2012 21:28:33 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLSXR4059918; Sun, 22 Apr 2012 21:28:33 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204222128.q3MLSXR4059918@svn.freebsd.org> From: David Schultz Date: Sun, 22 Apr 2012 21:28:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234588 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:28:34 -0000 Author: das Date: Sun Apr 22 21:28:33 2012 New Revision: 234588 URL: http://svn.freebsd.org/changeset/base/234588 Log: Bugfix: Include whitespace characters in the count of the number of characters read. Modified: head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfwscanf.c ============================================================================== --- head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:28:14 2012 (r234587) +++ head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:28:33 2012 (r234588) @@ -506,7 +506,7 @@ __vfwscanf(FILE * __restrict fp, locale_ if (iswspace(c)) { while ((c = __fgetwc(fp, locale)) != WEOF && iswspace_l(c, locale)) - ; + nread++; if (c != WEOF) __ungetwc(c, fp, locale); continue; From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 21:55:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 533B4106566C; Sun, 22 Apr 2012 21:55:20 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA3B8FC0A; Sun, 22 Apr 2012 21:55:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLtK4K062187; Sun, 22 Apr 2012 21:55:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLtKkN062185; Sun, 22 Apr 2012 21:55:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204222155.q3MLtKkN062185@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 21:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234589 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:55:20 -0000 Author: nwhitehorn Date: Sun Apr 22 21:55:19 2012 New Revision: 234589 URL: http://svn.freebsd.org/changeset/base/234589 Log: Correctly specify assembler constrains for synchronization instructions. MFC after: 3 days Modified: head/sys/powerpc/include/cpufunc.h Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Sun Apr 22 21:28:33 2012 (r234588) +++ head/sys/powerpc/include/cpufunc.h Sun Apr 22 21:55:19 2012 (r234589) @@ -166,21 +166,21 @@ static __inline void eieio(void) { - __asm __volatile ("eieio"); + __asm __volatile ("eieio" : : : "memory"); } static __inline void isync(void) { - __asm __volatile ("isync"); + __asm __volatile ("isync" : : : "memory"); } static __inline void powerpc_sync(void) { - __asm __volatile ("sync"); + __asm __volatile ("sync" : : : "memory"); } static __inline register_t From owner-svn-src-head@FreeBSD.ORG Sun Apr 22 22:27:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F68C106564A; Sun, 22 Apr 2012 22:27:36 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 206678FC08; Sun, 22 Apr 2012 22:27:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MMRZFh063180; Sun, 22 Apr 2012 22:27:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MMRZ9T063178; Sun, 22 Apr 2012 22:27:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204222227.q3MMRZ9T063178@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 22:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234590 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 22:27:36 -0000 Author: nwhitehorn Date: Sun Apr 22 22:27:35 2012 New Revision: 234590 URL: http://svn.freebsd.org/changeset/base/234590 Log: Provide a clearer split between read/write and acquire/release barriers. This should really, actually be correct now. Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun Apr 22 21:55:19 2012 (r234589) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 22:27:35 2012 (r234590) @@ -38,20 +38,25 @@ /* NOTE: lwsync is equivalent to sync on systems without lwsync */ #define mb() __asm __volatile("lwsync" : : : "memory") +#ifdef __powerpc64__ +#define rmb() __asm __volatile("lwsync" : : : "memory") #define wmb() __asm __volatile("lwsync" : : : "memory") +#else #define rmb() __asm __volatile("lwsync" : : : "memory") +#define wmb() __asm __volatile("eieio" : : : "memory") +#endif /* - * The __ATOMIC_XMB() macros provide memory barriers only in conjunction + * The __ATOMIC_REL/ACQ() macros provide memory barriers only in conjunction * with the atomic lXarx/stXcx. sequences below. See Appendix B.2 of Book II * of the architecture manual. */ #ifdef __powerpc64__ -#define __ATOMIC_WMB() __asm __volatile("lwsync" : : : "memory") -#define __ATOMIC_RMB() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_REL() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_ACQ() __asm __volatile("lwsync" : : : "memory") #else -#define __ATOMIC_WMB() __asm __volatile("eieio" : : : "memory") -#define __ATOMIC_RMB() __asm __volatile("isync" : : : "memory") +#define __ATOMIC_REL() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_ACQ() __asm __volatile("isync" : : : "memory") #endif /* @@ -105,13 +110,13 @@ atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_add_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ @@ -191,13 +196,13 @@ _ATOMIC_ADD(long) atomic_clear_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_clear_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_clear_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ @@ -293,13 +298,13 @@ _ATOMIC_CLEAR(long) atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_set_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ @@ -379,13 +384,13 @@ _ATOMIC_SET(long) atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_subtract_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_subtract_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_subtract_##type(p, v, t); \ } \ /* _ATOMIC_SUBTRACT */ @@ -492,14 +497,14 @@ atomic_load_acq_##TYPE(volatile u_##TYPE u_##TYPE v; \ \ v = *p; \ - rmb(); \ + mb(); \ return (v); \ } \ \ static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v) \ { \ - wmb(); \ + mb(); \ *p = v; \ } @@ -609,14 +614,14 @@ atomic_cmpset_acq_int(volatile u_int *p, int retval; retval = atomic_cmpset_int(p, cmpval, newval); - __ATOMIC_RMB(); + __ATOMIC_ACQ(); return (retval); } static __inline int atomic_cmpset_rel_int(volatile u_int *p, u_int cmpval, u_int newval) { - wmb(); + __ATOMIC_REL(); return (atomic_cmpset_int(p, cmpval, newval)); } @@ -626,14 +631,14 @@ atomic_cmpset_acq_long(volatile u_long * u_long retval; retval = atomic_cmpset_long(p, cmpval, newval); - __ATOMIC_RMB(); + __ATOMIC_ACQ(); return (retval); } static __inline int atomic_cmpset_rel_long(volatile u_long *p, u_long cmpval, u_long newval) { - wmb(); + __ATOMIC_REL(); return (atomic_cmpset_long(p, cmpval, newval)); } From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 00:54:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A932C1065672; Mon, 23 Apr 2012 00:54:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94FA68FC0A; Mon, 23 Apr 2012 00:54:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N0s62n067702; Mon, 23 Apr 2012 00:54:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N0s6Ep067700; Mon, 23 Apr 2012 00:54:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204230054.q3N0s6Ep067700@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 23 Apr 2012 00:54:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234592 - head/libexec/rtld-elf/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 00:54:06 -0000 Author: nwhitehorn Date: Mon Apr 23 00:54:06 2012 New Revision: 234592 URL: http://svn.freebsd.org/changeset/base/234592 Log: Fix a missed file in r234580: replace the now-obsolete powerpc_mb() with regular mb(). Modified: head/libexec/rtld-elf/powerpc/reloc.c Modified: head/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc/reloc.c Sun Apr 22 22:39:24 2012 (r234591) +++ head/libexec/rtld-elf/powerpc/reloc.c Mon Apr 23 00:54:06 2012 (r234592) @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include "debug.h" @@ -499,7 +499,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr jmptab = obj->pltgot + JMPTAB_BASE(N); jmptab[reloff] = target; - powerpc_mb(); /* Order jmptab update before next changes */ + mb(); /* Order jmptab update before next changes */ if (reloff < PLT_EXTENDED_BEGIN) { /* for extended PLT entries, we keep the old code */ From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 00:55:09 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 878A8106566B; Mon, 23 Apr 2012 00:55:09 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id 54F228FC21; Mon, 23 Apr 2012 00:55:09 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M2W00100QJRSP00@smtpauth1.wiscmail.wisc.edu>; Sun, 22 Apr 2012 19:55:03 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.67.9]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M2W00GN0QJP5P10@smtpauth1.wiscmail.wisc.edu>; Sun, 22 Apr 2012 19:55:02 -0500 (CDT) Date: Sun, 22 Apr 2012 19:55:00 -0500 From: Nathan Whitehorn In-reply-to: <4F946D0C.9000900@FreeBSD.org> To: Andreas Tobler Message-id: <4F94A864.1000401@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.67.9 X-Spam-PmxInfo: Server=avs-13, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.4.23.4522, SenderIP=76.210.67.9 References: <201204162136.q3GLaurU051667@svn.freebsd.org> <4F946D0C.9000900@FreeBSD.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120418 Thunderbird/10.0.3 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric Subject: Re: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 00:55:09 -0000 On 04/22/12 15:41, Andreas Tobler wrote: > On 16.04.12 23:36, Dimitry Andric wrote: >> Author: dim >> Date: Mon Apr 16 21:36:55 2012 >> New Revision: 234356 >> URL: http://svn.freebsd.org/changeset/base/234356 >> >> Log: >> Work around an issue on 32-bit PowerPC, where clang executable can >> get >> too big, causing 'relocation truncated to fit' errors at link time. >> >> Reviewed by: nwhitehorn > > > Did you build and boot a 32-bit world with gcc? > > I get an unusable install with this commit, every command segfaults. > This is on a G5 SMP with 32-bit OS, gcc built. > > 64-bit world/kernel did boot. I hadn't tested it before acking the review request. This does appear to break everything for 32-bit PPC. Have you looked into why? Can this be reverted in the interim? -Nathan From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 05:08:53 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A81E106564A; Mon, 23 Apr 2012 05:08:53 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3018FC16; Mon, 23 Apr 2012 05:08:52 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q3N58hmu029151; Mon, 23 Apr 2012 07:08:46 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4F94E3DB.4000209@FreeBSD.org> Date: Mon, 23 Apr 2012 07:08:43 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Nathan Whitehorn References: <201204162136.q3GLaurU051667@svn.freebsd.org> <4F946D0C.9000900@FreeBSD.org> <4F94A864.1000401@freebsd.org> In-Reply-To: <4F94A864.1000401@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric Subject: Re: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 05:08:53 -0000 On 23.04.12 02:55, Nathan Whitehorn wrote: > On 04/22/12 15:41, Andreas Tobler wrote: >> On 16.04.12 23:36, Dimitry Andric wrote: >>> Author: dim >>> Date: Mon Apr 16 21:36:55 2012 >>> New Revision: 234356 >>> URL: http://svn.freebsd.org/changeset/base/234356 >>> >>> Log: >>> Work around an issue on 32-bit PowerPC, where clang executable can >>> get >>> too big, causing 'relocation truncated to fit' errors at link time. >>> >>> Reviewed by: nwhitehorn >> >> >> Did you build and boot a 32-bit world with gcc? >> >> I get an unusable install with this commit, every command segfaults. >> This is on a G5 SMP with 32-bit OS, gcc built. >> >> 64-bit world/kernel did boot. > > I hadn't tested it before acking the review request. This does appear to > break everything for 32-bit PPC. Have you looked into why? Can this be > reverted in the interim? I noticed this last night. It took some time to bisect. And my target is unbootable atm. I will investigate later this evening. Andreas From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 06:33:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE94B106566B; Mon, 23 Apr 2012 06:33:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C03D68FC08; Mon, 23 Apr 2012 06:33:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N6XRNR078598; Mon, 23 Apr 2012 06:33:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N6XRsB078594; Mon, 23 Apr 2012 06:33:27 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204230633.q3N6XRsB078594@svn.freebsd.org> From: Dimitry Andric Date: Mon, 23 Apr 2012 06:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234596 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 06:33:28 -0000 Author: dim Date: Mon Apr 23 06:33:27 2012 New Revision: 234596 URL: http://svn.freebsd.org/changeset/base/234596 Log: Revert r234356 for now, as it leads to run-time problems on 32-bit PowerPC. Note this will break world. Reported by: andreast Pointy hat to: dim Modified: head/gnu/lib/csu/Makefile head/lib/clang/clang.build.mk head/lib/csu/powerpc/Makefile Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Mon Apr 23 03:42:23 2012 (r234595) +++ head/gnu/lib/csu/Makefile Mon Apr 23 06:33:27 2012 (r234596) @@ -34,7 +34,6 @@ CFLAGS+= -include osreldate.h .if ${MACHINE_CPUARCH} == "powerpc" TGTOBJS= crtsavres.o SRCS+= crtsavres.asm -CFLAGS+= -mlongcall .endif .if ${MACHINE_CPUARCH} == "sparc64" TGTOBJS= crtfastmath.o Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Mon Apr 23 03:42:23 2012 (r234595) +++ head/lib/clang/clang.build.mk Mon Apr 23 06:33:27 2012 (r234596) @@ -11,12 +11,6 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG # LLVM is not strict aliasing safe as of 12/31/2011 CFLAGS+= -fno-strict-aliasing -# Work around an issue on 32-bit PowerPC, where the clang executable can get -# too big, causing 'relocation truncated to fit' errors at link time. -.if ${MACHINE_ARCH} == "powerpc" -CFLAGS+=-mlongcall -.endif - TARGET_ARCH?= ${MACHINE_ARCH} CFLAGS+=-DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\" Modified: head/lib/csu/powerpc/Makefile ============================================================================== --- head/lib/csu/powerpc/Makefile Mon Apr 23 03:42:23 2012 (r234595) +++ head/lib/csu/powerpc/Makefile Mon Apr 23 06:33:27 2012 (r234596) @@ -6,8 +6,7 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include \ - -mlongcall + -I${.CURDIR}/../../libc/include all: ${OBJS} From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 06:34:47 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E055C1065675; Mon, 23 Apr 2012 06:34:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 99F1B8FC16; Mon, 23 Apr 2012 06:34:47 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:60a9:25db:2120:9de1] (unknown [IPv6:2001:7b8:3a7:0:60a9:25db:2120:9de1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DE4525C37; Mon, 23 Apr 2012 08:34:46 +0200 (CEST) Message-ID: <4F94F807.5040209@FreeBSD.org> Date: Mon, 23 Apr 2012 08:34:47 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120410 Thunderbird/12.0 MIME-Version: 1.0 To: Nathan Whitehorn References: <201204162136.q3GLaurU051667@svn.freebsd.org> <4F946D0C.9000900@FreeBSD.org> <4F94A864.1000401@freebsd.org> In-Reply-To: <4F94A864.1000401@freebsd.org> X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andreas Tobler Subject: Re: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 06:34:48 -0000 On 2012-04-23 02:55, Nathan Whitehorn wrote: > On 04/22/12 15:41, Andreas Tobler wrote: >> On 16.04.12 23:36, Dimitry Andric wrote: >>> Author: dim >>> Date: Mon Apr 16 21:36:55 2012 >>> New Revision: 234356 >>> URL: http://svn.freebsd.org/changeset/base/234356 >>> >>> Log: >>> Work around an issue on 32-bit PowerPC, where clang executable can >>> get >>> too big, causing 'relocation truncated to fit' errors at link time. >>> >>> Reviewed by: nwhitehorn >> >> >> Did you build and boot a 32-bit world with gcc? >> >> I get an unusable install with this commit, every command segfaults. >> This is on a G5 SMP with 32-bit OS, gcc built. >> >> 64-bit world/kernel did boot. > > I hadn't tested it before acking the review request. This does appear to > break everything for 32-bit PPC. Have you looked into why? Can this be > reverted in the interim? Reverted in r234596. Sorry for the breakage. Now world won't build for powrpc, but WITHOUT_CLANG should solve that. From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 08:58:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96A531065670; Mon, 23 Apr 2012 08:58:02 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 822FE8FC0A; Mon, 23 Apr 2012 08:58:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N8w22a083137; Mon, 23 Apr 2012 08:58:02 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N8w2A8083134; Mon, 23 Apr 2012 08:58:02 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201204230858.q3N8w2A8083134@svn.freebsd.org> From: Fabien Thomas Date: Mon, 23 Apr 2012 08:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234598 - head/sys/dev/hwpmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 08:58:02 -0000 Author: fabient Date: Mon Apr 23 08:58:01 2012 New Revision: 234598 URL: http://svn.freebsd.org/changeset/base/234598 Log: Fix class malloc init for mips and powerpc that was not converted by r233628. Found by: monthadar, adrian MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_mips.c head/sys/dev/hwpmc/hwpmc_powerpc.c Modified: head/sys/dev/hwpmc/hwpmc_mips.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mips.c Mon Apr 23 07:15:15 2012 (r234597) +++ head/sys/dev/hwpmc/hwpmc_mips.c Mon Apr 23 08:58:01 2012 (r234598) @@ -431,11 +431,9 @@ pmc_mips_initialize() M_WAITOK|M_ZERO); /* Just one class */ - pmc_mdep = malloc(sizeof(struct pmc_mdep) + sizeof(struct pmc_classdep), - M_PMC, M_WAITOK|M_ZERO); + pmc_mdep = pmc_mdep_alloc(1); pmc_mdep->pmd_cputype = mips_pmc_spec.ps_cputype; - pmc_mdep->pmd_nclass = 1; pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_MIPS]; pcd->pcd_caps = mips_pmc_spec.ps_capabilities; Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Mon Apr 23 07:15:15 2012 (r234597) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Mon Apr 23 08:58:01 2012 (r234598) @@ -803,11 +803,9 @@ pmc_md_initialize() M_WAITOK|M_ZERO); /* Just one class */ - pmc_mdep = malloc(sizeof(struct pmc_mdep) + sizeof(struct pmc_classdep), - M_PMC, M_WAITOK|M_ZERO); + pmc_mdep = pmc_mdep_alloc(1); pmc_mdep->pmd_cputype = PMC_CPU_PPC_7450; - pmc_mdep->pmd_nclass = 1; pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_PPC7450]; pcd->pcd_caps = POWERPC_PMC_CAPS; From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 09:16:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 386FB106566B; Mon, 23 Apr 2012 09:16:57 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 239238FC0C; Mon, 23 Apr 2012 09:16:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N9GuvU083765; Mon, 23 Apr 2012 09:16:56 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N9GuLu083763; Mon, 23 Apr 2012 09:16:56 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201204230916.q3N9GuLu083763@svn.freebsd.org> From: Jeremie Le Hen Date: Mon, 23 Apr 2012 09:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234599 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 09:16:57 -0000 Author: jlh Date: Mon Apr 23 09:16:56 2012 New Revision: 234599 URL: http://svn.freebsd.org/changeset/base/234599 Log: Add my informations. Approved by: kib (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Mon Apr 23 08:58:01 2012 (r234598) +++ head/share/misc/committers-src.dot Mon Apr 23 09:16:56 2012 (r234599) @@ -169,6 +169,7 @@ jimharris [label="Jim Harris\njimharris@ jinmei [label="JINMEI Tatuya\njinmei@FreeBSD.org\n2007/03/17"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2005/07/06"] jkoshy [label="A. Joseph Koshy\njkoshy@FreeBSD.org\n1998/05/13"] +jlh [label="Jeremie Le Hen\njlh@FreeBSD.org\n2012/04/22"] jls [label="Jordan Sissel\njls@FreeBSD.org\n2006/12/06"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] @@ -462,6 +463,7 @@ kan -> kib kib -> ae kib -> dchagin +kib -> jlh kib -> jpaetzel kib -> lulf kib -> melifaro From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 09:18:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C58CE1065672; Mon, 23 Apr 2012 09:18:05 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEA388FC0C; Mon, 23 Apr 2012 09:18:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N9I5Q8083851; Mon, 23 Apr 2012 09:18:05 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N9I51a083848; Mon, 23 Apr 2012 09:18:05 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201204230918.q3N9I51a083848@svn.freebsd.org> From: Jeremie Le Hen Date: Mon, 23 Apr 2012 09:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234600 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 09:18:05 -0000 Author: jlh Date: Mon Apr 23 09:18:05 2012 New Revision: 234600 URL: http://svn.freebsd.org/changeset/base/234600 Log: Add my birthday and place of birth. Approved by: kib (mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Apr 23 09:16:56 2012 (r234599) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Apr 23 09:18:05 2012 (r234600) @@ -316,6 +316,7 @@ 11/09 Antoine Brodin born in Bagnolet, France, 1981 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 11/13 John Baldwin born in Stuart, Virginia, United States, 1977 +11/14 Jeremie Le Hen born in Nancy, France, 1980 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 11/15 Tijl Coosemans born in Duffel, Belgium, 1983 11/16 Jose Maria Alcaide Salinas born in Madrid, Spain, 1962 From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 09:39:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 342BD1065672; Mon, 23 Apr 2012 09:39:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 061248FC17; Mon, 23 Apr 2012 09:39:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N9ddB7085432; Mon, 23 Apr 2012 09:39:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N9ddbI085426; Mon, 23 Apr 2012 09:39:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204230939.q3N9ddbI085426@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Apr 2012 09:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234601 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 09:39:40 -0000 Author: mav Date: Mon Apr 23 09:39:39 2012 New Revision: 234601 URL: http://svn.freebsd.org/changeset/base/234601 Log: Add sos@ copyrights to RAID metadata modules, respecting his efforts in decoding metadata formats in ataraid(4) code. Modified: head/sys/geom/raid/md_intel.c head/sys/geom/raid/md_jmicron.c head/sys/geom/raid/md_nvidia.c head/sys/geom/raid/md_promise.c head/sys/geom/raid/md_sii.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_intel.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2010 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/raid/md_jmicron.c ============================================================================== --- head/sys/geom/raid/md_jmicron.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_jmicron.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2010 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/raid/md_nvidia.c ============================================================================== --- head/sys/geom/raid/md_nvidia.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_nvidia.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_promise.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/raid/md_sii.c ============================================================================== --- head/sys/geom/raid/md_sii.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_sii.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 13:04:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B11B5106564A; Mon, 23 Apr 2012 13:04:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1DF8FC0C; Mon, 23 Apr 2012 13:04:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3ND43Qi098753; Mon, 23 Apr 2012 13:04:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3ND43Yg098748; Mon, 23 Apr 2012 13:04:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204231304.q3ND43Yg098748@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Apr 2012 13:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 13:04:03 -0000 Author: mav Date: Mon Apr 23 13:04:02 2012 New Revision: 234603 URL: http://svn.freebsd.org/changeset/base/234603 Log: Add names for all primary RAID levels defined by DDF 2.0 specification. Modified: head/sys/geom/raid/g_raid.c head/sys/geom/raid/g_raid.h head/sys/geom/raid/tr_raid1.c head/sys/geom/raid/tr_raid1e.c Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Mon Apr 23 12:18:38 2012 (r234602) +++ head/sys/geom/raid/g_raid.c Mon Apr 23 13:04:02 2012 (r234603) @@ -277,31 +277,87 @@ g_raid_volume_level2str(int level, int q case G_RAID_VOLUME_RL_RAID1: return ("RAID1"); case G_RAID_VOLUME_RL_RAID3: + if (qual == G_RAID_VOLUME_RLQ_R3P0) + return ("RAID3-P0"); + if (qual == G_RAID_VOLUME_RLQ_R3PN) + return ("RAID3-PN"); return ("RAID3"); case G_RAID_VOLUME_RL_RAID4: + if (qual == G_RAID_VOLUME_RLQ_R4P0) + return ("RAID3-P0"); + if (qual == G_RAID_VOLUME_RLQ_R4PN) + return ("RAID3-PN"); return ("RAID4"); case G_RAID_VOLUME_RL_RAID5: if (qual == G_RAID_VOLUME_RLQ_R5RA) - return ("RAID5RA"); + return ("RAID5-RA"); if (qual == G_RAID_VOLUME_RLQ_R5RS) - return ("RAID5RS"); + return ("RAID5-RS"); if (qual == G_RAID_VOLUME_RLQ_R5LA) - return ("RAID5LA"); + return ("RAID5-LA"); if (qual == G_RAID_VOLUME_RLQ_R5LS) - return ("RAID5LS"); + return ("RAID5-LS"); return ("RAID5"); case G_RAID_VOLUME_RL_RAID6: + if (qual == G_RAID_VOLUME_RLQ_R6RA) + return ("RAID6-RA"); + if (qual == G_RAID_VOLUME_RLQ_R6RS) + return ("RAID6-RS"); + if (qual == G_RAID_VOLUME_RLQ_R6LA) + return ("RAID6-LA"); + if (qual == G_RAID_VOLUME_RLQ_R6LS) + return ("RAID6-LS"); return ("RAID6"); + case G_RAID_VOLUME_RL_RAIDMDF: + if (qual == G_RAID_VOLUME_RLQ_RMDFRA) + return ("RAIDMDF-RA"); + if (qual == G_RAID_VOLUME_RLQ_RMDFRS) + return ("RAIDMDF-RS"); + if (qual == G_RAID_VOLUME_RLQ_RMDFLA) + return ("RAIDMDF-LA"); + if (qual == G_RAID_VOLUME_RLQ_RMDFLS) + return ("RAIDMDF-LS"); + return ("RAIDMDF"); case G_RAID_VOLUME_RL_RAID1E: + if (qual == G_RAID_VOLUME_RLQ_R1EA) + return ("RAID1E-A"); + if (qual == G_RAID_VOLUME_RLQ_R1EO) + return ("RAID1E-O"); return ("RAID1E"); case G_RAID_VOLUME_RL_SINGLE: return ("SINGLE"); case G_RAID_VOLUME_RL_CONCAT: return ("CONCAT"); case G_RAID_VOLUME_RL_RAID5E: + if (qual == G_RAID_VOLUME_RLQ_R5ERA) + return ("RAID5E-RA"); + if (qual == G_RAID_VOLUME_RLQ_R5ERS) + return ("RAID5E-RS"); + if (qual == G_RAID_VOLUME_RLQ_R5ELA) + return ("RAID5E-LA"); + if (qual == G_RAID_VOLUME_RLQ_R5ELS) + return ("RAID5E-LS"); return ("RAID5E"); case G_RAID_VOLUME_RL_RAID5EE: + if (qual == G_RAID_VOLUME_RLQ_R5EERA) + return ("RAID5EE-RA"); + if (qual == G_RAID_VOLUME_RLQ_R5EERS) + return ("RAID5EE-RS"); + if (qual == G_RAID_VOLUME_RLQ_R5EELA) + return ("RAID5EE-LA"); + if (qual == G_RAID_VOLUME_RLQ_R5EELS) + return ("RAID5EE-LS"); return ("RAID5EE"); + case G_RAID_VOLUME_RL_RAID5R: + if (qual == G_RAID_VOLUME_RLQ_R5RRA) + return ("RAID5R-RA"); + if (qual == G_RAID_VOLUME_RLQ_R5RRS) + return ("RAID5R-RS"); + if (qual == G_RAID_VOLUME_RLQ_R5RLA) + return ("RAID5R-LA"); + if (qual == G_RAID_VOLUME_RLQ_R5RLS) + return ("RAID5R-LS"); + return ("RAID5E"); default: return ("UNKNOWN"); } @@ -317,37 +373,111 @@ g_raid_volume_str2level(const char *str, *level = G_RAID_VOLUME_RL_RAID0; else if (strcasecmp(str, "RAID1") == 0) *level = G_RAID_VOLUME_RL_RAID1; - else if (strcasecmp(str, "RAID3") == 0) + else if (strcasecmp(str, "RAID3-P0") == 0) { + *level = G_RAID_VOLUME_RL_RAID3; + *qual = G_RAID_VOLUME_RLQ_R3P0; + } else if (strcasecmp(str, "RAID3-PN") == 0 && + strcasecmp(str, "RAID3") == 0) { *level = G_RAID_VOLUME_RL_RAID3; - else if (strcasecmp(str, "RAID4") == 0) + *qual = G_RAID_VOLUME_RLQ_R3P0; + } else if (strcasecmp(str, "RAID4-P0") == 0) { *level = G_RAID_VOLUME_RL_RAID4; - else if (strcasecmp(str, "RAID5RA") == 0) { + *qual = G_RAID_VOLUME_RLQ_R4P0; + } else if (strcasecmp(str, "RAID4-PN") == 0 && + strcasecmp(str, "RAID4") == 0) { + *level = G_RAID_VOLUME_RL_RAID4; + *qual = G_RAID_VOLUME_RLQ_R4P0; + } else if (strcasecmp(str, "RAID5-RA") == 0) { *level = G_RAID_VOLUME_RL_RAID5; *qual = G_RAID_VOLUME_RLQ_R5RA; - } else if (strcasecmp(str, "RAID5RS") == 0) { + } else if (strcasecmp(str, "RAID5-RS") == 0) { *level = G_RAID_VOLUME_RL_RAID5; *qual = G_RAID_VOLUME_RLQ_R5RS; } else if (strcasecmp(str, "RAID5") == 0 || - strcasecmp(str, "RAID5LA") == 0) { + strcasecmp(str, "RAID5-LA") == 0) { *level = G_RAID_VOLUME_RL_RAID5; *qual = G_RAID_VOLUME_RLQ_R5LA; - } else if (strcasecmp(str, "RAID5LS") == 0) { + } else if (strcasecmp(str, "RAID5-LS") == 0) { *level = G_RAID_VOLUME_RL_RAID5; *qual = G_RAID_VOLUME_RLQ_R5LS; - } else if (strcasecmp(str, "RAID6") == 0) + } else if (strcasecmp(str, "RAID6-RA") == 0) { + *level = G_RAID_VOLUME_RL_RAID6; + *qual = G_RAID_VOLUME_RLQ_R6RA; + } else if (strcasecmp(str, "RAID6-RS") == 0) { *level = G_RAID_VOLUME_RL_RAID6; - else if (strcasecmp(str, "RAID10") == 0 || - strcasecmp(str, "RAID1E") == 0) + *qual = G_RAID_VOLUME_RLQ_R6RS; + } else if (strcasecmp(str, "RAID6") == 0 || + strcasecmp(str, "RAID6-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAID6; + *qual = G_RAID_VOLUME_RLQ_R6LA; + } else if (strcasecmp(str, "RAID6-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAID6; + *qual = G_RAID_VOLUME_RLQ_R6LS; + } else if (strcasecmp(str, "RAIDMDF-RA") == 0) { + *level = G_RAID_VOLUME_RL_RAIDMDF; + *qual = G_RAID_VOLUME_RLQ_RMDFRA; + } else if (strcasecmp(str, "RAIDMDF-RS") == 0) { + *level = G_RAID_VOLUME_RL_RAIDMDF; + *qual = G_RAID_VOLUME_RLQ_RMDFRS; + } else if (strcasecmp(str, "RAIDMDF") == 0 || + strcasecmp(str, "RAIDMDF-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAIDMDF; + *qual = G_RAID_VOLUME_RLQ_RMDFLA; + } else if (strcasecmp(str, "RAIDMDF-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAIDMDF; + *qual = G_RAID_VOLUME_RLQ_RMDFLS; + } else if (strcasecmp(str, "RAID10") == 0 || + strcasecmp(str, "RAID1E") == 0 || + strcasecmp(str, "RAID1E-A") == 0) { *level = G_RAID_VOLUME_RL_RAID1E; - else if (strcasecmp(str, "SINGLE") == 0) + *qual = G_RAID_VOLUME_RLQ_R1EA; + } else if (strcasecmp(str, "RAID1E-O") == 0) { + *level = G_RAID_VOLUME_RL_RAID1E; + *qual = G_RAID_VOLUME_RLQ_R1EO; + } else if (strcasecmp(str, "SINGLE") == 0) *level = G_RAID_VOLUME_RL_SINGLE; else if (strcasecmp(str, "CONCAT") == 0) *level = G_RAID_VOLUME_RL_CONCAT; - else if (strcasecmp(str, "RAID5E") == 0) + else if (strcasecmp(str, "RAID5E-RA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5E; + *qual = G_RAID_VOLUME_RLQ_R5ERA; + } else if (strcasecmp(str, "RAID5E-RS") == 0) { *level = G_RAID_VOLUME_RL_RAID5E; - else if (strcasecmp(str, "RAID5EE") == 0) + *qual = G_RAID_VOLUME_RLQ_R5ERS; + } else if (strcasecmp(str, "RAID5E") == 0 || + strcasecmp(str, "RAID5E-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5E; + *qual = G_RAID_VOLUME_RLQ_R5ELA; + } else if (strcasecmp(str, "RAID5E-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5E; + *qual = G_RAID_VOLUME_RLQ_R5ELS; + } else if (strcasecmp(str, "RAID5EE-RA") == 0) { *level = G_RAID_VOLUME_RL_RAID5EE; - else + *qual = G_RAID_VOLUME_RLQ_R5EERA; + } else if (strcasecmp(str, "RAID5EE-RS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5EE; + *qual = G_RAID_VOLUME_RLQ_R5EERS; + } else if (strcasecmp(str, "RAID5EE") == 0 || + strcasecmp(str, "RAID5EE-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5EE; + *qual = G_RAID_VOLUME_RLQ_R5EELA; + } else if (strcasecmp(str, "RAID5EE-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5EE; + *qual = G_RAID_VOLUME_RLQ_R5EELS; + } else if (strcasecmp(str, "RAID5R-RA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5R; + *qual = G_RAID_VOLUME_RLQ_R5RRA; + } else if (strcasecmp(str, "RAID5R-RS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5R; + *qual = G_RAID_VOLUME_RLQ_R5RRS; + } else if (strcasecmp(str, "RAID5R") == 0 || + strcasecmp(str, "RAID5R-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5R; + *qual = G_RAID_VOLUME_RLQ_R5RLA; + } else if (strcasecmp(str, "RAID5R-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5R; + *qual = G_RAID_VOLUME_RLQ_R5RLS; + } else return (-1); return (0); } Modified: head/sys/geom/raid/g_raid.h ============================================================================== --- head/sys/geom/raid/g_raid.h Mon Apr 23 12:18:38 2012 (r234602) +++ head/sys/geom/raid/g_raid.h Mon Apr 23 13:04:02 2012 (r234603) @@ -219,18 +219,48 @@ struct g_raid_subdisk { #define G_RAID_VOLUME_RL_RAID4 0x04 #define G_RAID_VOLUME_RL_RAID5 0x05 #define G_RAID_VOLUME_RL_RAID6 0x06 +#define G_RAID_VOLUME_RL_RAIDMDF 0x07 #define G_RAID_VOLUME_RL_RAID1E 0x11 #define G_RAID_VOLUME_RL_SINGLE 0x0f #define G_RAID_VOLUME_RL_CONCAT 0x1f #define G_RAID_VOLUME_RL_RAID5E 0x15 #define G_RAID_VOLUME_RL_RAID5EE 0x25 +#define G_RAID_VOLUME_RL_RAID5R 0x35 #define G_RAID_VOLUME_RL_UNKNOWN 0xff #define G_RAID_VOLUME_RLQ_NONE 0x00 +#define G_RAID_VOLUME_RLQ_R1SM 0x00 +#define G_RAID_VOLUME_RLQ_R1MM 0x01 +#define G_RAID_VOLUME_RLQ_R3P0 0x00 +#define G_RAID_VOLUME_RLQ_R3PN 0x01 +#define G_RAID_VOLUME_RLQ_R4P0 0x00 +#define G_RAID_VOLUME_RLQ_R4PN 0x01 #define G_RAID_VOLUME_RLQ_R5RA 0x00 #define G_RAID_VOLUME_RLQ_R5RS 0x01 #define G_RAID_VOLUME_RLQ_R5LA 0x02 #define G_RAID_VOLUME_RLQ_R5LS 0x03 +#define G_RAID_VOLUME_RLQ_R6RA 0x00 +#define G_RAID_VOLUME_RLQ_R6RS 0x01 +#define G_RAID_VOLUME_RLQ_R6LA 0x02 +#define G_RAID_VOLUME_RLQ_R6LS 0x03 +#define G_RAID_VOLUME_RLQ_RMDFRA 0x00 +#define G_RAID_VOLUME_RLQ_RMDFRS 0x01 +#define G_RAID_VOLUME_RLQ_RMDFLA 0x02 +#define G_RAID_VOLUME_RLQ_RMDFLS 0x03 +#define G_RAID_VOLUME_RLQ_R1EA 0x00 +#define G_RAID_VOLUME_RLQ_R1EO 0x01 +#define G_RAID_VOLUME_RLQ_R5ERA 0x00 +#define G_RAID_VOLUME_RLQ_R5ERS 0x01 +#define G_RAID_VOLUME_RLQ_R5ELA 0x02 +#define G_RAID_VOLUME_RLQ_R5ELS 0x03 +#define G_RAID_VOLUME_RLQ_R5EERA 0x00 +#define G_RAID_VOLUME_RLQ_R5EERS 0x01 +#define G_RAID_VOLUME_RLQ_R5EELA 0x02 +#define G_RAID_VOLUME_RLQ_R5EELS 0x03 +#define G_RAID_VOLUME_RLQ_R5RRA 0x00 +#define G_RAID_VOLUME_RLQ_R5RRS 0x01 +#define G_RAID_VOLUME_RLQ_R5RLA 0x02 +#define G_RAID_VOLUME_RLQ_R5RLS 0x03 #define G_RAID_VOLUME_RLQ_UNKNOWN 0xff struct g_raid_volume; Modified: head/sys/geom/raid/tr_raid1.c ============================================================================== --- head/sys/geom/raid/tr_raid1.c Mon Apr 23 12:18:38 2012 (r234602) +++ head/sys/geom/raid/tr_raid1.c Mon Apr 23 13:04:02 2012 (r234603) @@ -145,7 +145,8 @@ g_raid_tr_taste_raid1(struct g_raid_tr_o trs = (struct g_raid_tr_raid1_object *)tr; if (tr->tro_volume->v_raid_level != G_RAID_VOLUME_RL_RAID1 || - tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_NONE) + (tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_R1SM && + tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_R1MM)) return (G_RAID_TR_TASTE_FAIL); trs->trso_starting = 1; return (G_RAID_TR_TASTE_SUCCEED); Modified: head/sys/geom/raid/tr_raid1e.c ============================================================================== --- head/sys/geom/raid/tr_raid1e.c Mon Apr 23 12:18:38 2012 (r234602) +++ head/sys/geom/raid/tr_raid1e.c Mon Apr 23 13:04:02 2012 (r234603) @@ -187,7 +187,7 @@ g_raid_tr_taste_raid1e(struct g_raid_tr_ trs = (struct g_raid_tr_raid1e_object *)tr; if (tr->tro_volume->v_raid_level != G_RAID_VOLUME_RL_RAID1E || - tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_NONE) + tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_R1EA) return (G_RAID_TR_TASTE_FAIL); trs->trso_starting = 1; return (G_RAID_TR_TASTE_SUCCEED); From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 13:21:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C9DA106564A; Mon, 23 Apr 2012 13:21:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3347C8FC0C; Mon, 23 Apr 2012 13:21:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NDLTjk099383; Mon, 23 Apr 2012 13:21:29 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NDLS5O099364; Mon, 23 Apr 2012 13:21:28 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231321.q3NDLS5O099364@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 13:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234605 - in head/sys: fs/ext2fs fs/hpfs fs/msdosfs fs/nfsclient kern nfsclient sys ufs/ffs ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 13:21:29 -0000 Author: trasz Date: Mon Apr 23 13:21:28 2012 New Revision: 234605 URL: http://svn.freebsd.org/changeset/base/234605 Log: Remove unused thread argument from vtruncbuf(). Reviewed by: kib Modified: head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/hpfs/hpfs_vnops.c head/sys/fs/msdosfs/denode.h head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/msdosfs/msdosfs_lookup.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/nfsclient/nfs_clbio.c head/sys/kern/vfs_subr.c head/sys/nfsclient/nfs_bio.c head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_extern.h head/sys/ufs/ffs/ffs_inode.c head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_vnops.c head/sys/ufs/ufs/ufs_inode.c head/sys/ufs/ufs/ufs_lookup.c head/sys/ufs/ufs/ufs_vnops.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/ext2fs/ext2_inode.c Mon Apr 23 13:21:28 2012 (r234605) @@ -249,7 +249,7 @@ ext2_truncate(vp, length, flags, cred, t bcopy((caddr_t)&oip->i_db[0], (caddr_t)newblks, sizeof(newblks)); bcopy((caddr_t)oldblks, (caddr_t)&oip->i_db[0], sizeof(oldblks)); oip->i_size = osize; - error = vtruncbuf(ovp, cred, td, length, (int)fs->e2fs_bsize); + error = vtruncbuf(ovp, cred, length, (int)fs->e2fs_bsize); if (error && (allerror == 0)) allerror = error; vnode_pager_setsize(ovp, length); Modified: head/sys/fs/hpfs/hpfs_vnops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vnops.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/hpfs/hpfs_vnops.c Mon Apr 23 13:21:28 2012 (r234605) @@ -528,7 +528,7 @@ hpfs_setattr(ap) } if (vap->va_size < hp->h_fn.fn_size) { - error = vtruncbuf(vp, cred, td, vap->va_size, DEV_BSIZE); + error = vtruncbuf(vp, cred, vap->va_size, DEV_BSIZE); if (error) return (error); error = hpfs_truncate(hp, vap->va_size); Modified: head/sys/fs/msdosfs/denode.h ============================================================================== --- head/sys/fs/msdosfs/denode.h Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/msdosfs/denode.h Mon Apr 23 13:21:28 2012 (r234605) @@ -276,6 +276,6 @@ int dosdirempty(struct denode *dep); int createde(struct denode *dep, struct denode *ddep, struct denode **depp, struct componentname *cnp); int deupdat(struct denode *dep, int waitfor); int removede(struct denode *pdep, struct denode *dep); -int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred, struct thread *td); +int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred); int doscheckpath( struct denode *source, struct denode *target); #endif /* _KERNEL */ Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/msdosfs/msdosfs_denode.c Mon Apr 23 13:21:28 2012 (r234605) @@ -326,12 +326,11 @@ deupdat(dep, waitfor) * Truncate the file described by dep to the length specified by length. */ int -detrunc(dep, length, flags, cred, td) +detrunc(dep, length, flags, cred) struct denode *dep; u_long length; int flags; struct ucred *cred; - struct thread *td; { int error; int allerror; @@ -426,7 +425,7 @@ detrunc(dep, length, flags, cred, td) dep->de_FileSize = length; if (!isadir) dep->de_flag |= DE_UPDATE | DE_MODIFIED; - allerror = vtruncbuf(DETOV(dep), cred, td, length, pmp->pm_bpcluster); + allerror = vtruncbuf(DETOV(dep), cred, length, pmp->pm_bpcluster); #ifdef MSDOSFS_DEBUG if (allerror) printf("detrunc(): vtruncbuf error %d\n", allerror); @@ -504,7 +503,7 @@ deextend(dep, length, cred) error = extendfile(dep, count, NULL, NULL, DE_CLEAR); if (error) { /* truncate the added clusters away again */ - (void) detrunc(dep, dep->de_FileSize, 0, cred, NULL); + (void) detrunc(dep, dep->de_FileSize, 0, cred); return (error); } } @@ -607,7 +606,7 @@ msdosfs_inactive(ap) dep, dep->de_refcnt, vp->v_mount->mnt_flag, MNT_RDONLY); #endif if (dep->de_refcnt <= 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) == 0) { - error = detrunc(dep, (u_long) 0, 0, NOCRED, td); + error = detrunc(dep, (u_long) 0, 0, NOCRED); dep->de_flag |= DE_UPDATE; dep->de_Name[0] = SLOT_DELETED; } Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Mon Apr 23 13:21:28 2012 (r234605) @@ -649,7 +649,7 @@ createde(dep, ddep, depp, cnp) dirclust = de_clcount(pmp, diroffset); error = extendfile(ddep, dirclust, 0, 0, DE_CLEAR); if (error) { - (void)detrunc(ddep, ddep->de_FileSize, 0, NOCRED, NULL); + (void)detrunc(ddep, ddep->de_FileSize, 0, NOCRED); return error; } Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Mon Apr 23 13:21:28 2012 (r234605) @@ -476,7 +476,7 @@ msdosfs_setattr(ap) */ break; } - error = detrunc(dep, vap->va_size, 0, cred, td); + error = detrunc(dep, vap->va_size, 0, cred); if (error) return error; } @@ -835,11 +835,11 @@ msdosfs_write(ap) errexit: if (error) { if (ioflag & IO_UNIT) { - detrunc(dep, osize, ioflag & IO_SYNC, NOCRED, NULL); + detrunc(dep, osize, ioflag & IO_SYNC, NOCRED); uio->uio_offset -= resid - uio->uio_resid; uio->uio_resid = resid; } else { - detrunc(dep, dep->de_FileSize, ioflag & IO_SYNC, NOCRED, NULL); + detrunc(dep, dep->de_FileSize, ioflag & IO_SYNC, NOCRED); if (uio->uio_resid != resid) error = 0; } @@ -1429,7 +1429,6 @@ msdosfs_rmdir(ap) struct vnode *dvp = ap->a_dvp; struct componentname *cnp = ap->a_cnp; struct denode *ip, *dp; - struct thread *td = cnp->cn_thread; int error; ip = VTODE(vp); @@ -1467,7 +1466,7 @@ msdosfs_rmdir(ap) /* * Truncate the directory that is being deleted. */ - error = detrunc(ip, (u_long)0, IO_SYNC, cnp->cn_cred, td); + error = detrunc(ip, (u_long)0, IO_SYNC, cnp->cn_cred); cache_purge(vp); out: Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/nfsclient/nfs_clbio.c Mon Apr 23 13:21:28 2012 (r234605) @@ -1817,7 +1817,7 @@ ncl_meta_setsize(struct vnode *vp, struc * truncation point. We may have a B_DELWRI and/or B_CACHE * buffer that now needs to be truncated. */ - error = vtruncbuf(vp, cred, td, nsize, biosize); + error = vtruncbuf(vp, cred, nsize, biosize); lbn = nsize / biosize; bufsize = nsize & (biosize - 1); bp = nfs_getcacheblk(vp, lbn, bufsize, td); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/kern/vfs_subr.c Mon Apr 23 13:21:28 2012 (r234605) @@ -1327,8 +1327,7 @@ flushbuflist(struct bufv *bufv, int flag * sync activity. */ int -vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td, - off_t length, int blksize) +vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length, int blksize) { struct buf *bp, *nbp; int anyfreed; Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/nfsclient/nfs_bio.c Mon Apr 23 13:21:28 2012 (r234605) @@ -1796,7 +1796,7 @@ nfs_meta_setsize(struct vnode *vp, struc * truncation point. We may have a B_DELWRI and/or B_CACHE * buffer that now needs to be truncated. */ - error = vtruncbuf(vp, cred, td, nsize, biosize); + error = vtruncbuf(vp, cred, nsize, biosize); lbn = nsize / biosize; bufsize = nsize & (biosize - 1); bp = nfs_getcacheblk(vp, lbn, bufsize, td); Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/sys/vnode.h Mon Apr 23 13:21:28 2012 (r234605) @@ -634,8 +634,8 @@ void vhold(struct vnode *); void vholdl(struct vnode *); void vinactive(struct vnode *, struct thread *); int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); -int vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td, - off_t length, int blksize); +int vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length, + int blksize); void vunref(struct vnode *); void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3); #define vprint(label, vp) vn_printf((vp), "%s\n", (label)) Modified: head/sys/ufs/ffs/ffs_extern.h ============================================================================== --- head/sys/ufs/ffs/ffs_extern.h Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ffs/ffs_extern.h Mon Apr 23 13:21:28 2012 (r234605) @@ -93,7 +93,7 @@ void ffs_snapshot_unmount(struct mount * void process_deferred_inactive(struct mount *mp); void ffs_sync_snap(struct mount *, int); int ffs_syncvnode(struct vnode *vp, int waitfor, int flags); -int ffs_truncate(struct vnode *, off_t, int, struct ucred *, struct thread *); +int ffs_truncate(struct vnode *, off_t, int, struct ucred *); int ffs_update(struct vnode *, int); int ffs_valloc(struct vnode *, int, struct ucred *, struct vnode **); Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ffs/ffs_inode.c Mon Apr 23 13:21:28 2012 (r234605) @@ -170,12 +170,11 @@ loop: * disk blocks. */ int -ffs_truncate(vp, length, flags, cred, td) +ffs_truncate(vp, length, flags, cred) struct vnode *vp; off_t length; int flags; struct ucred *cred; - struct thread *td; { struct inode *ip; ufs2_daddr_t bn, lbn, lastblock, lastiblock[NIADDR], indir_lbn[NIADDR]; @@ -449,7 +448,7 @@ ffs_truncate(vp, length, flags, cred, td ip->i_size = osize; DIP_SET(ip, i_size, osize); - error = vtruncbuf(vp, cred, td, length, fs->fs_bsize); + error = vtruncbuf(vp, cred, length, fs->fs_bsize); if (error && (allerror == 0)) allerror = error; Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ffs/ffs_snapshot.c Mon Apr 23 13:21:28 2012 (r234605) @@ -850,7 +850,7 @@ out: mp->mnt_flag = (mp->mnt_flag & MNT_QUOTA) | (flag & ~MNT_QUOTA); MNT_IUNLOCK(mp); if (error) - (void) ffs_truncate(vp, (off_t)0, 0, NOCRED, td); + (void) ffs_truncate(vp, (off_t)0, 0, NOCRED); (void) ffs_syncvnode(vp, MNT_WAIT, 0); if (error) vput(vp); @@ -1989,7 +1989,7 @@ ffs_snapshot_mount(mp) reason = "non-snapshot"; } else { reason = "old format snapshot"; - (void)ffs_truncate(vp, (off_t)0, 0, NOCRED, td); + (void)ffs_truncate(vp, (off_t)0, 0, NOCRED); (void)ffs_syncvnode(vp, MNT_WAIT, 0); } printf("ffs_snapshot_mount: %s inode %d\n", Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ffs/ffs_vnops.c Mon Apr 23 13:21:28 2012 (r234605) @@ -812,8 +812,7 @@ ffs_write(ap) if (error) { if (ioflag & IO_UNIT) { (void)ffs_truncate(vp, osize, - IO_NORMAL | (ioflag & IO_SYNC), - ap->a_cred, uio->uio_td); + IO_NORMAL | (ioflag & IO_SYNC), ap->a_cred); uio->uio_offset -= resid - uio->uio_resid; uio->uio_resid = resid; } @@ -1135,7 +1134,7 @@ ffs_extwrite(struct vnode *vp, struct ui if (error) { if (ioflag & IO_UNIT) { (void)ffs_truncate(vp, osize, - IO_EXT | (ioflag&IO_SYNC), ucred, uio->uio_td); + IO_EXT | (ioflag&IO_SYNC), ucred); uio->uio_offset -= resid - uio->uio_resid; uio->uio_resid = resid; } @@ -1326,7 +1325,7 @@ ffs_close_ea(struct vnode *vp, int commi luio.uio_td = td; /* XXX: I'm not happy about truncating to zero size */ if (ip->i_ea_len < dp->di_extsize) - error = ffs_truncate(vp, 0, IO_EXT, cred, td); + error = ffs_truncate(vp, 0, IO_EXT, cred); error = ffs_extwrite(vp, &luio, IO_EXT | IO_SYNC, cred); } if (--ip->i_ea_refs == 0) { Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 13:21:28 2012 (r234605) @@ -129,8 +129,7 @@ ufs_inactive(ap) if (ip->i_ump->um_fstype == UFS2) isize += ip->i_din2->di_extsize; if (ip->i_effnlink <= 0 && isize && !UFS_RDONLY(ip)) - error = UFS_TRUNCATE(vp, (off_t)0, IO_EXT | IO_NORMAL, - NOCRED, td); + error = UFS_TRUNCATE(vp, (off_t)0, IO_EXT | IO_NORMAL, NOCRED); if (ip->i_nlink <= 0 && ip->i_mode && !UFS_RDONLY(ip)) { #ifdef QUOTA if (!getinoquota(ip)) Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ufs/ufs_lookup.c Mon Apr 23 13:21:28 2012 (r234605) @@ -1133,7 +1133,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir ufsdirhash_dirtrunc(dp, dp->i_endoff); #endif (void) UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, - IO_NORMAL | IO_SYNC, cr, td); + IO_NORMAL | IO_SYNC, cr); if (tvp != NULL) vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY); } Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Apr 23 13:21:28 2012 (r234605) @@ -621,7 +621,7 @@ ufs_setattr(ap) return (0); } if ((error = UFS_TRUNCATE(vp, vap->va_size, IO_NORMAL, - cred, td)) != 0) + cred)) != 0) return (error); } if (vap->va_atime.tv_sec != VNOVAL || @@ -1567,8 +1567,7 @@ unlockout: if (tdp->i_dirhash != NULL) ufsdirhash_dirtrunc(tdp, endoff); #endif - UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred, - td); + UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred); } if (error == 0 && tdp->i_flag & IN_NEEDSYNC) error = VOP_FSYNC(tdvp, MNT_WAIT, td); Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ufs/ufsmount.h Mon Apr 23 13:21:28 2012 (r234605) @@ -100,7 +100,7 @@ struct ufsmount { int um_candelete; /* devvp supports TRIM */ int (*um_balloc)(struct vnode *, off_t, int, struct ucred *, int, struct buf **); int (*um_blkatoff)(struct vnode *, off_t, char **, struct buf **); - int (*um_truncate)(struct vnode *, off_t, int, struct ucred *, struct thread *); + int (*um_truncate)(struct vnode *, off_t, int, struct ucred *); int (*um_update)(struct vnode *, int); int (*um_valloc)(struct vnode *, int, struct ucred *, struct vnode **); int (*um_vfree)(struct vnode *, ino_t, int); @@ -111,7 +111,7 @@ struct ufsmount { #define UFS_BALLOC(aa, bb, cc, dd, ee, ff) VFSTOUFS((aa)->v_mount)->um_balloc(aa, bb, cc, dd, ee, ff) #define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd) -#define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee) +#define UFS_TRUNCATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd) #define UFS_UPDATE(aa, bb) VFSTOUFS((aa)->v_mount)->um_update(aa, bb) #define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd) #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc) From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 13:23:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0031C1065674; Mon, 23 Apr 2012 13:23:26 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6374A8FC15; Mon, 23 Apr 2012 13:23:26 +0000 (UTC) Received: by qcsg15 with SMTP id g15so8295460qcs.13 for ; Mon, 23 Apr 2012 06:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=ZizSvRyk3q1aW+K3HB0MgPw12XTulQUZrjAWZ6JXb4s=; b=m1bQggWPyir5yI5I0aOPQI4ZFYq4RN35P7r/wc353UpXMhAZ+epidhL1R8QxO8wVV2 pQ/B8NIHJmPWZE80oNeb1t+Rrn1yG3SUdNTsm9JoM/qFI/LDmKOBKsTxjjLH6GH/AbSm Cm3Y9up/I3PHuP/j96fMkhX2STotEq0Bi+HJw6xRnocW9r63E//7IUVKCwfCuuO0Q44g 3bujSGfsCFC4ifZXGCpEYvA9R9dR4BGAAttSU5Mns0VoeGfNzA9CBwPD76DKicQF7sli tE6svAVHNCjQW6qmAxHlGp7bCFo/+U8JaInHYsl0xNFmb8vvFQIbhfGO7fj7DBGuXUIh 7eGw== Received: by 10.224.202.193 with SMTP id ff1mr13713793qab.36.1335187400371; Mon, 23 Apr 2012 06:23:20 -0700 (PDT) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id o7sm21663757qan.15.2012.04.23.06.23.18 (version=SSLv3 cipher=OTHER); Mon, 23 Apr 2012 06:23:18 -0700 (PDT) Date: Mon, 23 Apr 2012 09:23:11 -0400 From: Alexander Kabaev To: Alexander Motin Message-ID: <20120423092311.2be21b71@kan.dyndns.org> In-Reply-To: <201204231304.q3ND43Yg098748@svn.freebsd.org> References: <201204231304.q3ND43Yg098748@svn.freebsd.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/8kjeteoBYR9yJQpiR8+3/Nf"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 13:23:27 -0000 --Sig_/8kjeteoBYR9yJQpiR8+3/Nf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 23 Apr 2012 13:04:03 +0000 (UTC) Alexander Motin wrote: > Author: mav > Date: Mon Apr 23 13:04:02 2012 > New Revision: 234603 > URL: http://svn.freebsd.org/changeset/base/234603 >=20 > Log: > Add names for all primary RAID levels defined by DDF 2.0 > specification. >=20 > Modified: > head/sys/geom/raid/g_raid.c > head/sys/geom/raid/g_raid.h > head/sys/geom/raid/tr_raid1.c > head/sys/geom/raid/tr_raid1e.c >=20 > Modified: head/sys/geom/raid/g_raid.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/geom/raid/g_raid.c Mon Apr 23 12:18:38 > 2012 (r234602) +++ head/sys/geom/raid/g_raid.c Mon Apr > 23 13:04:02 2012 (r234603) @@ -277,31 +277,87 @@ > g_raid_volume_level2str(int level, int q case G_RAID_VOLUME_RL_RAID1: > return ("RAID1"); > case G_RAID_VOLUME_RL_RAID3: > + if (qual =3D=3D G_RAID_VOLUME_RLQ_R3P0) > + return ("RAID3-P0"); > + if (qual =3D=3D G_RAID_VOLUME_RLQ_R3PN) > + return ("RAID3-PN"); > return ("RAID3"); > case G_RAID_VOLUME_RL_RAID4: > + if (qual =3D=3D G_RAID_VOLUME_RLQ_R4P0) > + return ("RAID3-P0"); > + if (qual =3D=3D G_RAID_VOLUME_RLQ_R4PN) > + return ("RAID3-PN"); > return ("RAID4"); Copy & paste from raid-3 above? --=20 Alexander Kabaev --Sig_/8kjeteoBYR9yJQpiR8+3/Nf Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFPlVfFQ6z1jMm+XZYRApeoAKDNGCqlMedsIttUgDhBCeI2TUbBigCfd0h2 Bh32i3jzf11kY2iAZ5lnQcQ= =BYgO -----END PGP SIGNATURE----- --Sig_/8kjeteoBYR9yJQpiR8+3/Nf-- From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 14:10:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 626821065673; Mon, 23 Apr 2012 14:10:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 493F78FC17; Mon, 23 Apr 2012 14:10:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NEAZri001162; Mon, 23 Apr 2012 14:10:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NEAYhB001146; Mon, 23 Apr 2012 14:10:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231410.q3NEAYhB001146@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 14:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234607 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/ext2fs fs/hpfs fs/msdosfs fs/nullfs fs/smbfs fs/tmpfs fs/unionfs gnu/fs/reiserfs kern sys ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 14:10:35 -0000 Author: trasz Date: Mon Apr 23 14:10:34 2012 New Revision: 234607 URL: http://svn.freebsd.org/changeset/base/234607 Log: Remove unused thread argument to vrecycle(). Reviewed by: kib Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/fs/cd9660/cd9660_node.c head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/hpfs/hpfs_vnops.c head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/nullfs/null_vnops.c head/sys/fs/smbfs/smbfs_node.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/fs/unionfs/union_vnops.c head/sys/gnu/fs/reiserfs/reiserfs_inode.c head/sys/kern/uipc_mqueue.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h head/sys/ufs/ufs/ufs_inode.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -4556,7 +4556,7 @@ zfs_inactive(vnode_t *vp, cred_t *cr, ca ASSERT(vp->v_count <= 1); vp->v_count = 0; VI_UNLOCK(vp); - vrecycle(vp, curthread); + vrecycle(vp); rw_exit(&zfsvfs->z_teardown_inactive_lock); return; } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -1428,7 +1428,7 @@ zfs_zinactive(znode_t *zp) mutex_exit(&zp->z_lock); ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); ASSERT(vp->v_count == 0); - vrecycle(vp, curthread); + vrecycle(vp); vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); zfs_rmnode(zp); VFS_UNLOCK_GIANT(vfslocked); Modified: head/sys/fs/cd9660/cd9660_node.c ============================================================================== --- head/sys/fs/cd9660/cd9660_node.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/cd9660/cd9660_node.c Mon Apr 23 14:10:34 2012 (r234607) @@ -65,7 +65,6 @@ cd9660_inactive(ap) } */ *ap; { struct vnode *vp = ap->a_vp; - struct thread *td = ap->a_td; struct iso_node *ip = VTOI(vp); int error = 0; @@ -74,7 +73,7 @@ cd9660_inactive(ap) * so that it can be reused immediately. */ if (ip->inode.iso_mode == 0) - vrecycle(vp, td); + vrecycle(vp); return error; } Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/ext2fs/ext2_inode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -498,7 +498,7 @@ out: * so that it can be reused immediately. */ if (ip->i_mode == 0) - vrecycle(vp, td); + vrecycle(vp); return (error); } Modified: head/sys/fs/hpfs/hpfs_vnops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vnops.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/hpfs/hpfs_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -576,7 +576,7 @@ hpfs_inactive(ap) } if (hp->h_flag & H_INVAL) { - vrecycle(vp, ap->a_td); + vrecycle(vp); return (0); } Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/msdosfs/msdosfs_denode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -583,7 +583,6 @@ msdosfs_inactive(ap) { struct vnode *vp = ap->a_vp; struct denode *dep = VTODE(vp); - struct thread *td = ap->a_td; int error = 0; #ifdef MSDOSFS_DEBUG @@ -622,6 +621,6 @@ out: vrefcnt(vp), dep->de_Name[0]); #endif if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY) - vrecycle(vp, td); + vrecycle(vp); return (error); } Modified: head/sys/fs/nullfs/null_vnops.c ============================================================================== --- head/sys/fs/nullfs/null_vnops.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/nullfs/null_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -678,7 +678,6 @@ static int null_inactive(struct vop_inactive_args *ap) { struct vnode *vp = ap->a_vp; - struct thread *td = ap->a_td; vp->v_object = NULL; @@ -686,7 +685,7 @@ null_inactive(struct vop_inactive_args * * If this is the last reference, then free up the vnode * so as not to tie up the lower vnodes. */ - vrecycle(vp, td); + vrecycle(vp); return (0); } Modified: head/sys/fs/smbfs/smbfs_node.c ============================================================================== --- head/sys/fs/smbfs/smbfs_node.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/smbfs/smbfs_node.c Mon Apr 23 14:10:34 2012 (r234607) @@ -373,7 +373,7 @@ smbfs_inactive(ap) smbfs_attr_cacheremove(vp); } if (np->n_flag & NGONE) - vrecycle(vp, td); + vrecycle(vp); return (0); } /* Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -1577,7 +1577,6 @@ static int tmpfs_inactive(struct vop_inactive_args *v) { struct vnode *vp = v->a_vp; - struct thread *l = v->a_td; struct tmpfs_node *node; @@ -1586,7 +1585,7 @@ tmpfs_inactive(struct vop_inactive_args node = VP_TO_TMPFS_NODE(vp); if (node->tn_links == 0) - vrecycle(vp, l); + vrecycle(vp); return 0; } Modified: head/sys/fs/unionfs/union_vnops.c ============================================================================== --- head/sys/fs/unionfs/union_vnops.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/unionfs/union_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -1702,7 +1702,7 @@ static int unionfs_inactive(struct vop_inactive_args *ap) { ap->a_vp->v_object = NULL; - vrecycle(ap->a_vp, ap->a_td); + vrecycle(ap->a_vp); return (0); } Modified: head/sys/gnu/fs/reiserfs/reiserfs_inode.c ============================================================================== --- head/sys/gnu/fs/reiserfs/reiserfs_inode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/gnu/fs/reiserfs/reiserfs_inode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -104,12 +104,10 @@ reiserfs_inactive(struct vop_inactive_ar { int error; struct vnode *vp; - struct thread *td; struct reiserfs_node *ip; error = 0; vp = ap->a_vp; - td = ap->a_td; ip = VTOI(vp); reiserfs_log(LOG_DEBUG, "deactivating inode used %d times\n", @@ -129,7 +127,7 @@ out: */ if (ip->i_mode == 0) { reiserfs_log(LOG_DEBUG, "recyling\n"); - vrecycle(vp, td); + vrecycle(vp); } return (error); Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/kern/uipc_mqueue.c Mon Apr 23 14:10:34 2012 (r234607) @@ -703,7 +703,7 @@ do_recycle(void *context, int pending __ { struct vnode *vp = (struct vnode *)context; - vrecycle(vp, curthread); + vrecycle(vp); vdrop(vp); } @@ -1065,7 +1065,7 @@ mqfs_inactive(struct vop_inactive_args * struct mqfs_node *pn = VTON(ap->a_vp); if (pn->mn_deleted) - vrecycle(ap->a_vp, ap->a_td); + vrecycle(ap->a_vp); return (0); } Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/kern/vfs_subr.c Mon Apr 23 14:10:34 2012 (r234607) @@ -2659,7 +2659,7 @@ loop: * Recycle an unused vnode to the front of the free list. */ int -vrecycle(struct vnode *vp, struct thread *td) +vrecycle(struct vnode *vp) { int recycled; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/sys/vnode.h Mon Apr 23 14:10:34 2012 (r234607) @@ -639,7 +639,7 @@ int vtruncbuf(struct vnode *vp, struct u void vunref(struct vnode *); void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3); #define vprint(label, vp) vn_printf((vp), "%s\n", (label)) -int vrecycle(struct vnode *vp, struct thread *td); +int vrecycle(struct vnode *vp); int vn_close(struct vnode *vp, int flags, struct ucred *file_cred, struct thread *td); void vn_finished_write(struct mount *mp); Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -73,7 +73,6 @@ ufs_inactive(ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); - struct thread *td = ap->a_td; mode_t mode; int error = 0; off_t isize; @@ -172,7 +171,7 @@ out: * so that it can be reused immediately. */ if (ip->i_mode == 0) - vrecycle(vp, td); + vrecycle(vp); if (mp != NULL) vn_finished_secondary_write(mp); return (error); From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 14:44:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2CCE11065672; Mon, 23 Apr 2012 14:44:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F23CD8FC17; Mon, 23 Apr 2012 14:44:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NEiIvo002221; Mon, 23 Apr 2012 14:44:18 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NEiIu8002219; Mon, 23 Apr 2012 14:44:18 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231444.q3NEiIu8002219@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 14:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234608 - head/sys/ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 14:44:19 -0000 Author: trasz Date: Mon Apr 23 14:44:18 2012 New Revision: 234608 URL: http://svn.freebsd.org/changeset/base/234608 Log: Remove unused thread argument from clear_inodeps() and clear_remove(). Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Apr 23 14:10:34 2012 (r234607) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Apr 23 14:44:18 2012 (r234608) @@ -773,8 +773,8 @@ struct bmsafemap_hashhead; static void softdep_error(char *, int); static void drain_output(struct vnode *); static struct buf *getdirtybuf(struct buf *, struct mtx *, int); -static void clear_remove(struct thread *); -static void clear_inodedeps(struct thread *); +static void clear_remove(void); +static void clear_inodedeps(void); static void unlinked_inodedep(struct mount *, struct inodedep *); static void clear_unlinked_inodedep(struct inodedep *); static struct inodedep *first_unlinked_inodedep(struct ufsmount *); @@ -1351,12 +1351,12 @@ softdep_flush(void) * If requested, try removing inode or removal dependencies. */ if (req_clear_inodedeps) { - clear_inodedeps(td); + clear_inodedeps(); req_clear_inodedeps -= 1; wakeup_one(&proc_waiting); } if (req_clear_remove) { - clear_remove(td); + clear_remove(); req_clear_remove -= 1; wakeup_one(&proc_waiting); } @@ -1499,7 +1499,6 @@ softdep_process_worklist(mp, full) struct mount *mp; int full; { - struct thread *td = curthread; int cnt, matchcnt; struct ufsmount *ump; long starttime; @@ -1523,12 +1522,12 @@ softdep_process_worklist(mp, full) * If requested, try removing inode or removal dependencies. */ if (req_clear_inodedeps) { - clear_inodedeps(td); + clear_inodedeps(); req_clear_inodedeps -= 1; wakeup_one(&proc_waiting); } if (req_clear_remove) { - clear_remove(td); + clear_remove(); req_clear_remove -= 1; wakeup_one(&proc_waiting); } @@ -12785,8 +12784,7 @@ pause_timer(arg) * reduce the number of dirrem, freefile, and freeblks dependency structures. */ static void -clear_remove(td) - struct thread *td; +clear_remove(void) { struct pagedep_hashhead *pagedephd; struct pagedep *pagedep; @@ -12845,8 +12843,7 @@ clear_remove(td) * the number of inodedep dependency structures. */ static void -clear_inodedeps(td) - struct thread *td; +clear_inodedeps(void) { struct inodedep_hashhead *inodedephd; struct inodedep *inodedep; From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 15:47:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BD75106566B; Mon, 23 Apr 2012 15:47:08 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36E9E8FC17; Mon, 23 Apr 2012 15:47:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NFl8cJ004310; Mon, 23 Apr 2012 15:47:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NFl88N004308; Mon, 23 Apr 2012 15:47:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204231547.q3NFl88N004308@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 23 Apr 2012 15:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234609 - head/sys/powerpc/mpc85xx X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 15:47:08 -0000 Author: nwhitehorn Date: Mon Apr 23 15:47:07 2012 New Revision: 234609 URL: http://svn.freebsd.org/changeset/base/234609 Log: Fix missing header for powerpc_iomb(). Pointy hat to: me Modified: head/sys/powerpc/mpc85xx/mpc85xx.c Modified: head/sys/powerpc/mpc85xx/mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/mpc85xx.c Mon Apr 23 14:44:18 2012 (r234608) +++ head/sys/powerpc/mpc85xx/mpc85xx.c Mon Apr 23 15:47:07 2012 (r234609) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 16:35:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9077106564A; Mon, 23 Apr 2012 16:35:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C46FB8FC0C; Mon, 23 Apr 2012 16:35:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NGZJwv005887; Mon, 23 Apr 2012 16:35:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NGZJTD005885; Mon, 23 Apr 2012 16:35:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204231635.q3NGZJTD005885@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Apr 2012 16:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234610 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 16:35:19 -0000 Author: mav Date: Mon Apr 23 16:35:19 2012 New Revision: 234610 URL: http://svn.freebsd.org/changeset/base/234610 Log: Fix copy-paste typo in r234603. Submitted by: kan Modified: head/sys/geom/raid/g_raid.c Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Mon Apr 23 15:47:07 2012 (r234609) +++ head/sys/geom/raid/g_raid.c Mon Apr 23 16:35:19 2012 (r234610) @@ -284,9 +284,9 @@ g_raid_volume_level2str(int level, int q return ("RAID3"); case G_RAID_VOLUME_RL_RAID4: if (qual == G_RAID_VOLUME_RLQ_R4P0) - return ("RAID3-P0"); + return ("RAID4-P0"); if (qual == G_RAID_VOLUME_RLQ_R4PN) - return ("RAID3-PN"); + return ("RAID4-PN"); return ("RAID4"); case G_RAID_VOLUME_RL_RAID5: if (qual == G_RAID_VOLUME_RLQ_R5RA) From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 16:36:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1474A106564A; Mon, 23 Apr 2012 16:36:55 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2C4BB8FC0C; Mon, 23 Apr 2012 16:36:53 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so12024869bkc.13 for ; Mon, 23 Apr 2012 09:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Tankahyo9zNYYDeig4Jq31PMLimjL9ZnJRRNYZ5dyP0=; b=yf8Pslke7cBNHKb+753JdT7csHwOtvSzFr/HLFATXROWAvje6qiQQ650/TgZo6zpEz vK+XY1rZDd1PpwZzDjxZe1eMdknSKRj4TmNerPse752fJI2Z7QO2BdSeGRb2QyqSxOb7 RpECr+krVtmLaQMjPj/TcJWtCVcnyvU3AEMYlNlvZOQ/Hljbx2vzbQVbBGYaQucTLGUJ ffupKD+MgX8fW69H49UEMlDPi871mUK00IJ6Ua62mLYbTUS56Lye8jBVVJoLZL+B8EIU pPAB/ip/YSRuEesHDA3qG8PvZ3F3Z22snI+KyLzqHcYkV7+87+p6NRx7arjSPj4Eexx5 QRrA== Received: by 10.204.152.88 with SMTP id f24mr5000079bkw.121.1335199013143; Mon, 23 Apr 2012 09:36:53 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id g8sm2051984bkt.9.2012.04.23.09.36.51 (version=SSLv3 cipher=OTHER); Mon, 23 Apr 2012 09:36:52 -0700 (PDT) Sender: Alexander Motin Message-ID: <4F958522.20506@FreeBSD.org> Date: Mon, 23 Apr 2012 19:36:50 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120328 Thunderbird/10.0.3 MIME-Version: 1.0 To: Alexander Kabaev References: <201204231304.q3ND43Yg098748@svn.freebsd.org> <20120423092311.2be21b71@kan.dyndns.org> In-Reply-To: <20120423092311.2be21b71@kan.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 16:36:55 -0000 On 04/23/12 16:23, Alexander Kabaev wrote: > On Mon, 23 Apr 2012 13:04:03 +0000 (UTC) > Alexander Motin wrote: > >> Author: mav >> Date: Mon Apr 23 13:04:02 2012 >> New Revision: 234603 >> URL: http://svn.freebsd.org/changeset/base/234603 >> >> Log: >> Add names for all primary RAID levels defined by DDF 2.0 >> specification. >> >> Modified: >> head/sys/geom/raid/g_raid.c >> head/sys/geom/raid/g_raid.h >> head/sys/geom/raid/tr_raid1.c >> head/sys/geom/raid/tr_raid1e.c >> >> Modified: head/sys/geom/raid/g_raid.c >> ============================================================================== >> --- head/sys/geom/raid/g_raid.c Mon Apr 23 12:18:38 >> 2012 (r234602) +++ head/sys/geom/raid/g_raid.c Mon Apr >> 23 13:04:02 2012 (r234603) @@ -277,31 +277,87 @@ >> g_raid_volume_level2str(int level, int q case G_RAID_VOLUME_RL_RAID1: >> return ("RAID1"); >> case G_RAID_VOLUME_RL_RAID3: >> + if (qual == G_RAID_VOLUME_RLQ_R3P0) >> + return ("RAID3-P0"); >> + if (qual == G_RAID_VOLUME_RLQ_R3PN) >> + return ("RAID3-PN"); >> return ("RAID3"); >> case G_RAID_VOLUME_RL_RAID4: >> + if (qual == G_RAID_VOLUME_RLQ_R4P0) >> + return ("RAID3-P0"); >> + if (qual == G_RAID_VOLUME_RLQ_R4PN) >> + return ("RAID3-PN"); >> return ("RAID4"); > > Copy& paste from raid-3 above? Fixed at r234603. Thanks. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 17:15:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7EC2106566B; Mon, 23 Apr 2012 17:15:06 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD1E58FC08; Mon, 23 Apr 2012 17:15:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NHF6WV007114; Mon, 23 Apr 2012 17:15:06 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NHF63u007112; Mon, 23 Apr 2012 17:15:06 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201204231715.q3NHF63u007112@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 23 Apr 2012 17:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234611 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 17:15:07 -0000 Author: marcel Date: Mon Apr 23 17:15:06 2012 New Revision: 234611 URL: http://svn.freebsd.org/changeset/base/234611 Log: Update the bugs section. We don't consider tmpfs as experimental, though we do not claim to support all mount options equally well. Approved by: delphij@ MFC after: 3 days Modified: head/share/man/man5/tmpfs.5 Modified: head/share/man/man5/tmpfs.5 ============================================================================== --- head/share/man/man5/tmpfs.5 Mon Apr 23 16:35:19 2012 (r234610) +++ head/share/man/man5/tmpfs.5 Mon Apr 23 17:15:06 2012 (r234611) @@ -49,7 +49,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 16, 2010 +.Dd April 23, 2012 .Dt TMPFS 5 .Os .Sh NAME @@ -141,9 +141,4 @@ to This manual page was written by .An Xin LI Aq delphij@FreeBSD.org . .Sh BUGS -The -.Nm -kernel implementation is currently considered as -an experimental feature. -Some file system mount -time options are not well supported. +Some file system mount time options may not be well-supported. From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 17:54:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BA44106566B; Mon, 23 Apr 2012 17:54:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 166E58FC0C; Mon, 23 Apr 2012 17:54:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NHsnM4008418; Mon, 23 Apr 2012 17:54:49 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NHsn7Z008416; Mon, 23 Apr 2012 17:54:49 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231754.q3NHsn7Z008416@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 17:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234612 - head/sys/ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 17:54:50 -0000 Author: trasz Date: Mon Apr 23 17:54:49 2012 New Revision: 234612 URL: http://svn.freebsd.org/changeset/base/234612 Log: Fix build. Modified: head/sys/ufs/ufs/ufs_inode.c Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 17:15:06 2012 (r234611) +++ head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 17:54:49 2012 (r234612) @@ -135,7 +135,7 @@ ufs_inactive(ap) (void)chkiq(ip, -1, NOCRED, FORCE); #endif #ifdef UFS_EXTATTR - ufs_extattr_vnode_inactive(vp, td); + ufs_extattr_vnode_inactive(vp, ap->a_td); #endif /* * Setting the mode to zero needs to wait for the inode From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 17:56:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 151C71065686; Mon, 23 Apr 2012 17:56:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36168FC08; Mon, 23 Apr 2012 17:56:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NHuZ9p008530; Mon, 23 Apr 2012 17:56:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NHuZ3k008528; Mon, 23 Apr 2012 17:56:35 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231756.q3NHuZ3k008528@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 17:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234613 - head/sys/ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 17:56:36 -0000 Author: trasz Date: Mon Apr 23 17:56:35 2012 New Revision: 234613 URL: http://svn.freebsd.org/changeset/base/234613 Log: Remove unused thread argument from ufs_extattr_uepm_lock()/ufs_extattr_uepm_unlock(). Modified: head/sys/ufs/ufs/ufs_extattr.c Modified: head/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- head/sys/ufs/ufs/ufs_extattr.c Mon Apr 23 17:54:49 2012 (r234612) +++ head/sys/ufs/ufs/ufs_extattr.c Mon Apr 23 17:56:35 2012 (r234613) @@ -108,14 +108,14 @@ static int ufs_extattr_start_locked(stru * backing file anyway. */ static void -ufs_extattr_uepm_lock(struct ufsmount *ump, struct thread *td) +ufs_extattr_uepm_lock(struct ufsmount *ump) { sx_xlock(&ump->um_extattr.uepm_lock); } static void -ufs_extattr_uepm_unlock(struct ufsmount *ump, struct thread *td) +ufs_extattr_uepm_unlock(struct ufsmount *ump) { sx_xunlock(&ump->um_extattr.uepm_lock); @@ -213,9 +213,9 @@ ufs_extattr_start(struct mount *mp, stru ump = VFSTOUFS(mp); - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_start_locked(ump, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -458,9 +458,9 @@ ufs_extattr_autostart(struct mount *mp, int error; ump = VFSTOUFS(mp); - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_autostart_locked(mp, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -566,7 +566,7 @@ ufs_extattr_stop(struct mount *mp, struc struct ufsmount *ump = VFSTOUFS(mp); int error = 0; - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED)) { error = EOPNOTSUPP; @@ -584,7 +584,7 @@ ufs_extattr_stop(struct mount *mp, struc ump->um_extattr.uepm_ucred = NULL; unlock: - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -783,10 +783,10 @@ ufs_extattrctl(struct mount *mp, int cmd * ufs_extattr_enable_with_open() will always unlock the * vnode, regardless of failure. */ - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_enable_with_open(ump, filename_vp, attrnamespace, attrname, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); @@ -799,10 +799,10 @@ ufs_extattrctl(struct mount *mp, int cmd if (attrname == NULL) return (EINVAL); - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_disable(ump, attrnamespace, attrname, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); @@ -832,12 +832,12 @@ vop_getextattr { struct ufsmount *ump = VFSTOUFS(mp); int error; - ufs_extattr_uepm_lock(ump, ap->a_td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_get(ap->a_vp, ap->a_attrnamespace, ap->a_name, ap->a_uio, ap->a_size, ap->a_cred, ap->a_td); - ufs_extattr_uepm_unlock(ump, ap->a_td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -1002,13 +1002,13 @@ vop_deleteextattr { struct ufsmount *ump = VFSTOUFS(mp); int error; - ufs_extattr_uepm_lock(ump, ap->a_td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_rm(ap->a_vp, ap->a_attrnamespace, ap->a_name, ap->a_cred, ap->a_td); - ufs_extattr_uepm_unlock(ump, ap->a_td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -1039,12 +1039,12 @@ vop_setextattr { if (ap->a_uio == NULL) return (EINVAL); - ufs_extattr_uepm_lock(ump, ap->a_td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_set(ap->a_vp, ap->a_attrnamespace, ap->a_name, ap->a_uio, ap->a_cred, ap->a_td); - ufs_extattr_uepm_unlock(ump, ap->a_td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -1295,10 +1295,10 @@ ufs_extattr_vnode_inactive(struct vnode if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)) return; - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED)) { - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return; } @@ -1306,7 +1306,7 @@ ufs_extattr_vnode_inactive(struct vnode ufs_extattr_rm(vp, uele->uele_attrnamespace, uele->uele_attrname, NULL, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); } #endif /* !UFS_EXTATTR */ From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 20:45:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B4D5106564A; Mon, 23 Apr 2012 20:45:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D22DA8FC08; Mon, 23 Apr 2012 20:45:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NKjVUp014877; Mon, 23 Apr 2012 20:45:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NKjVtN014874; Mon, 23 Apr 2012 20:45:31 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204232045.q3NKjVtN014874@svn.freebsd.org> From: Michael Tuexen Date: Mon, 23 Apr 2012 20:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234614 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 20:45:32 -0000 Author: tuexen Date: Mon Apr 23 20:45:31 2012 New Revision: 234614 URL: http://svn.freebsd.org/changeset/base/234614 Log: Use the flags defined in RFC 6525 in the stream reset event. Modified: head/sys/netinet/sctp_uio.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Mon Apr 23 17:56:35 2012 (r234613) +++ head/sys/netinet/sctp_uio.h Mon Apr 23 20:45:31 2012 (r234614) @@ -449,9 +449,11 @@ struct sctp_stream_reset_event { }; /* flags in stream_reset_event (strreset_flags) */ -#define SCTP_STREAM_RESET_DENIED 0x0004 /* SCTP_STRRESET_FAILED */ -#define SCTP_STREAM_RESET_FAILED 0x0008 /* SCTP_STRRESET_FAILED */ -#define SCTP_STREAM_CHANGED_DENIED 0x0010 +#define SCTP_STREAM_RESET_INCOMING_SSN 0x0001 +#define SCTP_STREAM_RESET_OUTGOING_SSN 0x0002 +#define SCTP_STREAM_RESET_DENIED 0x0004 +#define SCTP_STREAM_RESET_FAILED 0x0008 +#define SCTP_STREAM_CHANGED_DENIED 0x0010 /* * Assoc reset event - subscribe to SCTP_ASSOC_RESET_EVENT Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon Apr 23 17:56:35 2012 (r234613) +++ head/sys/netinet/sctputil.c Mon Apr 23 20:45:31 2012 (r234614) @@ -3498,18 +3498,18 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_HB_RESP: break; case SCTP_NOTIFY_STR_RESET_SEND: - sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_INCOMING); + sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING_SSN); break; case SCTP_NOTIFY_STR_RESET_RECV: - sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING); + sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_INCOMING); break; case SCTP_NOTIFY_STR_RESET_FAILED_OUT: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), - (SCTP_STREAM_RESET_OUTGOING | SCTP_STREAM_RESET_INCOMING)); + (SCTP_STREAM_RESET_OUTGOING_SSN | SCTP_STREAM_RESET_FAILED)); break; case SCTP_NOTIFY_STR_RESET_FAILED_IN: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), - (SCTP_STREAM_RESET_OUTGOING | SCTP_STREAM_RESET_INCOMING)); + (SCTP_STREAM_RESET_INCOMING | SCTP_STREAM_RESET_FAILED)); break; case SCTP_NOTIFY_ASCONF_ADD_IP: sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data, From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 20:53:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 738361065678; Mon, 23 Apr 2012 20:53:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EB968FC1F; Mon, 23 Apr 2012 20:53:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NKrpS3015155; Mon, 23 Apr 2012 20:53:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NKrpvl015153; Mon, 23 Apr 2012 20:53:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204232053.q3NKrpvl015153@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 23 Apr 2012 20:53:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234615 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 20:53:51 -0000 Author: nwhitehorn Date: Mon Apr 23 20:53:50 2012 New Revision: 234615 URL: http://svn.freebsd.org/changeset/base/234615 Log: Fix copy-and-paste error in r230400. MFC after: 3 days Modified: head/sys/powerpc/include/profile.h Modified: head/sys/powerpc/include/profile.h ============================================================================== --- head/sys/powerpc/include/profile.h Mon Apr 23 20:45:31 2012 (r234614) +++ head/sys/powerpc/include/profile.h Mon Apr 23 20:53:50 2012 (r234615) @@ -85,7 +85,7 @@ __asm( " .text \n" \ "_mcount: \n" \ " .quad .L._mcount,.TOC.@tocbase,0\n" \ " .previous \n" \ - " .size main,24 \n" \ + " .size _mcount,24 \n" \ " .type _mcount,@function \n" \ " .align 4 \n" \ ".L._mcount: \n" \ From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 20:56:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB5BF106566B; Mon, 23 Apr 2012 20:56:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB648FC12; Mon, 23 Apr 2012 20:56:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NKu6ok015279; Mon, 23 Apr 2012 20:56:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NKu6hU015276; Mon, 23 Apr 2012 20:56:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204232056.q3NKu6hU015276@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 23 Apr 2012 20:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234616 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 20:56:06 -0000 Author: kib Date: Mon Apr 23 20:56:05 2012 New Revision: 234616 URL: http://svn.freebsd.org/changeset/base/234616 Log: Allow for the process information sysctls to accept a thread id in addition to the process id. It follows the ptrace(2) interface and allows debugging libraries to use thread ids directly, without slow and verbose conversion of thread id into pid. The PGET_NOTID flag is provided to allow a specific sysctl to disallow this behaviour. All current callers of pget(9) have useful semantic to operate on tid and do not need this flag. Reviewed by: jhb, trocini MFC after: 1 week Modified: head/sys/kern/kern_proc.c head/sys/sys/proc.h Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Apr 23 20:53:50 2012 (r234615) +++ head/sys/kern/kern_proc.c Mon Apr 23 20:56:05 2012 (r234616) @@ -309,6 +309,30 @@ pfind(pid) return (p); } +static struct proc * +pfind_tid(pid_t tid) +{ + struct proc *p; + struct thread *td; + + sx_slock(&allproc_lock); + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); + continue; + } + FOREACH_THREAD_IN_PROC(p, td) { + if (td->td_tid == tid) + goto found; + } + PROC_UNLOCK(p); + } +found: + sx_sunlock(&allproc_lock); + return (p); +} + /* * Locate a process group by number. * The caller must hold proctree_lock. @@ -339,7 +363,12 @@ pget(pid_t pid, int flags, struct proc * struct proc *p; int error; - p = pfind(pid); + if (pid <= PID_MAX) + p = pfind(pid); + else if ((flags & PGET_NOTID) == 0) + p = pfind_tid(pid); + else + p = NULL; if (p == NULL) return (ESRCH); if ((flags & PGET_CANSEE) != 0) { Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Mon Apr 23 20:53:50 2012 (r234615) +++ head/sys/sys/proc.h Mon Apr 23 20:56:05 2012 (r234616) @@ -840,6 +840,7 @@ struct proc *zpfind(pid_t); /* Find zom #define PGET_ISCURRENT 0x00008 /* Check that the found process is current. */ #define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */ #define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */ +#define PGET_NOTID 0x00040 /* Do not assume tid if pid > PID_MAX. */ #define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT) From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 21:49:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE2961065670; Mon, 23 Apr 2012 21:49:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA17B8FC0A; Mon, 23 Apr 2012 21:49:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NLnBL4016980; Mon, 23 Apr 2012 21:49:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NLnBGw016978; Mon, 23 Apr 2012 21:49:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201204232149.q3NLnBGw016978@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 23 Apr 2012 21:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234617 - head/sys/dev/qlxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 21:49:12 -0000 Author: bz Date: Mon Apr 23 21:49:11 2012 New Revision: 234617 URL: http://svn.freebsd.org/changeset/base/234617 Log: Do not announce IPv6 TSO support yet. The in-tree driver does not seem to fully handle this yet. Reviewed by: davidcs MFC after: 1 week Modified: head/sys/dev/qlxgb/qla_os.c Modified: head/sys/dev/qlxgb/qla_os.c ============================================================================== --- head/sys/dev/qlxgb/qla_os.c Mon Apr 23 20:56:05 2012 (r234616) +++ head/sys/dev/qlxgb/qla_os.c Mon Apr 23 21:49:11 2012 (r234617) @@ -677,7 +677,6 @@ qla_init_ifnet(device_t dev, qla_host_t ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4 | - IFCAP_TSO6 | IFCAP_JUMBO_MTU; ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 21:50:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F9E51065694; Mon, 23 Apr 2012 21:50:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D8F78FC20; Mon, 23 Apr 2012 21:50:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NLoBTd017053; Mon, 23 Apr 2012 21:50:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NLoAAf017051; Mon, 23 Apr 2012 21:50:10 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201204232150.q3NLoAAf017051@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 23 Apr 2012 21:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234618 - head/sys/ofed/drivers/net/mlx4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 21:50:12 -0000 Author: bz Date: Mon Apr 23 21:50:10 2012 New Revision: 234618 URL: http://svn.freebsd.org/changeset/base/234618 Log: Do not announce IPv6 TSO support yet. The driver seems to make assumptions based on IPv4 header parsing only. MFC after: 1 week Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Apr 23 21:49:11 2012 (r234617) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Apr 23 21:50:10 2012 (r234618) @@ -1569,7 +1569,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d dev->if_capabilities |= IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER; dev->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; if (mdev->LSO_support) - dev->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO; + dev->if_capabilities |= IFCAP_TSO4 | IFCAP_VLAN_HWTSO; if (mdev->profile.num_lro) dev->if_capabilities |= IFCAP_LRO; dev->if_capenable = dev->if_capabilities; From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 22:05:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B42E0106566B; Mon, 23 Apr 2012 22:05:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5AE8FC1D; Mon, 23 Apr 2012 22:05:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NM599j017614; Mon, 23 Apr 2012 22:05:09 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NM59Sl017612; Mon, 23 Apr 2012 22:05:09 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201204232205.q3NM59Sl017612@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 23 Apr 2012 22:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234620 - head/sys/dev/ixgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 22:05:09 -0000 Author: bz Date: Mon Apr 23 22:05:09 2012 New Revision: 234620 URL: http://svn.freebsd.org/changeset/base/234620 Log: If we pass down 64k - L2 hdr size + 1 to 64K L3+ data adding an ether header will make the data go over the 64k limits announced to busdma as maxsize and the transaction will fail. With TSO this can result in a TCP regression due to the lost packet. According to the data sheets ixgbe(4) 82598 and 82599 can handle up to 256k so increase the maximum. Reported by: Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no) Tested by: Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no) MFC after: 1 week Modified: head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Mon Apr 23 22:03:56 2012 (r234619) +++ head/sys/dev/ixgbe/ixgbe.h Mon Apr 23 22:05:09 2012 (r234620) @@ -179,7 +179,7 @@ #define IXGBE_82599_SCATTER 32 #define MSIX_82598_BAR 3 #define MSIX_82599_BAR 4 -#define IXGBE_TSO_SIZE 65535 +#define IXGBE_TSO_SIZE 262140 #define IXGBE_TX_BUFFER_SIZE ((u32) 1514) #define IXGBE_RX_HDR 128 #define IXGBE_VFTA_SIZE 128 From owner-svn-src-head@FreeBSD.ORG Mon Apr 23 23:05:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6692D1065672; Mon, 23 Apr 2012 23:05:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CB7A8FC0A; Mon, 23 Apr 2012 23:05:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NN5FD8019603; Mon, 23 Apr 2012 23:05:15 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NN5FSh019595; Mon, 23 Apr 2012 23:05:15 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204232305.q3NN5FSh019595@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 23 Apr 2012 23:05:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234623 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/events sys/contrib/dev/acpica/comp... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 23:05:15 -0000 Author: jkim Date: Mon Apr 23 23:05:14 2012 New Revision: 234623 URL: http://svn.freebsd.org/changeset/base/234623 Log: Merge ACPICA 20120420. Added: head/sys/contrib/dev/acpica/compiler/aslsupport.l - copied unchanged from r234519, vendor-sys/acpica/dist/source/compiler/aslsupport.l Modified: head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcompiler.y head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/preprocess.h head/sys/contrib/dev/acpica/compiler/prscan.c head/sys/contrib/dev/acpica/compiler/prutils.c head/sys/contrib/dev/acpica/components/debugger/dbcmds.c head/sys/contrib/dev/acpica/components/debugger/dbdisply.c head/sys/contrib/dev/acpica/components/debugger/dbstats.c head/sys/contrib/dev/acpica/components/debugger/dbutils.c head/sys/contrib/dev/acpica/components/events/evmisc.c head/sys/contrib/dev/acpica/components/events/evxface.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/hardware/hwesleep.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/uttrack.c head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actypes.h head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/dev/acpica/compiler/ (props changed) head/sys/contrib/dev/acpica/components/debugger/ (props changed) head/sys/contrib/dev/acpica/components/events/ (props changed) head/sys/contrib/dev/acpica/components/executer/ (props changed) head/sys/contrib/dev/acpica/components/hardware/ (props changed) head/sys/contrib/dev/acpica/components/utilities/ (props changed) head/sys/contrib/dev/acpica/include/ (props changed) Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Mon Apr 23 23:05:14 2012 (r234623) @@ -31,7 +31,7 @@ src_headers="acapps.h accommon.h acconfi actbl2.h actbl3.h actypes.h acutils.h amlcode.h amlresrc.h \ platform/acenv.h platform/acfreebsd.h platform/acgcc.h" comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h \ - asltypes.h dtcompiler.h dttemplate.h preprocess.h" + aslsupport.l asltypes.h dtcompiler.h dttemplate.h preprocess.h" platform_headers="acfreebsd.h acgcc.h" # pre-clean Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/changes.txt Mon Apr 23 23:05:14 2012 (r234623) @@ -1,4 +1,71 @@ ---------------------------------------- +20 April 2012. Summary of changes for version 20120420: + +This release is available at www.acpica.org/downloads. +The ACPI 5.0 specification is available at www.acpi.info. + +1) ACPICA Core Subsystem: + +Implemented support for multiple notify handlers. This change adds support to +allow multiple system and device notify handlers on Device, Thermal Zone, and +Processor objects. This can simplify the host OS notification implementation. +Also re-worked and restructured the entire notify support code to simplify +handler installation, handler removal, notify event queuing, and notify +dispatch to handler(s). Note: there can still only be two global notify +handlers - one for system notifies and one for device notifies. There are no +changes to the existing handler install/remove interfaces. Lin Ming, Bob +Moore, Rafael Wysocki. + +Fixed a regression in the package repair code where the object reference +count was calculated incorrectly. Regression was introduced in the commit +"Support to add Package wrappers". + +Fixed a couple possible memory leaks in the AML parser, in the error recovery +path. Jesper Juhl, Lin Ming. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 92.9K Code, 25.0K Data, 117.9K Total + Debug Version: 172.5K Code, 73.2K Data, 245.7K Total + Current Release: + Non-Debug Version: 92.9K Code, 25.0K Data, 117.9K Total + Debug Version: 172.6K Code, 73.4K Data, 246.0K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a problem with the resource descriptor support where the length +of the StartDependentFn and StartDependentFnNoPrio descriptors were not +included in cumulative descriptor offset, resulting in incorrect values for +resource tags within resource descriptors appearing after a StartDependent* +descriptor. Reported by Petr Vandrovec. ACPICA BZ 949. + +iASL and Preprocessor: Implemented full support for the #line directive to +correctly track original source file line numbers through the .i preprocessor +output file - for error and warning messages. + +iASL: Expand the allowable byte constants for address space IDs. Previously, +the allowable range was 0x80-0xFF (user-defined spaces), now the range is +0x0A-0xFF to allow for custom and new IDs without changing the compiler. + +iASL: Add option to treat all warnings as errors (-we). ACPICA BZ 948. + +iASL: Add option to completely disable the preprocessor (-Pn). + +iASL: Now emit all error/warning messages to standard error (stderr) by +default (instead of the previous stdout). + +ASL Test Suite (ASLTS): Reduce iASL warnings due to use of Switch(). Update +for resource descriptor offset fix above. Update/cleanup error output +routines. Enable and send iASL errors/warnings to an error logfile +(error.txt). Send all other iASL output to a logfile (compiler.txt). Fixed +several extraneous "unrecognized operator" messages. + +---------------------------------------- 20 March 2012. Summary of changes for version 20120320: This release is available at www.acpica.org/downloads. Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Mon Apr 23 23:05:14 2012 (r234623) @@ -242,10 +242,10 @@ CmFlushSourceCode ( while (FlReadFile (ASL_FILE_INPUT, &Buffer, 1) != AE_ERROR) { - InsertLineBuffer ((int) Buffer); + AslInsertLineBuffer ((int) Buffer); } - ResetCurrentLineBuffer (); + AslResetCurrentLineBuffer (); } @@ -457,16 +457,20 @@ CmDoCompile ( Event = UtBeginEvent ("Open input and output files"); UtEndEvent (Event); - /* Preprocessor */ - Event = UtBeginEvent ("Preprocess input file"); - PrDoPreprocess (); - UtEndEvent (Event); - if (Gbl_PreprocessOnly) + if (Gbl_PreprocessFlag) { - CmCleanupAndExit (); - return 0; + /* Preprocessor */ + + PrDoPreprocess (); + if (Gbl_PreprocessOnly) + { + UtEndEvent (Event); + CmCleanupAndExit (); + return 0; + } } + UtEndEvent (Event); /* Build the parse tree */ @@ -483,8 +487,17 @@ CmDoCompile ( if (!RootNode) { - AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, - NULL, "- Could not resolve parse tree root node"); + /* + * If there are no errors, then we have some sort of + * internal problem. + */ + Status = AslCheckForErrorExit (); + if (Status == AE_OK) + { + AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, + NULL, "- Could not resolve parse tree root node"); + } + goto ErrorExit; } @@ -553,14 +566,14 @@ CmDoCompile ( if (Gbl_ParseOnlyFlag) { - AePrintErrorLog (ASL_FILE_STDOUT); - UtDisplaySummary (ASL_FILE_STDOUT); + AePrintErrorLog (ASL_FILE_STDERR); + UtDisplaySummary (ASL_FILE_STDERR); if (Gbl_DebugFlag) { - /* Print error summary to the debug file */ + /* Print error summary to the stdout also */ - AePrintErrorLog (ASL_FILE_STDERR); - UtDisplaySummary (ASL_FILE_STDERR); + AePrintErrorLog (ASL_FILE_STDOUT); + UtDisplaySummary (ASL_FILE_STDOUT); } UtEndEvent (FullCompile); return 0; @@ -756,12 +769,12 @@ CmCleanupAndExit ( UINT32 i; - AePrintErrorLog (ASL_FILE_STDOUT); + AePrintErrorLog (ASL_FILE_STDERR); if (Gbl_DebugFlag) { - /* Print error summary to the debug file */ + /* Print error summary to stdout also */ - AePrintErrorLog (ASL_FILE_STDERR); + AePrintErrorLog (ASL_FILE_STDOUT); } DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n"); @@ -837,7 +850,9 @@ CmCleanupAndExit ( /* Delete the preprocessor output file (.i) unless -li flag is set */ - if (!Gbl_PreprocessorOutputFlag && Gbl_Files[ASL_FILE_PREPROCESSOR].Filename) + if (!Gbl_PreprocessorOutputFlag && + Gbl_PreprocessFlag && + Gbl_Files[ASL_FILE_PREPROCESSOR].Filename) { if (remove (Gbl_Files[ASL_FILE_PREPROCESSOR].Filename)) { Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Mon Apr 23 23:05:14 2012 (r234623) @@ -100,11 +100,11 @@ AslCompilerlex( void); void -ResetCurrentLineBuffer ( +AslResetCurrentLineBuffer ( void); void -InsertLineBuffer ( +AslInsertLineBuffer ( int SourceChar); int @@ -136,6 +136,11 @@ ACPI_STATUS AslDoOneFile ( char *Filename); +ACPI_STATUS +AslCheckForErrorExit ( + void); + + /* * aslcompile - compile mainline */ @@ -645,7 +650,11 @@ FlPrintFile ( void FlSetLineNumber ( - ACPI_PARSE_OBJECT *Op); + UINT32 LineNumber); + +void +FlSetFilename ( + char *Filename); ACPI_STATUS FlOpenInputFile ( Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Mon Apr 23 23:05:14 2012 (r234623) @@ -58,20 +58,26 @@ YYSTYPE AslCompilerlval; */ #define _COMPONENT ACPI_COMPILER - ACPI_MODULE_NAME ("aslscan") + ACPI_MODULE_NAME ("aslscanner") + /* Local prototypes */ -char -comment (void); -char -comment2 (void); -void +static void +AslDoLineDirective (void); + +static char +AslDoComment (void); + +static char +AslDoCommentType2 (void); + +static char +AslDoStringLiteral (void); + +static void count (int type); -char -literal (void); -void -copy (void); + /*! [Begin] no source code translation */ @@ -104,10 +110,10 @@ NamePathTail [.]{NameSeg} [ \t] { count (0); } -"/*" { if (!comment ()) yyterminate (); } -"//" { if (!comment2 ()) yyterminate (); } +"/*" { if (!AslDoComment ()) yyterminate (); } +"//" { if (!AslDoCommentType2 ()) yyterminate (); } -"\"" { if (literal ()) return (PARSEOP_STRING_LITERAL); else yyterminate (); } +"\"" { if (AslDoStringLiteral ()) return (PARSEOP_STRING_LITERAL); else yyterminate (); } ";" { count (0); return(';'); } @@ -116,10 +122,16 @@ NamePathTail [.]{NameSeg} count (1); return (PARSEOP_INTEGER); } "Include" { count (1); return (PARSEOP_INCLUDE); } -"#include" { count (1); return (PARSEOP_INCLUDE_CSTYLE); } -"#line" { count (1); return (PARSEOP_LINE_CSTYLE); } "External" { count (1); return (PARSEOP_EXTERNAL); } + /* + * The #line directive is emitted by the preprocessor and handled + * here in the main iASL lexer - simply set the line number and + * optionally the current filename. + */ +"#line" { AslDoLineDirective ();} + + /**************************************************************************** * * Main ASL operators @@ -634,668 +646,7 @@ NamePathTail [.]{NameSeg} /*! [End] no source code translation !*/ -typedef struct asl_file_node -{ - FILE *File; - UINT32 CurrentLineNumber; - YY_BUFFER_STATE State; - char *Filename; - struct asl_file_node *Next; - -} ASL_FILE_NODE; - -ASL_FILE_NODE *InputStack = NULL; - - -/******************************************************************************* - * - * FUNCTION: AslPopInputFileStack - * - * PARAMETERS: None - * - * RETURN: 0 if a node was popped, -1 otherwise - * - * DESCRIPTION: Pop the top of the input file stack and point the parser to - * the saved parse buffer contained in the fnode. Also, set the - * global line counters to the saved values. This function is - * called when an include file reaches EOF. - * - ******************************************************************************/ - -int -AslPopInputFileStack ( - void) -{ - ASL_FILE_NODE *Fnode; - - - Fnode = InputStack; - DbgPrint (ASL_PARSE_OUTPUT, "\nPop InputFile Stack, Fnode %p\n\n", Fnode); - - - if (!Fnode) - { - return -1; - } - - /* Close the current include file */ - - fclose (yyin); - - /* Update the top-of-stack */ - - InputStack = Fnode->Next; - - /* Reset global line counter and filename */ - - Gbl_Files[ASL_FILE_INPUT].Filename = Fnode->Filename; - Gbl_CurrentLineNumber = Fnode->CurrentLineNumber; - - /* Point the parser to the popped file */ - - yy_delete_buffer (YY_CURRENT_BUFFER); - yy_switch_to_buffer (Fnode->State); - - /* All done with this node */ - - ACPI_FREE (Fnode); - return 0; -} - - -/******************************************************************************* - * - * FUNCTION: AslPushInputFileStack - * - * PARAMETERS: InputFile - Open file pointer - * Filename - Name of the file - * - * RETURN: None - * - * DESCRIPTION: Push the InputFile onto the file stack, and point the parser - * to this file. Called when an include file is successfully - * opened. - * - ******************************************************************************/ - -void -AslPushInputFileStack ( - FILE *InputFile, - char *Filename) -{ - ASL_FILE_NODE *Fnode; - YY_BUFFER_STATE State; - - - /* Save the current state in an Fnode */ - - Fnode = UtLocalCalloc (sizeof (ASL_FILE_NODE)); - - Fnode->File = yyin; - Fnode->Next = InputStack; - Fnode->State = YY_CURRENT_BUFFER; - Fnode->CurrentLineNumber = Gbl_CurrentLineNumber; - Fnode->Filename = Gbl_Files[ASL_FILE_INPUT].Filename; - - /* Push it on the stack */ - - InputStack = Fnode; - - /* Point the parser to this file */ - - State = yy_create_buffer (InputFile, YY_BUF_SIZE); - yy_switch_to_buffer (State); - - DbgPrint (ASL_PARSE_OUTPUT, "\nPush InputFile Stack, returning %p\n\n", InputFile); - - /* Reset the global line count and filename */ - - Gbl_Files[ASL_FILE_INPUT].Filename = Filename; - Gbl_CurrentLineNumber = 1; - yyin = InputFile; -} - - -/******************************************************************************* - * - * FUNCTION: ResetCurrentLineBuffer - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Reset the Line Buffer to zero, increment global line numbers. - * - ******************************************************************************/ - -void -ResetCurrentLineBuffer ( - void) -{ - - if (Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle) - { - FlWriteFile (ASL_FILE_SOURCE_OUTPUT, Gbl_CurrentLineBuffer, - Gbl_LineBufPtr - Gbl_CurrentLineBuffer); - } - - Gbl_CurrentLineOffset += Gbl_CurrentColumn; - Gbl_CurrentColumn = 0; - - Gbl_CurrentLineNumber++; - Gbl_LogicalLineNumber++; - Gbl_LineBufPtr = Gbl_CurrentLineBuffer; -} - - -/******************************************************************************* - * - * FUNCTION: InsertLineBuffer - * - * PARAMETERS: SourceChar - One char from the input ASL source file - * - * RETURN: None - * - * DESCRIPTION: Put one character of the source file into the temp line buffer - * - ******************************************************************************/ - -#define ASL_SPACES_PER_TAB 4 - -void -InsertLineBuffer ( - int SourceChar) -{ - UINT32 i; - UINT32 Count = 1; - - - if (SourceChar == EOF) - { - return; - } - - Gbl_InputByteCount++; - - /* Handle tabs. Convert to spaces */ - - if (SourceChar == '\t') - { - SourceChar = ' '; - Count = ASL_SPACES_PER_TAB - - (Gbl_CurrentColumn & (ASL_SPACES_PER_TAB-1)); - } - - - for (i = 0; i < Count; i++) - { - Gbl_CurrentColumn++; - - /* Insert the character into the line buffer */ - - *Gbl_LineBufPtr = (UINT8) SourceChar; - Gbl_LineBufPtr++; - - if (Gbl_LineBufPtr > (Gbl_CurrentLineBuffer + (ASL_LINE_BUFFER_SIZE - 1))) - { -#if 0 - /* - * Warning if we have split a long source line. - * - */ - sprintf (MsgBuffer, "Max %u", ASL_LINE_BUFFER_SIZE); - AslCommonError (ASL_WARNING, ASL_MSG_LONG_LINE, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, MsgBuffer); -#endif - - ResetCurrentLineBuffer (); - } - else if (SourceChar == '\n') - { - /* End of line */ - - ResetCurrentLineBuffer (); - } - } -} - - -/******************************************************************************* - * - * FUNCTION: count - * - * PARAMETERS: yytext - Contains the matched keyword. - * Type - Keyword/Character type: - * 0 = anything except a keyword - * 1 = pseudo-keywords - * 2 = non-executable ASL keywords - * 3 = executable ASL keywords - * - * RETURN: None - * - * DESCRIPTION: Count keywords and put them into the line buffer - * - ******************************************************************************/ - -void -count ( - int Type) -{ - int i; - - - switch (Type) - { - case 2: - TotalKeywords++; - TotalNamedObjects++; - break; - - case 3: - TotalKeywords++; - TotalExecutableOpcodes++; - break; - } - - for (i = 0; (yytext[i] != 0) && (yytext[i] != EOF); i++) - { - InsertLineBuffer (yytext[i]); - *Gbl_LineBufPtr = 0; - } -} - - -/******************************************************************************* - * - * FUNCTION: comment - * - * PARAMETERS: none - * - * RETURN: none - * - * DESCRIPTION: Process a standard comment. - * - ******************************************************************************/ - -char -comment (void) -{ - char c; - char c1 = 0; - - - InsertLineBuffer ('/'); - InsertLineBuffer ('*'); - -loop: - - /* Eat chars until end-of-comment */ - - while ((c = (char) input()) != '*' && c != EOF) - { - InsertLineBuffer (c); - c1 = c; - } - - if (c == EOF) - { - goto EarlyEOF; - } - - /* - * Check for nested comment -- can help catch cases where a previous - * comment was accidently left unterminated - */ - if ((c1 == '/') && (c == '*')) - { - AslCommonError (ASL_WARNING, ASL_MSG_NESTED_COMMENT, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_InputByteCount, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - } - - /* Comment is closed only if the NEXT character is a slash */ - - InsertLineBuffer (c); - - if ((c1 = (char) input()) != '/' && c1 != EOF) - { - unput(c1); - goto loop; - } - - if (c1 == EOF) - { - goto EarlyEOF; - } - - InsertLineBuffer (c1); - return TRUE; - - -EarlyEOF: - /* - * Premature End-Of-File - */ - AslCommonError (ASL_ERROR, ASL_MSG_EARLY_EOF, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - return (FALSE); -} - - -/******************************************************************************* - * - * FUNCTION: comment - * - * PARAMETERS: none - * - * RETURN: none - * - * DESCRIPTION: Process a new "//" comment. - * - ******************************************************************************/ - -char -comment2 (void) -{ - char c; - - - InsertLineBuffer ('/'); - InsertLineBuffer ('/'); - - while ((c = (char) input()) != '\n' && c != EOF) - { - InsertLineBuffer (c); - } - - if (c == EOF) - { - /* End of file is OK, change to newline. Let parser detect EOF later */ - - c = '\n'; - } - - InsertLineBuffer (c); - return (TRUE); -} - - -/******************************************************************************* - * - * FUNCTION: literal - * - * PARAMETERS: none - * - * RETURN: none - * - * DESCRIPTION: Process a string literal (surrounded by quotes) - * - ******************************************************************************/ - -#define ASL_NORMAL_CHAR 0 -#define ASL_ESCAPE_SEQUENCE 1 -#define ASL_OCTAL_CONSTANT 2 -#define ASL_HEX_CONSTANT 3 - -char -literal (void) -{ - char *StringBuffer = MsgBuffer; - char *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE; - char *CleanString; - char StringChar; - UINT32 State = ASL_NORMAL_CHAR; - UINT32 i = 0; - UINT8 Digit; - char ConvertBuffer[4]; - - - /* - * Eat chars until end-of-literal. - * NOTE: Put back the original surrounding quotes into the - * source line buffer. - */ - InsertLineBuffer ('\"'); - while ((StringChar = (char) input()) != EOF) - { - InsertLineBuffer (StringChar); - -DoCharacter: - - switch (State) - { - case ASL_NORMAL_CHAR: - - switch (StringChar) - { - case '\\': - /* - * Special handling for backslash-escape sequence. We will - * toss the backslash and translate the escape char(s). - */ - State = ASL_ESCAPE_SEQUENCE; - continue; - - case '\"': - - /* String terminator */ - - goto CompletedString; - } - break; - - - case ASL_ESCAPE_SEQUENCE: - - State = ASL_NORMAL_CHAR; - switch (StringChar) - { - case 'a': - StringChar = 0x07; /* BELL */ - break; - - case 'b': - StringChar = 0x08; /* BACKSPACE */ - break; - - case 'f': - StringChar = 0x0C; /* FORMFEED */ - break; - - case 'n': - StringChar = 0x0A; /* LINEFEED */ - break; - - case 'r': - StringChar = 0x0D; /* CARRIAGE RETURN*/ - break; - - case 't': - StringChar = 0x09; /* HORIZONTAL TAB */ - break; - - case 'v': - StringChar = 0x0B; /* VERTICAL TAB */ - break; - - case 'x': - State = ASL_HEX_CONSTANT; - i = 0; - continue; - - case '\'': /* Single Quote */ - case '\"': /* Double Quote */ - case '\\': /* Backslash */ - break; - - default: - - /* Check for an octal digit (0-7) */ - - if (ACPI_IS_OCTAL_DIGIT (StringChar)) - { - State = ASL_OCTAL_CONSTANT; - ConvertBuffer[0] = StringChar; - i = 1; - continue; - } - - /* Unknown escape sequence issue warning, but use the character */ - - AslCommonError (ASL_WARNING, ASL_MSG_INVALID_ESCAPE, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - break; - } - break; - - - case ASL_OCTAL_CONSTANT: - - /* Up to three octal digits allowed */ - - if (!ACPI_IS_OCTAL_DIGIT (StringChar) || - (i > 2)) - { - /* - * Reached end of the constant. Convert the assembled ASCII - * string and resume processing of the next character - */ - ConvertBuffer[i] = 0; - Digit = (UINT8) ACPI_STRTOUL (ConvertBuffer, NULL, 8); - - /* Check for NULL or non-ascii character (ignore if so) */ - - if ((Digit == 0) || (Digit > ACPI_ASCII_MAX)) - { - AslCommonError (ASL_WARNING, ASL_MSG_INVALID_STRING, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - } - else - { - *StringBuffer = (char) Digit; - StringBuffer++; - if (StringBuffer >= EndBuffer) - { - goto BufferOverflow; - } - } - - State = ASL_NORMAL_CHAR; - goto DoCharacter; - break; - } - - /* Append another digit of the constant */ - - ConvertBuffer[i] = StringChar; - i++; - continue; - - - case ASL_HEX_CONSTANT: - - /* Up to two hex digits allowed */ - - if (!ACPI_IS_XDIGIT (StringChar) || - (i > 1)) - { - /* - * Reached end of the constant. Convert the assembled ASCII - * string and resume processing of the next character - */ - ConvertBuffer[i] = 0; - Digit = (UINT8) ACPI_STRTOUL (ConvertBuffer, NULL, 16); - - /* Check for NULL or non-ascii character (ignore if so) */ - - if ((Digit == 0) || (Digit > ACPI_ASCII_MAX)) - { - AslCommonError (ASL_WARNING, ASL_MSG_INVALID_STRING, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - } - else - { - *StringBuffer = (char) Digit; - StringBuffer++; - if (StringBuffer >= EndBuffer) - { - goto BufferOverflow; - } - } - - State = ASL_NORMAL_CHAR; - goto DoCharacter; - break; - } - - /* Append another digit of the constant */ - - ConvertBuffer[i] = StringChar; - i++; - continue; - } - - /* Save the finished character */ - - *StringBuffer = StringChar; - StringBuffer++; - if (StringBuffer >= EndBuffer) - { - goto BufferOverflow; - } - } - - /* - * Premature End-Of-File - */ - AslCommonError (ASL_ERROR, ASL_MSG_EARLY_EOF, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - return (FALSE); - - -CompletedString: - /* - * Null terminate the input string and copy string to a new buffer - */ - *StringBuffer = 0; - - CleanString = UtGetStringBuffer (strlen (MsgBuffer) + 1); - if (!CleanString) - { - AslCommonError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - return (FALSE); - } - - ACPI_STRCPY (CleanString, MsgBuffer); - AslCompilerlval.s = CleanString; - return (TRUE); - - -BufferOverflow: - - /* Literal was too long */ - - AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096"); - return (FALSE); -} - - +/* + * Bring in the scanner support routines + */ +#include Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.y Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.y Mon Apr 23 23:05:14 2012 (r234623) @@ -236,7 +236,6 @@ void * AslLocalAllo %token PARSEOP_I2C_SERIALBUS %token PARSEOP_IF %token PARSEOP_INCLUDE -%token PARSEOP_INCLUDE_CSTYLE %token PARSEOP_INCLUDE_END %token PARSEOP_INCREMENT %token PARSEOP_INDEX @@ -261,7 +260,6 @@ void * AslLocalAllo %token PARSEOP_LEQUAL %token PARSEOP_LGREATER %token PARSEOP_LGREATEREQUAL -%token PARSEOP_LINE_CSTYLE %token PARSEOP_LLESS %token PARSEOP_LLESSEQUAL %token PARSEOP_LNOT @@ -504,9 +502,7 @@ void * AslLocalAllo *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 06:26:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE2FC106566C; Tue, 24 Apr 2012 06:26:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9E358FC15; Tue, 24 Apr 2012 06:26:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O6QEJh033901; Tue, 24 Apr 2012 06:26:14 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O6QEbU033898; Tue, 24 Apr 2012 06:26:14 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204240626.q3O6QEbU033898@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 24 Apr 2012 06:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234636 - head/usr.sbin/usbdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 06:26:14 -0000 Author: hselasky Date: Tue Apr 24 06:26:14 2012 New Revision: 234636 URL: http://svn.freebsd.org/changeset/base/234636 Log: Improve support for USB packet filtering also when reading dumps, and allow filtered data to be dumped to a binary file. MFC after: 1 week Modified: head/usr.sbin/usbdump/usbdump.8 head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.8 ============================================================================== --- head/usr.sbin/usbdump/usbdump.8 Tue Apr 24 03:59:21 2012 (r234635) +++ head/usr.sbin/usbdump/usbdump.8 Tue Apr 24 06:26:14 2012 (r234636) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 16, 2012 +.Dd April 24, 2012 .Dt USBDUMP 8 .Os .Sh NAME @@ -39,6 +39,7 @@ .Op Fl v .Op Fl w Ar file .Op Fl f Ar filter +.Op Fl b Ar file .Sh DESCRIPTION The .Nm @@ -46,12 +47,17 @@ utility provides a way to dump USB packe .Pp The following options are accepted: .Bl -tag -width ".Fl f Ar file" +.It Fl b Ar file +Store data part of the USB trace in binary format to the given +.Ar file . +This option also works with the -r and -f options. .It Fl i Ar ifname Listen on USB bus interface .Ar ifname . .It Fl r Ar file Read the raw packets from .Ar file . +This option also works with the -f option. .It Fl s Ar snaplen Snapshot .Ar snaplen @@ -62,6 +68,7 @@ When defined multiple times the verbosit .It Fl w Ar file Write the raw packets to .Ar file . +This option also works with the -s and -v options. .It Fl f Ar filter The filter argument consists of either one or two numbers separated by a dot. The first indicates the device unit number which should be traced. Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Tue Apr 24 03:59:21 2012 (r234635) +++ head/usr.sbin/usbdump/usbdump.c Tue Apr 24 06:26:14 2012 (r234636) @@ -82,6 +82,8 @@ struct usbcap { int wfd; /* for -r option */ int rfd; + /* for -b option */ + int bfd; }; struct usbcap_filehdr { @@ -112,6 +114,8 @@ static int uf_minor; static const char *i_arg = "usbus0"; static const char *r_arg = NULL; static const char *w_arg = NULL; +static const char *b_arg = NULL; +static struct usbcap uc; static const char *errstr_table[USB_ERR_MAX] = { [USB_ERR_NORMAL_COMPLETION] = "0", [USB_ERR_PENDING_REQUESTS] = "PENDING_REQUESTS", @@ -255,6 +259,22 @@ done: pprog->bf_insns = dynamic_insn; } +static int +match_filter(int unit, int endpoint) +{ + struct usb_filt *puf; + + if (STAILQ_FIRST(&usb_filt_head) == NULL) + return (1); + + STAILQ_FOREACH(puf, &usb_filt_head, entry) { + if ((puf->unit == -1 || puf->unit == unit) && + (puf->endpoint == -1 || puf->endpoint == endpoint)) + return (1); + } + return (0); +} + static void free_filter(struct bpf_program *pprog) { @@ -462,28 +482,33 @@ print_apacket(const struct header_32 *hd up->up_packet_count = le32toh(up->up_packet_count); up->up_endpoint = le32toh(up->up_endpoint); + if (!match_filter(up->up_address, up->up_endpoint)) + return; + tv.tv_sec = hdr->ts_sec; tv.tv_usec = hdr->ts_usec; tm = localtime(&tv.tv_sec); len = strftime(buf, sizeof(buf), "%H:%M:%S", tm); - printf("%.*s.%06ld usbus%d.%d %s-%s-EP=%08x,SPD=%s,NFR=%d,SLEN=%d,IVAL=%d%s%s\n", - (int)len, buf, tv.tv_usec, - (int)up->up_busunit, (int)up->up_address, - (up->up_type == USBPF_XFERTAP_SUBMIT) ? "SUBM" : "DONE", - xfertype_table[up->up_xfertype], - (unsigned int)up->up_endpoint, - usb_speedstr(up->up_speed), - (int)up->up_frames, - (int)(up->up_totlen - USBPF_HDR_LEN - - (USBPF_FRAME_HDR_LEN * up->up_frames)), - (int)up->up_interval, - (up->up_type == USBPF_XFERTAP_DONE) ? ",ERR=" : "", - (up->up_type == USBPF_XFERTAP_DONE) ? - usb_errstr(up->up_error) : ""); + if (verbose >= 0) { + printf("%.*s.%06ld usbus%d.%d %s-%s-EP=%08x,SPD=%s,NFR=%d,SLEN=%d,IVAL=%d%s%s\n", + (int)len, buf, tv.tv_usec, + (int)up->up_busunit, (int)up->up_address, + (up->up_type == USBPF_XFERTAP_SUBMIT) ? "SUBM" : "DONE", + xfertype_table[up->up_xfertype], + (unsigned int)up->up_endpoint, + usb_speedstr(up->up_speed), + (int)up->up_frames, + (int)(up->up_totlen - USBPF_HDR_LEN - + (USBPF_FRAME_HDR_LEN * up->up_frames)), + (int)up->up_interval, + (up->up_type == USBPF_XFERTAP_DONE) ? ",ERR=" : "", + (up->up_type == USBPF_XFERTAP_DONE) ? + usb_errstr(up->up_error) : ""); + } - if (verbose >= 1) { + if (verbose >= 1 || b_arg != NULL) { for (x = 0; x != up->up_frames; x++) { const struct usbpf_framehdr *uf; uint32_t framelen; @@ -498,10 +523,12 @@ print_apacket(const struct header_32 *hd framelen = le32toh(uf->length); flags = le32toh(uf->flags); - printf(" frame[%u] %s %d bytes\n", - (unsigned int)x, - (flags & USBPF_FRAMEFLAG_READ) ? "READ" : "WRITE", - (int)framelen); + if (verbose >= 1) { + printf(" frame[%u] %s %d bytes\n", + (unsigned int)x, + (flags & USBPF_FRAMEFLAG_READ) ? "READ" : "WRITE", + (int)framelen); + } if (flags & USBPF_FRAMEFLAG_DATA_FOLLOWS) { @@ -515,7 +542,15 @@ print_apacket(const struct header_32 *hd (int)framelen < 0 || (int)ptr_len < 0) break; - hexdump(ptr, framelen); + if (b_arg != NULL) { + struct usbcap *p = &uc; + int ret; + ret = write(p->bfd, ptr, framelen); + if (ret != (int)framelen) + err(EXIT_FAILURE, "Could not write binary data"); + } + if (verbose >= 1) + hexdump(ptr, framelen); ptr += tot_frame_len; } @@ -592,7 +627,7 @@ print_packets(uint8_t *data, const int d if (next <= ptr) err(EXIT_FAILURE, "Invalid length"); - if (w_arg == NULL || r_arg != NULL) { + if (verbose >= 0 || r_arg != NULL || b_arg != NULL) { print_apacket(&temp, ptr + temp.hdrlen, temp.caplen); } @@ -738,6 +773,7 @@ usage(void) fprintf(stderr, FMT, "-r ", "Read the raw packets from file"); fprintf(stderr, FMT, "-s ", "Snapshot bytes from each packet"); fprintf(stderr, FMT, "-v", "Increase the verbose level"); + fprintf(stderr, FMT, "-b ", "Save raw version of all recorded data to file"); fprintf(stderr, FMT, "-w ", "Write the raw packets to file"); #undef FMT exit(EX_USAGE); @@ -750,7 +786,7 @@ main(int argc, char *argv[]) struct bpf_program total_prog; struct bpf_stat us; struct bpf_version bv; - struct usbcap uc, *p = &uc; + struct usbcap *p = &uc; struct ifreq ifr; long snapshot = 192; uint32_t v; @@ -761,9 +797,7 @@ main(int argc, char *argv[]) const char *optstring; char *pp; - memset(&uc, 0, sizeof(struct usbcap)); - - optstring = "i:r:s:vw:f:"; + optstring = "b:i:r:s:vw:f:"; while ((o = getopt(argc, argv, optstring)) != -1) { switch (o) { case 'i': @@ -784,6 +818,9 @@ main(int argc, char *argv[]) if (snapshot == 0) snapshot = -1; break; + case 'b': + b_arg = optarg; + break; case 'v': verbose++; break; @@ -811,6 +848,22 @@ main(int argc, char *argv[]) } } + if (b_arg != NULL) { + p->bfd = open(b_arg, O_CREAT | O_TRUNC | + O_WRONLY, S_IRUSR | S_IWUSR); + if (p->bfd < 0) { + err(EXIT_FAILURE, "Could not open " + "'%s' for write", b_arg); + } + } + + /* + * Require more verbosity to print anything when -w or -b is + * specified on the command line: + */ + if (w_arg != NULL || b_arg != NULL) + verbose--; + if (r_arg != NULL) { read_file(p); exit(EXIT_SUCCESS); @@ -882,6 +935,8 @@ main(int argc, char *argv[]) close(p->rfd); if (p->wfd > 0) close(p->wfd); + if (p->bfd > 0) + close(p->bfd); return (EXIT_SUCCESS); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 08:30:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B329106566C; Tue, 24 Apr 2012 08:30:56 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 467C08FC0A; Tue, 24 Apr 2012 08:30:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O8UuML038041; Tue, 24 Apr 2012 08:30:56 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O8Uugp038039; Tue, 24 Apr 2012 08:30:56 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201204240830.q3O8Uugp038039@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 24 Apr 2012 08:30:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234643 - head/sys/dev/re X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 08:30:56 -0000 Author: bz Date: Tue Apr 24 08:30:55 2012 New Revision: 234643 URL: http://svn.freebsd.org/changeset/base/234643 Log: Do not toggle IFCAP_TSO4 if we would also do TSO6. Given the driver does not currently announce/support TSO6 that cannot happen. Clean it up anyway for consistency. Reviewed by: yongari MFC after: 1 week Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Tue Apr 24 08:30:36 2012 (r234642) +++ head/sys/dev/re/if_re.c Tue Apr 24 08:30:55 2012 (r234643) @@ -3432,7 +3432,7 @@ re_ioctl(struct ifnet *ifp, u_long comma reinit = 1; } if ((mask & IFCAP_TSO4) != 0 && - (ifp->if_capabilities & IFCAP_TSO) != 0) { + (ifp->if_capabilities & IFCAP_TSO4) != 0) { ifp->if_capenable ^= IFCAP_TSO4; if ((IFCAP_TSO4 & ifp->if_capenable) != 0) ifp->if_hwassist |= CSUM_TSO; From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 09:05:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE073106564A for ; Tue, 24 Apr 2012 09:05:29 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BF25A8FC15 for ; Tue, 24 Apr 2012 09:05:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q3O95S0T010401 for ; Tue, 24 Apr 2012 09:05:29 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4F966CD6.6030302@gmail.com> Date: Tue, 24 Apr 2012 17:05:26 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: svn-src-head@freebsd.org References: <201204232056.q3NKu6hU015276@svn.freebsd.org> In-Reply-To: <201204232056.q3NKu6hU015276@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: svn commit: r234616 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 09:05:30 -0000 On 2012/4/24 4:56, Konstantin Belousov wrote: > Author: kib > Date: Mon Apr 23 20:56:05 2012 > New Revision: 234616 > URL: http://svn.freebsd.org/changeset/base/234616 > > Log: > Allow for the process information sysctls to accept a thread id in addition > to the process id. It follows the ptrace(2) interface and allows debugging > libraries to use thread ids directly, without slow and verbose conversion > of thread id into pid. > > The PGET_NOTID flag is provided to allow a specific sysctl to disallow > this behaviour. All current callers of pget(9) have useful semantic to > operate on tid and do not need this flag. > > Reviewed by: jhb, trocini > MFC after: 1 week > > Modified: > head/sys/kern/kern_proc.c > head/sys/sys/proc.h > > Modified: head/sys/kern/kern_proc.c > ============================================================================== > --- head/sys/kern/kern_proc.c Mon Apr 23 20:53:50 2012 (r234615) > +++ head/sys/kern/kern_proc.c Mon Apr 23 20:56:05 2012 (r234616) > @@ -309,6 +309,30 @@ pfind(pid) > return (p); > } > > +static struct proc * > +pfind_tid(pid_t tid) > +{ > + struct proc *p; > + struct thread *td; > + > + sx_slock(&allproc_lock); > + FOREACH_PROC_IN_SYSTEM(p) { > + PROC_LOCK(p); > + if (p->p_state == PRS_NEW) { > + PROC_UNLOCK(p); > + continue; > + } > + FOREACH_THREAD_IN_PROC(p, td) { > + if (td->td_tid == tid) > + goto found; > + } > + PROC_UNLOCK(p); > + } > +found: > + sx_sunlock(&allproc_lock); > + return (p); > +} > + There is a tdfind(tid, pid) function which is faster in kern_thread.c, is it not good enough or is there any problem I don't see ? :( > /* > * Locate a process group by number. > * The caller must hold proctree_lock. > @@ -339,7 +363,12 @@ pget(pid_t pid, int flags, struct proc * > struct proc *p; > int error; > > - p = pfind(pid); > + if (pid<= PID_MAX) > + p = pfind(pid); > + else if ((flags& PGET_NOTID) == 0) > + p = pfind_tid(pid); > + else > + p = NULL; > if (p == NULL) > return (ESRCH); > if ((flags& PGET_CANSEE) != 0) { > > Modified: head/sys/sys/proc.h > ============================================================================== > --- head/sys/sys/proc.h Mon Apr 23 20:53:50 2012 (r234615) > +++ head/sys/sys/proc.h Mon Apr 23 20:56:05 2012 (r234616) > @@ -840,6 +840,7 @@ struct proc *zpfind(pid_t); /* Find zom > #define PGET_ISCURRENT 0x00008 /* Check that the found process is current. */ > #define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */ > #define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */ > +#define PGET_NOTID 0x00040 /* Do not assume tid if pid> PID_MAX. */ > > #define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT) > > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 11:42:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D9231065672; Tue, 24 Apr 2012 11:42:49 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 286B08FC08; Tue, 24 Apr 2012 11:42:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OBgnd0046971; Tue, 24 Apr 2012 11:42:49 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OBgmck046969; Tue, 24 Apr 2012 11:42:48 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201204241142.q3OBgmck046969@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 24 Apr 2012 11:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234646 - head/contrib/jemalloc/include/jemalloc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 11:42:49 -0000 Author: jchandra Date: Tue Apr 24 11:42:48 2012 New Revision: 234646 URL: http://svn.freebsd.org/changeset/base/234646 Log: jemalloc: pointer size definition for 64-bit mips platforms LG_SIZEOF_PTR has to be defined as 3 when jemalloc is compiled for 64 bit platforms. Reviewed by: juli Approved by: jasone Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Apr 24 10:20:24 2012 (r234645) +++ head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Apr 24 11:42:48 2012 (r234646) @@ -41,8 +41,12 @@ # define LG_SIZEOF_PTR 2 #endif #ifdef __mips__ +#ifdef __mips_n64 +# define LG_SIZEOF_PTR 3 +#else # define LG_SIZEOF_PTR 2 #endif +#endif #ifdef __powerpc64__ # define LG_SIZEOF_PTR 3 #elif defined(__powerpc__) From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 13:36:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5075E1065676; Tue, 24 Apr 2012 13:36:42 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C0A08FC0A; Tue, 24 Apr 2012 13:36:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3ODagcZ050708; Tue, 24 Apr 2012 13:36:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3ODagrq050706; Tue, 24 Apr 2012 13:36:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204241336.q3ODagrq050706@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 24 Apr 2012 13:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234652 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 13:36:42 -0000 Author: nwhitehorn Date: Tue Apr 24 13:36:41 2012 New Revision: 234652 URL: http://svn.freebsd.org/changeset/base/234652 Log: Revert r234581 for this file. The lockless SLB tree code does in fact need a heavyweight sync instead of a lightweight sync to function properly. Thanks to mdf for the clarification. Modified: head/sys/powerpc/aim/slb.c Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Tue Apr 24 13:13:42 2012 (r234651) +++ head/sys/powerpc/aim/slb.c Tue Apr 24 13:36:41 2012 (r234652) @@ -139,7 +139,7 @@ make_new_leaf(uint64_t esid, uint64_t sl * that a lockless searcher always sees a valid path through * the tree. */ - mb(); + powerpc_sync(); idx = esid2idx(esid, parent->ua_level); parent->u.ua_child[idx] = child; @@ -187,7 +187,7 @@ make_intermediate(uint64_t esid, struct idx = esid2idx(child->ua_base, inter->ua_level); inter->u.ua_child[idx] = child; setbit(&inter->ua_alloc, idx); - mb(); + powerpc_sync(); /* Set up parent to point to intermediate node ... */ idx = esid2idx(inter->ua_base, parent->ua_level); From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 13:37:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88EC4106564A; Tue, 24 Apr 2012 13:37:44 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73DF28FC19; Tue, 24 Apr 2012 13:37:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3ODbijm050780; Tue, 24 Apr 2012 13:37:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3ODbiFi050778; Tue, 24 Apr 2012 13:37:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204241337.q3ODbiFi050778@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 24 Apr 2012 13:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234653 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 13:37:44 -0000 Author: nwhitehorn Date: Tue Apr 24 13:37:43 2012 New Revision: 234653 URL: http://svn.freebsd.org/changeset/base/234653 Log: Switch the default I/O memory barrier to eieio, as it should be. This does not appear to cause any problems due to fixes elsewhere. MFC after: 2 months Modified: head/sys/powerpc/include/pio.h Modified: head/sys/powerpc/include/pio.h ============================================================================== --- head/sys/powerpc/include/pio.h Tue Apr 24 13:36:41 2012 (r234652) +++ head/sys/powerpc/include/pio.h Tue Apr 24 13:37:43 2012 (r234653) @@ -39,11 +39,7 @@ * I/O macros. */ -/* - * Note: this should be eieio, but many drivers expect ordering with - * main storage too. - */ -#define powerpc_iomb() __asm __volatile("sync" : : : "memory") +#define powerpc_iomb() __asm __volatile("eieio" : : : "memory") static __inline void __outb(volatile u_int8_t *a, u_int8_t v) From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 13:44:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B1D51065677; Tue, 24 Apr 2012 13:44:47 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 459AD8FC1D; Tue, 24 Apr 2012 13:44:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3ODilSk051051; Tue, 24 Apr 2012 13:44:47 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3ODilS8051048; Tue, 24 Apr 2012 13:44:47 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201204241344.q3ODilS8051048@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 24 Apr 2012 13:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234654 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 13:44:47 -0000 Author: pjd Date: Tue Apr 24 13:44:46 2012 New Revision: 234654 URL: http://svn.freebsd.org/changeset/base/234654 Log: Add -u option to 'zfs create' that prevents file system from being automatically mounted. This is similar to the 'zfs receive -u'. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 24 13:37:43 2012 (r234653) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 24 13:44:46 2012 (r234654) @@ -35,7 +35,7 @@ .Op Fl \&? .Nm .Cm create -.Op Fl p +.Op Fl pu .Op Fl o Ar property Ns = Ns Ar value .Ar ... filesystem .Nm @@ -1354,7 +1354,7 @@ Displays a help message. .It Xo .Nm .Cm create -.Op Fl p +.Op Fl pu .Op Fl o Ar property Ns = Ns Ar value .Ar ... filesystem .Xc @@ -1374,6 +1374,8 @@ line using the .Fl o option is ignored. If the target filesystem already exists, the operation completes successfully. +.It Fl u +Newly created file system is not mounted. .It Fl o Ar property Ns = Ns Ar value Sets the specified property as if the command .Qq Nm Cm set Ar property Ns = Ns Ar value Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Apr 24 13:37:43 2012 (r234653) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Apr 24 13:44:46 2012 (r234654) @@ -217,7 +217,7 @@ get_usage(zfs_help_t idx) return (gettext("\tclone [-p] [-o property=value] ... " " \n")); case HELP_CREATE: - return (gettext("\tcreate [-p] [-o property=value] ... " + return (gettext("\tcreate [-pu] [-o property=value] ... " "\n" "\tcreate [-ps] [-b blocksize] [-o property=value] ... " "-V \n")); @@ -681,7 +681,7 @@ usage: } /* - * zfs create [-p] [-o prop=value] ... fs + * zfs create [-pu] [-o prop=value] ... fs * zfs create [-ps] [-b blocksize] [-o prop=value] ... -V vol size * * Create a new dataset. This command can be used to create filesystems @@ -694,6 +694,8 @@ usage: * SPA_VERSION_REFRESERVATION, we set a refreservation instead. * * The '-p' flag creates all the non-existing ancestors of the target first. + * + * The '-u' flag prevents mounting of newly created file system. */ static int zfs_do_create(int argc, char **argv) @@ -705,6 +707,7 @@ zfs_do_create(int argc, char **argv) boolean_t noreserve = B_FALSE; boolean_t bflag = B_FALSE; boolean_t parents = B_FALSE; + boolean_t nomount = B_FALSE; int ret = 1; nvlist_t *props; uint64_t intval; @@ -714,7 +717,7 @@ zfs_do_create(int argc, char **argv) nomem(); /* check options */ - while ((c = getopt(argc, argv, ":V:b:so:p")) != -1) { + while ((c = getopt(argc, argv, ":V:b:so:pu")) != -1) { switch (c) { case 'V': type = ZFS_TYPE_VOLUME; @@ -754,6 +757,9 @@ zfs_do_create(int argc, char **argv) case 's': noreserve = B_TRUE; break; + case 'u': + nomount = B_TRUE; + break; case ':': (void) fprintf(stderr, gettext("missing size " "argument\n")); @@ -771,6 +777,11 @@ zfs_do_create(int argc, char **argv) "used when creating a volume\n")); goto badusage; } + if (nomount && type != ZFS_TYPE_FILESYSTEM) { + (void) fprintf(stderr, gettext("'-u' can only be " + "used when creating a file system\n")); + goto badusage; + } argc -= optind; argv += optind; @@ -853,7 +864,7 @@ zfs_do_create(int argc, char **argv) * verbose error message to let the user know that their filesystem was * in fact created, even if we failed to mount or share it. */ - if (canmount == ZFS_CANMOUNT_ON) { + if (!nomount && canmount == ZFS_CANMOUNT_ON) { if (zfs_mount(zhp, NULL, 0) != 0) { (void) fprintf(stderr, gettext("filesystem " "successfully created, but not mounted\n")); From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 14:06:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D16061065674; Tue, 24 Apr 2012 14:06:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC82C8FC14; Tue, 24 Apr 2012 14:06:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OE672w051753; Tue, 24 Apr 2012 14:06:07 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OE67ZX051750; Tue, 24 Apr 2012 14:06:07 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204241406.q3OE67ZX051750@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 24 Apr 2012 14:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234655 - head/usr.sbin/usbdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 14:06:07 -0000 Author: hselasky Date: Tue Apr 24 14:06:07 2012 New Revision: 234655 URL: http://svn.freebsd.org/changeset/base/234655 Log: Add missing and probably also mandatory -h option. MFC after: 1 week Modified: head/usr.sbin/usbdump/usbdump.8 head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.8 ============================================================================== --- head/usr.sbin/usbdump/usbdump.8 Tue Apr 24 13:44:46 2012 (r234654) +++ head/usr.sbin/usbdump/usbdump.8 Tue Apr 24 14:06:07 2012 (r234655) @@ -40,6 +40,7 @@ .Op Fl w Ar file .Op Fl f Ar filter .Op Fl b Ar file +.Op Fl h .Sh DESCRIPTION The .Nm @@ -79,6 +80,8 @@ If 128 is added to the endpoint number t A device unit or endpoint value of -1 means ignore this field. If no filters are specified, all packets are passed through using the default -1,-1 filter. This option can be specified multiple times. +.It Fl h +This option displays a summary of the command line options. .El .Sh EXAMPLES Capture the USB raw packets on usbus2: Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Tue Apr 24 13:44:46 2012 (r234654) +++ head/usr.sbin/usbdump/usbdump.c Tue Apr 24 14:06:07 2012 (r234655) @@ -775,6 +775,7 @@ usage(void) fprintf(stderr, FMT, "-v", "Increase the verbose level"); fprintf(stderr, FMT, "-b ", "Save raw version of all recorded data to file"); fprintf(stderr, FMT, "-w ", "Write the raw packets to file"); + fprintf(stderr, FMT, "-h", "Display summary of command line options"); #undef FMT exit(EX_USAGE); } @@ -797,7 +798,7 @@ main(int argc, char *argv[]) const char *optstring; char *pp; - optstring = "b:i:r:s:vw:f:"; + optstring = "b:hi:r:s:vw:f:"; while ((o = getopt(argc, argv, optstring)) != -1) { switch (o) { case 'i': From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 15:50:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82F9A1065670; Tue, 24 Apr 2012 15:50:20 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 046818FC0C; Tue, 24 Apr 2012 15:50:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id q3OFoCBK040855; Tue, 24 Apr 2012 19:50:12 +0400 (MSK) (envelope-from marck@rinet.ru) Date: Tue, 24 Apr 2012 19:50:12 +0400 (MSK) From: Dmitry Morozovsky To: Peter Holm In-Reply-To: <201203082034.q28KYDwq063702@svn.freebsd.org> Message-ID: References: <201203082034.q28KYDwq063702@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (woozle.rinet.ru [0.0.0.0]); Tue, 24 Apr 2012 19:50:12 +0400 (MSK) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232702 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 15:50:20 -0000 Dear Peter, On Thu, 8 Mar 2012, Peter Holm wrote: > Author: pho > Date: Thu Mar 8 20:34:13 2012 > New Revision: 232702 > URL: http://svn.freebsd.org/changeset/base/232702 > > Log: > Free up allocated memory used by posix_fadvise(2). Time to MFC this? We've found huge kernel memory leaks in massive rrdtool usage without this change. Thanks! -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 17:00:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 566931065676; Tue, 24 Apr 2012 17:00:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 432E98FC0C; Tue, 24 Apr 2012 17:00:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OH0ViV057139; Tue, 24 Apr 2012 17:00:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OH0Vdg057137; Tue, 24 Apr 2012 17:00:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204241700.q3OH0Vdg057137@svn.freebsd.org> From: Dimitry Andric Date: Tue, 24 Apr 2012 17:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234656 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 17:00:31 -0000 Author: dim Date: Tue Apr 24 17:00:30 2012 New Revision: 234656 URL: http://svn.freebsd.org/changeset/base/234656 Log: After r234596, temporarily disable building clang on 32-bit PowerPC, until we are able to fix the binutils bug that makes linking clang fail with "relocation truncated to fit: R_PPC_REL24" errors. This should fix the tinderboxes for now. Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Apr 24 14:06:07 2012 (r234655) +++ head/share/mk/bsd.own.mk Tue Apr 24 17:00:30 2012 (r234656) @@ -441,7 +441,8 @@ __T=${TARGET_ARCH} __T=${MACHINE_ARCH} .endif # Clang is only for x86 and powerpc right now, by default. -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} +# XXX: Temporarily disabled for 32-bit powerpc, due to a binutils bug. +.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc64" __DEFAULT_YES_OPTIONS+=CLANG .else __DEFAULT_NO_OPTIONS+=CLANG From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 17:25:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81DC1106568E for ; Tue, 24 Apr 2012 17:25:54 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id 1D75C8FC17 for ; Tue, 24 Apr 2012 17:25:53 +0000 (UTC) Received: (qmail 86877 invoked from network); 24 Apr 2012 17:24:46 -0000 Received: from 87.58.144.241 (HELO x2.osted.lan) (87.58.144.241) by relay03.pair.com with SMTP; 24 Apr 2012 17:24:46 -0000 X-pair-Authenticated: 87.58.144.241 Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.4/8.14.4) with ESMTP id q3OHPj4w062368; Tue, 24 Apr 2012 19:25:45 +0200 (CEST) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.4/8.14.4/Submit) id q3OHPjM2062367; Tue, 24 Apr 2012 19:25:45 +0200 (CEST) (envelope-from pho) Date: Tue, 24 Apr 2012 19:25:45 +0200 From: Peter Holm To: Dmitry Morozovsky Message-ID: <20120424172545.GA60959@x2.osted.lan> References: <201203082034.q28KYDwq063702@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232702 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 17:25:54 -0000 On Tue, Apr 24, 2012 at 07:50:12PM +0400, Dmitry Morozovsky wrote: > Dear Peter, > > On Thu, 8 Mar 2012, Peter Holm wrote: > > > Author: pho > > Date: Thu Mar 8 20:34:13 2012 > > New Revision: 232702 > > URL: http://svn.freebsd.org/changeset/base/232702 > > > > Log: > > Free up allocated memory used by posix_fadvise(2). > > Time to MFC this? We've found huge kernel memory leaks in massive rrdtool > usage without this change. > Yes, you are right. Thank you for reminding me. - Peter > Thanks! > > > -- > Sincerely, > D.Marck [DM5020, MCK-RIPE, DM3-RIPN] > [ FreeBSD committer: marck@FreeBSD.org ] > ------------------------------------------------------------------------ > *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** > ------------------------------------------------------------------------ From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 17:51:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A4431065670; Tue, 24 Apr 2012 17:51:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E95318FC1C; Tue, 24 Apr 2012 17:51:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OHpa2q058688; Tue, 24 Apr 2012 17:51:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OHpaih058684; Tue, 24 Apr 2012 17:51:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204241751.q3OHpaih058684@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Apr 2012 17:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234657 - in head/lib/libc: include stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 17:51:37 -0000 Author: kib Date: Tue Apr 24 17:51:36 2012 New Revision: 234657 URL: http://svn.freebsd.org/changeset/base/234657 Log: Take the spinlock around clearing of the fp->_flags in fclose(3), which indicates the avaliability of FILE, to prevent possible reordering of the writes as seen by other CPUs. Reported by: Fengwei yin Reviewed by: jhb MFC after: 1 week Modified: head/lib/libc/include/libc_private.h head/lib/libc/stdio/fclose.c head/lib/libc/stdio/findfp.c Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Tue Apr 24 17:00:30 2012 (r234656) +++ head/lib/libc/include/libc_private.h Tue Apr 24 17:51:36 2012 (r234657) @@ -81,6 +81,19 @@ void _rtld_error(const char *fmt, ...); #define FLOCKFILE(fp) if (__isthreaded) _FLOCKFILE(fp) #define FUNLOCKFILE(fp) if (__isthreaded) _funlockfile(fp) +struct _spinlock; +extern struct _spinlock __stdio_thread_lock; +#define STDIO_THREAD_LOCK() \ +do { \ + if (__isthreaded) \ + _SPINLOCK(&__stdio_thread_lock); \ +} while (0) +#define STDIO_THREAD_UNLOCK() \ +do { \ + if (__isthreaded) \ + _SPINUNLOCK(&__stdio_thread_lock); \ +} while (0) + /* * Indexes into the pthread jump table. * Modified: head/lib/libc/stdio/fclose.c ============================================================================== --- head/lib/libc/stdio/fclose.c Tue Apr 24 17:00:30 2012 (r234656) +++ head/lib/libc/stdio/fclose.c Tue Apr 24 17:51:36 2012 (r234657) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "un-namespace.h" +#include #include "libc_private.h" #include "local.h" @@ -65,7 +66,20 @@ fclose(FILE *fp) FREELB(fp); fp->_file = -1; fp->_r = fp->_w = 0; /* Mess up if reaccessed. */ + + /* + * Lock the spinlock used to protect __sglue list walk in + * __sfp(). The __sfp() uses fp->_flags == 0 test as an + * indication of the unused FILE. + * + * Taking the lock prevents possible compiler or processor + * reordering of the writes performed before the final _flags + * cleanup, making sure that we are done with the FILE before + * it is considered available. + */ + STDIO_THREAD_LOCK(); fp->_flags = 0; /* Release this FILE for reuse. */ + STDIO_THREAD_UNLOCK(); FUNLOCKFILE(fp); return (r); } Modified: head/lib/libc/stdio/findfp.c ============================================================================== --- head/lib/libc/stdio/findfp.c Tue Apr 24 17:00:30 2012 (r234656) +++ head/lib/libc/stdio/findfp.c Tue Apr 24 17:51:36 2012 (r234657) @@ -82,9 +82,7 @@ static struct glue *lastglue = &uglue; static struct glue * moreglue(int); -static spinlock_t thread_lock = _SPINLOCK_INITIALIZER; -#define THREAD_LOCK() if (__isthreaded) _SPINLOCK(&thread_lock) -#define THREAD_UNLOCK() if (__isthreaded) _SPINUNLOCK(&thread_lock) +spinlock_t __stdio_thread_lock = _SPINLOCK_INITIALIZER; #if NOT_YET #define SET_GLUE_PTR(ptr, val) atomic_set_rel_ptr(&(ptr), (uintptr_t)(val)) @@ -127,22 +125,22 @@ __sfp() /* * The list must be locked because a FILE may be updated. */ - THREAD_LOCK(); + STDIO_THREAD_LOCK(); for (g = &__sglue; g != NULL; g = g->next) { for (fp = g->iobs, n = g->niobs; --n >= 0; fp++) if (fp->_flags == 0) goto found; } - THREAD_UNLOCK(); /* don't hold lock while malloc()ing. */ + STDIO_THREAD_UNLOCK(); /* don't hold lock while malloc()ing. */ if ((g = moreglue(NDYNAMIC)) == NULL) return (NULL); - THREAD_LOCK(); /* reacquire the lock */ + STDIO_THREAD_LOCK(); /* reacquire the lock */ SET_GLUE_PTR(lastglue->next, g); /* atomically append glue to list */ lastglue = g; /* not atomic; only accessed when locked */ fp = g->iobs; found: fp->_flags = 1; /* reserve this slot; caller sets real flags */ - THREAD_UNLOCK(); + STDIO_THREAD_UNLOCK(); fp->_p = NULL; /* no current pointer */ fp->_w = 0; /* nothing to read or write */ fp->_r = 0; @@ -183,10 +181,10 @@ f_prealloc(void) for (g = &__sglue; (n -= g->niobs) > 0 && g->next; g = g->next) /* void */; if ((n > 0) && ((g = moreglue(n)) != NULL)) { - THREAD_LOCK(); + STDIO_THREAD_LOCK(); SET_GLUE_PTR(lastglue->next, g); lastglue = g; - THREAD_UNLOCK(); + STDIO_THREAD_UNLOCK(); } } From owner-svn-src-head@FreeBSD.ORG Tue Apr 24 18:41:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BFF7C106566B; Tue, 24 Apr 2012 18:41:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAEFA8FC08; Tue, 24 Apr 2012 18:41:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OIfHdK060307; Tue, 24 Apr 2012 18:41:17 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OIfHsV060305; Tue, 24 Apr 2012 18:41:17 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204241841.q3OIfHsV060305@svn.freebsd.org> From: Dimitry Andric Date: Tue, 24 Apr 2012 18:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234658 - head/contrib/jemalloc/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 18:41:17 -0000 Author: dim Date: Tue Apr 24 18:41:17 2012 New Revision: 234658 URL: http://svn.freebsd.org/changeset/base/234658 Log: Work around llvm PR 12623, which makes variables declared with .symver sometimes disappear from the resulting object file, if compiled with clang. In particular, this can lead to errors when building world with clang and -g, similar to: /usr/obj/usr/src/tmp/usr/lib/libc.so: undefined reference to `_malloc_options' Reported by: Conrad J. Sabatier Reviewed by: jasone Modified: head/contrib/jemalloc/src/jemalloc.c Modified: head/contrib/jemalloc/src/jemalloc.c ============================================================================== --- head/contrib/jemalloc/src/jemalloc.c Tue Apr 24 17:51:36 2012 (r234657) +++ head/contrib/jemalloc/src/jemalloc.c Tue Apr 24 18:41:17 2012 (r234658) @@ -8,7 +8,8 @@ malloc_tsd_data(, arenas, arena_t *, NUL malloc_tsd_data(, thread_allocated, thread_allocated_t, THREAD_ALLOCATED_INITIALIZER) -const char *__malloc_options_1_0; +/* Work around : */ +const char *__malloc_options_1_0 = NULL; __sym_compat(_malloc_options, __malloc_options_1_0, FBSD_1.0); /* Runtime configuration options. */ From owner-svn-src-head@FreeBSD.ORG Wed Apr 25 01:24:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 204E0106564A; Wed, 25 Apr 2012 01:24:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BBC78FC0A; Wed, 25 Apr 2012 01:24:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P1OdXu073383; Wed, 25 Apr 2012 01:24:39 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P1OdZh073381; Wed, 25 Apr 2012 01:24:39 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204250124.q3P1OdZh073381@svn.freebsd.org> From: Adrian Chadd Date: Wed, 25 Apr 2012 01:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234663 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 01:24:40 -0000 Author: adrian Date: Wed Apr 25 01:24:39 2012 New Revision: 234663 URL: http://svn.freebsd.org/changeset/base/234663 Log: Add a note that explains what the current state of the register byte order macros are. Modified: head/sys/dev/ath/ah_osdep.h Modified: head/sys/dev/ath/ah_osdep.h ============================================================================== --- head/sys/dev/ath/ah_osdep.h Tue Apr 24 21:38:41 2012 (r234662) +++ head/sys/dev/ath/ah_osdep.h Wed Apr 25 01:24:39 2012 (r234663) @@ -75,6 +75,10 @@ struct ath_hal; * domain registers are not byte swapped! Thus, on big-endian * platforms we have to explicitly byte-swap those registers. * OS_REG_UNSWAPPED identifies the registers that need special handling. + * + * This is not currently used by the FreeBSD HAL osdep code; the HAL + * currently does not configure hardware byteswapping for register space + * accesses and instead does it through the FreeBSD bus space code. */ #if _BYTE_ORDER == _BIG_ENDIAN #define OS_REG_UNSWAPPED(_reg) \ From owner-svn-src-head@FreeBSD.ORG Wed Apr 25 01:42:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96E691065670; Wed, 25 Apr 2012 01:42:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68BF48FC0A; Wed, 25 Apr 2012 01:42:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P1gNWM073938; Wed, 25 Apr 2012 01:42:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P1gNXt073935; Wed, 25 Apr 2012 01:42:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204250142.q3P1gNXt073935@svn.freebsd.org> From: Adrian Chadd Date: Wed, 25 Apr 2012 01:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234664 - in head/sys/dev/ath: . ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 01:42:23 -0000 Author: adrian Date: Wed Apr 25 01:42:22 2012 New Revision: 234664 URL: http://svn.freebsd.org/changeset/base/234664 Log: Add placeholder methods for WMI command access (USB, perhaps SDIO later) which will be needed for AR7010 and AR9287 USB access. The names differ slightly from Linux and Atheros, for the sake of consistency. A lot more work is required in order to convert the 11n HAL support to fully support USB. Modified: head/sys/dev/ath/ah_osdep.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/dev/ath/ah_osdep.h ============================================================================== --- head/sys/dev/ath/ah_osdep.h Wed Apr 25 01:24:39 2012 (r234663) +++ head/sys/dev/ath/ah_osdep.h Wed Apr 25 01:42:22 2012 (r234664) @@ -89,6 +89,20 @@ struct ath_hal; #endif /* _BYTE_ORDER */ /* + * For USB/SDIO support (where access latencies are quite high); + * some write accesses may be buffered and then flushed when + * either a read is done, or an explicit flush is done. + * + * These are simply placeholders for now. + */ +#define OS_REG_WRITE_BUFFER_ENABLE(_ah) \ + do { } while (0) +#define OS_REG_WRITE_BUFFER_DISABLE(_ah) \ + do { } while (0) +#define OS_REG_WRITE_BUFFER_FLUSH(_ah) \ + do { } while (0) + +/* * Register read/write operations are either handled through * platform-dependent routines (or when debugging is enabled * with AH_DEBUG); or they are inline expanded using the macros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Apr 25 01:24:39 2012 (r234663) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Apr 25 01:42:22 2012 (r234664) @@ -581,6 +581,8 @@ ar5416SpurMitigate(struct ath_hal *ah, c AR_PHY_TIMING_CTRL4_ENABLE_CHAN_MASK | AR_PHY_TIMING_CTRL4_ENABLE_PILOT_MASK); + OS_REG_WRITE_BUFFER_ENABLE(ah); + OS_REG_WRITE(ah, AR_PHY_TIMING_CTRL4_CHAIN(0), new); new = (AR_PHY_SPUR_REG_MASK_RATE_CNTL | @@ -765,6 +767,9 @@ ar5416SpurMitigate(struct ath_hal *ah, c | (mask_p[47] << 2) | (mask_p[46] << 0); OS_REG_WRITE(ah, AR_PHY_BIN_MASK2_4, tmp_mask); OS_REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask); + + OS_REG_WRITE_BUFFER_FLUSH(ah); + OS_REG_WRITE_BUFFER_DISABLE(ah); } /* From owner-svn-src-head@FreeBSD.ORG Wed Apr 25 02:05:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEAD4106566C; Wed, 25 Apr 2012 02:05:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 601FA8FC0A; Wed, 25 Apr 2012 02:05:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P25Fe5074748; Wed, 25 Apr 2012 02:05:15 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P25FiN074746; Wed, 25 Apr 2012 02:05:15 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201204250205.q3P25FiN074746@svn.freebsd.org> From: Ed Maste Date: Wed, 25 Apr 2012 02:05:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234665 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 02:05:15 -0000 Author: emaste Date: Wed Apr 25 02:05:14 2012 New Revision: 234665 URL: http://svn.freebsd.org/changeset/base/234665 Log: Fix cut-and-paste comment error Submitted by: sbruno Modified: head/sys/dev/e1000/if_igb.h Modified: head/sys/dev/e1000/if_igb.h ============================================================================== --- head/sys/dev/e1000/if_igb.h Wed Apr 25 01:42:22 2012 (r234664) +++ head/sys/dev/e1000/if_igb.h Wed Apr 25 02:05:14 2012 (r234665) @@ -52,7 +52,7 @@ #define IGB_MAX_TXD 4096 /* - * IGB_RXD: Maximum number of Transmit Descriptors + * IGB_RXD: Maximum number of Receive Descriptors * * This value is the number of receive descriptors allocated by the driver. * Increasing this value allows the driver to buffer more incoming packets. From owner-svn-src-head@FreeBSD.ORG Wed Apr 25 02:46:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C5A3106564A; Wed, 25 Apr 2012 02:46:14 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37CE78FC1D; Wed, 25 Apr 2012 02:46:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P2kErd075987; Wed, 25 Apr 2012 02:46:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P2kE8f075985; Wed, 25 Apr 2012 02:46:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201204250246.q3P2kE8f075985@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 25 Apr 2012 02:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234666 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 02:46:14 -0000 Author: yongari Date: Wed Apr 25 02:46:13 2012 New Revision: 234666 URL: http://svn.freebsd.org/changeset/base/234666 Log: For Yukon II controllers that implement optional temperature sensor and voltage sensor, TWSI is used to get sensor data. msk(4) does not monitor these sensors and interrupt for TWSI completion is disabled by default. However, due to unknown reason, the TWSI completion interrupt fires and it resulted in interrupt storm. To fix it, acknowledges the TWSI completion interrupt if driver see the event. Given that not all Yukon II controllers show the issue it could be a silicon bug which does not honor interrupt masking. Probably the right way to address the issue is disabling automatic TWSI cycle initiation against these sensors. It would be even better to implement reading voltage/temperature from the NIC but it requires access to National LM80 through TWSI and documentation to do that is not available yet(probably will never happen). Reported by: jhb Tested by: jhb MFC after: 2 weeks Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Wed Apr 25 02:05:14 2012 (r234665) +++ head/sys/dev/msk/if_msk.c Wed Apr 25 02:46:13 2012 (r234666) @@ -3734,6 +3734,9 @@ msk_intr(void *xsc) if ((status & Y2_IS_STAT_BMU) != 0 && domore == 0) CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_CLR_IRQ); + /* Clear TWSI IRQ. */ + if ((status & Y2_IS_TWSI_RDY) != 0) + CSR_WRITE_4(sc, B2_I2C_IRQ, 1); /* Reenable interrupts. */ CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2); From owner-svn-src-head@FreeBSD.ORG Wed Apr 25 17:54:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A34A1065674; Wed, 25 Apr 2012 17:54:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F05C08FC12; Wed, 25 Apr 2012 17:54:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PHsQ93008777; Wed, 25 Apr 2012 17:54:26 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PHsQ3t008774; Wed, 25 Apr 2012 17:54:26 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204251754.q3PHsQ3t008774@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 25 Apr 2012 17:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234684 - head/lib/libusb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 17:54:27 -0000 Author: hselasky Date: Wed Apr 25 17:54:26 2012 New Revision: 234684 URL: http://svn.freebsd.org/changeset/base/234684 Log: Fix binary compatibility to the official LibUSB 1.0. This is useful for GNU/kFreeBSD and the libusb2debian port. Applications using the asynchronous API of LibUSB 1.0 needs to be recompiled after this update. Found by: lme @ Modified: head/lib/libusb/libusb.h head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Wed Apr 25 12:02:06 2012 (r234683) +++ head/lib/libusb/libusb.h Wed Apr 25 17:54:26 2012 (r234684) @@ -340,7 +340,7 @@ typedef void (*libusb_transfer_cb_fn) (s typedef struct libusb_transfer { libusb_device_handle *dev_handle; uint8_t flags; - uint32_t endpoint; + uint8_t endpoint; uint8_t type; uint32_t timeout; enum libusb_transfer_status status; @@ -349,7 +349,6 @@ typedef struct libusb_transfer { libusb_transfer_cb_fn callback; void *user_data; uint8_t *buffer; - void *os_priv; int num_iso_packets; struct libusb_iso_packet_descriptor iso_packet_desc[0]; } libusb_transfer __aligned(sizeof(void *)); Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Wed Apr 25 12:02:06 2012 (r234683) +++ head/lib/libusb/libusb10.c Wed Apr 25 17:54:26 2012 (r234684) @@ -1322,7 +1322,7 @@ libusb_submit_transfer(struct libusb_tra struct libusb20_transfer *pxfer1; struct libusb_super_transfer *sxfer; struct libusb_device *dev; - uint32_t endpoint; + uint8_t endpoint; int err; if (uxfer == NULL) @@ -1333,9 +1333,6 @@ libusb_submit_transfer(struct libusb_tra endpoint = uxfer->endpoint; - if (endpoint > 255) - return (LIBUSB_ERROR_INVALID_PARAM); - dev = libusb_get_device(uxfer->dev_handle); DPRINTF(dev->ctx, LIBUSB_DEBUG_FUNCTION, "libusb_submit_transfer enter"); @@ -1385,7 +1382,7 @@ libusb_cancel_transfer(struct libusb_tra struct libusb20_transfer *pxfer1; struct libusb_super_transfer *sxfer; struct libusb_device *dev; - uint32_t endpoint; + uint8_t endpoint; int retval; if (uxfer == NULL) @@ -1397,9 +1394,6 @@ libusb_cancel_transfer(struct libusb_tra endpoint = uxfer->endpoint; - if (endpoint > 255) - return (LIBUSB_ERROR_INVALID_PARAM); - dev = libusb_get_device(uxfer->dev_handle); DPRINTF(dev->ctx, LIBUSB_DEBUG_FUNCTION, "libusb_cancel_transfer enter"); From owner-svn-src-head@FreeBSD.ORG Wed Apr 25 18:07:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B801F106564A; Wed, 25 Apr 2012 18:07:35 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A340B8FC0A; Wed, 25 Apr 2012 18:07:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PI7ZbK009239; Wed, 25 Apr 2012 18:07:35 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PI7Zkf009237; Wed, 25 Apr 2012 18:07:35 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201204251807.q3PI7Zkf009237@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 25 Apr 2012 18:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234685 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 18:07:35 -0000 Author: des Date: Wed Apr 25 18:07:35 2012 New Revision: 234685 URL: http://svn.freebsd.org/changeset/base/234685 Log: I stopped using my middle name years ago. Modified: head/lib/msun/src/s_fabsl.c Modified: head/lib/msun/src/s_fabsl.c ============================================================================== --- head/lib/msun/src/s_fabsl.c Wed Apr 25 17:54:26 2012 (r234684) +++ head/lib/msun/src/s_fabsl.c Wed Apr 25 18:07:35 2012 (r234685) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2003 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-head@FreeBSD.ORG Wed Apr 25 21:50:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A19F10656B3; Wed, 25 Apr 2012 21:50:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 760848FC12; Wed, 25 Apr 2012 21:50:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PLoL5G016210; Wed, 25 Apr 2012 21:50:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PLoLD8016208; Wed, 25 Apr 2012 21:50:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204252150.q3PLoLD8016208@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 25 Apr 2012 21:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234686 - head/lib/libusb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 21:50:21 -0000 Author: hselasky Date: Wed Apr 25 21:50:20 2012 New Revision: 234686 URL: http://svn.freebsd.org/changeset/base/234686 Log: Bump the libusb major version due to the last commit, which changes the libusb 1.0 API. While at it, correct a manual page symlink. Suggested by: kib @ Modified: head/lib/libusb/Makefile Modified: head/lib/libusb/Makefile ============================================================================== --- head/lib/libusb/Makefile Wed Apr 25 18:07:35 2012 (r234685) +++ head/lib/libusb/Makefile Wed Apr 25 21:50:20 2012 (r234686) @@ -5,7 +5,7 @@ # LIB= usb -SHLIB_MAJOR= 2 +SHLIB_MAJOR= 3 SHLIB_MINOR= 0 SRCS= libusb20.c SRCS+= libusb20_desc.c @@ -70,7 +70,7 @@ MLINKS += libusb.3 libusb_detach_kernel_ MLINKS += libusb.3 libusb_detach_kernel_driver_np.3 MLINKS += libusb.3 libusb_attach_kernel_driver.3 MLINKS += libusb.3 libusb_get_device_descriptor.3 -MLINKS += libusb.3 libsub_get_active_config_descriptor.3 +MLINKS += libusb.3 libusb_get_active_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 MLINKS += libusb.3 libusb_free_config_descriptor.3 From owner-svn-src-head@FreeBSD.ORG Wed Apr 25 21:59:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A28F1065672; Wed, 25 Apr 2012 21:59:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9DE28FC14; Wed, 25 Apr 2012 21:59:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PLxunG016529; Wed, 25 Apr 2012 21:59:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PLxu84016527; Wed, 25 Apr 2012 21:59:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204252159.q3PLxu84016527@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 25 Apr 2012 21:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234687 - head/lib/libusb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 21:59:57 -0000 Author: hselasky Date: Wed Apr 25 21:59:56 2012 New Revision: 234687 URL: http://svn.freebsd.org/changeset/base/234687 Log: Fix typo. Modified: head/lib/libusb/libusb.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Wed Apr 25 21:50:20 2012 (r234686) +++ head/lib/libusb/libusb.3 Wed Apr 25 21:59:56 2012 (r234687) @@ -285,7 +285,7 @@ Returns 0 on success and a LIBUSB_ERROR failure. .Pp .Ft int -.Fn libsub_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" +.Fn libusb_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" Get the USB configuration descriptor for the active configuration. Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the device is in From owner-svn-src-head@FreeBSD.ORG Wed Apr 25 22:44:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00A72106564A; Wed, 25 Apr 2012 22:44:08 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E17318FC0C; Wed, 25 Apr 2012 22:44:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PMi7H2017950; Wed, 25 Apr 2012 22:44:07 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PMi7Wf017948; Wed, 25 Apr 2012 22:44:07 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201204252244.q3PMi7Wf017948@svn.freebsd.org> From: Stanislav Sedov Date: Wed, 25 Apr 2012 22:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234688 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 22:44:08 -0000 Author: stas Date: Wed Apr 25 22:44:07 2012 New Revision: 234688 URL: http://svn.freebsd.org/changeset/base/234688 Log: - Disable MMU before reconfiguring the pagetables in the trampoline code. Otherwise we might end up overwriting the PTEs we're currently using for some reason. Reviewed by: cognet Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Wed Apr 25 21:59:56 2012 (r234687) +++ head/sys/arm/arm/elf_trampoline.c Wed Apr 25 22:44:07 2012 (r234688) @@ -614,6 +614,17 @@ __start(void) (unsigned int)&func_end + 800 , 0); if (altdst > dst) dst = altdst; + + /* + * Disable MMU. Otherwise, setup_pagetables call below + * might overwrite the L1 table we are currently using. + */ + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); + __asm __volatile("mrc p15, 0, %0, c1, c0, 0\n" + "bic %0, %0, #1\n" /* MMU_DISABLE */ + "mcr p15, 0, %0, c1, c0, 0\n" + :"=r" (pt_addr)); } else #endif dst = 4 + load_kernel((unsigned int)&kernel_start, From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 00:51:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC101065672; Thu, 26 Apr 2012 00:51:44 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7C78FC14; Thu, 26 Apr 2012 00:51:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q0piKC022435; Thu, 26 Apr 2012 00:51:44 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q0piHA022432; Thu, 26 Apr 2012 00:51:44 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201204260051.q3Q0piHA022432@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 26 Apr 2012 00:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234690 - head/lib/libedit/edit/readline X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 00:51:44 -0000 Author: obrien Date: Thu Apr 26 00:51:43 2012 New Revision: 234690 URL: http://svn.freebsd.org/changeset/base/234690 Log: Correct r228114 and use the same implementation for tilde.h as for history.h Added: head/lib/libedit/edit/readline/tilde.h - copied unchanged from r234451, head/lib/libedit/edit/readline/history.h Modified: head/lib/libedit/edit/readline/Makefile Modified: head/lib/libedit/edit/readline/Makefile ============================================================================== --- head/lib/libedit/edit/readline/Makefile Thu Apr 26 00:18:38 2012 (r234689) +++ head/lib/libedit/edit/readline/Makefile Thu Apr 26 00:51:43 2012 (r234690) @@ -1,8 +1,7 @@ # Copyright (c) 2011 David E O'Brien # $FreeBSD$ -INCS= readline.h history.h -INCSLINKS= readline.h ${INCSDIR}/tilde.h +INCS= readline.h history.h tilde.h INCSDIR= ${INCLUDEDIR}/edit/readline Copied: head/lib/libedit/edit/readline/tilde.h (from r234451, head/lib/libedit/edit/readline/history.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libedit/edit/readline/tilde.h Thu Apr 26 00:51:43 2012 (r234690, copy of r234451, head/lib/libedit/edit/readline/history.h) @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2011 David E. O'Brien + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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 REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 01:07:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9699106566B; Thu, 26 Apr 2012 01:07:04 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 896288FC08; Thu, 26 Apr 2012 01:07:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q174ao023011; Thu, 26 Apr 2012 01:07:04 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q174k2023007; Thu, 26 Apr 2012 01:07:04 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201204260107.q3Q174k2023007@svn.freebsd.org> From: Ryan Stone Date: Thu, 26 Apr 2012 01:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234691 - in head: cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 01:07:04 -0000 Author: rstone Date: Thu Apr 26 01:07:03 2012 New Revision: 234691 URL: http://svn.freebsd.org/changeset/base/234691 Log: Implement the D "cpu" variable, which returns curcpu. I have chosen not to follow the example of OpenSolaris and its descendants, which implemented cpu as an inline that took a value out of curthread. At certain points in the FreeBSD scheduler curthread->td_oncpu will no longer be valid (in particukar, just before the thread gets descheduled) so instead I have implemented this as its own built-in variable. Sponsored by: Sandvine Inc. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Thu Apr 26 00:51:43 2012 (r234690) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Thu Apr 26 01:07:03 2012 (r234691) @@ -497,6 +497,12 @@ static const dt_ident_t _dtrace_globals[ { "zonename", DT_IDENT_SCALAR, 0, DIF_VAR_ZONENAME, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" }, #endif + +#if !defined(sun) +{ "cpu", DT_IDENT_SCALAR, 0, DIF_VAR_CPU, + DT_ATTR_STABCMN, DT_VERS_1_6_3, &dt_idops_type, "int" }, +#endif + { NULL, 0, 0, 0, { 0, 0, 0 }, 0, NULL, NULL } }; Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Apr 26 00:51:43 2012 (r234690) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Apr 26 01:07:03 2012 (r234691) @@ -3143,6 +3143,11 @@ dtrace_dif_variable(dtrace_mstate_t *mst return (curthread->td_errno); #endif } +#if !defined(sun) + case DIF_VAR_CPU: { + return curcpu; + } +#endif default: DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP); return (0); Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Thu Apr 26 00:51:43 2012 (r234690) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Thu Apr 26 01:07:03 2012 (r234691) @@ -251,6 +251,10 @@ typedef enum dtrace_probespec { #define DIF_VAR_ERRNO 0x0120 /* thread errno */ #define DIF_VAR_EXECARGS 0x0121 /* process arguments */ +#if !defined(sun) +#define DIF_VAR_CPU 0x0200 +#endif + #define DIF_SUBR_RAND 0 #define DIF_SUBR_MUTEX_OWNED 1 #define DIF_SUBR_MUTEX_OWNER 2 From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 02:03:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EA721065678; Thu, 26 Apr 2012 02:03:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6064D8FC08; Thu, 26 Apr 2012 02:03:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q23H6S024951; Thu, 26 Apr 2012 02:03:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q23Hjm024948; Thu, 26 Apr 2012 02:03:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204260203.q3Q23Hjm024948@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 Apr 2012 02:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234692 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 02:03:17 -0000 Author: adrian Date: Thu Apr 26 02:03:16 2012 New Revision: 234692 URL: http://svn.freebsd.org/changeset/base/234692 Log: Add the BT register definitions for AR9285/AR9287 BT coexistence. Obtained from: Linux ath9k Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Thu Apr 26 01:07:03 2012 (r234691) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Thu Apr 26 02:03:16 2012 (r234692) @@ -21,6 +21,42 @@ #include "ar5212/ar5212phy.h" +#define AR_BT_COEX_MODE 0x8170 +#define AR_BT_TIME_EXTEND 0x000000ff +#define AR_BT_TIME_EXTEND_S 0 +#define AR_BT_TXSTATE_EXTEND 0x00000100 +#define AR_BT_TXSTATE_EXTEND_S 8 +#define AR_BT_TX_FRAME_EXTEND 0x00000200 +#define AR_BT_TX_FRAME_EXTEND_S 9 +#define AR_BT_MODE 0x00000c00 +#define AR_BT_MODE_S 10 +#define AR_BT_QUIET 0x00001000 +#define AR_BT_QUIET_S 12 +#define AR_BT_QCU_THRESH 0x0001e000 +#define AR_BT_QCU_THRESH_S 13 +#define AR_BT_RX_CLEAR_POLARITY 0x00020000 +#define AR_BT_RX_CLEAR_POLARITY_S 17 +#define AR_BT_PRIORITY_TIME 0x00fc0000 +#define AR_BT_PRIORITY_TIME_S 18 +#define AR_BT_FIRST_SLOT_TIME 0xff000000 +#define AR_BT_FIRST_SLOT_TIME_S 24 + +#define AR_BT_COEX_WEIGHT 0x8174 +#define AR_BT_BT_WGHT 0x0000ffff +#define AR_BT_BT_WGHT_S 0 +#define AR_BT_WL_WGHT 0xffff0000 +#define AR_BT_WL_WGHT_S 16 + +#define AR_BT_COEX_MODE2 0x817c +#define AR_BT_BCN_MISS_THRESH 0x000000ff +#define AR_BT_BCN_MISS_THRESH_S 0 +#define AR_BT_BCN_MISS_CNT 0x0000ff00 +#define AR_BT_BCN_MISS_CNT_S 8 +#define AR_BT_HOLD_RX_CLEAR 0x00010000 +#define AR_BT_HOLD_RX_CLEAR_S 16 +#define AR_BT_DISABLE_BT_ANT 0x00100000 +#define AR_BT_DISABLE_BT_ANT_S 20 + /* For AR_PHY_RADAR0 */ #define AR_PHY_RADAR_0_FFT_ENA 0x80000000 Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu Apr 26 01:07:03 2012 (r234691) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu Apr 26 02:03:16 2012 (r234692) @@ -47,14 +47,58 @@ #define AR_GPIO_IN_OUT 0x4048 /* GPIO input/output register */ #define AR_GPIO_OE_OUT 0x404c /* GPIO output enable register */ #define AR_GPIO_INTR_POL 0x4050 /* GPIO interrupt polarity */ + #define AR_GPIO_INPUT_EN_VAL 0x4054 /* GPIO input enable and value */ +#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_DEF 0x00000004 +#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_S 2 +#define AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_DEF 0x00000008 +#define AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_S 3 +#define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_DEF 0x00000010 +#define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_S 4 +#define AR_GPIO_INPUT_EN_VAL_RFSILENT_DEF 0x00000080 +#define AR_GPIO_INPUT_EN_VAL_RFSILENT_DEF_S 7 +#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB 0x00000400 +#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB_S 10 +#define AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_BB 0x00000800 +#define AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_BB_S 11 +#define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB 0x00001000 +#define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB_S 12 +#define AR_GPIO_INPUT_EN_VAL_RFSILENT_BB 0x00008000 +#define AR_GPIO_INPUT_EN_VAL_RFSILENT_BB_S 15 +#define AR_GPIO_RTC_RESET_OVERRIDE_ENABLE 0x00010000 +#define AR_GPIO_JTAG_DISABLE 0x00020000 + #define AR_GPIO_INPUT_MUX1 0x4058 +#define AR_GPIO_INPUT_MUX1_BT_PRIORITY 0x00000f00 +#define AR_GPIO_INPUT_MUX1_BT_PRIORITY_S 8 +#define AR_GPIO_INPUT_MUX1_BT_FREQUENCY 0x0000f000 +#define AR_GPIO_INPUT_MUX1_BT_FREQUENCY_S 12 +#define AR_GPIO_INPUT_MUX1_BT_ACTIVE 0x000f0000 +#define AR_GPIO_INPUT_MUX1_BT_ACTIVE_S 16 + #define AR_GPIO_INPUT_MUX2 0x405c +#define AR_GPIO_INPUT_MUX2_CLK25 0x0000000f +#define AR_GPIO_INPUT_MUX2_CLK25_S 0 +#define AR_GPIO_INPUT_MUX2_RFSILENT 0x000000f0 +#define AR_GPIO_INPUT_MUX2_RFSILENT_S 4 +#define AR_GPIO_INPUT_MUX2_RTC_RESET 0x00000f00 +#define AR_GPIO_INPUT_MUX2_RTC_RESET_S 8 + #define AR_GPIO_OUTPUT_MUX1 0x4060 #define AR_GPIO_OUTPUT_MUX2 0x4064 #define AR_GPIO_OUTPUT_MUX3 0x4068 + +#define AR_GPIO_OUTPUT_MUX_AS_OUTPUT 0 +#define AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED 1 +#define AR_GPIO_OUTPUT_MUX_AS_PCIE_POWER_LED 2 +#define AR_GPIO_OUTPUT_MUX_AS_TX_FRAME 3 +#define AR_GPIO_OUTPUT_MUX_AS_RX_CLEAR_EXTERNAL 4 +#define AR_GPIO_OUTPUT_MUX_AS_MAC_NETWORK_LED 5 +#define AR_GPIO_OUTPUT_MUX_AS_MAC_POWER_LED 6 + #define AR_EEPROM_STATUS_DATA 0x407c #define AR_OBS 0x4080 +#define AR_GPIO_PDPU 0x4088 #ifdef AH_SUPPORT_AR9130 #define AR_RTC_BASE 0x20000 @@ -95,6 +139,7 @@ #define AR_TSFOOR_THRESHOLD 0x813c #define AR_PHY_ERR_3 0x8168 #define AR_PHY_ERR_MASK_3 0x816c /* mask for AR_PHY_ERR_3 */ +#define AR_BT_COEX_WEIGHT2 0x81c4 #define AR_TXOP_X 0x81ec /* txop for legacy non-qos */ #define AR_TXOP_0_3 0x81f0 /* txop for various tid's */ #define AR_TXOP_4_7 0x81f4 @@ -460,6 +505,8 @@ #define AR_PCU_MISS_BCN_IN_SLEEP 0x00004000 /* count bmiss's when sleeping */ #define AR_PCU_BUG_12306_FIX_ENA 0x00020000 /* use rx_clear to count sifs */ #define AR_PCU_FORCE_QUIET_COLL 0x00040000 /* kill xmit for channel change */ +#define AR_PCU_BT_ANT_PREVENT_RX 0x00100000 +#define AR_PCU_BT_ANT_PREVENT_RX_S 20 #define AR_PCU_TBTT_PROTECT 0x00200000 /* no xmit upto tbtt+20 uS */ #define AR_PCU_CLEAR_VMF 0x01000000 /* clear vmf mode (fast cc)*/ #define AR_PCU_CLEAR_BA_VALID 0x04000000 /* clear ba state */ From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 09:07:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45D18106566C; Thu, 26 Apr 2012 09:07:33 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 316478FC0A; Thu, 26 Apr 2012 09:07:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q97Xoq039052; Thu, 26 Apr 2012 09:07:33 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q97Ws7039050; Thu, 26 Apr 2012 09:07:32 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201204260907.q3Q97Ws7039050@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 26 Apr 2012 09:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234697 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 09:07:33 -0000 Author: ru Date: Thu Apr 26 09:07:32 2012 New Revision: 234697 URL: http://svn.freebsd.org/changeset/base/234697 Log: Fixed a misspelling of OLD_LIBS in r232671 by pluknet@. (The patch in the PR 165523 had this spelled correctly.) Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Apr 26 08:37:51 2012 (r234696) +++ head/ObsoleteFiles.inc Thu Apr 26 09:07:32 2012 (r234697) @@ -459,7 +459,7 @@ OLD_FILES+=usr/share/man/man5/lastlog.5. OLD_FILES+=usr/share/man/man5/utmp.5.gz OLD_FILES+=usr/share/man/man5/wtmp.5.gz OLD_LIBS+=lib/libutil.so.8 -OLB_LIBS+=usr/lib32/libutil.so.8 +OLD_LIBS+=usr/lib32/libutil.so.8 # 20100105: new userland semaphore implementation OLD_FILES+=usr/include/sys/semaphore.h # 20100103: ntptrace(8) removed From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 09:26:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37B4A106566C; Thu, 26 Apr 2012 09:26:43 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id C791E8FC16; Thu, 26 Apr 2012 09:26:42 +0000 (UTC) Received: by iahk25 with SMTP id k25so1752798iah.13 for ; Thu, 26 Apr 2012 02:26:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=t6smNKTnXzAP5oIoZR0NluscCpi3kouNYd28pqMXRgc=; b=a9N5UJcuveIPkC6LBCk2AQIObrhDnH0GVjlK5M4mP5bfHFoe2keTzVhuoJFG3c0STX a1VsfxpHbBhtsPUxTxaW0bwnF0WH47vEDOuIN4X+fdvYEthDvQoCdMtVhFZSU3kNvIn4 ZzbNI+I1ovapcS7jL42xziip6q2Ku7azOW0aFscIsMV3fCYVehNykJw9Uh/zLXrdoMPu 2LkuZJelNruRnndggCKVzgkRenGfI6BlBi244aVggOImoGxyn3TVwF18V/1C9qLo+0R4 wTwRNI6VPU/8nDmxm0d7f60xQrerXnEJOoeaEmkzbM+LjVojMsE+DkKdKlh5SPtJXzdA GT9w== MIME-Version: 1.0 Received: by 10.50.36.194 with SMTP id s2mr5690914igj.46.1335432402433; Thu, 26 Apr 2012 02:26:42 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.64.78.37 with HTTP; Thu, 26 Apr 2012 02:26:42 -0700 (PDT) In-Reply-To: <201204260907.q3Q97Ws7039050@svn.freebsd.org> References: <201204260907.q3Q97Ws7039050@svn.freebsd.org> Date: Thu, 26 Apr 2012 13:26:42 +0400 X-Google-Sender-Auth: AezK2MWTPSPHSrtcRdknFnLdMcI Message-ID: From: Sergey Kandaurov To: Ruslan Ermilov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234697 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 09:26:43 -0000 On 26 April 2012 13:07, Ruslan Ermilov wrote: > Author: ru > Date: Thu Apr 26 09:07:32 2012 > New Revision: 234697 > URL: http://svn.freebsd.org/changeset/base/234697 > > Log: > =A0Fixed a misspelling of OLD_LIBS in r232671 by pluknet@. > =A0(The patch in the PR 165523 had this spelled correctly.) > > Modified: > =A0head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/ObsoleteFiles.inc =A0 =A0 =A0Thu Apr 26 08:37:51 2012 =A0 =A0 = =A0 =A0(r234696) > +++ head/ObsoleteFiles.inc =A0 =A0 =A0Thu Apr 26 09:07:32 2012 =A0 =A0 = =A0 =A0(r234697) > @@ -459,7 +459,7 @@ OLD_FILES+=3Dusr/share/man/man5/lastlog.5. > =A0OLD_FILES+=3Dusr/share/man/man5/utmp.5.gz > =A0OLD_FILES+=3Dusr/share/man/man5/wtmp.5.gz > =A0OLD_LIBS+=3Dlib/libutil.so.8 > -OLB_LIBS+=3Dusr/lib32/libutil.so.8 > +OLD_LIBS+=3Dusr/lib32/libutil.so.8 > =A0# 20100105: new userland semaphore implementation > =A0OLD_FILES+=3Dusr/include/sys/semaphore.h > =A0# 20100103: ntptrace(8) removed Apparently I was on drugs. Thanks. --=20 wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 11:07:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7BEA106564A; Thu, 26 Apr 2012 11:07:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 794408FC16; Thu, 26 Apr 2012 11:07:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QB7GbL045505; Thu, 26 Apr 2012 11:07:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QB7GOL045501; Thu, 26 Apr 2012 11:07:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204261107.q3QB7GOL045501@svn.freebsd.org> From: Michael Tuexen Date: Thu, 26 Apr 2012 11:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234699 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 11:07:18 -0000 Author: tuexen Date: Thu Apr 26 11:07:15 2012 New Revision: 234699 URL: http://svn.freebsd.org/changeset/base/234699 Log: Fix a type in an SCTP AUTH related notification. Keep the old name for backwards compatibility. Spotted by Irene Ruengeler. MFC after: 3 days Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_uio.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Thu Apr 26 09:14:52 2012 (r234698) +++ head/sys/netinet/sctp_auth.c Thu Apr 26 11:07:15 2012 (r234699) @@ -1801,7 +1801,7 @@ sctp_handle_auth(struct sctp_tcb *stcb, * shared_key_id, (void * *)stcb->asoc.authinfo.recv_keyid); */ - sctp_notify_authentication(stcb, SCTP_AUTH_NEWKEY, + sctp_notify_authentication(stcb, SCTP_AUTH_NEW_KEY, shared_key_id, stcb->asoc.authinfo.recv_keyid, SCTP_SO_NOT_LOCKED); /* compute a new recv assoc key and cache it */ Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Thu Apr 26 09:14:52 2012 (r234698) +++ head/sys/netinet/sctp_uio.h Thu Apr 26 11:07:15 2012 (r234699) @@ -424,7 +424,8 @@ struct sctp_authkey_event { }; /* indication values */ -#define SCTP_AUTH_NEWKEY 0x0001 +#define SCTP_AUTH_NEW_KEY 0x0001 +#define SCTP_AUTH_NEWKEY SCTP_AUTH_NEW_KEY #define SCTP_AUTH_NO_AUTH 0x0002 #define SCTP_AUTH_FREE_KEY 0x0003 Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Thu Apr 26 09:14:52 2012 (r234698) +++ head/sys/netinet/sctputil.c Thu Apr 26 11:07:15 2012 (r234699) @@ -3531,7 +3531,7 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_shutdown_event(stcb); break; case SCTP_NOTIFY_AUTH_NEW_KEY: - sctp_notify_authentication(stcb, SCTP_AUTH_NEWKEY, error, + sctp_notify_authentication(stcb, SCTP_AUTH_NEW_KEY, error, (uint16_t) (uintptr_t) data, so_locked); break; From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 11:23:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A6FA106564A; Thu, 26 Apr 2012 11:23:19 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 4E0418FC08; Thu, 26 Apr 2012 11:23:19 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 009B625D3A71; Thu, 26 Apr 2012 11:23:17 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 11E30BE5A97; Thu, 26 Apr 2012 11:23:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id nKCba53spaUG; Thu, 26 Apr 2012 11:23:16 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id EC316BE5A96; Thu, 26 Apr 2012 11:23:15 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201204252150.q3PLoLD8016208@svn.freebsd.org> Date: Thu, 26 Apr 2012 11:23:15 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <2479726E-9720-465E-A8A8-1F29C8880F89@lists.zabbadoz.net> References: <201204252150.q3PLoLD8016208@svn.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234686 - head/lib/libusb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 11:23:20 -0000 On 25. Apr 2012, at 21:50 , Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Apr 25 21:50:20 2012 > New Revision: 234686 > URL: http://svn.freebsd.org/changeset/base/234686 >=20 > Log: > Bump the libusb major version due to the last commit, which > changes the libusb 1.0 API. While at it, correct a manual > page symlink. >=20 > Suggested by: kib @ Why don't we use symver for the library yet? http://people.freebsd.org/~deischen/symver/freebsd_versioning.txt >=20 > Modified: > head/lib/libusb/Makefile >=20 > Modified: head/lib/libusb/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/lib/libusb/Makefile Wed Apr 25 18:07:35 2012 = (r234685) > +++ head/lib/libusb/Makefile Wed Apr 25 21:50:20 2012 = (r234686) > @@ -5,7 +5,7 @@ > # >=20 > LIB=3D usb > -SHLIB_MAJOR=3D 2 > +SHLIB_MAJOR=3D 3 > SHLIB_MINOR=3D 0 > SRCS=3D libusb20.c > SRCS+=3D libusb20_desc.c > @@ -70,7 +70,7 @@ MLINKS +=3D libusb.3 libusb_detach_kernel_ > MLINKS +=3D libusb.3 libusb_detach_kernel_driver_np.3 > MLINKS +=3D libusb.3 libusb_attach_kernel_driver.3 > MLINKS +=3D libusb.3 libusb_get_device_descriptor.3 > -MLINKS +=3D libusb.3 libsub_get_active_config_descriptor.3 > +MLINKS +=3D libusb.3 libusb_get_active_config_descriptor.3 > MLINKS +=3D libusb.3 libusb_get_config_descriptor.3 > MLINKS +=3D libusb.3 libusb_get_config_descriptor_by_value.3 > MLINKS +=3D libusb.3 libusb_free_config_descriptor.3 --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 11:42:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A240106564A; Thu, 26 Apr 2012 11:42:31 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id EBD268FC08; Thu, 26 Apr 2012 11:42:30 +0000 (UTC) Received: by qcsg15 with SMTP id g15so771262qcs.13 for ; Thu, 26 Apr 2012 04:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=NqrcEutzPqyZ1l37vYprSOng8exJpAUBYb3WpORyAvU=; b=cczRA9XPfKTbg1152LgxT3OlJH5ovk4N1pzrbG30be7d9y4URSs6rAJXmnAa+I5TwC 9cI/AokGGxIIFjtgoNl8fkVNjYEpJfvE20hKn0MrSysOQyXUCvVY4kBlxHnZatJBgXaD OHcddSKNphabEVq1Sf8zjyF10883CBoHzhQQOG2Xu2aqwU7H6nwDPRDMrMtheEWIdW6u 5QLIWsi3DYiAyYM6mQrtMQVQfX8/tUwYbyIKrS9iz+zG0CGHAs+n17ROsbBsH3hm68lS QQNt95Pprn2gAtly67iL0an7aUJgMt6XKaibIiF7ruIY/gQQkmanJG3PUp6Lb9Ga9gUY ZiZA== Received: by 10.224.215.7 with SMTP id hc7mr4976186qab.29.1335440550215; Thu, 26 Apr 2012 04:42:30 -0700 (PDT) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id m6sm4713150qah.2.2012.04.26.04.42.28 (version=SSLv3 cipher=OTHER); Thu, 26 Apr 2012 04:42:29 -0700 (PDT) Date: Thu, 26 Apr 2012 07:42:15 -0400 From: Alexander Kabaev To: "Bjoern A. Zeeb" Message-ID: <20120426074215.12d25651@kan.dyndns.org> In-Reply-To: <2479726E-9720-465E-A8A8-1F29C8880F89@lists.zabbadoz.net> References: <201204252150.q3PLoLD8016208@svn.freebsd.org> <2479726E-9720-465E-A8A8-1F29C8880F89@lists.zabbadoz.net> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/IvayygIc4S9rdsruq1h.W_E"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Hans Petter Selasky Subject: Re: svn commit: r234686 - head/lib/libusb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 11:42:31 -0000 --Sig_/IvayygIc4S9rdsruq1h.W_E Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 26 Apr 2012 11:23:15 +0000 "Bjoern A. Zeeb" wrote: >=20 > On 25. Apr 2012, at 21:50 , Hans Petter Selasky wrote: >=20 > > Author: hselasky > > Date: Wed Apr 25 21:50:20 2012 > > New Revision: 234686 > > URL: http://svn.freebsd.org/changeset/base/234686 > >=20 > > Log: > > Bump the libusb major version due to the last commit, which > > changes the libusb 1.0 API. While at it, correct a manual > > page symlink. > >=20 > > Suggested by: kib @ >=20 >=20 > Why don't we use symver for the library yet? > http://people.freebsd.org/~deischen/symver/freebsd_versioning.txt >=20 Symbol versions make sense if one can provide backward-compatible implementation for old symbol versions. If that is not possible or desirable, major version bump is the right answer. --=20 Alexander Kabaev --Sig_/IvayygIc4S9rdsruq1h.W_E Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFPmTSjQ6z1jMm+XZYRAl8CAKDeu+ckPfQX++xNmNSVAiRQAMB4fQCdE/iY if8HEjlzR2TBhHXG/yNskkU= =BEsb -----END PGP SIGNATURE----- --Sig_/IvayygIc4S9rdsruq1h.W_E-- From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 12:59:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C9FC1065676; Thu, 26 Apr 2012 12:59:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBE7A8FC0C; Thu, 26 Apr 2012 12:59:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QCx8in049400; Thu, 26 Apr 2012 12:59:08 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QCx88a049398; Thu, 26 Apr 2012 12:59:08 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201204261259.q3QCx88a049398@svn.freebsd.org> From: Eitan Adler Date: Thu, 26 Apr 2012 12:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234700 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 12:59:09 -0000 Author: eadler Date: Thu Apr 26 12:59:08 2012 New Revision: 234700 URL: http://svn.freebsd.org/changeset/base/234700 Log: Document the standardization status of err* and warn* PR: docs/164939 Submitted by: Niclas Zeising Approved by: bcr MFC after: 3 days Modified: head/lib/libc/gen/err.3 Modified: head/lib/libc/gen/err.3 ============================================================================== --- head/lib/libc/gen/err.3 Thu Apr 26 11:07:15 2012 (r234699) +++ head/lib/libc/gen/err.3 Thu Apr 26 12:59:08 2012 (r234700) @@ -28,7 +28,7 @@ .\" From: @(#)err.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd March 6, 1999 +.Dd March 29, 2012 .Dt ERR 3 .Os .Sh NAME @@ -212,6 +212,16 @@ if (error != 0) .Xr printf 3 , .Xr strerror 3 , .Xr sysexits 3 +.Sh STANDARDS +The +.Fn err +and +.Fn warn +families of functions are BSD extensions. +As such they should not be used in truly portable code. +Use +.Fn strerror +or similar functions instead. .Sh HISTORY The .Fn err From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 13:45:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9E761065680; Thu, 26 Apr 2012 13:45:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D47598FC16; Thu, 26 Apr 2012 13:45:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QDjH6C051075; Thu, 26 Apr 2012 13:45:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QDjHMI051073; Thu, 26 Apr 2012 13:45:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204261345.q3QDjHMI051073@svn.freebsd.org> From: Michael Tuexen Date: Thu, 26 Apr 2012 13:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234701 - head/contrib/traceroute X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 13:45:18 -0000 Author: tuexen Date: Thu Apr 26 13:45:17 2012 New Revision: 234701 URL: http://svn.freebsd.org/changeset/base/234701 Log: Fix a bug in the TCP tracerouting which resulted in not accepting any incoming packets. So all packets seemed to be lost. MFC after: 1 week Modified: head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Thu Apr 26 12:59:08 2012 (r234700) +++ head/contrib/traceroute/traceroute.c Thu Apr 26 13:45:17 2012 (r234701) @@ -1406,8 +1406,7 @@ tcp_prep(struct outdata *outdata) tcp->th_sport = htons(ident); tcp->th_dport = htons(port + (fixedPort ? 0 : outdata->seq)); - tcp->th_seq = (tcp->th_sport << 16) | (tcp->th_dport + - (fixedPort ? outdata->seq : 0)); + tcp->th_seq = (tcp->th_sport << 16) | tcp->th_dport; tcp->th_ack = 0; tcp->th_off = 5; tcp->th_flags = TH_SYN; @@ -1425,8 +1424,8 @@ tcp_check(const u_char *data, int seq) struct tcphdr *const tcp = (struct tcphdr *) data; return (ntohs(tcp->th_sport) == ident - && ntohs(tcp->th_dport) == port + (fixedPort ? 0 : seq)) - && tcp->th_seq == (((tcp_seq)ident << 16) | (port + seq)); + && ntohs(tcp->th_dport) == port + (fixedPort ? 0 : seq) + && tcp->th_seq == (tcp_seq)((tcp->th_sport << 16) | tcp->th_dport)); } void From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 14:34:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97D85106564A; Thu, 26 Apr 2012 14:34:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8257C8FC18; Thu, 26 Apr 2012 14:34:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QEYl5L053330; Thu, 26 Apr 2012 14:34:47 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QEYlpx053328; Thu, 26 Apr 2012 14:34:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204261434.q3QEYlpx053328@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 26 Apr 2012 14:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234709 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 14:34:47 -0000 Author: hselasky Date: Thu Apr 26 14:34:46 2012 New Revision: 234709 URL: http://svn.freebsd.org/changeset/base/234709 Log: Add libusb.so.2 to obsolete files. Suggested by: dumbbell @ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Apr 26 14:02:39 2012 (r234708) +++ head/ObsoleteFiles.inc Thu Apr 26 14:34:46 2012 (r234709) @@ -633,6 +633,7 @@ OLD_LIBS+=usr/lib/libssl.so.5 OLD_LIBS+=usr/lib/libtacplus.so.3 OLD_LIBS+=usr/lib/libugidfw.so.3 OLD_LIBS+=usr/lib/libusb.so.1 +OLD_LIBS+=usr/lib/libusb.so.2 OLD_LIBS+=usr/lib/libusbhid.so.3 OLD_LIBS+=usr/lib/libvgl.so.5 OLD_LIBS+=usr/lib/libwrap.so.5 @@ -734,6 +735,7 @@ OLD_LIBS+=usr/lib32/libufs.so.4 OLD_LIBS+=usr/lib32/libugidfw.so.3 OLD_LIBS+=usr/lib32/libumem.so.1 OLD_LIBS+=usr/lib32/libusb.so.1 +OLD_LIBS+=usr/lib32/libusb.so.2 OLD_LIBS+=usr/lib32/libusbhid.so.3 OLD_LIBS+=usr/lib32/libutil.so.7 OLD_LIBS+=usr/lib32/libuutil.so.1 From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 14:55:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 765D61065670; Thu, 26 Apr 2012 14:55:13 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) by mx1.freebsd.org (Postfix) with ESMTP id F3EA88FC1B; Thu, 26 Apr 2012 14:55:12 +0000 (UTC) Received: from [2001:1b48:10b:cafe:225:64ff:febe:589f] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SNQ6B-000IT2-Gh; Thu, 26 Apr 2012 16:55:12 +0200 Message-ID: <4F9961CF.9030709@FreeBSD.org> Date: Thu, 26 Apr 2012 16:55:11 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120425 Thunderbird/12.0 MIME-Version: 1.0 To: Hans Petter Selasky References: <201204261434.q3QEYlpx053328@svn.freebsd.org> In-Reply-To: <201204261434.q3QEYlpx053328@svn.freebsd.org> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234709 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 14:55:13 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 26.04.2012 16:34, Hans Petter Selasky wrote: > Modified: head/ObsoleteFiles.inc OLD_LIBS+=usr/lib/libusb.so.1 > +OLD_LIBS+=usr/lib/libusb.so.2 Entries are sorted by date (recent first), not alphabetically. You should move your modifications to the top of the file, adding a comment with the date and the reason. See for example the last entry following clang update: # 20120415: new clang import which bumps version from 3.0 to 3.1 - -- Jean-Sébastien Pédron -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+ZYc8ACgkQa+xGJsFYOlNm5ACfTcHj/Pwy4jF+lagTXQjz0lmE FcIAnipVqp6w0QYMOmEjJ9ibRXmOwXov =W05t -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 17:35:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94005106566B; Thu, 26 Apr 2012 17:35:12 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB138FC14; Thu, 26 Apr 2012 17:35:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QHZCoD060109; Thu, 26 Apr 2012 17:35:12 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QHZCH4060106; Thu, 26 Apr 2012 17:35:12 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204261735.q3QHZCH4060106@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 26 Apr 2012 17:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234711 - in head/usr.sbin/wpa: . hostapd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 17:35:12 -0000 Author: bschmidt Date: Thu Apr 26 17:35:11 2012 New Revision: 234711 URL: http://svn.freebsd.org/changeset/base/234711 Log: fix EAP server support after the 0.7.3 import: - eap_xxx.c files have been renamed to eap_server_xxx.c - additional crypto files are required for some options - EAP_MD5 and EAP_GTC is now enabled by default to match vendor config - move each file on its own line to hopefully make further diffs easier to read EAP_SERVER is now enabled by default. Fiddling with HOSTAPD_CFLAGS in src.conf is no longer required to get a basic WPA-EAP/radius setup running. Tested by: Johann Hugo MFC after: 2 weeks Modified: head/usr.sbin/wpa/Makefile.inc head/usr.sbin/wpa/hostapd/Makefile Modified: head/usr.sbin/wpa/Makefile.inc ============================================================================== --- head/usr.sbin/wpa/Makefile.inc Thu Apr 26 14:51:12 2012 (r234710) +++ head/usr.sbin/wpa/Makefile.inc Thu Apr 26 17:35:11 2012 (r234711) @@ -7,17 +7,23 @@ WPA_SUPPLICANT_DISTDIR?=${WPA_DISTDIR}/w HOSTAPD_DISTDIR?= ${WPA_DISTDIR}/hostapd .PATH.c:${.CURDIR}/.. \ + ${WPA_DISTDIR}/src/ap \ ${WPA_DISTDIR}/src/common \ ${WPA_DISTDIR}/src/crypto \ + ${WPA_DISTDIR}/src/eapol_auth \ ${WPA_DISTDIR}/src/eap_common \ + ${WPA_DISTDIR}/src/eap_server \ ${WPA_DISTDIR}/src/eapol_supp \ ${WPA_DISTDIR}/src/l2_packet \ + ${WPA_DISTDIR}/src/radius \ ${WPA_DISTDIR}/src/utils CFLAGS+=-I${.CURDIR} +CFLAGS+=-I${HOSTAPD_DISTDIR} CFLAGS+=-I${WPA_DISTDIR}/src CFLAGS+=-I${WPA_DISTDIR}/src/common CFLAGS+=-I${WPA_DISTDIR}/src/crypto +CFLAGS+=-I${WPA_DISTDIR}/src/drivers CFLAGS+=-I${WPA_DISTDIR}/src/l2_packet CFLAGS+=-I${WPA_DISTDIR}/src/utils Modified: head/usr.sbin/wpa/hostapd/Makefile ============================================================================== --- head/usr.sbin/wpa/hostapd/Makefile Thu Apr 26 14:51:12 2012 (r234710) +++ head/usr.sbin/wpa/hostapd/Makefile Thu Apr 26 17:35:11 2012 (r234711) @@ -2,33 +2,59 @@ .include "${.CURDIR}/../Makefile.inc" -.PATH.c:${HOSTAPD_DISTDIR} \ - ${WPA_DISTDIR}/src/ap \ - ${WPA_DISTDIR}/src/eap_server \ - ${WPA_DISTDIR}/src/eap_common \ - ${WPA_DISTDIR}/src/eapol_auth \ - ${WPA_DISTDIR}/src/drivers \ - ${WPA_DISTDIR}/src/radius \ - ${WPA_DISTDIR} +.PATH.c:${WPA_DISTDIR}/src/drivers PROG= hostapd -SRCS= accounting.c aes-wrap.c ap_config.c \ - ap_drv_ops.c ap_mlme.c authsrv.c \ - chap.c common.c config_file.c ctrl_iface.c crypto_openssl.c \ - ctrl_iface_ap.c drivers.c drv_callbacks.c dump_state.c \ - eap_common.c eap_peap_common.c eap_register.c eap_server.c \ - eap_server_gtc.c eap_server_identity.c eap_server_md5.c \ - eap_server_methods.c eap_server_mschapv2.c eap_server_peap.c \ - eap_server_tls.c eap_server_tls_common.c eap_server_ttls.c \ - eapol_auth_dump.c eapol_auth_sm.c eloop.c hostapd.c ieee802_11_auth.c \ - ieee802_11_common.c ieee802_11_ht.c ieee802_1x.c ip_addr.c \ - md5.c main.c ms_funcs.c peerkey_auth.c pmksa_cache_auth.c \ - preauth_auth.c radius.c radius_client.c sta_info.c \ - sha1-pbkdf2.c sha1-tlsprf.c sha1-tprf.c sha1.c \ - tkip_countermeasures.c utils.c \ - vlan_init.c wpa_auth.c wpa_auth_glue.c wpa_auth_ie.c wpa_common.c \ - wpa_debug.c wpabuf.c -SRCS+= l2_packet_freebsd.c driver_freebsd.c os_unix.c +SRCS= accounting.c \ + aes-wrap.c \ + ap_config.c \ + ap_drv_ops.c \ + ap_mlme.c \ + authsrv.c \ + chap.c \ + common.c \ + config_file.c \ + crypto_openssl.c \ + ctrl_iface.c \ + ctrl_iface_ap.c \ + drivers.c \ + drv_callbacks.c \ + eap_common.c \ + eap_peap_common.c \ + eap_register.c \ + eapol_auth_dump.c \ + eapol_auth_sm.c \ + eap_server.c \ + eap_server_methods.c \ + eloop.c \ + hostapd.c \ + ieee802_11_auth.c \ + ieee802_11_common.c \ + ieee802_1x.c \ + ip_addr.c \ + main.c \ + md5.c \ + ms_funcs.c \ + os_unix.c \ + peerkey_auth.c \ + pmksa_cache_auth.c \ + preauth_auth.c \ + radius.c \ + radius_client.c \ + sha1-pbkdf2.c \ + sha1-tlsprf.c \ + sha1.c \ + sta_info.c \ + tkip_countermeasures.c \ + utils.c \ + vlan_init.c \ + wpa_auth.c \ + wpa_auth_glue.c \ + wpa_auth_ie.c \ + wpa_common.c \ + wpa_debug.c \ + wpabuf.c +SRCS+= l2_packet_freebsd.c driver_freebsd.c MAN= hostapd.8 hostapd.conf.5 @@ -38,10 +64,11 @@ FILESDIR= ${SHAREDIR}/examples/hostapd FILES= hostapd.conf hostapd.eap_user hostapd.wpa_psk .endif -CFLAGS+= -I${HOSTAPD_DISTDIR} -I${WPA_DISTDIR}/src/drivers - -CFLAGS+= -DCONFIG_DRIVER_BSD -DHOSTAPD -CFLAGS+= -DCONFIG_DRIVER_RADIUS_ACL +CFLAGS+=-DCONFIG_DRIVER_BSD \ + -DHOSTAPD \ + -DCONFIG_DRIVER_RADIUS_ACL \ + -DCONFIG_RSN_PREAUTH \ + -DCONFIG_PEERKEY .if ${MK_INET6} != "no" CFLAGS+= -DCONFIG_IPV6 .endif @@ -55,51 +82,64 @@ CFLAGS+=${HOSTAPD_CFLAGS} LDADD+=${HOSTAPD_LDADD} #LDFLAGS+=${HOSTAPD_LDFLAGS} -.if !empty(CFLAGS:M*-DEAP_SERVER) -#SRCS+= eap.c eap_methods.c eap_identity.c - .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) -CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_PSK \ - -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -SRCS+= crypto_openssl.c -SRCS+= eap_tls.c eap_peap.c eap_peap_common.c eap_mschapv2.c \ - eap_psk.c eap_psk_common.c \ - eap_tls_common.c tls_openssl.c ms_funcs.c chap.c - -CFLAGS+=-DEAP_TTLS -DEAP_MD5 -SRCS+= eap_ttls.c eap_md5.c - -.if !empty(CFLAGS:M*-DEAP_GTC) -SRCS+= eap_gtc.c -.endif +CFLAGS+=-DDPKCS12_FUNCS \ + -DEAP_SERVER \ + -DEAP_SERVER_GTC \ + -DEAP_SERVER_IDENTITY \ + -DEAP_SERVER_MD5 \ + -DEAP_SERVER_MSCHAPV2 \ + -DEAP_SERVER_PEAP \ + -DEAP_SERVER_TLS \ + -DEAP_SERVER_TTLS \ + -DEAP_TLS_FUNCS \ + -DCONFIG_NO_DUMP_STATE +SRCS+= dump_state.c \ + eap_server_gtc.c \ + eap_server_identity.c \ + eap_server_md5.c \ + eap_server_mschapv2.c \ + eap_server_peap.c \ + eap_server_tls.c \ + eap_server_tls_common.c \ + eap_server_ttls.c \ + tls_openssl.c .if !empty(CFLAGS:M*-DEAP_AKA) NEED_SIM_COMMON= true -SRCS+= eap_aka.c +NEED_SHA256= true +SRCS+= eap_server_aka.c .endif .if !empty(CFLAGS:M*-DEAP_SIM) NEED_SIM_COMMON= true -SRCS+= eap_sim.c +SRCS+= eap_server_sim.c .endif .if defined(NEED_SIM_COMMON) -SRCS+= eap_sim_common.c eap_sim_db.c +SRCS+= eap_sim_common.c \ + eap_sim_db.c +NEED_AES_CBC= true +NEED_FIPS186_2_PRF= true .endif .if !empty(CFLAGS:M*-DEAP_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 -SRCS+= eap_gpsk.c eap_gpsk_common.c +SRCS+= eap_server_gpsk.c \ + eap_gpsk_common.c NEED_SHA256= true +NEED_AES_OMAC1= true .endif .if !empty(CFLAGS:M*-DEAP_PAX) -SRCS+= eap_pax.c eap_pax_common.c +SRCS+= eap_server_pax.c \ + eap_pax_common.c .endif .if !empty(CFLAGS:M*-DEAP_SAKE) -SRCS+= eap_sake.c eap_sake_common.c +SRCS+= eap_server_sake.c \ + eap_sake_common.c .endif DPADD+= ${LIBSSL} ${LIBCRYPTO} @@ -108,12 +148,19 @@ LDADD+= -lssl -lcrypto NEED_TLS_NONE= true .endif -.else -NEED_TLS_NONE= true +.if defined(NEED_AES_CBC) +SRCS+= aes-cbc.c +.endif + +.if defined(NEED_AES_OMAC1) +SRCS+= aes-omac1.c +.endif + +.if defined(NEED_FIPS186_2_PRF) +SRCS+= fips_prf_openssl.c .endif .if defined(NEED_SHA256) -CFLAGS+=-DINTERNAL_SHA256 SRCS+= sha256.c .endif From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 17:36:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8B361065673; Thu, 26 Apr 2012 17:36:05 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18EA8FC0A; Thu, 26 Apr 2012 17:36:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QHa50G060178; Thu, 26 Apr 2012 17:36:05 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QHa5qq060172; Thu, 26 Apr 2012 17:36:05 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201204261736.q3QHa5qq060172@svn.freebsd.org> From: Jamie Gritton Date: Thu, 26 Apr 2012 17:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234712 - in head: lib/libc/sys usr.sbin/jail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 17:36:05 -0000 Author: jamie Date: Thu Apr 26 17:36:05 2012 New Revision: 234712 URL: http://svn.freebsd.org/changeset/base/234712 Log: A new jail(8) with a configuration file, ultimately to replace the work currently done by /etc/rc.d/jail. MFC after: 3 months Added: head/usr.sbin/jail/command.c - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/command.c head/usr.sbin/jail/config.c - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/config.c head/usr.sbin/jail/jail.conf.5 - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/jail.conf.5 head/usr.sbin/jail/jaillex.l - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/jaillex.l head/usr.sbin/jail/jailp.h - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/jailp.h head/usr.sbin/jail/jailparse.y - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/jailparse.y head/usr.sbin/jail/state.c - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/state.c Modified: head/lib/libc/sys/jail.2 head/usr.sbin/jail/Makefile head/usr.sbin/jail/jail.8 head/usr.sbin/jail/jail.c Directory Properties: head/lib/libc/ (props changed) head/usr.sbin/jail/ (props changed) Modified: head/lib/libc/sys/jail.2 ============================================================================== --- head/lib/libc/sys/jail.2 Thu Apr 26 17:35:11 2012 (r234711) +++ head/lib/libc/sys/jail.2 Thu Apr 26 17:36:05 2012 (r234712) @@ -247,44 +247,6 @@ They return \-1 on failure, and set to indicate the error. .Pp .Rv -std jail_attach jail_remove -.Sh PRISON? -Once a process has been put in a prison, it and its descendants cannot escape -the prison. -.Pp -Inside the prison, the concept of -.Dq superuser -is very diluted. -In general, -it can be assumed that nothing can be mangled from inside a prison which -does not exist entirely inside that prison. -For instance the directory -tree below -.Dq Li path -can be manipulated all the ways a root can normally do it, including -.Dq Li "rm -rf /*" -but new device special nodes cannot be created because they reference -shared resources (the device drivers in the kernel). -The effective -.Dq securelevel -for a process is the greater of the global -.Dq securelevel -or, if present, the per-jail -.Dq securelevel . -.Pp -All IP activity will be forced to happen to/from the IP number specified, -which should be an alias on one of the network interfaces. -All connections to/from the loopback address -.Pf ( Li 127.0.0.1 -for IPv4, -.Li ::1 -for IPv6) will be changed to be to/from the primary address -of the jail for the given address family. -.Pp -It is possible to identify a process as jailed by examining -.Dq Li /proc//status : -it will show a field near the end of the line, either as -a single hyphen for a process at large, or the name currently -set for the prison for jailed processes. .Sh ERRORS The .Fn jail @@ -415,7 +377,7 @@ and .Fn jail_attach call .Xr chroot 2 -internally, so it can fail for all the same reasons. +internally, so they can fail for all the same reasons. Please consult the .Xr chroot 2 manual page for details. Modified: head/usr.sbin/jail/Makefile ============================================================================== --- head/usr.sbin/jail/Makefile Thu Apr 26 17:35:11 2012 (r234711) +++ head/usr.sbin/jail/Makefile Thu Apr 26 17:36:05 2012 (r234712) @@ -3,9 +3,14 @@ .include PROG= jail -MAN= jail.8 -DPADD= ${LIBJAIL} ${LIBUTIL} -LDADD= -ljail -lutil +MAN= jail.8 jail.conf.5 +SRCS= jail.c command.c config.c state.c jailp.h jaillex.l jailparse.y y.tab.h + +DPADD= ${LIBJAIL} ${LIBKVM} ${LIBUTIL} ${LIBL} +LDADD= -ljail -lkvm -lutil -ll + +YFLAGS+=-v +CFLAGS+=-I. -I${.CURDIR} .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 @@ -14,4 +19,6 @@ CFLAGS+= -DINET6 CFLAGS+= -DINET .endif +CLEANFILES= y.output + .include Copied: head/usr.sbin/jail/command.c (from r232242, projects/jailconf/usr.sbin/jail/command.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/jail/command.c Thu Apr 26 17:36:05 2012 (r234712, copy of r232242, projects/jailconf/usr.sbin/jail/command.c) @@ -0,0 +1,857 @@ +/*- + * Copyright (c) 2011 James Gritton + * 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 +#include +#include +#include +#include +#include +#include +#include + +#include "jailp.h" + +#define DEFAULT_STOP_TIMEOUT 10 +#define PHASH_SIZE 256 + +LIST_HEAD(phhead, phash); + +struct phash { + LIST_ENTRY(phash) le; + struct cfjail *j; + pid_t pid; +}; + +int paralimit = -1; + +extern char **environ; + +static int run_command(struct cfjail *j); +static void add_proc(struct cfjail *j, pid_t pid); +static void clear_procs(struct cfjail *j); +static struct cfjail *find_proc(pid_t pid); +static int term_procs(struct cfjail *j); +static int get_user_info(struct cfjail *j, const char *username, + const struct passwd **pwdp, login_cap_t **lcapp); +static int check_path(struct cfjail *j, const char *pname, const char *path, + int isfile, const char *umount_type); + +static struct cfjails sleeping = TAILQ_HEAD_INITIALIZER(sleeping); +static struct cfjails runnable = TAILQ_HEAD_INITIALIZER(runnable); +static struct cfstring dummystring = { .len = 1 }; +static struct phhead phash[PHASH_SIZE]; +static int kq; + +/* + * Run the next command associated with a jail. + */ +int +next_command(struct cfjail *j) +{ + enum intparam comparam; + int create_failed; + + if (paralimit == 0) { + requeue(j, &runnable); + return 1; + } + create_failed = (j->flags & (JF_STOP | JF_FAILED)) == JF_FAILED; + comparam = *j->comparam; + for (;;) { + if (j->comstring == NULL) { + j->comparam += create_failed ? -1 : 1; + switch ((comparam = *j->comparam)) { + case 0: + return 0; + case IP_MOUNT_DEVFS: + if (!bool_param(j->intparams[IP_MOUNT_DEVFS])) + continue; + /* FALLTHROUGH */ + case IP__OP: + case IP_STOP_TIMEOUT: + j->comstring = &dummystring; + break; + default: + if (j->intparams[comparam] == NULL) + continue; + j->comstring = create_failed + ? TAILQ_LAST(&j->intparams[comparam]->val, + cfstrings) + : TAILQ_FIRST(&j->intparams[comparam]->val); + } + } else { + j->comstring = j->comstring == &dummystring ? NULL : + create_failed + ? TAILQ_PREV(j->comstring, cfstrings, tq) + : TAILQ_NEXT(j->comstring, tq); + } + if (j->comstring == NULL || j->comstring->len == 0 || + (create_failed && (comparam == IP_EXEC_PRESTART || + comparam == IP_EXEC_START || comparam == IP_COMMAND || + comparam == IP_EXEC_POSTSTART))) + continue; + switch (run_command(j)) { + case -1: + failed(j); + /* FALLTHROUGH */ + case 1: + return 1; + } + } +} + +/* + * Check command exit status + */ +int +finish_command(struct cfjail *j) +{ + int error; + + if (!(j->flags & JF_SLEEPQ)) + return 0; + j->flags &= ~JF_SLEEPQ; + if (*j->comparam == IP_STOP_TIMEOUT) + { + j->flags &= ~JF_TIMEOUT; + j->pstatus = 0; + return 0; + } + paralimit++; + if (!TAILQ_EMPTY(&runnable)) + requeue(TAILQ_FIRST(&runnable), &ready); + error = 0; + if (j->flags & JF_TIMEOUT) { + j->flags &= ~JF_TIMEOUT; + if (*j->comparam != IP_STOP_TIMEOUT) { + jail_warnx(j, "%s: timed out", j->comline); + failed(j); + error = -1; + } else if (verbose > 0) + jail_note(j, "timed out\n"); + } else if (j->pstatus != 0) { + if (WIFSIGNALED(j->pstatus)) + jail_warnx(j, "%s: exited on signal %d", + j->comline, WTERMSIG(j->pstatus)); + else + jail_warnx(j, "%s: failed", j->comline); + j->pstatus = 0; + failed(j); + error = -1; + } + free(j->comline); + j->comline = NULL; + return error; +} + +/* + * Check for finished processes or timeouts. + */ +struct cfjail * +next_proc(int nonblock) +{ + struct kevent ke; + struct timespec ts; + struct timespec *tsp; + struct cfjail *j; + + if (!TAILQ_EMPTY(&sleeping)) { + again: + tsp = NULL; + if ((j = TAILQ_FIRST(&sleeping)) && j->timeout.tv_sec) { + clock_gettime(CLOCK_REALTIME, &ts); + ts.tv_sec = j->timeout.tv_sec - ts.tv_sec; + ts.tv_nsec = j->timeout.tv_nsec - ts.tv_nsec; + if (ts.tv_nsec < 0) { + ts.tv_sec--; + ts.tv_nsec += 1000000000; + } + if (ts.tv_sec < 0 || + (ts.tv_sec == 0 && ts.tv_nsec == 0)) { + j->flags |= JF_TIMEOUT; + clear_procs(j); + return j; + } + tsp = &ts; + } + if (nonblock) { + ts.tv_sec = 0; + ts.tv_nsec = 0; + tsp = &ts; + } + switch (kevent(kq, NULL, 0, &ke, 1, tsp)) { + case -1: + if (errno != EINTR) + err(1, "kevent"); + goto again; + case 0: + if (!nonblock) { + j = TAILQ_FIRST(&sleeping); + j->flags |= JF_TIMEOUT; + clear_procs(j); + return j; + } + break; + case 1: + (void)waitpid(ke.ident, NULL, WNOHANG); + if ((j = find_proc(ke.ident))) { + j->pstatus = ke.data; + return j; + } + goto again; + } + } + return NULL; +} + +/* + * Run a single command for a jail, possible inside the jail. + */ +int +run_command(struct cfjail *j) +{ + const struct passwd *pwd; + const struct cfstring *comstring, *s; + login_cap_t *lcap; + char **argv; + char *cs, *comcs, *devpath; + const char *jidstr, *conslog, *path, *ruleset, *term, *username; + enum intparam comparam; + size_t comlen; + pid_t pid; + int argc, bg, clean, consfd, down, fib, i, injail, sjuser, timeout; +#if defined(INET) || defined(INET6) + char *addr; +#endif + + static char *cleanenv; + + /* Perform some operations that aren't actually commands */ + comparam = *j->comparam; + down = j->flags & (JF_STOP | JF_FAILED); + switch (comparam) { + case IP_STOP_TIMEOUT: + return term_procs(j); + + case IP__OP: + if (down) { + if (jail_remove(j->jid) < 0 && errno == EPERM) { + jail_warnx(j, "jail_remove: %s", + strerror(errno)); + return -1; + } + if (verbose > 0 || (verbose == 0 && (j->flags & JF_STOP + ? note_remove : j->name != NULL))) + jail_note(j, "removed\n"); + j->jid = -1; + if (j->flags & JF_STOP) + dep_done(j, DF_LIGHT); + else + j->flags &= ~JF_PERSIST; + } else { + if (create_jail(j) < 0) + return -1; + if (verbose >= 0 && (j->name || verbose > 0)) + jail_note(j, "created\n"); + dep_done(j, DF_LIGHT); + } + return 0; + + default: ; + } + /* + * Collect exec arguments. Internal commands for network and + * mounting build their own argument lists. + */ + comstring = j->comstring; + bg = 0; + switch (comparam) { +#ifdef INET + case IP__IP4_IFADDR: + argv = alloca(8 * sizeof(char *)); + *(const char **)&argv[0] = _PATH_IFCONFIG; + if ((cs = strchr(comstring->s, '|'))) { + argv[1] = alloca(cs - comstring->s + 1); + strlcpy(argv[1], comstring->s, cs - comstring->s + 1); + addr = cs + 1; + } else { + *(const char **)&argv[1] = + string_param(j->intparams[IP_INTERFACE]); + addr = comstring->s; + } + *(const char **)&argv[2] = "inet"; + if (!(cs = strchr(addr, '/'))) { + argv[3] = addr; + *(const char **)&argv[4] = "netmask"; + *(const char **)&argv[5] = "255.255.255.255"; + argc = 6; + } else if (strchr(cs + 1, '.')) { + argv[3] = alloca(cs - addr + 1); + strlcpy(argv[3], addr, cs - addr + 1); + *(const char **)&argv[4] = "netmask"; + *(const char **)&argv[5] = cs + 1; + argc = 6; + } else { + argv[3] = addr; + argc = 4; + } + *(const char **)&argv[argc] = down ? "-alias" : "alias"; + argv[argc + 1] = NULL; + break; +#endif + +#ifdef INET6 + case IP__IP6_IFADDR: + argv = alloca(8 * sizeof(char *)); + *(const char **)&argv[0] = _PATH_IFCONFIG; + if ((cs = strchr(comstring->s, '|'))) { + argv[1] = alloca(cs - comstring->s + 1); + strlcpy(argv[1], comstring->s, cs - comstring->s + 1); + addr = cs + 1; + } else { + *(const char **)&argv[1] = + string_param(j->intparams[IP_INTERFACE]); + addr = comstring->s; + } + *(const char **)&argv[2] = "inet6"; + argv[3] = addr; + if (!(cs = strchr(addr, '/'))) { + *(const char **)&argv[4] = "prefixlen"; + *(const char **)&argv[5] = "128"; + argc = 6; + } else + argc = 4; + *(const char **)&argv[argc] = down ? "-alias" : "alias"; + argv[argc + 1] = NULL; + break; +#endif + + case IP_VNET_INTERFACE: + argv = alloca(5 * sizeof(char *)); + *(const char **)&argv[0] = _PATH_IFCONFIG; + argv[1] = comstring->s; + *(const char **)&argv[2] = down ? "-vnet" : "vnet"; + jidstr = string_param(j->intparams[KP_JID]); + *(const char **)&argv[3] = + jidstr ? jidstr : string_param(j->intparams[KP_NAME]); + argv[4] = NULL; + break; + + case IP_MOUNT: + case IP__MOUNT_FROM_FSTAB: + argv = alloca(8 * sizeof(char *)); + comcs = alloca(comstring->len + 1); + strcpy(comcs, comstring->s); + argc = 0; + for (cs = strtok(comcs, " \t\f\v\r\n"); cs && argc < 4; + cs = strtok(NULL, " \t\f\v\r\n")) + argv[argc++] = cs; + if (argc == 0) + return 0; + if (argc < 3) { + jail_warnx(j, "%s: %s: missing information", + j->intparams[comparam]->name, comstring->s); + return -1; + } + if (check_path(j, j->intparams[comparam]->name, argv[1], 0, + down ? argv[2] : NULL) < 0) + return -1; + if (down) { + argv[4] = NULL; + argv[3] = argv[1]; + *(const char **)&argv[0] = "/sbin/umount"; + } else { + if (argc == 4) { + argv[7] = NULL; + argv[6] = argv[1]; + argv[5] = argv[0]; + argv[4] = argv[3]; + *(const char **)&argv[3] = "-o"; + } else { + argv[5] = NULL; + argv[4] = argv[1]; + argv[3] = argv[0]; + } + *(const char **)&argv[0] = _PATH_MOUNT; + } + *(const char **)&argv[1] = "-t"; + break; + + case IP_MOUNT_DEVFS: + argv = alloca(7 * sizeof(char *)); + path = string_param(j->intparams[KP_PATH]); + if (path == NULL) { + jail_warnx(j, "mount.devfs: no path"); + return -1; + } + devpath = alloca(strlen(path) + 5); + sprintf(devpath, "%s/dev", path); + if (check_path(j, "mount.devfs", devpath, 0, + down ? "devfs" : NULL) < 0) + return -1; + if (down) { + *(const char **)&argv[0] = "/sbin/umount"; + argv[1] = devpath; + argv[2] = NULL; + } else { + *(const char **)&argv[0] = _PATH_MOUNT; + *(const char **)&argv[1] = "-t"; + *(const char **)&argv[2] = "devfs"; + ruleset = string_param(j->intparams[KP_DEVFS_RULESET]); + if (!ruleset) + ruleset = "4"; /* devfsrules_jail */ + argv[3] = alloca(11 + strlen(ruleset)); + sprintf(argv[3], "-oruleset=%s", ruleset); + *(const char **)&argv[4] = "."; + argv[5] = devpath; + argv[6] = NULL; + } + break; + + case IP_COMMAND: + if (j->name != NULL) + goto default_command; + argc = 0; + TAILQ_FOREACH(s, &j->intparams[IP_COMMAND]->val, tq) + argc++; + argv = alloca((argc + 1) * sizeof(char *)); + argc = 0; + TAILQ_FOREACH(s, &j->intparams[IP_COMMAND]->val, tq) + argv[argc++] = s->s; + argv[argc] = NULL; + j->comstring = &dummystring; + break; + + default: + default_command: + if ((cs = strpbrk(comstring->s, "!\"$&'()*;<>?[\\]`{|}~")) && + !(cs[0] == '&' && cs[1] == '\0')) { + argv = alloca(4 * sizeof(char *)); + *(const char **)&argv[0] = _PATH_BSHELL; + *(const char **)&argv[1] = "-c"; + argv[2] = comstring->s; + argv[3] = NULL; + } else { + if (cs) { + *cs = 0; + bg = 1; + } + comcs = alloca(comstring->len + 1); + strcpy(comcs, comstring->s); + argc = 0; + for (cs = strtok(comcs, " \t\f\v\r\n"); cs; + cs = strtok(NULL, " \t\f\v\r\n")) + argc++; + argv = alloca((argc + 1) * sizeof(char *)); + strcpy(comcs, comstring->s); + argc = 0; + for (cs = strtok(comcs, " \t\f\v\r\n"); cs; + cs = strtok(NULL, " \t\f\v\r\n")) + argv[argc++] = cs; + argv[argc] = NULL; + } + } + if (argv[0] == NULL) + return 0; + + if (int_param(j->intparams[IP_EXEC_TIMEOUT], &timeout) && + timeout != 0) { + clock_gettime(CLOCK_REALTIME, &j->timeout); + j->timeout.tv_sec += timeout; + } else + j->timeout.tv_sec = 0; + + injail = comparam == IP_EXEC_START || comparam == IP_COMMAND || + comparam == IP_EXEC_STOP; + clean = bool_param(j->intparams[IP_EXEC_CLEAN]); + username = string_param(j->intparams[injail + ? IP_EXEC_JAIL_USER : IP_EXEC_SYSTEM_USER]); + sjuser = bool_param(j->intparams[IP_EXEC_SYSTEM_JAIL_USER]); + + consfd = 0; + if (injail && + (conslog = string_param(j->intparams[IP_EXEC_CONSOLELOG]))) { + if (check_path(j, "exec.consolelog", conslog, 1, NULL) < 0) + return -1; + consfd = + open(conslog, O_WRONLY | O_CREAT | O_APPEND, DEFFILEMODE); + if (consfd < 0) { + jail_warnx(j, "open %s: %s", conslog, strerror(errno)); + return -1; + } + } + + comlen = 0; + for (i = 0; argv[i]; i++) + comlen += strlen(argv[i]) + 1; + j->comline = cs = emalloc(comlen); + for (i = 0; argv[i]; i++) { + strcpy(cs, argv[i]); + if (argv[i + 1]) { + cs += strlen(argv[i]) + 1; + cs[-1] = ' '; + } + } + if (verbose > 0) + jail_note(j, "run command%s%s%s: %s\n", + injail ? " in jail" : "", username ? " as " : "", + username ? username : "", j->comline); + + pid = fork(); + if (pid < 0) + err(1, "fork"); + if (pid > 0) { + if (bg) { + free(j->comline); + j->comline = NULL; + return 0; + } else { + paralimit--; + add_proc(j, pid); + return 1; + } + } + if (bg) + setsid(); + + /* Set up the environment and run the command */ + pwd = NULL; + lcap = NULL; + if ((clean || username) && injail && sjuser && + get_user_info(j, username, &pwd, &lcap) < 0) + exit(1); + if (injail) { + /* jail_attach won't chdir along with its chroot. */ + path = string_param(j->intparams[KP_PATH]); + if (path && chdir(path) < 0) { + jail_warnx(j, "chdir %s: %s", path, strerror(errno)); + exit(1); + } + if (int_param(j->intparams[IP_EXEC_FIB], &fib) && + setfib(fib) < 0) { + jail_warnx(j, "setfib: %s", strerror(errno)); + exit(1); + } + if (jail_attach(j->jid) < 0) { + jail_warnx(j, "jail_attach: %s", strerror(errno)); + exit(1); + } + } + if (clean || username) { + if (!(injail && sjuser) && + get_user_info(j, username, &pwd, &lcap) < 0) + exit(1); + if (clean) { + term = getenv("TERM"); + environ = &cleanenv; + setenv("PATH", "/bin:/usr/bin", 0); + setenv("TERM", term, 1); + } + if (setusercontext(lcap, pwd, pwd->pw_uid, username + ? LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN + : LOGIN_SETPATH | LOGIN_SETENV) < 0) { + jail_warnx(j, "setusercontext %s: %s", pwd->pw_name, + strerror(errno)); + exit(1); + } + login_close(lcap); + setenv("USER", pwd->pw_name, 1); + setenv("HOME", pwd->pw_dir, 1); + setenv("SHELL", + *pwd->pw_shell ? pwd->pw_shell : _PATH_BSHELL, 1); + if (clean && chdir(pwd->pw_dir) < 0) { + jail_warnx(j, "chdir %s: %s", + pwd->pw_dir, strerror(errno)); + exit(1); + } + endpwent(); + } + + if (consfd != 0 && (dup2(consfd, 1) < 0 || dup2(consfd, 2) < 0)) { + jail_warnx(j, "exec.consolelog: %s", strerror(errno)); + exit(1); + } + closefrom(3); + execvp(argv[0], argv); + jail_warnx(j, "exec %s: %s", argv[0], strerror(errno)); + exit(1); +} + +/* + * Add a process to the hash, tied to a jail. + */ +static void +add_proc(struct cfjail *j, pid_t pid) +{ + struct kevent ke; + struct cfjail *tj; + struct phash *ph; + + if (!kq && (kq = kqueue()) < 0) + err(1, "kqueue"); + EV_SET(&ke, pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, NULL); + if (kevent(kq, &ke, 1, NULL, 0, NULL) < 0) + err(1, "kevent"); + ph = emalloc(sizeof(struct phash)); + ph->j = j; + ph->pid = pid; + LIST_INSERT_HEAD(&phash[pid % PHASH_SIZE], ph, le); + j->nprocs++; + j->flags |= JF_SLEEPQ; + if (j->timeout.tv_sec == 0) + requeue(j, &sleeping); + else { + /* File the jail in the sleep queue acording to its timeout. */ + TAILQ_REMOVE(j->queue, j, tq); + TAILQ_FOREACH(tj, &sleeping, tq) { + if (!tj->timeout.tv_sec || + j->timeout.tv_sec < tj->timeout.tv_sec || + (j->timeout.tv_sec == tj->timeout.tv_sec && + j->timeout.tv_nsec <= tj->timeout.tv_nsec)) { + TAILQ_INSERT_BEFORE(tj, j, tq); + break; + } + } + if (tj == NULL) + TAILQ_INSERT_TAIL(&sleeping, j, tq); + j->queue = &sleeping; + } +} + +/* + * Remove any processes from the hash that correspond to a jail. + */ +static void +clear_procs(struct cfjail *j) +{ + struct kevent ke; + struct phash *ph, *tph; + int i; + + j->nprocs = 0; + for (i = 0; i < PHASH_SIZE; i++) + LIST_FOREACH_SAFE(ph, &phash[i], le, tph) + if (ph->j == j) { + EV_SET(&ke, ph->pid, EVFILT_PROC, EV_DELETE, + NOTE_EXIT, 0, NULL); + (void)kevent(kq, &ke, 1, NULL, 0, NULL); + LIST_REMOVE(ph, le); + free(ph); + } +} + +/* + * Find the jail that corresponds to an exited process. + */ +static struct cfjail * +find_proc(pid_t pid) +{ + struct cfjail *j; + struct phash *ph; + + LIST_FOREACH(ph, &phash[pid % PHASH_SIZE], le) + if (ph->pid == pid) { + j = ph->j; + LIST_REMOVE(ph, le); + free(ph); + return --j->nprocs ? NULL : j; + } + return NULL; +} + +/* + * Send SIGTERM to all processes in a jail and wait for them to die. + */ +static int +term_procs(struct cfjail *j) +{ + struct kinfo_proc *ki; + int i, noted, pcnt, timeout; + + static kvm_t *kd; + + if (!int_param(j->intparams[IP_STOP_TIMEOUT], &timeout)) + timeout = DEFAULT_STOP_TIMEOUT; + else if (timeout == 0) + return 0; + + if (kd == NULL) { + kd = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); + if (kd == NULL) + return 0; + } + + ki = kvm_getprocs(kd, KERN_PROC_PROC, 0, &pcnt); + if (ki == NULL) + return 0; + noted = 0; + for (i = 0; i < pcnt; i++) + if (ki[i].ki_jid == j->jid && + kill(ki[i].ki_pid, SIGTERM) == 0) { + add_proc(j, ki[i].ki_pid); + if (verbose > 0) { + if (!noted) { + noted = 1; + jail_note(j, "sent SIGTERM to:"); + } + printf(" %d", ki[i].ki_pid); + } + } + if (noted) + printf("\n"); + if (j->nprocs > 0) { + clock_gettime(CLOCK_REALTIME, &j->timeout); + j->timeout.tv_sec += timeout; + return 1; + } + return 0; +} + +/* + * Look up a user in the passwd and login.conf files. + */ +static int +get_user_info(struct cfjail *j, const char *username, + const struct passwd **pwdp, login_cap_t **lcapp) +{ + const struct passwd *pwd; + + *pwdp = pwd = username ? getpwnam(username) : getpwuid(getuid()); + if (pwd == NULL) { + if (errno) + jail_warnx(j, "getpwnam%s%s: %s", username ? " " : "", + username ? username : "", strerror(errno)); + else if (username) + jail_warnx(j, "%s: no such user", username); + else + jail_warnx(j, "unknown uid %d", getuid()); + return -1; + } + *lcapp = login_getpwclass(pwd); + if (*lcapp == NULL) { + jail_warnx(j, "getpwclass %s: %s", pwd->pw_name, + strerror(errno)); + return -1; + } + /* Set the groups while the group file is still available */ + if (initgroups(pwd->pw_name, pwd->pw_gid) < 0) { + jail_warnx(j, "initgroups %s: %s", pwd->pw_name, + strerror(errno)); + return -1; + } + return 0; +} + +/* + * Make sure a mount or consolelog path is a valid absolute pathname + * with no symlinks. + */ +static int +check_path(struct cfjail *j, const char *pname, const char *path, int isfile, + const char *umount_type) +{ + struct stat st, mpst; + struct statfs stfs; + char *tpath, *p; + const char *jailpath; + size_t jplen; + + if (path[0] != '/') { + jail_warnx(j, "%s: %s: not an absolute pathname", + pname, path); + return -1; + } + /* + * Only check for symlinks in components below the jail's path, + * since that's where the security risk lies. + */ + jailpath = string_param(j->intparams[KP_PATH]); + if (jailpath == NULL) + jailpath = ""; + jplen = strlen(jailpath); + if (!strncmp(path, jailpath, jplen) && path[jplen] == '/') { + tpath = alloca(strlen(path) + 1); + strcpy(tpath, path); + for (p = tpath + jplen; p != NULL; ) { + p = strchr(p + 1, '/'); + if (p) + *p = '\0'; + if (lstat(tpath, &st) < 0) { + if (errno == ENOENT && isfile && !p) + break; + jail_warnx(j, "%s: %s: %s", pname, tpath, + strerror(errno)); + return -1; + } + if (S_ISLNK(st.st_mode)) { + jail_warnx(j, "%s: %s is a symbolic link", + pname, tpath); + return -1; + } + if (p) + *p = '/'; + } + } + if (umount_type != NULL) { + if (stat(path, &st) < 0 || statfs(path, &stfs) < 0) { + jail_warnx(j, "%s: %s: %s", pname, path, + strerror(errno)); + return -1; + } + if (stat(stfs.f_mntonname, &mpst) < 0) { + jail_warnx(j, "%s: %s: %s", pname, stfs.f_mntonname, + strerror(errno)); + return -1; + } + if (st.st_ino != mpst.st_ino) { + jail_warnx(j, "%s: %s: not a mount point", + pname, path); + return -1; + } + if (strcmp(stfs.f_fstypename, umount_type)) { + jail_warnx(j, "%s: %s: not a %s mount", + pname, path, umount_type); + return -1; + } + } + return 0; +} Copied: head/usr.sbin/jail/config.c (from r232242, projects/jailconf/usr.sbin/jail/config.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/jail/config.c Thu Apr 26 17:36:05 2012 (r234712, copy of r232242, projects/jailconf/usr.sbin/jail/config.c) @@ -0,0 +1,831 @@ +/*- + * Copyright (c) 2011 James Gritton + * 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 + +#include "jailp.h" + +struct ipspec { + const char *name; + unsigned flags; +}; + +extern FILE *yyin; +extern int yynerrs; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 19:21:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEE0C106566C; Thu, 26 Apr 2012 19:21:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBB358FC0A; Thu, 26 Apr 2012 19:21:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QJLwfL064215; Thu, 26 Apr 2012 19:21:58 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QJLwsh064213; Thu, 26 Apr 2012 19:21:58 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201204261921.q3QJLwsh064213@svn.freebsd.org> From: Eitan Adler Date: Thu, 26 Apr 2012 19:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234714 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:21:59 -0000 Author: eadler Date: Thu Apr 26 19:21:58 2012 New Revision: 234714 URL: http://svn.freebsd.org/changeset/base/234714 Log: Use the .Bx macro instead of BSD Submitted by: ru Approved by: ru MFC after: 3 days X-MFC-With: r234700 Modified: head/lib/libc/gen/err.3 Modified: head/lib/libc/gen/err.3 ============================================================================== --- head/lib/libc/gen/err.3 Thu Apr 26 18:16:44 2012 (r234713) +++ head/lib/libc/gen/err.3 Thu Apr 26 19:21:58 2012 (r234714) @@ -217,7 +217,9 @@ The .Fn err and .Fn warn -families of functions are BSD extensions. +families of functions are +.Bx +extensions. As such they should not be used in truly portable code. Use .Fn strerror From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 19:31:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C8AF106566B; Thu, 26 Apr 2012 19:31:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28D928FC1A; Thu, 26 Apr 2012 19:31:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QJVHnW064716; Thu, 26 Apr 2012 19:31:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QJVG72064714; Thu, 26 Apr 2012 19:31:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204261931.q3QJVG72064714@svn.freebsd.org> From: Michael Tuexen Date: Thu, 26 Apr 2012 19:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:31:17 -0000 Author: tuexen Date: Thu Apr 26 19:31:16 2012 New Revision: 234715 URL: http://svn.freebsd.org/changeset/base/234715 Log: Export symbols for sctp_sendv() and sctp_recvv(). MFC after: 1 week Modified: head/lib/libc/net/Symbol.map Modified: head/lib/libc/net/Symbol.map ============================================================================== --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 (r234714) +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) @@ -135,8 +135,10 @@ FBSD_1.0 { sctp_sendmsg; sctp_sendmsgx; sctp_send; + sctp_sendv; sctp_sendx; sctp_recvmsg; + sctp_recvv; setipv4sourcefilter; getipv4sourcefilter; getsourcefilter; From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 19:33:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74DE8106566B; Thu, 26 Apr 2012 19:33:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id E56598FC12; Thu, 26 Apr 2012 19:33:29 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q3QJXPfb000601; Thu, 26 Apr 2012 22:33:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q3QJXPUU029075; Thu, 26 Apr 2012 22:33:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q3QJXOVv029074; Thu, 26 Apr 2012 22:33:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 26 Apr 2012 22:33:24 +0300 From: Konstantin Belousov To: Michael Tuexen Message-ID: <20120426193324.GV2358@deviant.kiev.zoral.com.ua> References: <201204261931.q3QJVG72064714@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fexaaLh22eEX/G9y" Content-Disposition: inline In-Reply-To: <201204261931.q3QJVG72064714@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:33:30 -0000 --fexaaLh22eEX/G9y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: > Author: tuexen > Date: Thu Apr 26 19:31:16 2012 > New Revision: 234715 > URL: http://svn.freebsd.org/changeset/base/234715 >=20 > Log: > Export symbols for sctp_sendv() and sctp_recvv(). > =20 > MFC after: 1 week >=20 > Modified: > head/lib/libc/net/Symbol.map >=20 > Modified: head/lib/libc/net/Symbol.map > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 (r234714) > +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) > @@ -135,8 +135,10 @@ FBSD_1.0 { > sctp_sendmsg; > sctp_sendmsgx; > sctp_send; > + sctp_sendv; > sctp_sendx; > sctp_recvmsg; > + sctp_recvv; > setipv4sourcefilter; > getipv4sourcefilter; > getsourcefilter; These are new symbols, they should go into the current (FBSD_1.3) version. --fexaaLh22eEX/G9y Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+ZowQACgkQC3+MBN1Mb4i1YQCeMW4+zmKXIeCkb5RmYvgt/q9L 88AAniZVMBGebkzI/iuh9IIrAw1TxG5i =1AJ7 -----END PGP SIGNATURE----- --fexaaLh22eEX/G9y-- From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 19:36:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E1741065670; Thu, 26 Apr 2012 19:36:42 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2E18FC17; Thu, 26 Apr 2012 19:36:41 +0000 (UTC) Received: from [192.168.1.103] (p508F93CD.dip.t-dialin.net [80.143.147.205]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id B9B2D1C0C0BD4; Thu, 26 Apr 2012 21:36:39 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <20120426193324.GV2358@deviant.kiev.zoral.com.ua> Date: Thu, 26 Apr 2012 21:36:38 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> References: <201204261931.q3QJVG72064714@svn.freebsd.org> <20120426193324.GV2358@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:36:42 -0000 On Apr 26, 2012, at 9:33 PM, Konstantin Belousov wrote: > On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: >> Author: tuexen >> Date: Thu Apr 26 19:31:16 2012 >> New Revision: 234715 >> URL: http://svn.freebsd.org/changeset/base/234715 >>=20 >> Log: >> Export symbols for sctp_sendv() and sctp_recvv(). >>=20 >> MFC after: 1 week >>=20 >> Modified: >> head/lib/libc/net/Symbol.map >>=20 >> Modified: head/lib/libc/net/Symbol.map >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 = (r234714) >> +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 = (r234715) >> @@ -135,8 +135,10 @@ FBSD_1.0 { >> sctp_sendmsg; >> sctp_sendmsgx; >> sctp_send; >> + sctp_sendv; >> sctp_sendx; >> sctp_recvmsg; >> + sctp_recvv; >> setipv4sourcefilter; >> getipv4sourcefilter; >> getsourcefilter; > These are new symbols, they should go into the current (FBSD_1.3) > version. And where is that? Should I add something like FBSD_1.3 { sctp_recvv; sctp_sendv; } Or in another file? Will it be possible to MFC that to stable/8 and = stable/9? I added the functions a while ago, but missed to add them to the = Symbol.map. Best regards Michael From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 19:39:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8237A1065670; Thu, 26 Apr 2012 19:39:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 046428FC16; Thu, 26 Apr 2012 19:39:55 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q3QJdoYx001953; Thu, 26 Apr 2012 22:39:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q3QJdojU029128; Thu, 26 Apr 2012 22:39:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q3QJdovP029127; Thu, 26 Apr 2012 22:39:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 26 Apr 2012 22:39:50 +0300 From: Konstantin Belousov To: Michael Tuexen Message-ID: <20120426193950.GW2358@deviant.kiev.zoral.com.ua> References: <201204261931.q3QJVG72064714@svn.freebsd.org> <20120426193324.GV2358@deviant.kiev.zoral.com.ua> <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EODUij44syq40wlh" Content-Disposition: inline In-Reply-To: <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:39:56 -0000 --EODUij44syq40wlh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 26, 2012 at 09:36:38PM +0200, Michael Tuexen wrote: > On Apr 26, 2012, at 9:33 PM, Konstantin Belousov wrote: >=20 > > On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: > >> Author: tuexen > >> Date: Thu Apr 26 19:31:16 2012 > >> New Revision: 234715 > >> URL: http://svn.freebsd.org/changeset/base/234715 > >>=20 > >> Log: > >> Export symbols for sctp_sendv() and sctp_recvv(). > >>=20 > >> MFC after: 1 week > >>=20 > >> Modified: > >> head/lib/libc/net/Symbol.map > >>=20 > >> Modified: head/lib/libc/net/Symbol.map > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >> --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 (r234714) > >> +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) > >> @@ -135,8 +135,10 @@ FBSD_1.0 { > >> sctp_sendmsg; > >> sctp_sendmsgx; > >> sctp_send; > >> + sctp_sendv; > >> sctp_sendx; > >> sctp_recvmsg; > >> + sctp_recvv; > >> setipv4sourcefilter; > >> getipv4sourcefilter; > >> getsourcefilter; > > These are new symbols, they should go into the current (FBSD_1.3) > > version. > And where is that? Should I add something like > FBSD_1.3 { > sctp_recvv; > sctp_sendv; > } Right, add it between FBSD_1.0 and FBSDprivate_1.0. >=20 > Or in another file? Will it be possible to MFC that to stable/8 and stabl= e/9? > I added the functions a while ago, but missed to add them to the Symbol.m= ap. Yes, it is possible to MFC this to both stable/8 and stable/9. Straight merge should do it. --EODUij44syq40wlh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+ZpIYACgkQC3+MBN1Mb4hCQACffrHnbTS41s37Hs0x525dHkOG z04AoPBLyDot9YrQ9OGNLQ3DKUJdfmc3 =++V1 -----END PGP SIGNATURE----- --EODUij44syq40wlh-- From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 19:56:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1B88106566B; Thu, 26 Apr 2012 19:56:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F0178FC15; Thu, 26 Apr 2012 19:56:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QJu6Q2065819; Thu, 26 Apr 2012 19:56:06 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QJu6vN065817; Thu, 26 Apr 2012 19:56:06 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204261956.q3QJu6vN065817@svn.freebsd.org> From: Michael Tuexen Date: Thu, 26 Apr 2012 19:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234716 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:56:06 -0000 Author: tuexen Date: Thu Apr 26 19:56:06 2012 New Revision: 234716 URL: http://svn.freebsd.org/changeset/base/234716 Log: Move sctp_sendv and sctp_recvv to FBSD_1.3 as suggested by Konstantin Belousov. MFC after: 1 week. X-MFC with: r234715 Modified: head/lib/libc/net/Symbol.map Modified: head/lib/libc/net/Symbol.map ============================================================================== --- head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:56:06 2012 (r234716) @@ -135,16 +135,19 @@ FBSD_1.0 { sctp_sendmsg; sctp_sendmsgx; sctp_send; - sctp_sendv; sctp_sendx; sctp_recvmsg; - sctp_recvv; setipv4sourcefilter; getipv4sourcefilter; getsourcefilter; setsourcefilter; }; +FBSD_1.3 { + sctp_recvv; + sctp_sendv; +}; + FBSDprivate_1.0 { _nsdispatch; _nsyyerror; /* generated from nslexer.l */ From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 19:58:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DCBB106566C; Thu, 26 Apr 2012 19:58:04 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id 950348FC0A; Thu, 26 Apr 2012 19:58:03 +0000 (UTC) Received: from [192.168.1.103] (p508F93CD.dip.t-dialin.net [80.143.147.205]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 9AE1E1C0C0BD4; Thu, 26 Apr 2012 21:58:02 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <20120426193950.GW2358@deviant.kiev.zoral.com.ua> Date: Thu, 26 Apr 2012 21:58:01 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <8C81F8AF-359C-4BD7-A349-D82C7B3828C9@freebsd.org> References: <201204261931.q3QJVG72064714@svn.freebsd.org> <20120426193324.GV2358@deviant.kiev.zoral.com.ua> <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> <20120426193950.GW2358@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:58:04 -0000 On Apr 26, 2012, at 9:39 PM, Konstantin Belousov wrote: > On Thu, Apr 26, 2012 at 09:36:38PM +0200, Michael Tuexen wrote: >> On Apr 26, 2012, at 9:33 PM, Konstantin Belousov wrote: >>=20 >>> On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: >>>> Author: tuexen >>>> Date: Thu Apr 26 19:31:16 2012 >>>> New Revision: 234715 >>>> URL: http://svn.freebsd.org/changeset/base/234715 >>>>=20 >>>> Log: >>>> Export symbols for sctp_sendv() and sctp_recvv(). >>>>=20 >>>> MFC after: 1 week >>>>=20 >>>> Modified: >>>> head/lib/libc/net/Symbol.map >>>>=20 >>>> Modified: head/lib/libc/net/Symbol.map >>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>> --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 = (r234714) >>>> +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 = (r234715) >>>> @@ -135,8 +135,10 @@ FBSD_1.0 { >>>> sctp_sendmsg; >>>> sctp_sendmsgx; >>>> sctp_send; >>>> + sctp_sendv; >>>> sctp_sendx; >>>> sctp_recvmsg; >>>> + sctp_recvv; >>>> setipv4sourcefilter; >>>> getipv4sourcefilter; >>>> getsourcefilter; >>> These are new symbols, they should go into the current (FBSD_1.3) >>> version. >> And where is that? Should I add something like >> FBSD_1.3 { >> sctp_recvv; >> sctp_sendv; >> } > Right, add it between FBSD_1.0 and FBSDprivate_1.0. >=20 >>=20 >> Or in another file? Will it be possible to MFC that to stable/8 and = stable/9? >> I added the functions a while ago, but missed to add them to the = Symbol.map. >=20 > Yes, it is possible to MFC this to both stable/8 and stable/9. > Straight merge should do it. Done in r234716. Thanks for the help. Just to be sure: After an MFC to stable/9, the symbol will be usable in = the upcoming 9.1, right? Best regards Michael From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 20:24:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 430371065673; Thu, 26 Apr 2012 20:24:26 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CCFA8FC14; Thu, 26 Apr 2012 20:24:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QKOQ5Z067297; Thu, 26 Apr 2012 20:24:26 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QKOPA6067287; Thu, 26 Apr 2012 20:24:25 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201204262024.q3QKOPA6067287@svn.freebsd.org> From: Attilio Rao Date: Thu, 26 Apr 2012 20:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 20:24:26 -0000 Author: attilio Date: Thu Apr 26 20:24:25 2012 New Revision: 234723 URL: http://svn.freebsd.org/changeset/base/234723 Log: Clean up the intr* MD KPI from the SMP dependency, removing a cause of discrepancy between modules and kernel, but deal with SMP differences within the functions themselves. As an added bonus this also helps in terms of code readability. Requested by: gibbs Reviewed by: jhb, marius MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/include/intr_machdep.h head/sys/i386/i386/machdep.c head/sys/i386/include/intr_machdep.h head/sys/pc98/pc98/machdep.c head/sys/sparc64/include/intr_machdep.h head/sys/sparc64/sparc64/intr_machdep.c head/sys/sparc64/sparc64/machdep.c head/sys/x86/x86/intr_machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/amd64/amd64/machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -296,12 +296,10 @@ cpu_startup(dummy) cpu_setregs(); -#ifdef SMP /* * Add BSP as an interrupt target. */ intr_add_cpu(0); -#endif } /* Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/amd64/include/intr_machdep.h Thu Apr 26 20:24:25 2012 (r234723) @@ -140,15 +140,11 @@ int elcr_probe(void); enum intr_trigger elcr_read_trigger(u_int irq); void elcr_resume(void); void elcr_write_trigger(u_int irq, enum intr_trigger trigger); -#ifdef SMP void intr_add_cpu(u_int cpu); -#endif int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); -#ifdef SMP int intr_bind(u_int vector, u_char cpu); -#endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); int intr_describe(u_int vector, void *ih, const char *descr); Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/i386/i386/machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -337,12 +337,10 @@ cpu_startup(dummy) cpu_setregs(); #endif -#ifdef SMP /* * Add BSP as an interrupt target. */ intr_add_cpu(0); -#endif } /* Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/i386/include/intr_machdep.h Thu Apr 26 20:24:25 2012 (r234723) @@ -131,14 +131,10 @@ int elcr_probe(void); enum intr_trigger elcr_read_trigger(u_int irq); void elcr_resume(void); void elcr_write_trigger(u_int irq, enum intr_trigger trigger); -#ifdef SMP void intr_add_cpu(u_int cpu); -#endif int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); -#ifdef SMP int intr_bind(u_int vector, u_char cpu); -#endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); int intr_describe(u_int vector, void *ih, const char *descr); Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/pc98/pc98/machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -272,12 +272,10 @@ cpu_startup(dummy) vm_pager_bufferinit(); cpu_setregs(); -#ifdef SMP /* * Add BSP as an interrupt target. */ intr_add_cpu(0); -#endif } /* Modified: head/sys/sparc64/include/intr_machdep.h ============================================================================== --- head/sys/sparc64/include/intr_machdep.h Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/sparc64/include/intr_machdep.h Thu Apr 26 20:24:25 2012 (r234723) @@ -91,9 +91,7 @@ struct intr_vector { extern ih_func_t *intr_handlers[]; extern struct intr_vector intr_vectors[]; -#ifdef SMP void intr_add_cpu(u_int cpu); -#endif int intr_bind(int vec, u_char cpu); int intr_describe(int vec, void *ih, const char *descr); void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf, Modified: head/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/intr_machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/sparc64/sparc64/intr_machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -554,4 +554,20 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); +#else /* !SMP */ + +/* Return EOPNOTSUPP in the UP case. */ +int +intr_bind(int vec __unused, u_char cpu __unused) +{ + + return (EOPNOTSUPP); +} + +/* Use an empty stub for compatibility. */ +void +intr_add_cpu(u_int cpu __unused) +{ + +} #endif Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/sparc64/sparc64/machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -197,12 +197,10 @@ cpu_startup(void *arg) cpu_identify(rdpr(ver), PCPU_GET(clock), curcpu); -#ifdef SMP /* * Add BSP as an interrupt target. */ intr_add_cpu(0); -#endif } void Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/x86/x86/intr_machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -565,4 +565,19 @@ intr_next_cpu(void) return (PCPU_GET(apic_id)); } + +/* Return EOPNOTSUPP in the UP case. */ +int +intr_bind(u_int vector __unused, u_char cpu __unused) +{ + + return (EOPNOTSUPP); +} + +/* Use an empty stub for compatibility. */ +void +intr_add_cpu(u_int cpu __unused) +{ + +} #endif From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 21:51:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D45C106566B; Thu, 26 Apr 2012 21:51:35 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0D3BA8FC0A; Thu, 26 Apr 2012 21:51:34 +0000 (UTC) Received: by yhgm50 with SMTP id m50so91630yhg.13 for ; Thu, 26 Apr 2012 14:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jr1Il+HSuBQwA+muXJO0wnmtWfhSBMbcoxQ3xQuLTWY=; b=jPKvWsF3kItzFv0dmqi1z6RO0mBEWHptSL31RjNKbsCP8c7IPtQGNMj0cHuYNc4wp5 KvosXk7NCFusjHKD9kmteuZgPggkqQisw6YqYNeFnWuvrAcSA9hkQKB/UOeyTL13m1pH pyIu12am7hIr2L9i0AUqWP/elTIlxVF/naTajXAsYL2dPfzlTIJ8wx6a8gJB5R0hdJUF I7wiNcJguf9SJEiJpQ2wzw7TmmdDaK0Ul7VWfMMmSRaWt6hraDs2qT5snrB7kPclTSQp qHO/kFMu4G4MA+Roc3lC7kiz1QIvTGc5xhzljb5WvY7uCXiIt/YY7OE3UYGKZYJU26jf /J6A== MIME-Version: 1.0 Received: by 10.50.36.194 with SMTP id s2mr8807393igj.46.1335477094121; Thu, 26 Apr 2012 14:51:34 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.231.166.138 with HTTP; Thu, 26 Apr 2012 14:51:34 -0700 (PDT) In-Reply-To: <201204261735.q3QHZCH4060106@svn.freebsd.org> References: <201204261735.q3QHZCH4060106@svn.freebsd.org> Date: Thu, 26 Apr 2012 23:51:34 +0200 X-Google-Sender-Auth: Etf8lxqC3DwGgdLcVMkR8_BHhac Message-ID: From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Bernhard Schmidt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234711 - in head/usr.sbin/wpa: . hostapd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 21:51:35 -0000 Thanks, i actually forgot to submit this. On Thu, Apr 26, 2012 at 7:35 PM, Bernhard Schmidt wr= ote: > Author: bschmidt > Date: Thu Apr 26 17:35:11 2012 > New Revision: 234711 > URL: http://svn.freebsd.org/changeset/base/234711 > > Log: > =A0fix EAP server support after the 0.7.3 import: > =A0- eap_xxx.c files have been renamed to eap_server_xxx.c > =A0- additional crypto files are required for some options > =A0- EAP_MD5 and EAP_GTC is now enabled by default to match vendor config > =A0- move each file on its own line to hopefully make further diffs easie= r > =A0 =A0to read > > =A0EAP_SERVER is now enabled by default. Fiddling with HOSTAPD_CFLAGS in > =A0src.conf is no longer required to get a basic WPA-EAP/radius setup > =A0running. > > =A0Tested by: =A0 =A0Johann Hugo > =A0MFC after: =A0 =A02 weeks > > Modified: > =A0head/usr.sbin/wpa/Makefile.inc > =A0head/usr.sbin/wpa/hostapd/Makefile > > Modified: head/usr.sbin/wpa/Makefile.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.sbin/wpa/Makefile.inc =A0 =A0 =A0Thu Apr 26 14:51:12 2012 = =A0 =A0 =A0 =A0(r234710) > +++ head/usr.sbin/wpa/Makefile.inc =A0 =A0 =A0Thu Apr 26 17:35:11 2012 = =A0 =A0 =A0 =A0(r234711) > @@ -7,17 +7,23 @@ WPA_SUPPLICANT_DISTDIR?=3D${WPA_DISTDIR}/w > =A0HOSTAPD_DISTDIR?=3D =A0 =A0 =A0${WPA_DISTDIR}/hostapd > > =A0.PATH.c:${.CURDIR}/.. \ > + =A0 =A0 =A0 ${WPA_DISTDIR}/src/ap \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/common \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/crypto \ > + =A0 =A0 =A0 ${WPA_DISTDIR}/src/eapol_auth \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/eap_common \ > + =A0 =A0 =A0 ${WPA_DISTDIR}/src/eap_server \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/eapol_supp \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/l2_packet \ > + =A0 =A0 =A0 ${WPA_DISTDIR}/src/radius \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/utils > > =A0CFLAGS+=3D-I${.CURDIR} > +CFLAGS+=3D-I${HOSTAPD_DISTDIR} > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src/common > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src/crypto > +CFLAGS+=3D-I${WPA_DISTDIR}/src/drivers > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src/l2_packet > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src/utils > > > Modified: head/usr.sbin/wpa/hostapd/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/usr.sbin/wpa/hostapd/Makefile =A0Thu Apr 26 14:51:12 2012 =A0 = =A0 =A0 =A0(r234710) > +++ head/usr.sbin/wpa/hostapd/Makefile =A0Thu Apr 26 17:35:11 2012 =A0 = =A0 =A0 =A0(r234711) > @@ -2,33 +2,59 @@ > > =A0.include "${.CURDIR}/../Makefile.inc" > > -.PATH.c:${HOSTAPD_DISTDIR} \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/ap \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/eap_server \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/eap_common \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/eapol_auth \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/drivers \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/radius \ > - =A0 =A0 =A0 ${WPA_DISTDIR} > +.PATH.c:${WPA_DISTDIR}/src/drivers > > =A0PROG=3D =A0hostapd > -SRCS=3D =A0accounting.c aes-wrap.c ap_config.c \ > - =A0 =A0 =A0 ap_drv_ops.c ap_mlme.c authsrv.c \ > - =A0 =A0 =A0 chap.c common.c config_file.c ctrl_iface.c crypto_openssl.c= \ > - =A0 =A0 =A0 ctrl_iface_ap.c drivers.c drv_callbacks.c dump_state.c \ > - =A0 =A0 =A0 eap_common.c eap_peap_common.c eap_register.c eap_server.c = \ > - =A0 =A0 =A0 eap_server_gtc.c eap_server_identity.c eap_server_md5.c \ > - =A0 =A0 =A0 eap_server_methods.c eap_server_mschapv2.c eap_server_peap.= c \ > - =A0 =A0 =A0 eap_server_tls.c eap_server_tls_common.c eap_server_ttls.c = \ > - =A0 =A0 =A0 eapol_auth_dump.c eapol_auth_sm.c eloop.c hostapd.c ieee802= _11_auth.c \ > - =A0 =A0 =A0 ieee802_11_common.c ieee802_11_ht.c ieee802_1x.c ip_addr.c = \ > - =A0 =A0 =A0 md5.c main.c ms_funcs.c peerkey_auth.c pmksa_cache_auth.c \ > - =A0 =A0 =A0 preauth_auth.c radius.c radius_client.c sta_info.c \ > - =A0 =A0 =A0 sha1-pbkdf2.c sha1-tlsprf.c sha1-tprf.c sha1.c \ > - =A0 =A0 =A0 tkip_countermeasures.c utils.c \ > - =A0 =A0 =A0 vlan_init.c wpa_auth.c wpa_auth_glue.c wpa_auth_ie.c wpa_co= mmon.c \ > - =A0 =A0 =A0 wpa_debug.c wpabuf.c > -SRCS+=3D l2_packet_freebsd.c driver_freebsd.c os_unix.c > +SRCS=3D =A0accounting.c \ > + =A0 =A0 =A0 aes-wrap.c \ > + =A0 =A0 =A0 ap_config.c \ > + =A0 =A0 =A0 ap_drv_ops.c \ > + =A0 =A0 =A0 ap_mlme.c \ > + =A0 =A0 =A0 authsrv.c \ > + =A0 =A0 =A0 chap.c \ > + =A0 =A0 =A0 common.c \ > + =A0 =A0 =A0 config_file.c \ > + =A0 =A0 =A0 crypto_openssl.c \ > + =A0 =A0 =A0 ctrl_iface.c \ > + =A0 =A0 =A0 ctrl_iface_ap.c \ > + =A0 =A0 =A0 drivers.c \ > + =A0 =A0 =A0 drv_callbacks.c \ > + =A0 =A0 =A0 eap_common.c \ > + =A0 =A0 =A0 eap_peap_common.c \ > + =A0 =A0 =A0 eap_register.c \ > + =A0 =A0 =A0 eapol_auth_dump.c \ > + =A0 =A0 =A0 eapol_auth_sm.c \ > + =A0 =A0 =A0 eap_server.c \ > + =A0 =A0 =A0 eap_server_methods.c \ > + =A0 =A0 =A0 eloop.c \ > + =A0 =A0 =A0 hostapd.c \ > + =A0 =A0 =A0 ieee802_11_auth.c \ > + =A0 =A0 =A0 ieee802_11_common.c \ > + =A0 =A0 =A0 ieee802_1x.c \ > + =A0 =A0 =A0 ip_addr.c \ > + =A0 =A0 =A0 main.c \ > + =A0 =A0 =A0 md5.c \ > + =A0 =A0 =A0 ms_funcs.c \ > + =A0 =A0 =A0 os_unix.c \ > + =A0 =A0 =A0 peerkey_auth.c \ > + =A0 =A0 =A0 pmksa_cache_auth.c \ > + =A0 =A0 =A0 preauth_auth.c \ > + =A0 =A0 =A0 radius.c \ > + =A0 =A0 =A0 radius_client.c \ > + =A0 =A0 =A0 sha1-pbkdf2.c \ > + =A0 =A0 =A0 sha1-tlsprf.c \ > + =A0 =A0 =A0 sha1.c \ > + =A0 =A0 =A0 sta_info.c \ > + =A0 =A0 =A0 tkip_countermeasures.c \ > + =A0 =A0 =A0 utils.c \ > + =A0 =A0 =A0 vlan_init.c \ > + =A0 =A0 =A0 wpa_auth.c \ > + =A0 =A0 =A0 wpa_auth_glue.c \ > + =A0 =A0 =A0 wpa_auth_ie.c \ > + =A0 =A0 =A0 wpa_common.c \ > + =A0 =A0 =A0 wpa_debug.c \ > + =A0 =A0 =A0 wpabuf.c > +SRCS+=3D l2_packet_freebsd.c driver_freebsd.c > > =A0MAN=3D =A0 hostapd.8 hostapd.conf.5 > > @@ -38,10 +64,11 @@ FILESDIR=3D ${SHAREDIR}/examples/hostapd > =A0FILES=3D hostapd.conf hostapd.eap_user hostapd.wpa_psk > =A0.endif > > -CFLAGS+=3D -I${HOSTAPD_DISTDIR} -I${WPA_DISTDIR}/src/drivers > - > -CFLAGS+=3D -DCONFIG_DRIVER_BSD -DHOSTAPD > -CFLAGS+=3D -DCONFIG_DRIVER_RADIUS_ACL > +CFLAGS+=3D-DCONFIG_DRIVER_BSD \ > + =A0 =A0 =A0 -DHOSTAPD \ > + =A0 =A0 =A0 -DCONFIG_DRIVER_RADIUS_ACL \ > + =A0 =A0 =A0 -DCONFIG_RSN_PREAUTH \ > + =A0 =A0 =A0 -DCONFIG_PEERKEY > =A0.if ${MK_INET6} !=3D "no" > =A0CFLAGS+=3D -DCONFIG_IPV6 > =A0.endif > @@ -55,51 +82,64 @@ CFLAGS+=3D${HOSTAPD_CFLAGS} > =A0LDADD+=3D${HOSTAPD_LDADD} > =A0#LDFLAGS+=3D${HOSTAPD_LDFLAGS} > > -.if !empty(CFLAGS:M*-DEAP_SERVER) > -#SRCS+=3D =A0 =A0 =A0 =A0eap.c eap_methods.c eap_identity.c > - > =A0.if ${MK_OPENSSL} !=3D "no" && !defined(RELEASE_CRUNCH) > > -CFLAGS+=3D-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_PSK \ > - =A0 =A0 =A0 -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL > -SRCS+=3D crypto_openssl.c > -SRCS+=3D eap_tls.c eap_peap.c eap_peap_common.c eap_mschapv2.c \ > - =A0 =A0 =A0 eap_psk.c eap_psk_common.c \ > - =A0 =A0 =A0 eap_tls_common.c tls_openssl.c ms_funcs.c chap.c > - > -CFLAGS+=3D-DEAP_TTLS -DEAP_MD5 > -SRCS+=3D eap_ttls.c eap_md5.c > - > -.if !empty(CFLAGS:M*-DEAP_GTC) > -SRCS+=3D eap_gtc.c > -.endif > +CFLAGS+=3D-DDPKCS12_FUNCS \ > + =A0 =A0 =A0 -DEAP_SERVER \ > + =A0 =A0 =A0 -DEAP_SERVER_GTC \ > + =A0 =A0 =A0 -DEAP_SERVER_IDENTITY \ > + =A0 =A0 =A0 -DEAP_SERVER_MD5 \ > + =A0 =A0 =A0 -DEAP_SERVER_MSCHAPV2 \ > + =A0 =A0 =A0 -DEAP_SERVER_PEAP \ > + =A0 =A0 =A0 -DEAP_SERVER_TLS \ > + =A0 =A0 =A0 -DEAP_SERVER_TTLS \ > + =A0 =A0 =A0 -DEAP_TLS_FUNCS \ > + =A0 =A0 =A0 -DCONFIG_NO_DUMP_STATE > +SRCS+=3D dump_state.c \ > + =A0 =A0 =A0 eap_server_gtc.c \ > + =A0 =A0 =A0 eap_server_identity.c \ > + =A0 =A0 =A0 eap_server_md5.c \ > + =A0 =A0 =A0 eap_server_mschapv2.c \ > + =A0 =A0 =A0 eap_server_peap.c \ > + =A0 =A0 =A0 eap_server_tls.c \ > + =A0 =A0 =A0 eap_server_tls_common.c \ > + =A0 =A0 =A0 eap_server_ttls.c \ > + =A0 =A0 =A0 tls_openssl.c > > =A0.if !empty(CFLAGS:M*-DEAP_AKA) > =A0NEED_SIM_COMMON=3D =A0 =A0 =A0 true > -SRCS+=3D eap_aka.c > +NEED_SHA256=3D =A0 true > +SRCS+=3D eap_server_aka.c > =A0.endif > > =A0.if !empty(CFLAGS:M*-DEAP_SIM) > =A0NEED_SIM_COMMON=3D =A0 =A0 =A0 true > -SRCS+=3D eap_sim.c > +SRCS+=3D eap_server_sim.c > =A0.endif > > =A0.if defined(NEED_SIM_COMMON) > -SRCS+=3D eap_sim_common.c eap_sim_db.c > +SRCS+=3D eap_sim_common.c \ > + =A0 =A0 =A0 eap_sim_db.c > +NEED_AES_CBC=3D =A0true > +NEED_FIPS186_2_PRF=3D =A0 =A0true > =A0.endif > > =A0.if !empty(CFLAGS:M*-DEAP_GPSK) > =A0CFLAGS+=3D-DEAP_GPSK_SHA256 > -SRCS+=3D eap_gpsk.c eap_gpsk_common.c > +SRCS+=3D eap_server_gpsk.c \ > + =A0 =A0 =A0 eap_gpsk_common.c > =A0NEED_SHA256=3D =A0 true > +NEED_AES_OMAC1=3D =A0 =A0 =A0 =A0true > =A0.endif > > =A0.if !empty(CFLAGS:M*-DEAP_PAX) > -SRCS+=3D eap_pax.c eap_pax_common.c > +SRCS+=3D eap_server_pax.c \ > + =A0 =A0 =A0 eap_pax_common.c > =A0.endif > > =A0.if !empty(CFLAGS:M*-DEAP_SAKE) > -SRCS+=3D eap_sake.c eap_sake_common.c > +SRCS+=3D eap_server_sake.c \ > + =A0 =A0 =A0 eap_sake_common.c > =A0.endif > > =A0DPADD+=3D ${LIBSSL} ${LIBCRYPTO} > @@ -108,12 +148,19 @@ LDADD+=3D -lssl -lcrypto > =A0NEED_TLS_NONE=3D true > =A0.endif > > -.else > -NEED_TLS_NONE=3D true > +.if defined(NEED_AES_CBC) > +SRCS+=3D aes-cbc.c > +.endif > + > +.if defined(NEED_AES_OMAC1) > +SRCS+=3D aes-omac1.c > +.endif > + > +.if defined(NEED_FIPS186_2_PRF) > +SRCS+=3D fips_prf_openssl.c > =A0.endif > > =A0.if defined(NEED_SHA256) > -CFLAGS+=3D-DINTERNAL_SHA256 > =A0SRCS+=3D sha256.c > =A0.endif > --=20 Ermal From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 23:12:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E78A8106566C; Thu, 26 Apr 2012 23:12:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D395F8FC0A; Thu, 26 Apr 2012 23:12:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QNCq9c073223; Thu, 26 Apr 2012 23:12:52 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QNCqPg073221; Thu, 26 Apr 2012 23:12:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201204262312.q3QNCqPg073221@svn.freebsd.org> From: Warner Losh Date: Thu, 26 Apr 2012 23:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234724 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 23:12:53 -0000 Author: imp Date: Thu Apr 26 23:12:52 2012 New Revision: 234724 URL: http://svn.freebsd.org/changeset/base/234724 Log: Fix ordering issue. 'make xdev' can fail with -jN because it tries to run the xdev-install step while xdev-build is still running. Submitted by: Ian Lepore Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Apr 26 20:24:25 2012 (r234723) +++ head/Makefile.inc1 Thu Apr 26 23:12:52 2012 (r234724) @@ -1649,8 +1649,8 @@ _xi-mtree: mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${XDDESTDIR}/usr/include >/dev/null -.ORDER: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links -xdev-install: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links +.ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links +xdev-install: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links _xi-cross-tools: @echo "_xi-cross-tools" From owner-svn-src-head@FreeBSD.ORG Thu Apr 26 23:57:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E04E106566B; Thu, 26 Apr 2012 23:57:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36848FC08; Thu, 26 Apr 2012 23:57:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QNvOXj074782; Thu, 26 Apr 2012 23:57:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QNvOw7074780; Thu, 26 Apr 2012 23:57:24 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204262357.q3QNvOw7074780@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 Apr 2012 23:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234725 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 23:57:25 -0000 Author: adrian Date: Thu Apr 26 23:57:24 2012 New Revision: 234725 URL: http://svn.freebsd.org/changeset/base/234725 Log: Remove some of the redundant locking done in the TX completion path, when checking whether BAR frames need to be checked. 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 Thu Apr 26 23:12:52 2012 (r234724) +++ head/sys/dev/ath/if_ath_tx.c Thu Apr 26 23:57:24 2012 (r234725) @@ -3455,6 +3455,9 @@ ath_tx_comp_aggr_error(struct ath_softc ATH_TXQ_INSERT_HEAD(tid, bf, bf_list); } + /* + * Schedule the TID to be re-tried. + */ ath_tx_tid_sched(sc, tid); /* @@ -3469,12 +3472,9 @@ ath_tx_comp_aggr_error(struct ath_softc ath_tx_tid_bar_suspend(sc, tid); } - ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); - /* * Send BAR if required */ - ATH_TXQ_LOCK(sc->sc_ac2q[tid->ac]); if (ath_tx_tid_bar_tx_ready(sc, tid)) ath_tx_tid_bar_tx(sc, tid); ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); @@ -3742,24 +3742,28 @@ ath_tx_aggr_comp_aggr(struct ath_softc * ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); } - /* Prepend all frames to the beginning of the queue */ + DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, + "%s: txa_start now %d\n", __func__, tap->txa_start); + ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); + + /* Prepend all frames to the beginning of the queue */ while ((bf = TAILQ_LAST(&bf_q, ath_bufhead_s)) != NULL) { TAILQ_REMOVE(&bf_q, bf, bf_list); ATH_TXQ_INSERT_HEAD(atid, bf, bf_list); } - ath_tx_tid_sched(sc, atid); - ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); - DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, - "%s: txa_start now %d\n", __func__, tap->txa_start); + /* + * Reschedule to grab some further frames. + */ + ath_tx_tid_sched(sc, atid); /* * Send BAR if required */ - ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); if (ath_tx_tid_bar_tx_ready(sc, atid)) ath_tx_tid_bar_tx(sc, atid); + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); /* Do deferred completion */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 08:24:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CF1B1065672; Fri, 27 Apr 2012 08:24:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2DA8FC1E; Fri, 27 Apr 2012 08:24:52 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q3R8Ok2X060895; Fri, 27 Apr 2012 11:24:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q3R8Ojss033319; Fri, 27 Apr 2012 11:24:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q3R8Ojrp033318; Fri, 27 Apr 2012 11:24:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 27 Apr 2012 11:24:45 +0300 From: Konstantin Belousov To: Michael Tuexen Message-ID: <20120427082445.GX2358@deviant.kiev.zoral.com.ua> References: <201204261931.q3QJVG72064714@svn.freebsd.org> <20120426193324.GV2358@deviant.kiev.zoral.com.ua> <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> <20120426193950.GW2358@deviant.kiev.zoral.com.ua> <8C81F8AF-359C-4BD7-A349-D82C7B3828C9@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5zyfs+xXgaOUPfjY" Content-Disposition: inline In-Reply-To: <8C81F8AF-359C-4BD7-A349-D82C7B3828C9@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 08:24:53 -0000 --5zyfs+xXgaOUPfjY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 26, 2012 at 09:58:01PM +0200, Michael Tuexen wrote: > On Apr 26, 2012, at 9:39 PM, Konstantin Belousov wrote: >=20 > > On Thu, Apr 26, 2012 at 09:36:38PM +0200, Michael Tuexen wrote: > >> On Apr 26, 2012, at 9:33 PM, Konstantin Belousov wrote: > >>=20 > >>> On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: > >>>> Author: tuexen > >>>> Date: Thu Apr 26 19:31:16 2012 > >>>> New Revision: 234715 > >>>> URL: http://svn.freebsd.org/changeset/base/234715 > >>>>=20 > >>>> Log: > >>>> Export symbols for sctp_sendv() and sctp_recvv(). > >>>>=20 > >>>> MFC after: 1 week > >>>>=20 > >>>> Modified: > >>>> head/lib/libc/net/Symbol.map > >>>>=20 > >>>> Modified: head/lib/libc/net/Symbol.map > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > >>>> --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 (r234714) > >>>> +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) > >>>> @@ -135,8 +135,10 @@ FBSD_1.0 { > >>>> sctp_sendmsg; > >>>> sctp_sendmsgx; > >>>> sctp_send; > >>>> + sctp_sendv; > >>>> sctp_sendx; > >>>> sctp_recvmsg; > >>>> + sctp_recvv; > >>>> setipv4sourcefilter; > >>>> getipv4sourcefilter; > >>>> getsourcefilter; > >>> These are new symbols, they should go into the current (FBSD_1.3) > >>> version. > >> And where is that? Should I add something like > >> FBSD_1.3 { > >> sctp_recvv; > >> sctp_sendv; > >> } > > Right, add it between FBSD_1.0 and FBSDprivate_1.0. > >=20 > >>=20 > >> Or in another file? Will it be possible to MFC that to stable/8 and st= able/9? > >> I added the functions a while ago, but missed to add them to the Symbo= l.map. > >=20 > > Yes, it is possible to MFC this to both stable/8 and stable/9. > > Straight merge should do it. > Done in r234716. Thanks for the help. > Just to be sure: After an MFC to stable/9, the symbol will be usable in t= he upcoming > 9.1, right? Right, when/if 9.1 is released. Obviously, MFC shall be done before 9.1 is branched. --5zyfs+xXgaOUPfjY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+aV80ACgkQC3+MBN1Mb4iqLwCdFCLxCb6GsUUq4RG4quz66x7F ETQAnibdt4Q+CQXaoIoOoNj8zTC+3NLq =HgDp -----END PGP SIGNATURE----- --5zyfs+xXgaOUPfjY-- From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 08:49:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62D9B106566C; Fri, 27 Apr 2012 08:49:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8F98FC12; Fri, 27 Apr 2012 08:49:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3R8nG3n095397; Fri, 27 Apr 2012 08:49:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3R8nG2V095391; Fri, 27 Apr 2012 08:49:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204270849.q3R8nG2V095391@svn.freebsd.org> From: Alexander Motin Date: Fri, 27 Apr 2012 08:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234727 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 08:49:16 -0000 Author: mav Date: Fri Apr 27 08:49:15 2012 New Revision: 234727 URL: http://svn.freebsd.org/changeset/base/234727 Log: Fix RAID5 level names changed at r234603. Modified: head/sys/geom/raid/md_intel.c head/sys/geom/raid/md_jmicron.c head/sys/geom/raid/md_nvidia.c head/sys/geom/raid/md_promise.c head/sys/geom/raid/md_sii.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_intel.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1490,7 +1490,7 @@ g_raid_md_ctl_intel(struct g_raid_md_obj return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LA"; + levelname = "RAID5-LA"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); @@ -1705,7 +1705,7 @@ g_raid_md_ctl_intel(struct g_raid_md_obj return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LA"; + levelname = "RAID5-LA"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); Modified: head/sys/geom/raid/md_jmicron.c ============================================================================== --- head/sys/geom/raid/md_jmicron.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_jmicron.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1062,7 +1062,7 @@ g_raid_md_ctl_jmicron(struct g_raid_md_o return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LA"; + levelname = "RAID5-LA"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); Modified: head/sys/geom/raid/md_nvidia.c ============================================================================== --- head/sys/geom/raid/md_nvidia.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_nvidia.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1065,7 +1065,7 @@ g_raid_md_ctl_nvidia(struct g_raid_md_ob return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LS"; + levelname = "RAID5-LS"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_promise.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1246,7 +1246,7 @@ g_raid_md_ctl_promise(struct g_raid_md_o return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LA"; + levelname = "RAID5-LA"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); Modified: head/sys/geom/raid/md_sii.c ============================================================================== --- head/sys/geom/raid/md_sii.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_sii.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1149,7 +1149,7 @@ g_raid_md_ctl_sii(struct g_raid_md_objec return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LS"; + levelname = "RAID5-LS"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 08:52:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CE6D106564A; Fri, 27 Apr 2012 08:52:22 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 257318FC15; Fri, 27 Apr 2012 08:52:22 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id F0F6925D3A05; Fri, 27 Apr 2012 08:52:20 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 06C35BE5B97; Fri, 27 Apr 2012 08:52:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 5bd8QuAzE8Wz; Fri, 27 Apr 2012 08:52:19 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id DB4F9BE5B95; Fri, 27 Apr 2012 08:52:18 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201201151208.q0FC8KAh082348@svn.freebsd.org> Date: Fri, 27 Apr 2012 08:52:17 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <8DFCF784-D4D4-420F-80FD-6B6609B035D4@lists.zabbadoz.net> References: <201201151208.q0FC8KAh082348@svn.freebsd.org> To: Martin Matuska X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r230129 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 08:52:22 -0000 On 15. Jan 2012, at 12:08 , Martin Matuska wrote: > Author: mm > Date: Sun Jan 15 12:08:20 2012 > New Revision: 230129 > URL: http://svn.freebsd.org/changeset/base/230129 >=20 > Log: > Introduce vn_path_to_global_path() >=20 > This function updates path string to vnode's full global path and = checks > the size of the new path string against the pathlen argument. >=20 > In vfs_domount(), sys_unmount() and kern_jail_set() this new function > is used to update the supplied path argument to the respective global = path. And I have been bitten by that with my image building inside a chroot = that after some years now failed to mount an md file system due to now being over the 88 char limit with chroot path + mount path inside the chroot (thanks kib for helping me figure out:) What I think the solution seems to be a larger project to break statfs once again and maybe convert it to a nmount like API as nmount and jails already use so that we'd not need more "ostatfs" versions in the future and could thus overcome the 88 character limit more easily (and handle backward compat somehow erroring or truncating or ...). It'd be hard, tiresome and not much rewarding but great to finally have it. Meanwhile I'll adjust quite a lot of setups to allow them to continue to work:) /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 09:22:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7B3F106566B; Fri, 27 Apr 2012 09:22:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2FC78FC0C; Fri, 27 Apr 2012 09:22:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3R9Mkbp096692; Fri, 27 Apr 2012 09:22:46 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3R9MkP3096690; Fri, 27 Apr 2012 09:22:46 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204270922.q3R9MkP3096690@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 27 Apr 2012 09:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234728 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 09:22:46 -0000 Author: hselasky Date: Fri Apr 27 09:22:46 2012 New Revision: 234728 URL: http://svn.freebsd.org/changeset/base/234728 Log: Style. Suggested by: dumbbell @ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Apr 27 08:49:15 2012 (r234727) +++ head/ObsoleteFiles.inc Fri Apr 27 09:22:46 2012 (r234728) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20120425: libusb version bump (r234684) +OLD_LIBS+=usr/lib/libusb.so.2 +OLD_LIBS+=usr/lib32/libusb.so.2 # 20120415: new clang import which bumps version from 3.0 to 3.1 OLD_FILES+=usr/include/clang/3.0/altivec.h OLD_FILES+=usr/include/clang/3.0/avxintrin.h @@ -633,7 +636,6 @@ OLD_LIBS+=usr/lib/libssl.so.5 OLD_LIBS+=usr/lib/libtacplus.so.3 OLD_LIBS+=usr/lib/libugidfw.so.3 OLD_LIBS+=usr/lib/libusb.so.1 -OLD_LIBS+=usr/lib/libusb.so.2 OLD_LIBS+=usr/lib/libusbhid.so.3 OLD_LIBS+=usr/lib/libvgl.so.5 OLD_LIBS+=usr/lib/libwrap.so.5 @@ -735,7 +737,6 @@ OLD_LIBS+=usr/lib32/libufs.so.4 OLD_LIBS+=usr/lib32/libugidfw.so.3 OLD_LIBS+=usr/lib32/libumem.so.1 OLD_LIBS+=usr/lib32/libusb.so.1 -OLD_LIBS+=usr/lib32/libusb.so.2 OLD_LIBS+=usr/lib32/libusbhid.so.3 OLD_LIBS+=usr/lib32/libutil.so.7 OLD_LIBS+=usr/lib32/libuutil.so.1 From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 11:29:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4000106564A; Fri, 27 Apr 2012 11:29:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFA0C8FC0C; Fri, 27 Apr 2012 11:29:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RBT9A2003428; Fri, 27 Apr 2012 11:29:09 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RBT9N7003426; Fri, 27 Apr 2012 11:29:09 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201204271129.q3RBT9N7003426@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Fri, 27 Apr 2012 11:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234729 - head/contrib/openpam/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 11:29:09 -0000 Author: des Date: Fri Apr 27 11:29:09 2012 New Revision: 234729 URL: http://svn.freebsd.org/changeset/base/234729 Log: r234173 missed one instance of FREE(line). Noticed by: glebius@ Modified: head/contrib/openpam/lib/openpam_configure.c Modified: head/contrib/openpam/lib/openpam_configure.c ============================================================================== --- head/contrib/openpam/lib/openpam_configure.c Fri Apr 27 09:22:46 2012 (r234728) +++ head/contrib/openpam/lib/openpam_configure.c Fri Apr 27 11:29:09 2012 (r234729) @@ -501,7 +501,7 @@ fail: FREE(this->optv); } FREE(this); - FREE(line); + FREE(line0); FREE(name); fclose(f); return (PAM_SYSTEM_ERR); From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 13:40:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 883E6106566B; Fri, 27 Apr 2012 13:40:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5B95B8FC0C; Fri, 27 Apr 2012 13:40:19 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 987B2B91C; Fri, 27 Apr 2012 09:40:18 -0400 (EDT) From: John Baldwin To: Attilio Rao Date: Fri, 27 Apr 2012 07:40:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204262024.q3QKOPA6067287@svn.freebsd.org> In-Reply-To: <201204262024.q3QKOPA6067287@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204270740.43912.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 09:40:18 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 13:40:19 -0000 On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: > Author: attilio > Date: Thu Apr 26 20:24:25 2012 > New Revision: 234723 > URL: http://svn.freebsd.org/changeset/base/234723 > > Log: > Clean up the intr* MD KPI from the SMP dependency, removing a cause of > discrepancy between modules and kernel, but deal with SMP differences > within the functions themselves. > > As an added bonus this also helps in terms of code readability. Hmm, this should not have affected anything with modules as no modules should have ever called this. Also, making intr_bind() available for UP kernels on x86 is largely pointless. It's only caller is already conditional in sys/x86/x86/nexus.c: #ifdef SMP static int nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu) { return (intr_bind(rman_get_start(irq), cpu)); } #endif I think the UP stubs for intr_bind() should be removed. No drivers should be using that directly (they should all use bus_bind_intr(9)). The same appears to be true for sparc64 as well. I had only noticed the intr_add_cpu() changes when I reviewed, not the intr_bind() ones. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 13:40:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14A2B106566C; Fri, 27 Apr 2012 13:40:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id DE8058FC14; Fri, 27 Apr 2012 13:40:20 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5A41DB961; Fri, 27 Apr 2012 09:40:20 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Fri, 27 Apr 2012 07:45:16 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204231304.q3ND43Yg098748@svn.freebsd.org> In-Reply-To: <201204231304.q3ND43Yg098748@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204270745.16844.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 09:40:20 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 13:40:21 -0000 On Monday, April 23, 2012 9:04:03 am Alexander Motin wrote: > Author: mav > Date: Mon Apr 23 13:04:02 2012 > New Revision: 234603 > URL: http://svn.freebsd.org/changeset/base/234603 > > Log: > Add names for all primary RAID levels defined by DDF 2.0 specification. > > Modified: > head/sys/geom/raid/g_raid.c > head/sys/geom/raid/g_raid.h > head/sys/geom/raid/tr_raid1.c > head/sys/geom/raid/tr_raid1e.c We should probably add a separate header to hold DDF constants. graid isn't the only place that uses them (e.g. mfi(4) uses it to describe volumes, so mfiutil(8) has its own DDF constants as well in mfiutil.h). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 13:55:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E255A106564A; Fri, 27 Apr 2012 13:55:43 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id C65B98FC0C; Fri, 27 Apr 2012 13:55:42 +0000 (UTC) Received: by lagv3 with SMTP id v3so690953lag.13 for ; Fri, 27 Apr 2012 06:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=3befTjujDJv1D6peDyRdB6IjaR9KZ9BNxGVYJkGOiZg=; b=kge7SSPfm6YC0KKeJRx6dHd2n3Nr6FCXgrZV4hBzqam29Q95hTTTupkhJQc/LJJiz1 uSVefZj1SD4+Ai5o7OYQJZedAjwbx91sRNE1Un+LZU9rRh98s7K6IDE2OTv7bvecB3Ma bopBYNwly+0g0OOQVEUdWi7Dt1qJyn2R2HXNT0OBGFMurYcWLGVLCyMg9YlhPN0W6Vh7 eCkM3qMBajfG+cvLXyP5UserNvuN2ycNEQWwKKarM5ek85ZqUAQxtlE3rlYFXRk800XS /yBMkW8Rn3K5UjoqdfZJta9AaC4R6J8VeK60jN97ZFDml+Wfr3gQ4GJB2Hx7J9NbrA03 rgrQ== MIME-Version: 1.0 Received: by 10.152.132.166 with SMTP id ov6mr11624455lab.35.1335534941511; Fri, 27 Apr 2012 06:55:41 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.63.146 with HTTP; Fri, 27 Apr 2012 06:55:41 -0700 (PDT) In-Reply-To: <201204270740.43912.jhb@freebsd.org> References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204270740.43912.jhb@freebsd.org> Date: Fri, 27 Apr 2012 14:55:41 +0100 X-Google-Sender-Auth: 2fU5FgQhZ5KMu5J-0ESel8-wphY Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 13:55:44 -0000 2012/4/27, John Baldwin : > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: >> Author: attilio >> Date: Thu Apr 26 20:24:25 2012 >> New Revision: 234723 >> URL: http://svn.freebsd.org/changeset/base/234723 >> >> Log: >> Clean up the intr* MD KPI from the SMP dependency, removing a cause of >> discrepancy between modules and kernel, but deal with SMP differences >> within the functions themselves. >> >> As an added bonus this also helps in terms of code readability. > > Hmm, this should not have affected anything with modules as no modules > should have ever called this. Also, making intr_bind() available for UP > kernels on x86 is largely pointless. It's only caller is already > conditional > in sys/x86/x86/nexus.c: It doesn't mean that there couldn't be an user in the future of this KPI in terms of thirdy part modules. These functions are part of the public KPI and we speak a lot about making our KPI as less as dependent by compiling options so I don't really see why you are not happy about this. If the function (intr_bind() included) is part of the public KPI it can be called by thirdy part modules too. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 13:58:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15BA8106566B; Fri, 27 Apr 2012 13:58:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 013028FC15; Fri, 27 Apr 2012 13:58:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RDw9JU008733; Fri, 27 Apr 2012 13:58:09 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RDw93b008731; Fri, 27 Apr 2012 13:58:09 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204271358.q3RDw93b008731@svn.freebsd.org> From: Michael Tuexen Date: Fri, 27 Apr 2012 13:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234731 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 13:58:10 -0000 Author: tuexen Date: Fri Apr 27 13:58:09 2012 New Revision: 234731 URL: http://svn.freebsd.org/changeset/base/234731 Log: Remove unused structure. Reported by Irene Ruengeler. MFC after: 3 days Modified: head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Fri Apr 27 13:41:20 2012 (r234730) +++ head/sys/netinet/sctp_uio.h Fri Apr 27 13:58:09 2012 (r234731) @@ -608,13 +608,6 @@ struct sctp_getaddresses { struct sockaddr addr[1]; }; -struct sctp_setstrm_timeout { - sctp_assoc_t ssto_assoc_id; - uint32_t ssto_timeout; - uint32_t ssto_streamid_start; - uint32_t ssto_streamid_end; -}; - struct sctp_status { sctp_assoc_t sstat_assoc_id; int32_t sstat_state; From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 14:21:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4586A1065675; Fri, 27 Apr 2012 14:21:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 164B98FC08; Fri, 27 Apr 2012 14:21:01 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 79752B91A; Fri, 27 Apr 2012 10:21:00 -0400 (EDT) From: John Baldwin To: Attilio Rao Date: Fri, 27 Apr 2012 10:20:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204270740.43912.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204271020.59067.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 10:21:00 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 14:21:01 -0000 On Friday, April 27, 2012 9:55:41 am Attilio Rao wrote: > 2012/4/27, John Baldwin : > > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: > >> Author: attilio > >> Date: Thu Apr 26 20:24:25 2012 > >> New Revision: 234723 > >> URL: http://svn.freebsd.org/changeset/base/234723 > >> > >> Log: > >> Clean up the intr* MD KPI from the SMP dependency, removing a cause of > >> discrepancy between modules and kernel, but deal with SMP differences > >> within the functions themselves. > >> > >> As an added bonus this also helps in terms of code readability. > > > > Hmm, this should not have affected anything with modules as no modules > > should have ever called this. Also, making intr_bind() available for UP > > kernels on x86 is largely pointless. It's only caller is already > > conditional > > in sys/x86/x86/nexus.c: > > It doesn't mean that there couldn't be an user in the future of this > KPI in terms of thirdy part modules. > These functions are part of the public KPI and we speak a lot about > making our KPI as less as dependent by compiling options so I don't > really see why you are not happy about this. > > If the function (intr_bind() included) is part of the public KPI it > can be called by thirdy part modules too. No! intr_bind() is _NOT_ part of the public KPI. The public KPI is bus_intr_bind() which accepts a struct resource, which is the approved handle for interrupt resources in drivers and other modules. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 14:23:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C334A106564A; Fri, 27 Apr 2012 14:23:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id A7A488FC0A; Fri, 27 Apr 2012 14:23:15 +0000 (UTC) Received: by lbbgm6 with SMTP id gm6so727922lbb.13 for ; Fri, 27 Apr 2012 07:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=da2KH26WtOl/gIOQRb2ZPXRqwl1po7QflP06pfglVhE=; b=sFE02YDHw+bbKcOWpm0FZnwc0bqXg2Fledy5TJ49ewLGEYoAqCW5aknR2a4anhbHNT Jh/QDJurN/ym39g20pGgUrzoa3XeQ1DTBffm5KFDLH4sh+S+ysDYBrEXuuny3ceuAfz0 jKPwCDw0NI58Eagfyc1DSQybneRPqMRL6V4hBtQSUIZqgtm6F1oFMCi6N+pykaZUjwM4 dKk79R+oXo/AbVrmPNnchVCa4iV/14EPbXNZkuBzaHK5QH4s8gbyJUT+dYeqr7YV0m8G w+3ohtCo9CnUxUPCYyuoTxXSmhGNmIyFMpMGZ5jGOSfwAIyP2wQKywIi6t6XxuWQU/lK BtNA== MIME-Version: 1.0 Received: by 10.152.132.166 with SMTP id ov6mr11728267lab.35.1335536594648; Fri, 27 Apr 2012 07:23:14 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.63.146 with HTTP; Fri, 27 Apr 2012 07:23:14 -0700 (PDT) In-Reply-To: <201204271020.59067.jhb@freebsd.org> References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204270740.43912.jhb@freebsd.org> <201204271020.59067.jhb@freebsd.org> Date: Fri, 27 Apr 2012 15:23:14 +0100 X-Google-Sender-Auth: YmBOr5AAmb_D9mjcbN-PzDZN3l8 Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 14:23:16 -0000 2012/4/27, John Baldwin : > On Friday, April 27, 2012 9:55:41 am Attilio Rao wrote: >> 2012/4/27, John Baldwin : >> > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: >> >> Author: attilio >> >> Date: Thu Apr 26 20:24:25 2012 >> >> New Revision: 234723 >> >> URL: http://svn.freebsd.org/changeset/base/234723 >> >> >> >> Log: >> >> Clean up the intr* MD KPI from the SMP dependency, removing a cause >> >> of >> >> discrepancy between modules and kernel, but deal with SMP >> >> differences >> >> within the functions themselves. >> >> >> >> As an added bonus this also helps in terms of code readability. >> > >> > Hmm, this should not have affected anything with modules as no modules >> > should have ever called this. Also, making intr_bind() available for >> > UP >> > kernels on x86 is largely pointless. It's only caller is already >> > conditional >> > in sys/x86/x86/nexus.c: >> >> It doesn't mean that there couldn't be an user in the future of this >> KPI in terms of thirdy part modules. >> These functions are part of the public KPI and we speak a lot about >> making our KPI as less as dependent by compiling options so I don't >> really see why you are not happy about this. >> >> If the function (intr_bind() included) is part of the public KPI it >> can be called by thirdy part modules too. > > No! intr_bind() is _NOT_ part of the public KPI. The public KPI is > bus_intr_bind() which accepts a struct resource, which is the approved > handle for interrupt resources in drivers and other modules. It is accessible from machine/intr_machdep.h so *it is* part of the public KPI by definition. However I won't argue further and will change it as you request, I have enough of no-sense requests on this simple change. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 15:08:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B075106564A; Fri, 27 Apr 2012 15:08:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1B0DB8FC08; Fri, 27 Apr 2012 15:08:27 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4E3A8B93B; Fri, 27 Apr 2012 11:08:26 -0400 (EDT) From: John Baldwin To: Attilio Rao Date: Fri, 27 Apr 2012 11:08:25 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204271020.59067.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204271108.25734.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 11:08:26 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 15:08:27 -0000 On Friday, April 27, 2012 10:23:14 am Attilio Rao wrote: > 2012/4/27, John Baldwin : > > On Friday, April 27, 2012 9:55:41 am Attilio Rao wrote: > >> 2012/4/27, John Baldwin : > >> > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: > >> >> Author: attilio > >> >> Date: Thu Apr 26 20:24:25 2012 > >> >> New Revision: 234723 > >> >> URL: http://svn.freebsd.org/changeset/base/234723 > >> >> > >> >> Log: > >> >> Clean up the intr* MD KPI from the SMP dependency, removing a cause > >> >> of > >> >> discrepancy between modules and kernel, but deal with SMP > >> >> differences > >> >> within the functions themselves. > >> >> > >> >> As an added bonus this also helps in terms of code readability. > >> > > >> > Hmm, this should not have affected anything with modules as no modules > >> > should have ever called this. Also, making intr_bind() available for > >> > UP > >> > kernels on x86 is largely pointless. It's only caller is already > >> > conditional > >> > in sys/x86/x86/nexus.c: > >> > >> It doesn't mean that there couldn't be an user in the future of this > >> KPI in terms of thirdy part modules. > >> These functions are part of the public KPI and we speak a lot about > >> making our KPI as less as dependent by compiling options so I don't > >> really see why you are not happy about this. > >> > >> If the function (intr_bind() included) is part of the public KPI it > >> can be called by thirdy part modules too. > > > > No! intr_bind() is _NOT_ part of the public KPI. The public KPI is > > bus_intr_bind() which accepts a struct resource, which is the approved > > handle for interrupt resources in drivers and other modules. > > It is accessible from machine/intr_machdep.h so *it is* part of the > public KPI by definition. I will argue just this one point. I don't think this is true. There are many things in machine/foo headers that I do not consider to be part of the public KPI, but are solely for use in MD code, for example for the nexus(4) driver to interface with other MD code such as msi.c or intr_machdep.c on x86. Almost all of falls into this category. In fact, I don't see a single thing in the current that is intended to be used by any MI code and is part of the public KPI. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 15:18:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3640106567A; Fri, 27 Apr 2012 15:18:41 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id CDCD58FC15; Fri, 27 Apr 2012 15:18:40 +0000 (UTC) Received: by lagv3 with SMTP id v3so781647lag.13 for ; Fri, 27 Apr 2012 08:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=0ynOizCXAvU1U+b3OgkIBcwC2DM7j2T8ntbsCTUNrHg=; b=VUwuRqBqkTMnyCvutv/Jcwhp21baYTt0KNT5tm0O6snmzS7orZBdGghgP0w53IxDRA h690qMEo4U6RT8sVrWi0wHF/E/PPJHbDru4UuCoNIiowtAIOnlU3LmdeTlyyTXy1v2MO UIx4nugaPbnalkRz51P1L0cAwMM2sGZTGpvuf3Qlsk9Xm+W0kS6uenb36LYahq6jtuKx MzsqyPy/6CdL42mbNAmF8z/p3950daqDEpXc4lye1Ws9AypTUaMaDYCpi+lrhlZQH5fs be7CfORR/LFLarUtg/esOgCY31yyisCudj2ZXeZpmCX6MysUDPruZWqZg+uuONmffl/k froQ== MIME-Version: 1.0 Received: by 10.152.144.101 with SMTP id sl5mr4628137lab.51.1335539919511; Fri, 27 Apr 2012 08:18:39 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.63.146 with HTTP; Fri, 27 Apr 2012 08:18:39 -0700 (PDT) In-Reply-To: <201204271108.25734.jhb@freebsd.org> References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204271020.59067.jhb@freebsd.org> <201204271108.25734.jhb@freebsd.org> Date: Fri, 27 Apr 2012 16:18:39 +0100 X-Google-Sender-Auth: r3DxQJezx_vbx2_hZEbrSZdIIDs Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 15:18:42 -0000 2012/4/27, John Baldwin : > On Friday, April 27, 2012 10:23:14 am Attilio Rao wrote: >> 2012/4/27, John Baldwin : >> > On Friday, April 27, 2012 9:55:41 am Attilio Rao wrote: >> >> 2012/4/27, John Baldwin : >> >> > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: >> >> >> Author: attilio >> >> >> Date: Thu Apr 26 20:24:25 2012 >> >> >> New Revision: 234723 >> >> >> URL: http://svn.freebsd.org/changeset/base/234723 >> >> >> >> >> >> Log: >> >> >> Clean up the intr* MD KPI from the SMP dependency, removing a >> >> >> cause >> >> >> of >> >> >> discrepancy between modules and kernel, but deal with SMP >> >> >> differences >> >> >> within the functions themselves. >> >> >> >> >> >> As an added bonus this also helps in terms of code readability. >> >> > >> >> > Hmm, this should not have affected anything with modules as no >> >> > modules >> >> > should have ever called this. Also, making intr_bind() available >> >> > for >> >> > UP >> >> > kernels on x86 is largely pointless. It's only caller is already >> >> > conditional >> >> > in sys/x86/x86/nexus.c: >> >> >> >> It doesn't mean that there couldn't be an user in the future of this >> >> KPI in terms of thirdy part modules. >> >> These functions are part of the public KPI and we speak a lot about >> >> making our KPI as less as dependent by compiling options so I don't >> >> really see why you are not happy about this. >> >> >> >> If the function (intr_bind() included) is part of the public KPI it >> >> can be called by thirdy part modules too. >> > >> > No! intr_bind() is _NOT_ part of the public KPI. The public KPI is >> > bus_intr_bind() which accepts a struct resource, which is the approved >> > handle for interrupt resources in drivers and other modules. >> >> It is accessible from machine/intr_machdep.h so *it is* part of the >> public KPI by definition. > > I will argue just this one point. I don't think this is true. There are > many > things in machine/foo headers that I do not consider to be part of the > public > KPI, but are solely for use in MD code, for example for the nexus(4) driver > to > interface with other MD code such as msi.c or intr_machdep.c on x86. Almost > > all of falls into this category. In fact, I don't > > see a single thing in the current that is intended > to > be used by any MI code and is part of the public KPI. I think what we really want is something as _KERNEL discriminant to be _KERNEL_KPI which defines which functions are really part of the public KPI (to be intended for usage in modules) and which not. Right now your idea of 'public KPI' is just something to be shared by voice, but if you really don't want to consider all the exported kernel functions as part of the KPI a way to enforce the subset would be desirable. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 15:35:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07507106564A; Fri, 27 Apr 2012 15:35:10 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E60348FC08; Fri, 27 Apr 2012 15:35:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RFZ9Fc012464; Fri, 27 Apr 2012 15:35:09 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RFZ9Nr012462; Fri, 27 Apr 2012 15:35:09 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201204271535.q3RFZ9Nr012462@svn.freebsd.org> From: David Chisnall Date: Fri, 27 Apr 2012 15:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234732 - head/usr.sbin/wpa/hostapd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 15:35:10 -0000 Author: theraven Date: Fri Apr 27 15:35:09 2012 New Revision: 234732 URL: http://svn.freebsd.org/changeset/base/234732 Log: Add a note to hostapd.conf about an unhelpful error message in the hope that it won't confuse anyone else in the future. MFC after: 1 week Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- head/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri Apr 27 13:58:09 2012 (r234731) +++ head/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri Apr 27 15:35:09 2012 (r234732) @@ -67,7 +67,8 @@ The following parameters are recognized: Interface name. Should be set in .Dq hostap -mode. +mode. Make certain that there are no spaces after the interface name, +or hostapd will complain that the interface does not exist. .It Va debug Debugging mode: 0 = no, 1 = minimal, 2 = verbose, 3 = msg dumps, 4 = excessive. From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 17:28:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5299610656D0 for ; Fri, 27 Apr 2012 17:28:24 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm6.bullet.mail.sp2.yahoo.com (nm6.bullet.mail.sp2.yahoo.com [98.139.91.76]) by mx1.freebsd.org (Postfix) with SMTP id 238F18FC1D for ; Fri, 27 Apr 2012 17:28:24 +0000 (UTC) Received: from [98.139.91.62] by nm6.bullet.mail.sp2.yahoo.com with NNFMP; 27 Apr 2012 17:28:24 -0000 Received: from [98.139.91.25] by tm2.bullet.mail.sp2.yahoo.com with NNFMP; 27 Apr 2012 17:27:23 -0000 Received: from [127.0.0.1] by omp1025.mail.sp2.yahoo.com with NNFMP; 27 Apr 2012 17:27:23 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 605640.57935.bm@omp1025.mail.sp2.yahoo.com Received: (qmail 965 invoked by uid 60001); 27 Apr 2012 17:27:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1335547643; bh=+rm6lHX2eOxpxc6UGx/Q+Y5oIlHmK0iq11TI3sIEoxc=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=S+S/QDPM6RaQdxhqDq6oWgNxFTiOilGy509LOk0hpTpMX6GQL9as3LQOZSrBSiCVwFpDeMMS0UhDsy5sca3q/wh8CvV/I2s+12kCvndZ/wsff5nA0RChsVHKzEKQHFkHSXoY1pJULqi/baaqVuvOY/HMAzeJQnjZ9bCWr6HnHOs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=C6yyTBng/ZOR9kDKOTpd1kYtYf7xQAAzWm6kp/s3ODue5YhWUDkbebR/aIRLAcWuB9BwRn7dRz+Yh55nzIA8k7oiYDm5NYjrlJObweqbYIo+d5HtudokLMioH5/Mi7YAQbRGWjt7Ky770xQSLdWG/AygLHOgO5azoFg2TXWg3rY=; X-YMail-OSG: hj1ia.4VM1lMnzHngzT78KAls3rUAF1YhbK71MA4j8uLSdc OY3WDBfBd.Zz7ndUYxfFS6CAScluBZ8JMQtcvgEoOMd9kX9n7VCkR8FOdqmg cLNui_MC2sCiwLJcyYG1dGIX8RDYKt7hAMlib_1tlG0Ue00RSBDOHKBfIBkA JhgRnKNQXG6qBneSj7fmNUt8aKqKCw._J._immaQ4VAPFAF3BKRZghTT5TmF 7huYuvEr1Uj4oNkb2WcspiDDopM7qYu9XDiYevGSPrP4I2OI0fbJgGhr2bTh Vnj5Cwg5Vw6d.v6KsMpGrVlDyrvHsuP0yXr0QFrME2eXS2.TlLZXryMzI9fJ bRDoXY9z1_vQpTxgC8x6atZ5A3ZXtmzh5uRwDw_ZOO5USBHuN.xGFK.srdmQ FWnile2Mhcb78olNT9ldFxps_jCmn41Kzm42LcclbhNCdw51fOUc3ipkUTUS xPtyBGp5TRpx1fw-- Received: from [209.131.62.114] by web45713.mail.sp1.yahoo.com via HTTP; Fri, 27 Apr 2012 10:27:23 PDT X-Mailer: YahooMailWebService/0.8.117.340979 References: <201204231304.q3ND43Yg098748@svn.freebsd.org> <201204270745.16844.jhb@freebsd.org> Message-ID: <1335547643.283.YahooMailNeo@web45713.mail.sp1.yahoo.com> Date: Fri, 27 Apr 2012 10:27:23 -0700 (PDT) From: Scott Long To: John Baldwin , Alexander Motin In-Reply-To: <201204270745.16844.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Scott Long List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 17:28:24 -0000 =0A=0A=0A=0A----- Original Message -----=0A> From: John Baldwin =0A> To: Alexander Motin =0A> Cc: src-committers@fre= ebsd.org; svn-src-all@freebsd.org; svn-src-head@freebsd.org=0A> Sent: Frida= y, April 27, 2012 5:45 AM=0A> Subject: Re: svn commit: r234603 - head/sys/g= eom/raid=0A> =0A> On Monday, April 23, 2012 9:04:03 am Alexander Motin wrot= e:=0A>> Author: mav=0A>> Date: Mon Apr 23 13:04:02 2012=0A>> New Revisio= n: 234603=0A>> URL: http://svn.freebsd.org/changeset/base/234603=0A>> =0A>= > Log:=0A>> =A0 Add names for all primary RAID levels defined by DDF 2.0 = specification.=0A>> =0A>> Modified:=0A>> =A0 head/sys/geom/raid/g_raid.c= =0A>> =A0 head/sys/geom/raid/g_raid.h=0A>> =A0 head/sys/geom/raid/tr_raid= 1.c=0A>> =A0 head/sys/geom/raid/tr_raid1e.c=0A> =0A> We should probably ad= d a separate header to hold DDF constants.=A0 graid isn't=0A> the only plac= e that uses them (e.g. mfi(4) uses it to describe volumes, so=0A> mfiutil(8= ) has its own DDF constants as well in mfiutil.h).=0A> =0A> --=A0=0A=0AYou = mean src/sys/dev/ata/ata-raid-ddf.h?=0A=0AThat said, I trust DDF to be neit= her universal nor standard, and it's probably a futile micro-optimization t= o try too hard at this. =A0At the very least, leave MFI alone.=0A=0A=0AScot= t=0A From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 17:46:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F660106566B; Fri, 27 Apr 2012 17:46:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E4D8D8FC0C; Fri, 27 Apr 2012 17:46:23 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4F08FB96D; Fri, 27 Apr 2012 13:46:23 -0400 (EDT) From: John Baldwin To: Scott Long Date: Fri, 27 Apr 2012 13:38:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204231304.q3ND43Yg098748@svn.freebsd.org> <201204270745.16844.jhb@freebsd.org> <1335547643.283.YahooMailNeo@web45713.mail.sp1.yahoo.com> In-Reply-To: <1335547643.283.YahooMailNeo@web45713.mail.sp1.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201204271338.37236.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 13:46:23 -0400 (EDT) Cc: "svn-src-head@freebsd.org" , Alexander Motin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 17:46:24 -0000 On Friday, April 27, 2012 1:27:23 pm Scott Long wrote: > > ----- Original Message ----- > > From: John Baldwin > > To: Alexander Motin > > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freebsd.org > > Sent: Friday, April 27, 2012 5:45 AM > > Subject: Re: svn commit: r234603 - head/sys/geom/raid > > > > On Monday, April 23, 2012 9:04:03 am Alexander Motin wrote: > >> Author: mav > >> Date: Mon Apr 23 13:04:02 2012 > >> New Revision: 234603 > >> URL: http://svn.freebsd.org/changeset/base/234603 > >> > >> Log: > >> Add names for all primary RAID levels defined by DDF 2.0 specification. > >> > >> Modified: > >> head/sys/geom/raid/g_raid.c > >> head/sys/geom/raid/g_raid.h > >> head/sys/geom/raid/tr_raid1.c > >> head/sys/geom/raid/tr_raid1e.c > > > > We should probably add a separate header to hold DDF constants. graid isn't > > the only place that uses them (e.g. mfi(4) uses it to describe volumes, so > > mfiutil(8) has its own DDF constants as well in mfiutil.h). > > > > -- > > You mean src/sys/dev/ata/ata-raid-ddf.h? Yes. > That said, I trust DDF to be neither universal nor standard, and it's probably a futile micro-optimization to try too hard at this. At the very least, leave MFI alone. Hmm, LSI claims that MFI uses the constant values (but not necessarily the structures from DDF). Certainly the primary RAID type in an mfi(4) volume uses the same constants as both g_raid.h and ata-raid-ddf.h. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 18:12:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 285861065677; Fri, 27 Apr 2012 18:12:26 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 238D98FC24; Fri, 27 Apr 2012 18:12:24 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so961027bkc.13 for ; Fri, 27 Apr 2012 11:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=1cJEQFwn2p2Wcaszi1hxe01tdO82hrOvwNGOSf8sSnc=; b=XYi+gzsDlvLRS2T43MRc5AaWy6Sb46wLx5IbIVxDIrAnB2MAAhCghhqqZXxBR+KbY3 NS7GeZzbhPj3sQPc6gBib3LiEU0sPAzZcGH8XNeYqgH5aj8dN2ekA9YwX3mM5WywJ3tT b2L/Vkttgye5Bu+fmOQHiYC4qOUq7xWOXjRZdicyxkKW0k2lDFyFFbnCCltCTOF8eqXV h+9dL7jqdJpWS2oiEstK4ulAl9UWdqBAc10BaUahB1SPhr3uRGfEs7HgqeYjfBzNdWAU nn6gUavHff0+mYQ+vNPpwq+jsmzZt1hge5xPA3g6Iz/ZEDqmnVEjTVUxLVX0wkZJJXnC 0VdQ== Received: by 10.204.9.195 with SMTP id m3mr4435810bkm.78.1335550344220; Fri, 27 Apr 2012 11:12:24 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id n17sm6129525bkw.5.2012.04.27.11.12.20 (version=SSLv3 cipher=OTHER); Fri, 27 Apr 2012 11:12:22 -0700 (PDT) Sender: Alexander Motin Message-ID: <4F9AE183.7060209@FreeBSD.org> Date: Fri, 27 Apr 2012 21:12:19 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120328 Thunderbird/10.0.3 MIME-Version: 1.0 To: John Baldwin References: <201204231304.q3ND43Yg098748@svn.freebsd.org> <201204270745.16844.jhb@freebsd.org> <1335547643.283.YahooMailNeo@web45713.mail.sp1.yahoo.com> <201204271338.37236.jhb@freebsd.org> In-Reply-To: <201204271338.37236.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Scott Long Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 18:12:26 -0000 On 04/27/12 20:38, John Baldwin wrote: > On Friday, April 27, 2012 1:27:23 pm Scott Long wrote: >> >> ----- Original Message ----- >>> From: John Baldwin >>> To: Alexander Motin >>> Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freebsd.org >>> Sent: Friday, April 27, 2012 5:45 AM >>> Subject: Re: svn commit: r234603 - head/sys/geom/raid >>> >>> On Monday, April 23, 2012 9:04:03 am Alexander Motin wrote: >>>> Author: mav >>>> Date: Mon Apr 23 13:04:02 2012 >>>> New Revision: 234603 >>>> URL: http://svn.freebsd.org/changeset/base/234603 >>>> >>>> Log: >>>> Add names for all primary RAID levels defined by DDF 2.0 specification. >>>> >>>> Modified: >>>> head/sys/geom/raid/g_raid.c >>>> head/sys/geom/raid/g_raid.h >>>> head/sys/geom/raid/tr_raid1.c >>>> head/sys/geom/raid/tr_raid1e.c >>> >>> We should probably add a separate header to hold DDF constants. graid isn't >>> the only place that uses them (e.g. mfi(4) uses it to describe volumes, so >>> mfiutil(8) has its own DDF constants as well in mfiutil.h). >>> >>> -- >> >> You mean src/sys/dev/ata/ata-raid-ddf.h? > > Yes. > >> That said, I trust DDF to be neither universal nor standard, and it's probably a futile micro-optimization to try too hard at this. At the very > least, leave MFI alone. Standard or not, DDF is the only public specification and it is quite universal from point of reviewing possible configurations. That's why I took it as reference instead of reinventing own numbers. Same time metadata modules in graid may do own translation and theoretically support some other configurations, that's why I am not exactly comfortable with idea of merging these lists and strictly tying to DDF. > Hmm, LSI claims that MFI uses the constant values (but not necessarily the > structures from DDF). Certainly the primary RAID type in an mfi(4) volume > uses the same constants as both g_raid.h and ata-raid-ddf.h. ata-raid-ddf.h as all ataraid(4) is not actively used now and should leave. Instead I am now writing DDF module for graid and going to resurrect that file there with minor updates. These two files could be merged, but I am not sure it worth to be done either, as it is temporary coexistence. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 20:16:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5495106566B; Fri, 27 Apr 2012 20:16:20 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A08218FC08; Fri, 27 Apr 2012 20:16:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RKGKSF023011; Fri, 27 Apr 2012 20:16:20 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RKGKDX023009; Fri, 27 Apr 2012 20:16:20 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201204272016.q3RKGKDX023009@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 27 Apr 2012 20:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234739 - head/gnu/usr.bin/gdb/kgdb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 20:16:20 -0000 Author: marcel Date: Fri Apr 27 20:16:20 2012 New Revision: 234739 URL: http://svn.freebsd.org/changeset/base/234739 Log: Allow building a powerpc cross-kgdb. Modified: head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c Modified: head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c Fri Apr 27 20:10:43 2012 (r234738) +++ head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c Fri Apr 27 20:16:20 2012 (r234739) @@ -28,8 +28,13 @@ __FBSDID("$FreeBSD$"); #include +#ifdef CROSS_DEBUGGER +#include +#include +#else #include #include +#endif #include #include #include From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 20:23:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC02E106564A; Fri, 27 Apr 2012 20:23:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B764D8FC0A; Fri, 27 Apr 2012 20:23:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RKNOpn023298; Fri, 27 Apr 2012 20:23:24 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RKNOQH023296; Fri, 27 Apr 2012 20:23:24 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201204272023.q3RKNOQH023296@svn.freebsd.org> From: Rick Macklem Date: Fri, 27 Apr 2012 20:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234740 - head/sys/fs/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 20:23:24 -0000 Author: rmacklem Date: Fri Apr 27 20:23:24 2012 New Revision: 234740 URL: http://svn.freebsd.org/changeset/base/234740 Log: Fix a leak of namei lookup path buffers that occurs when a ZFS volume is exported via the new NFS server. The leak occurred because the new NFS server code didn't handle the case where a file system sets the SAVENAME flag in its VOP_LOOKUP() and ZFS does this for the DELETE case. Tested by: Oliver Brandmueller (ob at gruft.de), hrs PR: kern/167266 MFC after: 1 month Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 27 20:16:20 2012 (r234739) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 27 20:23:24 2012 (r234740) @@ -1047,6 +1047,8 @@ nfsvno_removesub(struct nameidata *ndp, else vput(ndp->ni_dvp); vput(vp); + if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0) + nfsvno_relpathbuf(ndp); NFSEXITCODE(error); return (error); } @@ -1086,6 +1088,8 @@ out: else vput(ndp->ni_dvp); vput(vp); + if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0) + nfsvno_relpathbuf(ndp); NFSEXITCODE(error); return (error); } From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 20:42:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 057E6106564A; Fri, 27 Apr 2012 20:42:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id B6F328FC17; Fri, 27 Apr 2012 20:42:39 +0000 (UTC) Received: by dadz14 with SMTP id z14so4920665dad.17 for ; Fri, 27 Apr 2012 13:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=KFarAbheAZ1CUzw2EUou2csUYk9naN4tWQDaENAQdYo=; b=yoqS1YKOSGja7SNFrdus8vv9IWFrLen7DdBdLeosQGCOQjBDbBcZPwJ9AsuSEnhNat strdR6+niz1RnNtWtwoRzil/ABhzLPwB1mNKrszRwrgVO84UksWfpbEDY5ajZBPM3Qqz WdFTcim+BbqBcE1BsbD5lBm8BCv3Jo5tSDPGgqVWlj2dU807sZ6AHaNjjHf0Ywnn+Yz2 PXXW635UTeKiweZVBTP6nkred8fviRFgO5By8221g8KOZYD6GSLkA+z9ssMcH4G5aAjo JhA7OxRQJ/3zAUugueP+b6OqxSL/T+7q7A5H5HWNmCgVP4Q7t17cvjtDcuaueeca+6AA io8g== MIME-Version: 1.0 Received: by 10.68.213.200 with SMTP id nu8mr13956780pbc.59.1335559359538; Fri, 27 Apr 2012 13:42:39 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Fri, 27 Apr 2012 13:42:39 -0700 (PDT) In-Reply-To: <4F91240C.3050703@ipfw.ru> References: <201204060653.q366rwLa096182@svn.freebsd.org> <4F7E9413.20602@FreeBSD.org> <4F8BBD4E.1040106@FreeBSD.org> <4F91240C.3050703@ipfw.ru> Date: Fri, 27 Apr 2012 13:42:39 -0700 X-Google-Sender-Auth: wFTBDahJZWfGg4fbgug1a9YSzhQ Message-ID: From: Adrian Chadd To: "Alexander V. Chernikov" Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, freebsd-net@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233937 - in head/sys: kern net security/mac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 20:42:40 -0000 Hi Alex, I don't want to be demanding, but would you please consider committing your fixes? And if you could, would you please do it as a set of commits, one per 'thing', rather than one big monolithic commit that does half a dozen different things? That way if there are any further regressions, I/others could test things out. This is breaking bpf for a few people - ladv causes a crash, wifi also causes a crash. Thanks! Adrian From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 22:23:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70E09106566B; Fri, 27 Apr 2012 22:23:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BD188FC0A; Fri, 27 Apr 2012 22:23:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RMN79a027534; Fri, 27 Apr 2012 22:23:07 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RMN6cJ027532; Fri, 27 Apr 2012 22:23:06 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201204272223.q3RMN6cJ027532@svn.freebsd.org> From: Rick Macklem Date: Fri, 27 Apr 2012 22:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234742 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 22:23:07 -0000 Author: rmacklem Date: Fri Apr 27 22:23:06 2012 New Revision: 234742 URL: http://svn.freebsd.org/changeset/base/234742 Log: It was reported via email that some non-FreeBSD NFS servers do not include file attributes in the reply to an NFS create RPC under certain circumstances. This resulted in a vnode of type VNON that was not usable. This patch adds an NFS getattr RPC to nfs_create() for this case, to fix the problem. It was tested by the person that reported the problem and confirmed to fix this case for their server. Tested by: Steven Haber (steven.haber at isilon.com) MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Fri Apr 27 21:40:51 2012 (r234741) +++ head/sys/fs/nfsclient/nfs_clvnops.c Fri Apr 27 22:23:06 2012 (r234742) @@ -1546,7 +1546,10 @@ again: (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); if (!error) { newvp = NFSTOV(np); - if (attrflag) + if (attrflag == 0) + error = nfsrpc_getattr(newvp, cnp->cn_cred, + cnp->cn_thread, &nfsva, NULL); + if (error == 0) error = nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); } From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 22:27:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 405B0106566B; Fri, 27 Apr 2012 22:27:22 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BB328FC14; Fri, 27 Apr 2012 22:27:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RMRMRD027714; Fri, 27 Apr 2012 22:27:22 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RMRLmI027711; Fri, 27 Apr 2012 22:27:21 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201204272227.q3RMRLmI027711@svn.freebsd.org> From: Robert Millan Date: Fri, 27 Apr 2012 22:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234743 - head/sys/amd64/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 22:27:22 -0000 Author: rmh Date: Fri Apr 27 22:27:21 2012 New Revision: 234743 URL: http://svn.freebsd.org/changeset/base/234743 Log: Increase DFLDSIZ from 128 MiB to 32 GiB. On amd64 there's plenty of virtual memory available, so there is no need to be so conservative about it. Reviewed by: arch Modified: head/sys/amd64/include/vmparam.h Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Fri Apr 27 22:23:06 2012 (r234742) +++ head/sys/amd64/include/vmparam.h Fri Apr 27 22:27:21 2012 (r234743) @@ -54,7 +54,7 @@ */ #define MAXTSIZ (128UL*1024*1024) /* max text size */ #ifndef DFLDSIZ -#define DFLDSIZ (128UL*1024*1024) /* initial data size limit */ +#define DFLDSIZ (32768UL*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ #define MAXDSIZ (32768UL*1024*1024) /* max data size */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 27 23:39:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91DD2106564A; Fri, 27 Apr 2012 23:39:22 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8838FC08; Fri, 27 Apr 2012 23:39:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RNdMll030297; Fri, 27 Apr 2012 23:39:22 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RNdMbf030295; Fri, 27 Apr 2012 23:39:22 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201204272339.q3RNdMbf030295@svn.freebsd.org> From: Jamie Gritton Date: Fri, 27 Apr 2012 23:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234744 - head/usr.sbin/jail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 23:39:22 -0000 Author: jamie Date: Fri Apr 27 23:39:21 2012 New Revision: 234744 URL: http://svn.freebsd.org/changeset/base/234744 Log: Fix the dates and history as of the move to HEAD. Modified: head/usr.sbin/jail/jail.conf.5 Modified: head/usr.sbin/jail/jail.conf.5 ============================================================================== --- head/usr.sbin/jail/jail.conf.5 Fri Apr 27 22:27:21 2012 (r234743) +++ head/usr.sbin/jail/jail.conf.5 Fri Apr 27 23:39:21 2012 (r234744) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011 James Gritton +.\" Copyright (c) 2012 James Gritton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2010 +.Dd April 26, 2012 .Dt JAIL.CONF 5 .Os .Sh NAME @@ -217,7 +217,7 @@ utility appeared in The .Nm file was added in -.Fx 9.0 . +.Fx 10.0 . .Sh AUTHORS .An -nosplit The jail feature was written by From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 00:12:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5532D1065672; Sat, 28 Apr 2012 00:12:24 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FFBB8FC0C; Sat, 28 Apr 2012 00:12:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S0COP3031475; Sat, 28 Apr 2012 00:12:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S0COYL031472; Sat, 28 Apr 2012 00:12:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204280012.q3S0COYL031472@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Apr 2012 00:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234745 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 00:12:24 -0000 Author: nwhitehorn Date: Sat Apr 28 00:12:23 2012 New Revision: 234745 URL: http://svn.freebsd.org/changeset/base/234745 Log: After switching mutexes to use lwsync, they no longer provide sufficient guarantees on acquire for the tlbie mutex. Conversely, the TLB invalidation sequence provides guarantees that do not need to be redundantly applied on release. Roll a small custom lock that is just right. Simultaneously, convert the SLB tree changes back to lwsync, as changing them to sync was a misdiagnosis of the tlbie barrier problem this commit actually fixes. Modified: head/sys/powerpc/aim/moea64_native.c head/sys/powerpc/aim/slb.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Fri Apr 27 23:39:21 2012 (r234744) +++ head/sys/powerpc/aim/moea64_native.c Sat Apr 28 00:12:23 2012 (r234745) @@ -133,36 +133,31 @@ __FBSDID("$FreeBSD$"); #define VSID_HASH_MASK 0x0000007fffffffffULL -/* - * The tlbie instruction must be executed in 64-bit mode - * so we have to twiddle MSR[SF] around every invocation. - * Just to add to the fun, exceptions must be off as well - * so that we can't trap in 64-bit mode. What a pain. - */ -static struct mtx tlbie_mutex; - static __inline void TLBIE(uint64_t vpn) { #ifndef __powerpc64__ register_t vpn_hi, vpn_lo; register_t msr; - register_t scratch; + register_t scratch, intr; #endif + static volatile u_int tlbie_lock = 0; + vpn <<= ADDR_PIDX_SHFT; vpn &= ~(0xffffULL << 48); + /* Hobo spinlock: we need stronger guarantees than mutexes provide */ + while (!atomic_cmpset_int(&tlbie_lock, 0, 1)); + isync(); /* Flush instruction queue once lock acquired */ + #ifdef __powerpc64__ - mtx_lock(&tlbie_mutex); __asm __volatile("tlbie %0" :: "r"(vpn) : "memory"); - mtx_unlock(&tlbie_mutex); - __asm __volatile("eieio; tlbsync; ptesync"); + __asm __volatile("eieio; tlbsync; ptesync" ::: "memory"); #else vpn_hi = (uint32_t)(vpn >> 32); vpn_lo = (uint32_t)vpn; - /* Note: spin mutex is to disable exceptions while fiddling MSR */ - mtx_lock_spin(&tlbie_mutex); + intr = intr_disable(); __asm __volatile("\ mfmsr %0; \ mr %1, %0; \ @@ -179,8 +174,11 @@ TLBIE(uint64_t vpn) { ptesync;" : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1) : "memory"); - mtx_unlock_spin(&tlbie_mutex); + intr_enable(); #endif + + /* No barriers or special ops -- taken care of by ptesync above */ + tlbie_lock = 0; } #define DISABLE_TRANS(msr) msr = mfmsr(); mtmsr(msr & ~PSL_DR) @@ -261,9 +259,9 @@ moea64_pte_clear_native(mmu_t mmu, uintp * As shown in Section 7.6.3.2.3 */ pt->pte_lo &= ~ptebit; - sched_pin(); + critical_enter(); TLBIE(vpn); - sched_unpin(); + critical_exit(); } static void @@ -297,12 +295,12 @@ moea64_pte_unset_native(mmu_t mmu, uintp * Invalidate the pte. */ isync(); - sched_pin(); + critical_enter(); pvo_pt->pte_hi &= ~LPTE_VALID; pt->pte_hi &= ~LPTE_VALID; PTESYNC(); TLBIE(vpn); - sched_unpin(); + critical_exit(); /* * Save the reg & chg bits. @@ -405,15 +403,6 @@ moea64_bootstrap_native(mmu_t mmup, vm_o CTR1(KTR_PMAP, "moea64_bootstrap: PTEG table at %p", moea64_pteg_table); - /* - * Initialize the TLBIE lock. TLBIE can only be executed by one CPU. - */ -#ifdef __powerpc64__ - mtx_init(&tlbie_mutex, "tlbie", NULL, MTX_DEF); -#else - mtx_init(&tlbie_mutex, "tlbie", NULL, MTX_SPIN); -#endif - moea64_mid_bootstrap(mmup, kernelstart, kernelend); /* Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Fri Apr 27 23:39:21 2012 (r234744) +++ head/sys/powerpc/aim/slb.c Sat Apr 28 00:12:23 2012 (r234745) @@ -139,7 +139,7 @@ make_new_leaf(uint64_t esid, uint64_t sl * that a lockless searcher always sees a valid path through * the tree. */ - powerpc_sync(); + mb(); idx = esid2idx(esid, parent->ua_level); parent->u.ua_child[idx] = child; @@ -187,7 +187,7 @@ make_intermediate(uint64_t esid, struct idx = esid2idx(child->ua_base, inter->ua_level); inter->u.ua_child[idx] = child; setbit(&inter->ua_alloc, idx); - powerpc_sync(); + mb(); /* Set up parent to point to intermediate node ... */ idx = esid2idx(inter->ua_base, parent->ua_level); From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 02:48:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4004106566B; Sat, 28 Apr 2012 02:48:52 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 843C28FC08; Sat, 28 Apr 2012 02:48:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S2mqMo038158; Sat, 28 Apr 2012 02:48:52 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S2mqnH038154; Sat, 28 Apr 2012 02:48:52 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201204280248.q3S2mqnH038154@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 28 Apr 2012 02:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234746 - in head: . lib/libmd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 02:48:52 -0000 Author: obrien Date: Sat Apr 28 02:48:51 2012 New Revision: 234746 URL: http://svn.freebsd.org/changeset/base/234746 Log: Remove the RFC 1319 MD2 Message-Digest Algorithm routines from libmd. 1. The licensing terms for the MD2 routines from RFC is not under a BSD-like license. Instead it is only granted for non-commercial Internet Privacy-Enhanced Mail. 2. MD2 is quite deprecated as it is no longer considered a cryptographically strong algorithm. Discussed with: so (cperciva), core Deleted: head/lib/libmd/md2.copyright head/lib/libmd/md2.h head/lib/libmd/md2c.c Modified: head/ObsoleteFiles.inc head/lib/libmd/Makefile head/lib/libmd/mdX.3 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Apr 28 00:12:23 2012 (r234745) +++ head/ObsoleteFiles.inc Sat Apr 28 02:48:51 2012 (r234746) @@ -582,6 +582,7 @@ OLD_LIBS+=lib/libipx.so.4 OLD_LIBS+=lib/libkiconv.so.3 OLD_LIBS+=lib/libkvm.so.4 OLD_LIBS+=lib/libmd.so.4 +OLD_LIBS+=lib/libmd.so.5 OLD_LIBS+=lib/libncurses.so.7 OLD_LIBS+=lib/libncursesw.so.7 OLD_LIBS+=lib/libnvpair.so.1 Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Sat Apr 28 00:12:23 2012 (r234745) +++ head/lib/libmd/Makefile Sat Apr 28 02:48:51 2012 (r234746) @@ -1,20 +1,18 @@ # $FreeBSD$ LIB= md +SHLIB_MAJOR= 6 SHLIBDIR?= /lib -SRCS= md2c.c md4c.c md5c.c md2hl.c md4hl.c md5hl.c \ +SRCS= md4c.c md5c.c md4hl.c md5hl.c \ rmd160c.c rmd160hl.c \ sha0c.c sha0hl.c sha1c.c sha1hl.c \ sha256c.c sha256hl.c \ sha512c.c sha512hl.c -INCS= md2.h md4.h md5.h ripemd.h sha.h sha256.h sha512.h +INCS= md4.h md5.h ripemd.h sha.h sha256.h sha512.h WARNS?= 0 -MAN+= md2.3 md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3 -MLINKS+=md2.3 MD2Init.3 md2.3 MD2Update.3 md2.3 MD2Final.3 -MLINKS+=md2.3 MD2End.3 md2.3 MD2File.3 md2.3 MD2FileChunk.3 -MLINKS+=md2.3 MD2Data.3 +MAN+= md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3 MLINKS+=md4.3 MD4Init.3 md4.3 MD4Update.3 md4.3 MD4Final.3 MLINKS+=md4.3 MD4End.3 md4.3 MD4File.3 md4.3 MD4FileChunk.3 MLINKS+=md4.3 MD4Data.3 @@ -59,10 +57,6 @@ CFLAGS+= -DRMD160_ASM ACFLAGS+= -DELF -Wa,--noexecstack .endif -md2hl.c: mdXhl.c - (echo '#define LENGTH 16'; \ - sed -e 's/mdX/md2/g' -e 's/MDX/MD2/g' ${.ALLSRC}) > ${.TARGET} - md4hl.c: mdXhl.c (echo '#define LENGTH 16'; \ sed -e 's/mdX/md4/g' -e 's/MDX/MD4/g' ${.ALLSRC}) > ${.TARGET} @@ -105,16 +99,6 @@ md${i}.3: ${.CURDIR}/mdX.3 cat ${.CURDIR}/md${i}.copyright >> ${.TARGET} .endfor -md2.ref: - echo 'MD2 test suite:' > ${.TARGET} - @echo 'MD2 ("") = 8350e5a3e24c153df2275c9f80692773' >> ${.TARGET} - @echo 'MD2 ("a") = 32ec01ec4a6dac72c0ab96fb34c0b5d1' >> ${.TARGET} - @echo 'MD2 ("abc") = da853b0d3f88d99b30283a69e6ded6bb' >> ${.TARGET} - @echo 'MD2 ("message digest") = ab4f496bfb2a530b219ff33031fe06b0' >> ${.TARGET} - @echo 'MD2 ("abcdefghijklmnopqrstuvwxyz") = 4e8ddff3650292ab5a4108c3aa47940b' >> ${.TARGET} - @echo 'MD2 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = da33def2a42df13975352846c30338cd' >> ${.TARGET} - @echo 'MD2 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = d5976f79d83d3a0dc9806c3c66f3efd8' >> ${.TARGET} - md4.ref: echo 'MD4 test suite:' > ${.TARGET} @echo 'MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0' >> ${.TARGET} @@ -205,12 +189,9 @@ rmd160.ref: @echo 'RIPEMD160 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") =' \ '9b752e45573d4b39f4dbd3323cab82bf63326bfb' >> ${.TARGET} -test: md2.ref md4.ref md5.ref sha0.ref rmd160.ref sha1.ref sha256.ref sha512.ref +test: md4.ref md5.ref sha0.ref rmd160.ref sha1.ref sha256.ref sha512.ref @${ECHO} if any of these test fail, the code produces wrong results @${ECHO} and should NOT be used. - ${CC} ${CFLAGS} ${LDFLAGS} -DMD=2 -o mddriver ${.CURDIR}/mddriver.c ./libmd.a - ./mddriver | cmp md2.ref - - @${ECHO} MD2 passed test ${CC} ${CFLAGS} ${LDFLAGS} -DMD=4 -o mddriver ${.CURDIR}/mddriver.c libmd.a ./mddriver | cmp md4.ref - @${ECHO} MD4 passed test Modified: head/lib/libmd/mdX.3 ============================================================================== --- head/lib/libmd/mdX.3 Sat Apr 28 00:12:23 2012 (r234745) +++ head/lib/libmd/mdX.3 Sat Apr 28 02:48:51 2012 (r234746) @@ -52,8 +52,7 @@ This net result is a .Dq fingerprint of the input-data, which does not disclose the actual input. .Pp -MD2 is the slowest, MD4 is the fastest and MD5 is somewhere in the middle. -MD2 can only be used for Privacy-Enhanced Mail. +MD4 is the fastest and MD5 is somewhat slower. MD4 has now been broken; it should only be used where necessary for backward compatibility. MD5 has not yet (1999-02-11) been broken, but sufficient attacks have been @@ -144,16 +143,10 @@ If the .Fa buf argument is non-null it must point to at least 33 characters of buffer space. .Sh SEE ALSO -.Xr md2 3 , .Xr md4 3 , .Xr md5 3 , .Xr sha 3 .Rs -.%A B. Kaliski -.%T The MD2 Message-Digest Algorithm -.%O RFC 1319 -.Re -.Rs .%A R. Rivest .%T The MD4 Message-Digest Algorithm .%O RFC 1186 @@ -192,6 +185,3 @@ Phk ristede runen. No method is known to exist which finds two files having the same hash value, nor to find a file with a specific hash value. There is on the other hand no guarantee that such a method does not exist. -.Pp -MD2 has only been licensed for use in Privacy Enhanced Mail. -Use MD4 or MD5 if that is not what you are doing. From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 03:07:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EA8E106564A; Sat, 28 Apr 2012 03:07:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FDAE8FC15; Sat, 28 Apr 2012 03:07:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S37bod038964; Sat, 28 Apr 2012 03:07:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S37bTn038960; Sat, 28 Apr 2012 03:07:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280307.q3S37bTn038960@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 03:07:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234747 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 03:07:37 -0000 Author: adrian Date: Sat Apr 28 03:07:36 2012 New Revision: 234747 URL: http://svn.freebsd.org/changeset/base/234747 Log: Add an AR5416 PCU DMA stop method, as a check for the AR9130 is needed. The reference driver has a 3ms delay for the AR9130 but I'm not as yet sure why. From what I can gather, it's likely waiting for some FIFO flush to occur. At some point in the future it may be worthwhile adding a WMAC FIFO flush here, but that'd require some side-call through to the SoC DDR flush routines. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sat Apr 28 02:48:51 2012 (r234746) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sat Apr 28 03:07:36 2012 (r234747) @@ -234,6 +234,7 @@ extern HAL_BOOL ar5416SetKeyCacheEntry(s extern uint32_t ar5416GetRxFilter(struct ath_hal *ah); extern void ar5416SetRxFilter(struct ath_hal *ah, uint32_t bits); +extern HAL_BOOL ar5416StopDmaReceive(struct ath_hal *ah); extern void ar5416StartPcuReceive(struct ath_hal *ah); extern void ar5416StopPcuReceive(struct ath_hal *ah); extern HAL_BOOL ar5416SetupRxDesc(struct ath_hal *, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Apr 28 02:48:51 2012 (r234746) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Apr 28 03:07:36 2012 (r234747) @@ -119,6 +119,7 @@ ar5416InitState(struct ath_hal_5416 *ahp /* Receive Functions */ ah->ah_getRxFilter = ar5416GetRxFilter; ah->ah_setRxFilter = ar5416SetRxFilter; + ah->ah_stopDmaReceive = ar5416StopDmaReceive; ah->ah_startPcuReceive = ar5416StartPcuReceive; ah->ah_stopPcuReceive = ar5416StopPcuReceive; ah->ah_setupRxDesc = ar5416SetupRxDesc; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Apr 28 02:48:51 2012 (r234746) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Apr 28 03:07:36 2012 (r234747) @@ -67,6 +67,40 @@ ar5416SetRxFilter(struct ath_hal *ah, u_ } /* + * Stop Receive at the DMA engine + */ +HAL_BOOL +ar5416StopDmaReceive(struct ath_hal *ah) +{ + HAL_BOOL status; + + OS_MARK(ah, AH_MARK_RX_CTL, AH_MARK_RX_CTL_DMA_STOP); + OS_REG_WRITE(ah, AR_CR, AR_CR_RXD); /* Set receive disable bit */ + if (!ath_hal_wait(ah, AR_CR, AR_CR_RXE, 0)) { + OS_MARK(ah, AH_MARK_RX_CTL, AH_MARK_RX_CTL_DMA_STOP_ERR); +#ifdef AH_DEBUG + ath_hal_printf(ah, "%s: dma failed to stop in 10ms\n" + "AR_CR=0x%08x\nAR_DIAG_SW=0x%08x\n", + __func__, + OS_REG_READ(ah, AR_CR), + OS_REG_READ(ah, AR_DIAG_SW)); +#endif + status = AH_FALSE; + } else { + status = AH_TRUE; + } + + /* + * XXX Is this to flush whatever is in a FIFO somewhere? + * XXX If so, what should the correct behaviour should be? + */ + if (AR_SREV_9100(ah)) + OS_DELAY(3000); + + return (status); +} + +/* * Start receive at the PCU engine */ void From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 05:00:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C933106564A; Sat, 28 Apr 2012 05:00:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 278D38FC0C; Sat, 28 Apr 2012 05:00:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S50mcQ043076; Sat, 28 Apr 2012 05:00:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S50lcZ043074; Sat, 28 Apr 2012 05:00:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280500.q3S50lcZ043074@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 05:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234748 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 05:00:48 -0000 Author: adrian Date: Sat Apr 28 05:00:47 2012 New Revision: 234748 URL: http://svn.freebsd.org/changeset/base/234748 Log: Add a comment about this DELAY(), I'm not sure whether it's supposed to be for a DDR/FIFO flush or something else. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Apr 28 03:07:36 2012 (r234747) +++ head/sys/dev/ath/if_ath.c Sat Apr 28 05:00:47 2012 (r234748) @@ -5417,6 +5417,10 @@ ath_stoprecv(struct ath_softc *sc, int d ath_hal_stoppcurecv(ah); /* disable PCU */ ath_hal_setrxfilter(ah, 0); /* clear recv filter */ ath_hal_stopdmarecv(ah); /* disable DMA engine */ + /* + * TODO: see if this particular DELAY() is required; it may be + * masking some missing FIFO flush or DMA sync. + */ if (dodelay) DELAY(3000); /* 3ms is long enough for 1 frame */ #ifdef ATH_DEBUG From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 08:12:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E524D106566B; Sat, 28 Apr 2012 08:12:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D02CF8FC0A; Sat, 28 Apr 2012 08:12:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S8CpSM049481; Sat, 28 Apr 2012 08:12:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S8Cp8D049479; Sat, 28 Apr 2012 08:12:51 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280812.q3S8Cp8D049479@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 08:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234749 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 08:12:52 -0000 Author: adrian Date: Sat Apr 28 08:12:51 2012 New Revision: 234749 URL: http://svn.freebsd.org/changeset/base/234749 Log: Extend the HAL channel survey statistics: * include ext_chan_busy; * include ofdm/cck phy error counts, which aren't yet implemented. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sat Apr 28 05:00:47 2012 (r234748) +++ head/sys/dev/ath/ath_hal/ah.h Sat Apr 28 08:12:51 2012 (r234749) @@ -660,7 +660,11 @@ typedef struct { uint32_t tx_busy; uint32_t rx_busy; uint32_t chan_busy; + uint32_t ext_chan_busy; uint32_t cycle_count; + /* XXX TODO */ + uint32_t ofdm_phyerr_count; + uint32_t cck_phyerr_count; } HAL_SURVEY_SAMPLE; /* From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 08:15:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3982106564A; Sat, 28 Apr 2012 08:15:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F8BA8FC0C; Sat, 28 Apr 2012 08:15:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S8FeTT049619; Sat, 28 Apr 2012 08:15:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S8FeRT049615; Sat, 28 Apr 2012 08:15:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280815.q3S8FeRT049615@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 08:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234750 - head/sys/dev/ath/ath_hal/ar5212 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 08:15:40 -0000 Author: adrian Date: Sat Apr 28 08:15:40 2012 New Revision: 234750 URL: http://svn.freebsd.org/changeset/base/234750 Log: Fetch the channel survey code from the HAL. This information is currently not being populated by any of the HAL modules. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sat Apr 28 08:12:51 2012 (r234749) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sat Apr 28 08:15:40 2012 (r234750) @@ -320,6 +320,7 @@ struct ath_hal_5212 { struct ar5212AniParams ah_aniParams5; /* 5GHz parameters */ struct ar5212AniState *ah_curani; /* cached last reference */ struct ar5212AniState ah_ani[AH_MAXCHAN]; /* per-channel state */ + HAL_CHANNEL_SURVEY ah_chansurvey[AH_MAXCHAN]; /* channel survey */ /* AR5416 uses some of the AR5212 ANI code; these are the ANI methods */ HAL_BOOL (*ah_aniControl) (struct ath_hal *, HAL_ANI_CMD cmd, int param); Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Apr 28 08:12:51 2012 (r234749) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Apr 28 08:15:40 2012 (r234750) @@ -1090,6 +1090,14 @@ ar5212GetDiagState(struct ath_hal *ah, i return AH_FALSE; return ar5212AniSetParams(ah, args, args); } + break; + case HAL_DIAG_CHANSURVEY: + if (AH_PRIVATE(ah)->ah_curchan == NULL) + return AH_FALSE; + *result = + &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata]; + *resultsize = sizeof(HAL_CHANNEL_SURVEY); + return AH_TRUE; } return AH_FALSE; } From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 08:17:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB9CC106564A; Sat, 28 Apr 2012 08:17:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56B98FC18; Sat, 28 Apr 2012 08:17:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S8HJAW049712; Sat, 28 Apr 2012 08:17:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S8HJS0049708; Sat, 28 Apr 2012 08:17:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280817.q3S8HJS0049708@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 08:17:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234751 - in head/tools/tools/ath: . athsurvey X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 08:17:20 -0000 Author: adrian Date: Sat Apr 28 08:17:19 2012 New Revision: 234751 URL: http://svn.freebsd.org/changeset/base/234751 Log: Add a tool to print out min, average and max channel survey information from the current channel. There seem to be some occasional issues with the extension channel counters reporting more than 100% of use. I'll investigate that soon. Added: head/tools/tools/ath/athsurvey/ head/tools/tools/ath/athsurvey/Makefile (contents, props changed) head/tools/tools/ath/athsurvey/athsurvey.c (contents, props changed) Modified: head/tools/tools/ath/Makefile Modified: head/tools/tools/ath/Makefile ============================================================================== --- head/tools/tools/ath/Makefile Sat Apr 28 08:15:40 2012 (r234750) +++ head/tools/tools/ath/Makefile Sat Apr 28 08:17:19 2012 (r234751) @@ -3,5 +3,6 @@ SUBDIR= arcode athdebug athdecode athkey athpoke athprom athrd athregs SUBDIR+= athstats ath_prom_read athradar SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print +SUBDIR+= athsurvey .include Added: head/tools/tools/ath/athsurvey/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athsurvey/Makefile Sat Apr 28 08:17:19 2012 (r234751) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +PROG= athsurvey + +.include <../Makefile.inc> + +SRCS= athsurvey.c +SRCS+= opt_ah.h +CLEANFILES+= opt_ah.h + +opt_ah.h: + echo "#define AH_DEBUG 1" > opt_ah.h + echo "#define AH_DEBUG_COUNTRY 1" >> opt_ah.h + echo "#define AH_SUPPORT_AR5416 1" >> opt_ah.h + +.include Added: head/tools/tools/ath/athsurvey/athsurvey.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athsurvey/athsurvey.c Sat Apr 28 08:17:19 2012 (r234751) @@ -0,0 +1,216 @@ +/*- + * Copyright (c) 2012 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * 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 NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * $FreeBSD$ + */ +#include "diag.h" + +#include "ah.h" +#include "ah_internal.h" + +#include +#include +#include +#include +#include +#include +#include + +const char *progname; + +static void +usage() +{ + fprintf(stderr, "usage: %s [-i ifname]\n", progname); + exit(-1); +} + +static int +get_survey_stats(int s, const char *ifname, HAL_CHANNEL_SURVEY *hs) +{ + uint16_t eedata; + struct ath_diag atd; + + memset(&atd, '\0', sizeof(atd)); + + atd.ad_id = HAL_DIAG_CHANSURVEY | ATH_DIAG_OUT; + atd.ad_in_size = 0; + atd.ad_in_data = NULL; + atd.ad_out_size = sizeof(HAL_CHANNEL_SURVEY); + atd.ad_out_data = (caddr_t) hs; + strncpy(atd.ad_name, ifname, sizeof(atd.ad_name)); + + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) { + err(1, atd.ad_name); + return (0); + } + return (1); +} + +static void +process_survey_stats(HAL_CHANNEL_SURVEY *hs) +{ + int i; + float tx = 0.0, rx = 0.0, cc = 0.0, cext = 0.0; + float max_tx = 0.0, max_rx = 0.0, max_cc = 0.0, max_cext = 0.0; + uint64_t avg_tx = 0, avg_rx = 0, avg_cc = 0, avg_cext = 0; + float min_tx = 100.0, min_rx = 100.0, min_cc = 100.0, min_cext = 100.0; + int n = 0; + int cycle_count = 0, max_cycle_count = 0; + + /* Calculate a percentage channel busy */ + for (i = 0; i < CHANNEL_SURVEY_SAMPLE_COUNT; i++) { + /* + * Skip samples with no cycle count + */ + if (hs->samples[i].cycle_count == 0) + continue; + n++; + + /* + * Grab cycle count, calculate maximum just for curiousity + */ + cycle_count = hs->samples[i].cycle_count; + if (cycle_count > max_cycle_count) + max_cycle_count = cycle_count; + + /* + * Calculate percentage + */ + tx = (float) hs->samples[i].tx_busy * 100.0 / + hs->samples[i].cycle_count; + rx = (float) hs->samples[i].rx_busy * 100.0 / + hs->samples[i].cycle_count; + cc = (float) hs->samples[i].chan_busy * 100.0 / + hs->samples[i].cycle_count; + cext = (float) hs->samples[i].ext_chan_busy * 100.0 / + hs->samples[i].cycle_count; + + /* + * Update rolling average + * XXX to preserve some accuracy, keep two decimal points + * using "fixed" point math. + */ + avg_tx += (uint64_t) hs->samples[i].tx_busy * 10000 / + hs->samples[i].cycle_count; + avg_rx += (uint64_t) hs->samples[i].rx_busy * 10000 / + hs->samples[i].cycle_count; + avg_cc += (uint64_t) hs->samples[i].chan_busy * 10000 / + hs->samples[i].cycle_count; + avg_cext += (uint64_t) hs->samples[i].ext_chan_busy * 10000 / + hs->samples[i].cycle_count; + + /* + * Update maximum values + */ + if (tx > max_tx) + max_tx = tx; + if (rx > max_rx) + max_rx = rx; + if (cc > max_cc) + max_cc = cc; + if (cext > max_cext) + max_cext = cext; + + /* + * Update minimum values + */ + if (tx < min_tx) + min_tx = tx; + if (rx < min_rx) + min_rx = rx; + if (cc < min_cc) + min_cc = cc; + if (cext < min_cext) + min_cext = cext; + } + + printf("(%4.1f %4.1f %4.1f %4.1f) ", + min_tx, min_rx, min_cc, min_cext); + printf("(%4.1f %4.1f %4.1f %4.1f) ", + n == 0 ? 0.0 : (float) (avg_tx / n) / 100.0, + n == 0 ? 0.0 : (float) (avg_rx / n) / 100.0, + n == 0 ? 0.0 : (float) (avg_cc / n) / 100.0, + n == 0 ? 0.0 : (float) (avg_cext / n) / 100.0); + printf("(%4.1f %4.1f %4.1f %4.1f)\n", + max_tx, max_rx, max_cc, max_cext); +} + +int +main(int argc, char *argv[]) +{ + FILE *fd = NULL; + const char *ifname; + int c, s; + int l = 0; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) + err(1, "socket"); + ifname = getenv("ATH"); + if (!ifname) + ifname = ATH_DEFAULT; + + progname = argv[0]; + while ((c = getopt(argc, argv, "i:")) != -1) + switch (c) { + case 'i': + ifname = optarg; + break; + default: + usage(); + /*NOTREACHED*/ + } + argc -= optind; + argv += optind; + + /* Now, loop over and fetch some statistics .. */ + while (1) { + HAL_CHANNEL_SURVEY hs; + memset(&hs, '\0', sizeof(hs)); + if (get_survey_stats(s, ifname, &hs) == 0) + break; + /* XXX screen height! */ + if (l % 23 == 0) { + printf(" " + "min " + "avg " + "max\n"); + printf(" tx%% rx%% cc%% ec%% "); + printf(" tx%% rx%% cc%% ec%% "); + printf(" tx%% rx%% cc%% ec%%\n"); + } + process_survey_stats(&hs); + sleep(1); + l++; + } + + return (0); +} + + From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 08:29:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24B5C106566B; Sat, 28 Apr 2012 08:29:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F93C8FC0A; Sat, 28 Apr 2012 08:29:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S8TkEi050156; Sat, 28 Apr 2012 08:29:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S8TkFB050152; Sat, 28 Apr 2012 08:29:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280829.q3S8TkFB050152@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 08:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234752 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 08:29:47 -0000 Author: adrian Date: Sat Apr 28 08:29:46 2012 New Revision: 234752 URL: http://svn.freebsd.org/changeset/base/234752 Log: Extend the ANI code to implement basic channel survey support. * Always call ar5416GetListenTime() * Modify ar5416GetListenTime() to: + don't update the ANI state if there isn't any ANI state; + don't update the channel survey state if there's no active channel - just to be paranoid + copy the channel survey results into the current sample slot based on the current channel; then increment the sample counter and sample history counter. * Modify ar5416GetMIBCyclesPct() to simply return a HAL_SURVEY_SAMPLE, rather than a set of percentages. The ANI code wasn't using the percentages anyway. TODO: * Create a new function which fetches the survey results periodically * .. then modify the ANI code to use the pre-fetched values rather than fetching them again * Roll the 11n ext busy function from ar5416_misc.c to update all the counters, then do the result calculation * .. then, modify the MIB counter routine to correctly fetch a snapshot - freeze the counters, fetch the values, then reset the counters. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sat Apr 28 08:17:19 2012 (r234751) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sat Apr 28 08:29:46 2012 (r234752) @@ -196,9 +196,8 @@ extern uint32_t ar5416GetCurRssi(struct extern HAL_BOOL ar5416SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING); extern HAL_BOOL ar5416SetDecompMask(struct ath_hal *, uint16_t, int); extern void ar5416SetCoverageClass(struct ath_hal *, uint8_t, int); -extern uint32_t ar5416GetMibCycleCountsPct(struct ath_hal *ah, - uint32_t *rxc_pcnt, uint32_t *rxextc_pcnt, uint32_t *rxf_pcnt, - uint32_t *txf_pcnt); +extern uint32_t ar5416GetMibCycleCounts(struct ath_hal *ah, + HAL_SURVEY_SAMPLE *hsample); extern uint32_t ar5416Get11nExtBusy(struct ath_hal *ah); extern void ar5416Set11nMac2040(struct ath_hal *ah, HAL_HT_MACMODE mode); extern HAL_HT_RXCLEAR ar5416Get11nRxClear(struct ath_hal *ah); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 08:17:19 2012 (r234751) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 08:29:46 2012 (r234752) @@ -804,20 +804,51 @@ ar5416AniLowerImmunity(struct ath_hal *a * deducting the cycles spent tx'ing and rx'ing from the total * cycle count since our last call. A return value <0 indicates * an invalid/inconsistent time. + * + * This may be called with ANI disabled; in which case simply keep + * the statistics and don't write to the aniState pointer. + * + * XXX TODO: Make this cleaner! */ static int32_t ar5416AniGetListenTime(struct ath_hal *ah) { struct ath_hal_5212 *ahp = AH5212(ah); - struct ar5212AniState *aniState; - uint32_t rxc_pct, extc_pct, rxf_pct, txf_pct; + struct ar5212AniState *aniState = NULL; int32_t listenTime; int good; + HAL_SURVEY_SAMPLE hs; + HAL_CHANNEL_SURVEY *cs = AH_NULL; - good = ar5416GetMibCycleCountsPct(ah, - &rxc_pct, &extc_pct, &rxf_pct, &txf_pct); + /* + * We shouldn't see ah_curchan be NULL, but just in case.. + */ + if (AH_PRIVATE(ah)->ah_curchan == AH_NULL) { + ath_hal_printf(ah, "%s: ah_curchan = NULL?\n", __func__); + return (0); + } + /* XXX bounds check? */ + if (AH_PRIVATE(ah)->ah_curchan != AH_NULL) + cs = + &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata]; + + /* + * Fetch the current statistics, squirrel away the current + * sample, bump the sequence/sample counter. + */ + OS_MEMZERO(&hs, sizeof(hs)); + good = ar5416GetMibCycleCounts(ah, &hs); + if (cs != AH_NULL) { + OS_MEMCPY(&cs->samples[cs->cur_sample], &hs, sizeof(hs)); + cs->samples[cs->cur_sample].seq_num = cs->cur_seq; + cs->cur_sample = + (cs->cur_sample + 1) % CHANNEL_SURVEY_SAMPLE_COUNT; + cs->cur_seq++; + } + + if (ANI_ENA(ah)) + aniState = ahp->ah_curani; - aniState = ahp->ah_curani; if (good == 0) { /* * Cycle counter wrap (or initial call); it's not possible @@ -826,18 +857,28 @@ ar5416AniGetListenTime(struct ath_hal *a */ listenTime = 0; ahp->ah_stats.ast_ani_lzero++; - } else { - int32_t ccdelta = AH5416(ah)->ah_cycleCount - aniState->cycleCount; - int32_t rfdelta = AH5416(ah)->ah_rxBusy - aniState->rxFrameCount; - int32_t tfdelta = AH5416(ah)->ah_txBusy - aniState->txFrameCount; + } else if (ANI_ENA(ah)) { + /* + * Only calculate and update the cycle count if we have + * an ANI state. + */ + int32_t ccdelta = + AH5416(ah)->ah_cycleCount - aniState->cycleCount; + int32_t rfdelta = + AH5416(ah)->ah_rxBusy - aniState->rxFrameCount; + int32_t tfdelta = + AH5416(ah)->ah_txBusy - aniState->txFrameCount; listenTime = (ccdelta - rfdelta - tfdelta) / CLOCK_RATE; } - aniState->cycleCount = AH5416(ah)->ah_cycleCount; - aniState->txFrameCount = AH5416(ah)->ah_rxBusy; - aniState->rxFrameCount = AH5416(ah)->ah_txBusy; - HALDEBUG(ah, HAL_DEBUG_ANI, "rxc=%d, extc=%d, rxf=%d, txf=%d\n", - rxc_pct, extc_pct, rxf_pct, txf_pct); + /* + * Again, only update ANI state if we have it. + */ + if (ANI_ENA(ah)) { + aniState->cycleCount = AH5416(ah)->ah_cycleCount; + aniState->txFrameCount = AH5416(ah)->ah_rxBusy; + aniState->rxFrameCount = AH5416(ah)->ah_txBusy; + } return listenTime; } @@ -902,13 +943,13 @@ ar5416AniPoll(struct ath_hal *ah, const const struct ar5212AniParams *params; int32_t listenTime; + /* Always update from the MIB, for statistics gathering */ + listenTime = ar5416AniGetListenTime(ah); + /* XXX can aniState be null? */ if (aniState == AH_NULL) return; - /* Always update from the MIB, for statistics gathering */ - listenTime = ar5416AniGetListenTime(ah); - if (!ANI_ENA(ah)) return; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat Apr 28 08:17:19 2012 (r234751) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat Apr 28 08:29:46 2012 (r234752) @@ -185,8 +185,7 @@ ar5416SetCoverageClass(struct ath_hal *a * Return the busy for rx_frame, rx_clear, and tx_frame */ uint32_t -ar5416GetMibCycleCountsPct(struct ath_hal *ah, uint32_t *rxc_pcnt, - uint32_t *extc_pcnt, uint32_t *rxf_pcnt, uint32_t *txf_pcnt) +ar5416GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample) { struct ath_hal_5416 *ahp = AH5416(ah); u_int32_t good = 1; @@ -208,21 +207,17 @@ ar5416GetMibCycleCountsPct(struct ath_ha "%s: cycle counter wrap. ExtBusy = 0\n", __func__); good = 0; } else { - uint32_t cc_d = cc - ahp->ah_cycleCount; - uint32_t rc_d = rc - ahp->ah_ctlBusy; - uint32_t ec_d = ec - ahp->ah_extBusy; - uint32_t rf_d = rf - ahp->ah_rxBusy; - uint32_t tf_d = tf - ahp->ah_txBusy; - - if (cc_d != 0) { - *rxc_pcnt = rc_d * 100 / cc_d; - *rxf_pcnt = rf_d * 100 / cc_d; - *txf_pcnt = tf_d * 100 / cc_d; - *extc_pcnt = ec_d * 100 / cc_d; - } else { - good = 0; - } + hsample->cycle_count = cc - ahp->ah_cycleCount; + hsample->chan_busy = rc - ahp->ah_ctlBusy; + hsample->ext_chan_busy = ec - ahp->ah_extBusy; + hsample->rx_busy = rf - ahp->ah_rxBusy; + hsample->tx_busy = tf - ahp->ah_txBusy; } + + /* + * Keep a copy of the MIB results so the next sample has something + * to work from. + */ ahp->ah_cycleCount = cc; ahp->ah_rxBusy = rf; ahp->ah_ctlBusy = rc; @@ -236,6 +231,8 @@ ar5416GetMibCycleCountsPct(struct ath_ha * Return approximation of extension channel busy over an time interval * 0% (clear) -> 100% (busy) * + * XXX TODO: update this to correctly sample all the counters, + * rather than a subset of it. */ uint32_t ar5416Get11nExtBusy(struct ath_hal *ah) From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 10:59:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5ACF4106566B; Sat, 28 Apr 2012 10:59:30 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2328FC0C; Sat, 28 Apr 2012 10:59:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SAxUOO057395; Sat, 28 Apr 2012 10:59:30 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SAxUDR057392; Sat, 28 Apr 2012 10:59:30 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204281059.q3SAxUDR057392@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 28 Apr 2012 10:59:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234756 - in head/usr.sbin/wpa: . wpa_supplicant X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 10:59:30 -0000 Author: bschmidt Date: Sat Apr 28 10:59:29 2012 New Revision: 234756 URL: http://svn.freebsd.org/changeset/base/234756 Log: Follow up r234711 and do same for the supplicant, one file/option per line. While here merge the options which are always enabled. MFC after: 2 weeks Modified: head/usr.sbin/wpa/Makefile.inc head/usr.sbin/wpa/wpa_supplicant/Makefile Modified: head/usr.sbin/wpa/Makefile.inc ============================================================================== --- head/usr.sbin/wpa/Makefile.inc Sat Apr 28 09:21:43 2012 (r234755) +++ head/usr.sbin/wpa/Makefile.inc Sat Apr 28 10:59:29 2012 (r234756) @@ -12,10 +12,13 @@ HOSTAPD_DISTDIR?= ${WPA_DISTDIR}/hostapd ${WPA_DISTDIR}/src/crypto \ ${WPA_DISTDIR}/src/eapol_auth \ ${WPA_DISTDIR}/src/eap_common \ + ${WPA_DISTDIR}/src/eap_peer \ ${WPA_DISTDIR}/src/eap_server \ ${WPA_DISTDIR}/src/eapol_supp \ ${WPA_DISTDIR}/src/l2_packet \ ${WPA_DISTDIR}/src/radius \ + ${WPA_DISTDIR}/src/rsn_supp \ + ${WPA_DISTDIR}/src/tls \ ${WPA_DISTDIR}/src/utils CFLAGS+=-I${.CURDIR} Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 09:21:43 2012 (r234755) +++ head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 10:59:29 2012 (r234756) @@ -2,24 +2,53 @@ .include "${.CURDIR}/../Makefile.inc" -.PATH.c:${WPA_SUPPLICANT_DISTDIR} \ - ${WPA_DISTDIR}/src/drivers \ - ${WPA_DISTDIR}/src/eap_peer \ - ${WPA_DISTDIR}/src/rsn_supp \ - ${WPA_DISTDIR}/src/crypto +.PATH.c:${WPA_DISTDIR}/src/drivers PROG= wpa_supplicant -SRCS= aes-cbc.c aes-ctr.c aes-eax.c aes-encblock.c \ - aes-internal.c aes-omac1.c aes-unwrap.c \ - aes-wrap.c bss.c blacklist.c common.c config.c ctrl_iface.c \ - ctrl_iface_unix.c drivers.c eloop.c events.c l2_packet_freebsd.c main.c\ - md5.c notify.c preauth.c pmksa_cache.c scan.c \ - sha1-pbkdf2.c sha1-tlsprf.c sha1-tprf.c sha1.c \ - wpa.c wpa_common.c wpa_debug.c wpa_ie.c wpa_supplicant.c \ - wpabuf.c wpas_glue.c \ - driver_ndis.c Packet32.c \ +SRCS= aes-cbc.c \ + aes-ctr.c \ + aes-eax.c \ + aes-encblock.c \ + aes-internal.c \ + aes-omac1.c \ + aes-unwrap.c \ + aes-wrap.c \ + base64.c \ + blacklist.c \ + bss.c \ + common.c \ + config.c \ + config_file.c \ + ctrl_iface.c \ + ctrl_iface_unix.c \ + driver_ndis.c \ driver_wired.c \ - driver_freebsd.c os_unix.c + drivers.c \ + eap_register.c \ + eloop.c \ + events.c \ + main.c \ + md5.c \ + notify.c \ + os_unix.c \ + peerkey.c \ + pmksa_cache.c \ + preauth.c \ + scan.c \ + sha1-pbkdf2.c \ + sha1-tlsprf.c \ + sha1-tprf.c \ + sha1.c \ + wpa.c \ + wpa_common.c \ + wpa_debug.c \ + wpa_ie.c \ + wpa_supplicant.c \ + wpabuf.c \ + wpas_glue.c +SRCS+= driver_freebsd.c \ + l2_packet_freebsd.c \ + Packet32.c MAN= wpa_supplicant.8 wpa_supplicant.conf.5 @@ -29,23 +58,19 @@ FILESDIR= ${SHAREDIR}/examples/etc FILES= wpa_supplicant.conf .endif -CFLAGS+=-I${WPA_SUPPLICANT_DISTDIR} -CFLAGS+=-I${WPA_DISTDIR}/src/drivers -CFLAGS+=-I${WPA_DISTDIR}/src/rsn_supp - -CFLAGS+= -DCONFIG_DRIVER_BSD -CFLAGS+= -DCONFIG_DRIVER_NDIS -CFLAGS+= -DCONFIG_DRIVER_WIRED -CFLAGS+= -DCONFIG_TERMINATE_ONLASTIF -CFLAGS+= -DCONFIG_DEBUG_SYSLOG +CFLAGS+=-DCONFIG_BACKEND_FILE \ + -DCONFIG_DEBUG_SYSLOG \ + -DCONFIG_DRIVER_BSD \ + -DCONFIG_DRIVER_NDIS \ + -DCONFIG_DRIVER_WIRED \ + -DCONFIG_PEERKEY \ + -DCONFIG_SMARTCARD \ + -DCONFIG_TERMINATE_ONLASTIF \ + -DPKCS12_FUNCS #CFLAGS+= -g DPADD+= ${LIBPCAP} LDADD+= -lpcap -# NB: we only support wpa_supplicant.conf file -SRCS+= config_file.c base64.c -CFLAGS+=-DCONFIG_BACKEND_FILE - # User customizations to the wpa_supplicant build environment CFLAGS+=${WPA_SUPPLICANT_CFLAGS} #DPADD+=${WPA_SUPPLICANT_DPADD} @@ -53,22 +78,39 @@ LDADD+=${WPA_SUPPLICANT_LDADD} #LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS} .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" -SRCS+= eapol_supp_sm.c eap.c eap_common.c eap_methods.c eap_register.c -CFLAGS+= -DIEEE8021X_EAPOL .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) -CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK \ - -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -SRCS+= chap.c crypto_openssl.c \ + +CFLAGS+=-DEAP_LEAP \ + -DEAP_MD5 \ + -DEAP_MSCHAPv2 \ + -DEAP_PEAP \ + -DEAP_PSK \ + -DEAP_TLS \ + -DEAP_TLV \ + -DEAP_TLS_FUNCS \ + -DEAP_TLS_OPENSSL \ + -DEAP_TTLS \ + -DIEEE8021X_EAPOL +SRCS+= chap.c \ + crypto_openssl.c \ + eap.c \ + eap_common.c \ eap_leap.c \ + eap_md5.c \ + eap_methods.c \ eap_mschapv2.c \ - eap_peap.c eap_peap_common.c \ - eap_psk.c eap_psk_common.c \ - eap_tls.c eap_tls_common.c \ - mschapv2.c ms_funcs.c tls_openssl.c - -CFLAGS+=-DEAP_TTLS -DEAP_MD5 -SRCS+= eap_ttls.c eap_md5.c + eap_peap.c \ + eap_peap_common.c \ + eap_psk.c \ + eap_psk_common.c \ + eap_tls.c \ + eap_tls_common.c \ + eap_ttls.c \ + eapol_supp_sm.c \ + ms_funcs.c \ + mschapv2.c \ + tls_openssl.c .if !empty(CFLAGS:M*-DEAP_GTC) SRCS+= eap_gtc.c @@ -90,6 +132,7 @@ SRCS+= eap_sim.c .if defined(NEED_SIM_COMMON) SRCS+= eap_sim_common.c +.endif # PC/SC interface for smartcards (USIM, GSM SIM) # GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA) @@ -103,26 +146,24 @@ SRCS+= pcsc_funcs.c DPADD+=${LIBPTHREAD} LDADD+=-lpcsclite -lpthread .endif -.endif .if !empty(CFLAGS:M*-DEAP_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 -SRCS+= eap_gpsk.c eap_gpsk_common.c +SRCS+= eap_gpsk.c \ + eap_gpsk_common.c NEED_SHA256= true .endif .if !empty(CFLAGS:M*-DEAP_PAX) -SRCS+= eap_pax.c eap_pax_common.c +SRCS+= eap_pax.c \ + eap_pax_common.c .endif .if !empty(CFLAGS:M*-DEAP_SAKE) -SRCS+= eap_sake.c eap_sake_common.c +SRCS+= eap_sake.c \ + eap_sake_common.c .endif -# NB: requires patch to openssl -#CFLAGS+= -DEAP_FAST -#SRCS+= eap_fast.c - NEED_LIBSSL= true .else CFLAGS+= -DEAP_TLS_NONE From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 11:01:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52738106564A; Sat, 28 Apr 2012 11:01:13 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CE558FC16; Sat, 28 Apr 2012 11:01:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SB1D50057532; Sat, 28 Apr 2012 11:01:13 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SB1DTQ057530; Sat, 28 Apr 2012 11:01:13 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204281101.q3SB1DTQ057530@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 28 Apr 2012 11:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234757 - head/usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 11:01:13 -0000 Author: bschmidt Date: Sat Apr 28 11:01:12 2012 New Revision: 234757 URL: http://svn.freebsd.org/changeset/base/234757 Log: enable EAP_GTC and EAP_OTP to match upstream's default configuration MFC after: 2 weeks Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 10:59:29 2012 (r234756) +++ head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 11:01:12 2012 (r234757) @@ -81,9 +81,11 @@ LDADD+=${WPA_SUPPLICANT_LDADD} .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) -CFLAGS+=-DEAP_LEAP \ +CFLAGS+=-DEAP_GTC \ + -DEAP_LEAP \ -DEAP_MD5 \ -DEAP_MSCHAPv2 \ + -DEAP_OTP \ -DEAP_PEAP \ -DEAP_PSK \ -DEAP_TLS \ @@ -96,10 +98,12 @@ SRCS+= chap.c \ crypto_openssl.c \ eap.c \ eap_common.c \ + eap_gtc.c \ eap_leap.c \ eap_md5.c \ eap_methods.c \ eap_mschapv2.c \ + eap_otp.c \ eap_peap.c \ eap_peap_common.c \ eap_psk.c \ @@ -112,14 +116,6 @@ SRCS+= chap.c \ mschapv2.c \ tls_openssl.c -.if !empty(CFLAGS:M*-DEAP_GTC) -SRCS+= eap_gtc.c -.endif - -.if !empty(CFLAGS:M*-DEAP_OTP) -SRCS+= eap_otp.c -.endif - .if !empty(CFLAGS:M*-DEAP_AKA) NEED_SIM_COMMON= true SRCS+= eap_aka.c From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 11:02:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 943CA106566B; Sat, 28 Apr 2012 11:02:33 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EBDA8FC12; Sat, 28 Apr 2012 11:02:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SB2Xr6057616; Sat, 28 Apr 2012 11:02:33 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SB2XOr057614; Sat, 28 Apr 2012 11:02:33 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204281102.q3SB2XOr057614@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 28 Apr 2012 11:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234758 - head/usr.sbin/wpa/hostapd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 11:02:33 -0000 Author: bschmidt Date: Sat Apr 28 11:02:32 2012 New Revision: 234758 URL: http://svn.freebsd.org/changeset/base/234758 Log: not only the file names have changed from eap_xxx.c to eap_server_xxx.c, the defines too MFC after: 2 weeks Modified: head/usr.sbin/wpa/hostapd/Makefile Modified: head/usr.sbin/wpa/hostapd/Makefile ============================================================================== --- head/usr.sbin/wpa/hostapd/Makefile Sat Apr 28 11:01:12 2012 (r234757) +++ head/usr.sbin/wpa/hostapd/Makefile Sat Apr 28 11:02:32 2012 (r234758) @@ -106,13 +106,13 @@ SRCS+= dump_state.c \ eap_server_ttls.c \ tls_openssl.c -.if !empty(CFLAGS:M*-DEAP_AKA) +.if !empty(CFLAGS:M*-DEAP_SERVER_AKA) NEED_SIM_COMMON= true NEED_SHA256= true SRCS+= eap_server_aka.c .endif -.if !empty(CFLAGS:M*-DEAP_SIM) +.if !empty(CFLAGS:M*-DEAP_SERVER_SIM) NEED_SIM_COMMON= true SRCS+= eap_server_sim.c .endif @@ -124,7 +124,7 @@ NEED_AES_CBC= true NEED_FIPS186_2_PRF= true .endif -.if !empty(CFLAGS:M*-DEAP_GPSK) +.if !empty(CFLAGS:M*-DEAP_SERVER_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 SRCS+= eap_server_gpsk.c \ eap_gpsk_common.c @@ -132,12 +132,12 @@ NEED_SHA256= true NEED_AES_OMAC1= true .endif -.if !empty(CFLAGS:M*-DEAP_PAX) +.if !empty(CFLAGS:M*-DEAP_SERVER_PAX) SRCS+= eap_server_pax.c \ eap_pax_common.c .endif -.if !empty(CFLAGS:M*-DEAP_SAKE) +.if !empty(CFLAGS:M*-DEAP_SERVER_SAKE) SRCS+= eap_server_sake.c \ eap_sake_common.c .endif From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 11:11:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B5D3106566C; Sat, 28 Apr 2012 11:11:54 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44EC38FC08; Sat, 28 Apr 2012 11:11:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SBBse2057992; Sat, 28 Apr 2012 11:11:54 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SBBsHm057989; Sat, 28 Apr 2012 11:11:54 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204281111.q3SBBsHm057989@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 28 Apr 2012 11:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234759 - in head/usr.sbin/wpa: . hostapd wpa_supplicant X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 11:11:54 -0000 Author: bschmidt Date: Sat Apr 28 11:11:53 2012 New Revision: 234759 URL: http://svn.freebsd.org/changeset/base/234759 Log: Move crypto stuff into a common Makefile. While here fix the WITHOUT_OPENSSL build by using the wpa's internal crypto support if openssl is not available, this allows us to unconditionally enable EAP support. MFC after: 2 weeks Added: head/usr.sbin/wpa/Makefile.crypto (contents, props changed) Modified: head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile Added: head/usr.sbin/wpa/Makefile.crypto ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/wpa/Makefile.crypto Sat Apr 28 11:11:53 2012 (r234759) @@ -0,0 +1,121 @@ +# $FreeBSD$ + +.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) +SRCS+= crypto_openssl.c +DPADD+= ${LIBSSL} ${LIBCRYPTO} +LDADD+= -lssl -lcrypto +.else +CFLAGS+=-DCONFIG_CRYPTO_INTERNAL +SRCS+= crypto_internal.c +CONFIG_INTERNAL_AES=y +CONFIG_INTERNAL_DES=y +CONFIG_INTERNAL_MD4=y +CONFIG_INTERNAL_MD5=y +CONFIG_INTERNAL_RC4=y +CONFIG_INTERNAL_SHA1=y +CONFIG_INTERNAL_SHA256=y +CONFIG_INTERNAL_TLS=y +NEED_AES_ENC=true +.endif + +.if defined(TLS_FUNCS) +NEED_TLS_PRF=y +.if defined(CONFIG_INTERNAL_TLS) +CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \ + -DCONFIG_TLS_INTERNAL_CLIENT +SRCS+= asn1.c \ + bignum.c \ + crypto_internal-cipher.c \ + crypto_internal-modexp.c \ + crypto_internal-rsa.c \ + pkcs1.c \ + pkcs5.c \ + pkcs8.c \ + rsa.c \ + tls_internal.c \ + tlsv1_common.c \ + tlsv1_record.c \ + tlsv1_cred.c \ + tlsv1_client.c \ + tlsv1_client_write.c \ + tlsv1_client_read.c \ + x509v3.c +NEED_DES=y +NEED_MD4=y +NEED_RC4=y +.else +CFLAGS+=-DEAP_TLS_OPENSSL +SRCS+= tls_openssl.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_AES) +SRCS+= aes-internal.c \ + aes-internal-dec.c \ + aes-internal-enc.c +.endif + +.if defined(NEED_AES_CBC) +SRCS+= aes-cbc.c +.endif + +.if defined(NEED_AES_EAX) +SRCS+= aes-eax.c +NEED_AES_CTR=y +.endif + +.if defined(NEED_AES_CTR) +SRCS+= aes-ctr.c +.endif + +.if defined(NEED_AES_ENCBLOCK) +SRCS+= aes-encblock.c +.endif + +.if defined(NEED_AES_OMAC1) +SRCS+= aes-omac1.c +.endif + +.if defined(NEED_DES) +.if defined(CONFIG_INTERNAL_DES) +SRCS+= des-internal.c +.endif +.endif + +.if defined(NEED_MD4) +.if defined(CONFIG_INTERNAL_MD4) +SRCS+= md4-internal.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_MD5) +SRCS+= md5-internal.c +.endif + +.if defined(NEED_FIPS186_2_PRF) +.if defined(CONFIG_INTERNAL_SHA1) +SRCS+= fips_prf_internal.c +.else +SRCS+= fips_prf_openssl.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_RC4) +SRCS+= rc4.c +.endif + +.if defined(CONFIG_INTERNAL_SHA1) +SRCS+= sha1-internal.c +.endif + +.if defined(NEED_SHA256) +CFLAGS+=-DCONFIG_SHA256 +SRCS+= sha256.c +.if defined(CONFIG_INTERNAL_SHA256) +SRCS+= sha256-internal.c +.endif +.endif + +.if defined(NEED_TLS_PRF) +SRCS+= sha1-tlsprf.c +.endif Modified: head/usr.sbin/wpa/hostapd/Makefile ============================================================================== --- head/usr.sbin/wpa/hostapd/Makefile Sat Apr 28 11:02:32 2012 (r234758) +++ head/usr.sbin/wpa/hostapd/Makefile Sat Apr 28 11:11:53 2012 (r234759) @@ -11,10 +11,10 @@ SRCS= accounting.c \ ap_drv_ops.c \ ap_mlme.c \ authsrv.c \ + base64.c \ chap.c \ common.c \ config_file.c \ - crypto_openssl.c \ ctrl_iface.c \ ctrl_iface_ap.c \ drivers.c \ @@ -42,7 +42,6 @@ SRCS= accounting.c \ radius.c \ radius_client.c \ sha1-pbkdf2.c \ - sha1-tlsprf.c \ sha1.c \ sta_info.c \ tkip_countermeasures.c \ @@ -73,8 +72,8 @@ CFLAGS+=-DCONFIG_DRIVER_BSD \ CFLAGS+= -DCONFIG_IPV6 .endif #CFLAGS+= -g -DPADD+= ${LIBPCAP} ${LIBSSL} -LDADD+= -lpcap -lssl +DPADD+= ${LIBPCAP} +LDADD+= -lpcap # User customizations for wpa_supplicant/hostapd build environment CFLAGS+=${HOSTAPD_CFLAGS} @@ -82,8 +81,6 @@ CFLAGS+=${HOSTAPD_CFLAGS} LDADD+=${HOSTAPD_LDADD} #LDFLAGS+=${HOSTAPD_LDFLAGS} -.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) - CFLAGS+=-DDPKCS12_FUNCS \ -DEAP_SERVER \ -DEAP_SERVER_GTC \ @@ -103,33 +100,32 @@ SRCS+= dump_state.c \ eap_server_peap.c \ eap_server_tls.c \ eap_server_tls_common.c \ - eap_server_ttls.c \ - tls_openssl.c + eap_server_ttls.c +TLS_FUNCS=y +NEED_SHA256=y .if !empty(CFLAGS:M*-DEAP_SERVER_AKA) -NEED_SIM_COMMON= true -NEED_SHA256= true SRCS+= eap_server_aka.c +NEED_SIM_COMMON=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_SIM) -NEED_SIM_COMMON= true SRCS+= eap_server_sim.c +NEED_SIM_COMMON=y .endif .if defined(NEED_SIM_COMMON) SRCS+= eap_sim_common.c \ eap_sim_db.c -NEED_AES_CBC= true -NEED_FIPS186_2_PRF= true +NEED_AES_CBC=y +NEED_FIPS186_2_PRF=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 SRCS+= eap_server_gpsk.c \ eap_gpsk_common.c -NEED_SHA256= true -NEED_AES_OMAC1= true +NEED_AES_OMAC1=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_PAX) @@ -142,34 +138,6 @@ SRCS+= eap_server_sake.c \ eap_sake_common.c .endif -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto -.else -NEED_TLS_NONE= true -.endif - -.if defined(NEED_AES_CBC) -SRCS+= aes-cbc.c -.endif - -.if defined(NEED_AES_OMAC1) -SRCS+= aes-omac1.c -.endif - -.if defined(NEED_FIPS186_2_PRF) -SRCS+= fips_prf_openssl.c -.endif - -.if defined(NEED_SHA256) -SRCS+= sha256.c -.endif - -.if defined(NEED_TLS_NONE) -CFLAGS+= -DEAP_TLS_NONE -CFLAGS+= -DINTERNAL_AES -CFLAGS+= -DINTERNAL_SHA1 -CFLAGS+= -DINTERNAL_MD5 -SRCS+= tls_none.c -.endif +.include "${.CURDIR}/../Makefile.crypto" .include Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 11:02:32 2012 (r234758) +++ head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 11:11:53 2012 (r234759) @@ -5,14 +5,7 @@ .PATH.c:${WPA_DISTDIR}/src/drivers PROG= wpa_supplicant -SRCS= aes-cbc.c \ - aes-ctr.c \ - aes-eax.c \ - aes-encblock.c \ - aes-internal.c \ - aes-omac1.c \ - aes-unwrap.c \ - aes-wrap.c \ +SRCS= aes-unwrap.c \ base64.c \ blacklist.c \ bss.c \ @@ -36,8 +29,6 @@ SRCS= aes-cbc.c \ preauth.c \ scan.c \ sha1-pbkdf2.c \ - sha1-tlsprf.c \ - sha1-tprf.c \ sha1.c \ wpa.c \ wpa_common.c \ @@ -78,9 +69,6 @@ LDADD+=${WPA_SUPPLICANT_LDADD} #LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS} .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" - -.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) - CFLAGS+=-DEAP_GTC \ -DEAP_LEAP \ -DEAP_MD5 \ @@ -89,13 +77,9 @@ CFLAGS+=-DEAP_GTC \ -DEAP_PEAP \ -DEAP_PSK \ -DEAP_TLS \ - -DEAP_TLV \ - -DEAP_TLS_FUNCS \ - -DEAP_TLS_OPENSSL \ -DEAP_TTLS \ -DIEEE8021X_EAPOL SRCS+= chap.c \ - crypto_openssl.c \ eap.c \ eap_common.c \ eap_gtc.c \ @@ -113,21 +97,29 @@ SRCS+= chap.c \ eap_ttls.c \ eapol_supp_sm.c \ ms_funcs.c \ - mschapv2.c \ - tls_openssl.c + mschapv2.c +TLS_FUNCS=y +NEED_AES_EAX=y +NEED_AES_ENCBLOCK=y +NEED_AES_OMAC1=y +NEED_SHA256=y +.endif .if !empty(CFLAGS:M*-DEAP_AKA) -NEED_SIM_COMMON= true SRCS+= eap_aka.c +NEED_SIM_COMMON=y +NEED_AES_CBC=y .endif .if !empty(CFLAGS:M*-DEAP_SIM) -NEED_SIM_COMMON= true SRCS+= eap_sim.c +NEED_SIM_COMMON=y +NEED_AES_CBC=y .endif .if defined(NEED_SIM_COMMON) SRCS+= eap_sim_common.c +NEED_FIPS186_2_PRF=y .endif # PC/SC interface for smartcards (USIM, GSM SIM) @@ -147,7 +139,7 @@ LDADD+=-lpcsclite -lpthread CFLAGS+=-DEAP_GPSK_SHA256 SRCS+= eap_gpsk.c \ eap_gpsk_common.c -NEED_SHA256= true +NEED_AES_OMAC1=y .endif .if !empty(CFLAGS:M*-DEAP_PAX) @@ -160,32 +152,6 @@ SRCS+= eap_sake.c \ eap_sake_common.c .endif -NEED_LIBSSL= true -.else -CFLAGS+= -DEAP_TLS_NONE -SRCS+= tls_none.c -.endif - -.endif - -# -# Configure crypto/cipher support. -# -# EAPOL support requires openssl in which case we use their -# cipher code. Otherwise we use our internal versions. -# -.if !defined(NEED_LIBSSL) -CFLAGS+= -DINTERNAL_AES -CFLAGS+= -DINTERNAL_SHA1 -CFLAGS+= -DINTERNAL_MD5 -.else -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto -.endif - -.if defined(NEED_SHA256) -CFLAGS+=-DINTERNAL_SHA256 -SRCS+= sha256.c -.endif +.include "${.CURDIR}/../Makefile.crypto" .include From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 14:42:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0C071065670; Sat, 28 Apr 2012 14:42:49 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBD7A8FC0C; Sat, 28 Apr 2012 14:42:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SEgnIj065633; Sat, 28 Apr 2012 14:42:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SEgnRV065631; Sat, 28 Apr 2012 14:42:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204281442.q3SEgnRV065631@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Apr 2012 14:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234760 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 14:42:49 -0000 Author: nwhitehorn Date: Sat Apr 28 14:42:49 2012 New Revision: 234760 URL: http://svn.freebsd.org/changeset/base/234760 Log: Fix build on 32-bit systems. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Sat Apr 28 11:11:53 2012 (r234759) +++ head/sys/powerpc/aim/moea64_native.c Sat Apr 28 14:42:49 2012 (r234760) @@ -174,7 +174,7 @@ TLBIE(uint64_t vpn) { ptesync;" : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1) : "memory"); - intr_enable(); + intr_restore(intr); #endif /* No barriers or special ops -- taken care of by ptesync above */ From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 16:32:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4843106566B; Sat, 28 Apr 2012 16:32:49 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B06C48FC0C; Sat, 28 Apr 2012 16:32:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SGWn70069455; Sat, 28 Apr 2012 16:32:49 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SGWnbL069453; Sat, 28 Apr 2012 16:32:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204281632.q3SGWnbL069453@svn.freebsd.org> From: Michael Tuexen Date: Sat, 28 Apr 2012 16:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234762 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 16:32:49 -0000 Author: tuexen Date: Sat Apr 28 16:32:49 2012 New Revision: 234762 URL: http://svn.freebsd.org/changeset/base/234762 Log: Whitespace changes. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sat Apr 28 16:28:00 2012 (r234761) +++ head/sys/netinet/sctp_usrreq.c Sat Apr 28 16:32:49 2012 (r234762) @@ -79,7 +79,6 @@ sctp_init(void) * now I will just copy. */ SCTP_BASE_SYSCTL(sctp_recvspace) = SCTP_BASE_SYSCTL(sctp_sendspace); - SCTP_BASE_VAR(first_time) = 0; SCTP_BASE_VAR(sctp_pcb_initialized) = 0; sctp_pcb_init(); @@ -88,8 +87,6 @@ sctp_init(void) SCTP_BASE_VAR(packet_log_end) = 0; bzero(&SCTP_BASE_VAR(packet_log_buffer), SCTP_PACKET_LOG_SIZE); #endif - - } void From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 18:56:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B6CB3106564A; Sat, 28 Apr 2012 18:56:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2CF18FC0A; Sat, 28 Apr 2012 18:56:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SIuHRM075749; Sat, 28 Apr 2012 18:56:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SIuHgI075747; Sat, 28 Apr 2012 18:56:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204281856.q3SIuHgI075747@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 18:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234768 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 18:56:17 -0000 Author: adrian Date: Sat Apr 28 18:56:17 2012 New Revision: 234768 URL: http://svn.freebsd.org/changeset/base/234768 Log: Although not strictly needed, quieten a compiler warning by a user. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 18:46:48 2012 (r234767) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 18:56:17 2012 (r234768) @@ -815,7 +815,7 @@ ar5416AniGetListenTime(struct ath_hal *a { struct ath_hal_5212 *ahp = AH5212(ah); struct ar5212AniState *aniState = NULL; - int32_t listenTime; + int32_t listenTime = 0; int good; HAL_SURVEY_SAMPLE hs; HAL_CHANNEL_SURVEY *cs = AH_NULL; From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 18:57:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AEC9106566B; Sat, 28 Apr 2012 18:57:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D7098FC14; Sat, 28 Apr 2012 18:57:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SIvSKV075826; Sat, 28 Apr 2012 18:57:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SIvSFQ075823; Sat, 28 Apr 2012 18:57:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204281857.q3SIvSFQ075823@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 28 Apr 2012 18:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234769 - head/lib/libc/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 18:57:28 -0000 Author: kib Date: Sat Apr 28 18:57:27 2012 New Revision: 234769 URL: http://svn.freebsd.org/changeset/base/234769 Log: Fix several memory and lock leaks on the out of memory condition. Reported by: Matt Miller MFC after: 1 week Modified: head/lib/libc/rpc/svc.c head/lib/libc/rpc/svc_raw.c Modified: head/lib/libc/rpc/svc.c ============================================================================== --- head/lib/libc/rpc/svc.c Sat Apr 28 18:56:17 2012 (r234768) +++ head/lib/libc/rpc/svc.c Sat Apr 28 18:57:27 2012 (r234769) @@ -108,8 +108,10 @@ xprt_register(xprt) if (__svc_xports == NULL) { __svc_xports = (SVCXPRT **) mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); - if (__svc_xports == NULL) + if (__svc_xports == NULL) { + rwlock_unlock(&svc_fd_lock); return; + } memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); } if (sock < FD_SETSIZE) { @@ -565,8 +567,14 @@ svc_xprt_alloc() SVCXPRT_EXT *ext; xprt = mem_alloc(sizeof(SVCXPRT)); + if (xprt == NULL) + return (NULL); memset(xprt, 0, sizeof(SVCXPRT)); ext = mem_alloc(sizeof(SVCXPRT_EXT)); + if (ext == NULL) { + mem_free(xprt, sizeof(SVCXPRT)); + return (NULL); + } memset(ext, 0, sizeof(SVCXPRT_EXT)); xprt->xp_p3 = ext; ext->xp_auth.svc_ah_ops = &svc_auth_null_ops; Modified: head/lib/libc/rpc/svc_raw.c ============================================================================== --- head/lib/libc/rpc/svc_raw.c Sat Apr 28 18:56:17 2012 (r234768) +++ head/lib/libc/rpc/svc_raw.c Sat Apr 28 18:57:27 2012 (r234769) @@ -96,10 +96,22 @@ svc_raw_create() mutex_unlock(&svcraw_lock); return (NULL); } - if (__rpc_rawcombuf == NULL) + if (__rpc_rawcombuf == NULL) { __rpc_rawcombuf = calloc(UDPMSGSIZE, sizeof (char)); + if (__rpc_rawcombuf == NULL) { + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } + } srp->raw_buf = __rpc_rawcombuf; /* Share it with the client */ srp->server = svc_xprt_alloc(); + if (srp->server == NULL) { + free(__rpc_rawcombuf); + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } svc_raw_private = srp; } srp->server->xp_fd = FD_SETSIZE; From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 20:23:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9EFE3106564A; Sat, 28 Apr 2012 20:23:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A7F78FC15; Sat, 28 Apr 2012 20:23:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SKNEZk078938; Sat, 28 Apr 2012 20:23:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SKNEFQ078936; Sat, 28 Apr 2012 20:23:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201204282023.q3SKNEFQ078936@svn.freebsd.org> From: Glen Barber Date: Sat, 28 Apr 2012 20:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234770 - head/sbin/geom/class/eli X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 20:23:14 -0000 Author: gjb (doc committer) Date: Sat Apr 28 20:23:13 2012 New Revision: 234770 URL: http://svn.freebsd.org/changeset/base/234770 Log: As of r226840, GELI starts one thread per CPU. PR: 167382 Submitted by: John W. O'Brien (john%saltant.com) X-Needs-MFC: r226840 Modified: head/sbin/geom/class/eli/geli.8 Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Sat Apr 28 18:57:27 2012 (r234769) +++ head/sbin/geom/class/eli/geli.8 Sat Apr 28 20:23:13 2012 (r234770) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2012 +.Dd April 28, 2012 .Dt GELI 8 .Os .Sh NAME @@ -692,7 +692,6 @@ This variable should be set in Specifies how many kernel threads should be used for doing software cryptography. Its purpose is to increase performance on SMP systems. -If hardware acceleration is available, only one thread will be started. If set to 0, a CPU-pinned thread will be started for every active CPU. .It Va kern.geom.eli.batch : No 0 When set to 1, can speed-up crypto operations by using batching. From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 20:52:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13054106564A; Sat, 28 Apr 2012 20:52:21 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFBF58FC0A; Sat, 28 Apr 2012 20:52:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SKqKjZ079999; Sat, 28 Apr 2012 20:52:20 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SKqKoF079989; Sat, 28 Apr 2012 20:52:20 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201204282052.q3SKqKoF079989@svn.freebsd.org> From: Jeremie Le Hen Date: Sat, 28 Apr 2012 20:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234772 - in head: lib lib/libc/stdio lib/libstdbuf usr.bin usr.bin/stdbuf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 20:52:21 -0000 Author: jlh Date: Sat Apr 28 20:52:20 2012 New Revision: 234772 URL: http://svn.freebsd.org/changeset/base/234772 Log: Import stdbuf(1) and the shared library it relies on. This tool changes the default buffering behaviour of standard stdio streams. It only works on dynamic binaries. To make it work for static ones it would require cluttering stdio because there no single entry point. PR: 166660 Reviewed by: current@, jhb Approved by: kib (mentor) MFC after: 1 week Added: head/lib/libstdbuf/ head/lib/libstdbuf/Makefile (contents, props changed) head/lib/libstdbuf/libstdbuf.3 (contents, props changed) head/lib/libstdbuf/stdbuf.c (contents, props changed) head/usr.bin/stdbuf/ head/usr.bin/stdbuf/Makefile (contents, props changed) head/usr.bin/stdbuf/stdbuf.1 (contents, props changed) head/usr.bin/stdbuf/stdbuf.c (contents, props changed) Modified: head/lib/Makefile head/lib/libc/stdio/setbuf.3 head/usr.bin/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Apr 28 20:34:14 2012 (r234771) +++ head/lib/Makefile Sat Apr 28 20:52:20 2012 (r234772) @@ -104,6 +104,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libsmdb} \ ${_libsmutil} \ libstand \ + libstdbuf \ libstdthreads \ ${_libtelnet} \ ${_libthr} \ Modified: head/lib/libc/stdio/setbuf.3 ============================================================================== --- head/lib/libc/stdio/setbuf.3 Sat Apr 28 20:34:14 2012 (r234771) +++ head/lib/libc/stdio/setbuf.3 Sat Apr 28 20:52:20 2012 (r234772) @@ -83,6 +83,9 @@ normally does) it is line buffered. The standard error stream .Dv stderr is always unbuffered. +Note that these defaults maybe be altered using the +.Xr stdbuf 1 +utility. .Pp The .Fn setvbuf @@ -177,6 +180,7 @@ function returns what the equivalent .Fn setvbuf would have returned. .Sh SEE ALSO +.Xr stdbuf 1 , .Xr fclose 3 , .Xr fopen 3 , .Xr fread 3 , Added: head/lib/libstdbuf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdbuf/Makefile Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include + +LIB= stdbuf +SRCS= stdbuf.c +SHLIB_MAJOR= 1 +MAN= libstdbuf.3 + +WARNS?= 6 + +.include Added: head/lib/libstdbuf/libstdbuf.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdbuf/libstdbuf.3 Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,102 @@ +.\" Copyright (c) 2012 Jeremie Le Hen +.\" 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 and documentation must retain the above +.\" copyright notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 28, 2012 +.Dt LIBSTDBUF 3 +.Os +.Sh NAME +.Nm libstdbuf +.Nd preloaded library to change standard streams initial buffering +.Sh DESCRIPTION +The +.Nm +library is meant to be preloaded with the +.Ev LD_PRELOAD +environment variable to as to change the initial buffering +of standard input, standard output and standard error streams. +.Pp +Although you may load and configure this library manually, +an utility, +.Xr stdbuf 1 , +can be used to run a command with the appropriate environment variables. +.Sh ENVIRONMENT +Each stream can be configured indepentently through the following +environment variables (values are defined below): +.Bl -tag -width size -offset indent +.It Ev _STDBUF_I +Initial buffering definition for the standard input stream +.It Ev _STDBUF_O +Initial buffering definition for the standard output stream +.It Ev _STDBUF_E +Initial buffering definition for the standard error stream +.El +.Pp +Each variable may take one of the following values: +.Bl -tag -width size -offset indent +.It Qq 0 +unbuffered +.It Qq L +line buffered +.It Qq B +fully buffered with the default buffer size +.It Ar size +fully buffered with a buffer of +.Ar size +bytes (suffixes 'k', 'M' and 'G' are accepted) +.El +.Sh EXAMPLE +In the following example, the stdout stream of the +.Xr awk 1 +command +will be fully buffered by default because it does not refer +to a terminal. +.Nm +is used to force it to be line-buffered so +.Xr vmstat 8 Ns 's +output will not stall until the full buffer fills. +.Bd -literal -offset indent +# vmstat 1 | LD_PRELOAD=/usr/lib/libstdbuf.so \\ + STDBUF_1=L awk '$2 > 1 || $3 > 1' | cat -n +.Ed +.Pp +See also the manpage of +.Xr stdbuf 1 +for a simpler way to do this. +.Sh HISTORY +The +.Nm +library first appeared in +.Fx 8.4 . +.Sh AUTHORS +.An -nosplit +The original idea of the +.Nm +command comes from +.An Padraig Brady +who implemented it in the GNU coreutils. +.An Jeremie Le Hen +implemented it on +.Fx . Added: head/lib/libstdbuf/stdbuf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdbuf/stdbuf.c Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,115 @@ +/*- + * Copyright (c) 2012 Jeremie Le Hen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +static const char * +stream_name(FILE *s) +{ + + if (s == stdin) + return "stdin"; + if (s == stdout) + return "stdout"; + if (s == stderr) + return "stderr"; + /* This should not happen. */ + abort(); +} + +static void +change_buf(FILE *s, const char *bufmode) +{ + char *unit; + size_t bufsize; + int mode; + + bufsize = 0; + if (bufmode[0] == '0' && bufmode[1] == '\0') + mode = _IONBF; + else if (bufmode[0] == 'L' && bufmode[1] == '\0') + mode = _IOLBF; + else if (bufmode[0] == 'B' && bufmode[1] == '\0') { + mode = _IOFBF; + bufsize = 0; + } else { + /* + * This library being preloaded, depending on libutil + * would lead to excessive namespace pollution. + * Thus we do not use expand_number(). + */ + errno = 0; + bufsize = strtol(bufmode, &unit, 0); + if (errno == EINVAL || errno == ERANGE || unit == bufmode) + warn("Wrong buffer mode '%s' for %s", bufmode, + stream_name(s)); + switch (*unit) { + case 'G': + bufsize *= 1024 * 1024 * 1024; + break; + case 'M': + bufsize *= 1024 * 1024; + break; + case 'k': + bufsize *= 1024; + break; + case '\0': + break; + default: + warnx("Unknown suffix '%c' for %s", *unit, + stream_name(s)); + return; + } + mode = _IOFBF; + } + if (setvbuf(s, NULL, mode, bufsize) != 0) + warn("Cannot set buffer mode '%s' for %s", bufmode, + stream_name(s)); +} + +__attribute__ ((constructor)) static void +stdbuf(void) +{ + char *i_mode, *o_mode, *e_mode; + + i_mode = getenv("_STDBUF_I"); + o_mode = getenv("_STDBUF_O"); + e_mode = getenv("_STDBUF_E"); + + if (e_mode != NULL) + change_buf(stderr, e_mode); + if (i_mode != NULL) + change_buf(stdin, i_mode); + if (o_mode != NULL) + change_buf(stdout, o_mode); +} Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Apr 28 20:34:14 2012 (r234771) +++ head/usr.bin/Makefile Sat Apr 28 20:52:20 2012 (r234772) @@ -143,6 +143,7 @@ SUBDIR= alias \ sockstat \ split \ stat \ + stdbuf \ su \ systat \ tabs \ Added: head/usr.bin/stdbuf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/stdbuf/Makefile Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +PROG= stdbuf +SRCS= stdbuf.c + +WARNS?= 6 + +.include Added: head/usr.bin/stdbuf/stdbuf.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/stdbuf/stdbuf.1 Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,116 @@ +.\" Copyright (c) 2012 Jeremie Le Hen +.\" 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 and documentation must retain the above +.\" copyright notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 28, 2012 +.Dt STDBUF 1 +.Os +.Sh NAME +.Nm stdbuf +.Nd change standard streams initial buffering +.Sh SYNOPSIS +.Nm +.Op Fl e Ar bufdef +.Op Fl i Ar bufdef +.Op Fl o Ar bufdef +.Op Ar command Op ... +.Sh DESCRIPTION +.Nm +is used to change the initial buffering of standard input, +standard output and/or standard error streams for +.Ar command . +It relies on +.Xr libstdbuf 3 +which is loaded and configured by +.Nm +through environment variables. +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl e Ar bufdef +Set initial buffering of the standard error stream for +.Ar command +as defined by +.Ar bufdef +.Pq see Sx BUFFER DEFINITION . +.It Fl i Ar bufdef +Set initial buffering of the standard input stream for +.Ar command +as defined by +.Ar bufdef +.Pq see Sx BUFFER DEFINITION . +.It Fl o Ar bufdef +Set initial buffering of the standard output stream for +.Ar command +as defined by +.Ar bufdef +.Pq see Sx BUFFER DEFINITION . +.El +.Sh BUFFER DEFINITION +Buffer definition is the same as in +.Xr libstdbuf 3 : +.Bl -tag -width size -offset indent +.It Qq 0 +unbuffered +.It Qq L +line buffered +.It Qq B +fully buffered with the default buffer size +.It Ar size +fully buffered with a buffer of +.Ar size +bytes (suffixes 'k', 'M' and 'G' are accepted) +.El +.Sh EXAMPLES +In the following example, the stdout stream of the +.Xr awk 1 +command +will be fully buffered by default because it does not refer +to a terminal. +.Nm +is used to force it to be line-buffered so +.Xr vmstat 8 Ns 's +output will not stall until the full buffer fills. +.Bd -literal -offset indent +# vmstat 1 | stdbuf -o L awk '$2 > 1 || $3 > 1' | cat -n +.Ed +.Sh SEE ALSO +.Xr libstdbuf 3 , +.Xr setvbuf 3 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 8.4 . +.Sh AUTHORS +.An -nosplit +The original idea of the +.Nm +command comes from +.An Padraig Brady +who implemented it in the GNU coreutils. +.An Jeremie Le Hen +implemented it on +.Fx . Added: head/usr.bin/stdbuf/stdbuf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/stdbuf/stdbuf.c Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,104 @@ +/*- + * Copyright (c) 2012 Jeremie Le Hen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include + +#define LIBSTDBUF "/usr/lib/libstdbuf.so" + +extern char *__progname; + +static void +usage(int s) +{ + + fprintf(stderr, "Usage: %s [-e 0|L|] [-i 0|L|] [-o 0|L|] " + " [args ...]\n", __progname); + exit(s); +} + +int +main(int argc, char *argv[]) +{ + char *ibuf, *obuf, *ebuf; + char *preload0, *preload1; + int i; + + ibuf = obuf = ebuf = NULL; + while ((i = getopt(argc, argv, ":e:i:o:")) != -1) { + switch (i) { + case 'e': + ebuf = optarg; + break; + case 'i': + ibuf = optarg; + break; + case 'o': + obuf = optarg; + break; + case ':': + warnx("Missing argument for option -%c", optopt); + usage(1); + break; + case '?': + default: + warnx("Unknown option: %c", optopt); + usage(1); + break; + } + } + argc -= optind; + argv += optind; + if (argc < 2) + usage(0); + + if (ibuf != NULL && setenv("_STDBUF_I", ibuf, 1) == -1) + warn("Failed to set environment variable: %s=%s", + "_STDBUF_I", ibuf); + if (obuf != NULL && setenv("_STDBUF_O", obuf, 1) == -1) + warn("Failed to set environment variable: %s=%s", + "_STDBUF_O", obuf); + if (ebuf != NULL && setenv("_STDBUF_E", ebuf, 1) == -1) + warn("Failed to set environment variable: %s=%s", + "_STDBUF_E", ebuf); + + preload0 = getenv("LD_PRELOAD"); + if (preload0 == NULL) + i = asprintf(&preload1, "LD_PRELOAD=" LIBSTDBUF); + else + i = asprintf(&preload1, "LD_PRELOAD=%s:%s", preload0, + LIBSTDBUF); + + if (i < 0 || putenv(preload1) == -1) + warn("Failed to set environment variable: %s", preload1); + + execvp(argv[0], argv); + err(2, "%s", argv[0]); +} From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 21:50:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1AE3C106566C; Sat, 28 Apr 2012 21:50:31 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05AF48FC15; Sat, 28 Apr 2012 21:50:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SLoUwa082019; Sat, 28 Apr 2012 21:50:30 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SLoUI3082016; Sat, 28 Apr 2012 21:50:30 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201204282150.q3SLoUI3082016@svn.freebsd.org> From: Jeremie Le Hen Date: Sat, 28 Apr 2012 21:50:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234773 - in head/lib: libc/stdio libstdbuf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 21:50:31 -0000 Author: jlh Date: Sat Apr 28 21:50:30 2012 New Revision: 234773 URL: http://svn.freebsd.org/changeset/base/234773 Log: Fix small documentation mistakes. Submitted by: brueffer Approved by: kib (mentor) Modified: head/lib/libc/stdio/setbuf.3 head/lib/libstdbuf/libstdbuf.3 Modified: head/lib/libc/stdio/setbuf.3 ============================================================================== --- head/lib/libc/stdio/setbuf.3 Sat Apr 28 20:52:20 2012 (r234772) +++ head/lib/libc/stdio/setbuf.3 Sat Apr 28 21:50:30 2012 (r234773) @@ -83,7 +83,7 @@ normally does) it is line buffered. The standard error stream .Dv stderr is always unbuffered. -Note that these defaults maybe be altered using the +Note that these defaults may be altered using the .Xr stdbuf 1 utility. .Pp Modified: head/lib/libstdbuf/libstdbuf.3 ============================================================================== --- head/lib/libstdbuf/libstdbuf.3 Sat Apr 28 20:52:20 2012 (r234772) +++ head/lib/libstdbuf/libstdbuf.3 Sat Apr 28 21:50:30 2012 (r234773) @@ -43,7 +43,7 @@ an utility, .Xr stdbuf 1 , can be used to run a command with the appropriate environment variables. .Sh ENVIRONMENT -Each stream can be configured indepentently through the following +Each stream can be configured independently through the following environment variables (values are defined below): .Bl -tag -width size -offset indent .It Ev _STDBUF_I From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 22:03:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F18E106566B; Sat, 28 Apr 2012 22:03:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4A08FC0A; Sat, 28 Apr 2012 22:03:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SM3Kpe082554; Sat, 28 Apr 2012 22:03:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SM3KPY082548; Sat, 28 Apr 2012 22:03:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204282203.q3SM3KPY082548@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 22:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234774 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 22:03:20 -0000 Author: adrian Date: Sat Apr 28 22:03:19 2012 New Revision: 234774 URL: http://svn.freebsd.org/changeset/base/234774 Log: After thinking about this a bit more, let's not keep statistics per-channel in the HAL. That's very memory hungry (32k just for channel statistics) which would be better served by keeping a summary in the ANI state. Or, later, keep a survey history in net80211. So: * Migrate the ah_chansurvey array to be a single entry, for the current channel. * Change the ioctl interface and ANI code to just reference that. * Clear the ah_chansurvey array during channel reset, both in the AR5212 and AR5416 reset path. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sat Apr 28 22:03:19 2012 (r234774) @@ -320,7 +320,7 @@ struct ath_hal_5212 { struct ar5212AniParams ah_aniParams5; /* 5GHz parameters */ struct ar5212AniState *ah_curani; /* cached last reference */ struct ar5212AniState ah_ani[AH_MAXCHAN]; /* per-channel state */ - HAL_CHANNEL_SURVEY ah_chansurvey[AH_MAXCHAN]; /* channel survey */ + HAL_CHANNEL_SURVEY ah_chansurvey; /* channel survey */ /* AR5416 uses some of the AR5212 ANI code; these are the ANI methods */ HAL_BOOL (*ah_aniControl) (struct ath_hal *, HAL_ANI_CMD cmd, int param); Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Apr 28 22:03:19 2012 (r234774) @@ -1092,10 +1092,7 @@ ar5212GetDiagState(struct ath_hal *ah, i } break; case HAL_DIAG_CHANSURVEY: - if (AH_PRIVATE(ah)->ah_curchan == NULL) - return AH_FALSE; - *result = - &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata]; + *result = &ahp->ah_chansurvey; *resultsize = sizeof(HAL_CHANNEL_SURVEY); return AH_TRUE; } Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Sat Apr 28 22:03:19 2012 (r234774) @@ -195,6 +195,9 @@ ar5212Reset(struct ath_hal *ah, HAL_OPMO saveFrameSeqCount = OS_REG_READ(ah, AR_D_SEQNUM); } else saveFrameSeqCount = 0; /* NB: silence compiler */ + + /* Blank the channel survey statistics */ + OS_MEMZERO(&ahp->ah_chansurvey, sizeof(ahp->ah_chansurvey)); #if 0 /* * XXX disable for now; this appears to sometimes cause OFDM Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 22:03:19 2012 (r234774) @@ -827,10 +827,8 @@ ar5416AniGetListenTime(struct ath_hal *a ath_hal_printf(ah, "%s: ah_curchan = NULL?\n", __func__); return (0); } - /* XXX bounds check? */ - if (AH_PRIVATE(ah)->ah_curchan != AH_NULL) - cs = - &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata]; + + cs = &ahp->ah_chansurvey; /* * Fetch the current statistics, squirrel away the current Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat Apr 28 22:03:19 2012 (r234774) @@ -118,6 +118,9 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO } HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1); + /* Blank the channel survey statistics */ + OS_MEMZERO(&ahp->ah_chansurvey, sizeof(ahp->ah_chansurvey)); + /* XXX Turn on fast channel change for 5416 */ /* * Preserve the bmiss rssi threshold and count threshold From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 22:48:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 323D6106564A; Sat, 28 Apr 2012 22:48:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D8998FC0C; Sat, 28 Apr 2012 22:48:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SMm0IP084180; Sat, 28 Apr 2012 22:48:00 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SMm0OU084178; Sat, 28 Apr 2012 22:48:00 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201204282248.q3SMm0OU084178@svn.freebsd.org> From: Glen Barber Date: Sat, 28 Apr 2012 22:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234775 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 22:48:01 -0000 Author: gjb (doc committer) Date: Sat Apr 28 22:48:00 2012 New Revision: 234775 URL: http://svn.freebsd.org/changeset/base/234775 Log: As cron(8) is started with '-s' by default, timezones that observe DST should not need to worry about scheduling jobs when the DST time changes. Rather than removing the BUGS section in crontab(5) regarding this, note that disabling '-s' may still cause jobs to be executed twice or not at all. PR: 166318 Submitted by: Florian k Unglaub (f.unglaub%googlemail!com) MFC After: 1 week Modified: head/usr.sbin/cron/crontab/crontab.5 Modified: head/usr.sbin/cron/crontab/crontab.5 ============================================================================== --- head/usr.sbin/cron/crontab/crontab.5 Sat Apr 28 22:03:19 2012 (r234774) +++ head/usr.sbin/cron/crontab/crontab.5 Sat Apr 28 22:48:00 2012 (r234775) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2012 +.Dd April 28, 2012 .Dt CRONTAB 5 .Os .Sh NAME @@ -296,10 +296,21 @@ are extensions. .An Paul Vixie Aq paul@vix.com .Sh BUGS If you are in one of the 70-odd countries that observe Daylight -Savings Time, jobs scheduled during the rollback or advance will be -affected. +Savings Time, jobs scheduled during the rollback or advance may be +affected if +.Xr cron 8 +is not started with the +.Fl s +flag. In general, it is not a good idea to schedule jobs during -this period. +this period if +.Xr cron 8 +is not started with the +.Fl s +flag, which is enabled by default. +See +.Xr cron 8 +for more details. .Pp For US timezones (except parts of AZ and HI) the time shift occurs at 2AM local time. From owner-svn-src-head@FreeBSD.ORG Sat Apr 28 23:13:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF6B4106566B; Sat, 28 Apr 2012 23:13:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AADBE8FC12; Sat, 28 Apr 2012 23:13:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SND91W085148; Sat, 28 Apr 2012 23:13:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SND9rU085146; Sat, 28 Apr 2012 23:13:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204282313.q3SND9rU085146@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 23:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234777 - head/tools/tools/ath/athsurvey X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 23:13:09 -0000 Author: adrian Date: Sat Apr 28 23:13:09 2012 New Revision: 234777 URL: http://svn.freebsd.org/changeset/base/234777 Log: Change cc -> bc : "bc" is "busy count", which is the % of time the channel is considered "busy but not doing any active TX or frame RX." Just keep in mind that "frame RX" is "decoding what looks like a wifi signal", not necessarily "frame successfully decoded for this particular device." Modified: head/tools/tools/ath/athsurvey/athsurvey.c Modified: head/tools/tools/ath/athsurvey/athsurvey.c ============================================================================== --- head/tools/tools/ath/athsurvey/athsurvey.c Sat Apr 28 23:05:08 2012 (r234776) +++ head/tools/tools/ath/athsurvey/athsurvey.c Sat Apr 28 23:13:09 2012 (r234777) @@ -201,9 +201,9 @@ main(int argc, char *argv[]) "min " "avg " "max\n"); - printf(" tx%% rx%% cc%% ec%% "); - printf(" tx%% rx%% cc%% ec%% "); - printf(" tx%% rx%% cc%% ec%%\n"); + printf(" tx%% rx%% bc%% ec%% "); + printf(" tx%% rx%% bc%% ec%% "); + printf(" tx%% rx%% bc%% ec%%\n"); } process_survey_stats(&hs); sleep(1);