From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 03:43:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92660106566C; Sun, 15 Jul 2012 03:43:57 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D2BA8FC15; Sun, 15 Jul 2012 03:43: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 q6F3hv5e023958; Sun, 15 Jul 2012 03:43:57 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6F3hv1X023956; Sun, 15 Jul 2012 03:43:57 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201207150343.q6F3hv1X023956@svn.freebsd.org> From: Ken Smith Date: Sun, 15 Jul 2012 03:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238460 - stable/9/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 03:43:57 -0000 Author: kensmith Date: Sun Jul 15 03:43:56 2012 New Revision: 238460 URL: http://svn.freebsd.org/changeset/base/238460 Log: 9.1-BETA1 builds done, shift back to PRERELEASE for the rest of the 9.1 release cycle. Approved by: re (implicit) Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Sat Jul 14 21:28:11 2012 (r238459) +++ stable/9/sys/conf/newvers.sh Sun Jul 15 03:43:56 2012 (r238460) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.1" -BRANCH="BETA1" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 04:15:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15CA51065673; Sun, 15 Jul 2012 04:15:28 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00E7F8FC0C; Sun, 15 Jul 2012 04:15: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 q6F4FRHv025307; Sun, 15 Jul 2012 04:15:27 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6F4FRsP025305; Sun, 15 Jul 2012 04:15:27 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201207150415.q6F4FRsP025305@svn.freebsd.org> From: Alexander Kabaev Date: Sun, 15 Jul 2012 04:15: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: r238461 - head/usr.sbin/pkg X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 04:15:28 -0000 Author: kan Date: Sun Jul 15 04:15:27 2012 New Revision: 238461 URL: http://svn.freebsd.org/changeset/base/238461 Log: Make pkg bootstrap program ask for confirmation before proceeding. The previous behaviour was to silently download and install the pkg package, without ever telling user about what it was doing and why. Discussed with: bapt Reviewed by: kib Modified: head/usr.sbin/pkg/pkg.c Modified: head/usr.sbin/pkg/pkg.c ============================================================================== --- head/usr.sbin/pkg/pkg.c Sun Jul 15 03:43:56 2012 (r238460) +++ head/usr.sbin/pkg/pkg.c Sun Jul 15 04:15:27 2012 (r238461) @@ -389,6 +389,28 @@ cleanup: return (ret); } +static const char confirmation_message[] = +"The package management tool is not yet installed on your system.\n" +"Do you want to fetch and install it now? [y/N]: "; + +static int +pkg_query_yes_no(void) +{ + int ret, c; + + c = getchar(); + + if (c == 'y' || c == 'Y') + ret = 1; + else + ret = 0; + + while (c != '\n' && c != EOF) + c = getchar(); + + return (ret); +} + int main(__unused int argc, char *argv[]) { @@ -397,9 +419,21 @@ main(__unused int argc, char *argv[]) snprintf(pkgpath, MAXPATHLEN, "%s/sbin/pkg", getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE); - if (access(pkgpath, X_OK) == -1) + if (access(pkgpath, X_OK) == -1) { + /* + * Do not ask for confirmation if either of stdin or stdout is + * not tty. Check the environment to see if user has answer + * tucked in there already. + */ + if (getenv("ALWAYS_ASSUME_YES") == NULL && + isatty(fileno(stdin))) { + printf("%s", confirmation_message); + if (pkg_query_yes_no() == 0) + exit(EXIT_FAILURE); + } if (bootstrap_pkg() != 0) exit(EXIT_FAILURE); + } execv(pkgpath, argv); From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 05:24:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83ADC106566B; Sun, 15 Jul 2012 05:24:20 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6498FC08; Sun, 15 Jul 2012 05:24: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 q6F5OKug028082; Sun, 15 Jul 2012 05:24:20 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6F5OKV2028080; Sun, 15 Jul 2012 05:24:20 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207150524.q6F5OKV2028080@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 15 Jul 2012 05:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238462 - stable/9/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 05:24:20 -0000 Author: np Date: Sun Jul 15 05:24:19 2012 New Revision: 238462 URL: http://svn.freebsd.org/changeset/base/238462 Log: MFC r238313: Fix a bug in code that calculates the number of the first interrupt vector for a port. This affected the gigabit ports of T422 cards (the ones with 2x10G ports and 2x1G ports). Approved by: re (kib) Modified: stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Sun Jul 15 04:15:27 2012 (r238461) +++ stable/9/sys/dev/cxgbe/t4_sge.c Sun Jul 15 05:24:19 2012 (r238462) @@ -401,14 +401,16 @@ first_vector(struct port_info *pi) return (0); for_each_port(sc, i) { + struct port_info *p = sc->port[i]; + if (i == pi->port_id) break; #ifdef TCP_OFFLOAD if (sc->flags & INTR_DIRECT) - rc += pi->nrxq + pi->nofldrxq; + rc += p->nrxq + p->nofldrxq; else - rc += max(pi->nrxq, pi->nofldrxq); + rc += max(p->nrxq, p->nofldrxq); #else /* * Not compiled with offload support and intr_count > 1. Only @@ -419,7 +421,7 @@ first_vector(struct port_info *pi) ("%s: intr_count %d, !INTR_DIRECT", __func__, sc->intr_count)); - rc += pi->nrxq; + rc += p->nrxq; #endif } From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 05:35:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48EE8106566B; Sun, 15 Jul 2012 05:35:15 +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 3383E8FC0A; Sun, 15 Jul 2012 05:35: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 q6F5ZFMP028564; Sun, 15 Jul 2012 05:35:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6F5ZENg028556; Sun, 15 Jul 2012 05:35:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207150535.q6F5ZENg028556@svn.freebsd.org> From: Warner Losh Date: Sun, 15 Jul 2012 05:35: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: r238463 - in head/sys/boot/arm/at91: bootspi libat91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 05:35:15 -0000 Author: imp Date: Sun Jul 15 05:35:14 2012 New Revision: 238463 URL: http://svn.freebsd.org/changeset/base/238463 Log: Use the pin number rather than the hybrid pin number + name. Modified: head/sys/boot/arm/at91/bootspi/ee.c head/sys/boot/arm/at91/libat91/at91rm9200.h head/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c head/sys/boot/arm/at91/libat91/eeprom.c head/sys/boot/arm/at91/libat91/emac_init.c head/sys/boot/arm/at91/libat91/lib_AT91RM9200.h head/sys/boot/arm/at91/libat91/spi_flash.c Modified: head/sys/boot/arm/at91/bootspi/ee.c ============================================================================== --- head/sys/boot/arm/at91/bootspi/ee.c Sun Jul 15 05:24:19 2012 (r238462) +++ head/sys/boot/arm/at91/bootspi/ee.c Sun Jul 15 05:35:14 2012 (r238463) @@ -59,11 +59,11 @@ EEInit(void) AT91PS_PIO pPio = (AT91PS_PIO)AT91C_BASE_PIOA; AT91PS_PMC pPMC = (AT91PS_PMC)AT91C_BASE_PMC; - pPio->PIO_ASR = AT91C_PA25_TWD | AT91C_PA26_TWCK; - pPio->PIO_PDR = AT91C_PA25_TWD | AT91C_PA26_TWCK; + pPio->PIO_ASR = AT91C_PIO_PA25 | AT91C_PIO_PA26; + pPio->PIO_PDR = AT91C_PIO_PA25 | AT91C_PIO_PA26; - pPio->PIO_MDDR = ~AT91C_PA25_TWD; - pPio->PIO_MDER = AT91C_PA25_TWD; + pPio->PIO_MDDR = ~AT91C_PIO_PA25; + pPio->PIO_MDER = AT91C_PIO_PA25; pPMC->PMC_PCER = 1u << AT91C_ID_TWI; Modified: head/sys/boot/arm/at91/libat91/at91rm9200.h ============================================================================== --- head/sys/boot/arm/at91/libat91/at91rm9200.h Sun Jul 15 05:24:19 2012 (r238462) +++ head/sys/boot/arm/at91/libat91/at91rm9200.h Sun Jul 15 05:35:14 2012 (r238463) @@ -2311,7 +2311,7 @@ typedef struct _AT91S_BFC { // ========== Register definition for BFC peripheral ========== #define AT91C_BFC_MR ((AT91_REG *) 0xFFFFFFC0) // (BFC) BFC Mode Register -#include +#include // ***************************************************************************** // PERIPHERAL ID DEFINITIONS FOR AT91RM9200 Modified: head/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c ============================================================================== --- head/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c Sun Jul 15 05:24:19 2012 (r238462) +++ head/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c Sun Jul 15 05:35:14 2012 (r238463) @@ -188,8 +188,8 @@ _init(void) AT91C_BASE_PIOC->PIO_PDR = 0xffff0000; #endif // Configure DBGU -use local routine optimized for space - AT91C_BASE_PIOA->PIO_ASR = AT91C_PA31_DTXD | AT91C_PA30_DRXD; - AT91C_BASE_PIOA->PIO_PDR = AT91C_PA31_DTXD | AT91C_PA30_DRXD; + AT91C_BASE_PIOA->PIO_ASR = AT91C_PIO_PA31 | AT91C_PIO_PA30; + AT91C_BASE_PIOA->PIO_PDR = AT91C_PIO_PA31 | AT91C_PIO_PA30; pUSART->US_IDR = (unsigned int) -1; pUSART->US_CR = AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RXDIS | AT91C_US_TXDIS; Modified: head/sys/boot/arm/at91/libat91/eeprom.c ============================================================================== --- head/sys/boot/arm/at91/libat91/eeprom.c Sun Jul 15 05:24:19 2012 (r238462) +++ head/sys/boot/arm/at91/libat91/eeprom.c Sun Jul 15 05:35:14 2012 (r238463) @@ -58,11 +58,11 @@ InitEEPROM(void) AT91PS_PIO pPio = (AT91PS_PIO)AT91C_BASE_PIOA; AT91PS_PMC pPMC = (AT91PS_PMC)AT91C_BASE_PMC; - pPio->PIO_ASR = AT91C_PA25_TWD | AT91C_PA26_TWCK; - pPio->PIO_PDR = AT91C_PA25_TWD | AT91C_PA26_TWCK; + pPio->PIO_ASR = AT91C_PIO_PA25 | AT91C_PIO_PA26; + pPio->PIO_PDR = AT91C_PIO_PA25 | AT91C_PIO_PA26; - pPio->PIO_MDDR = ~AT91C_PA25_TWD; - pPio->PIO_MDER = AT91C_PA25_TWD; + pPio->PIO_MDDR = ~AT91C_PIO_PA25; + pPio->PIO_MDER = AT91C_PIO_PA25; pPMC->PMC_PCER = 1u << AT91C_ID_TWI; Modified: head/sys/boot/arm/at91/libat91/emac_init.c ============================================================================== --- head/sys/boot/arm/at91/libat91/emac_init.c Sun Jul 15 05:24:19 2012 (r238462) +++ head/sys/boot/arm/at91/libat91/emac_init.c Sun Jul 15 05:35:14 2012 (r238463) @@ -85,24 +85,24 @@ EMAC_SetMACAddress(unsigned char mac[6]) AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_EMAC; AT91C_BASE_PIOA->PIO_ASR = - AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | - AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | - AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | - AT91C_PA7_ETXCK_EREFCK; + AT91C_PIO_PA14 | AT91C_PIO_PA12 | AT91C_PIO_PA13 | + AT91C_PIO_PA8 | AT91C_PIO_PA16 | AT91C_PIO_PA9 | + AT91C_PIO_PA10 | AT91C_PIO_PA11 | AT91C_PIO_PA15 | + AT91C_PIO_PA7; AT91C_BASE_PIOA->PIO_PDR = - AT91C_PA14_ERXER | AT91C_PA12_ERX0 | AT91C_PA13_ERX1 | - AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | - AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | - AT91C_PA7_ETXCK_EREFCK; + AT91C_PIO_PA14 | AT91C_PIO_PA12 | AT91C_PIO_PA13 | + AT91C_PIO_PA8 | AT91C_PIO_PA16 | AT91C_PIO_PA9 | + AT91C_PIO_PA10 | AT91C_PIO_PA11 | AT91C_PIO_PA15 | + AT91C_PIO_PA7; #if defined(BOOT_KB920X) | defined(BOOT_BWCT) /* Really !RMII */ AT91C_BASE_PIOB->PIO_BSR = - AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | - AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | - AT91C_PB18_ECOL | AT91C_PB19_ERXCK; + AT91C_PIO_PB12 | AT91C_PIO_PB13 | AT91C_PIO_PB14 | + AT91C_PIO_PB15 | AT91C_PIO_PB16 | AT91C_PIO_PB17 | + AT91C_PIO_PB18 | AT91C_PIO_PB19; AT91C_BASE_PIOB->PIO_PDR = - AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | - AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | - AT91C_PB18_ECOL | AT91C_PB19_ERXCK; + AT91C_PIO_PB12 | AT91C_PIO_PB13 | AT91C_PIO_PB14 | + AT91C_PIO_PB15 | AT91C_PIO_PB16 | AT91C_PIO_PB17 | + AT91C_PIO_PB18 | AT91C_PIO_PB19; #endif pEmac->EMAC_CTL = 0; Modified: head/sys/boot/arm/at91/libat91/lib_AT91RM9200.h ============================================================================== --- head/sys/boot/arm/at91/libat91/lib_AT91RM9200.h Sun Jul 15 05:24:19 2012 (r238462) +++ head/sys/boot/arm/at91/libat91/lib_AT91RM9200.h Sun Jul 15 05:35:14 2012 (r238463) @@ -134,17 +134,17 @@ AT91F_MCI_CfgPIO(void) // Configure PIO controllers to periph mode AT91F_PIO_CfgPeriph( AT91C_BASE_PIOA, // PIO controller base address - ((unsigned int) AT91C_PA28_MCCDA ) | - ((unsigned int) AT91C_PA29_MCDA0 ) | - ((unsigned int) AT91C_PA27_MCCK ), // Peripheral A + ((unsigned int) AT91C_PIO_PA28 ) | + ((unsigned int) AT91C_PIO_PA29 ) | + ((unsigned int) AT91C_PIO_PA27 ), // Peripheral A 0); // Peripheral B // Configure PIO controllers to periph mode AT91F_PIO_CfgPeriph( AT91C_BASE_PIOB, // PIO controller base address 0, // Peripheral A - ((unsigned int) AT91C_PB5_MCDA3 ) | - ((unsigned int) AT91C_PB3_MCDA1 ) | - ((unsigned int) AT91C_PB4_MCDA2 )); // Peripheral B + ((unsigned int) AT91C_PIO_PB5 ) | + ((unsigned int) AT91C_PIO_PB3 ) | + ((unsigned int) AT91C_PIO_PB4 )); // Peripheral B } Modified: head/sys/boot/arm/at91/libat91/spi_flash.c ============================================================================== --- head/sys/boot/arm/at91/libat91/spi_flash.c Sun Jul 15 05:24:19 2012 (r238462) +++ head/sys/boot/arm/at91/libat91/spi_flash.c Sun Jul 15 05:35:14 2012 (r238463) @@ -223,10 +223,10 @@ SPI_InitFlash(void) // enable CS0, CLK, MOSI, MISO pPio = (AT91PS_PIO)AT91C_BASE_PIOA; - pPio->PIO_ASR = AT91C_PA3_NPCS0 | AT91C_PA1_MOSI | AT91C_PA0_MISO | - AT91C_PA2_SPCK; - pPio->PIO_PDR = AT91C_PA3_NPCS0 | AT91C_PA1_MOSI | AT91C_PA0_MISO | - AT91C_PA2_SPCK; + pPio->PIO_ASR = AT91C_PIO_PA3 | AT91C_PIO_PA1 | AT91C_PIO_PA0 | + AT91C_PIO_PA2; + pPio->PIO_PDR = AT91C_PIO_PA3 | AT91C_PIO_PA1 | AT91C_PIO_PA0 | + AT91C_PIO_PA2; // enable clocks to SPI AT91C_BASE_PMC->PMC_PCER = 1u << AT91C_ID_SPI; From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 05:38:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF915106564A; Sun, 15 Jul 2012 05:38:43 +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 DB88E8FC12; Sun, 15 Jul 2012 05:38:43 +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 q6F5chqA028730; Sun, 15 Jul 2012 05:38:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6F5chom028728; Sun, 15 Jul 2012 05:38:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207150538.q6F5chom028728@svn.freebsd.org> From: Warner Losh Date: Sun, 15 Jul 2012 05:38:43 +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: r238464 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 05:38:44 -0000 Author: imp Date: Sun Jul 15 05:38:43 2012 New Revision: 238464 URL: http://svn.freebsd.org/changeset/base/238464 Log: Force overwrite of gz file, to make NO_CLEAN builds work. Modified: head/sys/conf/Makefile.arm Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Sun Jul 15 05:35:14 2012 (r238463) +++ head/sys/conf/Makefile.arm Sun Jul 15 05:38:43 2012 (r238464) @@ -105,7 +105,7 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ >opt_kernname.h eval $$(stat -s ${KERNEL_KO}.tmp) && \ echo "#define KERNSIZE $$st_size" >>opt_kernname.h - gzip -9 ${KERNEL_KO}.tmp + gzip -f9 ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \ echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h ${CC} -O2 -ffreestanding -DKZIP -I. -I$S -c $S/kern/inflate.c -o \ From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 05:41:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 650011065670; Sun, 15 Jul 2012 05:41:44 +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 4F2608FC1A; Sun, 15 Jul 2012 05:41: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 q6F5fiiX028890; Sun, 15 Jul 2012 05:41:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6F5fiGj028883; Sun, 15 Jul 2012 05:41:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207150541.q6F5fiGj028883@svn.freebsd.org> From: Warner Losh Date: Sun, 15 Jul 2012 05:41: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: r238465 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 05:41:44 -0000 Author: imp Date: Sun Jul 15 05:41:43 2012 New Revision: 238465 URL: http://svn.freebsd.org/changeset/base/238465 Log: Configure the peripheral pins for MCI devices. Eliminate the now-unused at91_pio_rm9200.h. Deleted: head/sys/arm/at91/at91_pio_rm9200.h Modified: head/sys/arm/at91/at91rm9200_devices.c head/sys/arm/at91/at91rm9200var.h head/sys/arm/at91/board_bwct.c head/sys/arm/at91/board_hl200.c head/sys/arm/at91/board_kb920x.c head/sys/arm/at91/board_tsc4370.c Modified: head/sys/arm/at91/at91rm9200_devices.c ============================================================================== --- head/sys/arm/at91/at91rm9200_devices.c Sun Jul 15 05:38:43 2012 (r238464) +++ head/sys/arm/at91/at91rm9200_devices.c Sun Jul 15 05:41:43 2012 (r238465) @@ -80,6 +80,10 @@ at91rm9200_config_uart(unsigned devid, u * to do. */ + /* + * Current boards supported don't need the extras, but they should be + * implemented. But that should wait until the new pin api goes in. + */ switch (devid) { case AT91_ID_DBGU: at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA30, 0); /* DRXD */ @@ -122,3 +126,17 @@ at91rm9200_config_uart(unsigned devid, u break; } } + +void +at91rm9200_config_mci(int has_4wire) +{ + /* XXX TODO chip changed GPIO, other slots, etc */ + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA27, 0); /* MCCK */ + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA28, 1); /* MCCDA */ + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA29, 1); /* MCDA0 */ + if (has_4wire) { + at91_pio_use_periph_b(AT91RM92_PIOB_BASE, AT91C_PIO_PB3, 1); /* MCDA1 */ + at91_pio_use_periph_b(AT91RM92_PIOB_BASE, AT91C_PIO_PB4, 1); /* MCDA2 */ + at91_pio_use_periph_b(AT91RM92_PIOB_BASE, AT91C_PIO_PB5, 1); /* MCDA3 */ + } +} Modified: head/sys/arm/at91/at91rm9200var.h ============================================================================== --- head/sys/arm/at91/at91rm9200var.h Sun Jul 15 05:38:43 2012 (r238464) +++ head/sys/arm/at91/at91rm9200var.h Sun Jul 15 05:41:43 2012 (r238465) @@ -50,4 +50,9 @@ void at91rm9200_set_subtype(enum at91_so void at91rm9200_config_uart(unsigned devid, unsigned unit, unsigned pinmask); +/* + * MCI (sd/mmc card support) + */ +void at91rm9200_config_mci(int has_4wire); + #endif /* ARM_AT91_AT91RM9200VAR_H */ Modified: head/sys/arm/at91/board_bwct.c ============================================================================== --- head/sys/arm/at91/board_bwct.c Sun Jul 15 05:38:43 2012 (r238464) +++ head/sys/arm/at91/board_bwct.c Sun Jul 15 05:41:43 2012 (r238465) @@ -45,6 +45,9 @@ board_init(void) */ at91rm9200_config_uart(AT91_ID_DBGU, 0, 0); /* DBGU just Tx and Rx */ + at91rm9200_config_mci(0); + /* Configure ethernet */ + return (at91_ramsize()); } Modified: head/sys/arm/at91/board_hl200.c ============================================================================== --- head/sys/arm/at91/board_hl200.c Sun Jul 15 05:38:43 2012 (r238464) +++ head/sys/arm/at91/board_hl200.c Sun Jul 15 05:41:43 2012 (r238465) @@ -34,8 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include BOARD_INIT long board_init(void) @@ -51,6 +49,16 @@ board_init(void) at91rm9200_config_uart(AT91_ID_DBGU, 0, 0); /* DBGU just Tx and Rx */ at91rm9200_config_uart(AT91RM9200_ID_USART0, 1, 0); /* Tx and Rx */ + at91rm9200_config_mci(0); /* HOTe HL200 unknown 1 vs 4 wire */ + + /* Enable CF card slot */ + /* Enable sound thing */ + /* Enable VGA chip */ + /* Enable ethernet */ + /* Enable TWI + RTC */ + /* Enable USB Host */ + /* Enable USB Device (gadget) */ + return (at91_ramsize()); } Modified: head/sys/arm/at91/board_kb920x.c ============================================================================== --- head/sys/arm/at91/board_kb920x.c Sun Jul 15 05:38:43 2012 (r238464) +++ head/sys/arm/at91/board_kb920x.c Sun Jul 15 05:41:43 2012 (r238465) @@ -32,10 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include -#include BOARD_INIT long board_init(void) @@ -54,13 +51,14 @@ board_init(void) at91rm9200_config_uart(AT91RM9200_ID_USART3, 3, /* Tx, Rx, CTS, RTS - RS485 */ AT91_UART_CTS | AT91_UART_RTS); - /* MMC/SD Interface */ - at91_pio_use_periph_a(AT91RM92_PIOA_BASE,AT91C_PA27_MCCK, 0); - at91_pio_use_periph_a(AT91RM92_PIOA_BASE,AT91C_PA28_MCCDA, 1); - at91_pio_use_periph_a(AT91RM92_PIOA_BASE,AT91C_PA29_MCDA0, 1); - at91_pio_use_periph_b(AT91RM92_PIOB_BASE,AT91C_PB3_MCDA1, 1); - at91_pio_use_periph_b(AT91RM92_PIOB_BASE,AT91C_PB4_MCDA2, 1); - at91_pio_use_periph_b(AT91RM92_PIOB_BASE,AT91C_PB5_MCDA3, 1); + at91rm9200_config_mci(1); + + /* CFE interface */ + /* ethernet interface */ + /* lcd interface */ + /* USB host */ + /* USB device (gadget) */ + /* TWI */ return (at91_ramsize()); } Modified: head/sys/arm/at91/board_tsc4370.c ============================================================================== --- head/sys/arm/at91/board_tsc4370.c Sun Jul 15 05:38:43 2012 (r238464) +++ head/sys/arm/at91/board_tsc4370.c Sun Jul 15 05:41:43 2012 (r238465) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include BOARD_INIT long board_init(void) @@ -49,6 +49,15 @@ board_init(void) at91rm9200_config_uart(AT91RM9200_ID_USART2, 3, 0); /* Tx and Rx */ at91rm9200_config_uart(AT91RM9200_ID_USART3, 4, 0); /* Tx and Rx */ + at91rm9200_config_mci(0); /* tsc4370 board has only 1 wire */ + /* Newer boards may have 4 wires */ + + /* Configure TWI */ + /* Configure SPI + dataflash */ + /* Configure SSC */ + /* Configure USB Host */ + /* Configure FPGA attached to chip selects */ + /* Pin assignment */ /* Assert PA24 low -- talk to rubidium */ at91_pio_use_gpio(AT91RM92_PIOA_BASE, AT91C_PIO_PA24); From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 05:49:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63C64106566B; Sun, 15 Jul 2012 05:49:03 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 353E68FC0A; Sun, 15 Jul 2012 05:49: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 q6F5n3hD029231; Sun, 15 Jul 2012 05:49:03 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6F5n2jg029228; Sun, 15 Jul 2012 05:49:02 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201207150549.q6F5n2jg029228@svn.freebsd.org> From: Rui Paulo Date: Sun, 15 Jul 2012 05:49: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: r238466 - head/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 05:49:03 -0000 Author: rpaulo Date: Sun Jul 15 05:49:02 2012 New Revision: 238466 URL: http://svn.freebsd.org/changeset/base/238466 Log: The JP1082 device doesn't respond to the MII_BMSR command and it turns out that it has an unusable PHY. It still works, although very slowly, without a PHY, so I implemented non-PHY support in the udav driver. Modified: head/sys/dev/usb/net/if_udav.c head/sys/dev/usb/net/if_udavreg.h Modified: head/sys/dev/usb/net/if_udav.c ============================================================================== --- head/sys/dev/usb/net/if_udav.c Sun Jul 15 05:41:43 2012 (r238465) +++ head/sys/dev/usb/net/if_udav.c Sun Jul 15 05:49:02 2012 (r238466) @@ -169,7 +169,7 @@ MODULE_DEPEND(udav, ether, 1, 1, 1); MODULE_DEPEND(udav, miibus, 1, 1, 1); MODULE_VERSION(udav, 1); -static const struct usb_ether_methods udav_ue_methods = { +static struct usb_ether_methods udav_ue_methods = { .ue_attach_post = udav_attach_post, .ue_start = udav_start, .ue_init = udav_init, @@ -206,7 +206,8 @@ static const STRUCT_USB_HOST_ID udav_dev {USB_VPI(USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ADM8515, 0)}, /* Kontron AG USB Ethernet */ {USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_DM9601, 0)}, - {USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_JP1082, 0)}, + {USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_JP1082, + UDAV_FLAG_NO_PHY)}, }; static void @@ -259,6 +260,16 @@ udav_attach(device_t dev) goto detach; } + /* + * The JP1082 has an unusable PHY and provides no link information. + */ + if (sc->sc_flags & UDAV_FLAG_NO_PHY) { + udav_ue_methods.ue_tick = NULL; + udav_ue_methods.ue_mii_upd = NULL; + udav_ue_methods.ue_mii_sts = NULL; + sc->sc_flags |= UDAV_FLAG_LINK; + } + ue->ue_sc = sc; ue->ue_dev = dev; ue->ue_udev = uaa->device; @@ -712,7 +723,8 @@ udav_stop(struct usb_ether *ue) UDAV_LOCK_ASSERT(sc, MA_OWNED); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - sc->sc_flags &= ~UDAV_FLAG_LINK; + if (!(sc->sc_flags & UDAV_FLAG_NO_PHY)) + sc->sc_flags &= ~UDAV_FLAG_LINK; /* * stop all the transfers, if not already stopped: Modified: head/sys/dev/usb/net/if_udavreg.h ============================================================================== --- head/sys/dev/usb/net/if_udavreg.h Sun Jul 15 05:41:43 2012 (r238465) +++ head/sys/dev/usb/net/if_udavreg.h Sun Jul 15 05:49:02 2012 (r238466) @@ -159,6 +159,7 @@ struct udav_softc { int sc_flags; #define UDAV_FLAG_LINK 0x0001 #define UDAV_FLAG_EXT_PHY 0x0040 +#define UDAV_FLAG_NO_PHY 0x0080 }; #define UDAV_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 06:08:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 669351065670; Sun, 15 Jul 2012 06:08:12 +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 38FB98FC14; Sun, 15 Jul 2012 06:08: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 q6F68C6I030040; Sun, 15 Jul 2012 06:08:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6F68C4M030039; Sun, 15 Jul 2012 06:08:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207150608.q6F68C4M030039@svn.freebsd.org> From: Warner Losh Date: Sun, 15 Jul 2012 06:08: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: r238467 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 06:08:12 -0000 Author: imp Date: Sun Jul 15 06:08:11 2012 New Revision: 238467 URL: http://svn.freebsd.org/changeset/base/238467 Log: These were never used, remove them. Deleted: head/sys/arm/at91/hints.at91rm9200 head/sys/arm/at91/hints.at91sam9261 From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 10:19:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CEC2106564A; Sun, 15 Jul 2012 10:19:44 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 364A28FC08; Sun, 15 Jul 2012 10:19: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 q6FAJiQm041100; Sun, 15 Jul 2012 10:19:44 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FAJhis041090; Sun, 15 Jul 2012 10:19:43 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207151019.q6FAJhis041090@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 15 Jul 2012 10:19:43 +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: r238468 - in head: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 10:19:44 -0000 Author: jilles Date: Sun Jul 15 10:19:43 2012 New Revision: 238468 URL: http://svn.freebsd.org/changeset/base/238468 Log: sh: Expand assignment-like words specially for export/readonly/local. Examples: export x=~ now expands the tilde local y=$1 is now safe, even if $1 contains IFS characters or metacharacters. For a word to "look like an assignment", it must start with a name followed by an equals sign, none of which may be quoted. The special treatment applies when the first word (potentially after "command") is "export", "readonly" or "local". There may be quoting characters but no expansions. If "local" is overridden with a function there is no special treatment ("export" and "readonly" cannot be overridden with a function). If things like local arr=(1 2 3) are ever allowed in the future, they cannot call a "local" function. This would either be a run-time error or it would call the builtin. This matches Austin Group bug #351, planned for the next issue of POSIX.1. PR: bin/166771 Added: head/tools/regression/bin/sh/expansion/export2.0 (contents, props changed) head/tools/regression/bin/sh/expansion/export3.0 (contents, props changed) head/tools/regression/bin/sh/expansion/local1.0 (contents, props changed) head/tools/regression/bin/sh/expansion/local2.0 (contents, props changed) head/tools/regression/bin/sh/expansion/readonly1.0 (contents, props changed) Modified: head/bin/sh/eval.c head/bin/sh/exec.c head/bin/sh/exec.h head/bin/sh/sh.1 Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sun Jul 15 06:08:11 2012 (r238467) +++ head/bin/sh/eval.c Sun Jul 15 10:19:43 2012 (r238468) @@ -672,6 +672,52 @@ out: result->fd, result->buf, result->nleft, result->jp)); } +static int +mustexpandto(const char *argtext, const char *mask) +{ + for (;;) { + if (*argtext == CTLQUOTEMARK || *argtext == CTLQUOTEEND) { + argtext++; + continue; + } + if (*argtext == CTLESC) + argtext++; + else if (BASESYNTAX[(int)*argtext] == CCTL) + return (0); + if (*argtext != *mask) + return (0); + if (*argtext == '\0') + return (1); + argtext++; + mask++; + } +} + +static int +isdeclarationcmd(struct narg *arg) +{ + int have_command = 0; + + if (arg == NULL) + return (0); + while (mustexpandto(arg->text, "command")) { + have_command = 1; + arg = &arg->next->narg; + if (arg == NULL) + return (0); + /* + * To also allow "command -p" and "command --" as part of + * a declaration command, add code here. + * We do not do this, as ksh does not do it either and it + * is not required by POSIX. + */ + } + return (mustexpandto(arg->text, "export") || + mustexpandto(arg->text, "readonly") || + (mustexpandto(arg->text, "local") && + (have_command || !isfunc("local")))); +} + /* * Check if a builtin can safely be executed in the same process, * even though it should be in a subshell (command substitution). @@ -743,11 +789,12 @@ evalcommand(union node *cmd, int flags, exitstatus = 0; for (argp = cmd->ncmd.args ; argp ; argp = argp->narg.next) { if (varflag && isassignment(argp->narg.text)) { - expandarg(argp, &varlist, EXP_VARTILDE); + expandarg(argp, varflag == 1 ? &varlist : &arglist, + EXP_VARTILDE); continue; - } + } else if (varflag == 1) + varflag = isdeclarationcmd(&argp->narg) ? 2 : 0; expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); - varflag = 0; } *arglist.lastp = NULL; *varlist.lastp = NULL; Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Sun Jul 15 06:08:11 2012 (r238467) +++ head/bin/sh/exec.c Sun Jul 15 10:19:43 2012 (r238468) @@ -648,6 +648,19 @@ unsetfunc(const char *name) return (0); } + +/* + * Check if a function by a certain name exists. + */ +int +isfunc(const char *name) +{ + struct tblentry *cmdp; + cmdp = cmdlookup(name, 0); + return (cmdp != NULL && cmdp->cmdtype == CMDFUNCTION); +} + + /* * Shared code for the following builtin commands: * type, command -v, command -V Modified: head/bin/sh/exec.h ============================================================================== --- head/bin/sh/exec.h Sun Jul 15 06:08:11 2012 (r238467) +++ head/bin/sh/exec.h Sun Jul 15 10:19:43 2012 (r238468) @@ -72,5 +72,6 @@ void hashcd(void); void changepath(const char *); void defun(const char *, union node *); int unsetfunc(const char *); +int isfunc(const char *); int typecmd_impl(int, char **, int, const char *); void clearcmdentry(void); Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sun Jul 15 06:08:11 2012 (r238467) +++ head/bin/sh/sh.1 Sun Jul 15 10:19:43 2012 (r238468) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd November 5, 2011 +.Dd July 15, 2012 .Dt SH 1 .Os .Sh NAME @@ -1164,6 +1164,20 @@ Assignments are expanded differently fro tilde expansion is also performed after the equals sign and after any colon and usernames are also terminated by colons, and field splitting and pathname expansion are not performed. +.Pp +This special expansion applies not only to assignments that form a simple +command by themselves or precede a command word, +but also to words passed to the +.Ic export , +.Ic local +or +.Ic readonly +built-in commands that have this form. +For this, the builtin's name must be literal +(not the result of an expansion) +and may optionally be preceded by one or more literal instances of +.Ic command +without options. .Ss Positional Parameters A positional parameter is a parameter denoted by a number greater than zero. The shell sets these initially to the values of its command line Added: head/tools/regression/bin/sh/expansion/export2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/export2.0 Sun Jul 15 10:19:43 2012 (r238468) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +w='@ @' +check() { + [ "$v" = "$w" ] || echo "Expected $w got $v" +} + +export v=$w +check + +HOME=/known/value +check() { + [ "$v" = ~ ] || echo "Expected $HOME got $v" +} + +export v=~ +check + +check() { + [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" +} + +export v=x:~ +check Added: head/tools/regression/bin/sh/expansion/export3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/export3.0 Sun Jul 15 10:19:43 2012 (r238468) @@ -0,0 +1,30 @@ +# $FreeBSD$ + +w='@ @' +check() { + [ "$v" = "$w" ] || echo "Expected $w got $v" +} + +command export v=$w +check +command command export v=$w +check + +HOME=/known/value +check() { + [ "$v" = ~ ] || echo "Expected $HOME got $v" +} + +command export v=~ +check +command command export v=~ +check + +check() { + [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" +} + +command export v=x:~ +check +command command export v=x:~ +check Added: head/tools/regression/bin/sh/expansion/local1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/local1.0 Sun Jul 15 10:19:43 2012 (r238468) @@ -0,0 +1,28 @@ +# $FreeBSD$ + +run_test() { + w='@ @' + check() { + [ "$v" = "$w" ] || echo "Expected $w got $v" + } + + local v=$w + check + + HOME=/known/value + check() { + [ "$v" = ~ ] || echo "Expected $HOME got $v" + } + + local v=~ + check + + check() { + [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" + } + + local v=x:~ + check +} + +run_test Added: head/tools/regression/bin/sh/expansion/local2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/local2.0 Sun Jul 15 10:19:43 2012 (r238468) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +run_test() { + w='@ @' + check() { + [ "$v" = "$w" ] || echo "Expected $w got $v" + } + + command local v=$w + check + command command local v=$w + check + + HOME=/known/value + check() { + [ "$v" = ~ ] || echo "Expected $HOME got $v" + } + + command local v=~ + check + command command local v=~ + check + + check() { + [ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v" + } + + command local v=x:~ + check + command command local v=x:~ + check +} + +run_test Added: head/tools/regression/bin/sh/expansion/readonly1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/readonly1.0 Sun Jul 15 10:19:43 2012 (r238468) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +w='@ @' + +v=0 HOME=/known/value +readonly v=~:~/:$w +[ "$v" = "$HOME:$HOME/:$w" ] || echo "Expected $HOME/:$w got $v" From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 10:22:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77566106566C; Sun, 15 Jul 2012 10:22:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 628678FC12; Sun, 15 Jul 2012 10: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 q6FAMEwu041246; Sun, 15 Jul 2012 10:22:14 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FAMEJL041244; Sun, 15 Jul 2012 10:22:14 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207151022.q6FAMEJL041244@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 15 Jul 2012 10: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: r238469 - head/tools/regression/bin/sh/builtins X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 10:22:14 -0000 Author: jilles Date: Sun Jul 15 10:22:13 2012 New Revision: 238469 URL: http://svn.freebsd.org/changeset/base/238469 Log: sh: Add a simple test for the "local" builtin. Added: head/tools/regression/bin/sh/builtins/local1.0 (contents, props changed) Added: head/tools/regression/bin/sh/builtins/local1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/local1.0 Sun Jul 15 10:22:13 2012 (r238469) @@ -0,0 +1,13 @@ +# $FreeBSD$ +# A commonly used but non-POSIX builtin. + +f() { + local x + x=2 + [ "$x" = 2 ] +} +x=1 +f || exit 3 +[ "$x" = 1 ] || exit 3 +f || exit 3 +[ "$x" = 1 ] || exit 3 From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 10:49:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0E1E1065670; Sun, 15 Jul 2012 10:49:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC1778FC14; Sun, 15 Jul 2012 10:49: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 q6FAnHbZ042781; Sun, 15 Jul 2012 10:49:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FAnHNN042778; Sun, 15 Jul 2012 10:49:17 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207151049.q6FAnHNN042778@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 15 Jul 2012 10:49: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: r238470 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 10:49:17 -0000 Author: jilles Date: Sun Jul 15 10:49:16 2012 New Revision: 238470 URL: http://svn.freebsd.org/changeset/base/238470 Log: sh: Remove unused variable in_dowait. Modified: head/bin/sh/jobs.c head/bin/sh/jobs.h Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Sun Jul 15 10:22:13 2012 (r238469) +++ head/bin/sh/jobs.c Sun Jul 15 10:49:16 2012 (r238470) @@ -84,7 +84,6 @@ static struct job *jobmru; /* most recen static pid_t initialpgrp; /* pgrp of shell on invocation */ #endif int in_waitcmd = 0; /* are we in waitcmd()? */ -int in_dowait = 0; /* are we in dowait()? */ volatile sig_atomic_t breakwaitcmd = 0; /* should wait be terminated? */ static int ttyfd = -1; @@ -1023,14 +1022,12 @@ dowait(int block, struct job *job) int sig; int coredump; - in_dowait++; TRACE(("dowait(%d) called\n", block)); do { pid = waitproc(block, &status); TRACE(("wait returns %d, status=%d\n", (int)pid, status)); } while ((pid == -1 && errno == EINTR && breakwaitcmd == 0) || (pid > 0 && WIFSTOPPED(status) && !iflag)); - in_dowait--; if (pid == -1 && errno == ECHILD && job != NULL) job->state = JOBDONE; if (breakwaitcmd != 0) { Modified: head/bin/sh/jobs.h ============================================================================== --- head/bin/sh/jobs.h Sun Jul 15 10:22:13 2012 (r238469) +++ head/bin/sh/jobs.h Sun Jul 15 10:49:16 2012 (r238470) @@ -84,7 +84,6 @@ enum { extern int job_warning; /* user was warned about stopped jobs */ extern int in_waitcmd; /* are we in waitcmd()? */ -extern int in_dowait; /* are we in dowait()? */ extern volatile sig_atomic_t breakwaitcmd; /* break wait to process traps? */ void setjobctl(int); From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 10:53:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99779106564A; Sun, 15 Jul 2012 10:53:49 +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 8419B8FC18; Sun, 15 Jul 2012 10:53: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 q6FArnat042995; Sun, 15 Jul 2012 10:53:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FArnqO042991; Sun, 15 Jul 2012 10:53:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207151053.q6FArnqO042991@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 15 Jul 2012 10:53: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: r238471 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 10:53:49 -0000 Author: kib Date: Sun Jul 15 10:53:48 2012 New Revision: 238471 URL: http://svn.freebsd.org/changeset/base/238471 Log: Import the DragonFly BSD commit 4f0bc915b65fcf5a23214f6d221d65c80be68ad4 by John Marino , with the following (edited) commit message Date: Sat, 24 Mar 2012 06:40:50 +0100 Subject: [PATCH 1/1] rtld: Implement DT_RUNPATH and -z nodefaultlib DT_RUNPATH is incorrectly being considered as an alias of DT_RPATH. The purpose of DT_RUNPATH is to have two different types of rpath: one that can be overridden by the environment variable LD_LIBRARY_PATH and one that can't. With the currently implementation, LD_LIBRARY_PATH will always trump any embedded rpath or runpath tags. Current path search order by rtld: ================================== LD_LIBRARY_PATH DT_RPATH / DT_RUNPATH (always the same) ldconfig hints file (default: /var/run/ld-elf.so.hints) /usr/lib New path search order by rtld: ============================== DT_RPATH of the calling object if no DT_RUNPATH DT_RPATH of the main binary if no DT_RUNPATH and binary isn't calling obj LD_LIBRARY_PATH DT_RUNPATH ldconfig hints file /usr/lib The new path search matches how the linux runtime loader works. The other major added feature is support for linker flag "-z nodefaultlib". When this flag is passed to the linker, rtld will skip all references to the standard library search path ("/usr/lib" in this case but it could handle more color delimited paths) except in DT_RPATH and DT_RUNPATH. New path search order by rtld with -z nodefaultlib flag set: ============================================================ DT_RPATH of the calling object if no DT_RUNPATH DT_RPATH of the main binary if no DT_RUNPATH and binary isn't calling obj LD_LIBRARY_PATH DT_RUNPATH ldconfig hints file (skips all references to /usr/lib) FreeBSD notes: - we fixed some bugs which were submitted to DragonFly and merged there as commit 1ff8a2bd3eb6e5587174c6a983303ea3a79e0002; - we added LD_LIBRARY_PATH_RPATH environment variable to switch to the previous behaviour of considering DT_RPATH a synonym for DT_RUNPATH; - the FreeBSD default search path is /lib:/usr/lib and not /usr/lib. Reviewed by: kan MFC after: 1 month MFC note: flip the ld_library_path_rpath default value for stable/9 Modified: head/libexec/rtld-elf/rtld.1 head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h Modified: head/libexec/rtld-elf/rtld.1 ============================================================================== --- head/libexec/rtld-elf/rtld.1 Sun Jul 15 10:49:16 2012 (r238470) +++ head/libexec/rtld-elf/rtld.1 Sun Jul 15 10:53:48 2012 (r238471) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 1, 2009 +.Dd June 28, 2012 .Dt RTLD 1 .Os .Sh NAME @@ -86,14 +86,39 @@ dynamic linker. After the dynamic linker has finished loading, relocating, and initializing the program and its required shared objects, it transfers control to the entry point of the program. +The following search order is used to locate required shared objects: .Pp -To locate the required shared objects in the file system, -.Nm -may use a -.Dq hints -file prepared by the +.Bl -enum -offset indent -compact +.It +.Dv DT_RPATH +of the referencing object unless that object also contains a +.Dv DT_RUNPATH +tag +.It +.Dv DT_RPATH +of the program unless the referencing object contains a +.Dv DT_RUNPATH +tag +.It +Path indicated by +.Ev LD_LIBRARY_PATH +environment variable +.It +.Dv DT_RUNPATH +of the referencing object +.It +Hints file produced by the .Xr ldconfig 8 -utility. +utility +.It +The +.Pa /lib +and +.Pa /usr/lib +directories, unless the referencing object was linked using the +.Dq Fl z Ar nodefaultlib +option +.El .Pp The .Nm @@ -143,6 +168,20 @@ This variable is unset for set-user-ID a A colon separated list of directories, overriding the default search path for shared libraries. This variable is unset for set-user-ID and set-group-ID programs. +.It Ev LD_LIBRARY_PATH_RPATH +If the variable is specified and has a value starting with +any of \'y\', \'Y\' or \'1\' symbols, the path specified by +.Ev LD_LIBRARY_PATH +variable is allowed to override the path from +.Dv DT_RPATH +for binaries which does not contain +.Dv DT_RUNPATH +tag. +For such binaries, when the variable +.Ev LD_LIBRARY_PATH_RPATH +is set, +.Dq Fl z Ar nodefaultlib +link-time option is ignored as well. .It Ev LD_PRELOAD A list of shared libraries, separated by colons and/or white space, to be linked in before any Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Jul 15 10:49:16 2012 (r238470) +++ head/libexec/rtld-elf/rtld.c Sun Jul 15 10:53:48 2012 (r238471) @@ -80,8 +80,9 @@ typedef void * (*path_enum_proc) (const static const char *basename(const char *); static void die(void) __dead2; static void digest_dynamic1(Obj_Entry *, int, const Elf_Dyn **, - const Elf_Dyn **); -static void digest_dynamic2(Obj_Entry *, const Elf_Dyn *, const Elf_Dyn *); + const Elf_Dyn **, const Elf_Dyn **); +static void digest_dynamic2(Obj_Entry *, const Elf_Dyn *, const Elf_Dyn *, + const Elf_Dyn *); static void digest_dynamic(Obj_Entry *, int); static Obj_Entry *digest_phdr(const Elf_Phdr *, int, caddr_t, const char *); static Obj_Entry *dlcheck(void *); @@ -94,7 +95,7 @@ static void errmsg_restore(char *); static char *errmsg_save(void); static void *fill_search_info(const char *, size_t, void *); static char *find_library(const char *, const Obj_Entry *); -static const char *gethints(void); +static const char *gethints(bool); static void init_dag(Obj_Entry *); static void init_rtld(caddr_t, Elf_Auxinfo **); static void initlist_add_neededs(Needed_Entry *, Objlist *); @@ -233,6 +234,8 @@ size_t tls_static_space; /* Static TLS s int tls_dtv_generation = 1; /* Used to detect when dtv size changes */ int tls_max_index = 1; /* Largest module index allocated */ +bool ld_library_path_rpath = false; + /* * Fill in a DoneList with an allocation large enough to hold all of * the currently-loaded objects. Keep this as a macro since it calls @@ -323,6 +326,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ Obj_Entry **preload_tail; Objlist initlist; RtldLockState lockstate; + char *library_path_rpath; int mib[2]; size_t len; @@ -394,7 +398,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ if (unsetenv(LD_ "PRELOAD") || unsetenv(LD_ "LIBMAP") || unsetenv(LD_ "LIBRARY_PATH") || unsetenv(LD_ "LIBMAP_DISABLE") || unsetenv(LD_ "DEBUG") || unsetenv(LD_ "ELF_HINTS_PATH") || - unsetenv(LD_ "LOADFLTR")) { + unsetenv(LD_ "LOADFLTR") || unsetenv(LD_ "LIBRARY_PATH_RPATH")) { _rtld_error("environment corrupt; aborting"); die(); } @@ -406,6 +410,15 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ ld_preload = getenv(LD_ "PRELOAD"); ld_elf_hints_path = getenv(LD_ "ELF_HINTS_PATH"); ld_loadfltr = getenv(LD_ "LOADFLTR") != NULL; + library_path_rpath = getenv(LD_ "LIBRARY_PATH_RPATH"); + if (library_path_rpath != NULL) { + if (library_path_rpath[0] == 'y' || + library_path_rpath[0] == 'Y' || + library_path_rpath[0] == '1') + ld_library_path_rpath = true; + else + ld_library_path_rpath = false; + } dangerous_ld_env = libmap_disable || (libmap_override != NULL) || (ld_library_path != NULL) || (ld_preload != NULL) || (ld_elf_hints_path != NULL) || ld_loadfltr; @@ -828,7 +841,7 @@ die(void) */ static void digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath, - const Elf_Dyn **dyn_soname) + const Elf_Dyn **dyn_soname, const Elf_Dyn **dyn_runpath) { const Elf_Dyn *dynp; Needed_Entry **needed_tail = &obj->needed; @@ -843,6 +856,7 @@ digest_dynamic1(Obj_Entry *obj, int earl *dyn_rpath = NULL; *dyn_soname = NULL; + *dyn_runpath = NULL; obj->bind_now = false; for (dynp = obj->dynamic; dynp->d_tag != DT_NULL; dynp++) { @@ -1009,7 +1023,6 @@ digest_dynamic1(Obj_Entry *obj, int earl break; case DT_RPATH: - case DT_RUNPATH: /* XXX: process separately */ /* * We have to wait until later to process this, because we * might not have gotten the address of the string table yet. @@ -1021,6 +1034,10 @@ digest_dynamic1(Obj_Entry *obj, int earl *dyn_soname = dynp; break; + case DT_RUNPATH: + *dyn_runpath = dynp; + break; + case DT_INIT: obj->init = (Elf_Addr) (obj->relocbase + dynp->d_un.d_ptr); break; @@ -1114,6 +1131,8 @@ digest_dynamic1(Obj_Entry *obj, int earl obj->z_nodelete = true; if (dynp->d_un.d_val & DF_1_LOADFLTR) obj->z_loadfltr = true; + if (dynp->d_un.d_val & DF_1_NODEFLIB) + obj->z_nodeflib = true; break; default: @@ -1153,7 +1172,7 @@ digest_dynamic1(Obj_Entry *obj, int earl static void digest_dynamic2(Obj_Entry *obj, const Elf_Dyn *dyn_rpath, - const Elf_Dyn *dyn_soname) + const Elf_Dyn *dyn_soname, const Elf_Dyn *dyn_runpath) { if (obj->z_origin && obj->origin_path == NULL) { @@ -1162,7 +1181,12 @@ digest_dynamic2(Obj_Entry *obj, const El die(); } - if (dyn_rpath != NULL) { + if (dyn_runpath != NULL) { + obj->runpath = (char *)obj->strtab + dyn_runpath->d_un.d_val; + if (obj->z_origin) + obj->runpath = origin_subst(obj->runpath, obj->origin_path); + } + else if (dyn_rpath != NULL) { obj->rpath = (char *)obj->strtab + dyn_rpath->d_un.d_val; if (obj->z_origin) obj->rpath = origin_subst(obj->rpath, obj->origin_path); @@ -1177,9 +1201,10 @@ digest_dynamic(Obj_Entry *obj, int early { const Elf_Dyn *dyn_rpath; const Elf_Dyn *dyn_soname; + const Elf_Dyn *dyn_runpath; - digest_dynamic1(obj, early, &dyn_rpath, &dyn_soname); - digest_dynamic2(obj, dyn_rpath, dyn_soname); + digest_dynamic1(obj, early, &dyn_rpath, &dyn_soname, &dyn_runpath); + digest_dynamic2(obj, dyn_rpath, dyn_soname, dyn_runpath); } /* @@ -1389,43 +1414,71 @@ gnu_hash(const char *s) * loaded shared object, whose library search path will be searched. * * The search order is: + * DT_RPATH in the referencing file _unless_ DT_RUNPATH is present (1) + * DT_RPATH of the main object if DSO without defined DT_RUNPATH (1) * LD_LIBRARY_PATH - * rpath in the referencing file - * ldconfig hints - * /lib:/usr/lib + * DT_RUNPATH in the referencing file + * ldconfig hints (if -z nodefaultlib, filter out default library directories + * from list) + * /lib:/usr/lib _unless_ the referencing file is linked with -z nodefaultlib + * + * (1) Handled in digest_dynamic2 - rpath left NULL if runpath defined. */ static char * find_library(const char *xname, const Obj_Entry *refobj) { char *pathname; char *name; + bool objgiven; + objgiven = refobj != NULL; if (strchr(xname, '/') != NULL) { /* Hard coded pathname */ if (xname[0] != '/' && !trust) { _rtld_error("Absolute pathname required for shared object \"%s\"", xname); return NULL; } - if (refobj != NULL && refobj->z_origin) + if (objgiven && refobj->z_origin) return origin_subst(xname, refobj->origin_path); else return xstrdup(xname); } - if (libmap_disable || (refobj == NULL) || + if (libmap_disable || !objgiven || (name = lm_find(refobj->path, xname)) == NULL) name = (char *)xname; dbg(" Searching for \"%s\"", name); - if ((pathname = search_library_path(name, ld_library_path)) != NULL || - (refobj != NULL && - (pathname = search_library_path(name, refobj->rpath)) != NULL) || - (pathname = search_library_path(name, gethints())) != NULL || - (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL) - return pathname; + /* + * If refobj->rpath != NULL, then refobj->runpath is NULL. Fall + * back to pre-conforming behaviour if user requested so with + * LD_LIBRARY_PATH_RPATH environment variable and ignore -z + * nodeflib. + */ + if (objgiven && refobj->rpath != NULL && ld_library_path_rpath) { + if ((pathname = search_library_path(name, ld_library_path)) != NULL || + (refobj != NULL && + (pathname = search_library_path(name, refobj->rpath)) != NULL) || + (pathname = search_library_path(name, gethints(false))) != NULL || + (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL) + return (pathname); + } else { + if ((objgiven && + (pathname = search_library_path(name, refobj->rpath)) != NULL) || + (objgiven && refobj->runpath == NULL && refobj != obj_main && + (pathname = search_library_path(name, obj_main->rpath)) != NULL) || + (pathname = search_library_path(name, ld_library_path)) != NULL || + (objgiven && + (pathname = search_library_path(name, refobj->runpath)) != NULL) || + (pathname = search_library_path(name, gethints(refobj->z_nodeflib))) + != NULL || + (objgiven && !refobj->z_nodeflib && + (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL)) + return (pathname); + } - if(refobj != NULL && refobj->path != NULL) { + if (objgiven && refobj->path != NULL) { _rtld_error("Shared object \"%s\" not found, required by \"%s\"", name, basename(refobj->path)); } else { @@ -1520,41 +1573,142 @@ find_symdef(unsigned long symnum, const /* * Return the search path from the ldconfig hints file, reading it if - * necessary. Returns NULL if there are problems with the hints file, + * necessary. If nostdlib is true, then the default search paths are + * not added to result. + * + * Returns NULL if there are problems with the hints file, * or if the search path there is empty. */ static const char * -gethints(void) +gethints(bool nostdlib) { - static char *hints; - - if (hints == NULL) { - int fd; + static char *hints, *filtered_path; struct elfhints_hdr hdr; + struct fill_search_info_args sargs, hargs; + struct dl_serinfo smeta, hmeta, *SLPinfo, *hintinfo; + struct dl_serpath *SLPpath, *hintpath; char *p; + unsigned int SLPndx, hintndx, fndx, fcount; + int fd; + size_t flen; + bool skip; - /* Keep from trying again in case the hints file is bad. */ - hints = ""; - - if ((fd = open(ld_elf_hints_path, O_RDONLY)) == -1) - return NULL; - if (read(fd, &hdr, sizeof hdr) != sizeof hdr || - hdr.magic != ELFHINTS_MAGIC || - hdr.version != 1) { - close(fd); - return NULL; + /* First call, read the hints file */ + if (hints == NULL) { + /* Keep from trying again in case the hints file is bad. */ + hints = ""; + + if ((fd = open(ld_elf_hints_path, O_RDONLY)) == -1) + return (NULL); + if (read(fd, &hdr, sizeof hdr) != sizeof hdr || + hdr.magic != ELFHINTS_MAGIC || + hdr.version != 1) { + close(fd); + return (NULL); + } + p = xmalloc(hdr.dirlistlen + 1); + if (lseek(fd, hdr.strtab + hdr.dirlist, SEEK_SET) == -1 || + read(fd, p, hdr.dirlistlen + 1) != + (ssize_t)hdr.dirlistlen + 1) { + free(p); + close(fd); + return (NULL); + } + hints = p; + close(fd); } - p = xmalloc(hdr.dirlistlen + 1); - if (lseek(fd, hdr.strtab + hdr.dirlist, SEEK_SET) == -1 || - read(fd, p, hdr.dirlistlen + 1) != (ssize_t)hdr.dirlistlen + 1) { - free(p); - close(fd); - return NULL; + + /* + * If caller agreed to receive list which includes the default + * paths, we are done. Otherwise, if we still did not + * calculated filtered result, do it now. + */ + if (!nostdlib) + return (hints[0] != '\0' ? hints : NULL); + if (filtered_path != NULL) + goto filt_ret; + + /* + * Obtain the list of all configured search paths, and the + * list of the default paths. + * + * First estimate the size of the results. + */ + smeta.dls_size = __offsetof(struct dl_serinfo, dls_serpath); + smeta.dls_cnt = 0; + hmeta.dls_size = __offsetof(struct dl_serinfo, dls_serpath); + hmeta.dls_cnt = 0; + + sargs.request = RTLD_DI_SERINFOSIZE; + sargs.serinfo = &smeta; + hargs.request = RTLD_DI_SERINFOSIZE; + hargs.serinfo = &hmeta; + + path_enumerate(STANDARD_LIBRARY_PATH, fill_search_info, &sargs); + path_enumerate(p, fill_search_info, &hargs); + + SLPinfo = xmalloc(smeta.dls_size); + hintinfo = xmalloc(hmeta.dls_size); + + /* + * Next fetch both sets of paths. + */ + sargs.request = RTLD_DI_SERINFO; + sargs.serinfo = SLPinfo; + sargs.serpath = &SLPinfo->dls_serpath[0]; + sargs.strspace = (char *)&SLPinfo->dls_serpath[smeta.dls_cnt]; + + hargs.request = RTLD_DI_SERINFO; + hargs.serinfo = hintinfo; + hargs.serpath = &hintinfo->dls_serpath[0]; + hargs.strspace = (char *)&hintinfo->dls_serpath[hmeta.dls_cnt]; + + path_enumerate(STANDARD_LIBRARY_PATH, fill_search_info, &sargs); + path_enumerate(p, fill_search_info, &hargs); + + /* + * Now calculate the difference between two sets, by excluding + * standard paths from the full set. + */ + fndx = 0; + fcount = 0; + filtered_path = xmalloc(hdr.dirlistlen + 1); + hintpath = &hintinfo->dls_serpath[0]; + for (hintndx = 0; hintndx < hmeta.dls_cnt; hintndx++, hintpath++) { + skip = false; + SLPpath = &SLPinfo->dls_serpath[0]; + /* + * Check each standard path against current. + */ + for (SLPndx = 0; SLPndx < smeta.dls_cnt; SLPndx++, SLPpath++) { + /* matched, skip the path */ + if (!strcmp(hintpath->dls_name, SLPpath->dls_name)) { + skip = true; + break; + } + } + if (skip) + continue; + /* + * Not matched against any standard path, add the path + * to result. Separate consequtive paths with ':'. + */ + if (fcount > 0) { + filtered_path[fndx] = ':'; + fndx++; + } + fcount++; + flen = strlen(hintpath->dls_name); + strncpy((filtered_path + fndx), hintpath->dls_name, flen); + fndx += flen; } - hints = p; - close(fd); - } - return hints[0] != '\0' ? hints : NULL; + filtered_path[fndx] = '\0'; + + free(SLPinfo); + free(hintinfo); + +filt_ret: + return (filtered_path[0] != '\0' ? filtered_path : NULL); } static void @@ -1600,6 +1754,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo * Obj_Entry objtmp; /* Temporary rtld object */ const Elf_Dyn *dyn_rpath; const Elf_Dyn *dyn_soname; + const Elf_Dyn *dyn_runpath; /* * Conjure up an Obj_Entry structure for the dynamic linker. @@ -1616,7 +1771,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo * #endif if (RTLD_IS_DYNAMIC()) { objtmp.dynamic = rtld_dynamic(&objtmp); - digest_dynamic1(&objtmp, 1, &dyn_rpath, &dyn_soname); + digest_dynamic1(&objtmp, 1, &dyn_rpath, &dyn_soname, &dyn_runpath); assert(objtmp.needed == NULL); #if !defined(__mips__) /* MIPS has a bogus DT_TEXTREL. */ @@ -1642,7 +1797,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo * if (aux_info[AT_OSRELDATE] != NULL) osreldate = aux_info[AT_OSRELDATE]->a_un.a_val; - digest_dynamic2(&obj_rtld, dyn_rpath, dyn_soname); + digest_dynamic2(&obj_rtld, dyn_rpath, dyn_soname, dyn_runpath); /* Replace the path with a dynamically allocated copy. */ obj_rtld.path = xstrdup(PATH_RTLD); @@ -3070,14 +3225,6 @@ dl_iterate_phdr(__dl_iterate_hdr_callbac return (error); } -struct fill_search_info_args { - int request; - unsigned int flags; - Dl_serinfo *serinfo; - Dl_serpath *serpath; - char *strspace; -}; - static void * fill_search_info(const char *dir, size_t dirlen, void *param) { @@ -3087,7 +3234,7 @@ fill_search_info(const char *dir, size_t if (arg->request == RTLD_DI_SERINFOSIZE) { arg->serinfo->dls_cnt ++; - arg->serinfo->dls_size += sizeof(Dl_serpath) + dirlen + 1; + arg->serinfo->dls_size += sizeof(struct dl_serpath) + dirlen + 1; } else { struct dl_serpath *s_entry; @@ -3117,10 +3264,12 @@ do_search_info(const Obj_Entry *obj, int _info.dls_size = __offsetof(struct dl_serinfo, dls_serpath); _info.dls_cnt = 0; - path_enumerate(ld_library_path, fill_search_info, &args); path_enumerate(obj->rpath, fill_search_info, &args); - path_enumerate(gethints(), fill_search_info, &args); - path_enumerate(STANDARD_LIBRARY_PATH, fill_search_info, &args); + path_enumerate(ld_library_path, fill_search_info, &args); + path_enumerate(obj->runpath, fill_search_info, &args); + path_enumerate(gethints(obj->z_nodeflib), fill_search_info, &args); + if (!obj->z_nodeflib) + path_enumerate(STANDARD_LIBRARY_PATH, fill_search_info, &args); if (request == RTLD_DI_SERINFOSIZE) { @@ -3139,20 +3288,26 @@ do_search_info(const Obj_Entry *obj, int args.serpath = &info->dls_serpath[0]; args.strspace = (char *)&info->dls_serpath[_info.dls_cnt]; + args.flags = LA_SER_RUNPATH; + if (path_enumerate(obj->rpath, fill_search_info, &args) != NULL) + return (-1); + args.flags = LA_SER_LIBPATH; if (path_enumerate(ld_library_path, fill_search_info, &args) != NULL) return (-1); args.flags = LA_SER_RUNPATH; - if (path_enumerate(obj->rpath, fill_search_info, &args) != NULL) + if (path_enumerate(obj->runpath, fill_search_info, &args) != NULL) return (-1); args.flags = LA_SER_CONFIG; - if (path_enumerate(gethints(), fill_search_info, &args) != NULL) + if (path_enumerate(gethints(obj->z_nodeflib), fill_search_info, &args) + != NULL) return (-1); args.flags = LA_SER_DEFAULT; - if (path_enumerate(STANDARD_LIBRARY_PATH, fill_search_info, &args) != NULL) + if (!obj->z_nodeflib && + path_enumerate(STANDARD_LIBRARY_PATH, fill_search_info, &args) != NULL) return (-1); return (0); } Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Sun Jul 15 10:49:16 2012 (r238470) +++ head/libexec/rtld-elf/rtld.h Sun Jul 15 10:53:48 2012 (r238471) @@ -222,6 +222,7 @@ typedef struct Struct_Obj_Entry { const Elf_Hashelt *chain_zero_gnu; /* GNU hash table value array (Zeroed) */ char *rpath; /* Search path specified in object */ + char *runpath; /* Search path with different priority */ Needed_Entry *needed; /* Shared objects needed by this one (%) */ Needed_Entry *needed_filtees; Needed_Entry *needed_aux_filtees; @@ -258,6 +259,7 @@ typedef struct Struct_Obj_Entry { bool z_nodelete : 1; /* Do not unload the object and dependencies */ bool z_noopen : 1; /* Do not load on dlopen */ bool z_loadfltr : 1; /* Immediately load filtees */ + bool z_nodeflib : 1; /* Don't search default library path */ bool ref_nodel : 1; /* Refcount increased to prevent dlclose */ bool init_scanned: 1; /* Object is already on init list. */ bool on_fini_list: 1; /* Object is already on fini list. */ @@ -321,6 +323,14 @@ struct Struct_RtldLockState { sigjmp_buf env; }; +struct fill_search_info_args { + int request; + unsigned int flags; + struct dl_serinfo *serinfo; + struct dl_serpath *serpath; + char *strspace; +}; + /* * The pack of arguments and results for the symbol lookup functions. */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 10:54:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1E04106585C; Sun, 15 Jul 2012 10:54:11 +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 9272B8FC17; Sun, 15 Jul 2012 10:54: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 q6FAsBuw043054; Sun, 15 Jul 2012 10:54:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FAsBIk043046; Sun, 15 Jul 2012 10:54:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207151054.q6FAsBIk043046@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 15 Jul 2012 10:54: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: r238472 - in head/contrib/gcc/config: arm i386 ia64 mips rs6000 sparc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 10:54:11 -0000 Author: kib Date: Sun Jul 15 10:54:10 2012 New Revision: 238472 URL: http://svn.freebsd.org/changeset/base/238472 Log: Pass --enable-new-dtags to the linker invocation by default. If desired, one can turn off the generation of post-ELF standard dtags by overriding it with --disable-new-dtags after the default switch. Immediate effect of the change is that -rpath path is now stored both in DT_RPATH and DT_RUNPATH tags, which is the right way to provide rpath for dynamic linker supporting DT_RUNPATH per specification. Reviewed by: kan MFC after: 1 month Modified: head/contrib/gcc/config/arm/freebsd.h head/contrib/gcc/config/i386/freebsd.h head/contrib/gcc/config/i386/freebsd64.h head/contrib/gcc/config/ia64/freebsd.h head/contrib/gcc/config/mips/freebsd.h head/contrib/gcc/config/rs6000/freebsd.h head/contrib/gcc/config/sparc/freebsd.h Modified: head/contrib/gcc/config/arm/freebsd.h ============================================================================== --- head/contrib/gcc/config/arm/freebsd.h Sun Jul 15 10:53:48 2012 (r238471) +++ head/contrib/gcc/config/arm/freebsd.h Sun Jul 15 10:54:10 2012 (r238472) @@ -50,7 +50,7 @@ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ - %{!static:--hash-style=both} \ + %{!static:--hash-style=both --enable-new-dtags} \ %{symbolic:-Bsymbolic} \ -X %{mbig-endian:-EB} %{mlittle-endian:-EL}" Modified: head/contrib/gcc/config/i386/freebsd.h ============================================================================== --- head/contrib/gcc/config/i386/freebsd.h Sun Jul 15 10:53:48 2012 (r238471) +++ head/contrib/gcc/config/i386/freebsd.h Sun Jul 15 10:54:10 2012 (r238472) @@ -49,7 +49,7 @@ Boston, MA 02110-1301, USA. */ %{rdynamic: -export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ - %{!static:--hash-style=both} \ + %{!static:--hash-style=both --enable-new-dtags} \ %{symbolic:-Bsymbolic}" /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h Modified: head/contrib/gcc/config/i386/freebsd64.h ============================================================================== --- head/contrib/gcc/config/i386/freebsd64.h Sun Jul 15 10:53:48 2012 (r238471) +++ head/contrib/gcc/config/i386/freebsd64.h Sun Jul 15 10:54:10 2012 (r238472) @@ -54,5 +54,5 @@ Boston, MA 02110-1301, USA. */ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ - %{!static:--hash-style=both} \ + %{!static:--hash-style=both --enable-new-dtags} \ %{symbolic:-Bsymbolic}" Modified: head/contrib/gcc/config/ia64/freebsd.h ============================================================================== --- head/contrib/gcc/config/ia64/freebsd.h Sun Jul 15 10:53:48 2012 (r238471) +++ head/contrib/gcc/config/ia64/freebsd.h Sun Jul 15 10:54:10 2012 (r238472) @@ -27,6 +27,7 @@ Boston, MA 02110-1301, USA. */ %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ + %{!static:--enable-new-dtags} \ %{symbolic:-Bsymbolic} \ %{!shared: \ %{!static: \ Modified: head/contrib/gcc/config/mips/freebsd.h ============================================================================== --- head/contrib/gcc/config/mips/freebsd.h Sun Jul 15 10:53:48 2012 (r238471) +++ head/contrib/gcc/config/mips/freebsd.h Sun Jul 15 10:54:10 2012 (r238472) @@ -56,6 +56,7 @@ Boston, MA 02110-1301, USA. */ %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ + %{!static:--enable-new-dtags} \ %{!shared: \ %{!static: \ %{rdynamic: -export-dynamic} \ Modified: head/contrib/gcc/config/rs6000/freebsd.h ============================================================================== --- head/contrib/gcc/config/rs6000/freebsd.h Sun Jul 15 10:53:48 2012 (r238471) +++ head/contrib/gcc/config/rs6000/freebsd.h Sun Jul 15 10:54:10 2012 (r238472) @@ -180,6 +180,7 @@ extern int dot_symbols; %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ + %{!static:--enable-new-dtags} \ %{!shared: \ %{!static: \ %{rdynamic: -export-dynamic} \ Modified: head/contrib/gcc/config/sparc/freebsd.h ============================================================================== --- head/contrib/gcc/config/sparc/freebsd.h Sun Jul 15 10:53:48 2012 (r238471) +++ head/contrib/gcc/config/sparc/freebsd.h Sun Jul 15 10:54:10 2012 (r238472) @@ -53,7 +53,7 @@ Boston, MA 02110-1301, USA. */ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ - %{!static:--hash-style=both} \ + %{!static:--hash-style=both --enable-new-dtags} \ %{symbolic:-Bsymbolic}" From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 10:55:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0FA7106566C; Sun, 15 Jul 2012 10:55:43 +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 BBD958FC28; Sun, 15 Jul 2012 10:55:43 +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 q6FAthkE043161; Sun, 15 Jul 2012 10:55:43 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FAthDK043159; Sun, 15 Jul 2012 10:55:43 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207151055.q6FAthDK043159@svn.freebsd.org> From: Christian Brueffer Date: Sun, 15 Jul 2012 10:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238473 - stable/9/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 10:55:43 -0000 Author: brueffer Date: Sun Jul 15 10:55:43 2012 New Revision: 238473 URL: http://svn.freebsd.org/changeset/base/238473 Log: MFC: r237921 Similar to all.log, mention that /var/log/console.log has to be created and chmod'ed to make logging work. Approved by: re (kib) Modified: stable/9/etc/syslog.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/syslog.conf ============================================================================== --- stable/9/etc/syslog.conf Sun Jul 15 10:54:10 2012 (r238472) +++ stable/9/etc/syslog.conf Sun Jul 15 10:55:43 2012 (r238473) @@ -16,6 +16,7 @@ cron.* /var/log/cron *.=debug /var/log/debug.log *.emerg * # uncomment this to log all writes to /dev/console to /var/log/console.log +# touch /var/log/console.log and chmod it to mode 600 before it will work #console.info /var/log/console.log # uncomment this to enable logging of all log messages to /var/log/all.log # touch /var/log/all.log and chmod it to mode 600 before it will work From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 11:04:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDD8C1065672; Sun, 15 Jul 2012 11:04:35 +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 C8F798FC14; Sun, 15 Jul 2012 11:04: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 q6FB4Zue043582; Sun, 15 Jul 2012 11:04:35 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FB4ZTF043580; Sun, 15 Jul 2012 11:04:35 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207151104.q6FB4ZTF043580@svn.freebsd.org> From: Christian Brueffer Date: Sun, 15 Jul 2012 11:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238474 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:04:36 -0000 Author: brueffer Date: Sun Jul 15 11:04:35 2012 New Revision: 238474 URL: http://svn.freebsd.org/changeset/base/238474 Log: MFC: r237921 Similar to all.log, mention that /var/log/console.log has to be created and chmod'ed to make logging work. Modified: stable/8/etc/syslog.conf Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/syslog.conf ============================================================================== --- stable/8/etc/syslog.conf Sun Jul 15 10:55:43 2012 (r238473) +++ stable/8/etc/syslog.conf Sun Jul 15 11:04:35 2012 (r238474) @@ -16,6 +16,7 @@ cron.* /var/log/cron *.=debug /var/log/debug.log *.emerg * # uncomment this to log all writes to /dev/console to /var/log/console.log +# touch /var/log/console.log and chmod it to mode 600 before it will work #console.info /var/log/console.log # uncomment this to enable logging of all log messages to /var/log/all.log # touch /var/log/all.log and chmod it to mode 600 before it will work From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 11:04:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07C8B1065694; Sun, 15 Jul 2012 11:04:50 +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 DD80E8FC19; Sun, 15 Jul 2012 11:04: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 q6FB4n3c043632; Sun, 15 Jul 2012 11:04:49 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FB4noC043626; Sun, 15 Jul 2012 11:04:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207151104.q6FB4noC043626@svn.freebsd.org> From: Michael Tuexen Date: Sun, 15 Jul 2012 11:04: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: r238475 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:04:50 -0000 Author: tuexen Date: Sun Jul 15 11:04:49 2012 New Revision: 238475 URL: http://svn.freebsd.org/changeset/base/238475 Log: #ifdef INET and INET6 consistently. This also fixes a bug, where it was done wrong. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Jul 15 11:04:35 2012 (r238474) +++ head/sys/netinet/sctp_output.c Sun Jul 15 11:04:49 2012 (r238475) @@ -8432,12 +8432,14 @@ again_one_more_time: } /* now lets add any data within the MTU constraints */ switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { +#ifdef INET case AF_INET: if (net->mtu > (sizeof(struct ip) + sizeof(struct sctphdr))) omtu = net->mtu - (sizeof(struct ip) + sizeof(struct sctphdr)); else omtu = 0; break; +#endif #ifdef INET6 case AF_INET6: if (net->mtu > (sizeof(struct ip6_hdr) + sizeof(struct sctphdr))) @@ -12165,7 +12167,7 @@ sctp_lower_sosend(struct socket *so, union sctp_sockstore *raddr = (union sctp_sockstore *)addr; switch (raddr->sa.sa_family) { -#if defined(INET) +#ifdef INET case AF_INET: if (raddr->sin.sin_len != sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); @@ -12175,7 +12177,7 @@ sctp_lower_sosend(struct socket *so, port = raddr->sin.sin_port; break; #endif -#if defined(INET6) +#ifdef INET6 case AF_INET6: if (raddr->sin6.sin6_len != sizeof(struct sockaddr_in6)) { SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Jul 15 11:04:35 2012 (r238474) +++ head/sys/netinet/sctp_pcb.c Sun Jul 15 11:04:49 2012 (r238475) @@ -3016,6 +3016,7 @@ continue_anyway: memset(&store_sa, 0, sizeof(store_sa)); switch (addr->sa_family) { +#ifdef INET case AF_INET: { struct sockaddr_in *sin; @@ -3025,6 +3026,8 @@ continue_anyway: sin->sin_port = 0; break; } +#endif +#ifdef INET6 case AF_INET6: { struct sockaddr_in6 *sin6; @@ -3034,6 +3037,7 @@ continue_anyway: sin6->sin6_port = 0; break; } +#endif default: break; } @@ -5195,12 +5199,16 @@ sctp_destination_is_reachable(struct sct } /* NOTE: all "scope" checks are done when local addresses are added */ switch (destaddr->sa_family) { +#ifdef INET6 case AF_INET6: answer = inp->ip_inp.inp.inp_vflag & INP_IPV6; break; +#endif +#ifdef INET case AF_INET: answer = inp->ip_inp.inp.inp_vflag & INP_IPV4; break; +#endif default: /* invalid family, so it's unreachable */ answer = 0; @@ -5291,7 +5299,7 @@ sctp_add_local_addr_ep(struct sctp_inpcb inp->ip_inp.inp.inp_vflag |= INP_IPV6; break; #endif -#ifdef INET6 +#ifdef INET case AF_INET: inp->ip_inp.inp.inp_vflag |= INP_IPV4; break; Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun Jul 15 11:04:35 2012 (r238474) +++ head/sys/netinet/sctp_usrreq.c Sun Jul 15 11:04:49 2012 (r238475) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if defined(INET6) +#ifdef INET6 #endif #include #include Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Jul 15 11:04:35 2012 (r238474) +++ head/sys/netinet/sctputil.c Sun Jul 15 11:04:49 2012 (r238475) @@ -5637,7 +5637,7 @@ found_one: memcpy(from, &sin6, sizeof(struct sockaddr_in6)); } #endif -#if defined(INET6) +#ifdef INET6 { struct sockaddr_in6 lsa6, *from6; @@ -6534,7 +6534,7 @@ sctp_bindx_delete_address(struct sctp_in return; } addr_touse = sa; -#if defined(INET6) +#ifdef INET6 if (sa->sa_family == AF_INET6) { struct sockaddr_in6 *sin6; Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sun Jul 15 11:04:35 2012 (r238474) +++ head/sys/netinet6/sctp6_usrreq.c Sun Jul 15 11:04:49 2012 (r238475) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if defined(INET6) +#ifdef INET6 #include #endif #include @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #ifdef IPSEC #include -#if defined(INET6) +#ifdef INET6 #include #endif /* INET6 */ #endif /* IPSEC */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 11:13:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10D2A106566B; Sun, 15 Jul 2012 11:13:10 +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 EF3588FC0A; Sun, 15 Jul 2012 11: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 q6FBD9h9044067; Sun, 15 Jul 2012 11:13:09 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FBD9dX044065; Sun, 15 Jul 2012 11:13:09 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201207151113.q6FBD9dX044065@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 15 Jul 2012 11:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238476 - stable/9/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:13:10 -0000 Author: bz Date: Sun Jul 15 11:13:09 2012 New Revision: 238476 URL: http://svn.freebsd.org/changeset/base/238476 Log: MFC r238222: As mentioned in the commit message of r237571 (copied from a prototype patch of mine) also check if the 2nd in6_setscope() failed and return the error in that case. Approved by: re (kib) Modified: stable/9/sys/netinet6/in6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Sun Jul 15 11:04:49 2012 (r238475) +++ stable/9/sys/netinet6/in6.c Sun Jul 15 11:13:09 2012 (r238476) @@ -1341,7 +1341,9 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru sin6.sin6_family = AF_INET6; memcpy(&sin6.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, sizeof(sin6.sin6_addr)); - in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + error = in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + if (error != 0) + return (error); } rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 11:18:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 429AA106566B; Sun, 15 Jul 2012 11:18:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA628FC16; Sun, 15 Jul 2012 11:18: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 q6FBIrhg044357; Sun, 15 Jul 2012 11:18:53 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FBIqV3044355; Sun, 15 Jul 2012 11:18:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207151118.q6FBIqV3044355@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 15 Jul 2012 11:18: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: r238477 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:18:53 -0000 Author: jilles Date: Sun Jul 15 11:18:52 2012 New Revision: 238477 URL: http://svn.freebsd.org/changeset/base/238477 Log: sh: Reset pendingsigs before checking pending traps, not after. Otherwise, a signal arriving at exactly the right moment might not be processed until another signal arrived. Modified: head/bin/sh/trap.c Modified: head/bin/sh/trap.c ============================================================================== --- head/bin/sh/trap.c Sun Jul 15 11:13:09 2012 (r238476) +++ head/bin/sh/trap.c Sun Jul 15 11:18:52 2012 (r238477) @@ -416,6 +416,7 @@ dotrap(void) in_dotrap++; for (;;) { + pendingsigs = 0; for (i = 1; i < NSIG; i++) { if (gotsig[i]) { gotsig[i] = 0; @@ -467,7 +468,6 @@ dotrap(void) break; } in_dotrap--; - pendingsigs = 0; } From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 11:26:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E08106564A; Sun, 15 Jul 2012 11:26:25 +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 E584B8FC18; Sun, 15 Jul 2012 11:26: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 q6FBQO3V044684; Sun, 15 Jul 2012 11:26:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FBQO7X044682; Sun, 15 Jul 2012 11:26:24 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207151126.q6FBQO7X044682@svn.freebsd.org> From: Christian Brueffer Date: Sun, 15 Jul 2012 11:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238478 - stable/9/usr.bin/stat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:26:25 -0000 Author: brueffer Date: Sun Jul 15 11:26:24 2012 New Revision: 238478 URL: http://svn.freebsd.org/changeset/base/238478 Log: MFC: r234577 Remove duplicate -l description. Approved by: re (kib) Modified: stable/9/usr.bin/stat/stat.1 Directory Properties: stable/9/usr.bin/stat/ (props changed) Modified: stable/9/usr.bin/stat/stat.1 ============================================================================== --- stable/9/usr.bin/stat/stat.1 Sun Jul 15 11:18:52 2012 (r238477) +++ stable/9/usr.bin/stat/stat.1 Sun Jul 15 11:26:24 2012 (r238478) @@ -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-all@FreeBSD.ORG Sun Jul 15 11:27:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6C9A1065677; Sun, 15 Jul 2012 11:27:15 +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 B0C4C8FC1F; Sun, 15 Jul 2012 11:27: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 q6FBRF0d044758; Sun, 15 Jul 2012 11:27:15 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FBRFR9044756; Sun, 15 Jul 2012 11:27:15 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201207151127.q6FBRFR9044756@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 15 Jul 2012 11:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238479 - stable/9/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:27:15 -0000 Author: bz Date: Sun Jul 15 11:27:15 2012 New Revision: 238479 URL: http://svn.freebsd.org/changeset/base/238479 Log: MFC r238248: Implement handling of "atomic fragements" as outlined in draft-gont-6man-ipv6-atomic-fragments to mitigate one class of possible fragmentation-based attacks. Approved by: re (kib) Modified: stable/9/sys/netinet6/frag6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/frag6.c ============================================================================== --- stable/9/sys/netinet6/frag6.c Sun Jul 15 11:26:24 2012 (r238478) +++ stable/9/sys/netinet6/frag6.c Sun Jul 15 11:27:15 2012 (r238479) @@ -221,6 +221,19 @@ frag6_input(struct mbuf **mp, int *offp, /* offset now points to data portion */ offset += sizeof(struct ip6_frag); + /* + * XXX-BZ RFC XXXX (draft-gont-6man-ipv6-atomic-fragments) + * Handle "atomic" fragments (offset and m bit set to 0) upfront, + * unrelated to any reassembly. Just skip the fragment header. + */ + if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { + /* XXX-BZ we want dedicated counters for this. */ + V_ip6stat.ip6s_reassembled++; + in6_ifstat_inc(dstifp, ifs6_reass_ok); + *offp = offset; + return (ip6f->ip6f_nxt); + } + IP6Q_LOCK(); /* From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 11:28:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05D141065670; Sun, 15 Jul 2012 11:28:04 +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 E4E3A8FC1A; Sun, 15 Jul 2012 11:28: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 q6FBS3iR044836; Sun, 15 Jul 2012 11:28:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FBS34j044834; Sun, 15 Jul 2012 11:28:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207151128.q6FBS34j044834@svn.freebsd.org> From: Christian Brueffer Date: Sun, 15 Jul 2012 11:28:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238480 - stable/8/usr.bin/stat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:28:04 -0000 Author: brueffer Date: Sun Jul 15 11:28:03 2012 New Revision: 238480 URL: http://svn.freebsd.org/changeset/base/238480 Log: MFC: r234577 Remove duplicate -l description. Modified: stable/8/usr.bin/stat/stat.1 Directory Properties: stable/8/usr.bin/stat/ (props changed) Modified: stable/8/usr.bin/stat/stat.1 ============================================================================== --- stable/8/usr.bin/stat/stat.1 Sun Jul 15 11:27:15 2012 (r238479) +++ stable/8/usr.bin/stat/stat.1 Sun Jul 15 11:28:03 2012 (r238480) @@ -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-all@FreeBSD.ORG Sun Jul 15 11:39:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DB29106564A; Sun, 15 Jul 2012 11:39:36 +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 647DB8FC16; Sun, 15 Jul 2012 11:39: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 q6FBdaPc045364; Sun, 15 Jul 2012 11:39:36 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FBda4c045344; Sun, 15 Jul 2012 11:39:36 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201207151139.q6FBda4c045344@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 15 Jul 2012 11:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238481 - in stable/9: . bin/rcp etc include lib/libcrypt lib/libutil libexec/rshd release/picobsd/tinyware/passwd share/examples/etc sys/mips/rmi usr.bin/login usr.bin/passwd usr.bin/r... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:39:36 -0000 Author: des Date: Sun Jul 15 11:39:35 2012 New Revision: 238481 URL: http://svn.freebsd.org/changeset/base/238481 Log: MFH r236751: document sha256 / sha512 support MFH r236892: remove mention of auth.conf from programs that don't use it MFH r236963: remove dead code relating to auth.conf MFH r236965 r236966 r236967 r237005 r237006 r237011: retire auth.conf Approved by: re Deleted: stable/9/etc/auth.conf stable/9/lib/libutil/auth.3 stable/9/lib/libutil/auth.conf.5 Modified: stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/bin/rcp/rcp.1 stable/9/etc/Makefile stable/9/include/paths.h stable/9/lib/libcrypt/Makefile stable/9/lib/libcrypt/crypt.3 stable/9/lib/libcrypt/crypt.c stable/9/lib/libutil/Makefile stable/9/lib/libutil/auth.c stable/9/lib/libutil/login.conf.5 stable/9/lib/libutil/property.3 stable/9/libexec/rshd/rshd.8 stable/9/release/picobsd/tinyware/passwd/passwd.c stable/9/share/examples/etc/README.examples stable/9/sys/mips/rmi/rootfs_list.txt stable/9/usr.bin/login/login.1 stable/9/usr.bin/passwd/passwd.1 stable/9/usr.bin/rlogin/rlogin.1 stable/9/usr.bin/rsh/rsh.1 Directory Properties: stable/9/ (props changed) stable/9/bin/rcp/ (props changed) stable/9/etc/ (props changed) stable/9/include/ (props changed) stable/9/lib/libcrypt/ (props changed) stable/9/lib/libutil/ (props changed) stable/9/libexec/rshd/ (props changed) stable/9/release/picobsd/tinyware/passwd/ (props changed) stable/9/share/examples/etc/ (props changed) stable/9/sys/ (props changed) stable/9/usr.bin/login/ (props changed) stable/9/usr.bin/passwd/ (props changed) stable/9/usr.bin/rlogin/ (props changed) stable/9/usr.bin/rsh/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/ObsoleteFiles.inc Sun Jul 15 11:39:35 2012 (r238481) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20120713: auth.conf removed +OLD_FILES+=etc/auth.conf +OLD_FILES+=usr/share/examples/etc/auth.conf +OLD_FILES+=usr/share/man/man3/auth.3.gz +OLD_FILES+=usr/share/man/man5/auth.conf.5.gz # 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 Modified: stable/9/bin/rcp/rcp.1 ============================================================================== --- stable/9/bin/rcp/rcp.1 Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/bin/rcp/rcp.1 Sun Jul 15 11:39:35 2012 (r238481) @@ -116,17 +116,11 @@ The .Nm utility handles third party copies, where neither source nor target files are on the current machine. -.Sh FILES -.Bl -tag -width ".Pa /etc/auth.conf" -compact -.It Pa /etc/auth.conf -configure authentication services -.El .Sh SEE ALSO .Xr cp 1 , .Xr ftp 1 , .Xr rlogin 1 , .Xr rsh 1 , -.Xr auth.conf 5 , .Xr hosts.equiv 5 .Sh HISTORY The Modified: stable/9/etc/Makefile ============================================================================== --- stable/9/etc/Makefile Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/etc/Makefile Sun Jul 15 11:39:35 2012 (r238481) @@ -7,18 +7,47 @@ SUBDIR= sendmail .endif -BIN1= auth.conf \ - crontab devd.conf devfs.conf \ - ddb.conf dhclient.conf disktab fbtab \ - ftpusers gettytab group \ - hosts hosts.allow hosts.equiv \ - inetd.conf libalias.conf login.access login.conf mac.conf motd \ - netconfig network.subr networks newsyslog.conf nsswitch.conf \ - phones profile protocols \ - rc rc.bsdextended rc.firewall rc.initdiskless \ - rc.sendmail rc.shutdown \ - rc.subr remote rpc services shells \ - sysctl.conf syslog.conf termcap.small +BIN1= crontab \ + devd.conf \ + devfs.conf \ + ddb.conf \ + dhclient.conf \ + disktab \ + fbtab \ + ftpusers \ + gettytab \ + group \ + hosts \ + hosts.allow \ + hosts.equiv \ + inetd.conf \ + libalias.conf \ + login.access \ + login.conf \ + mac.conf \ + motd \ + netconfig \ + network.subr \ + networks \ + newsyslog.conf \ + nsswitch.conf \ + phones \ + profile \ + protocols \ + rc \ + rc.bsdextended \ + rc.firewall \ + rc.initdiskless \ + rc.sendmail \ + rc.shutdown \ + rc.subr \ + remote \ + rpc \ + services \ + shells \ + sysctl.conf \ + syslog.conf \ + termcap.small .if exists(${.CURDIR}/etc.${MACHINE}/ttys) BIN1+= etc.${MACHINE}/ttys Modified: stable/9/include/paths.h ============================================================================== --- stable/9/include/paths.h Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/include/paths.h Sun Jul 15 11:39:35 2012 (r238481) @@ -42,7 +42,6 @@ /* Locate system binaries. */ #define _PATH_SYSPATH "/sbin:/usr/sbin" -#define _PATH_AUTHCONF "/etc/auth.conf" #define _PATH_BSHELL "/bin/sh" #define _PATH_CAPABILITY "/etc/capability" #define _PATH_CAPABILITY_DB "/etc/capability.db" Modified: stable/9/lib/libcrypt/Makefile ============================================================================== --- stable/9/lib/libcrypt/Makefile Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/lib/libcrypt/Makefile Sun Jul 15 11:39:35 2012 (r238481) @@ -26,11 +26,7 @@ SRCS+= crypt-des.c crypt-blowfish.c blo CFLAGS+= -I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH .endif -# And the auth_getval() code and support. -.PATH: ${.CURDIR}/../libutil -SRCS+= auth.c property.c -.for sym in auth_getval property_find properties_read properties_free \ - MD4Init MD4Final MD4Update MD4Pad \ +.for sym in MD4Init MD4Final MD4Update MD4Pad \ MD5Init MD5Final MD5Update MD5Pad \ SHA256_Init SHA256_Final SHA256_Update \ SHA512_Init SHA512_Final SHA512_Update Modified: stable/9/lib/libcrypt/crypt.3 ============================================================================== --- stable/9/lib/libcrypt/crypt.3 Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/lib/libcrypt/crypt.3 Sun Jul 15 11:39:35 2012 (r238481) @@ -242,12 +242,6 @@ The .Fn crypt_set_format function sets the default encoding format according to the supplied .Fa string . -.Pp -The global default format can be set using the -.Pa /etc/auth.conf -file using the -.Va crypt_default -property. .Sh RETURN VALUES The .Fn crypt @@ -264,9 +258,7 @@ Otherwise, a value of 0 is returned. .Sh SEE ALSO .Xr login 1 , .Xr passwd 1 , -.Xr auth_getval 3 , .Xr getpass 3 , -.Xr auth.conf 5 , .Xr passwd 5 .Sh HISTORY A rotor-based Modified: stable/9/lib/libcrypt/crypt.c ============================================================================== --- stable/9/lib/libcrypt/crypt.c Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/lib/libcrypt/crypt.c Sun Jul 15 11:39:35 2012 (r238481) @@ -79,23 +79,23 @@ static const struct { } }; +#ifdef HAS_DES +#define CRYPT_DEFAULT "des" +#else +#define CRYPT_DEFAULT "md5" +#endif + static int crypt_type = -1; static void crypt_setdefault(void) { - char *def; size_t i; if (crypt_type != -1) return; - def = auth_getval("crypt_default"); - if (def == NULL) { - crypt_type = 0; - return; - } for (i = 0; i < sizeof(crypt_types) / sizeof(crypt_types[0]) - 1; i++) { - if (strcmp(def, crypt_types[i].name) == 0) { + if (strcmp(CRYPT_DEFAULT, crypt_types[i].name) == 0) { crypt_type = (int)i; return; } Modified: stable/9/lib/libutil/Makefile ============================================================================== --- stable/9/lib/libutil/Makefile Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/lib/libutil/Makefile Sun Jul 15 11:39:35 2012 (r238481) @@ -8,7 +8,7 @@ SHLIBDIR?= /lib LIB= util SHLIB_MAJOR= 9 -SRCS= _secure_path.c auth.c expand_number.c flopen.c fparseln.c gr_util.c \ +SRCS= _secure_path.c expand_number.c flopen.c fparseln.c gr_util.c \ hexdump.c humanize_number.c kinfo_getfile.c kinfo_getfile.c \ kinfo_getallproc.c kinfo_getproc.c kinfo_getvmmap.c kld.c \ login_auth.c login_cap.c \ @@ -27,16 +27,15 @@ CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../li MAN+= kld.3 login_auth.3 login_tty.3 pty.3 \ login_cap.3 login_class.3 login_times.3 login_ok.3 \ - _secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \ + _secure_path.3 uucplock.3 property.3 realhostname.3 \ realhostname_sa.3 trimdomain.3 fparseln.3 humanize_number.3 \ pidfile.3 flopen.3 expand_number.3 hexdump.3 \ kinfo_getfile.3 kinfo_getallproc.3 kinfo_getproc.3 \ kinfo_getvmmap.3 quotafile.3 -MAN+= login.conf.5 auth.conf.5 +MAN+= login.conf.5 MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+= property.3 properties_read.3 property.3 properties_free.3 MLINKS+= property.3 property_find.3 -MLINKS+= auth.3 auth_getval.3 MLINKS+= pty.3 openpty.3 pty.3 forkpty.3 MLINKS+=login_cap.3 login_getclassbyname.3 login_cap.3 login_close.3 \ login_cap.3 login_getclass.3 login_cap.3 login_getuserclass.3 \ Modified: stable/9/lib/libutil/auth.c ============================================================================== --- stable/9/lib/libutil/auth.c Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/lib/libutil/auth.c Sun Jul 15 11:39:35 2012 (r238481) @@ -31,40 +31,14 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include -#include - -static properties P; - -static int -initauthconf(const char *path) -{ - int fd; +#include - if (!P) { - if ((fd = open(path, O_RDONLY)) < 0) { - syslog(LOG_ERR, "initauthconf: unable to open file: %s", path); - return 1; - } - P = properties_read(fd); - close(fd); - if (!P) { - syslog(LOG_ERR, "initauthconf: unable to parse file: %s", path); - return 1; - } - } - return 0; -} +#include char * auth_getval(const char *name) { - if (!P && initauthconf(_PATH_AUTHCONF)) - return NULL; - else - return property_find(P, name); + + (void)name; + return (NULL); } Modified: stable/9/lib/libutil/login.conf.5 ============================================================================== --- stable/9/lib/libutil/login.conf.5 Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/lib/libutil/login.conf.5 Sun Jul 15 11:39:35 2012 (r238481) @@ -269,7 +269,9 @@ multiplied by 5 seconds. allowed before the login fails. .It "passwd_format string md5 The encryption format that new or changed passwords will use. -Valid values include "des", "md5" and "blf". +Valid values include "des", "md5", "blf", "sha256" and "sha512"; see +.Xr crypt 3 +for details. NIS clients using a .No non- Ns Fx NIS server should probably use "des". Modified: stable/9/lib/libutil/property.3 ============================================================================== --- stable/9/lib/libutil/property.3 Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/lib/libutil/property.3 Sun Jul 15 11:39:35 2012 (r238481) @@ -91,8 +91,6 @@ are desired, the entire value should be characters. Any line beginning with a # or ; character is assumed to be a comment and will be ignored. -.Sh SEE ALSO -.Xr auth_getval 3 .Sh AUTHORS .An Jordan Hubbard .Sh BUGS Modified: stable/9/libexec/rshd/rshd.8 ============================================================================== --- stable/9/libexec/rshd/rshd.8 Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/libexec/rshd/rshd.8 Sun Jul 15 11:39:35 2012 (r238481) @@ -237,7 +237,6 @@ and is not preceded by a flag byte. .Xr gethostbyaddr 3 , .Xr rcmd 3 , .Xr ruserok 3 , -.Xr auth.conf 5 , .Xr hosts 5 , .Xr hosts.equiv 5 , .Xr login.conf 5 , Modified: stable/9/release/picobsd/tinyware/passwd/passwd.c ============================================================================== --- stable/9/release/picobsd/tinyware/passwd/passwd.c Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/release/picobsd/tinyware/passwd/passwd.c Sun Jul 15 11:39:35 2012 (r238481) @@ -64,10 +64,6 @@ int yp_errno = YP_TRUE; extern int yp_passwd( char * ); #endif -#ifdef KERBEROS -#include "krb.h" -#endif - #include "extern.h" static void usage(void); @@ -81,26 +77,12 @@ main(argc, argv) { int ch; char *uname; -#ifdef KERBEROS - char *iflag = 0, *rflag = 0, *uflag = 0; - char *k; -#endif #ifdef YP -#ifdef KERBEROS - char realm[REALM_SZ]; -#define OPTIONS "d:h:lysfoi:r:u:" -#else #define OPTIONS "d:h:lysfo" -#endif -#else -#ifdef KERBEROS - char realm[REALM_SZ]; -#define OPTIONS "li:r:u:" #else #define OPTIONS "l" #endif -#endif #ifdef YP int res = 0; @@ -113,17 +95,6 @@ main(argc, argv) case 'l': /* change local password file */ use_local_passwd = 1; break; -#ifdef KERBEROS - case 'i': - iflag = optarg; - break; - case 'r': - rflag = optarg; - break; - case 'u': - uflag = optarg; - break; -#endif /* KERBEROS */ #ifdef YP case 'y': /* Change NIS password */ __use_yp = 1; @@ -182,46 +153,29 @@ main(argc, argv) /* * If NIS is turned on in the password database, use it, else punt. */ -#ifdef KERBEROS - if (__use_yp || (iflag == NULL && rflag == NULL && uflag == NULL)) { -#endif - res = use_yp(uname, 0, 0); - if (res == USER_YP_ONLY) { - if (!use_local_passwd) { - exit(yp_passwd(uname)); - } else { + res = use_yp(uname, 0, 0); + if (res == USER_YP_ONLY) { + if (!use_local_passwd) { + exit(yp_passwd(uname)); + } else { /* * Reject -l flag if NIS is turned on and the user * doesn't exist in the local password database. */ - errx(1, "unknown local user: %s", uname); - } - } else if (res == USER_LOCAL_ONLY) { - /* - * Reject -y flag if user only exists locally. - */ - if (__use_yp) - errx(1, "unknown NIS user: %s", uname); - } else if (res == USER_YP_AND_LOCAL) { - if (!use_local_passwd && (yp_in_pw_file || __use_yp)) - exit(yp_passwd(uname)); + errx(1, "unknown local user: %s", uname); } -#ifdef KERBEROS + } else if (res == USER_LOCAL_ONLY) { + /* + * Reject -y flag if user only exists locally. + */ + if (__use_yp) + errx(1, "unknown NIS user: %s", uname); + } else if (res == USER_YP_AND_LOCAL) { + if (!use_local_passwd && (yp_in_pw_file || __use_yp)) + exit(yp_passwd(uname)); } #endif -#endif - if (!use_local_passwd) { -#ifdef KERBEROS - k = auth_getval("auth_list"); - if (k && strstr(k, "kerberos")) - if(krb_get_lrealm(realm, 0) == KSUCCESS) { - setuid(getuid()); - fprintf(stderr, "realm %s\n", realm); - exit(krb_passwd(argv[0], iflag, rflag, uflag)); - } -#endif - } exit(local_passwd(uname)); } @@ -230,21 +184,10 @@ usage() { #ifdef YP -#ifdef KERBEROS - fprintf(stderr, "%s\n%s\n", - "usage: passwd [-l] [-i instance] [-r realm] [-u fullname]", - " passwd [-l] [-y] [-o] [-d domain [-h host]] [user]"); -#else (void)fprintf(stderr, "usage: passwd [-l] [-y] [-o] [-d domain [-h host]] [user]\n"); -#endif #else -#ifdef KERBEROS - fprintf(stderr, - "usage: passwd [-l] [-i instance] [-r realm] [-u fullname] [user]\n"); -#else - (void)fprintf(stderr, "usage: passwd user\n"); -#endif + (void)fprintf(stderr, "usage: passwd [-l] user\n"); #endif exit(1); } Modified: stable/9/share/examples/etc/README.examples ============================================================================== --- stable/9/share/examples/etc/README.examples Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/share/examples/etc/README.examples Sun Jul 15 11:39:35 2012 (r238481) @@ -9,7 +9,6 @@ This directory contains the following fi amd.map - filesystem automounter lookup resolution map (see amd(8)) apmd.conf - configuration file for apmd(8) -auth.conf - authentication capability database (see auth.conf(5)) bsd-style-copyright - copyright style for bsd system crontab - system scheduled command table (see crontab(5)) csh.cshrc - sample .cshrc (see csh(1)) Modified: stable/9/sys/mips/rmi/rootfs_list.txt ============================================================================== --- stable/9/sys/mips/rmi/rootfs_list.txt Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/sys/mips/rmi/rootfs_list.txt Sun Jul 15 11:39:35 2012 (r238481) @@ -1,3 +1,5 @@ +# $FreeBSD$ +# # This is the list of files that # should be in your rootfs (copy it from # the build world nfsmount dir. When the rge0 @@ -321,7 +323,6 @@ ./etc/ssh/moduli ./etc/ssl ./etc/ssl/openssl.cnf -./etc/auth.conf ./etc/crontab ./etc/devd.conf ./etc/devfs.conf Modified: stable/9/usr.bin/login/login.1 ============================================================================== --- stable/9/usr.bin/login/login.1 Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/usr.bin/login/login.1 Sun Jul 15 11:39:35 2012 (r238481) @@ -137,8 +137,6 @@ message-of-the-day system mailboxes .It Pa \&.hushlogin makes login quieter -.It Pa /etc/auth.conf -configure authentication services .It Pa /etc/pam.d/login .Xr pam 8 configuration file Modified: stable/9/usr.bin/passwd/passwd.1 ============================================================================== --- stable/9/usr.bin/passwd/passwd.1 Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/usr.bin/passwd/passwd.1 Sun Jul 15 11:39:35 2012 (r238481) @@ -221,8 +221,6 @@ a Version 7 format password file temporary copy of the password file .It Pa /etc/login.conf login class capabilities database -.It Pa /etc/auth.conf -configure authentication services .El .Sh SEE ALSO .Xr chpass 1 , Modified: stable/9/usr.bin/rlogin/rlogin.1 ============================================================================== --- stable/9/usr.bin/rlogin/rlogin.1 Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/usr.bin/rlogin/rlogin.1 Sun Jul 15 11:39:35 2012 (r238481) @@ -128,7 +128,6 @@ Determines the user's terminal type. .Bl -tag -width /etc/hosts -compact .It Pa /etc/hosts .It Pa /etc/hosts.equiv -.It Pa /etc/auth.conf .It Ev $HOME Ns Pa /.rhosts .El .Sh SEE ALSO @@ -138,7 +137,6 @@ Determines the user's terminal type. .Xr setsockopt 2 , .Xr ruserok 3 , .Xr tty 4 , -.Xr auth.conf 5 , .Xr hosts 5 , .Xr hosts.equiv 5 , .Xr rlogind 8 , Modified: stable/9/usr.bin/rsh/rsh.1 ============================================================================== --- stable/9/usr.bin/rsh/rsh.1 Sun Jul 15 11:28:03 2012 (r238480) +++ stable/9/usr.bin/rsh/rsh.1 Sun Jul 15 11:39:35 2012 (r238481) @@ -125,14 +125,12 @@ to .Sh FILES .Bl -tag -width /etc/hosts -compact .It Pa /etc/hosts -.It Pa /etc/auth.conf .El .Sh SEE ALSO .Xr rlogin 1 , .Xr setsockopt 2 , .Xr rcmd 3 , .Xr ruserok 3 , -.Xr auth.conf 5 , .Xr hosts 5 , .Xr hosts.equiv 5 , .Xr rlogind 8 , From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 11:39:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E2861065673; Sun, 15 Jul 2012 11:39:57 +0000 (UTC) (envelope-from issyl0@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F331F8FC12; Sun, 15 Jul 2012 11:39: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 q6FBduqB045417; Sun, 15 Jul 2012 11:39:56 GMT (envelope-from issyl0@svn.freebsd.org) Received: (from issyl0@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FBduP0045411; Sun, 15 Jul 2012 11:39:56 GMT (envelope-from issyl0@svn.freebsd.org) Message-Id: <201207151139.q6FBduP0045411@svn.freebsd.org> From: Isabell Long Date: Sun, 15 Jul 2012 11:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238482 - in stable/9/lib/libc: stdlib stdtime X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:39:57 -0000 Author: issyl0 (doc committer) Date: Sun Jul 15 11:39:56 2012 New Revision: 238482 URL: http://svn.freebsd.org/changeset/base/238482 Log: MFC r237573: Add more locale-specific functions to the relevant man pages and Makefiles: - libc/stdtime/strftime.3 - libc/stdtime/strptime.3 - libc/stdlib/strfmon.3 Approved by: gabor (mentor) Approved by: re (kib) Modified: stable/9/lib/libc/stdlib/Makefile.inc stable/9/lib/libc/stdlib/strfmon.3 stable/9/lib/libc/stdtime/Makefile.inc stable/9/lib/libc/stdtime/strftime.3 stable/9/lib/libc/stdtime/strptime.3 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) Modified: stable/9/lib/libc/stdlib/Makefile.inc ============================================================================== --- stable/9/lib/libc/stdlib/Makefile.inc Sun Jul 15 11:39:35 2012 (r238481) +++ stable/9/lib/libc/stdlib/Makefile.inc Sun Jul 15 11:39:56 2012 (r238482) @@ -42,6 +42,7 @@ MLINKS+=rand.3 rand_r.3 rand.3 srand.3 r MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 \ random.3 srandomdev.3 MLINKS+=radixsort.3 sradixsort.3 +MLINKS+=strfmon.3 strfmon_l.3 MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3 MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3 MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3 Modified: stable/9/lib/libc/stdlib/strfmon.3 ============================================================================== --- stable/9/lib/libc/stdlib/strfmon.3 Sun Jul 15 11:39:35 2012 (r238481) +++ stable/9/lib/libc/stdlib/strfmon.3 Sun Jul 15 11:39:56 2012 (r238482) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2002 +.Dd June 25, 2012 .Dt STRFMON 3 .Os .Sh NAME @@ -36,6 +36,8 @@ .In monetary.h .Ft ssize_t .Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..." +.Ft ssize_t +.Fn strfmon_l "char * restrict s" "size_t maxsize" "locale_t loc" "const char * restrict format" "..." .Sh DESCRIPTION The .Fn strfmon @@ -47,6 +49,12 @@ No more than .Fa maxsize bytes are placed into the array. .Pp +The +.Fn strfmon_l +function does the same as +.Fn strfmon +but takes an explicit locale rather than using the current locale. +.Pp The format string is composed of zero or more directives: ordinary characters (not .Cm % ) , @@ -129,6 +137,11 @@ the contents of the array are indetermin and .Va errno is set to indicate the error. +.Pp +The +.Fn strfmon_l +function returns the same values as +.Fn strfmon . .Sh ERRORS The .Fn strfmon @@ -149,6 +162,10 @@ The function conforms to .St -p1003.1-2001 . +The +.Fn strfmon_l +function conforms to +.St -p1003.1-2008 . .Sh AUTHORS .An -nosplit The Modified: stable/9/lib/libc/stdtime/Makefile.inc ============================================================================== --- stable/9/lib/libc/stdtime/Makefile.inc Sun Jul 15 11:39:35 2012 (r238481) +++ stable/9/lib/libc/stdtime/Makefile.inc Sun Jul 15 11:39:56 2012 (r238482) @@ -18,4 +18,6 @@ MLINKS+=ctime.3 asctime.3 ctime.3 diffti ctime.3 localtime.3 ctime.3 mktime.3 ctime.3 timegm.3 \ ctime.3 ctime_r.3 ctime.3 localtime_r.3 ctime.3 gmtime_r.3 \ ctime.3 asctime_r.3 +MLINKS+=strftime.3 strftime_l.3 +MLINKS+=strptime.3 strptime_l.3 MLINKS+=time2posix.3 posix2time.3 Modified: stable/9/lib/libc/stdtime/strftime.3 ============================================================================== --- stable/9/lib/libc/stdtime/strftime.3 Sun Jul 15 11:39:35 2012 (r238481) +++ stable/9/lib/libc/stdtime/strftime.3 Sun Jul 15 11:39:56 2012 (r238482) @@ -32,7 +32,7 @@ .\" @(#)strftime.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 4, 2004 +.Dd June 25, 2012 .Dt STRFTIME 3 .Os .Sh NAME @@ -49,6 +49,8 @@ .Fa "const char * restrict format" .Fa "const struct tm * restrict timeptr" .Fc +.Ft size_t +.Fn strftime_l "char *restrict buf" "size_t maxsize" "const char * restrict format" "const struct tm *restrict timeptr" "locale_t loc" .Sh DESCRIPTION The .Fn strftime @@ -58,6 +60,11 @@ into the buffer .Fa buf according to the string pointed to by .Fa format . +The function +.Fn strftime_l +does the same as +.Fn strftime +but takes an explicit locale rather than using the current locale. .Pp The .Fa format @@ -268,6 +275,10 @@ The peculiar week number and year in the and .Ql \&%V are defined in ISO 8601: 1988. +The +.Fn strftime_l +function conforms to +.St -p1003.1-2008 . .Sh BUGS There is no conversion specification for the phase of the moon. .Pp Modified: stable/9/lib/libc/stdtime/strptime.3 ============================================================================== --- stable/9/lib/libc/stdtime/strptime.3 Sun Jul 15 11:39:35 2012 (r238481) +++ stable/9/lib/libc/stdtime/strptime.3 Sun Jul 15 11:39:56 2012 (r238482) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd January 4, 2003 +.Dd June 25, 2012 .Dt STRPTIME 3 .Os .Sh NAME @@ -41,6 +41,10 @@ .Fa "const char * restrict format" .Fa "struct tm * restrict timeptr" .Fc +.In time.h +.In xlocale.h +.Ft char * +.Fn strptime_l "const char * restrict buf" "const char * restrict format" "struct tm * restrict timeptr" "locale_t loc" .Sh DESCRIPTION The .Fn strptime @@ -53,6 +57,11 @@ and fills in the elements of the structu The resulting values will be relative to the local time zone. Thus, it can be considered the reverse operation of .Xr strftime 3 . +The +.Fn strptime_l +function does the same as +.Fn strptime , +but takes an explicit locale rather than using the current locale. .Pp The .Fa format @@ -104,6 +113,9 @@ that has not been required to satisfy th It returns .Dv NULL if one of the conversions failed. +.Fn strptime_l +returns the same values as +.Fn strptime . .Sh SEE ALSO .Xr date 1 , .Xr scanf 3 , From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 11:52:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E90A41065673; Sun, 15 Jul 2012 11:52:24 +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 D488A8FC0A; Sun, 15 Jul 2012 11:52: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 q6FBqO2P046000; Sun, 15 Jul 2012 11:52:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FBqOEc045998; Sun, 15 Jul 2012 11:52:24 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207151152.q6FBqOEc045998@svn.freebsd.org> From: Christian Brueffer Date: Sun, 15 Jul 2012 11:52: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: r238483 - head/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 11:52:25 -0000 Author: brueffer Date: Sun Jul 15 11:52:24 2012 New Revision: 238483 URL: http://svn.freebsd.org/changeset/base/238483 Log: Jump to the failed label instead of doing cleanup ourselves. Obtained from: DragonFly BSD MFC after: 2 weeks Modified: head/lib/libc/rpc/getnetpath.c Modified: head/lib/libc/rpc/getnetpath.c ============================================================================== --- head/lib/libc/rpc/getnetpath.c Sun Jul 15 11:39:56 2012 (r238482) +++ head/lib/libc/rpc/getnetpath.c Sun Jul 15 11:52:24 2012 (r238483) @@ -99,9 +99,8 @@ setnetpath() return (NULL); } if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) { - free(np_sessionp); syslog (LOG_ERR, "rpc: failed to open " NETCONFIG); - return (NULL); + goto failed; } np_sessionp->valid = NP_VALID; np_sessionp->ncp_list = NULL; From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 12:00:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8097D106564A; Sun, 15 Jul 2012 12:00:48 +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 2EE928FC17; Sun, 15 Jul 2012 12: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 q6FC0m8D046386; Sun, 15 Jul 2012 12:00:48 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FC0lxY046383; Sun, 15 Jul 2012 12:00:47 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201207151200.q6FC0lxY046383@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 15 Jul 2012 12:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238484 - in stable/9: etc lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 12:00:48 -0000 Author: des Date: Sun Jul 15 12:00:47 2012 New Revision: 238484 URL: http://svn.freebsd.org/changeset/base/238484 Log: MFH r237269: switch default password hash to sha512. Approved by: re Modified: stable/9/etc/login.conf stable/9/lib/libutil/login.conf.5 Directory Properties: stable/9/etc/ (props changed) stable/9/lib/libutil/ (props changed) Modified: stable/9/etc/login.conf ============================================================================== --- stable/9/etc/login.conf Sun Jul 15 11:52:24 2012 (r238483) +++ stable/9/etc/login.conf Sun Jul 15 12:00:47 2012 (r238484) @@ -23,7 +23,7 @@ # AND SEMANTICS'' section of getcap(3) for more escape sequences). default:\ - :passwd_format=md5:\ + :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\ Modified: stable/9/lib/libutil/login.conf.5 ============================================================================== --- stable/9/lib/libutil/login.conf.5 Sun Jul 15 11:52:24 2012 (r238483) +++ stable/9/lib/libutil/login.conf.5 Sun Jul 15 12:00:47 2012 (r238484) @@ -267,7 +267,7 @@ The backoff delay is the number of tries multiplied by 5 seconds. .It "login-retries number 10 The number of login attempts allowed before the login fails. -.It "passwd_format string md5 The encryption format that new or +.It "passwd_format string sha512 The encryption format that new or" changed passwords will use. Valid values include "des", "md5", "blf", "sha256" and "sha512"; see .Xr crypt 3 From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 12:13:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47A921065673; Sun, 15 Jul 2012 12:13:16 +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 326CB8FC0C; Sun, 15 Jul 2012 12:13: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 q6FCDGEa047018; Sun, 15 Jul 2012 12:13:16 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FCDFEv047016; Sun, 15 Jul 2012 12:13:15 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201207151213.q6FCDFEv047016@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 15 Jul 2012 12:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238485 - stable/9/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 12:13:16 -0000 Author: des Date: Sun Jul 15 12:13:15 2012 New Revision: 238485 URL: http://svn.freebsd.org/changeset/base/238485 Log: MFH r237270: no need to specify passive mode, it is the default. Approved by: re Modified: stable/9/etc/login.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/login.conf ============================================================================== --- stable/9/etc/login.conf Sun Jul 15 12:00:47 2012 (r238484) +++ stable/9/etc/login.conf Sun Jul 15 12:13:15 2012 (r238485) @@ -26,7 +26,7 @@ default:\ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\ + :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 14:40:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 723C31065670; Sun, 15 Jul 2012 14:40:50 +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 2341F8FC14; Sun, 15 Jul 2012 14:40: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 q6FEensZ053148; Sun, 15 Jul 2012 14:40:49 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FEenD6053146; Sun, 15 Jul 2012 14:40:49 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207151440.q6FEenD6053146@svn.freebsd.org> From: Christian Brueffer Date: Sun, 15 Jul 2012 14:40: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: r238486 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 14:40:51 -0000 Author: brueffer Date: Sun Jul 15 14:40:49 2012 New Revision: 238486 URL: http://svn.freebsd.org/changeset/base/238486 Log: Fix typo in a message. Obtained from: DragonFly BSD (change 7a817ab191e4898404a9037c55850e47d177308c) MFC after: 3 days Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Jul 15 12:13:15 2012 (r238485) +++ head/sys/dev/isp/isp.c Sun Jul 15 14:40:49 2012 (r238486) @@ -2286,7 +2286,7 @@ isp_plogx(ispsoftc_t *isp, int chan, uin goto out; } else if (plp->plogx_status != PLOGX_STATUS_IOCBERR) { isp_prt(isp, ISP_LOGWARN, - "status 0x%x on port login IOCB chanel %d", + "status 0x%x on port login IOCB channel %d", plp->plogx_status, chan); rval = -1; goto out; From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 15:22:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16112106566B; Sun, 15 Jul 2012 15:22:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01A5E8FC0C; Sun, 15 Jul 2012 15: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 q6FFMDkj054985; Sun, 15 Jul 2012 15:22:13 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FFMDKw054983; Sun, 15 Jul 2012 15:22:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207151522.q6FFMDKw054983@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 15 Jul 2012 15:22: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: r238488 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 15:22:14 -0000 Author: jilles Date: Sun Jul 15 15:22:13 2012 New Revision: 238488 URL: http://svn.freebsd.org/changeset/base/238488 Log: ps: Fix memory leak when showing start/lstart for swapped-out process. Spotted by: scan-build (uqs) Modified: head/bin/ps/print.c Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Sun Jul 15 15:00:28 2012 (r238487) +++ head/bin/ps/print.c Sun Jul 15 15:22:13 2012 (r238488) @@ -387,12 +387,13 @@ started(KINFO *k, VARENT *ve __unused) size_t buflen = 100; char *buf; + if (!k->ki_valid) + return (NULL); + buf = malloc(buflen); if (buf == NULL) errx(1, "malloc failed"); - if (!k->ki_valid) - return (NULL); if (use_ampm < 0) use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); then = k->ki_p->ki_start.tv_sec; @@ -415,12 +416,13 @@ lstarted(KINFO *k, VARENT *ve __unused) char *buf; size_t buflen = 100; + if (!k->ki_valid) + return (NULL); + buf = malloc(buflen); if (buf == NULL) errx(1, "malloc failed"); - if (!k->ki_valid) - return (NULL); then = k->ki_p->ki_start.tv_sec; (void)strftime(buf, buflen, "%c", localtime(&then)); return (buf); From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 15:50:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E54C1065670; Sun, 15 Jul 2012 15:50:13 +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 090E28FC17; Sun, 15 Jul 2012 15:50: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 q6FFoCKt056168; Sun, 15 Jul 2012 15:50:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FFoCMo056166; Sun, 15 Jul 2012 15:50:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207151550.q6FFoCMo056166@svn.freebsd.org> From: Christian Brueffer Date: Sun, 15 Jul 2012 15:50: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: r238491 - head/sys/fs/smbfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 15:50:13 -0000 Author: brueffer Date: Sun Jul 15 15:50:12 2012 New Revision: 238491 URL: http://svn.freebsd.org/changeset/base/238491 Log: Save a bzero() by using M_ZERO. Obtained from: Dragonfly BSD (change 4faaf07c3d7ddd120deed007370aaf4d90b72ebb) MFC after: 2 weeks Modified: head/sys/fs/smbfs/smbfs_node.c Modified: head/sys/fs/smbfs/smbfs_node.c ============================================================================== --- head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:23:31 2012 (r238490) +++ head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:50:12 2012 (r238491) @@ -223,7 +223,7 @@ loop: if (fap == NULL) return ENOENT; - np = malloc(sizeof *np, M_SMBNODE, M_WAITOK); + np = malloc(sizeof *np, M_SMBNODE, M_WAITOK | M_ZERO); error = getnewvnode("smbfs", mp, &smbfs_vnodeops, &vp); if (error) { free(np, M_SMBNODE); @@ -235,7 +235,6 @@ loop: return (error); } vp->v_type = fap->fa_attr & SMB_FA_DIR ? VDIR : VREG; - bzero(np, sizeof(*np)); vp->v_data = np; np->n_vnode = vp; np->n_mount = VFSTOSMBFS(mp); From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 16:04:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A804C106566C; Sun, 15 Jul 2012 16:04:26 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id B86C58FC08; Sun, 15 Jul 2012 16:04:25 +0000 (UTC) Received: by eabm6 with SMTP id m6so1528522eab.13 for ; Sun, 15 Jul 2012 09:04:19 -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:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=dJr0Yc3z0Cdi/hTHXKPvkf8CPN9eDy5Xc+VtwAYQy3g=; b=Xr/vWzMczi48W8l6KONE/NNSWnxlAQmqY61BTOzGGTo6Saz/RP2n1dYBzou6z761od OrieDi+nAeMDcuqfytgHRcdU1NGdFnrypsi33lbrpOUTTpobqSHouRHm/szxS8xyY1/1 vM6b2aLEvIfMt5/qXzGcGkH0FMhREkQoTS3tmlyxFjbT9dAnPGMlqyQcDjNK8OWWKvgN iIfqToNTW+8odxLQqw5tMZ+2rhvsFMy8X2GirCpdiZh0xGtuokVxkeInC3Jcnwg818+F O4GjzJ5MiFybZdhvffo4X1esfYVeopYl7a7Bf8Lmz0OSIVk1YZwl56st4RxTi6njcYwN QZ6Q== Received: by 10.14.179.193 with SMTP id h41mr5520492eem.2.1342368259376; Sun, 15 Jul 2012 09:04:19 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id t6sm11592785eeo.17.2012.07.15.09.04.17 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 15 Jul 2012 09:04:17 -0700 (PDT) Date: Sun, 15 Jul 2012 18:04:10 +0200 From: Mateusz Guzik To: Christian Brueffer Message-ID: <20120715160410.GA22600@dft-labs.eu> References: <201207151550.q6FFoCMo056166@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201207151550.q6FFoCMo056166@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238491 - head/sys/fs/smbfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 16:04:26 -0000 On Sun, Jul 15, 2012 at 03:50:12PM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Sun Jul 15 15:50:12 2012 > New Revision: 238491 > URL: http://svn.freebsd.org/changeset/base/238491 > > Log: > Save a bzero() by using M_ZERO. > > Obtained from: Dragonfly BSD (change 4faaf07c3d7ddd120deed007370aaf4d90b72ebb) > MFC after: 2 weeks > > Modified: > head/sys/fs/smbfs/smbfs_node.c > > Modified: head/sys/fs/smbfs/smbfs_node.c > ============================================================================== > --- head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:23:31 2012 (r238490) > +++ head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:50:12 2012 (r238491) > @@ -223,7 +223,7 @@ loop: > if (fap == NULL) > return ENOENT; > > - np = malloc(sizeof *np, M_SMBNODE, M_WAITOK); > + np = malloc(sizeof *np, M_SMBNODE, M_WAITOK | M_ZERO); > error = getnewvnode("smbfs", mp, &smbfs_vnodeops, &vp); > if (error) { > free(np, M_SMBNODE); > @@ -235,7 +235,6 @@ loop: > return (error); > } > vp->v_type = fap->fa_attr & SMB_FA_DIR ? VDIR : VREG; > - bzero(np, sizeof(*np)); > vp->v_data = np; > np->n_vnode = vp; > np->n_mount = VFSTOSMBFS(mp); How about moving this malloc right before np is actually used? While here some style(9) fixes. http://people.freebsd.org/~mjg/patches/smbfs_node-malloc.patch Completely untested (even compile-time); I guess the idea is clear. :) -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 16:23:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87C261065674; Sun, 15 Jul 2012 16:23:53 +0000 (UTC) (envelope-from SRS0=dIDz=FQ=FreeBSD.org=brueffer@srs.kundenserver.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mx1.freebsd.org (Postfix) with ESMTP id EDCC28FC0C; Sun, 15 Jul 2012 16:23:52 +0000 (UTC) Received: from hd948344f.sedadby.dyn.perspektivbredband.net (hd948344f.sedadby.dyn.perspektivbredband.net [217.72.52.79]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0Lo5Nc-1TW71538My-00gEfU; Sun, 15 Jul 2012 18:23:52 +0200 Message-ID: <5002EE96.2060104@FreeBSD.org> Date: Sun, 15 Jul 2012 18:23:50 +0200 From: Christian Brueffer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Mateusz Guzik References: <201207151550.q6FFoCMo056166@svn.freebsd.org> <20120715160410.GA22600@dft-labs.eu> In-Reply-To: <20120715160410.GA22600@dft-labs.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:ntJrFCmH4SHkZS6Z2BSj11SztBHxiAO86bgNnpfhIN9 pYJ4ASILDxf05nCgY/CCuh+QpvGY0YNMgxT1h8xN3EjXjRFnku 8XOD+q+jWAOergx7Bei+yn3dznjYs7gMQd5BcZhjxi5Yt9DI+7 tEX/1wyi0oclqjhjMUl+mJvjEUEjown+9gnqeqIoEp1tsTli5E UjoorYUSV41R+0UWIN12HrgSbX6U+DTINRjINcZ6oIvxyk9Uip E2Hw1kd5a6ZRgtDJPfTTi2n7bGDodALgmdrmFoaN+ewPABvlyl 9WZuSU2UDZvi28KqiEpN13zLHMZ3ATqgdgOBDX0W5m4kDI4QOa v/QZMUMTwSx/BtClQfDJ+rwKnYOHSRYzWSh0rf2VlayjbNOsHp LeaheWd4O2enQ== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238491 - head/sys/fs/smbfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 16:23:53 -0000 On 7/15/12 18:04 , Mateusz Guzik wrote: > On Sun, Jul 15, 2012 at 03:50:12PM +0000, Christian Brueffer wrote: >> Author: brueffer >> Date: Sun Jul 15 15:50:12 2012 >> New Revision: 238491 >> URL: http://svn.freebsd.org/changeset/base/238491 >> >> Log: >> Save a bzero() by using M_ZERO. >> >> Obtained from: Dragonfly BSD (change 4faaf07c3d7ddd120deed007370aaf4d90b72ebb) >> MFC after: 2 weeks >> >> Modified: >> head/sys/fs/smbfs/smbfs_node.c >> >> Modified: head/sys/fs/smbfs/smbfs_node.c >> ============================================================================== >> --- head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:23:31 2012 (r238490) >> +++ head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:50:12 2012 (r238491) >> @@ -223,7 +223,7 @@ loop: >> if (fap == NULL) >> return ENOENT; >> >> - np = malloc(sizeof *np, M_SMBNODE, M_WAITOK); >> + np = malloc(sizeof *np, M_SMBNODE, M_WAITOK | M_ZERO); >> error = getnewvnode("smbfs", mp, &smbfs_vnodeops, &vp); >> if (error) { >> free(np, M_SMBNODE); >> @@ -235,7 +235,6 @@ loop: >> return (error); >> } >> vp->v_type = fap->fa_attr & SMB_FA_DIR ? VDIR : VREG; >> - bzero(np, sizeof(*np)); >> vp->v_data = np; >> np->n_vnode = vp; >> np->n_mount = VFSTOSMBFS(mp); > > How about moving this malloc right before np is actually used? > While here some style(9) fixes. > > http://people.freebsd.org/~mjg/patches/smbfs_node-malloc.patch > > Completely untested (even compile-time); I guess the idea is clear. :) > Looks good to me. Want to give your shiny new commit bit a spin? ;-) If not, I'll handle it. Chris From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 16:26:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A5E81065674; Sun, 15 Jul 2012 16:26:24 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4CBE58FC08; Sun, 15 Jul 2012 16:26:23 +0000 (UTC) Received: by eabm6 with SMTP id m6so1531091eab.13 for ; Sun, 15 Jul 2012 09:26:22 -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:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=WGSoQJkC0P/bfXTjRMB5qtXYTri0iQ7HZJBzquGV4Qw=; b=zNUddLGN9NlHrUseNDzWq2BaTVvXLtHQJmkjVpKYLgCBWvpTQgU/xHAMgSLOaHE0XZ NiBYcCe6FempKJ96wvi24ebQE3uq40Sl4fw2mLQoqiFdL22fFarnG7z1FyPv+Xqe/VTR 4ijM3phx+4q63Ttpm6N0VXTS1JR47JuJnwFnvJoK9NLkNNX+q8wdZDFhfttyFqCkgLN4 36LhsNld07cOfn6hr1G3gLuB5VgpJXL/MUNyjsyr0rftjpA9LGETjkmQkFGU4IwcN0Xy xB82jPHGvuJ1UcF0FqjVWgRuOdyGf3hpstodSl5exUeCsLDQixX+WvfYkJ6NTuOzXYnB Bjog== Received: by 10.14.213.133 with SMTP id a5mr5546892eep.4.1342369582370; Sun, 15 Jul 2012 09:26:22 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id h48sm11703563eem.9.2012.07.15.09.26.21 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 15 Jul 2012 09:26:21 -0700 (PDT) Date: Sun, 15 Jul 2012 18:26:14 +0200 From: Mateusz Guzik To: Christian Brueffer Message-ID: <20120715162614.GB22600@dft-labs.eu> References: <201207151550.q6FFoCMo056166@svn.freebsd.org> <20120715160410.GA22600@dft-labs.eu> <5002EE96.2060104@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5002EE96.2060104@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r238491 - head/sys/fs/smbfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 16:26:24 -0000 On Sun, Jul 15, 2012 at 06:23:50PM +0200, Christian Brueffer wrote: > On 7/15/12 18:04 , Mateusz Guzik wrote: > > On Sun, Jul 15, 2012 at 03:50:12PM +0000, Christian Brueffer wrote: > >> Author: brueffer > >> Date: Sun Jul 15 15:50:12 2012 > >> New Revision: 238491 > >> URL: http://svn.freebsd.org/changeset/base/238491 > >> > >> Log: > >> Save a bzero() by using M_ZERO. > >> > >> Obtained from: Dragonfly BSD (change 4faaf07c3d7ddd120deed007370aaf4d90b72ebb) > >> MFC after: 2 weeks > >> > >> Modified: > >> head/sys/fs/smbfs/smbfs_node.c > >> > >> Modified: head/sys/fs/smbfs/smbfs_node.c > >> ============================================================================== > >> --- head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:23:31 2012 (r238490) > >> +++ head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:50:12 2012 (r238491) > >> @@ -223,7 +223,7 @@ loop: > >> if (fap == NULL) > >> return ENOENT; > >> > >> - np = malloc(sizeof *np, M_SMBNODE, M_WAITOK); > >> + np = malloc(sizeof *np, M_SMBNODE, M_WAITOK | M_ZERO); > >> error = getnewvnode("smbfs", mp, &smbfs_vnodeops, &vp); > >> if (error) { > >> free(np, M_SMBNODE); > >> @@ -235,7 +235,6 @@ loop: > >> return (error); > >> } > >> vp->v_type = fap->fa_attr & SMB_FA_DIR ? VDIR : VREG; > >> - bzero(np, sizeof(*np)); > >> vp->v_data = np; > >> np->n_vnode = vp; > >> np->n_mount = VFSTOSMBFS(mp); > > > > How about moving this malloc right before np is actually used? > > While here some style(9) fixes. > > > > http://people.freebsd.org/~mjg/patches/smbfs_node-malloc.patch > > > > Completely untested (even compile-time); I guess the idea is clear. :) > > > > Looks good to me. Want to give your shiny new commit bit a spin? ;-) > Not this time, I currently have no way to test it. :) > If not, I'll handle it. > Please do. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 17:44:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D70F106566B; Sun, 15 Jul 2012 17:44:28 +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 485EA8FC0A; Sun, 15 Jul 2012 17:44: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 q6FHiSsc061388; Sun, 15 Jul 2012 17:44:28 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FHiSSf061385; Sun, 15 Jul 2012 17:44:28 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201207151744.q6FHiSSf061385@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sun, 15 Jul 2012 17:44: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: r238492 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 17:44:28 -0000 Author: melifaro Date: Sun Jul 15 17:44:27 2012 New Revision: 238492 URL: http://svn.freebsd.org/changeset/base/238492 Log: Permit changing MTU in 6to4 relay. This behavior is recommended by RFC 4213 clause 3.2. Sometimes fragmentation is the least evil. For example, some Linux IPVS kernels forwards ICMPv6 checksums to real servers incorrectly. Reviewed by: hrs(previous version) Approved by: kib(mentor) MFC after: 1 week Modified: head/sys/net/if_stf.c Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Sun Jul 15 15:50:12 2012 (r238491) +++ head/sys/net/if_stf.c Sun Jul 15 17:44:27 2012 (r238492) @@ -793,7 +793,7 @@ stf_rtrequest(cmd, rt, info) struct rt_addrinfo *info; { RT_LOCK_ASSERT(rt); - rt->rt_rmx.rmx_mtu = IPV6_MMTU; + rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; } static int @@ -806,7 +806,7 @@ stf_ioctl(ifp, cmd, data) struct ifreq *ifr; struct sockaddr_in6 *sin6; struct in_addr addr; - int error; + int error, mtu; error = 0; switch (cmd) { @@ -840,6 +840,18 @@ stf_ioctl(ifp, cmd, data) error = EAFNOSUPPORT; break; + case SIOCGIFMTU: + break; + + case SIOCSIFMTU: + ifr = (struct ifreq *)data; + mtu = ifr->ifr_mtu; + /* RFC 4213 3.2 ideal world MTU */ + if (mtu < IPV6_MINMTU || mtu > IF_MAXMTU - 20) + return (EINVAL); + ifp->if_mtu = mtu; + break; + default: error = EINVAL; break; From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 18:12:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7161F106566B; Sun, 15 Jul 2012 18:12:10 +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 576348FC0C; Sun, 15 Jul 2012 18:12: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 q6FICAli062918; Sun, 15 Jul 2012 18:12:10 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FICA26062915; Sun, 15 Jul 2012 18:12:10 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201207151812.q6FICA26062915@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 15 Jul 2012 18:12: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: r238493 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 18:12:10 -0000 Author: hselasky Date: Sun Jul 15 18:12:09 2012 New Revision: 238493 URL: http://svn.freebsd.org/changeset/base/238493 Log: Add new USB device ID. PR: usb/169789 MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Sun Jul 15 17:44:27 2012 (r238492) +++ head/sys/dev/usb/serial/u3g.c Sun Jul 15 18:12:09 2012 (r238493) @@ -282,6 +282,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(HUAWEI, E143F, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E173, 0), U3G_DEV(HUAWEI, E173_INIT, U3GINIT_HUAWEISCSI), + U3G_DEV(HUAWEI, E3131, 0), + U3G_DEV(HUAWEI, E3131_INIT, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, E180V, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Jul 15 17:44:27 2012 (r238492) +++ head/sys/dev/usb/usbdevs Sun Jul 15 18:12:09 2012 (r238493) @@ -1894,6 +1894,8 @@ product HUAWEI E143F 0x143f 3G modem product HUAWEI E1752 0x1446 3G modem product HUAWEI K3765 0x1465 3G modem product HUAWEI E1820 0x14ac E1820 HSPA+ USB Slider +product HUAWEI E3131_INIT 0x14fe 3G modem initial +product HUAWEI E3131 0x1506 3G modem product HUAWEI K3765_INIT 0x1520 K3765 Initial product HUAWEI ETS2055 0x1803 CDMA modem product HUAWEI E173 0x1c05 3G modem From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 18:14:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58A6E1065670; Sun, 15 Jul 2012 18:14:05 +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 4250F8FC08; Sun, 15 Jul 2012 18:14: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 q6FIE5Ed063041; Sun, 15 Jul 2012 18:14:05 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FIE5Cq063039; Sun, 15 Jul 2012 18:14:05 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201207151814.q6FIE5Cq063039@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 15 Jul 2012 18:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238494 - stable/8/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 18:14:05 -0000 Author: bz Date: Sun Jul 15 18:14:04 2012 New Revision: 238494 URL: http://svn.freebsd.org/changeset/base/238494 Log: MFC r238222: As mentioned in the commit message of r237571 (copied from a prototype patch of mine) also check if the 2nd in6_setscope() failed and return the error in that case. Modified: stable/8/sys/netinet6/in6.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Sun Jul 15 18:12:09 2012 (r238493) +++ stable/8/sys/netinet6/in6.c Sun Jul 15 18:14:04 2012 (r238494) @@ -1235,7 +1235,9 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru sin6.sin6_family = AF_INET6; memcpy(&sin6.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, sizeof(sin6.sin6_addr)); - in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + error = in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + if (error != 0) + return (error); } rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 18:20:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3A7B1065673; Sun, 15 Jul 2012 18:20: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 CE70C8FC0A; Sun, 15 Jul 2012 18:20: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 q6FIK9Z7063427; Sun, 15 Jul 2012 18:20:09 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FIK9Au063425; Sun, 15 Jul 2012 18:20:09 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201207151820.q6FIK9Au063425@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 15 Jul 2012 18:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238495 - stable/8/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 18:20:10 -0000 Author: bz Date: Sun Jul 15 18:20:09 2012 New Revision: 238495 URL: http://svn.freebsd.org/changeset/base/238495 Log: MFC r238248: Implement handling of "atomic fragements" as outlined in draft-gont-6man-ipv6-atomic-fragments to mitigate one class of possible fragmentation-based attacks. Modified: stable/8/sys/netinet6/frag6.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet6/frag6.c ============================================================================== --- stable/8/sys/netinet6/frag6.c Sun Jul 15 18:14:04 2012 (r238494) +++ stable/8/sys/netinet6/frag6.c Sun Jul 15 18:20:09 2012 (r238495) @@ -221,6 +221,19 @@ frag6_input(struct mbuf **mp, int *offp, /* offset now points to data portion */ offset += sizeof(struct ip6_frag); + /* + * XXX-BZ RFC XXXX (draft-gont-6man-ipv6-atomic-fragments) + * Handle "atomic" fragments (offset and m bit set to 0) upfront, + * unrelated to any reassembly. Just skip the fragment header. + */ + if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { + /* XXX-BZ we want dedicated counters for this. */ + V_ip6stat.ip6s_reassembled++; + in6_ifstat_inc(dstifp, ifs6_reass_ok); + *offp = offset; + return (ip6f->ip6f_nxt); + } + IP6Q_LOCK(); /* From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 19:05:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 892A91065674; Sun, 15 Jul 2012 19:05:59 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 738DD8FC15; Sun, 15 Jul 2012 19:05:59 +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 q6FJ5xcc066382; Sun, 15 Jul 2012 19:05:59 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FJ5xW4066380; Sun, 15 Jul 2012 19:05:59 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201207151905.q6FJ5xW4066380@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 15 Jul 2012 19:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238497 - stable/7/sbin/mount_ntfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 19:05:59 -0000 Author: jh Date: Sun Jul 15 19:05:58 2012 New Revision: 238497 URL: http://svn.freebsd.org/changeset/base/238497 Log: MFC r230642: Remove trailing whitespace. Modified: stable/7/sbin/mount_ntfs/mount_ntfs.c Directory Properties: stable/7/sbin/mount_ntfs/ (props changed) Modified: stable/7/sbin/mount_ntfs/mount_ntfs.c ============================================================================== --- stable/7/sbin/mount_ntfs/mount_ntfs.c Sun Jul 15 19:04:12 2012 (r238496) +++ stable/7/sbin/mount_ntfs/mount_ntfs.c Sun Jul 15 19:05:58 2012 (r238497) @@ -162,7 +162,7 @@ main(argc, argv) } /* - * Resolve the mountpoint with realpath(3) and remove unnecessary + * Resolve the mountpoint with realpath(3) and remove unnecessary * slashes from the devicename if there are any. */ (void)checkpath(dir, mntpath); From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 19:10:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A23E5106564A; Sun, 15 Jul 2012 19:10:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 890FE8FC0C; Sun, 15 Jul 2012 19:10: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 q6FJA1Re066654; Sun, 15 Jul 2012 19:10:01 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FJA1A1066653; Sun, 15 Jul 2012 19:10:01 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201207151910.q6FJA1A1066653@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 15 Jul 2012 19:10: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: r238498 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 19:10:01 -0000 Author: glebius Date: Sun Jul 15 19:10:00 2012 New Revision: 238498 URL: http://svn.freebsd.org/changeset/base/238498 Log: Use M_NOWAIT while holding the pf giant lock. Modified: head/sys/contrib/pf/net/pf_if.c Modified: head/sys/contrib/pf/net/pf_if.c ============================================================================== --- head/sys/contrib/pf/net/pf_if.c Sun Jul 15 19:05:58 2012 (r238497) +++ head/sys/contrib/pf/net/pf_if.c Sun Jul 15 19:10:00 2012 (r238498) @@ -506,8 +506,7 @@ pfi_dynaddr_setup(struct pf_addr_wrap *a if (aw->type != PF_ADDR_DYNIFTL) return (0); #ifdef __FreeBSD__ - /* XXX: revisit! */ - if ((dyn = pool_get(&V_pfi_addr_pl, PR_WAITOK | PR_ZERO)) + if ((dyn = pool_get(&V_pfi_addr_pl, PR_NOWAIT | PR_ZERO)) #else if ((dyn = pool_get(&pfi_addr_pl, PR_WAITOK | PR_LIMITFAIL | PR_ZERO)) #endif From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 19:52:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F38C106566B; Sun, 15 Jul 2012 19:52:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E461B8FC08; Sun, 15 Jul 2012 19:52: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 q6FJqNDo069133; Sun, 15 Jul 2012 19:52:23 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FJqNhi069130; Sun, 15 Jul 2012 19:52:23 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201207151952.q6FJqNhi069130@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 15 Jul 2012 19:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238500 - stable/9/sys/geom/mirror X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 19:52:24 -0000 Author: glebius Date: Sun Jul 15 19:52:23 2012 New Revision: 238500 URL: http://svn.freebsd.org/changeset/base/238500 Log: Merge r237929, r237930 from head: ------------------------------------------------------------------------ r237929 | glebius | 2012-07-01 19:30:43 +0400 (вс, 01 июл 2012) | 6 lines In g_mirror_regular_request() upon successful delivery treat BIO_DELETE requests same way as BIO_WRITE removing them from queue. This fixes panic with BIO_DELETE operations on geom_mirror. Reviewed by: pjd ------------------------------------------------------------------------ r237930 | glebius | 2012-07-01 19:43:52 +0400 (вс, 01 июл 2012) | 20 lines Make geom_mirror more friendly to SSDs. To properly support TRIM, we need to pass BIO_DELETE requests down to providers that support it. Also, we need to announce our support for BIO_DELETE to upper consumer. This requires: - In g_mirror_start() return true for "GEOM::candelete" request. - In g_mirror_init_disk() probe below provider for "GEOM::candelete" attribute, and mark disk with a flag if it does support BIO_DELETE. - In g_mirror_register_request() distribute BIO_DELETE requests only to those disks, that do support it. Note that we announce "GEOM::candelete" as true unconditionally of whether we have TRIM-capable media down below or not. This is made intentionally, because upper consumer (usually UFS) requests the attribite only once at mount time. And if user ever migrates his mirror from HDDs to SSDs, then he/she would get TRIM working without remounting filesystem. Reviewed by: pjd Approved by: re (kib) Modified: stable/9/sys/geom/mirror/g_mirror.c stable/9/sys/geom/mirror/g_mirror.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.c Sun Jul 15 19:32:02 2012 (r238499) +++ stable/9/sys/geom/mirror/g_mirror.c Sun Jul 15 19:52:23 2012 (r238500) @@ -439,7 +439,7 @@ g_mirror_init_disk(struct g_mirror_softc struct g_mirror_metadata *md, int *errorp) { struct g_mirror_disk *disk; - int error; + int i, error; disk = malloc(sizeof(*disk), M_MIRROR, M_NOWAIT | M_ZERO); if (disk == NULL) { @@ -454,6 +454,11 @@ g_mirror_init_disk(struct g_mirror_softc disk->d_state = G_MIRROR_DISK_STATE_NONE; disk->d_priority = md->md_priority; disk->d_flags = md->md_dflags; + error = g_getattr("GEOM::candelete", disk->d_consumer, &i); + if (error != 0) + goto fail; + if (i) + disk->d_flags |= G_MIRROR_DISK_FLAG_CANDELETE; if (md->md_provider[0] != '\0') disk->d_flags |= G_MIRROR_DISK_FLAG_HARDCODED; disk->d_sync.ds_consumer = NULL; @@ -890,7 +895,8 @@ g_mirror_regular_request(struct bio *bp) if (pbp->bio_children == pbp->bio_inbed) { G_MIRROR_LOGREQ(3, pbp, "Request delivered."); pbp->bio_completed = pbp->bio_length; - if (pbp->bio_cmd == BIO_WRITE) { + if (pbp->bio_cmd == BIO_WRITE || + pbp->bio_cmd == BIO_DELETE) { bioq_remove(&sc->sc_inflight, pbp); /* Release delayed sync requests if possible. */ g_mirror_sync_release(sc); @@ -1083,7 +1089,9 @@ g_mirror_start(struct bio *bp) g_mirror_flush(sc, bp); return; case BIO_GETATTR: - if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { + if (g_handleattr_int(bp, "GEOM::candelete", 1)) + return; + else if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { g_mirror_kernel_dump(bp); return; } @@ -1630,6 +1638,9 @@ g_mirror_register_request(struct bio *bp default: continue; } + if (bp->bio_cmd == BIO_DELETE && + (disk->d_flags & G_MIRROR_DISK_FLAG_CANDELETE) == 0) + continue; cbp = g_clone_bio(bp); if (cbp == NULL) { for (cbp = bioq_first(&queue); cbp != NULL; Modified: stable/9/sys/geom/mirror/g_mirror.h ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.h Sun Jul 15 19:32:02 2012 (r238499) +++ stable/9/sys/geom/mirror/g_mirror.h Sun Jul 15 19:52:23 2012 (r238500) @@ -59,10 +59,12 @@ #define G_MIRROR_DISK_FLAG_INACTIVE 0x0000000000000008ULL #define G_MIRROR_DISK_FLAG_HARDCODED 0x0000000000000010ULL #define G_MIRROR_DISK_FLAG_BROKEN 0x0000000000000020ULL +#define G_MIRROR_DISK_FLAG_CANDELETE 0x0000000000000040ULL #define G_MIRROR_DISK_FLAG_MASK (G_MIRROR_DISK_FLAG_DIRTY | \ G_MIRROR_DISK_FLAG_SYNCHRONIZING | \ G_MIRROR_DISK_FLAG_FORCE_SYNC | \ - G_MIRROR_DISK_FLAG_INACTIVE) + G_MIRROR_DISK_FLAG_INACTIVE | \ + G_MIRROR_DISK_FLAG_CANDELETE) #define G_MIRROR_DEVICE_FLAG_NOAUTOSYNC 0x0000000000000001ULL #define G_MIRROR_DEVICE_FLAG_NOFAILSYNC 0x0000000000000002ULL From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 20:16:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 492CA106566C; Sun, 15 Jul 2012 20:16:18 +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 33A228FC0A; Sun, 15 Jul 2012 20:16: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 q6FKGI4r070494; Sun, 15 Jul 2012 20:16:18 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FKGHOi070488; Sun, 15 Jul 2012 20:16:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207152016.q6FKGHOi070488@svn.freebsd.org> From: Michael Tuexen Date: Sun, 15 Jul 2012 20:16: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: r238501 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 20:16:18 -0000 Author: tuexen Date: Sun Jul 15 20:16:17 2012 New Revision: 238501 URL: http://svn.freebsd.org/changeset/base/238501 Log: Changes which improve compilation if neither INET nor INET6 is defined. MFC after: 3 days Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sun Jul 15 19:52:23 2012 (r238500) +++ head/sys/netinet/sctp_asconf.c Sun Jul 15 20:16:17 2012 (r238501) @@ -2747,13 +2747,14 @@ sctp_process_initack_addresses(struct sc struct sctp_paramhdr tmp_param, *ph; uint16_t plen, ptype; struct sctp_ifa *sctp_ifa; - struct sctp_ipv6addr_param addr_store; #ifdef INET6 + struct sctp_ipv6addr_param addr6_store; struct sockaddr_in6 sin6; #endif #ifdef INET + struct sctp_ipv4addr_param addr4_store; struct sockaddr_in sin; #endif @@ -2802,7 +2803,7 @@ sctp_process_initack_addresses(struct sc a6p = (struct sctp_ipv6addr_param *) sctp_m_getptr(m, offset, sizeof(struct sctp_ipv6addr_param), - (uint8_t *) & addr_store); + (uint8_t *) & addr6_store); if (plen != sizeof(struct sctp_ipv6addr_param) || a6p == NULL) { return; @@ -2821,7 +2822,7 @@ sctp_process_initack_addresses(struct sc /* get the entire IPv4 address param */ a4p = (struct sctp_ipv4addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_ipv4addr_param), - (uint8_t *) & addr_store); + (uint8_t *) & addr4_store); if (plen != sizeof(struct sctp_ipv4addr_param) || a4p == NULL) { return; @@ -2899,16 +2900,17 @@ sctp_addr_in_initack(struct mbuf *m, uin { struct sctp_paramhdr tmp_param, *ph; uint16_t plen, ptype; - struct sctp_ipv6addr_param addr_store; #ifdef INET struct sockaddr_in *sin; struct sctp_ipv4addr_param *a4p; + struct sctp_ipv6addr_param addr4_store; #endif #ifdef INET6 struct sockaddr_in6 *sin6; struct sctp_ipv6addr_param *a6p; + struct sctp_ipv6addr_param addr6_store; struct sockaddr_in6 sin6_tmp; #endif @@ -2954,7 +2956,7 @@ sctp_addr_in_initack(struct mbuf *m, uin a6p = (struct sctp_ipv6addr_param *) sctp_m_getptr(m, offset, sizeof(struct sctp_ipv6addr_param), - (uint8_t *) & addr_store); + (uint8_t *) & addr6_store); if (a6p == NULL) { return (0); } @@ -2984,7 +2986,7 @@ sctp_addr_in_initack(struct mbuf *m, uin a4p = (struct sctp_ipv4addr_param *) sctp_m_getptr(m, offset, sizeof(struct sctp_ipv4addr_param), - (uint8_t *) & addr_store); + (uint8_t *) & addr4_store); if (a4p == NULL) { return (0); } Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Jul 15 19:52:23 2012 (r238500) +++ head/sys/netinet/sctp_output.c Sun Jul 15 20:16:17 2012 (r238501) @@ -3799,6 +3799,7 @@ sctp_get_ect(struct sctp_tcb *stcb) } } +#if defined(INET) || defined(INET6) static void sctp_handle_no_route(struct sctp_tcb *stcb, struct sctp_nets *net, @@ -3843,6 +3844,8 @@ sctp_handle_no_route(struct sctp_tcb *st } } +#endif + static int sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* may be NULL */ @@ -3882,14 +3885,18 @@ sctp_lowlevel_chunk_output(struct sctp_i * interface and smallest_mtu size as well. */ /* Will need ifdefs around this */ - struct mbuf *o_pak; struct mbuf *newm; struct sctphdr *sctphdr; int packet_length; int ret; uint32_t vrf_id; + +#if defined(INET) || defined(INET6) + struct mbuf *o_pak; sctp_route_t *ro = NULL; struct udphdr *udp = NULL; + +#endif uint8_t tos_value; #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Sun Jul 15 19:52:23 2012 (r238500) +++ head/sys/netinet/sctp_uio.h Sun Jul 15 20:16:17 2012 (r238501) @@ -1124,10 +1124,10 @@ struct sctpstat { #define SCTP_STAT_DECR_GAUGE32(_x) SCTP_STAT_DECR(_x) union sctp_sockstore { -#if defined(INET) || !defined(_KERNEL) +#if defined(INET) struct sockaddr_in sin; #endif -#if defined(INET6) || !defined(_KERNEL) +#if defined(INET6) struct sockaddr_in6 sin6; #endif struct sockaddr sa; Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun Jul 15 19:52:23 2012 (r238500) +++ head/sys/netinet/sctp_usrreq.c Sun Jul 15 20:16:17 2012 (r238501) @@ -5258,7 +5258,6 @@ sctp_setopt(struct socket *so, int optna case SCTP_BINDX_ADD_ADDR: { struct sctp_getaddresses *addrs; - size_t sz; struct thread *td; td = (struct thread *)p; @@ -5266,8 +5265,7 @@ sctp_setopt(struct socket *so, int optna optsize); #ifdef INET if (addrs->addr->sa_family == AF_INET) { - sz = sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in); - if (optsize < sz) { + if (optsize < sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; @@ -5280,8 +5278,7 @@ sctp_setopt(struct socket *so, int optna #endif #ifdef INET6 if (addrs->addr->sa_family == AF_INET6) { - sz = sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in6); - if (optsize < sz) { + if (optsize < sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in6)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; @@ -5305,7 +5302,6 @@ sctp_setopt(struct socket *so, int optna case SCTP_BINDX_REM_ADDR: { struct sctp_getaddresses *addrs; - size_t sz; struct thread *td; td = (struct thread *)p; @@ -5313,8 +5309,7 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(addrs, optval, struct sctp_getaddresses, optsize); #ifdef INET if (addrs->addr->sa_family == AF_INET) { - sz = sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in); - if (optsize < sz) { + if (optsize < sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; @@ -5327,8 +5322,7 @@ sctp_setopt(struct socket *so, int optna #endif #ifdef INET6 if (addrs->addr->sa_family == AF_INET6) { - sz = sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in6); - if (optsize < sz) { + if (optsize < sizeof(struct sctp_getaddresses) - sizeof(struct sockaddr) + sizeof(struct sockaddr_in6)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sun Jul 15 19:52:23 2012 (r238500) +++ head/sys/netinet6/sctp6_usrreq.c Sun Jul 15 20:16:17 2012 (r238501) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include +#ifdef INET6 #include #include #include @@ -1240,3 +1241,5 @@ struct pr_usrreqs sctp6_usrreqs = { .pru_sosend = sctp_sosend, .pru_soreceive = sctp_soreceive }; + +#endif From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 20:29:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FDEF106564A; Sun, 15 Jul 2012 20:29:49 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AB498FC12; Sun, 15 Jul 2012 20:29: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 q6FKTmKf071324; Sun, 15 Jul 2012 20:29:48 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FKTmfW071319; Sun, 15 Jul 2012 20:29:48 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201207152029.q6FKTmfW071319@svn.freebsd.org> From: Matthew D Fleming Date: Sun, 15 Jul 2012 20:29: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: r238502 - in head/sys: kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 20:29:49 -0000 Author: mdf Date: Sun Jul 15 20:29:48 2012 New Revision: 238502 URL: http://svn.freebsd.org/changeset/base/238502 Log: Fix a bug with memguard(9) on 32-bit architectures without a VM_KMEM_MAX_SIZE. The code was not taking into account the size of the kernel_map, which the kmem_map is allocated from, so it could produce a sub-map size too large to fit. The simplest solution is to ignore VM_KMEM_MAX entirely and base the memguard map's size off the kernel_map's size, since this is always relevant and always smaller. Found by: Justin Hibbits Modified: head/sys/kern/kern_malloc.c head/sys/vm/memguard.c head/sys/vm/memguard.h head/sys/vm/vm_map.h Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Sun Jul 15 20:16:17 2012 (r238501) +++ head/sys/kern/kern_malloc.c Sun Jul 15 20:29:48 2012 (r238502) @@ -744,7 +744,7 @@ kmeminit(void *dummy) vm_kmem_size = 2 * mem_size * PAGE_SIZE; #ifdef DEBUG_MEMGUARD - tmp = memguard_fudge(vm_kmem_size, vm_kmem_size_max); + tmp = memguard_fudge(vm_kmem_size, kernel_map); #else tmp = vm_kmem_size; #endif Modified: head/sys/vm/memguard.c ============================================================================== --- head/sys/vm/memguard.c Sun Jul 15 20:16:17 2012 (r238501) +++ head/sys/vm/memguard.c Sun Jul 15 20:29:48 2012 (r238502) @@ -159,16 +159,18 @@ SYSCTL_ULONG(_vm_memguard, OID_AUTO, fre * the kmem_map. The memguard memory will be a submap. */ unsigned long -memguard_fudge(unsigned long km_size, unsigned long km_max) +memguard_fudge(unsigned long km_size, const struct vm_map *parent_map) { - u_long mem_pgs = cnt.v_page_count; + u_long mem_pgs, parent_size; vm_memguard_divisor = 10; TUNABLE_INT_FETCH("vm.memguard.divisor", &vm_memguard_divisor); + parent_size = vm_map_max(parent_map) - vm_map_min(parent_map) + + PAGE_SIZE; /* Pick a conservative value if provided value sucks. */ if ((vm_memguard_divisor <= 0) || - ((km_size / vm_memguard_divisor) == 0)) + ((parent_size / vm_memguard_divisor) == 0)) vm_memguard_divisor = 10; /* * Limit consumption of physical pages to @@ -177,21 +179,19 @@ memguard_fudge(unsigned long km_size, un * This prevents memguard's page promotions from completely * using up memory, since most malloc(9) calls are sub-page. */ + mem_pgs = cnt.v_page_count; memguard_physlimit = (mem_pgs / vm_memguard_divisor) * PAGE_SIZE; /* * We want as much KVA as we can take safely. Use at most our - * allotted fraction of kmem_max. Limit this to twice the - * physical memory to avoid using too much memory as pagetable - * pages. - */ - memguard_mapsize = km_max / vm_memguard_divisor; - /* size must be multiple of PAGE_SIZE */ - memguard_mapsize = round_page(memguard_mapsize); - if (memguard_mapsize == 0 || - memguard_mapsize / (2 * PAGE_SIZE) > mem_pgs) + * allotted fraction of the parent map's size. Limit this to + * twice the physical memory to avoid using too much memory as + * pagetable pages (size must be multiple of PAGE_SIZE). + */ + memguard_mapsize = round_page(parent_size / vm_memguard_divisor); + if (memguard_mapsize / (2 * PAGE_SIZE) > mem_pgs) memguard_mapsize = mem_pgs * 2 * PAGE_SIZE; - if (km_max > 0 && km_size + memguard_mapsize > km_max) - return (km_max); + if (km_size + memguard_mapsize > parent_size) + memguard_mapsize = 0; return (km_size + memguard_mapsize); } Modified: head/sys/vm/memguard.h ============================================================================== --- head/sys/vm/memguard.h Sun Jul 15 20:16:17 2012 (r238501) +++ head/sys/vm/memguard.h Sun Jul 15 20:29:48 2012 (r238502) @@ -35,7 +35,7 @@ struct malloc_type; struct vm_map; #ifdef DEBUG_MEMGUARD -unsigned long memguard_fudge(unsigned long, unsigned long); +unsigned long memguard_fudge(unsigned long, const struct vm_map *); void memguard_init(struct vm_map *); void *memguard_alloc(unsigned long, int); void *memguard_realloc(void *, unsigned long, struct malloc_type *, int); Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Sun Jul 15 20:16:17 2012 (r238501) +++ head/sys/vm/vm_map.h Sun Jul 15 20:29:48 2012 (r238502) @@ -200,13 +200,13 @@ struct vm_map { #ifdef _KERNEL static __inline vm_offset_t -vm_map_max(vm_map_t map) +vm_map_max(const struct vm_map *map) { return (map->max_offset); } static __inline vm_offset_t -vm_map_min(vm_map_t map) +vm_map_min(const struct vm_map *map) { return (map->min_offset); } From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 20:31:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9C16106564A; Sun, 15 Jul 2012 20:31:46 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 82E068FC08; Sun, 15 Jul 2012 20:31:46 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so9594120pbb.13 for ; Sun, 15 Jul 2012 13:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=K/lYFVD4ZbZPwsoPB9ZFgacBaFHyX2GgVDrzDt5kJZE=; b=SNHnU67tYxcPma/jBjcAh8/giZbyfRTaxivkzf1XmkKc8gwjrbLoO8WHrWTd/RfBLU pLVvMCZ4Txeq/UMFv2l2Sq76IvsKezpipI/NFmHi34zrV3H8SAbbwa4AUEllA1Npq2cf Bz9VOhy8lectr2exF+LjiM/3K6lLZP4RubIbPb+p71nysmXN9OxCnnmzIi6+VEHF0HKS ZNO8EPP4pZUWZ+MxzPlL6/kTq8byn93YcYlGsCu9fQ2GSHDaVL1/ffoA2BZ/Gs8iGUd7 Ed1DY5vyhmesTJ1AZdP08cuHBIvvsCG1Gx/GwHwhkzNFBH/vKQZpmfec67Os/AWAcoTV dMcQ== MIME-Version: 1.0 Received: by 10.68.195.97 with SMTP id id1mr22193844pbc.91.1342384306305; Sun, 15 Jul 2012 13:31:46 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.208.168 with HTTP; Sun, 15 Jul 2012 13:31:46 -0700 (PDT) In-Reply-To: <201207152029.q6FKTmfW071319@svn.freebsd.org> References: <201207152029.q6FKTmfW071319@svn.freebsd.org> Date: Sun, 15 Jul 2012 13:31:46 -0700 X-Google-Sender-Auth: FaVLU0NAuDyQ9EA_Qdox1_WwUWU Message-ID: From: mdf@FreeBSD.org To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: svn commit: r238502 - in head/sys: kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 20:31:46 -0000 On Sun, Jul 15, 2012 at 1:29 PM, Matthew D Fleming wrote: > Author: mdf > Date: Sun Jul 15 20:29:48 2012 > New Revision: 238502 > URL: http://svn.freebsd.org/changeset/base/238502 > > Log: > Fix a bug with memguard(9) on 32-bit architectures without a > VM_KMEM_MAX_SIZE. > > The code was not taking into account the size of the kernel_map, which > the kmem_map is allocated from, so it could produce a sub-map size too > large to fit. The simplest solution is to ignore VM_KMEM_MAX entirely > and base the memguard map's size off the kernel_map's size, since this > is always relevant and always smaller. > > Found by: Justin Hibbits MFC after: 3 days Thanks, matthew From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 20:38:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0294106564A; Sun, 15 Jul 2012 20:38:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B08B78FC14; Sun, 15 Jul 2012 20:38: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 q6FKc20L071893; Sun, 15 Jul 2012 20:38:02 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FKc2iF071890; Sun, 15 Jul 2012 20:38:02 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207152038.q6FKc2iF071890@svn.freebsd.org> From: Andriy Gapon Date: Sun, 15 Jul 2012 20:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238503 - in stable/9/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 20:38:02 -0000 Author: avg Date: Sun Jul 15 20:38:02 2012 New Revision: 238503 URL: http://svn.freebsd.org/changeset/base/238503 Log: MFC r238168,238169: further dtrace disassembler fixes for long nop decoding - segment-override prefixes are not invalid in long mode - fix nopw (0f 1f) behavior with respect to modifiers Reported by: emaste Tested by: emaste Obtained from: Illumos commit 13442:4adbe6de60c8 Approved by: re (kib) Modified: stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c Sun Jul 15 20:29:48 2012 (r238502) +++ stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c Sun Jul 15 20:38:02 2012 (r238503) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), +/* [1C] */ INVALID, INVALID, INVALID, TS("nopw", Mw), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, @@ -1146,14 +1146,14 @@ const instable_t dis_distable[16][16] = /* [1,C] */ TNS("sbbb",IA), TS("sbb",IA), TSx("push",SEG), TSx("pop",SEG), }, { /* [2,0] */ TNS("andb",RMw), TS("and",RMw), TNS("andb",MRw), TS("and",MRw), -/* [2,4] */ TNS("andb",IA), TS("and",IA), TNSx("%es:",OVERRIDE), TNSx("daa",NORM), +/* [2,4] */ TNS("andb",IA), TS("and",IA), TNS("%es:",OVERRIDE), TNSx("daa",NORM), /* [2,8] */ TNS("subb",RMw), TS("sub",RMw), TNS("subb",MRw), TS("sub",MRw), -/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNSx("%cs:",OVERRIDE), TNSx("das",NORM), +/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNS("%cs:",OVERRIDE), TNSx("das",NORM), }, { /* [3,0] */ TNS("xorb",RMw), TS("xor",RMw), TNS("xorb",MRw), TS("xor",MRw), -/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNSx("%ss:",OVERRIDE), TNSx("aaa",NORM), +/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNS("%ss:",OVERRIDE), TNSx("aaa",NORM), /* [3,8] */ TNS("cmpb",RMw), TS("cmp",RMw), TNS("cmpb",MRw), TS("cmp",MRw), -/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNSx("%ds:",OVERRIDE), TNSx("aas",NORM), +/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNS("%ds:",OVERRIDE), TNSx("aas",NORM), }, { /* [4,0] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), /* [4,4] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), Modified: stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c Sun Jul 15 20:29:48 2012 (r238502) +++ stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c Sun Jul 15 20:38:02 2012 (r238503) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), +/* [1C] */ INVALID, INVALID, INVALID, TS("nopw", Mw), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, @@ -1146,14 +1146,14 @@ const instable_t dis_distable[16][16] = /* [1,C] */ TNS("sbbb",IA), TS("sbb",IA), TSx("push",SEG), TSx("pop",SEG), }, { /* [2,0] */ TNS("andb",RMw), TS("and",RMw), TNS("andb",MRw), TS("and",MRw), -/* [2,4] */ TNS("andb",IA), TS("and",IA), TNSx("%es:",OVERRIDE), TNSx("daa",NORM), +/* [2,4] */ TNS("andb",IA), TS("and",IA), TNS("%es:",OVERRIDE), TNSx("daa",NORM), /* [2,8] */ TNS("subb",RMw), TS("sub",RMw), TNS("subb",MRw), TS("sub",MRw), -/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNSx("%cs:",OVERRIDE), TNSx("das",NORM), +/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNS("%cs:",OVERRIDE), TNSx("das",NORM), }, { /* [3,0] */ TNS("xorb",RMw), TS("xor",RMw), TNS("xorb",MRw), TS("xor",MRw), -/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNSx("%ss:",OVERRIDE), TNSx("aaa",NORM), +/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNS("%ss:",OVERRIDE), TNSx("aaa",NORM), /* [3,8] */ TNS("cmpb",RMw), TS("cmp",RMw), TNS("cmpb",MRw), TS("cmp",MRw), -/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNSx("%ds:",OVERRIDE), TNSx("aas",NORM), +/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNS("%ds:",OVERRIDE), TNSx("aas",NORM), }, { /* [4,0] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), /* [4,4] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 20:39:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 994C9106564A; Sun, 15 Jul 2012 20:39:22 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 852308FC08; Sun, 15 Jul 2012 20: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 q6FKdMZC072015; Sun, 15 Jul 2012 20:39:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FKdMal072013; Sun, 15 Jul 2012 20:39:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207152039.q6FKdMal072013@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 15 Jul 2012 20: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: r238504 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 20:39:22 -0000 Author: jilles Date: Sun Jul 15 20:39:21 2012 New Revision: 238504 URL: http://svn.freebsd.org/changeset/base/238504 Log: libc: Remove some unused strings from getaddrinfo(). Modified: head/lib/libc/net/getaddrinfo.c Modified: head/lib/libc/net/getaddrinfo.c ============================================================================== --- head/lib/libc/net/getaddrinfo.c Sun Jul 15 20:38:02 2012 (r238503) +++ head/lib/libc/net/getaddrinfo.c Sun Jul 15 20:39:21 2012 (r238504) @@ -155,7 +155,6 @@ struct explore { int e_af; int e_socktype; int e_protocol; - const char *e_protostr; int e_wild; #define WILD_AF(ex) ((ex)->e_wild & 0x01) #define WILD_SOCKTYPE(ex) ((ex)->e_wild & 0x02) @@ -164,21 +163,21 @@ struct explore { static const struct explore explore[] = { #if 0 - { PF_LOCAL, ANY, ANY, NULL, 0x01 }, + { PF_LOCAL, ANY, ANY, 0x01 }, #endif #ifdef INET6 - { PF_INET6, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 }, - { PF_INET6, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 }, - { PF_INET6, SOCK_STREAM, IPPROTO_SCTP, "sctp", 0x03 }, - { PF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP, "sctp", 0x07 }, - { PF_INET6, SOCK_RAW, ANY, NULL, 0x05 }, -#endif - { PF_INET, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 }, - { PF_INET, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 }, - { PF_INET, SOCK_STREAM, IPPROTO_SCTP, "sctp", 0x03 }, - { PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP, "sctp", 0x07 }, - { PF_INET, SOCK_RAW, ANY, NULL, 0x05 }, - { -1, 0, 0, NULL, 0 }, + { PF_INET6, SOCK_DGRAM, IPPROTO_UDP, 0x07 }, + { PF_INET6, SOCK_STREAM, IPPROTO_TCP, 0x07 }, + { PF_INET6, SOCK_STREAM, IPPROTO_SCTP, 0x03 }, + { PF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 }, + { PF_INET6, SOCK_RAW, ANY, 0x05 }, +#endif + { PF_INET, SOCK_DGRAM, IPPROTO_UDP, 0x07 }, + { PF_INET, SOCK_STREAM, IPPROTO_TCP, 0x07 }, + { PF_INET, SOCK_STREAM, IPPROTO_SCTP, 0x03 }, + { PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 }, + { PF_INET, SOCK_RAW, ANY, 0x05 }, + { -1, 0, 0, 0 }, }; #ifdef INET6 From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 20:40:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D1341065670; Sun, 15 Jul 2012 20:40:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E7068FC17; Sun, 15 Jul 2012 20:40: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 q6FKeBWC072104; Sun, 15 Jul 2012 20:40:11 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FKeBtu072101; Sun, 15 Jul 2012 20:40:11 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207152040.q6FKeBtu072101@svn.freebsd.org> From: Andriy Gapon Date: Sun, 15 Jul 2012 20:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238505 - in stable/8/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 20:40:11 -0000 Author: avg Date: Sun Jul 15 20:40:10 2012 New Revision: 238505 URL: http://svn.freebsd.org/changeset/base/238505 Log: MFC r238168,238169: further dtrace disassembler fixes for long nop decoding - segment-override prefixes are not invalid in long mode - fix nopw (0f 1f) behavior with respect to modifiers Reported by: emaste Tested by: emaste Obtained from: Illumos commit 13442:4adbe6de60c8 Modified: stable/8/sys/cddl/dev/dtrace/amd64/dis_tables.c stable/8/sys/cddl/dev/dtrace/i386/dis_tables.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) Modified: stable/8/sys/cddl/dev/dtrace/amd64/dis_tables.c ============================================================================== --- stable/8/sys/cddl/dev/dtrace/amd64/dis_tables.c Sun Jul 15 20:39:21 2012 (r238504) +++ stable/8/sys/cddl/dev/dtrace/amd64/dis_tables.c Sun Jul 15 20:40:10 2012 (r238505) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), +/* [1C] */ INVALID, INVALID, INVALID, TS("nopw", Mw), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, @@ -1146,14 +1146,14 @@ const instable_t dis_distable[16][16] = /* [1,C] */ TNS("sbbb",IA), TS("sbb",IA), TSx("push",SEG), TSx("pop",SEG), }, { /* [2,0] */ TNS("andb",RMw), TS("and",RMw), TNS("andb",MRw), TS("and",MRw), -/* [2,4] */ TNS("andb",IA), TS("and",IA), TNSx("%es:",OVERRIDE), TNSx("daa",NORM), +/* [2,4] */ TNS("andb",IA), TS("and",IA), TNS("%es:",OVERRIDE), TNSx("daa",NORM), /* [2,8] */ TNS("subb",RMw), TS("sub",RMw), TNS("subb",MRw), TS("sub",MRw), -/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNSx("%cs:",OVERRIDE), TNSx("das",NORM), +/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNS("%cs:",OVERRIDE), TNSx("das",NORM), }, { /* [3,0] */ TNS("xorb",RMw), TS("xor",RMw), TNS("xorb",MRw), TS("xor",MRw), -/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNSx("%ss:",OVERRIDE), TNSx("aaa",NORM), +/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNS("%ss:",OVERRIDE), TNSx("aaa",NORM), /* [3,8] */ TNS("cmpb",RMw), TS("cmp",RMw), TNS("cmpb",MRw), TS("cmp",MRw), -/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNSx("%ds:",OVERRIDE), TNSx("aas",NORM), +/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNS("%ds:",OVERRIDE), TNSx("aas",NORM), }, { /* [4,0] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), /* [4,4] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), Modified: stable/8/sys/cddl/dev/dtrace/i386/dis_tables.c ============================================================================== --- stable/8/sys/cddl/dev/dtrace/i386/dis_tables.c Sun Jul 15 20:39:21 2012 (r238504) +++ stable/8/sys/cddl/dev/dtrace/i386/dis_tables.c Sun Jul 15 20:40:10 2012 (r238505) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), +/* [1C] */ INVALID, INVALID, INVALID, TS("nopw", Mw), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, @@ -1146,14 +1146,14 @@ const instable_t dis_distable[16][16] = /* [1,C] */ TNS("sbbb",IA), TS("sbb",IA), TSx("push",SEG), TSx("pop",SEG), }, { /* [2,0] */ TNS("andb",RMw), TS("and",RMw), TNS("andb",MRw), TS("and",MRw), -/* [2,4] */ TNS("andb",IA), TS("and",IA), TNSx("%es:",OVERRIDE), TNSx("daa",NORM), +/* [2,4] */ TNS("andb",IA), TS("and",IA), TNS("%es:",OVERRIDE), TNSx("daa",NORM), /* [2,8] */ TNS("subb",RMw), TS("sub",RMw), TNS("subb",MRw), TS("sub",MRw), -/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNSx("%cs:",OVERRIDE), TNSx("das",NORM), +/* [2,C] */ TNS("subb",IA), TS("sub",IA), TNS("%cs:",OVERRIDE), TNSx("das",NORM), }, { /* [3,0] */ TNS("xorb",RMw), TS("xor",RMw), TNS("xorb",MRw), TS("xor",MRw), -/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNSx("%ss:",OVERRIDE), TNSx("aaa",NORM), +/* [3,4] */ TNS("xorb",IA), TS("xor",IA), TNS("%ss:",OVERRIDE), TNSx("aaa",NORM), /* [3,8] */ TNS("cmpb",RMw), TS("cmp",RMw), TNS("cmpb",MRw), TS("cmp",MRw), -/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNSx("%ds:",OVERRIDE), TNSx("aas",NORM), +/* [3,C] */ TNS("cmpb",IA), TS("cmp",IA), TNS("%ds:",OVERRIDE), TNSx("aas",NORM), }, { /* [4,0] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), /* [4,4] */ TSx("inc",R), TSx("inc",R), TSx("inc",R), TSx("inc",R), From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 20:48:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 188781065686; Sun, 15 Jul 2012 20:48:22 +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 040008FC08; Sun, 15 Jul 2012 20:48: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 q6FKmLcO072641; Sun, 15 Jul 2012 20:48:21 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FKmLjE072639; Sun, 15 Jul 2012 20:48:21 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207152048.q6FKmLjE072639@svn.freebsd.org> From: Adrian Chadd Date: Sun, 15 Jul 2012 20:48: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: r238506 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 20:48:22 -0000 Author: adrian Date: Sun Jul 15 20:48:21 2012 New Revision: 238506 URL: http://svn.freebsd.org/changeset/base/238506 Log: Log the number of handled decsriptors and valid descriptors when hitting RXEOL. Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Sun Jul 15 20:40:10 2012 (r238505) +++ head/sys/dev/ath/if_ath_rx_edma.c Sun Jul 15 20:48:21 2012 (r238506) @@ -428,8 +428,9 @@ ath_edma_recv_proc_queue(struct ath_soft ATH_PCU_LOCK(sc); if (dosched && sc->sc_kickpcu) { CTR0(ATH_KTR_ERR, "ath_edma_recv_proc_queue(): kickpcu"); - device_printf(sc->sc_dev, "%s: handled %d descriptors\n", - __func__, ngood); + device_printf(sc->sc_dev, + "%s: handled npkts %d ngood %d\n", + __func__, npkts, ngood); /* * XXX TODO: what should occur here? Just re-poke and From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 20:51:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9B50106564A; Sun, 15 Jul 2012 20:51:42 +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 7B53A8FC14; Sun, 15 Jul 2012 20:51: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 q6FKpgNT072866; Sun, 15 Jul 2012 20:51:42 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FKpgSK072862; Sun, 15 Jul 2012 20:51:42 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207152051.q6FKpgSK072862@svn.freebsd.org> From: Adrian Chadd Date: Sun, 15 Jul 2012 20:51: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: r238507 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 20:51:42 -0000 Author: adrian Date: Sun Jul 15 20:51:41 2012 New Revision: 238507 URL: http://svn.freebsd.org/changeset/base/238507 Log: Handle RX Keymiss events. The AR9003 series NICs implement a separate RX error to signal that a Keycache miss occured. The earlier NICs would not set the key index valid bit. I'll dig into the difference between "no key index bit set" and "keycache miss". Modified: head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Sun Jul 15 20:48:21 2012 (r238506) +++ head/sys/dev/ath/if_ath_rx.c Sun Jul 15 20:51:41 2012 (r238507) @@ -534,6 +534,14 @@ ath_rx_pkt(struct ath_softc *sc, struct goto rx_accept; sc->sc_stats.ast_rx_badcrypt++; } + /* + * Similar as above - if the failure was a keymiss + * just punt it up to the upper layers for now. + */ + if (rs->rs_status & HAL_RXERR_KEYMISS) { + sc->sc_stats.ast_rx_keymiss++; + goto rx_accept; + } if (rs->rs_status & HAL_RXERR_MIC) { sc->sc_stats.ast_rx_badmic++; /* Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Sun Jul 15 20:48:21 2012 (r238506) +++ head/sys/dev/ath/if_ath_sysctl.c Sun Jul 15 20:51:41 2012 (r238507) @@ -934,6 +934,8 @@ ath_sysctl_stats_attach(struct ath_softc SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_mcastq_overflow", CTLFLAG_RD, &sc->sc_stats.ast_tx_mcastq_overflow, 0, "Number of multicast frames exceeding maximum mcast queue depth"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_keymiss", CTLFLAG_RD, + &sc->sc_stats.ast_rx_keymiss, 0, ""); /* Attach the RX phy error array */ ath_sysctl_stats_attach_rxphyerr(sc, child); Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Sun Jul 15 20:48:21 2012 (r238506) +++ head/sys/dev/ath/if_athioctl.h Sun Jul 15 20:51:41 2012 (r238507) @@ -161,7 +161,9 @@ struct ath_stats { u_int32_t ast_tx_aggr_ok; /* aggregate TX ok */ u_int32_t ast_tx_aggr_fail; /* aggregate TX failed */ u_int32_t ast_tx_mcastq_overflow; /* multicast queue overflow */ - u_int32_t ast_pad[1]; + u_int32_t ast_rx_keymiss; + + u_int32_t ast_pad[16]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq) From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 21:12:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEED91065670; Sun, 15 Jul 2012 21:12:22 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA7AE8FC08; Sun, 15 Jul 2012 21:12: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 q6FLCMr0074192; Sun, 15 Jul 2012 21:12:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FLCM0t074190; Sun, 15 Jul 2012 21:12:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201207152112.q6FLCM0t074190@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 15 Jul 2012 21:12: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: r238508 - head/bin/stty X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 21:12:23 -0000 Author: jilles Date: Sun Jul 15 21:12:22 2012 New Revision: 238508 URL: http://svn.freebsd.org/changeset/base/238508 Log: stty: Mark usage() __dead2. This reduces code size a little and should fix a scan-build warning. Modified: head/bin/stty/extern.h Modified: head/bin/stty/extern.h ============================================================================== --- head/bin/stty/extern.h Sun Jul 15 20:51:41 2012 (r238507) +++ head/bin/stty/extern.h Sun Jul 15 21:12:22 2012 (r238508) @@ -40,6 +40,6 @@ int ksearch(char ***, struct info *); int msearch(char ***, struct info *); void optlist(void); void print(struct termios *, struct winsize *, int, enum FMT); -void usage(void); +void usage(void) __dead2; extern struct cchar cchars1[], cchars2[]; From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 21:20:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43FC3106564A; Sun, 15 Jul 2012 21:20:32 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 159BE8FC08; Sun, 15 Jul 2012 21:20: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 q6FLKVI5074703; Sun, 15 Jul 2012 21:20:31 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FLKVCn074700; Sun, 15 Jul 2012 21:20:31 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207152120.q6FLKVCn074700@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 15 Jul 2012 21:20: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: r238509 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 21:20:32 -0000 Author: pfg Date: Sun Jul 15 21:20:31 2012 New Revision: 238509 URL: http://svn.freebsd.org/changeset/base/238509 Log: Use libc's strndup() instead of Dtrace's reimplementation. Corresponds partially to OpenSolaris change: PSARC 2010/299 GNU/Linux/BSD compatibility functions 6901783 strndup would be nice MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.h Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c Sun Jul 15 21:12:22 2012 (r238508) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c Sun Jul 15 21:20:31 2012 (r238509) @@ -29,23 +29,6 @@ #include #include -#include - -/* - * Create a copy of string s, but only duplicate the first n bytes. - */ -char * -strndup(const char *s, size_t n) -{ - char *s2 = malloc(n + 1); - - if (s2 == NULL) - longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); - - (void) strncpy(s2, s, n); - s2[n] = '\0'; - return (s2); -} /* * Transform string s inline, converting each embedded C escape sequence string Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.h Sun Jul 15 21:12:22 2012 (r238508) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.h Sun Jul 15 21:20:31 2012 (r238509) @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,14 +19,12 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _DT_STRING_H #define _DT_STRING_H -#pragma ident "%Z%%M% %I% %E% SMI" #include #include @@ -36,7 +33,6 @@ extern "C" { #endif -extern char *strndup(const char *, size_t); extern size_t stresc2chr(char *); extern char *strchr2esc(const char *, size_t); extern const char *strbasename(const char *); From owner-svn-src-all@FreeBSD.ORG Sun Jul 15 21:46:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 588BA1065672; Sun, 15 Jul 2012 21:46:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43DF28FC16; Sun, 15 Jul 2012 21:46: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 q6FLkK4t076248; Sun, 15 Jul 2012 21:46:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6FLkKZB076246; Sun, 15 Jul 2012 21:46:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207152146.q6FLkKZB076246@svn.freebsd.org> From: Alan Cox Date: Sun, 15 Jul 2012 21:46: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: r238510 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2012 21:46:20 -0000 Author: alc Date: Sun Jul 15 21:46:19 2012 New Revision: 238510 URL: http://svn.freebsd.org/changeset/base/238510 Log: Correct an off-by-one error in vm_reserv_alloc_contig() that resulted in the last reservation of a multi-reservation allocation not being initialized. Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Sun Jul 15 21:20:31 2012 (r238509) +++ head/sys/vm/vm_reserv.c Sun Jul 15 21:46:19 2012 (r238510) @@ -457,7 +457,7 @@ vm_reserv_alloc_contig(vm_object_t objec m += VM_LEVEL_0_NPAGES; first += VM_LEVEL_0_NPAGES; allocpages -= VM_LEVEL_0_NPAGES; - } while (allocpages > VM_LEVEL_0_NPAGES); + } while (allocpages > 0); return (m_ret); /* From owner-svn-src-all@FreeBSD.ORG Mon Jul 16 02:10:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0796106566B; Mon, 16 Jul 2012 02:10:26 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8228FC0A; Mon, 16 Jul 2012 02:10: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 q6G2AQM7094516; Mon, 16 Jul 2012 02:10:26 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6G2AQf5094514; Mon, 16 Jul 2012 02:10:26 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201207160210.q6G2AQf5094514@svn.freebsd.org> From: David Xu Date: Mon, 16 Jul 2012 02:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238513 - stable/9/lib/libc/i386/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2012 02:10:26 -0000 Author: davidxu Date: Mon Jul 16 02:10:26 2012 New Revision: 238513 URL: http://svn.freebsd.org/changeset/base/238513 Log: MFC r238328: Executing CPUID with EAX set to 1 to actually get feature flags. PR: 169730 Approved by: re (kib) Modified: stable/9/lib/libc/i386/gen/getcontextx.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/i386/gen/getcontextx.c ============================================================================== --- stable/9/lib/libc/i386/gen/getcontextx.c Mon Jul 16 00:21:05 2012 (r238512) +++ stable/9/lib/libc/i386/gen/getcontextx.c Mon Jul 16 02:10:26 2012 (r238513) @@ -68,7 +68,7 @@ __getcontextx_size(void) " movl %%ebx,%1\n" " popl %%ebx\n" : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), "=d" (p[3]) - : "0" (0x0)); + : "0" (0x1)); if ((p[2] & CPUID2_OSXSAVE) != 0) { __asm __volatile( " pushl %%ebx\n" From owner-svn-src-all@FreeBSD.ORG Mon Jul 16 06:43:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC7271065763; Mon, 16 Jul 2012 06:43:05 +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 D73178FC18; Mon, 16 Jul 2012 06:43: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 q6G6h5xh011997; Mon, 16 Jul 2012 06:43:05 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6G6h5di011993; Mon, 16 Jul 2012 06:43:05 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207160643.q6G6h5di011993@svn.freebsd.org> From: Michael Tuexen Date: Mon, 16 Jul 2012 06:43: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: r238514 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: ,