From owner-svn-src-stable-6@FreeBSD.ORG Mon Jun 15 19:16:43 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B68E5106564A; Mon, 15 Jun 2009 19:16:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88F9F8FC25; Mon, 15 Jun 2009 19:16:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FJGhGC098818; Mon, 15 Jun 2009 19:16:43 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FJGhlB098817; Mon, 15 Jun 2009 19:16:43 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906151916.n5FJGhlB098817@svn.freebsd.org> From: John Baldwin Date: Mon, 15 Jun 2009 19:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194255 - in stable/6/sys: . boot/i386/libi386 contrib/pf dev/cxgb X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 19:16:44 -0000 Author: jhb Date: Mon Jun 15 19:16:43 2009 New Revision: 194255 URL: http://svn.freebsd.org/changeset/base/194255 Log: MFC: Pack PnP structures instead of individual fields. Modified: stable/6/sys/ (props changed) stable/6/sys/boot/i386/libi386/biospnp.c stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/i386/libi386/biospnp.c ============================================================================== --- stable/6/sys/boot/i386/libi386/biospnp.c Mon Jun 15 19:16:24 2009 (r194254) +++ stable/6/sys/boot/i386/libi386/biospnp.c Mon Jun 15 19:16:43 2009 (r194255) @@ -49,38 +49,38 @@ struct pnphandler biospnphandler = struct pnp_ICstructure { - u_int8_t pnp_signature[4] __packed; - u_int8_t pnp_version __packed; - u_int8_t pnp_length __packed; - u_int16_t pnp_BIOScontrol __packed; - u_int8_t pnp_checksum __packed; - u_int32_t pnp_eventflag __packed; - u_int16_t pnp_rmip __packed; - u_int16_t pnp_rmcs __packed; - u_int16_t pnp_pmip __packed; - u_int32_t pnp_pmcs __packed; - u_int8_t pnp_OEMdev[4] __packed; - u_int16_t pnp_rmds __packed; - u_int32_t pnp_pmds __packed; -}; + u_int8_t pnp_signature[4]; + u_int8_t pnp_version; + u_int8_t pnp_length; + u_int16_t pnp_BIOScontrol; + u_int8_t pnp_checksum; + u_int32_t pnp_eventflag; + u_int16_t pnp_rmip; + u_int16_t pnp_rmcs; + u_int16_t pnp_pmip; + u_int32_t pnp_pmcs; + u_int8_t pnp_OEMdev[4]; + u_int16_t pnp_rmds; + u_int32_t pnp_pmds; +} __packed; struct pnp_devNode { - u_int16_t dn_size __packed; - u_int8_t dn_handle __packed; - u_int8_t dn_id[4] __packed; - u_int8_t dn_type[3] __packed; - u_int16_t dn_attrib __packed; - u_int8_t dn_data[1] __packed; -}; + u_int16_t dn_size; + u_int8_t dn_handle; + u_int8_t dn_id[4]; + u_int8_t dn_type[3]; + u_int16_t dn_attrib; + u_int8_t dn_data[1]; +} __packed; struct pnp_isaConfiguration { - u_int8_t ic_revision __packed; - u_int8_t ic_nCSN __packed; - u_int16_t ic_rdport __packed; - u_int16_t ic_reserved __packed; -}; + u_int8_t ic_revision; + u_int8_t ic_nCSN; + u_int16_t ic_rdport; + u_int16_t ic_reserved; +} __packed; static struct pnp_ICstructure *pnp_Icheck = NULL; static u_int16_t pnp_NumNodes; From owner-svn-src-stable-6@FreeBSD.ORG Mon Jun 15 21:54:26 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A7E31065725; Mon, 15 Jun 2009 21:54:26 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8671F8FC17; Mon, 15 Jun 2009 21:54:26 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FLsQ5Y003002; Mon, 15 Jun 2009 21:54:26 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FLsQaH003001; Mon, 15 Jun 2009 21:54:26 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200906152154.n5FLsQaH003001@svn.freebsd.org> From: Stanislav Sedov Date: Mon, 15 Jun 2009 21:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194268 - in stable/6/contrib/ipfilter: . lib X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 21:54:28 -0000 Author: stas Date: Mon Jun 15 21:54:26 2009 New Revision: 194268 URL: http://svn.freebsd.org/changeset/base/194268 Log: MFC r193043: - Prevent buffer overflow in IPFilter's load_http function used to load ipfilter tables via http by the user-level ippool utility. Previously the 1024-byte buffer used to store a http request coudld easily overflow if the length of the hostname part of the url passes exceeded 496 bytes. - Use snprintf to prevent possieble buffer overflows in future. - Do not try to close the descriptor twice on failure. Modified: stable/6/contrib/ipfilter/ (props changed) stable/6/contrib/ipfilter/lib/load_http.c Modified: stable/6/contrib/ipfilter/lib/load_http.c ============================================================================== --- stable/6/contrib/ipfilter/lib/load_http.c Mon Jun 15 21:52:27 2009 (r194267) +++ stable/6/contrib/ipfilter/lib/load_http.c Mon Jun 15 21:54:26 2009 (r194268) @@ -14,11 +14,13 @@ alist_t * load_http(char *url) { - int fd, len, left, port, endhdr, removed; - char *s, *t, *u, buffer[1024], *myurl; + char *s, *t, *u, buffer[1044], *myurl; alist_t *a, *rtop, *rbot; struct sockaddr_in sin; struct hostent *host; + size_t avail; + int fd, len, left, port, endhdr, removed; + int error; /* * More than this would just be absurd. @@ -32,7 +34,14 @@ load_http(char *url) rtop = NULL; rbot = NULL; - sprintf(buffer, "GET %s HTTP/1.0\r\n", url); + avail = sizeof(buffer); + error = snprintf(buffer, avail, "GET %s HTTP/1.0\r\n", url); + + /* + * error is always less then avail due to the constraint on + * the url length above. + */ + avail -= error; myurl = strdup(url); if (myurl == NULL) @@ -51,7 +60,11 @@ load_http(char *url) if (u != NULL) s = u + 1; /* AUTH */ - sprintf(buffer + strlen(buffer), "Host: %s\r\n\r\n", s); + error = snprintf(buffer + strlen(buffer), avail, "Host: %s\r\n\r\n", s); + if (error >= avail) { + fprintf(stderr, "URL is too large: %s\n", url); + goto done; + } u = strchr(s, ':'); if (u != NULL) { @@ -83,16 +96,12 @@ load_http(char *url) if (fd == -1) goto done; - if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) { - close(fd); + if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) goto done; - } len = strlen(buffer); - if (write(fd, buffer, len) != len) { - close(fd); + if (write(fd, buffer, len) != len) goto done; - } s = buffer; endhdr = 0; From owner-svn-src-stable-6@FreeBSD.ORG Tue Jun 16 13:05:34 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DB741065686; Tue, 16 Jun 2009 13:05:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF958FC1D; Tue, 16 Jun 2009 13:05:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5GD5Yv4028137; Tue, 16 Jun 2009 13:05:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5GD5YYG028134; Tue, 16 Jun 2009 13:05:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200906161305.n5GD5YYG028134@svn.freebsd.org> From: Ed Maste Date: Tue, 16 Jun 2009 13:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194289 - in stable/6/sys: kern sys X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 13:05:35 -0000 Author: emaste Date: Tue Jun 16 13:05:34 2009 New Revision: 194289 URL: http://svn.freebsd.org/changeset/base/194289 Log: MFC part of r166182 and 179670. Provide the mutual exclusion between the nfs export list modifications and nfs requests processing. Lockmgr lock provides the shared locking for nfs requests, while exclusive mode is used for modifications. The writer starvation is handled by lockmgr too. Submitted by: kib Modified: stable/6/sys/kern/vfs_export.c stable/6/sys/kern/vfs_mount.c stable/6/sys/sys/mount.h Modified: stable/6/sys/kern/vfs_export.c ============================================================================== --- stable/6/sys/kern/vfs_export.c Tue Jun 16 12:33:38 2009 (r194288) +++ stable/6/sys/kern/vfs_export.c Tue Jun 16 13:05:34 2009 (r194289) @@ -179,6 +179,7 @@ vfs_hang_addrlist(mp, nep, argp) sizeof(np->netc_anon.cr_groups)); refcount_init(&np->netc_anon.cr_ref, 1); return (0); + out: free(np, M_NETADDR); return (error); @@ -232,10 +233,14 @@ vfs_export(mp, argp) struct netexport *nep; int error; + error = 0; + lockmgr(&mp->mnt_explock, LK_EXCLUSIVE, NULL, curthread); nep = mp->mnt_export; if (argp->ex_flags & MNT_DELEXPORT) { - if (nep == NULL) - return (ENOENT); + if (nep == NULL) { + error = ENOENT; + goto out; + } if (mp->mnt_flag & MNT_EXPUBLIC) { vfs_setpublicfs(NULL, NULL, NULL); MNT_ILOCK(mp); @@ -257,18 +262,20 @@ vfs_export(mp, argp) } if (argp->ex_flags & MNT_EXPUBLIC) { if ((error = vfs_setpublicfs(mp, nep, argp)) != 0) - return (error); + goto out; MNT_ILOCK(mp); mp->mnt_flag |= MNT_EXPUBLIC; MNT_IUNLOCK(mp); } if ((error = vfs_hang_addrlist(mp, nep, argp))) - return (error); + goto out; MNT_ILOCK(mp); mp->mnt_flag |= MNT_EXPORTED; MNT_IUNLOCK(mp); } - return (0); +out: + lockmgr(&mp->mnt_explock, LK_RELEASE, NULL, curthread); + return (error); } /* @@ -412,7 +419,9 @@ vfs_stdcheckexp(mp, nam, extflagsp, cred { struct netcred *np; + lockmgr(&mp->mnt_explock, LK_SHARED, NULL, curthread); np = vfs_export_lookup(mp, nam); + lockmgr(&mp->mnt_explock, LK_RELEASE, NULL, curthread); if (np == NULL) return (EACCES); *extflagsp = np->netc_exflags; Modified: stable/6/sys/kern/vfs_mount.c ============================================================================== --- stable/6/sys/kern/vfs_mount.c Tue Jun 16 12:33:38 2009 (r194288) +++ stable/6/sys/kern/vfs_mount.c Tue Jun 16 13:05:34 2009 (r194289) @@ -448,6 +448,7 @@ mount_init(void *mem, int size, int flag mp = (struct mount *)mem; mtx_init(&mp->mnt_mtx, "struct mount mtx", NULL, MTX_DEF); lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, 0); + lockinit(&mp->mnt_explock, PVFS, "explock", 0, 0); return (0); } @@ -457,6 +458,7 @@ mount_fini(void *mem, int size) struct mount *mp; mp = (struct mount *)mem; + lockdestroy(&mp->mnt_explock); lockdestroy(&mp->mnt_lock); mtx_destroy(&mp->mnt_mtx); } Modified: stable/6/sys/sys/mount.h ============================================================================== --- stable/6/sys/sys/mount.h Tue Jun 16 12:33:38 2009 (r194288) +++ stable/6/sys/sys/mount.h Tue Jun 16 13:05:34 2009 (r194289) @@ -178,6 +178,7 @@ struct mount { int mnt_secondary_accwrites;/* (i) secondary wr. starts */ int mnt_ref; /* (i) Reference count */ int mnt_gen; /* struct mount generation */ + struct lock mnt_explock; /* vfs_export walkers lock */ }; struct vnode *__mnt_vnode_next(struct vnode **mvp, struct mount *mp); From owner-svn-src-stable-6@FreeBSD.ORG Tue Jun 16 18:14:49 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2084C106566C; Tue, 16 Jun 2009 18:14:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E01F8FC16; Tue, 16 Jun 2009 18:14:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5GIEmIV035973; Tue, 16 Jun 2009 18:14:48 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5GIEmLu035972; Tue, 16 Jun 2009 18:14:48 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200906161814.n5GIEmLu035972@svn.freebsd.org> From: Ed Maste Date: Tue, 16 Jun 2009 18:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194301 - in stable/6/lib/csu: . amd64 X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 18:14:49 -0000 Author: emaste Date: Tue Jun 16 18:14:48 2009 New Revision: 194301 URL: http://svn.freebsd.org/changeset/base/194301 Log: MFC r181997 by kib: Add -fno-omit-frame-pointer to CFLAGS used to compile crt1.c on amd64. For gcc' __builtin_frame_address() to work, all call frames need to save frame pointer. In particular, this is important for the upper frame that should terminate the chain. Modified: stable/6/lib/csu/ (props changed) stable/6/lib/csu/amd64/Makefile Modified: stable/6/lib/csu/amd64/Makefile ============================================================================== --- stable/6/lib/csu/amd64/Makefile Tue Jun 16 17:48:08 2009 (r194300) +++ stable/6/lib/csu/amd64/Makefile Tue Jun 16 18:14:48 2009 (r194301) @@ -7,6 +7,7 @@ OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include +CFLAGS+= -fno-omit-frame-pointer all: ${OBJS} From owner-svn-src-stable-6@FreeBSD.ORG Tue Jun 16 19:01:34 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E5271065672; Tue, 16 Jun 2009 19:01:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF5488FC2E; Tue, 16 Jun 2009 19:01:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5GJ1XgY041206; Tue, 16 Jun 2009 19:01:33 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5GJ1X5m041205; Tue, 16 Jun 2009 19:01:33 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906161901.n5GJ1X5m041205@svn.freebsd.org> From: John Baldwin Date: Tue, 16 Jun 2009 19:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194306 - in stable/6/sys: . contrib/pf dev/acpica dev/cxgb X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 19:01:35 -0000 Author: jhb Date: Tue Jun 16 19:01:33 2009 New Revision: 194306 URL: http://svn.freebsd.org/changeset/base/194306 Log: MFC: Rework the _BBN handling for Host-PCI bridges to always trust the first bus that claims to be bus 0. Modified: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/acpica/acpi_pcib_acpi.c stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- stable/6/sys/dev/acpica/acpi_pcib_acpi.c Tue Jun 16 19:00:48 2009 (r194305) +++ stable/6/sys/dev/acpica/acpi_pcib_acpi.c Tue Jun 16 19:01:33 2009 (r194306) @@ -145,6 +145,7 @@ acpi_pcib_acpi_attach(device_t dev) { struct acpi_hpcib_softc *sc; ACPI_STATUS status; + static int bus0_seen = 0; u_int addr, slot, func, busok; uint8_t busno; @@ -155,6 +156,21 @@ acpi_pcib_acpi_attach(device_t dev) sc->ap_handle = acpi_get_handle(dev); /* + * Get our segment number by evaluating _SEG + * It's OK for this to not exist. + */ + status = acpi_GetInteger(sc->ap_handle, "_SEG", &sc->ap_segment); + if (ACPI_FAILURE(status)) { + if (status != AE_NOT_FOUND) { + device_printf(dev, "could not evaluate _SEG - %s\n", + AcpiFormatException(status)); + return_VALUE (ENXIO); + } + /* If it's not found, assume 0. */ + sc->ap_segment = 0; + } + + /* * Get our base bus number by evaluating _BBN. * If this doesn't work, we assume we're bus number 0. * @@ -168,8 +184,10 @@ acpi_pcib_acpi_attach(device_t dev) * XXX invoke _REG on this for the PCI config space address space? * XXX It seems many BIOS's with multiple Host-PCI bridges do not set * _BBN correctly. They set _BBN to zero for all bridges. Thus, - * if _BBN is zero and pcib0 already exists, we try to read our + * if _BBN is zero and PCI bus 0 already exists, we try to read our * bus number from the configuration registers at address _ADR. + * We only do this for domain/segment 0 in the hopes that this is + * only needed for old single-domain machines. */ status = acpi_GetInteger(sc->ap_handle, "_BBN", &sc->ap_bus); if (ACPI_FAILURE(status)) { @@ -184,11 +202,11 @@ acpi_pcib_acpi_attach(device_t dev) } /* - * If the bus is zero and pcib0 already exists, read the bus number - * via PCI config space. + * If this is segment 0, the bus is zero, and PCI bus 0 already + * exists, read the bus number via PCI config space. */ busok = 1; - if (sc->ap_bus == 0 && devclass_get_device(pcib_devclass, 0) != dev) { + if (sc->ap_segment == 0 && sc->ap_bus == 0 && bus0_seen) { busok = 0; status = acpi_GetInteger(sc->ap_handle, "_ADR", &addr); if (ACPI_FAILURE(status)) { @@ -225,20 +243,9 @@ acpi_pcib_acpi_attach(device_t dev) device_printf(dev, "trying bus number %d\n", sc->ap_bus); } - /* - * Get our segment number by evaluating _SEG - * It's OK for this to not exist. - */ - status = acpi_GetInteger(sc->ap_handle, "_SEG", &sc->ap_segment); - if (ACPI_FAILURE(status)) { - if (status != AE_NOT_FOUND) { - device_printf(dev, "could not evaluate _SEG - %s\n", - AcpiFormatException(status)); - return_VALUE (ENXIO); - } - /* If it's not found, assume 0. */ - sc->ap_segment = 0; - } + /* If this is bus 0 on segment 0, note that it has been seen already. */ + if (sc->ap_segment == 0 && sc->ap_bus == 0) + bus0_seen = 1; return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus)); } From owner-svn-src-stable-6@FreeBSD.ORG Wed Jun 17 02:52:35 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A53E6106566B; Wed, 17 Jun 2009 02:52:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 929618FC15; Wed, 17 Jun 2009 02:52:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5H2qZut059932; Wed, 17 Jun 2009 02:52:35 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5H2qZvF059930; Wed, 17 Jun 2009 02:52:35 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200906170252.n5H2qZvF059930@svn.freebsd.org> From: Ed Maste Date: Wed, 17 Jun 2009 02:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194320 - in stable/6/usr.sbin/pkg_install: . info X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 02:52:36 -0000 Author: emaste Date: Wed Jun 17 02:52:35 2009 New Revision: 194320 URL: http://svn.freebsd.org/changeset/base/194320 Log: MFC r193273 by jilles: Fix segfault when giving invalid long option to pkg_info. PR: bin/133473 Submitted by: Rafal Grodzinski Modified: stable/6/usr.sbin/pkg_install/ (props changed) stable/6/usr.sbin/pkg_install/info/main.c Modified: stable/6/usr.sbin/pkg_install/info/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/info/main.c Wed Jun 17 02:51:16 2009 (r194319) +++ stable/6/usr.sbin/pkg_install/info/main.c Wed Jun 17 02:52:35 2009 (r194320) @@ -58,6 +58,7 @@ static struct option longopts[] = { { "verbose", no_argument, NULL, 'v' }, { "version", no_argument, NULL, 'P' }, { "which", required_argument, NULL, 'W' }, + { NULL, 0, NULL, 0 } }; int From owner-svn-src-stable-6@FreeBSD.ORG Thu Jun 18 15:27:28 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E178106568B; Thu, 18 Jun 2009 15:27:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BCBC8FC23; Thu, 18 Jun 2009 15:27:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5IFRRAL015431; Thu, 18 Jun 2009 15:27:27 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5IFRR1B015429; Thu, 18 Jun 2009 15:27:27 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200906181527.n5IFRR1B015429@svn.freebsd.org> From: Ed Maste Date: Thu, 18 Jun 2009 15:27:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194444 - stable/6/usr.bin/gcore X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 15:27:28 -0000 Author: emaste Date: Thu Jun 18 15:27:27 2009 New Revision: 194444 URL: http://svn.freebsd.org/changeset/base/194444 Log: MFC r168595 and r180603: Eliminate memory leak from an accidental malloc(). Use %zd for size_t. Modified: stable/6/usr.bin/gcore/ (props changed) stable/6/usr.bin/gcore/elfcore.c Modified: stable/6/usr.bin/gcore/elfcore.c ============================================================================== --- stable/6/usr.bin/gcore/elfcore.c Thu Jun 18 15:08:37 2009 (r194443) +++ stable/6/usr.bin/gcore/elfcore.c Thu Jun 18 15:27:27 2009 (r194444) @@ -130,7 +130,6 @@ elf_coredump(int efd __unused, int fd, p * Allocate memory for building the header, fill it up, * and write it out. */ - hdr = malloc(hdrsize); if ((hdr = malloc(hdrsize)) == NULL) errx(1, "out of memory"); elf_corehdr(fd, pid, map, seginfo.count, hdr, hdrsize); @@ -159,7 +158,7 @@ elf_coredump(int efd __unused, int fd, p err(1, "read from %s", memname); if ((size_t)ngot < nwant) errx(1, "short read from %s:" - " wanted %d, got %d", memname, + " wanted %zd, got %zd", memname, nwant, ngot); ngot = write(fd, buf, nwant); if (ngot == -1) @@ -415,7 +414,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu if ((n = read(fd, &status->pr_reg, sizeof status->pr_reg)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(status->pr_reg)) - errx(1, "short read from %s: wanted %u, got %d", name, + errx(1, "short read from %s: wanted %zd, got %d", name, sizeof status->pr_reg, n); close(fd); @@ -426,7 +425,7 @@ readhdrinfo(pid_t pid, prstatus_t *statu if ((n = read(fd, fpregset, sizeof *fpregset)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(*fpregset)) - errx(1, "short read from %s: wanted %u, got %d", name, + errx(1, "short read from %s: wanted %zd, got %d", name, sizeof *fpregset, n); close(fd); From owner-svn-src-stable-6@FreeBSD.ORG Thu Jun 18 21:24:23 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC5061065674; Thu, 18 Jun 2009 21:24:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF6368FC13; Thu, 18 Jun 2009 21:24:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ILONLK023185; Thu, 18 Jun 2009 21:24:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5ILONOv023182; Thu, 18 Jun 2009 21:24:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906182124.n5ILONOv023182@svn.freebsd.org> From: John Baldwin Date: Thu, 18 Jun 2009 21:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194463 - stable/6/sys/netinet X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 21:24:24 -0000 Author: jhb Date: Thu Jun 18 21:24:23 2009 New Revision: 194463 URL: http://svn.freebsd.org/changeset/base/194463 Log: MFC: Fix overflow edge cases with comparing ticks to t_rcvtime including fixing the TCP keepalive timer to work properly when ticks overflows from INT_MAX to INT_MIN. Note that to preserve the ABI this change just downcasts t_rcvtime to an int when it is subtracted from ticks rather than changing the type of t_rcvtime. Modified: stable/6/sys/netinet/tcp_output.c stable/6/sys/netinet/tcp_timer.c Modified: stable/6/sys/netinet/tcp_output.c ============================================================================== --- stable/6/sys/netinet/tcp_output.c Thu Jun 18 21:17:04 2009 (r194462) +++ stable/6/sys/netinet/tcp_output.c Thu Jun 18 21:24:23 2009 (r194463) @@ -145,7 +145,7 @@ tcp_output(struct tcpcb *tp) * to send, then transmit; otherwise, investigate further. */ idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); - if (idle && (ticks - tp->t_rcvtime) >= tp->t_rxtcur) { + if (idle && (ticks - (int)tp->t_rcvtime) >= tp->t_rxtcur) { /* * We have been idle for "a while" and no acks are * expected to clock out any data we send -- Modified: stable/6/sys/netinet/tcp_timer.c ============================================================================== --- stable/6/sys/netinet/tcp_timer.c Thu Jun 18 21:17:04 2009 (r194462) +++ stable/6/sys/netinet/tcp_timer.c Thu Jun 18 21:24:23 2009 (r194463) @@ -188,7 +188,7 @@ tcp_timer_2msl(xtp) * control block. Otherwise, check again in a bit. */ if (tp->t_state != TCPS_TIME_WAIT && - (ticks - tp->t_rcvtime) <= tcp_maxidle) + (ticks - (int)tp->t_rcvtime) <= tcp_maxidle) callout_reset(tp->tt_2msl, tcp_keepintvl, tcp_timer_2msl, tp); else @@ -291,7 +291,7 @@ tcp_timer_keep(xtp) goto dropit; if ((always_keepalive || inp->inp_socket->so_options & SO_KEEPALIVE) && tp->t_state <= TCPS_CLOSING) { - if ((ticks - tp->t_rcvtime) >= tcp_keepidle + tcp_maxidle) + if ((ticks - (int)tp->t_rcvtime) >= tcp_keepidle + tcp_maxidle) goto dropit; /* * Send a packet designed to force a response @@ -377,8 +377,8 @@ tcp_timer_persist(xtp) * backoff that we would use if retransmitting. */ if (tp->t_rxtshift == TCP_MAXRXTSHIFT && - ((ticks - tp->t_rcvtime) >= tcp_maxpersistidle || - (ticks - tp->t_rcvtime) >= TCP_REXMTVAL(tp) * tcp_totbackoff)) { + ((ticks - (int)tp->t_rcvtime) >= tcp_maxpersistidle || + (ticks - (int)tp->t_rcvtime) >= TCP_REXMTVAL(tp) * tcp_totbackoff)) { tcpstat.tcps_persistdrop++; tp = tcp_drop(tp, ETIMEDOUT); goto out; From owner-svn-src-stable-6@FreeBSD.ORG Fri Jun 19 11:59:24 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73705106564A; Fri, 19 Jun 2009 11:59:24 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60C9E8FC12; Fri, 19 Jun 2009 11:59:24 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JBxOGa042897; Fri, 19 Jun 2009 11:59:24 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JBxOVh042895; Fri, 19 Jun 2009 11:59:24 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906191159.n5JBxOVh042895@svn.freebsd.org> From: Edwin Groothuis Date: Fri, 19 Jun 2009 11:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194486 - stable/6/share/zoneinfo X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 11:59:25 -0000 Author: edwin Date: Fri Jun 19 11:59:24 2009 New Revision: 194486 URL: http://svn.freebsd.org/changeset/base/194486 Log: MFC of 194485 - Fix beginning of DST of Bangladesh Modified: stable/6/share/zoneinfo/ (props changed) stable/6/share/zoneinfo/asia Modified: stable/6/share/zoneinfo/asia ============================================================================== --- stable/6/share/zoneinfo/asia Fri Jun 19 11:52:07 2009 (r194485) +++ stable/6/share/zoneinfo/asia Fri Jun 19 11:59:24 2009 (r194486) @@ -1,5 +1,5 @@ #
-# @(#)asia	8.34
+# @(#)asia	8.35
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -165,9 +165,12 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 # http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
 # 
 
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Bang	2009	only	-	Jan	1	0:00	0	-
-Rule	Bang	2009	only	-	Jun	20	0:00	1:00	S
+# From A. N. M. Kamrus Saadat (2009-06-15):
+# Finally we've got the official mail regarding DST start time where DST start 
+# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh 
+# Telecommunication Regulatory Commission). 
+#
+# No DST end date has been announced yet.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
@@ -176,8 +179,8 @@ Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:30	-	IST	1942 Sep
 			6:30	-	BURT	1951 Sep 30
 			6:00	-	DACT	1971 Mar 26 # Dacca Time
-			6:00	-	BDT	2009 # Bangladesh Time
-			6:00	Bang	BD%sT
+			6:00	-	BDT	2009 Jun 19 23:00 # Bangladesh Time
+			6:00	1:00	BDST
 
 # Bhutan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

From owner-svn-src-stable-6@FreeBSD.ORG  Fri Jun 19 17:11:59 2009
Return-Path: 
Delivered-To: svn-src-stable-6@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5F31E1065678;
	Fri, 19 Jun 2009 17:11:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4D14C8FC1D;
	Fri, 19 Jun 2009 17:11:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JHBxMW049595;
	Fri, 19 Jun 2009 17:11:59 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JHBxWh049593;
	Fri, 19 Jun 2009 17:11:59 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906191711.n5JHBxWh049593@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 19 Jun 2009 17:11:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194499 - stable/6/share/man/man4
X-BeenThere: svn-src-stable-6@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 6-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 19 Jun 2009 17:12:00 -0000

Author: jhb
Date: Fri Jun 19 17:11:59 2009
New Revision: 194499
URL: http://svn.freebsd.org/changeset/base/194499

Log:
  MFC: mfi(4) supports the LSI MegaRAID SAS 1078 and Dell PERC6.
  
  PR:		docs/135712

Modified:
  stable/6/share/man/man4/   (props changed)
  stable/6/share/man/man4/mfi.4
  stable/6/share/man/man4/xl.4   (props changed)

Modified: stable/6/share/man/man4/mfi.4
==============================================================================
--- stable/6/share/man/man4/mfi.4	Fri Jun 19 17:10:35 2009	(r194498)
+++ stable/6/share/man/man4/mfi.4	Fri Jun 19 17:11:59 2009	(r194499)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 3, 2006
+.Dd January 17, 2008
 .Dt MFI 4
 .Os
 .Sh NAME
@@ -83,7 +83,11 @@ LSI MegaRAID SAS 8408E
 .It
 LSI MegaRAID SAS 8480E
 .It
-Dell PERC5/i
+LSI MegaRAID SAS 1078
+.It
+Dell PERC5
+.It
+Dell PERC6
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /dev/mfid?" -compact

From owner-svn-src-stable-6@FreeBSD.ORG  Fri Jun 19 17:59:30 2009
Return-Path: 
Delivered-To: svn-src-stable-6@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3CDEB106568C;
	Fri, 19 Jun 2009 17:59:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 109A18FC17;
	Fri, 19 Jun 2009 17:59:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JHxTNl051259;
	Fri, 19 Jun 2009 17:59:29 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JHxTiT051258;
	Fri, 19 Jun 2009 17:59:29 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906191759.n5JHxTiT051258@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 19 Jun 2009 17:59:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194501 - stable/6/share/man/man4
X-BeenThere: svn-src-stable-6@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 6-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 19 Jun 2009 17:59:31 -0000

Author: jhb
Date: Fri Jun 19 17:59:29 2009
New Revision: 194501
URL: http://svn.freebsd.org/changeset/base/194501

Log:
  Move mergeinfo up to parent.

Modified:
  stable/6/share/man/man4/   (props changed)
  stable/6/share/man/man4/xl.4   (props changed)