From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 03:42:29 2010 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 44DF3106566C; Sun, 17 Jan 2010 03:42:29 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) by mx1.freebsd.org (Postfix) with ESMTP id E5CE48FC18; Sun, 17 Jan 2010 03:42:28 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTP id o0H3gPIG025784; Sun, 17 Jan 2010 12:42:27 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Sun, 17 Jan 2010 12:41:46 +0900 (JST) Message-Id: <20100117.124146.27866377.nyan@FreeBSD.org> To: attilio@freebsd.org From: TAKAHASHI Yoshihiro In-Reply-To: <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> References: <201001161224.o0GCOCOI094360@svn.freebsd.org> <20100116.220840.91363215.nyan@FreeBSD.org> <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202441 - 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, 17 Jan 2010 03:42:29 -0000 In article <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> Attilio Rao writes: > Thanks for reporting this. > This further patch should fix the problem for i386 and possibly pc98 > (linked with your patch): > http://www.freebsd.org/~attilio/atpic.diff Please apply the same change to sys/pc98/cbus/clock.c, and it's fine. Please feel free to commit my patch. Thanks. --- TAKAHASHI Yoshihiro From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 06:20:31 2010 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 451E3106566C; Sun, 17 Jan 2010 06:20:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3295C8FC15; Sun, 17 Jan 2010 06:20:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H6KVr4032441; Sun, 17 Jan 2010 06:20:31 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H6KVUJ032434; Sun, 17 Jan 2010 06:20:31 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001170620.o0H6KVUJ032434@svn.freebsd.org> From: Xin LI Date: Sun, 17 Jan 2010 06: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: r202454 - in head: lib/libgeom sbin/geom/core sys/geom 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, 17 Jan 2010 06:20:31 -0000 Author: delphij Date: Sun Jan 17 06:20:30 2010 New Revision: 202454 URL: http://svn.freebsd.org/changeset/base/202454 Log: Expose stripe offset and stripe size through libgeom and geom(8) userland utilities. Reviewed by: pjd, mav (earlier version) Modified: head/lib/libgeom/geom_util.c head/lib/libgeom/geom_xml2tree.c head/lib/libgeom/libgeom.3 head/lib/libgeom/libgeom.h head/sbin/geom/core/geom.c head/sys/geom/geom_dump.c Modified: head/lib/libgeom/geom_util.c ============================================================================== --- head/lib/libgeom/geom_util.c Sat Jan 16 20:51:33 2010 (r202453) +++ head/lib/libgeom/geom_util.c Sun Jan 17 06:20:30 2010 (r202454) @@ -114,6 +114,32 @@ g_sectorsize(int fd) } /* + * Return stripe size of the given provider. + */ +off_t +g_stripesize(int fd) +{ + off_t stripesize; + + if (g_ioctl_arg(fd, DIOCGSTRIPESIZE, &stripesize) == -1) + return (-1); + return (stripesize); +} + +/* + * Return stripe size of the given provider. + */ +off_t +g_stripeoffset(int fd) +{ + off_t stripeoffset; + + if (g_ioctl_arg(fd, DIOCGSTRIPEOFFSET, &stripeoffset) == -1) + return (-1); + return (stripeoffset); +} + +/* * Return the correct provider name. */ char * Modified: head/lib/libgeom/geom_xml2tree.c ============================================================================== --- head/lib/libgeom/geom_xml2tree.c Sat Jan 16 20:51:33 2010 (r202453) +++ head/lib/libgeom/geom_xml2tree.c Sun Jan 17 06:20:30 2010 (r202454) @@ -230,6 +230,16 @@ EndElement(void *userData, const char *n free(p); return; } + if (!strcmp(name, "stripesize") && mt->provider != NULL) { + mt->provider->lg_stripesize = strtoumax(p, NULL, 0); + free(p); + return; + } + if (!strcmp(name, "stripeoffset") && mt->provider != NULL) { + mt->provider->lg_stripeoffset = strtoumax(p, NULL, 0); + free(p); + return; + } if (!strcmp(name, "config")) { mt->config = NULL; Modified: head/lib/libgeom/libgeom.3 ============================================================================== --- head/lib/libgeom/libgeom.3 Sat Jan 16 20:51:33 2010 (r202453) +++ head/lib/libgeom/libgeom.3 Sun Jan 17 06:20:30 2010 (r202454) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 8, 2008 +.Dd January 16, 2010 .Dt LIBGEOM 3 .Os .Sh NAME @@ -50,6 +50,8 @@ .Nm g_close , .Nm g_mediasize , .Nm g_sectorsize , +.Nm g_stripeoffset , +.Nm g_stripesize , .Nm g_flush , .Nm g_delete , .Nm g_device_path , @@ -101,6 +103,10 @@ .Fn g_mediasize "int fd" .Ft ssize_t .Fn g_sectorsize "int fd" +.Ft ssize_t +.Fn g_stripeoffset "int fd" +.Ft ssize_t +.Fn g_stripesize "int fd" .Ft int .Fn g_flush "int fd" .Ft int @@ -297,6 +303,14 @@ The function returns sector size of the given provider. .Pp The +.Fn g_stripeoffset +function returns stripe size of the given provider. +.Pp +The +.Fn g_stripesize +function returns stripe size of the given provider. +.Pp +The .Fn g_flush function sends .Dv BIO_FLUSH Modified: head/lib/libgeom/libgeom.h ============================================================================== --- head/lib/libgeom/libgeom.h Sat Jan 16 20:51:33 2010 (r202453) +++ head/lib/libgeom/libgeom.h Sun Jan 17 06:20:30 2010 (r202454) @@ -123,6 +123,8 @@ struct gprovider { char *lg_mode; off_t lg_mediasize; u_int lg_sectorsize; + off_t lg_stripeoffset; + off_t lg_stripesize; struct gconf lg_config; }; @@ -149,6 +151,8 @@ int g_open(const char *, int); int g_close(int); off_t g_mediasize(int); ssize_t g_sectorsize(int); +off_t g_stripeoffset(int); +off_t g_stripesize(int); int g_flush(int); int g_delete(int, off_t, off_t); int g_get_ident(int, char *, size_t); Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Sat Jan 16 20:51:33 2010 (r202453) +++ head/sbin/geom/core/geom.c Sun Jan 17 06:20:30 2010 (r202454) @@ -772,6 +772,10 @@ list_one_provider(struct gprovider *pp, printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_mediasize, buf); printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); + if (pp->lg_stripesize > 0) { + printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); + printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); + } printf("%sMode: %s\n", prefix, pp->lg_mode); LIST_FOREACH(conf, &pp->lg_config, lg_config) { printf("%s%s: %s\n", prefix, conf->lg_name, conf->lg_val); @@ -796,6 +800,10 @@ list_one_consumer(struct gconsumer *cp, printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_mediasize, buf); printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); + if (pp->lg_stripesize > 0) { + printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); + printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); + } printf("%sMode: %s\n", prefix, cp->lg_mode); } LIST_FOREACH(conf, &cp->lg_config, lg_config) { Modified: head/sys/geom/geom_dump.c ============================================================================== --- head/sys/geom/geom_dump.c Sat Jan 16 20:51:33 2010 (r202453) +++ head/sys/geom/geom_dump.c Sun Jan 17 06:20:30 2010 (r202454) @@ -185,6 +185,10 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t %jd\n", (intmax_t)pp->mediasize); sbuf_printf(sb, "\t %u\n", pp->sectorsize); + if (pp->stripesize > 0) { + sbuf_printf(sb, "\t %u\n", pp->stripesize); + sbuf_printf(sb, "\t %u\n", pp->stripeoffset); + } if (pp->geom->flags & G_GEOM_WITHER) ; else if (pp->geom->dumpconf != NULL) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 06:24:09 2010 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 81201106566B; Sun, 17 Jan 2010 06:24:09 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65B6F8FC08; Sun, 17 Jan 2010 06:24:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H6O9lZ033321; Sun, 17 Jan 2010 06:24:09 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H6O9DL033319; Sun, 17 Jan 2010 06:24:09 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201001170624.o0H6O9DL033319@svn.freebsd.org> From: Mitsuru IWASAKI Date: Sun, 17 Jan 2010 06:24: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: r202455 - stable/8/sys/dev/acpi_support 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, 17 Jan 2010 06:24:09 -0000 Author: iwasaki Date: Sun Jan 17 06:24:09 2010 New Revision: 202455 URL: http://svn.freebsd.org/changeset/base/202455 Log: MFC r201605: Update acpi_ibm syctl nodes on resume. Modified: stable/8/sys/dev/acpi_support/acpi_ibm.c Modified: stable/8/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- stable/8/sys/dev/acpi_support/acpi_ibm.c Sun Jan 17 06:20:30 2010 (r202454) +++ stable/8/sys/dev/acpi_support/acpi_ibm.c Sun Jan 17 06:24:09 2010 (r202455) @@ -255,6 +255,7 @@ ACPI_SERIAL_DECL(ibm, "ACPI IBM extras") static int acpi_ibm_probe(device_t dev); static int acpi_ibm_attach(device_t dev); static int acpi_ibm_detach(device_t dev); +static int acpi_ibm_resume(device_t dev); static void ibm_led(void *softc, int onoff); static void ibm_led_task(struct acpi_ibm_softc *sc, int pending __unused); @@ -273,6 +274,7 @@ static device_method_t acpi_ibm_methods[ DEVMETHOD(device_probe, acpi_ibm_probe), DEVMETHOD(device_attach, acpi_ibm_attach), DEVMETHOD(device_detach, acpi_ibm_detach), + DEVMETHOD(device_resume, acpi_ibm_resume), {0, 0} }; @@ -435,6 +437,34 @@ acpi_ibm_detach(device_t dev) } static int +acpi_ibm_resume(device_t dev) +{ + struct acpi_ibm_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + ACPI_SERIAL_BEGIN(ibm); + for (int i = 0; acpi_ibm_sysctls[i].name != NULL; i++) { + int val; + + if ((acpi_ibm_sysctls[i].access & CTLFLAG_RD) == 0) { + continue; + } + + val = acpi_ibm_sysctl_get(sc, i); + + if ((acpi_ibm_sysctls[i].access & CTLFLAG_WR) == 0) { + continue; + } + + acpi_ibm_sysctl_set(sc, i, val); + } + ACPI_SERIAL_END(ibm); + + return (0); +} + +static int acpi_ibm_eventmask_set(struct acpi_ibm_softc *sc, int val) { ACPI_OBJECT arg[2]; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 06:24:24 2010 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 5DE5B1065698; Sun, 17 Jan 2010 06:24:24 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC1D8FC13; Sun, 17 Jan 2010 06:24:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H6OOki033393; Sun, 17 Jan 2010 06:24:24 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H6OOkj033391; Sun, 17 Jan 2010 06:24:24 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201001170624.o0H6OOkj033391@svn.freebsd.org> From: Mitsuru IWASAKI Date: Sun, 17 Jan 2010 06:24:24 +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: r202456 - stable/7/sys/dev/acpi_support 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, 17 Jan 2010 06:24:24 -0000 Author: iwasaki Date: Sun Jan 17 06:24:24 2010 New Revision: 202456 URL: http://svn.freebsd.org/changeset/base/202456 Log: MFC r201605: Update acpi_ibm syctl nodes on resume. Modified: stable/7/sys/dev/acpi_support/acpi_ibm.c Modified: stable/7/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- stable/7/sys/dev/acpi_support/acpi_ibm.c Sun Jan 17 06:24:09 2010 (r202455) +++ stable/7/sys/dev/acpi_support/acpi_ibm.c Sun Jan 17 06:24:24 2010 (r202456) @@ -252,6 +252,7 @@ ACPI_SERIAL_DECL(ibm, "ACPI IBM extras") static int acpi_ibm_probe(device_t dev); static int acpi_ibm_attach(device_t dev); static int acpi_ibm_detach(device_t dev); +static int acpi_ibm_resume(device_t dev); static void ibm_led(void *softc, int onoff); static void ibm_led_task(struct acpi_ibm_softc *sc, int pending __unused); @@ -270,6 +271,7 @@ static device_method_t acpi_ibm_methods[ DEVMETHOD(device_probe, acpi_ibm_probe), DEVMETHOD(device_attach, acpi_ibm_attach), DEVMETHOD(device_detach, acpi_ibm_detach), + DEVMETHOD(device_resume, acpi_ibm_resume), {0, 0} }; @@ -435,6 +437,34 @@ acpi_ibm_detach(device_t dev) } static int +acpi_ibm_resume(device_t dev) +{ + struct acpi_ibm_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + ACPI_SERIAL_BEGIN(ibm); + for (int i = 0; acpi_ibm_sysctls[i].name != NULL; i++) { + int val; + + if ((acpi_ibm_sysctls[i].access & CTLFLAG_RD) == 0) { + continue; + } + + val = acpi_ibm_sysctl_get(sc, i); + + if ((acpi_ibm_sysctls[i].access & CTLFLAG_WR) == 0) { + continue; + } + + acpi_ibm_sysctl_set(sc, i, val); + } + ACPI_SERIAL_END(ibm); + + return (0); +} + +static int acpi_ibm_eventmask_set(struct acpi_ibm_softc *sc, int val) { ACPI_OBJECT arg[2]; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 07:40:08 2010 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 C059A106566C; Sun, 17 Jan 2010 07:40:08 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:198:206::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2CC608FC16; Sun, 17 Jan 2010 07:40:07 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.3/8.14.3) with ESMTP id o0H7e1JJ040736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 17 Jan 2010 08:40:01 +0100 (CET) (envelope-from uqs@spoerlein.net) Received: (from uqs@localhost) by acme.spoerlein.net (8.14.3/8.14.3/Submit) id o0H7e1Qb040735; Sun, 17 Jan 2010 08:40:01 +0100 (CET) (envelope-from uqs@spoerlein.net) Date: Sun, 17 Jan 2010 08:40:01 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Peter Jeremy Message-ID: <20100117074001.GJ96430@acme.spoerlein.net> Mail-Followup-To: Peter Jeremy , "Robert N. M. Watson" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org References: <4B4E1586.7090102@FreeBSD.org> <20100114.102142.328914705071816274.imp@bsdimp.com> <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> <20100115085856.GA2556@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100115085856.GA2556@server.vk2pj.dyndns.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, "Robert N. M. Watson" , freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC 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, 17 Jan 2010 07:40:08 -0000 On Fri, 15.01.2010 at 19:58:57 +1100, Peter Jeremy wrote: > On 2010-Jan-14 20:12:24 +0000, "Robert N. M. Watson" wrote: > >- Desktop/server users who want their system to work without any > > special tuning or magic, and likely feel the comments they put in > > configuration files are important > > As far as I'm concerned, the most critical bit of my kernel config file > is the $Header...$ comment - which lets me extract the remainder of the > file from my CVS repository. I don't currently use includes (because > most of my config files have roots pre-dating the include directive). > > I find it a PITA that INCLUDE_CONFIG_FILE _doesn't_ include comments > (or at least my $Header$ line) by default. Seriously, is that the only "comment" people care about? I really have a hard time coming up with *important* stuff that people put in config's comments and then somehow lose the connection between comment and running kernel. > IMO, it would be useful to have an "include this literal string in the > kernel" config directive. This would allow config file version control > information to be embedded without needing the comments. And that would > resolve the issue of embedding fully expanded details of all included > files without the hassle of keeping the comments around. Ok, this I can understand. We could then call this directive something ... um like ident perhaps? :) Seems like all that people want to do is simply: cpu i386 ident SERVER descr "$Id: foo,v" That shouldn't be too hard? FWIW I think it is more important to have a way to recreate the current running kernel than to get a verbatim/expanded copy of all config files used to create it in the first place. Just my two cents, Uli From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 08:10:37 2010 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 81B98106568B; Sun, 17 Jan 2010 08:10:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 715298FC16; Sun, 17 Jan 2010 08:10:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H8AbKo057737; Sun, 17 Jan 2010 08:10:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H8AbRN057735; Sun, 17 Jan 2010 08:10:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001170810.o0H8AbRN057735@svn.freebsd.org> From: Xin LI Date: Sun, 17 Jan 2010 08:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202457 - head/sbin/geom/core 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, 17 Jan 2010 08:10:37 -0000 Author: delphij Date: Sun Jan 17 08:10:37 2010 New Revision: 202457 URL: http://svn.freebsd.org/changeset/base/202457 Log: Stripe offset may be usable even without stripe size known, so give the output when either is non-zero. Suggested by: mav Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Sun Jan 17 06:24:24 2010 (r202456) +++ head/sbin/geom/core/geom.c Sun Jan 17 08:10:37 2010 (r202457) @@ -772,7 +772,7 @@ list_one_provider(struct gprovider *pp, printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_mediasize, buf); printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); - if (pp->lg_stripesize > 0) { + if (pp->lg_stripesize > 0 || pp->lg_stripeoffset > 0) { printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 08:12:28 2010 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 A2371106566B; Sun, 17 Jan 2010 08:12:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91FAB8FC12; Sun, 17 Jan 2010 08:12:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H8CSNt058204; Sun, 17 Jan 2010 08:12:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H8CSx9058202; Sun, 17 Jan 2010 08:12:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001170812.o0H8CSx9058202@svn.freebsd.org> From: Xin LI Date: Sun, 17 Jan 2010 08:12: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: r202458 - head/lib/libgeom 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, 17 Jan 2010 08:12:28 -0000 Author: delphij Date: Sun Jan 17 08:12:28 2010 New Revision: 202458 URL: http://svn.freebsd.org/changeset/base/202458 Log: Correct a typo (when we talk about offset, it should be offset, not size). Submitted by: pluknet at gmail com Modified: head/lib/libgeom/libgeom.3 Modified: head/lib/libgeom/libgeom.3 ============================================================================== --- head/lib/libgeom/libgeom.3 Sun Jan 17 08:10:37 2010 (r202457) +++ head/lib/libgeom/libgeom.3 Sun Jan 17 08:12:28 2010 (r202458) @@ -304,7 +304,7 @@ function returns sector size of the give .Pp The .Fn g_stripeoffset -function returns stripe size of the given provider. +function returns stripe offset of the given provider. .Pp The .Fn g_stripesize From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 08:39:48 2010 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 EB2F4106566C; Sun, 17 Jan 2010 08:39:48 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DACDD8FC08; Sun, 17 Jan 2010 08:39:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H8dmZG064542; Sun, 17 Jan 2010 08:39:48 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H8dmYY064540; Sun, 17 Jan 2010 08:39:48 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201001170839.o0H8dmYY064540@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 17 Jan 2010 08:39: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: r202459 - head/sys/netinet/ipfw 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, 17 Jan 2010 08:39:49 -0000 Author: ume Date: Sun Jan 17 08:39:48 2010 New Revision: 202459 URL: http://svn.freebsd.org/changeset/base/202459 Log: Change 'me' to match any IPv6 address configured on an interface in the system as well as any IPv4 address. Reviewed by: David Horn , luigi, qingli MFC after: 2 weeks Modified: head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Sun Jan 17 08:12:28 2010 (r202458) +++ head/sys/netinet/ipfw/ip_fw2.c Sun Jan 17 08:39:48 2010 (r202459) @@ -1390,7 +1390,14 @@ do { \ INADDR_TO_IFP(src_ip, tif); match = (tif != NULL); + break; } + /* FALLTHROUGH */ +#ifdef INET6 + case O_IP6_SRC_ME: + match = is_ipv6 && + search_ip6_addr_net(&args->f_id.src_ip6); +#endif break; case O_IP_DST_SET: @@ -1423,7 +1430,14 @@ do { \ INADDR_TO_IFP(dst_ip, tif); match = (tif != NULL); + break; } + /* FALLTHROUGH */ +#ifdef INET6 + case O_IP6_DST_ME: + match = is_ipv6 && + search_ip6_addr_net(&args->f_id.dst_ip6); +#endif break; case O_IP_SRCPORT: @@ -1691,14 +1705,6 @@ do { \ } break; - case O_IP6_SRC_ME: - match= is_ipv6 && search_ip6_addr_net(&args->f_id.src_ip6); - break; - - case O_IP6_DST_ME: - match= is_ipv6 && search_ip6_addr_net(&args->f_id.dst_ip6); - break; - case O_FLOW6ID: match = is_ipv6 && flow6id_match(args->f_id.flow_id6, From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 08:41:08 2010 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 23F06106566B; Sun, 17 Jan 2010 08:41:08 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 138178FC14; Sun, 17 Jan 2010 08:41:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H8f7hx064903; Sun, 17 Jan 2010 08:41:07 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H8f7Th064900; Sun, 17 Jan 2010 08:41:07 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201001170841.o0H8f7Th064900@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 17 Jan 2010 08:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202460 - in head/etc: . defaults 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, 17 Jan 2010 08:41:08 -0000 Author: ume Date: Sun Jan 17 08:41:07 2010 New Revision: 202460 URL: http://svn.freebsd.org/changeset/base/202460 Log: Remove the rules using 'me6'. Now, 'me' matches both any IPv6 address and any IPv4 address configured on an interface in the system. Reviewed by: David Horn , luigi, qingli MFC after: 2 weeks Modified: head/etc/defaults/rc.conf head/etc/rc.firewall Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sun Jan 17 08:39:48 2010 (r202459) +++ head/etc/defaults/rc.conf Sun Jan 17 08:41:07 2010 (r202460) @@ -143,9 +143,7 @@ firewall_myservices="" # List of TCP po firewall_allowservices="" # List of IPs which have access to # $firewall_myservices for "workstation" # firewall. -firewall_trusted="" # List of IPv4s which have full access to this - # host for "workstation" firewall. -firewall_trusted_ipv6="" # List of IPv6s which have full access to this +firewall_trusted="" # List of IPs which have full access to this # host for "workstation" firewall. firewall_logdeny="NO" # Set to YES to log default denied incoming # packets for "workstation" firewall. Modified: head/etc/rc.firewall ============================================================================== --- head/etc/rc.firewall Sun Jan 17 08:39:48 2010 (r202459) +++ head/etc/rc.firewall Sun Jan 17 08:41:07 2010 (r202460) @@ -212,8 +212,8 @@ case ${firewall_type} in ${fwcmd} add pass all from me to ${net} ${fwcmd} add pass all from ${net} to me if [ -n "$net6" ]; then - ${fwcmd} add pass all from me6 to ${net6} - ${fwcmd} add pass all from ${net6} to me6 + ${fwcmd} add pass all from me to ${net6} + ${fwcmd} add pass all from ${net6} to me fi if [ -n "$net6" ]; then @@ -221,7 +221,7 @@ case ${firewall_type} in ${fwcmd} add pass all from fe80::/10 to ff02::/16 ${fwcmd} add pass all from ${net6} to ff02::/16 # Allow DHCPv6 - ${fwcmd} add pass udp from fe80::/10 to me6 546 + ${fwcmd} add pass udp from fe80::/10 to me 546 fi # Allow TCP through if setup succeeded @@ -232,30 +232,18 @@ case ${firewall_type} in # Allow setup of incoming email ${fwcmd} add pass tcp from any to me 25 setup - if [ -n "$net6" ]; then - ${fwcmd} add pass tcp from any to me6 25 setup - fi # Allow setup of outgoing TCP connections only ${fwcmd} add pass tcp from me to any setup - if [ -n "$net6" ]; then - ${fwcmd} add pass tcp from me6 to any setup - fi # Disallow setup of all other TCP connections ${fwcmd} add deny tcp from any to any setup # Allow DNS queries out in the world ${fwcmd} add pass udp from me to any 53 keep-state - if [ -n "$net6" ]; then - ${fwcmd} add pass udp from me6 to any 53 keep-state - fi # Allow NTP queries out in the world ${fwcmd} add pass udp from me to any 123 keep-state - if [ -n "$net6" ]; then - ${fwcmd} add pass udp from me6 to any 123 keep-state - fi # Everything else is denied by default, unless the # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel @@ -402,25 +390,14 @@ case ${firewall_type} in # Allow setup of incoming email ${fwcmd} add pass tcp from any to me 25 setup - if [ -n "$inet6" ]; then - ${fwcmd} add pass tcp from any to me6 25 setup - fi # Allow access to our DNS ${fwcmd} add pass tcp from any to me 53 setup ${fwcmd} add pass udp from any to me 53 ${fwcmd} add pass udp from me 53 to any - if [ -n "$inet6" ]; then - ${fwcmd} add pass tcp from any to me6 53 setup - ${fwcmd} add pass udp from any to me6 53 - ${fwcmd} add pass udp from me6 53 to any - fi # Allow access to our WWW ${fwcmd} add pass tcp from any to me 80 setup - if [ -n "$inet6" ]; then - ${fwcmd} add pass tcp from any to me6 80 setup - fi # Reject&Log all setup of incoming connections from the outside ${fwcmd} add deny log ip4 from any to any in via ${oif} setup proto tcp @@ -434,15 +411,9 @@ case ${firewall_type} in # Allow DNS queries out in the world ${fwcmd} add pass udp from me to any 53 keep-state - if [ -n "$inet6" ]; then - ${fwcmd} add pass udp from me6 to any 53 keep-state - fi # Allow NTP queries out in the world ${fwcmd} add pass udp from me to any 123 keep-state - if [ -n "$inet6" ]; then - ${fwcmd} add pass udp from me6 to any 123 keep-state - fi # Everything else is denied by default, unless the # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel @@ -477,18 +448,13 @@ case ${firewall_type} in # For services permitted below. ${fwcmd} add pass tcp from me to any established - if [ $ipv6_available -eq 0 ]; then - ${fwcmd} add pass tcp from me6 to any established - fi # Allow any connection out, adding state for each. ${fwcmd} add pass tcp from me to any setup keep-state ${fwcmd} add pass udp from me to any keep-state ${fwcmd} add pass icmp from me to any keep-state if [ $ipv6_available -eq 0 ]; then - ${fwcmd} add pass tcp from me6 to any setup keep-state - ${fwcmd} add pass udp from me6 to any keep-state - ${fwcmd} add pass ipv6-icmp from me6 to any keep-state + ${fwcmd} add pass ipv6-icmp from me to any keep-state fi # Allow DHCP. @@ -496,7 +462,7 @@ case ${firewall_type} in ${fwcmd} add pass udp from any 67 to me 68 in ${fwcmd} add pass udp from any 67 to 255.255.255.255 68 in if [ $ipv6_available -eq 0 ]; then - ${fwcmd} add pass udp from fe80::/10 to me6 546 in + ${fwcmd} add pass udp from fe80::/10 to me 546 in fi # Some servers will ping the IP while trying to decide if it's # still in use. @@ -525,9 +491,6 @@ case ${firewall_type} in for i in ${firewall_allowservices} ; do for j in ${firewall_myservices} ; do ${fwcmd} add pass tcp from $i to me $j - if [ $ipv6_available -eq 0 ]; then - ${fwcmd} add pass tcp from $i to me6 $j - fi done done @@ -537,9 +500,6 @@ case ${firewall_type} in for i in ${firewall_trusted} ; do ${fwcmd} add pass ip from $i to me done - for i in ${firewall_trusted_ipv6} ; do - ${fwcmd} add pass all from $i to me6 - done ${fwcmd} add 65000 count ip from any to any From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 09:37:32 2010 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 39DD2106566C; Sun, 17 Jan 2010 09:37:32 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2952E8FC1E; Sun, 17 Jan 2010 09:37:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H9bWJQ078076; Sun, 17 Jan 2010 09:37:32 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H9bVM4078072; Sun, 17 Jan 2010 09:37:31 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001170937.o0H9bVM4078072@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 17 Jan 2010 09:37: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: r202461 - head/bin/cp 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, 17 Jan 2010 09:37:32 -0000 Author: gavin Date: Sun Jan 17 09:37:31 2010 New Revision: 202461 URL: http://svn.freebsd.org/changeset/base/202461 Log: Implement an "-x" option to cp(1), for compatibility with Linux and feature parity with du(1) and similar: When set, cp(1) will not traverse mount points. Initial patch by: Graham J Lee leeg teaching.physics.ox.ac.uk PR: bin/88056 Initial patch by: Graham J Lee leeg teaching.physics.ox.ac.uk Approved by: ed (mentor) MFC after: 1 month Modified: head/bin/cp/cp.1 head/bin/cp/cp.c head/bin/cp/utils.c Modified: head/bin/cp/cp.1 ============================================================================== --- head/bin/cp/cp.1 Sun Jan 17 08:41:07 2010 (r202460) +++ head/bin/cp/cp.1 Sun Jan 17 09:37:31 2010 (r202461) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 27, 2006 +.Dd January 17, 2010 .Dt CP 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpv +.Op Fl alpvx .Ar source_file target_file .Nm .Oo @@ -53,7 +53,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpv +.Op Fl alpvx .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -183,6 +183,8 @@ permissions. Cause .Nm to be verbose, showing files as they are copied. +.It Fl x +File system mount points are not traversed. .El .Pp For each destination file that already exists, its contents are Modified: head/bin/cp/cp.c ============================================================================== --- head/bin/cp/cp.c Sun Jan 17 08:41:07 2010 (r202460) +++ head/bin/cp/cp.c Sun Jan 17 09:37:31 2010 (r202461) @@ -101,8 +101,9 @@ main(int argc, char *argv[]) int Hflag, Lflag, Pflag, ch, fts_options, r, have_trailing_slash; char *target; + fts_options = FTS_NOCHDIR | FTS_PHYSICAL; Hflag = Lflag = Pflag = 0; - while ((ch = getopt(argc, argv, "HLPRafilnprv")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -150,6 +151,9 @@ main(int argc, char *argv[]) case 'v': vflag = 1; break; + case 'x': + fts_options |= FTS_XDEV; + break; default: usage(); break; @@ -160,7 +164,6 @@ main(int argc, char *argv[]) if (argc < 2) usage(); - fts_options = FTS_NOCHDIR | FTS_PHYSICAL; if (Rflag && rflag) errx(1, "the -R and -r options may not be specified together"); if (rflag) Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Sun Jan 17 08:41:07 2010 (r202460) +++ head/bin/cp/utils.c Sun Jan 17 09:37:31 2010 (r202461) @@ -518,8 +518,8 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file target_file", -" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file ... " +"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file", +" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... " "target_directory"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 10:59:00 2010 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 54A73106568B; Sun, 17 Jan 2010 10:59:00 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1988FC0C; Sun, 17 Jan 2010 10:59:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HAx0xU099997; Sun, 17 Jan 2010 10:59:00 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HAx08b099995; Sun, 17 Jan 2010 10:59:00 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001171059.o0HAx08b099995@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 17 Jan 2010 10:59:00 +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: r202462 - stable/8/usr.bin/tftp 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, 17 Jan 2010 10:59:00 -0000 Author: gavin Date: Sun Jan 17 10:58:59 2010 New Revision: 202462 URL: http://svn.freebsd.org/changeset/base/202462 Log: Merge r201429: Fix return code in the case of successful file transfer, broken in tftp.c 1.13 PR: bin/117452 Submitted by: Spencer Minear minear securecomputing.com Approved by: ed (mentor, implicit) Modified: stable/8/usr.bin/tftp/tftp.c Directory Properties: stable/8/usr.bin/tftp/ (props changed) Modified: stable/8/usr.bin/tftp/tftp.c ============================================================================== --- stable/8/usr.bin/tftp/tftp.c Sun Jan 17 09:37:31 2010 (r202461) +++ stable/8/usr.bin/tftp/tftp.c Sun Jan 17 10:58:59 2010 (r202462) @@ -140,6 +140,7 @@ send_data: (struct sockaddr *)&peer, peer.ss_len); if (n != size + 4) { warn("sendto"); + txrx_error = 1; goto abort; } read_ahead(file, convert); @@ -153,6 +154,7 @@ send_data: alarm(0); if (n < 0) { warn("recvfrom"); + txrx_error = 1; goto abort; } if (!serv.ss_family) @@ -160,6 +162,7 @@ send_data: else if (!cmpport((struct sockaddr *)&serv, (struct sockaddr *)&from)) { warn("server port mismatch"); + txrx_error = 1; goto abort; } peer = from; @@ -202,7 +205,6 @@ abort: stopclock(); if (amount > 0) printstats("Sent", amount); - txrx_error = 1; } /* @@ -255,6 +257,7 @@ send_ack: peer.ss_len) != size) { alarm(0); warn("sendto"); + txrx_error = 1; goto abort; } write_behind(file, convert); @@ -268,6 +271,7 @@ send_ack: alarm(0); if (n < 0) { warn("recvfrom"); + txrx_error = 1; goto abort; } if (!serv.ss_family) @@ -275,6 +279,7 @@ send_ack: else if (!cmpport((struct sockaddr *)&serv, (struct sockaddr *)&from)) { warn("server port mismatch"); + txrx_error = 1; goto abort; } peer = from; @@ -325,7 +330,6 @@ abort: /* ok to ack, since user */ stopclock(); if (amount > 0) printstats("Received", amount); - txrx_error = 1; } static int From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 10:59:07 2010 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 AFB4D1065670; Sun, 17 Jan 2010 10:59:07 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440088FC1C; Sun, 17 Jan 2010 10:59:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HAx70s000171; Sun, 17 Jan 2010 10:59:07 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HAx7re000169; Sun, 17 Jan 2010 10:59:07 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001171059.o0HAx7re000169@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 17 Jan 2010 10:59:07 +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: r202463 - stable/7/usr.bin/tftp 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, 17 Jan 2010 10:59:07 -0000 Author: gavin Date: Sun Jan 17 10:59:07 2010 New Revision: 202463 URL: http://svn.freebsd.org/changeset/base/202463 Log: Merge r201429 from head: Fix return code in the case of successful file transfer, broken in tftp.c 1.13 PR: bin/117452 Submitted by: Spencer Minear minear securecomputing.com Approved by: ed (mentor, implicit) Modified: stable/7/usr.bin/tftp/tftp.c Directory Properties: stable/7/usr.bin/tftp/ (props changed) Modified: stable/7/usr.bin/tftp/tftp.c ============================================================================== --- stable/7/usr.bin/tftp/tftp.c Sun Jan 17 10:58:59 2010 (r202462) +++ stable/7/usr.bin/tftp/tftp.c Sun Jan 17 10:59:07 2010 (r202463) @@ -143,6 +143,7 @@ send_data: (struct sockaddr *)&peer, peer.ss_len); if (n != size + 4) { warn("sendto"); + txrx_error = 1; goto abort; } read_ahead(file, convert); @@ -156,6 +157,7 @@ send_data: alarm(0); if (n < 0) { warn("recvfrom"); + txrx_error = 1; goto abort; } if (!serv.ss_family) @@ -163,6 +165,7 @@ send_data: else if (!cmpport((struct sockaddr *)&serv, (struct sockaddr *)&from)) { warn("server port mismatch"); + txrx_error = 1; goto abort; } peer = from; @@ -205,7 +208,6 @@ abort: stopclock(); if (amount > 0) printstats("Sent", amount); - txrx_error = 1; } /* @@ -261,6 +263,7 @@ send_ack: peer.ss_len) != size) { alarm(0); warn("sendto"); + txrx_error = 1; goto abort; } write_behind(file, convert); @@ -274,6 +277,7 @@ send_ack: alarm(0); if (n < 0) { warn("recvfrom"); + txrx_error = 1; goto abort; } if (!serv.ss_family) @@ -281,6 +285,7 @@ send_ack: else if (!cmpport((struct sockaddr *)&serv, (struct sockaddr *)&from)) { warn("server port mismatch"); + txrx_error = 1; goto abort; } peer = from; @@ -331,7 +336,6 @@ abort: /* ok to ack, since user */ stopclock(); if (amount > 0) printstats("Received", amount); - txrx_error = 1; } static int From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 11:10:25 2010 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 3B5EF1065672; Sun, 17 Jan 2010 11:10:25 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AB998FC13; Sun, 17 Jan 2010 11:10:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HBAPaq002879; Sun, 17 Jan 2010 11:10:25 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HBAPmc002877; Sun, 17 Jan 2010 11:10:25 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001171110.o0HBAPmc002877@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 17 Jan 2010 11:10:25 +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: r202464 - stable/8/etc/rc.d 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, 17 Jan 2010 11:10:25 -0000 Author: gavin Date: Sun Jan 17 11:10:24 2010 New Revision: 202464 URL: http://svn.freebsd.org/changeset/base/202464 Log: Merge r201440, r201445 from head: Don't complain when we encounter the "cache" source, it's valid. Also fix the error message to include a line feed and not include a stray comma. Submitted by: Artis Caune artis.caune gmail.com While here, change "> /dev/stderr" for more usual ">&2" Submitted by: jilles PR: bin/121671 Approved by: ed (mentor, implicit) Modified: stable/8/etc/rc.d/nsswitch Directory Properties: stable/8/etc/rc.d/ (props changed) Modified: stable/8/etc/rc.d/nsswitch ============================================================================== --- stable/8/etc/rc.d/nsswitch Sun Jan 17 10:59:07 2010 (r202463) +++ stable/8/etc/rc.d/nsswitch Sun Jan 17 11:10:24 2010 (r202464) @@ -77,10 +77,10 @@ generate_host_conf() nis) echo "nis" >> $host_conf ;; - *=*) + cache | *=*) ;; *) - printf "Warning: unrecognized source [%s]", $_s > "/dev/stderr" + printf "Warning: unrecognized source [%s]\n" $_s >&2 ;; esac done From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 11:10:33 2010 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 D4C6B1065758; Sun, 17 Jan 2010 11:10:33 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36138FC0A; Sun, 17 Jan 2010 11:10:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HBAWhY002945; Sun, 17 Jan 2010 11:10:32 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HBAWuR002943; Sun, 17 Jan 2010 11:10:32 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001171110.o0HBAWuR002943@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 17 Jan 2010 11:10:32 +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: r202465 - stable/7/etc/rc.d 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, 17 Jan 2010 11:10:34 -0000 Author: gavin Date: Sun Jan 17 11:10:32 2010 New Revision: 202465 URL: http://svn.freebsd.org/changeset/base/202465 Log: Merge r201440, r201445 from head: Don't complain when we encounter the "cache" source, it's valid. Also fix the error message to include a line feed and not include a stray comma. Submitted by: Artis Caune artis.caune gmail.com While here, change "> /dev/stderr" for more usual ">&2" Submitted by: jilles PR: bin/121671 Approved by: ed (mentor, implicit) Modified: stable/7/etc/rc.d/nsswitch Directory Properties: stable/7/etc/rc.d/ (props changed) Modified: stable/7/etc/rc.d/nsswitch ============================================================================== --- stable/7/etc/rc.d/nsswitch Sun Jan 17 11:10:24 2010 (r202464) +++ stable/7/etc/rc.d/nsswitch Sun Jan 17 11:10:32 2010 (r202465) @@ -77,10 +77,10 @@ generate_host_conf() nis) echo "nis" >> $host_conf ;; - *=*) + cache | *=*) ;; *) - printf "Warning: unrecognized source [%s]", $_s > "/dev/stderr" + printf "Warning: unrecognized source [%s]\n" $_s >&2 ;; esac done From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 11:20:53 2010 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 B19B91065672; Sun, 17 Jan 2010 11:20:53 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A06B38FC15; Sun, 17 Jan 2010 11:20:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HBKr57005403; Sun, 17 Jan 2010 11:20:53 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HBKrIr005401; Sun, 17 Jan 2010 11:20:53 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001171120.o0HBKrIr005401@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 17 Jan 2010 11:20:53 +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: r202466 - stable/8/usr.sbin/sysinstall 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, 17 Jan 2010 11:20:53 -0000 Author: gavin Date: Sun Jan 17 11:20:53 2010 New Revision: 202466 URL: http://svn.freebsd.org/changeset/base/202466 Log: Merge r197308 from head (originally by ed): Spell Israel correctly. PR: bin/138580 Submitted by: Alexey Savartsov Approved by: ed (mentor, implicit) Modified: stable/8/usr.sbin/sysinstall/menus.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/menus.c ============================================================================== --- stable/8/usr.sbin/sysinstall/menus.c Sun Jan 17 11:10:32 2010 (r202465) +++ stable/8/usr.sbin/sysinstall/menus.c Sun Jan 17 11:20:53 2010 (r202466) @@ -691,7 +691,7 @@ DMenu MenuMediaFTP = { { " Ireland #3", "ftp3.ie.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.ie.freebsd.org" }, - { "Isreal", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, + { "Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.il.freebsd.org" }, { "Italy", "ftp.it.freebsd.org", NULL, dmenuSetVariable, NULL, From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 11:21:18 2010 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 A8EC4106568D; Sun, 17 Jan 2010 11:21:18 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97C8F8FC1A; Sun, 17 Jan 2010 11:21:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HBLIh9005547; Sun, 17 Jan 2010 11:21:18 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HBLIBe005545; Sun, 17 Jan 2010 11:21:18 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001171121.o0HBLIBe005545@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 17 Jan 2010 11:21:18 +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: r202467 - stable/7/usr.sbin/sysinstall 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, 17 Jan 2010 11:21:18 -0000 Author: gavin Date: Sun Jan 17 11:21:18 2010 New Revision: 202467 URL: http://svn.freebsd.org/changeset/base/202467 Log: Merge r197308 from head (originally by ed): Spell Israel correctly. PR: bin/138580 Submitted by: Alexey Savartsov Approved by: ed (mentor, implicit) Modified: stable/7/usr.sbin/sysinstall/menus.c Directory Properties: stable/7/usr.sbin/sysinstall/ (props changed) Modified: stable/7/usr.sbin/sysinstall/menus.c ============================================================================== --- stable/7/usr.sbin/sysinstall/menus.c Sun Jan 17 11:20:53 2010 (r202466) +++ stable/7/usr.sbin/sysinstall/menus.c Sun Jan 17 11:21:18 2010 (r202467) @@ -638,7 +638,7 @@ DMenu MenuMediaFTP = { { " Ireland #3", "ftp3.ie.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.ie.freebsd.org" }, - { "Isreal", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, + { "Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.il.freebsd.org" }, { "Italy", "ftp.it.freebsd.org", NULL, dmenuSetVariable, NULL, From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 12:57:11 2010 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 8078C106566B; Sun, 17 Jan 2010 12:57:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8C48FC08; Sun, 17 Jan 2010 12:57:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HCvBP3027966; Sun, 17 Jan 2010 12:57:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HCvBHi027960; Sun, 17 Jan 2010 12:57:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171257.o0HCvBHi027960@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 12:57: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: r202468 - in head: sys/kern sys/netinet sys/netinet6 sys/sys usr.sbin/jail 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, 17 Jan 2010 12:57:11 -0000 Author: bz Date: Sun Jan 17 12:57:11 2010 New Revision: 202468 URL: http://svn.freebsd.org/changeset/base/202468 Log: Add ip4.saddrsel/ip4.nosaddrsel (and equivalent for ip6) to control whether to use source address selection (default) or the primary jail address for unbound outgoing connections. This is intended to be used by people upgrading from single-IP jails to multi-IP jails but not having to change firewall rules, application ACLs, ... but to force their connections (unless otherwise changed) to the primry jail IP they had been used for years, as well as for people prefering to implement similar policies. Note that for IPv6, if configured incorrectly, this might lead to scope violations, which single-IPv6 jails could as well, as by the design of jails. [1] Reviewed by: jamie, hrs (ipv6 part) Pointed out by: hrs [1] MFC After: 2 weeks Asked for by: Jase Thew (bazerka beardz.net) Modified: head/sys/kern/kern_jail.c head/sys/netinet/in_pcb.c head/sys/netinet6/in6_src.c head/sys/sys/jail.h head/usr.sbin/jail/jail.8 Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Sun Jan 17 11:21:18 2010 (r202467) +++ head/sys/kern/kern_jail.c Sun Jan 17 12:57:11 2010 (r202468) @@ -77,6 +77,21 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); +/* Keep struct prison prison0 and some code in kern_jail_set() readable. */ +#ifdef INET +#ifdef INET6 +#define _PR_IP_SADDRSEL PR_IP4_SADDRSEL|PR_IP6_SADDRSEL +#else +#define _PR_IP_SADDRSEL PR_IP4_SADDRSEL +#endif +#else /* !INET */ +#ifdef INET6 +#define _PR_IP_SADDRSEL PR_IP6_SADDRSEL +#else +#define _PR_IP_SADDRSEL 0 +#endif +#endif + /* prison0 describes what is "real" about the system. */ struct prison prison0 = { .pr_id = 0, @@ -89,9 +104,9 @@ struct prison prison0 = { .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(prison0.pr_children), #ifdef VIMAGE - .pr_flags = PR_HOST|PR_VNET, + .pr_flags = PR_HOST|PR_VNET|_PR_IP_SADDRSEL, #else - .pr_flags = PR_HOST, + .pr_flags = PR_HOST|_PR_IP_SADDRSEL, #endif .pr_allow = PR_ALLOW_ALL, }; @@ -129,10 +144,22 @@ static int prison_restrict_ip6(struct pr */ static char *pr_flag_names[] = { [0] = "persist", +#ifdef INET + [7] = "ip4.saddrsel", +#endif +#ifdef INET6 + [8] = "ip6.saddrsel", +#endif }; static char *pr_flag_nonames[] = { [0] = "nopersist", +#ifdef INET + [7] = "ip4.nosaddrsel", +#endif +#ifdef INET6 + [8] = "ip6.nosaddrsel", +#endif }; struct jailsys_flags { @@ -1199,6 +1226,9 @@ kern_jail_set(struct thread *td, struct #endif } #endif + /* Source address selection is always on by default. */ + pr->pr_flags |= _PR_IP_SADDRSEL; + pr->pr_securelevel = ppr->pr_securelevel; pr->pr_allow = JAIL_DEFAULT_ALLOW & ppr->pr_allow; pr->pr_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS; @@ -2659,6 +2689,41 @@ prison_get_ip4(struct ucred *cred, struc } /* + * Return 1 if we should do proper source address selection or are not jailed. + * We will return 0 if we should bypass source address selection in favour + * of the primary jail IPv4 address. Only in this case *ia will be updated and + * returned in NBO. + * Return EAFNOSUPPORT, in case this jail does not allow IPv4. + */ +int +prison_saddrsel_ip4(struct ucred *cred, struct in_addr *ia) +{ + struct prison *pr; + struct in_addr lia; + int error; + + KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); + KASSERT(ia != NULL, ("%s: ia is NULL", __func__)); + + if (!jailed(cred)) + return (1); + + pr = cred->cr_prison; + if (pr->pr_flags & PR_IP4_SADDRSEL) + return (1); + + lia.s_addr = INADDR_ANY; + error = prison_get_ip4(cred, &lia); + if (error) + return (error); + if (lia.s_addr == INADDR_ANY) + return (1); + + ia->s_addr = lia.s_addr; + return (0); +} + +/* * Return true if pr1 and pr2 have the same IPv4 address restrictions. */ int @@ -2964,6 +3029,41 @@ prison_get_ip6(struct ucred *cred, struc } /* + * Return 1 if we should do proper source address selection or are not jailed. + * We will return 0 if we should bypass source address selection in favour + * of the primary jail IPv6 address. Only in this case *ia will be updated and + * returned in NBO. + * Return EAFNOSUPPORT, in case this jail does not allow IPv6. + */ +int +prison_saddrsel_ip6(struct ucred *cred, struct in6_addr *ia6) +{ + struct prison *pr; + struct in6_addr lia6; + int error; + + KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); + KASSERT(ia6 != NULL, ("%s: ia6 is NULL", __func__)); + + if (!jailed(cred)) + return (1); + + pr = cred->cr_prison; + if (pr->pr_flags & PR_IP6_SADDRSEL) + return (1); + + lia6 = in6addr_any; + error = prison_get_ip6(cred, &lia6); + if (error) + return (error); + if (IN6_IS_ADDR_UNSPECIFIED(&lia6)) + return (1); + + bcopy(&lia6, ia6, sizeof(struct in6_addr)); + return (0); +} + +/* * Return true if pr1 and pr2 have the same IPv6 address restrictions. */ int @@ -4116,12 +4216,18 @@ SYSCTL_JAIL_PARAM_SYS_NODE(ip4, CTLFLAG_ "Jail IPv4 address virtualization"); SYSCTL_JAIL_PARAM_STRUCT(_ip4, addr, CTLFLAG_RW, sizeof(struct in_addr), "S,in_addr,a", "Jail IPv4 addresses"); +SYSCTL_JAIL_PARAM(_ip4, saddrsel, CTLTYPE_INT | CTLFLAG_RW, + "B", "Do (not) use IPv4 source address selection rather than the " + "primary jail IPv4 address."); #endif #ifdef INET6 SYSCTL_JAIL_PARAM_SYS_NODE(ip6, CTLFLAG_RDTUN, "Jail IPv6 address virtualization"); SYSCTL_JAIL_PARAM_STRUCT(_ip6, addr, CTLFLAG_RW, sizeof(struct in6_addr), "S,in6_addr,a", "Jail IPv6 addresses"); +SYSCTL_JAIL_PARAM(_ip6, saddrsel, CTLTYPE_INT | CTLFLAG_RW, + "B", "Do (not) use IPv6 source address selection rather than the " + "primary jail IPv6 address."); #endif SYSCTL_JAIL_PARAM_NODE(allow, "Jail permission flags"); Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Jan 17 11:21:18 2010 (r202467) +++ head/sys/netinet/in_pcb.c Sun Jan 17 12:57:11 2010 (r202468) @@ -552,6 +552,13 @@ in_pcbladdr(struct inpcb *inp, struct in KASSERT(laddr != NULL, ("%s: laddr NULL", __func__)); + /* + * Bypass source address selection and use the primary jail IP + * if requested. + */ + if (cred != NULL && !prison_saddrsel_ip4(cred, laddr)) + return (0); + error = 0; bzero(&sro, sizeof(sro)); Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Sun Jan 17 11:21:18 2010 (r202467) +++ head/sys/netinet6/in6_src.c Sun Jan 17 12:57:11 2010 (r202468) @@ -271,6 +271,13 @@ in6_selectsrc(struct sockaddr_in6 *dstso } /* + * Bypass source address selection and use the primary jail IP + * if requested. + */ + if (cred != NULL && !prison_saddrsel_ip6(cred, srcp)) + return (0); + + /* * If the address is not specified, choose the best one based on * the outgoing interface and the destination address. */ Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Sun Jan 17 11:21:18 2010 (r202467) +++ head/sys/sys/jail.h Sun Jan 17 12:57:11 2010 (r202468) @@ -191,6 +191,10 @@ struct prison { #define PR_VNET 0x00000010 /* Virtual network stack */ #define PR_IP4_DISABLE 0x00000020 /* Disable IPv4 */ #define PR_IP6_DISABLE 0x00000040 /* Disable IPv6 */ +#define PR_IP4_SADDRSEL 0x00000080 /* Do IPv4 src addr sel. or use the */ + /* primary jail address. */ +#define PR_IP6_SADDRSEL 0x00000100 /* Do IPv6 src addr sel. or use the */ + /* primary jail address. */ /* Internal flag bits */ #define PR_REMOVE 0x01000000 /* In process of being removed */ @@ -362,12 +366,14 @@ int prison_get_ip4(struct ucred *cred, s int prison_local_ip4(struct ucred *cred, struct in_addr *ia); int prison_remote_ip4(struct ucred *cred, struct in_addr *ia); int prison_check_ip4(struct ucred *cred, struct in_addr *ia); +int prison_saddrsel_ip4(struct ucred *, struct in_addr *); #ifdef INET6 int prison_equal_ip6(struct prison *, struct prison *); int prison_get_ip6(struct ucred *, struct in6_addr *); int prison_local_ip6(struct ucred *, struct in6_addr *, int); int prison_remote_ip6(struct ucred *, struct in6_addr *); int prison_check_ip6(struct ucred *, struct in6_addr *); +int prison_saddrsel_ip6(struct ucred *, struct in6_addr *); #endif int prison_check_af(struct ucred *cred, int af); int prison_if(struct ucred *cred, struct sockaddr *sa); Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Sun Jan 17 11:21:18 2010 (r202467) +++ head/usr.sbin/jail/jail.8 Sun Jan 17 12:57:11 2010 (r202468) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2009 +.Dd January 17, 2010 .Dt JAIL 8 .Os .Sh NAME @@ -252,6 +252,13 @@ match. It is only possible to start multiple jails with the same IP address, if none of the jails has more than this single overlapping IP address assigned to itself. +.It Va ip4.saddrsel +A boolean option to change the formerly mentioned behaviour and disable +IPv4 source address selection for the prison in favour of the primary +IPv4 address of the jail. +Source address selection is enabled by default for all jails and a +.Va ip4.nosaddrsel +setting of a parent jail is not inherited for any child jails. .It Va ip4 Control the availablity of IPv4 addresses. Possible values are @@ -267,9 +274,10 @@ Setting the .Va ip4.addr parameter implies a value of .Dq new . -.It Va ip6.addr , Va ip6 -A list of IPv6 addresses assigned to the prison, the counterpart to -.Va ip4.addr +.It Va ip6.addr , Va ip6.saddrsel , Va ip6 +A set of IPv6 options for the prison, the counterparts to +.Va ip4.addr , +.Va ip4.saddrsel and .Va ip4 above. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:07:52 2010 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 627A81065672; Sun, 17 Jan 2010 13:07:52 +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 517078FC15; Sun, 17 Jan 2010 13:07:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HD7q4s030467; Sun, 17 Jan 2010 13:07:52 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HD7qKI030464; Sun, 17 Jan 2010 13:07:52 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171307.o0HD7qKI030464@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:07: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: r202469 - 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, 17 Jan 2010 13:07:52 -0000 Author: bz Date: Sun Jan 17 13:07:52 2010 New Revision: 202469 URL: http://svn.freebsd.org/changeset/base/202469 Log: Garbage collect references to the no longer implemented tcp_fasttimo(). Discussed with: rwatson MFC after: 5 days Modified: head/sys/netinet/tcp_var.h head/sys/netinet6/in6_proto.c Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Jan 17 12:57:11 2010 (r202468) +++ head/sys/netinet/tcp_var.h Sun Jan 17 13:07:52 2010 (r202469) @@ -648,7 +648,6 @@ int tcp_ctloutput(struct socket *, stru struct tcpcb * tcp_drop(struct tcpcb *, int); void tcp_drain(void); -void tcp_fasttimo(void); void tcp_init(void); #ifdef VIMAGE void tcp_destroy(void); Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Sun Jan 17 12:57:11 2010 (r202468) +++ head/sys/netinet6/in6_proto.c Sun Jan 17 13:07:52 2010 (r202469) @@ -173,7 +173,6 @@ struct ip6protosw inet6sw[] = { .pr_ctloutput = tcp_ctloutput, #ifndef INET /* don't call initialization and timeout routines twice */ .pr_init = tcp_init, - .pr_fasttimo = tcp_fasttimo, .pr_slowtimo = tcp_slowtimo, #endif .pr_drain = tcp_drain, From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:23:53 2010 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 572AF106566B; Sun, 17 Jan 2010 13:23:53 +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 457AE8FC18; Sun, 17 Jan 2010 13:23:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDNrR8034291; Sun, 17 Jan 2010 13:23:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDNrcB034289; Sun, 17 Jan 2010 13:23:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171323.o0HDNrcB034289@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:23:53 +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: r202470 - 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, 17 Jan 2010 13:23:53 -0000 Author: bz Date: Sun Jan 17 13:23:53 2010 New Revision: 202470 URL: http://svn.freebsd.org/changeset/base/202470 Log: MFC r201688: Correct a typo. Submitted by: sn_ (sn_ gmx.net) on hackers@ Modified: stable/8/sys/netinet6/icmp6.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet6/icmp6.c ============================================================================== --- stable/8/sys/netinet6/icmp6.c Sun Jan 17 13:07:52 2010 (r202469) +++ stable/8/sys/netinet6/icmp6.c Sun Jan 17 13:23:53 2010 (r202470) @@ -296,7 +296,7 @@ icmp6_error(struct mbuf *m, int type, in * we should basically suppress sending an error (RFC 2463, Section * 2.4). * We have two exceptions (the item e.2 in that section): - * - the Pakcet Too Big message can be sent for path MTU discovery. + * - the Packet Too Big message can be sent for path MTU discovery. * - the Parameter Problem Message that can be allowed an icmp6 error * in the option type field. This check has been done in * ip6_unknown_opt(), so we can just check the type and code. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:24:16 2010 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 1A867106568B; Sun, 17 Jan 2010 13:24:16 +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 0902C8FC12; Sun, 17 Jan 2010 13:24:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDOF4Y034410; Sun, 17 Jan 2010 13:24:15 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDOFrD034408; Sun, 17 Jan 2010 13:24:15 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171324.o0HDOFrD034408@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:24:15 +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: r202471 - stable/7/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, 17 Jan 2010 13:24:16 -0000 Author: bz Date: Sun Jan 17 13:24:15 2010 New Revision: 202471 URL: http://svn.freebsd.org/changeset/base/202471 Log: MFC r201688: Correct a typo. Submitted by: sn_ (sn_ gmx.net) on hackers@ Modified: stable/7/sys/netinet6/icmp6.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet6/icmp6.c ============================================================================== --- stable/7/sys/netinet6/icmp6.c Sun Jan 17 13:23:53 2010 (r202470) +++ stable/7/sys/netinet6/icmp6.c Sun Jan 17 13:24:15 2010 (r202471) @@ -269,7 +269,7 @@ icmp6_error(struct mbuf *m, int type, in * we should basically suppress sending an error (RFC 2463, Section * 2.4). * We have two exceptions (the item e.2 in that section): - * - the Pakcet Too Big message can be sent for path MTU discovery. + * - the Packet Too Big message can be sent for path MTU discovery. * - the Parameter Problem Message that can be allowed an icmp6 error * in the option type field. This check has been done in * ip6_unknown_opt(), so we can just check the type and code. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:24:29 2010 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 2F40D106568B; Sun, 17 Jan 2010 13:24:29 +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 1D6EF8FC1C; Sun, 17 Jan 2010 13:24:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDOT1D034515; Sun, 17 Jan 2010 13:24:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDOTZj034513; Sun, 17 Jan 2010 13:24:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171324.o0HDOTZj034513@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:24:28 +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: r202472 - stable/6/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, 17 Jan 2010 13:24:29 -0000 Author: bz Date: Sun Jan 17 13:24:28 2010 New Revision: 202472 URL: http://svn.freebsd.org/changeset/base/202472 Log: MFC r201688: Correct a typo. Submitted by: sn_ (sn_ gmx.net) on hackers@ Modified: stable/6/sys/netinet6/icmp6.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/netinet6/icmp6.c ============================================================================== --- stable/6/sys/netinet6/icmp6.c Sun Jan 17 13:24:15 2010 (r202471) +++ stable/6/sys/netinet6/icmp6.c Sun Jan 17 13:24:28 2010 (r202472) @@ -281,7 +281,7 @@ icmp6_error(m, type, code, param) * we should basically suppress sending an error (RFC 2463, Section * 2.4). * We have two exceptions (the item e.2 in that section): - * - the Pakcet Too Big message can be sent for path MTU discovery. + * - the Packet Too Big message can be sent for path MTU discovery. * - the Parameter Problem Message that can be allowed an icmp6 error * in the option type field. This check has been done in * ip6_unknown_opt(), so we can just check the type and code. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:28:07 2010 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 1DC8A106568D; Sun, 17 Jan 2010 13:28:07 +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 0C8AB8FC1B; Sun, 17 Jan 2010 13:28:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDS6Gu035444; Sun, 17 Jan 2010 13:28:06 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDS6Dm035442; Sun, 17 Jan 2010 13:28:06 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171328.o0HDS6Dm035442@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:28:06 +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: r202473 - stable/8/sys/modules/crypto 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, 17 Jan 2010 13:28:07 -0000 Author: bz Date: Sun Jan 17 13:28:06 2010 New Revision: 202473 URL: http://svn.freebsd.org/changeset/base/202473 Log: MFC r201742: After adding an SDT provider for opencrypto in r199884 we should also depend on opt_kdtrace.h for the module build. Submitted by: (Andre.Albsmeier siemens.com) Modified: stable/8/sys/modules/crypto/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/modules/crypto/Makefile ============================================================================== --- stable/8/sys/modules/crypto/Makefile Sun Jan 17 13:24:28 2010 (r202472) +++ stable/8/sys/modules/crypto/Makefile Sun Jan 17 13:28:06 2010 (r202473) @@ -16,6 +16,6 @@ SRCS += skipjack.c bf_enc.c bf_skey.c SRCS += des_ecb.c des_enc.c des_setkey.c SRCS += sha1.c sha2.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h -SRCS += opt_ddb.h +SRCS += opt_ddb.h opt_kdtrace.h SRCS += camellia.c camellia-api.c .include From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:28:25 2010 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 D1D72106566B; Sun, 17 Jan 2010 13:28:25 +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 C05D58FC0A; Sun, 17 Jan 2010 13:28:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDSPE3035548; Sun, 17 Jan 2010 13:28:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDSP7S035546; Sun, 17 Jan 2010 13:28:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171328.o0HDSP7S035546@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:28:25 +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: r202474 - stable/7/sys/modules/crypto 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, 17 Jan 2010 13:28:25 -0000 Author: bz Date: Sun Jan 17 13:28:25 2010 New Revision: 202474 URL: http://svn.freebsd.org/changeset/base/202474 Log: MFC r201742: After adding an SDT provider for opencrypto in r199884 we should also depend on opt_kdtrace.h for the module build. Submitted by: (Andre.Albsmeier siemens.com) Modified: stable/7/sys/modules/crypto/Makefile Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/modules/crypto/Makefile ============================================================================== --- stable/7/sys/modules/crypto/Makefile Sun Jan 17 13:28:06 2010 (r202473) +++ stable/7/sys/modules/crypto/Makefile Sun Jan 17 13:28:25 2010 (r202474) @@ -16,6 +16,6 @@ SRCS += skipjack.c bf_enc.c bf_skey.c SRCS += des_ecb.c des_enc.c des_setkey.c SRCS += sha1.c sha2.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h -SRCS += opt_ddb.h +SRCS += opt_ddb.h opt_kdtrace.h SRCS += camellia.c camellia-api.c .include From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:31:48 2010 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 AC006106566B; Sun, 17 Jan 2010 13:31:48 +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 99EAB8FC14; Sun, 17 Jan 2010 13:31:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDVm8p036402; Sun, 17 Jan 2010 13:31:48 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDVmqp036400; Sun, 17 Jan 2010 13:31:48 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171331.o0HDVmqp036400@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:31:48 +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: r202475 - stable/7/sys/opencrypto 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, 17 Jan 2010 13:31:48 -0000 Author: bz Date: Sun Jan 17 13:31:48 2010 New Revision: 202475 URL: http://svn.freebsd.org/changeset/base/202475 Log: MFC r187826: While OpenBSD's crypto/ framework has sha1 and md5 implementations that can cope with a result buffer of NULL in the "Final" function, we cannot. Thus pass in a temporary buffer long enough for either md5 or sha1 results so that we do not panic. PR: bin/126468 Reviewed by: cperciva Modified: stable/7/sys/opencrypto/cryptosoft.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/7/sys/opencrypto/cryptosoft.c Sun Jan 17 13:28:25 2010 (r202474) +++ stable/7/sys/opencrypto/cryptosoft.c Sun Jan 17 13:31:48 2010 (r202475) @@ -429,12 +429,17 @@ swcr_authprepare(struct auth_hash *axf, break; case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: + { + /* We need a buffer that can hold an md5 and a sha1 result. */ + u_char buf[SHA1_RESULTLEN]; + sw->sw_klen = klen; bcopy(key, sw->sw_octx, klen); axf->Init(sw->sw_ictx); axf->Update(sw->sw_ictx, key, klen); - axf->Final(NULL, sw->sw_ictx); + axf->Final(buf, sw->sw_ictx); break; + } default: printf("%s: CRD_F_KEY_EXPLICIT flag given, but algorithm %d " "doesn't use keys.\n", __func__, axf->type); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:32:15 2010 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 12DDE1065700; Sun, 17 Jan 2010 13:32: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 0154B8FC08; Sun, 17 Jan 2010 13:32:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDWEQb036544; Sun, 17 Jan 2010 13:32:14 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDWEKn036542; Sun, 17 Jan 2010 13:32:14 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171332.o0HDWEKn036542@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:32:14 +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: r202476 - stable/6/sys/opencrypto 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, 17 Jan 2010 13:32:15 -0000 Author: bz Date: Sun Jan 17 13:32:14 2010 New Revision: 202476 URL: http://svn.freebsd.org/changeset/base/202476 Log: MFC r187826: While OpenBSD's crypto/ framework has sha1 and md5 implementations that can cope with a result buffer of NULL in the "Final" function, we cannot. Thus pass in a temporary buffer long enough for either md5 or sha1 results so that we do not panic. PR: bin/126468 Reviewed by: cperciva Modified: stable/6/sys/opencrypto/cryptosoft.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/6/sys/opencrypto/cryptosoft.c Sun Jan 17 13:31:48 2010 (r202475) +++ stable/6/sys/opencrypto/cryptosoft.c Sun Jan 17 13:32:14 2010 (r202476) @@ -425,12 +425,17 @@ swcr_authprepare(struct auth_hash *axf, break; case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: + { + /* We need a buffer that can hold an md5 and a sha1 result. */ + u_char buf[SHA1_RESULTLEN]; + sw->sw_klen = klen; bcopy(key, sw->sw_octx, klen); axf->Init(sw->sw_ictx); axf->Update(sw->sw_ictx, key, klen); - axf->Final(NULL, sw->sw_ictx); + axf->Final(buf, sw->sw_ictx); break; + } default: printf("%s: CRD_F_KEY_EXPLICIT flag given, but algorithm %d " "doesn't use keys.\n", __func__, axf->type); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:36:14 2010 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 17535106568D; Sun, 17 Jan 2010 13:36:14 +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 E02788FC14; Sun, 17 Jan 2010 13:36:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDaDOW037587; Sun, 17 Jan 2010 13:36:13 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDaDjQ037585; Sun, 17 Jan 2010 13:36:13 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171336.o0HDaDjQ037585@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:36:13 +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: r202477 - stable/8/sys/opencrypto 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, 17 Jan 2010 13:36:14 -0000 Author: bz Date: Sun Jan 17 13:36:13 2010 New Revision: 202477 URL: http://svn.freebsd.org/changeset/base/202477 Log: MFC r201898: Add comments trying to explain what bad things happen here, i.e. how hashed MD5/SHA are implemented, abusing Final() for padding and sw_octx to transport the key from the beginning to the end. Enlightened about what was going on here by: cperciva Reviewed by: cperciva Modified: stable/8/sys/opencrypto/cryptosoft.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/8/sys/opencrypto/cryptosoft.c Sun Jan 17 13:32:14 2010 (r202476) +++ stable/8/sys/opencrypto/cryptosoft.c Sun Jan 17 13:36:13 2010 (r202477) @@ -434,7 +434,16 @@ swcr_authprepare(struct auth_hash *axf, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: { - /* We need a buffer that can hold an md5 and a sha1 result. */ + /* + * We need a buffer that can hold an md5 and a sha1 result + * just to throw it away. + * What we do here is the initial part of: + * ALGO( key, keyfill, .. ) + * adding the key to sw_ictx and abusing Final() to get the + * "keyfill" padding. + * In addition we abuse the sw_octx to save the key to have + * it to be able to append it at the end in swcr_authcompute(). + */ u_char buf[SHA1_RESULTLEN]; sw->sw_klen = klen; @@ -495,9 +504,17 @@ swcr_authcompute(struct cryptodesc *crd, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: + /* If we have no key saved, return error. */ if (sw->sw_octx == NULL) return EINVAL; + /* + * Add the trailing copy of the key (see comment in + * swcr_authprepare()) after the data: + * ALGO( .., key, algofill ) + * and let Final() do the proper, natural "algofill" + * padding. + */ axf->Update(&ctx, sw->sw_octx, sw->sw_klen); axf->Final(aalg, &ctx); break; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:36:25 2010 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 8232410656AE; Sun, 17 Jan 2010 13:36:25 +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 570F08FC0C; Sun, 17 Jan 2010 13:36:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDaPbB037659; Sun, 17 Jan 2010 13:36:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDaPnl037657; Sun, 17 Jan 2010 13:36:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171336.o0HDaPnl037657@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:36:25 +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: r202478 - stable/7/sys/opencrypto 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, 17 Jan 2010 13:36:25 -0000 Author: bz Date: Sun Jan 17 13:36:25 2010 New Revision: 202478 URL: http://svn.freebsd.org/changeset/base/202478 Log: MFC r201898: Add comments trying to explain what bad things happen here, i.e. how hashed MD5/SHA are implemented, abusing Final() for padding and sw_octx to transport the key from the beginning to the end. Enlightened about what was going on here by: cperciva Reviewed by: cperciva Modified: stable/7/sys/opencrypto/cryptosoft.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/7/sys/opencrypto/cryptosoft.c Sun Jan 17 13:36:13 2010 (r202477) +++ stable/7/sys/opencrypto/cryptosoft.c Sun Jan 17 13:36:25 2010 (r202478) @@ -430,7 +430,16 @@ swcr_authprepare(struct auth_hash *axf, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: { - /* We need a buffer that can hold an md5 and a sha1 result. */ + /* + * We need a buffer that can hold an md5 and a sha1 result + * just to throw it away. + * What we do here is the initial part of: + * ALGO( key, keyfill, .. ) + * adding the key to sw_ictx and abusing Final() to get the + * "keyfill" padding. + * In addition we abuse the sw_octx to save the key to have + * it to be able to append it at the end in swcr_authcompute(). + */ u_char buf[SHA1_RESULTLEN]; sw->sw_klen = klen; @@ -491,9 +500,17 @@ swcr_authcompute(struct cryptodesc *crd, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: + /* If we have no key saved, return error. */ if (sw->sw_octx == NULL) return EINVAL; + /* + * Add the trailing copy of the key (see comment in + * swcr_authprepare()) after the data: + * ALGO( .., key, algofill ) + * and let Final() do the proper, natural "algofill" + * padding. + */ axf->Update(&ctx, sw->sw_octx, sw->sw_klen); axf->Final(aalg, &ctx); break; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:36:40 2010 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 999EF1065693; Sun, 17 Jan 2010 13:36:40 +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 879B78FC1A; Sun, 17 Jan 2010 13:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDae6m037764; Sun, 17 Jan 2010 13:36:40 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDaesC037761; Sun, 17 Jan 2010 13:36:40 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171336.o0HDaesC037761@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:36:40 +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: r202479 - in stable/6: . sys/opencrypto 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, 17 Jan 2010 13:36:40 -0000 Author: bz Date: Sun Jan 17 13:36:40 2010 New Revision: 202479 URL: http://svn.freebsd.org/changeset/base/202479 Log: MFC r201898: Add comments trying to explain what bad things happen here, i.e. how hashed MD5/SHA are implemented, abusing Final() for padding and sw_octx to transport the key from the beginning to the end. Enlightened about what was going on here by: cperciva Reviewed by: cperciva Modified: stable/6/Makefile (contents, props changed) stable/6/sys/opencrypto/cryptosoft.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/Makefile ============================================================================== --- stable/6/Makefile Sun Jan 17 13:36:25 2010 (r202478) +++ stable/6/Makefile Sun Jan 17 13:36:40 2010 (r202479) @@ -262,12 +262,14 @@ make: .PHONY # existing system is. # .if make(universe) +TARGETS?=alpha amd64 i386 ia64 pc98 powerpc sparc64 + universe: universe_prologue universe_prologue: @echo "--------------------------------------------------------------" @echo ">>> make universe started on ${STARTTIME}" @echo "--------------------------------------------------------------" -.for target in alpha amd64 i386 ia64 pc98 powerpc sparc64 +.for target in ${TARGETS} KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ find [A-Z]*[A-Z] -type f -maxdepth 0 \ ! -name DEFAULTS ! -name LINT @@ -275,22 +277,30 @@ KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/} universe: universe_${target} .ORDER: universe_prologue universe_${target} universe_epilogue universe_${target}: +.if !defined(MAKE_JUST_KERNELS) @echo ">> ${target} started on `LC_ALL=C date`" - -cd ${.CURDIR} && ${MAKE} ${JFLAG} buildworld \ + @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ + ${MAKE} ${JFLAG} buildworld \ TARGET=${target} \ - __MAKE_CONF=/dev/null \ - > _.${target}.buildworld 2>&1 + > _.${target}.buildworld 2>&1 || \ + echo "${target} world failed," \ + "check _.${target}.buildworld for details") @echo ">> ${target} buildworld completed on `LC_ALL=C date`" +.endif .if exists(${.CURDIR}/sys/${target}/conf/NOTES) - -cd ${.CURDIR}/sys/${target}/conf && ${MAKE} LINT \ - > ${.CURDIR}/_.${target}.makeLINT 2>&1 + @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ + ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ + echo "${target} 'make LINT' failed," \ + "check _.${target}.makeLINT for details") .endif .for kernel in ${KERNCONFS} - -cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernel \ + @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ + ${MAKE} ${JFLAG} buildkernel \ TARGET=${target} \ KERNCONF=${kernel} \ - __MAKE_CONF=/dev/null \ - > _.${target}.${kernel} 2>&1 + > _.${target}.${kernel} 2>&1 || \ + echo "${target} ${kernel} kernel failed," \ + "check _.${target}.${kernel} for details") .endfor @echo ">> ${target} completed on `LC_ALL=C date`" .endfor Modified: stable/6/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/6/sys/opencrypto/cryptosoft.c Sun Jan 17 13:36:25 2010 (r202478) +++ stable/6/sys/opencrypto/cryptosoft.c Sun Jan 17 13:36:40 2010 (r202479) @@ -426,7 +426,16 @@ swcr_authprepare(struct auth_hash *axf, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: { - /* We need a buffer that can hold an md5 and a sha1 result. */ + /* + * We need a buffer that can hold an md5 and a sha1 result + * just to throw it away. + * What we do here is the initial part of: + * ALGO( key, keyfill, .. ) + * adding the key to sw_ictx and abusing Final() to get the + * "keyfill" padding. + * In addition we abuse the sw_octx to save the key to have + * it to be able to append it at the end in swcr_authcompute(). + */ u_char buf[SHA1_RESULTLEN]; sw->sw_klen = klen; @@ -487,9 +496,17 @@ swcr_authcompute(struct cryptodesc *crd, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: + /* If we have no key saved, return error. */ if (sw->sw_octx == NULL) return EINVAL; + /* + * Add the trailing copy of the key (see comment in + * swcr_authprepare()) after the data: + * ALGO( .., key, algofill ) + * and let Final() do the proper, natural "algofill" + * padding. + */ axf->Update(&ctx, sw->sw_octx, sw->sw_klen); axf->Final(aalg, &ctx); break; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:38:11 2010 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 5FA7F106566B; Sun, 17 Jan 2010 13:38:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5328FC0C; Sun, 17 Jan 2010 13:38:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDcB43038194; Sun, 17 Jan 2010 13:38:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDcBQR038192; Sun, 17 Jan 2010 13:38:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171338.o0HDcBQR038192@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:38: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: r202480 - stable/8/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, 17 Jan 2010 13:38:11 -0000 Author: bz Date: Sun Jan 17 13:38:11 2010 New Revision: 202480 URL: http://svn.freebsd.org/changeset/base/202480 Log: MFC r201995: Correct a typo. Modified: stable/8/sys/net/if_epair.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net/if_epair.c ============================================================================== --- stable/8/sys/net/if_epair.c Sun Jan 17 13:36:40 2010 (r202479) +++ stable/8/sys/net/if_epair.c Sun Jan 17 13:38:11 2010 (r202480) @@ -323,7 +323,7 @@ epair_add_ifp_for_draining(struct ifnet STAILQ_FOREACH(elm, &epair_dpcpu->epair_ifp_drain_list, ifp_next) if (elm->ifp == ifp) break; - /* If the ipf is there already, return success. */ + /* If the ifp is there already, return success. */ if (elm != NULL) return (0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:42:07 2010 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 CEC651065692; Sun, 17 Jan 2010 13:42:07 +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 BD1CC8FC0A; Sun, 17 Jan 2010 13:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDg73g039210; Sun, 17 Jan 2010 13:42:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDg7KS039208; Sun, 17 Jan 2010 13:42:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171342.o0HDg7KS039208@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:42:07 +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: r202481 - stable/8/sys/kern 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, 17 Jan 2010 13:42:07 -0000 Author: bz Date: Sun Jan 17 13:42:07 2010 New Revision: 202481 URL: http://svn.freebsd.org/changeset/base/202481 Log: MFC r202116: Adjust a comment to reflect reality, as we have proper source address selection, even for IPv4, since r183571. Pointed out by: Jase Thew (bazerka beardz.net) Modified: stable/8/sys/kern/kern_jail.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Sun Jan 17 13:38:11 2010 (r202480) +++ stable/8/sys/kern/kern_jail.c Sun Jan 17 13:42:07 2010 (r202481) @@ -753,7 +753,9 @@ kern_jail_set(struct thread *td, struct * IP addresses are all sorted but ip[0] to preserve * the primary IP address as given from userland. * This special IP is used for unbound outgoing - * connections as well for "loopback" traffic. + * connections as well for "loopback" traffic in case + * source address selection cannot find any more fitting + * address to connect from. */ if (ip4s > 1) qsort(ip4 + 1, ip4s - 1, sizeof(*ip4), qcmp_v4); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:45:34 2010 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 0111A1065676; Sun, 17 Jan 2010 13:45:34 +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 E3A458FC0C; Sun, 17 Jan 2010 13:45:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDjXq1040091; Sun, 17 Jan 2010 13:45:33 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDjXQB040088; Sun, 17 Jan 2010 13:45:33 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171345.o0HDjXQB040088@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:45:33 +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: r202482 - stable/7/sys/kern 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, 17 Jan 2010 13:45:34 -0000 Author: bz Date: Sun Jan 17 13:45:33 2010 New Revision: 202482 URL: http://svn.freebsd.org/changeset/base/202482 Log: MFC r202116: Adjust a comment to reflect reality, as we have proper source address selection, even for IPv4, since r183571. Pointed out by: Jase Thew (bazerka beardz.net) Modified: stable/7/sys/kern/kern_jail.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_jail.c ============================================================================== --- stable/7/sys/kern/kern_jail.c Sun Jan 17 13:42:07 2010 (r202481) +++ stable/7/sys/kern/kern_jail.c Sun Jan 17 13:45:33 2010 (r202482) @@ -267,7 +267,9 @@ jail_copyin_ips(struct jail *j) * * IP addresses are all sorted but ip[0] to preserve the primary IP * address as given from userland. This special IP is used for - * unbound outgoing connections as well for "loopback" traffic. + * unbound outgoing connections as well for "loopback" traffic in case + * source address selection cannot find any more fitting address to + * connect from. */ #ifdef INET ip4 = NULL; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:49:18 2010 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 99658106566C; Sun, 17 Jan 2010 13:49:18 +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 87D3F8FC1D; Sun, 17 Jan 2010 13:49:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HDnIsp041016; Sun, 17 Jan 2010 13:49:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HDnIR2041014; Sun, 17 Jan 2010 13:49:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171349.o0HDnIR2041014@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:49:18 +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: r202483 - stable/6 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, 17 Jan 2010 13:49:18 -0000 Author: bz Date: Sun Jan 17 13:49:18 2010 New Revision: 202483 URL: http://svn.freebsd.org/changeset/base/202483 Log: Backup this part of r202479 which was not meant to be committed along with the merge of r201898. Modified: stable/6/Makefile (contents, props changed) Modified: stable/6/Makefile ============================================================================== --- stable/6/Makefile Sun Jan 17 13:45:33 2010 (r202482) +++ stable/6/Makefile Sun Jan 17 13:49:18 2010 (r202483) @@ -262,14 +262,12 @@ make: .PHONY # existing system is. # .if make(universe) -TARGETS?=alpha amd64 i386 ia64 pc98 powerpc sparc64 - universe: universe_prologue universe_prologue: @echo "--------------------------------------------------------------" @echo ">>> make universe started on ${STARTTIME}" @echo "--------------------------------------------------------------" -.for target in ${TARGETS} +.for target in alpha amd64 i386 ia64 pc98 powerpc sparc64 KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ find [A-Z]*[A-Z] -type f -maxdepth 0 \ ! -name DEFAULTS ! -name LINT @@ -277,30 +275,22 @@ KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/} universe: universe_${target} .ORDER: universe_prologue universe_${target} universe_epilogue universe_${target}: -.if !defined(MAKE_JUST_KERNELS) @echo ">> ${target} started on `LC_ALL=C date`" - @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} buildworld \ + -cd ${.CURDIR} && ${MAKE} ${JFLAG} buildworld \ TARGET=${target} \ - > _.${target}.buildworld 2>&1 || \ - echo "${target} world failed," \ - "check _.${target}.buildworld for details") + __MAKE_CONF=/dev/null \ + > _.${target}.buildworld 2>&1 @echo ">> ${target} buildworld completed on `LC_ALL=C date`" -.endif .if exists(${.CURDIR}/sys/${target}/conf/NOTES) - @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ - ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ - echo "${target} 'make LINT' failed," \ - "check _.${target}.makeLINT for details") + -cd ${.CURDIR}/sys/${target}/conf && ${MAKE} LINT \ + > ${.CURDIR}/_.${target}.makeLINT 2>&1 .endif .for kernel in ${KERNCONFS} - @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} buildkernel \ + -cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernel \ TARGET=${target} \ KERNCONF=${kernel} \ - > _.${target}.${kernel} 2>&1 || \ - echo "${target} ${kernel} kernel failed," \ - "check _.${target}.${kernel} for details") + __MAKE_CONF=/dev/null \ + > _.${target}.${kernel} 2>&1 .endfor @echo ">> ${target} completed on `LC_ALL=C date`" .endfor From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 13:55:09 2010 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 2BF191065672; Sun, 17 Jan 2010 13:55:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id A2E518FC08; Sun, 17 Jan 2010 13:55:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id D3B0841C757; Sun, 17 Jan 2010 14:55:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id vxb-hqOz+Q5y; Sun, 17 Jan 2010 14:55:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 04EF241C75A; Sun, 17 Jan 2010 14:55:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 5CA0F4448EC; Sun, 17 Jan 2010 13:52:11 +0000 (UTC) Date: Sun, 17 Jan 2010 13:52:11 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org In-Reply-To: <201001171349.o0HDnIR2041014@svn.freebsd.org> Message-ID: <20100117135119.Q50938@maildrop.int.zabbadoz.net> References: <201001171349.o0HDnIR2041014@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r202483 - stable/6 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, 17 Jan 2010 13:55:09 -0000 On Sun, 17 Jan 2010, Bjoern A. Zeeb wrote: > Author: bz > Date: Sun Jan 17 13:49:18 2010 > New Revision: 202483 > URL: http://svn.freebsd.org/changeset/base/202483 > > Log: > Backup this part of r202479 which was not meant to be committed along with s,Backup,Backout, something about this seriously doesn't like me;-) > the merge of r201898. > > Modified: > stable/6/Makefile (contents, props changed) -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 14:11:43 2010 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 58ABD106566C; Sun, 17 Jan 2010 14:11:43 +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 46D7C8FC19; Sun, 17 Jan 2010 14:11:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HEBhuk046396; Sun, 17 Jan 2010 14:11:43 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HEBhOC046394; Sun, 17 Jan 2010 14:11:43 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201001171411.o0HEBhOC046394@svn.freebsd.org> From: Ed Maste Date: Sun, 17 Jan 2010 14:11: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: r202484 - stable/6/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, 17 Jan 2010 14:11:43 -0000 Author: emaste Date: Sun Jan 17 14:11:42 2010 New Revision: 202484 URL: http://svn.freebsd.org/changeset/base/202484 Log: Log: MFC r197371: Mention that NUL characters are not allowed in sh(1) input. PR: bin/25542 Modified: stable/6/bin/sh/sh.1 Directory Properties: stable/6/bin/sh/ (props changed) Modified: stable/6/bin/sh/sh.1 ============================================================================== --- stable/6/bin/sh/sh.1 Sun Jan 17 13:49:18 2010 (r202483) +++ stable/6/bin/sh/sh.1 Sun Jan 17 14:11:42 2010 (r202484) @@ -370,6 +370,10 @@ introduces a comment if used at the begi The word starting with .Ql # and the rest of the line are ignored. +.Pp +.Tn ASCII +.Dv NUL +characters (character code 0) are not allowed in shell input. .Ss Quoting Quoting is used to remove the special meaning of certain characters or words to the shell, such as operators, whitespace, keywords, From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 15:20:34 2010 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 CCD5F1065705; Sun, 17 Jan 2010 15:20:34 +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 A11318FC19; Sun, 17 Jan 2010 15:20:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HFKYda062379; Sun, 17 Jan 2010 15:20:34 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HFKYuA062376; Sun, 17 Jan 2010 15:20:34 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171520.o0HFKYuA062376@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 15:20:34 +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: r202485 - stable/8/usr.sbin/traceroute 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, 17 Jan 2010 15:20:34 -0000 Author: bz Date: Sun Jan 17 15:20:34 2010 New Revision: 202485 URL: http://svn.freebsd.org/changeset/base/202485 Log: MFC r201806: Switch traceroute over to make use of proper in-kernel source address selection. Reviewed by: rwatson, fenner PR: kern/139454 Tested by: Frank Steinborn (steinex nognu.de) MFC r201897: Correct spelling. Submitted by: (pluknet gmail.com) Added: stable/8/usr.sbin/traceroute/findsaddr-udp.c - copied, changed from r201806, head/usr.sbin/traceroute/findsaddr-udp.c Modified: stable/8/usr.sbin/traceroute/Makefile Directory Properties: stable/8/usr.sbin/traceroute/ (props changed) Modified: stable/8/usr.sbin/traceroute/Makefile ============================================================================== --- stable/8/usr.sbin/traceroute/Makefile Sun Jan 17 14:11:42 2010 (r202484) +++ stable/8/usr.sbin/traceroute/Makefile Sun Jan 17 15:20:34 2010 (r202485) @@ -5,7 +5,7 @@ TRACEROUTE_DISTDIR?= ${.CURDIR}/../../co PROG= traceroute MAN= traceroute.8 -SRCS= as.c version.c traceroute.c ifaddrlist.c findsaddr-socket.c +SRCS= as.c version.c traceroute.c ifaddrlist.c findsaddr-udp.c BINOWN= root BINMODE=4555 CLEANFILES= version.c @@ -29,7 +29,7 @@ DPADD= ${LIBIPSEC} LDADD= -lipsec .endif -CFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl +CFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl -I${TRACEROUTE_DISTDIR} version.c: ${TRACEROUTE_DISTDIR}/VERSION @rm -f ${.TARGET} Copied and modified: stable/8/usr.sbin/traceroute/findsaddr-udp.c (from r201806, head/usr.sbin/traceroute/findsaddr-udp.c) ============================================================================== --- head/usr.sbin/traceroute/findsaddr-udp.c Fri Jan 8 16:59:28 2010 (r201806, copy source) +++ stable/8/usr.sbin/traceroute/findsaddr-udp.c Sun Jan 17 15:20:34 2010 (r202485) @@ -40,7 +40,7 @@ /* * Return the source address for the given destination address. * - * This makes use of proper source address seclection in the FreeBSD kernel + * This makes use of proper source address selection in the FreeBSD kernel * even taking jails into account (sys/netinet/in_pcb.c:in_pcbladdr()). * We open a UDP socket, and connect to the destination, letting the kernel * do the bind and then read the source IPv4 address using getsockname(2). From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 15:21:24 2010 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 7460E106566C; Sun, 17 Jan 2010 15:21:24 +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 621918FC16; Sun, 17 Jan 2010 15:21:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HFLORR062623; Sun, 17 Jan 2010 15:21:24 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HFLOAX062620; Sun, 17 Jan 2010 15:21:24 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171521.o0HFLOAX062620@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 15:21:24 +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: r202486 - stable/7/usr.sbin/traceroute 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, 17 Jan 2010 15:21:24 -0000 Author: bz Date: Sun Jan 17 15:21:24 2010 New Revision: 202486 URL: http://svn.freebsd.org/changeset/base/202486 Log: MFC r201806: Switch traceroute over to make use of proper in-kernel source address selection. Reviewed by: rwatson, fenner PR: kern/139454 Tested by: Frank Steinborn (steinex nognu.de) MFC r201897: Correct spelling. Submitted by: (pluknet gmail.com) Added: stable/7/usr.sbin/traceroute/findsaddr-udp.c - copied, changed from r201806, head/usr.sbin/traceroute/findsaddr-udp.c Modified: stable/7/usr.sbin/traceroute/Makefile Directory Properties: stable/7/usr.sbin/traceroute/ (props changed) Modified: stable/7/usr.sbin/traceroute/Makefile ============================================================================== --- stable/7/usr.sbin/traceroute/Makefile Sun Jan 17 15:20:34 2010 (r202485) +++ stable/7/usr.sbin/traceroute/Makefile Sun Jan 17 15:21:24 2010 (r202486) @@ -5,7 +5,7 @@ TRACEROUTE_DISTDIR?= ${.CURDIR}/../../co PROG= traceroute MAN= traceroute.8 -SRCS= as.c version.c traceroute.c ifaddrlist.c findsaddr-socket.c +SRCS= as.c version.c traceroute.c ifaddrlist.c findsaddr-udp.c BINOWN= root BINMODE=4555 CLEANFILES= version.c @@ -29,7 +29,7 @@ DPADD= ${LIBIPSEC} LDADD= -lipsec .endif -CFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl +CFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl -I${TRACEROUTE_DISTDIR} version.c: ${TRACEROUTE_DISTDIR}/VERSION @rm -f ${.TARGET} Copied and modified: stable/7/usr.sbin/traceroute/findsaddr-udp.c (from r201806, head/usr.sbin/traceroute/findsaddr-udp.c) ============================================================================== --- head/usr.sbin/traceroute/findsaddr-udp.c Fri Jan 8 16:59:28 2010 (r201806, copy source) +++ stable/7/usr.sbin/traceroute/findsaddr-udp.c Sun Jan 17 15:21:24 2010 (r202486) @@ -40,7 +40,7 @@ /* * Return the source address for the given destination address. * - * This makes use of proper source address seclection in the FreeBSD kernel + * This makes use of proper source address selection in the FreeBSD kernel * even taking jails into account (sys/netinet/in_pcb.c:in_pcbladdr()). * We open a UDP socket, and connect to the destination, letting the kernel * do the bind and then read the source IPv4 address using getsockname(2). From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 15:43:15 2010 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 0431B106566B; Sun, 17 Jan 2010 15:43:15 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E72E78FC1A; Sun, 17 Jan 2010 15:43:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HFhE3S068914; Sun, 17 Jan 2010 15:43:14 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HFhErI068912; Sun, 17 Jan 2010 15:43:14 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001171543.o0HFhErI068912@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 15:43: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: r202487 - head/lib/libc/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: Sun, 17 Jan 2010 15:43:15 -0000 Author: ed Date: Sun Jan 17 15:43:14 2010 New Revision: 202487 URL: http://svn.freebsd.org/changeset/base/202487 Log: Simplify ttyslot(3). After comparing how other systems deal with utmp/utmpx, I noticed many systems don't even care about ttyslot(3) anymore, since utmpx doesn't use TTY slots anyway. We don't provide any tools to access old utmp files anymore, so there is no use in letting applications write to a proper offset within the utmp file. Just let ttyslot(3) always return 0, which seems to be the default behaviour on operating systems like Linux as well. Modified: head/lib/libc/gen/ttyslot.c Modified: head/lib/libc/gen/ttyslot.c ============================================================================== --- head/lib/libc/gen/ttyslot.c Sun Jan 17 15:21:24 2010 (r202486) +++ head/lib/libc/gen/ttyslot.c Sun Jan 17 15:43:14 2010 (r202487) @@ -33,35 +33,11 @@ static char sccsid[] = "@(#)ttyslot.c 8. #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include - int __ttyslot(void) { - struct ttyent *ttyp; - int slot; - int cnt; - char *name; - setttyent(); - for (cnt = 0; cnt < 3; ++cnt) - if ( (name = ttyname(cnt)) ) { - if (strncmp(name, _PATH_DEV, sizeof _PATH_DEV - 1) != 0) - break; - name += sizeof _PATH_DEV - 1; - for (slot = 1; (ttyp = getttyent()); ++slot) - if (!strcmp(ttyp->ty_name, name)) { - endttyent(); - return(slot); - } - break; - } - endttyent(); - return(0); + return (0); } __sym_compat(ttyslot, __ttyslot, FBSD_1.0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 16:58:37 2010 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 645F7106566B; Sun, 17 Jan 2010 16:58:37 +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 52A968FC0A; Sun, 17 Jan 2010 16:58:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HGwb3V086434; Sun, 17 Jan 2010 16:58:37 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HGwbcq086432; Sun, 17 Jan 2010 16:58:37 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171658.o0HGwbcq086432@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 16:58:37 +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: r202488 - stable/8/sys/netinet 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, 17 Jan 2010 16:58:37 -0000 Author: tuexen Date: Sun Jan 17 16:58:37 2010 New Revision: 202488 URL: http://svn.freebsd.org/changeset/base/202488 Log: MFC 198522: Bugfix: Use formula from section 7.2.3 of RFC 4960. Reported by Martin Becke. Modified: stable/8/sys/netinet/sctp_cc_functions.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_cc_functions.c ============================================================================== --- stable/8/sys/netinet/sctp_cc_functions.c Sun Jan 17 15:43:14 2010 (r202487) +++ stable/8/sys/netinet/sctp_cc_functions.c Sun Jan 17 16:58:37 2010 (r202488) @@ -348,7 +348,7 @@ sctp_cwnd_update_after_timeout(struct sc { int old_cwnd = net->cwnd; - net->ssthresh = max(net->cwnd / 2, 2 * net->mtu); + net->ssthresh = max(net->cwnd / 2, 4 * net->mtu); net->cwnd = net->mtu; net->partial_bytes_acked = 0; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:01:01 2010 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 8EE0F106566B; Sun, 17 Jan 2010 17:01:01 +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 7D6FF8FC0C; Sun, 17 Jan 2010 17:01:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HH11mZ087079; Sun, 17 Jan 2010 17:01:01 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HH11GD087071; Sun, 17 Jan 2010 17:01:01 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171701.o0HH11GD087071@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 17:01:01 +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: r202489 - stable/8/sys/netinet 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, 17 Jan 2010 17:01:01 -0000 Author: tuexen Date: Sun Jan 17 17:01:01 2010 New Revision: 202489 URL: http://svn.freebsd.org/changeset/base/202489 Log: MFC 199369 Do not hold the lock longer than necessary. Modified: stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sun Jan 17 16:58:37 2010 (r202488) +++ stable/8/sys/netinet/sctputil.c Sun Jan 17 17:01:01 2010 (r202489) @@ -6156,11 +6156,11 @@ sctp_dynamic_set_primary(struct sockaddr * newest first :-0 */ LIST_INSERT_HEAD(&SCTP_BASE_INFO(addr_wq), wi, sctp_nxt_addr); + SCTP_IPI_ITERATOR_WQ_UNLOCK(); sctp_timer_start(SCTP_TIMER_TYPE_ADDR_WQ, (struct sctp_inpcb *)NULL, (struct sctp_tcb *)NULL, (struct sctp_nets *)NULL); - SCTP_IPI_ITERATOR_WQ_UNLOCK(); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:03:40 2010 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 5D07E106566C; Sun, 17 Jan 2010 17:03:40 +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 4B6398FC15; Sun, 17 Jan 2010 17:03:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HH3elR087728; Sun, 17 Jan 2010 17:03:40 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HH3eQj087726; Sun, 17 Jan 2010 17:03:40 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171703.o0HH3eQj087726@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 17:03:40 +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: r202490 - stable/8/sys/netinet 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, 17 Jan 2010 17:03:40 -0000 Author: tuexen Date: Sun Jan 17 17:03:40 2010 New Revision: 202490 URL: http://svn.freebsd.org/changeset/base/202490 Log: MFC 199372 Do not start the iterator when there are no associations. This fixes a bug found by Irene Ruengeler. Modified: stable/8/sys/netinet/sctp_asconf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_asconf.c ============================================================================== --- stable/8/sys/netinet/sctp_asconf.c Sun Jan 17 17:01:01 2010 (r202489) +++ stable/8/sys/netinet/sctp_asconf.c Sun Jan 17 17:03:40 2010 (r202490) @@ -3180,24 +3180,6 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * ifa = NULL; } if (ifa != NULL) { - /* add this address */ - struct sctp_asconf_iterator *asc; - struct sctp_laddr *wi; - - SCTP_MALLOC(asc, struct sctp_asconf_iterator *, - sizeof(struct sctp_asconf_iterator), - SCTP_M_ASC_IT); - if (asc == NULL) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM); - return (ENOMEM); - } - wi = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_laddr), - struct sctp_laddr); - if (wi == NULL) { - SCTP_FREE(asc, SCTP_M_ASC_IT); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM); - return (ENOMEM); - } if (type == SCTP_ADD_IP_ADDRESS) { sctp_add_local_addr_ep(inp, ifa, type); } else if (type == SCTP_DEL_IP_ADDRESS) { @@ -3205,8 +3187,6 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * if (inp->laddr_count < 2) { /* can't delete the last local address */ - SCTP_FREE(asc, SCTP_M_ASC_IT); - SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_laddr), wi); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, EINVAL); return (EINVAL); } @@ -3218,27 +3198,49 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * } } } - LIST_INIT(&asc->list_of_work); - asc->cnt = 1; - SCTP_INCR_LADDR_COUNT(); - wi->ifa = ifa; - wi->action = type; - atomic_add_int(&ifa->refcount, 1); - LIST_INSERT_HEAD(&asc->list_of_work, wi, sctp_nxt_addr); - (void)sctp_initiate_iterator(sctp_asconf_iterator_ep, - sctp_asconf_iterator_stcb, - sctp_asconf_iterator_ep_end, - SCTP_PCB_ANY_FLAGS, - SCTP_PCB_ANY_FEATURES, - SCTP_ASOC_ANY_STATE, - (void *)asc, 0, - sctp_asconf_iterator_end, inp, 0); + if (!LIST_EMPTY(&inp->sctp_asoc_list)) { + /* + * There is no need to start the iterator if the inp + * has no associations. + */ + struct sctp_asconf_iterator *asc; + struct sctp_laddr *wi; + + SCTP_MALLOC(asc, struct sctp_asconf_iterator *, + sizeof(struct sctp_asconf_iterator), + SCTP_M_ASC_IT); + if (asc == NULL) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM); + return (ENOMEM); + } + wi = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_laddr), struct sctp_laddr); + if (wi == NULL) { + SCTP_FREE(asc, SCTP_M_ASC_IT); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM); + return (ENOMEM); + } + LIST_INIT(&asc->list_of_work); + asc->cnt = 1; + SCTP_INCR_LADDR_COUNT(); + wi->ifa = ifa; + wi->action = type; + atomic_add_int(&ifa->refcount, 1); + LIST_INSERT_HEAD(&asc->list_of_work, wi, sctp_nxt_addr); + (void)sctp_initiate_iterator(sctp_asconf_iterator_ep, + sctp_asconf_iterator_stcb, + sctp_asconf_iterator_ep_end, + SCTP_PCB_ANY_FLAGS, + SCTP_PCB_ANY_FEATURES, + SCTP_ASOC_ANY_STATE, + (void *)asc, 0, + sctp_asconf_iterator_end, inp, 0); + } + return (0); } else { /* invalid address! */ SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_ASCONF, EADDRNOTAVAIL); return (EADDRNOTAVAIL); } - return (0); } void From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:05:59 2010 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 EAEB81065672; Sun, 17 Jan 2010 17:05:59 +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 D94A38FC0C; Sun, 17 Jan 2010 17:05:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HH5x8o088326; Sun, 17 Jan 2010 17:05:59 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HH5x2b088321; Sun, 17 Jan 2010 17:05:59 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171705.o0HH5x2b088321@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 17:05:59 +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: r202491 - stable/8/sys/netinet 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, 17 Jan 2010 17:06:00 -0000 Author: tuexen Date: Sun Jan 17 17:05:59 2010 New Revision: 202491 URL: http://svn.freebsd.org/changeset/base/202491 Log: MFC 199437 Use always LIST_EMPTY instead of sometime SCTP_LIST_EMPTY, which is defined as LIST_EMPTY. Modified: stable/8/sys/netinet/sctp_auth.c stable/8/sys/netinet/sctp_os_bsd.h stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_auth.c ============================================================================== --- stable/8/sys/netinet/sctp_auth.c Sun Jan 17 17:03:40 2010 (r202490) +++ stable/8/sys/netinet/sctp_auth.c Sun Jan 17 17:05:59 2010 (r202491) @@ -573,7 +573,7 @@ sctp_insert_sharedkey(struct sctp_keyhea return (EINVAL); /* insert into an empty list? */ - if (SCTP_LIST_EMPTY(shared_keys)) { + if (LIST_EMPTY(shared_keys)) { LIST_INSERT_HEAD(shared_keys, new_skey, next); return (0); } Modified: stable/8/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/8/sys/netinet/sctp_os_bsd.h Sun Jan 17 17:03:40 2010 (r202490) +++ stable/8/sys/netinet/sctp_os_bsd.h Sun Jan 17 17:05:59 2010 (r202491) @@ -153,7 +153,6 @@ MALLOC_DECLARE(SCTP_M_SOCKOPT); * */ #define USER_ADDR_NULL (NULL) /* FIX ME: temp */ -#define SCTP_LIST_EMPTY(list) LIST_EMPTY(list) #if defined(SCTP_DEBUG) #define SCTPDBG(level, params...) \ Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sun Jan 17 17:03:40 2010 (r202490) +++ stable/8/sys/netinet/sctp_pcb.c Sun Jan 17 17:05:59 2010 (r202491) @@ -452,7 +452,7 @@ sctp_remove_ifa_from_ifn(struct sctp_ifa sctp_ifap->ifn_p->num_v4--; ifn_index = sctp_ifap->ifn_p->ifn_index; - if (SCTP_LIST_EMPTY(&sctp_ifap->ifn_p->ifalist)) { + if (LIST_EMPTY(&sctp_ifap->ifn_p->ifalist)) { /* remove the ifn, possibly freeing it */ sctp_delete_ifn(sctp_ifap->ifn_p, SCTP_ADDR_LOCKED); } else { @@ -4262,7 +4262,7 @@ sctp_delete_from_timewait(uint32_t tag, int i; chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { for (i = 0; i < SCTP_NUMBER_IN_VTAG_BLOCK; i++) { if ((twait_block->vtag_block[i].v_tag == tag) && @@ -4292,7 +4292,7 @@ sctp_is_in_timewait(uint32_t tag, uint16 SCTP_INP_INFO_WLOCK(); chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { for (i = 0; i < SCTP_NUMBER_IN_VTAG_BLOCK; i++) { if ((twait_block->vtag_block[i].v_tag == tag) && @@ -4326,7 +4326,7 @@ sctp_add_vtag_to_timewait(uint32_t tag, (void)SCTP_GETTIME_TIMEVAL(&now); chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; set = 0; - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { /* Block(s) present, lets find space, and expire on the fly */ LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { for (i = 0; i < SCTP_NUMBER_IN_VTAG_BLOCK; i++) { @@ -4953,7 +4953,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, sctp_free_remote_addr(net); } - while (!SCTP_LIST_EMPTY(&asoc->sctp_restricted_addrs)) { + while (!LIST_EMPTY(&asoc->sctp_restricted_addrs)) { /* sa_ignore FREED_MEMORY */ laddr = LIST_FIRST(&asoc->sctp_restricted_addrs); sctp_remove_laddr(laddr); @@ -5617,7 +5617,7 @@ sctp_pcb_finish(void) */ for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { chain = &SCTP_BASE_INFO(vtag_timewait)[i]; - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { prev_twait_block = NULL; LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { if (prev_twait_block) { @@ -6387,7 +6387,7 @@ skip_vtag_check: chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))]; /* Now what about timed wait ? */ - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { /* * Block(s) are present, lets see if we have this tag in the * list Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sun Jan 17 17:03:40 2010 (r202490) +++ stable/8/sys/netinet/sctp_usrreq.c Sun Jan 17 17:05:59 2010 (r202491) @@ -759,7 +759,7 @@ sctp_disconnect(struct socket *so) SCTP_INP_RLOCK(inp); if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { - if (SCTP_LIST_EMPTY(&inp->sctp_asoc_list)) { + if (LIST_EMPTY(&inp->sctp_asoc_list)) { /* No connection */ SCTP_INP_RUNLOCK(inp); return (0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:10:17 2010 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 A51C31065670; Sun, 17 Jan 2010 17:10:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93F478FC22; Sun, 17 Jan 2010 17:10:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHAHUr089351; Sun, 17 Jan 2010 17:10:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHAHBI089349; Sun, 17 Jan 2010 17:10:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171710.o0HHAHBI089349@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 17:10:17 +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: r202492 - stable/8/sys/netinet 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, 17 Jan 2010 17:10:17 -0000 Author: tuexen Date: Sun Jan 17 17:10:17 2010 New Revision: 202492 URL: http://svn.freebsd.org/changeset/base/202492 Log: MFC 198499 Improve the round robin stream scheduler. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:05:59 2010 (r202491) +++ stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:10:17 2010 (r202492) @@ -7190,22 +7190,16 @@ sctp_select_a_stream(struct sctp_tcb *st /* Find the next stream to use */ if (asoc->last_out_stream == NULL) { - strq = asoc->last_out_stream = TAILQ_FIRST(&asoc->out_wheel); - if (asoc->last_out_stream == NULL) { - /* huh nothing on the wheel, TSNH */ - return (NULL); - } - goto done_it; - } - strq = TAILQ_NEXT(asoc->last_out_stream, next_spoke); -done_it: - if (strq == NULL) { - strq = asoc->last_out_stream = TAILQ_FIRST(&asoc->out_wheel); + strq = TAILQ_FIRST(&asoc->out_wheel); + } else { + strq = TAILQ_NEXT(asoc->last_out_stream, next_spoke); + if (strq == NULL) { + strq = TAILQ_FIRST(&asoc->out_wheel); + } } /* Save off the last stream */ asoc->last_out_stream = strq; return (strq); - } From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:31:53 2010 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 70F0C106566B; Sun, 17 Jan 2010 17:31:53 +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 5DA948FC15; Sun, 17 Jan 2010 17:31:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHVrWo094434; Sun, 17 Jan 2010 17:31:53 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHVrbg094431; Sun, 17 Jan 2010 17:31:53 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001171731.o0HHVrbg094431@svn.freebsd.org> From: Christian Brueffer Date: Sun, 17 Jan 2010 17:31:53 +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: r202493 - in stable/8: share/man/man4 usr.sbin/faithd 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, 17 Jan 2010 17:31:53 -0000 Author: brueffer Date: Sun Jan 17 17:31:53 2010 New Revision: 202493 URL: http://svn.freebsd.org/changeset/base/202493 Log: MFC: r201870, r201889 Various language fixes. Also fixed the URL to totd, obtained from NetBSD. Modified: stable/8/share/man/man4/faith.4 stable/8/usr.sbin/faithd/faithd.8 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) stable/8/usr.sbin/faithd/ (props changed) Modified: stable/8/share/man/man4/faith.4 ============================================================================== --- stable/8/share/man/man4/faith.4 Sun Jan 17 17:10:17 2010 (r202492) +++ stable/8/share/man/man4/faith.4 Sun Jan 17 17:31:53 2010 (r202493) @@ -58,15 +58,15 @@ variable in .Xr rc.conf 5 . .Pp Special action will be taken when IPv6 TCP traffic is seen on a router, -and routing table suggests to route it to +and the routing table suggests to route it to the .Nm interface. In this case, the packet will be accepted by the router, -regardless of list of IPv6 interface addresses assigned to the router. -The packet will be captured by an IPv6 TCP socket, if it has +regardless of the list of IPv6 interface addresses assigned to the router. +The packet will be captured by an IPv6 TCP socket, if it has the .Dv IN6P_FAITH -flag turned on and it has matching address/port pairs. -In result, +flag turned on and matching address/port pairs. +As a result, .Nm will let you capture IPv6 TCP traffic to some specific destination addresses. Userland programs, such as @@ -79,43 +79,42 @@ and perform application-specific address .Pp The .Dv IN6P_FAITH -flag on IPv6 TCP socket can be set by using +flag on a IPv6 TCP socket can be set by using .Xr setsockopt 2 , -with level equals to +with level .Dv IPPROTO_IPV6 -and optname equals to +and optname .Dv IPv6_FAITH . .Pp -To handle error reports by ICMPv6, some of ICMPv6 packets routed to +To handle error reports by ICMPv6, some ICMPv6 packets routed to an .Nm interface will be delivered to IPv6 TCP, as well. .Pp To understand how .Nm -can be used, take a look at source code of +can be used, take a look at the source code of .Xr faithd 8 . .Pp -As +As the .Nm -interface implements potentially dangerous operation, -great care must be taken when configuring -.Nm -interface. -To avoid possible misuse, +interface implements potentially dangerous operations, +great care must be taken when configuring it. +To avoid possible misuse, the .Xr sysctl 8 variable .Li net.inet6.ip6.keepfaith must be set to .Li 1 -prior to the use of the interface. +prior to using the interface. When .Li net.inet6.ip6.keepfaith is .Li 0 , -no packet will be captured by +no packets will be captured by the .Nm interface. .Pp +The .Nm interface is intended to be used on routers, not on hosts. .\" @@ -130,5 +129,5 @@ interface is intended to be used on rout .%O RFC3142 .Re .Sh HISTORY -The FAITH IPv6-to-IPv4 TCP relay translator was first appeared in +The FAITH IPv6-to-IPv4 TCP relay translator first appeared in the WIDE hydrangea IPv6 stack. Modified: stable/8/usr.sbin/faithd/faithd.8 ============================================================================== --- stable/8/usr.sbin/faithd/faithd.8 Sun Jan 17 17:10:17 2010 (r202492) +++ stable/8/usr.sbin/faithd/faithd.8 Sun Jan 17 17:31:53 2010 (r202493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 1998 +.Dd January 9, 2010 .Dt FAITHD 8 .Os .Sh NAME @@ -44,20 +44,18 @@ .Sh DESCRIPTION The .Nm -utility provides IPv6-to-IPv4 TCP relay. -It must be used on an IPv4/v6 dual stack router. +utility provides IPv6-to-IPv4 TCP relaying. +It can only be used on an IPv4/v6 dual stack router. .Pp When .Nm receives .Tn TCPv6 -traffic, -.Nm -will relay the +traffic, it will relay the .Tn TCPv6 traffic to .Tn TCPv4 . -Destination for relayed +The destination for the relayed .Tn TCPv4 connection will be determined by the last 4 octets of the original .Tn IPv6 @@ -73,14 +71,14 @@ destination address is the traffic will be relayed to IPv4 destination .Li 10.1.1.1 . .Pp -To use +To use the .Nm translation service, an IPv6 address prefix must be reserved for mapping IPv4 addresses into. -Kernel must be properly configured to route all the TCP connection +The kernel must be properly configured to route all the TCP connections toward the reserved IPv6 address prefix into the .Xr faith 4 -pseudo interface, by using +pseudo interface, using the .Xr route 8 command. Also, @@ -91,7 +89,7 @@ to .Dv 1 . .Pp The router must be configured to capture all the TCP traffic -toward reserved +for the reserved .Tn IPv6 address prefix, by using .Xr route 8 @@ -101,21 +99,20 @@ commands. .Pp The .Nm -utility needs a special name-to-address translation logic, so that -hostnames gets resolved into special +utility needs special name-to-address translation logic, so that +hostnames get resolved into the special .Tn IPv6 address prefix. -For small-scale installation, use -.Xr hosts 5 . -For large-scale installation, it is useful to have +For small-scale installations, use +.Xr hosts 5 ; +For large-scale installations, it is useful to have a DNS server with special address translation support. An implementation called .Nm totd -is available -at -.Pa http://www.vermicelli.pasta.cs.uit.no/ipv6/software.html . -Make sure you do not propagate translated DNS records to normal DNS cloud, -it is highly harmful. +is available at +.Pa http://www.vermicelli.pasta.cs.uit.no/software/totd.html . +Make sure you do not propagate translated DNS records over to normal +DNS, as it can cause severe problems. .Ss Daemon mode When .Nm @@ -150,9 +147,9 @@ to you can run local daemons on the router. The .Nm -utility will invoke local daemon at +utility will invoke a local daemon at .Ar serverpath -if the destination address is local interface address, +if the destination address is a local interface address, and will perform translation to IPv4 TCP in other cases. You can also specify .Ar serverargs @@ -182,7 +179,7 @@ The .Nm utility includes special support for protocols used by .Xr ftp 1 . -When translating FTP protocol, +When translating the FTP protocol, .Nm translates network level addresses in .Li PORT/LPRT/EPRT @@ -191,8 +188,8 @@ and commands. .Pp Inactive sessions will be disconnected in 30 minutes, -to avoid stale sessions from chewing up resources. -This may be inappropriate for some of the services +to prevent stale sessions from chewing up resources. +This may be inappropriate for some services (should this be configurable?). .Ss inetd mode When @@ -200,13 +197,13 @@ When is invoked via .Xr inetd 8 , .Nm -will handle connection passed from standard input. +will handle connections passed from standard input. If the connection endpoint is in the reserved IPv6 address prefix, .Nm will relay the connection. Otherwise, .Nm -will invoke service-specific daemon like +will invoke a service-specific daemon like .Xr telnetd 8 , by using the command argument passed from .Xr inetd 8 . @@ -219,16 +216,16 @@ For example, if .Nm is invoked via .Xr inetd 8 -on FTP port, it will operate as a FTP relay. +on the FTP port, it will operate as an FTP relay. .Pp The operation mode requires special support for .Nm in .Xr inetd 8 . .Ss Access control -To prevent malicious accesses, +To prevent malicious access, .Nm -implements a simple address-based access control. +implements simple address-based access control. With .Pa /etc/faithd.conf (or @@ -239,7 +236,7 @@ specified by will avoid relaying unwanted traffic. The .Pa faithd.conf -contains directives with the following format: +configuration file contains directives of the following format: .Bl -bullet .It .Ar src Ns / Ns Ar slen Cm deny Ar dst Ns / Ns Ar dlen @@ -281,6 +278,7 @@ on error. .Sh EXAMPLES Before invoking .Nm , +the .Xr faith 4 interface has to be configured properly. .Bd -literal -offset @@ -334,12 +332,12 @@ ssh stream tcp6/faith nowait root .Ed .Pp .Xr inetd 8 -will open listening sockets with enabling kernel TCP relay support. -Whenever connection comes in, +will open listening sockets with kernel TCP relay support enabled. +Whenever a connection comes in, .Nm will be invoked by .Xr inetd 8 . -If it the connection endpoint is in the reserved IPv6 address prefix. +If the connection endpoint is in the reserved IPv6 address prefix. The .Nm utility will relay the connection. @@ -377,12 +375,12 @@ setting. .Sh HISTORY The .Nm -utility first appeared in WIDE Hydrangea IPv6 protocol stack kit. +utility first appeared in the WIDE Hydrangea IPv6 protocol stack kit. .\" .Pp IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack was initially integrated into -.Fx 4.0 +.Fx 4.0 . .Sh SECURITY CONSIDERATIONS It is very insecure to use IP-address based authentication, for connections relayed by .Nm , @@ -392,16 +390,15 @@ Administrators are advised to limit acce .Nm using .Pa faithd.conf , -or by using IPv6 packet filters. -It is to protect +or by using IPv6 packet filters, to protect the .Nm -service from malicious parties and avoid theft of service/bandwidth. -IPv6 destination address can be limited by -carefully configuring routing entries that points to +service from malicious parties, and to avoid theft of service/bandwidth. +IPv6 destination addresses can be limited by +carefully configuring routing entries that point to .Xr faith 4 , using .Xr route 8 . -IPv6 source address needs to be filtered by using packet filters. -Documents listed in +The IPv6 source address needs to be filtered using packet filters. +The documents listed in .Sx SEE ALSO -have more discussions on this topic. +have more information on this topic. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:36:25 2010 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 C0A08106566B; Sun, 17 Jan 2010 17:36: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 AD78A8FC14; Sun, 17 Jan 2010 17:36:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHaPta095583; Sun, 17 Jan 2010 17:36:25 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHaPoQ095580; Sun, 17 Jan 2010 17:36:25 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001171736.o0HHaPoQ095580@svn.freebsd.org> From: Christian Brueffer Date: Sun, 17 Jan 2010 17:36:25 +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: r202494 - in stable/7: share/man/man4 usr.sbin/faithd 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, 17 Jan 2010 17:36:26 -0000 Author: brueffer Date: Sun Jan 17 17:36:25 2010 New Revision: 202494 URL: http://svn.freebsd.org/changeset/base/202494 Log: MFC: r201870, r201889 Various language fixes. Also fixed the URL to totd, obtained from NetBSD. Modified: stable/7/share/man/man4/faith.4 stable/7/usr.sbin/faithd/faithd.8 Directory Properties: stable/7/share/man/man4/ (props changed) stable/7/usr.sbin/faithd/ (props changed) Modified: stable/7/share/man/man4/faith.4 ============================================================================== --- stable/7/share/man/man4/faith.4 Sun Jan 17 17:31:53 2010 (r202493) +++ stable/7/share/man/man4/faith.4 Sun Jan 17 17:36:25 2010 (r202494) @@ -58,15 +58,15 @@ variable in .Xr rc.conf 5 . .Pp Special action will be taken when IPv6 TCP traffic is seen on a router, -and routing table suggests to route it to +and the routing table suggests to route it to the .Nm interface. In this case, the packet will be accepted by the router, -regardless of list of IPv6 interface addresses assigned to the router. -The packet will be captured by an IPv6 TCP socket, if it has +regardless of the list of IPv6 interface addresses assigned to the router. +The packet will be captured by an IPv6 TCP socket, if it has the .Dv IN6P_FAITH -flag turned on and it has matching address/port pairs. -In result, +flag turned on and matching address/port pairs. +As a result, .Nm will let you capture IPv6 TCP traffic to some specific destination addresses. Userland programs, such as @@ -79,43 +79,42 @@ and perform application-specific address .Pp The .Dv IN6P_FAITH -flag on IPv6 TCP socket can be set by using +flag on a IPv6 TCP socket can be set by using .Xr setsockopt 2 , -with level equals to +with level .Dv IPPROTO_IPV6 -and optname equals to +and optname .Dv IPv6_FAITH . .Pp -To handle error reports by ICMPv6, some of ICMPv6 packets routed to +To handle error reports by ICMPv6, some ICMPv6 packets routed to an .Nm interface will be delivered to IPv6 TCP, as well. .Pp To understand how .Nm -can be used, take a look at source code of +can be used, take a look at the source code of .Xr faithd 8 . .Pp -As +As the .Nm -interface implements potentially dangerous operation, -great care must be taken when configuring -.Nm -interface. -To avoid possible misuse, +interface implements potentially dangerous operations, +great care must be taken when configuring it. +To avoid possible misuse, the .Xr sysctl 8 variable .Li net.inet6.ip6.keepfaith must be set to .Li 1 -prior to the use of the interface. +prior to using the interface. When .Li net.inet6.ip6.keepfaith is .Li 0 , -no packet will be captured by +no packets will be captured by the .Nm interface. .Pp +The .Nm interface is intended to be used on routers, not on hosts. .\" @@ -130,5 +129,5 @@ interface is intended to be used on rout .%O RFC3142 .Re .Sh HISTORY -The FAITH IPv6-to-IPv4 TCP relay translator was first appeared in +The FAITH IPv6-to-IPv4 TCP relay translator first appeared in the WIDE hydrangea IPv6 stack. Modified: stable/7/usr.sbin/faithd/faithd.8 ============================================================================== --- stable/7/usr.sbin/faithd/faithd.8 Sun Jan 17 17:31:53 2010 (r202493) +++ stable/7/usr.sbin/faithd/faithd.8 Sun Jan 17 17:36:25 2010 (r202494) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 1998 +.Dd January 9, 2010 .Dt FAITHD 8 .Os .Sh NAME @@ -44,20 +44,18 @@ .Sh DESCRIPTION The .Nm -utility provides IPv6-to-IPv4 TCP relay. -It must be used on an IPv4/v6 dual stack router. +utility provides IPv6-to-IPv4 TCP relaying. +It can only be used on an IPv4/v6 dual stack router. .Pp When .Nm receives .Tn TCPv6 -traffic, -.Nm -will relay the +traffic, it will relay the .Tn TCPv6 traffic to .Tn TCPv4 . -Destination for relayed +The destination for the relayed .Tn TCPv4 connection will be determined by the last 4 octets of the original .Tn IPv6 @@ -73,14 +71,14 @@ destination address is the traffic will be relayed to IPv4 destination .Li 10.1.1.1 . .Pp -To use +To use the .Nm translation service, an IPv6 address prefix must be reserved for mapping IPv4 addresses into. -Kernel must be properly configured to route all the TCP connection +The kernel must be properly configured to route all the TCP connections toward the reserved IPv6 address prefix into the .Xr faith 4 -pseudo interface, by using +pseudo interface, using the .Xr route 8 command. Also, @@ -91,7 +89,7 @@ to .Dv 1 . .Pp The router must be configured to capture all the TCP traffic -toward reserved +for the reserved .Tn IPv6 address prefix, by using .Xr route 8 @@ -101,21 +99,20 @@ commands. .Pp The .Nm -utility needs a special name-to-address translation logic, so that -hostnames gets resolved into special +utility needs special name-to-address translation logic, so that +hostnames get resolved into the special .Tn IPv6 address prefix. -For small-scale installation, use -.Xr hosts 5 . -For large-scale installation, it is useful to have +For small-scale installations, use +.Xr hosts 5 ; +For large-scale installations, it is useful to have a DNS server with special address translation support. An implementation called .Nm totd -is available -at -.Pa http://www.vermicelli.pasta.cs.uit.no/ipv6/software.html . -Make sure you do not propagate translated DNS records to normal DNS cloud, -it is highly harmful. +is available at +.Pa http://www.vermicelli.pasta.cs.uit.no/software/totd.html . +Make sure you do not propagate translated DNS records over to normal +DNS, as it can cause severe problems. .Ss Daemon mode When .Nm @@ -150,9 +147,9 @@ to you can run local daemons on the router. The .Nm -utility will invoke local daemon at +utility will invoke a local daemon at .Ar serverpath -if the destination address is local interface address, +if the destination address is a local interface address, and will perform translation to IPv4 TCP in other cases. You can also specify .Ar serverargs @@ -182,7 +179,7 @@ The .Nm utility includes special support for protocols used by .Xr ftp 1 . -When translating FTP protocol, +When translating the FTP protocol, .Nm translates network level addresses in .Li PORT/LPRT/EPRT @@ -191,8 +188,8 @@ and commands. .Pp Inactive sessions will be disconnected in 30 minutes, -to avoid stale sessions from chewing up resources. -This may be inappropriate for some of the services +to prevent stale sessions from chewing up resources. +This may be inappropriate for some services (should this be configurable?). .Ss inetd mode When @@ -200,13 +197,13 @@ When is invoked via .Xr inetd 8 , .Nm -will handle connection passed from standard input. +will handle connections passed from standard input. If the connection endpoint is in the reserved IPv6 address prefix, .Nm will relay the connection. Otherwise, .Nm -will invoke service-specific daemon like +will invoke a service-specific daemon like .Xr telnetd 8 , by using the command argument passed from .Xr inetd 8 . @@ -219,16 +216,16 @@ For example, if .Nm is invoked via .Xr inetd 8 -on FTP port, it will operate as a FTP relay. +on the FTP port, it will operate as an FTP relay. .Pp The operation mode requires special support for .Nm in .Xr inetd 8 . .Ss Access control -To prevent malicious accesses, +To prevent malicious access, .Nm -implements a simple address-based access control. +implements simple address-based access control. With .Pa /etc/faithd.conf (or @@ -239,7 +236,7 @@ specified by will avoid relaying unwanted traffic. The .Pa faithd.conf -contains directives with the following format: +configuration file contains directives of the following format: .Bl -bullet .It .Ar src Ns / Ns Ar slen Cm deny Ar dst Ns / Ns Ar dlen @@ -281,6 +278,7 @@ on error. .Sh EXAMPLES Before invoking .Nm , +the .Xr faith 4 interface has to be configured properly. .Bd -literal -offset @@ -334,12 +332,12 @@ ssh stream tcp6/faith nowait root .Ed .Pp .Xr inetd 8 -will open listening sockets with enabling kernel TCP relay support. -Whenever connection comes in, +will open listening sockets with kernel TCP relay support enabled. +Whenever a connection comes in, .Nm will be invoked by .Xr inetd 8 . -If it the connection endpoint is in the reserved IPv6 address prefix. +If the connection endpoint is in the reserved IPv6 address prefix. The .Nm utility will relay the connection. @@ -377,12 +375,12 @@ setting. .Sh HISTORY The .Nm -utility first appeared in WIDE Hydrangea IPv6 protocol stack kit. +utility first appeared in the WIDE Hydrangea IPv6 protocol stack kit. .\" .Pp IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack was initially integrated into -.Fx 4.0 +.Fx 4.0 . .Sh SECURITY CONSIDERATIONS It is very insecure to use IP-address based authentication, for connections relayed by .Nm , @@ -392,16 +390,15 @@ Administrators are advised to limit acce .Nm using .Pa faithd.conf , -or by using IPv6 packet filters. -It is to protect +or by using IPv6 packet filters, to protect the .Nm -service from malicious parties and avoid theft of service/bandwidth. -IPv6 destination address can be limited by -carefully configuring routing entries that points to +service from malicious parties, and to avoid theft of service/bandwidth. +IPv6 destination addresses can be limited by +carefully configuring routing entries that point to .Xr faith 4 , using .Xr route 8 . -IPv6 source address needs to be filtered by using packet filters. -Documents listed in +The IPv6 source address needs to be filtered using packet filters. +The documents listed in .Sx SEE ALSO -have more discussions on this topic. +have more information on this topic. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:40:31 2010 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 A00091065679; Sun, 17 Jan 2010 17:40:31 +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 8CFD68FC26; Sun, 17 Jan 2010 17:40:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHeVrb096610; Sun, 17 Jan 2010 17:40:31 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHeVKD096607; Sun, 17 Jan 2010 17:40:31 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001171740.o0HHeVKD096607@svn.freebsd.org> From: Christian Brueffer Date: Sun, 17 Jan 2010 17:40:31 +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: r202495 - in stable/6: share/man/man4 usr.sbin/faithd 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, 17 Jan 2010 17:40:31 -0000 Author: brueffer Date: Sun Jan 17 17:40:31 2010 New Revision: 202495 URL: http://svn.freebsd.org/changeset/base/202495 Log: MFC: r201870, r201889 Various language fixes. Also fixed the URL to totd, obtained from NetBSD. Modified: stable/6/share/man/man4/faith.4 stable/6/usr.sbin/faithd/faithd.8 Directory Properties: stable/6/share/man/man4/ (props changed) stable/6/usr.sbin/faithd/ (props changed) Modified: stable/6/share/man/man4/faith.4 ============================================================================== --- stable/6/share/man/man4/faith.4 Sun Jan 17 17:36:25 2010 (r202494) +++ stable/6/share/man/man4/faith.4 Sun Jan 17 17:40:31 2010 (r202495) @@ -58,15 +58,15 @@ variable in .Xr rc.conf 5 . .Pp Special action will be taken when IPv6 TCP traffic is seen on a router, -and routing table suggests to route it to +and the routing table suggests to route it to the .Nm interface. In this case, the packet will be accepted by the router, -regardless of list of IPv6 interface addresses assigned to the router. -The packet will be captured by an IPv6 TCP socket, if it has +regardless of the list of IPv6 interface addresses assigned to the router. +The packet will be captured by an IPv6 TCP socket, if it has the .Dv IN6P_FAITH -flag turned on and it has matching address/port pairs. -In result, +flag turned on and matching address/port pairs. +As a result, .Nm will let you capture IPv6 TCP traffic to some specific destination addresses. Userland programs, such as @@ -79,43 +79,42 @@ and perform application-specific address .Pp The .Dv IN6P_FAITH -flag on IPv6 TCP socket can be set by using +flag on a IPv6 TCP socket can be set by using .Xr setsockopt 2 , -with level equals to +with level .Dv IPPROTO_IPV6 -and optname equals to +and optname .Dv IPv6_FAITH . .Pp -To handle error reports by ICMPv6, some of ICMPv6 packets routed to +To handle error reports by ICMPv6, some ICMPv6 packets routed to an .Nm interface will be delivered to IPv6 TCP, as well. .Pp To understand how .Nm -can be used, take a look at source code of +can be used, take a look at the source code of .Xr faithd 8 . .Pp -As +As the .Nm -interface implements potentially dangerous operation, -great care must be taken when configuring -.Nm -interface. -To avoid possible misuse, +interface implements potentially dangerous operations, +great care must be taken when configuring it. +To avoid possible misuse, the .Xr sysctl 8 variable .Li net.inet6.ip6.keepfaith must be set to .Li 1 -prior to the use of the interface. +prior to using the interface. When .Li net.inet6.ip6.keepfaith is .Li 0 , -no packet will be captured by +no packets will be captured by the .Nm interface. .Pp +The .Nm interface is intended to be used on routers, not on hosts. .\" @@ -130,5 +129,5 @@ interface is intended to be used on rout .%O RFC3142 .Re .Sh HISTORY -The FAITH IPv6-to-IPv4 TCP relay translator was first appeared in +The FAITH IPv6-to-IPv4 TCP relay translator first appeared in the WIDE hydrangea IPv6 stack. Modified: stable/6/usr.sbin/faithd/faithd.8 ============================================================================== --- stable/6/usr.sbin/faithd/faithd.8 Sun Jan 17 17:36:25 2010 (r202494) +++ stable/6/usr.sbin/faithd/faithd.8 Sun Jan 17 17:40:31 2010 (r202495) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 1998 +.Dd January 9, 2010 .Dt FAITHD 8 .Os .Sh NAME @@ -44,20 +44,18 @@ .Sh DESCRIPTION The .Nm -utility provides IPv6-to-IPv4 TCP relay. -It must be used on an IPv4/v6 dual stack router. +utility provides IPv6-to-IPv4 TCP relaying. +It can only be used on an IPv4/v6 dual stack router. .Pp When .Nm receives .Tn TCPv6 -traffic, -.Nm -will relay the +traffic, it will relay the .Tn TCPv6 traffic to .Tn TCPv4 . -Destination for relayed +The destination for the relayed .Tn TCPv4 connection will be determined by the last 4 octets of the original .Tn IPv6 @@ -73,14 +71,14 @@ destination address is the traffic will be relayed to IPv4 destination .Li 10.1.1.1 . .Pp -To use +To use the .Nm translation service, an IPv6 address prefix must be reserved for mapping IPv4 addresses into. -Kernel must be properly configured to route all the TCP connection +The kernel must be properly configured to route all the TCP connections toward the reserved IPv6 address prefix into the .Xr faith 4 -pseudo interface, by using +pseudo interface, using the .Xr route 8 command. Also, @@ -91,7 +89,7 @@ to .Dv 1 . .Pp The router must be configured to capture all the TCP traffic -toward reserved +for the reserved .Tn IPv6 address prefix, by using .Xr route 8 @@ -101,21 +99,20 @@ commands. .Pp The .Nm -utility needs a special name-to-address translation logic, so that -hostnames gets resolved into special +utility needs special name-to-address translation logic, so that +hostnames get resolved into the special .Tn IPv6 address prefix. -For small-scale installation, use -.Xr hosts 5 . -For large-scale installation, it is useful to have +For small-scale installations, use +.Xr hosts 5 ; +For large-scale installations, it is useful to have a DNS server with special address translation support. An implementation called .Nm totd -is available -at -.Pa http://www.vermicelli.pasta.cs.uit.no/ipv6/software.html . -Make sure you do not propagate translated DNS records to normal DNS cloud, -it is highly harmful. +is available at +.Pa http://www.vermicelli.pasta.cs.uit.no/software/totd.html . +Make sure you do not propagate translated DNS records over to normal +DNS, as it can cause severe problems. .Ss Daemon mode When .Nm @@ -150,9 +147,9 @@ to you can run local daemons on the router. The .Nm -utility will invoke local daemon at +utility will invoke a local daemon at .Ar serverpath -if the destination address is local interface address, +if the destination address is a local interface address, and will perform translation to IPv4 TCP in other cases. You can also specify .Ar serverargs @@ -182,7 +179,7 @@ The .Nm utility includes special support for protocols used by .Xr ftp 1 . -When translating FTP protocol, +When translating the FTP protocol, .Nm translates network level addresses in .Li PORT/LPRT/EPRT @@ -191,8 +188,8 @@ and commands. .Pp Inactive sessions will be disconnected in 30 minutes, -to avoid stale sessions from chewing up resources. -This may be inappropriate for some of the services +to prevent stale sessions from chewing up resources. +This may be inappropriate for some services (should this be configurable?). .Ss inetd mode When @@ -200,13 +197,13 @@ When is invoked via .Xr inetd 8 , .Nm -will handle connection passed from standard input. +will handle connections passed from standard input. If the connection endpoint is in the reserved IPv6 address prefix, .Nm will relay the connection. Otherwise, .Nm -will invoke service-specific daemon like +will invoke a service-specific daemon like .Xr telnetd 8 , by using the command argument passed from .Xr inetd 8 . @@ -219,16 +216,16 @@ For example, if .Nm is invoked via .Xr inetd 8 -on FTP port, it will operate as a FTP relay. +on the FTP port, it will operate as an FTP relay. .Pp The operation mode requires special support for .Nm in .Xr inetd 8 . .Ss Access control -To prevent malicious accesses, +To prevent malicious access, .Nm -implements a simple address-based access control. +implements simple address-based access control. With .Pa /etc/faithd.conf (or @@ -239,7 +236,7 @@ specified by will avoid relaying unwanted traffic. The .Pa faithd.conf -contains directives with the following format: +configuration file contains directives of the following format: .Bl -bullet .It .Ar src Ns / Ns Ar slen Cm deny Ar dst Ns / Ns Ar dlen @@ -281,6 +278,7 @@ on error. .Sh EXAMPLES Before invoking .Nm , +the .Xr faith 4 interface has to be configured properly. .Bd -literal -offset @@ -334,12 +332,12 @@ ssh stream tcp6/faith nowait root .Ed .Pp .Xr inetd 8 -will open listening sockets with enabling kernel TCP relay support. -Whenever connection comes in, +will open listening sockets with kernel TCP relay support enabled. +Whenever a connection comes in, .Nm will be invoked by .Xr inetd 8 . -If it the connection endpoint is in the reserved IPv6 address prefix. +If the connection endpoint is in the reserved IPv6 address prefix. The .Nm utility will relay the connection. @@ -377,12 +375,12 @@ setting. .Sh HISTORY The .Nm -utility first appeared in WIDE Hydrangea IPv6 protocol stack kit. +utility first appeared in the WIDE Hydrangea IPv6 protocol stack kit. .\" .Pp IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack was initially integrated into -.Fx 4.0 +.Fx 4.0 . .Sh SECURITY CONSIDERATIONS It is very insecure to use IP-address based authentication, for connections relayed by .Nm , @@ -392,16 +390,15 @@ Administrators are advised to limit acce .Nm using .Pa faithd.conf , -or by using IPv6 packet filters. -It is to protect +or by using IPv6 packet filters, to protect the .Nm -service from malicious parties and avoid theft of service/bandwidth. -IPv6 destination address can be limited by -carefully configuring routing entries that points to +service from malicious parties, and to avoid theft of service/bandwidth. +IPv6 destination addresses can be limited by +carefully configuring routing entries that point to .Xr faith 4 , using .Xr route 8 . -IPv6 source address needs to be filtered by using packet filters. -Documents listed in +The IPv6 source address needs to be filtered using packet filters. +The documents listed in .Sx SEE ALSO -have more discussions on this topic. +have more information on this topic. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:41:44 2010 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 0E9681065696; Sun, 17 Jan 2010 17:41:44 +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 F18918FC12; Sun, 17 Jan 2010 17:41:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHfhGO096922; Sun, 17 Jan 2010 17:41:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHfhdk096920; Sun, 17 Jan 2010 17:41:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171741.o0HHfhdk096920@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 17:41:43 +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: r202496 - stable/8/sys/netinet 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, 17 Jan 2010 17:41:44 -0000 Author: tuexen Date: Sun Jan 17 17:41:43 2010 New Revision: 202496 URL: http://svn.freebsd.org/changeset/base/202496 Log: MFC 197341 Fix errnos. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:40:31 2010 (r202495) +++ stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:41:43 2010 (r202496) @@ -5602,8 +5602,6 @@ sctp_insert_on_wheel(struct sctp_tcb *st struct sctp_association *asoc, struct sctp_stream_out *strq, int holds_lock) { - struct sctp_stream_out *stre, *strn; - if (holds_lock == 0) { SCTP_TCB_SEND_LOCK(stcb); } @@ -5612,26 +5610,7 @@ sctp_insert_on_wheel(struct sctp_tcb *st /* already on wheel */ goto outof_here; } - stre = TAILQ_FIRST(&asoc->out_wheel); - if (stre == NULL) { - /* only one on wheel */ - TAILQ_INSERT_HEAD(&asoc->out_wheel, strq, next_spoke); - goto outof_here; - } - for (; stre; stre = strn) { - strn = TAILQ_NEXT(stre, next_spoke); - if (stre->stream_no > strq->stream_no) { - TAILQ_INSERT_BEFORE(stre, strq, next_spoke); - goto outof_here; - } else if (stre->stream_no == strq->stream_no) { - /* huh, should not happen */ - goto outof_here; - } else if (strn == NULL) { - /* next one is null */ - TAILQ_INSERT_AFTER(&asoc->out_wheel, stre, strq, - next_spoke); - } - } + TAILQ_INSERT_TAIL(&asoc->out_wheel, strq, next_spoke); outof_here: if (holds_lock == 0) { SCTP_TCB_SEND_UNLOCK(stcb); @@ -7197,8 +7176,6 @@ sctp_select_a_stream(struct sctp_tcb *st strq = TAILQ_FIRST(&asoc->out_wheel); } } - /* Save off the last stream */ - asoc->last_out_stream = strq; return (strq); } @@ -7274,7 +7251,9 @@ sctp_fill_outqueue(struct sctp_tcb *stcb bail = 0; moved_how_much = sctp_move_to_outqueue(stcb, net, strq, goal_mtu, frag_point, &locked, &giveup, eeor_mode, &bail); - asoc->last_out_stream = strq; + if (moved_how_much) + asoc->last_out_stream = strq; + if (locked) { asoc->locked_on_sending = strq; if ((moved_how_much == 0) || (giveup) || bail) From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:43:35 2010 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 61DEB106566C; Sun, 17 Jan 2010 17:43:35 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id BD5278FC0A; Sun, 17 Jan 2010 17:43:34 +0000 (UTC) Received: from [IPv6:2002:508f:f5eb::224:36ff:feef:67d1] (unknown [IPv6:2002:508f:f5eb:0:224:36ff:feef:67d1]) by mail-n.franken.de (Postfix) with ESMTP id 706241C0C0BC5; Sun, 17 Jan 2010 18:43:33 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <201001171741.o0HHfhdk096920@svn.freebsd.org> Date: Sun, 17 Jan 2010 18:43:32 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201001171741.o0HHfhdk096920@svn.freebsd.org> To: Michael Tuexen X-Mailer: Apple Mail (2.1077) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r202496 - stable/8/sys/netinet 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, 17 Jan 2010 17:43:35 -0000 Actually a wrong commit message: Should have been: MFC 197856 Fix so that round robing stream scheduling works as advertised Best regards Michael On Jan 17, 2010, at 6:41 PM, Michael Tuexen wrote: > Author: tuexen > Date: Sun Jan 17 17:41:43 2010 > New Revision: 202496 > URL: http://svn.freebsd.org/changeset/base/202496 >=20 > Log: > MFC 197341 >=20 > Fix errnos. >=20 > Modified: > stable/8/sys/netinet/sctp_output.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > stable/8/sys/dev/xen/xenpci/ (props changed) >=20 > Modified: stable/8/sys/netinet/sctp_output.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:40:31 2010 = (r202495) > +++ stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:41:43 2010 = (r202496) > @@ -5602,8 +5602,6 @@ sctp_insert_on_wheel(struct sctp_tcb *st > struct sctp_association *asoc, > struct sctp_stream_out *strq, int holds_lock) > { > - struct sctp_stream_out *stre, *strn; > - > if (holds_lock =3D=3D 0) { > SCTP_TCB_SEND_LOCK(stcb); > } > @@ -5612,26 +5610,7 @@ sctp_insert_on_wheel(struct sctp_tcb *st > /* already on wheel */ > goto outof_here; > } > - stre =3D TAILQ_FIRST(&asoc->out_wheel); > - if (stre =3D=3D NULL) { > - /* only one on wheel */ > - TAILQ_INSERT_HEAD(&asoc->out_wheel, strq, next_spoke); > - goto outof_here; > - } > - for (; stre; stre =3D strn) { > - strn =3D TAILQ_NEXT(stre, next_spoke); > - if (stre->stream_no > strq->stream_no) { > - TAILQ_INSERT_BEFORE(stre, strq, next_spoke); > - goto outof_here; > - } else if (stre->stream_no =3D=3D strq->stream_no) { > - /* huh, should not happen */ > - goto outof_here; > - } else if (strn =3D=3D NULL) { > - /* next one is null */ > - TAILQ_INSERT_AFTER(&asoc->out_wheel, stre, strq, > - next_spoke); > - } > - } > + TAILQ_INSERT_TAIL(&asoc->out_wheel, strq, next_spoke); > outof_here: > if (holds_lock =3D=3D 0) { > SCTP_TCB_SEND_UNLOCK(stcb); > @@ -7197,8 +7176,6 @@ sctp_select_a_stream(struct sctp_tcb *st > strq =3D TAILQ_FIRST(&asoc->out_wheel); > } > } > - /* Save off the last stream */ > - asoc->last_out_stream =3D strq; > return (strq); > } >=20 > @@ -7274,7 +7251,9 @@ sctp_fill_outqueue(struct sctp_tcb *stcb > bail =3D 0; > moved_how_much =3D sctp_move_to_outqueue(stcb, net, = strq, goal_mtu, frag_point, &locked, > &giveup, eeor_mode, &bail); > - asoc->last_out_stream =3D strq; > + if (moved_how_much) > + asoc->last_out_stream =3D strq; > + > if (locked) { > asoc->locked_on_sending =3D strq; > if ((moved_how_much =3D=3D 0) || (giveup) || = bail) >=20 From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:45:09 2010 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 D27CC10656AA; Sun, 17 Jan 2010 17:45:09 +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 C187A8FC1D; Sun, 17 Jan 2010 17:45:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHj9kZ097788; Sun, 17 Jan 2010 17:45:09 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHj97X097786; Sun, 17 Jan 2010 17:45:09 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171745.o0HHj97X097786@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 17:45: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: r202497 - stable/8/sys/netinet 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, 17 Jan 2010 17:45:09 -0000 Author: tuexen Date: Sun Jan 17 17:45:09 2010 New Revision: 202497 URL: http://svn.freebsd.org/changeset/base/202497 Log: MFC 198621 Improve round robin stream scheduler and cleanup some code. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:41:43 2010 (r202496) +++ stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:45:09 2010 (r202497) @@ -5605,13 +5605,10 @@ sctp_insert_on_wheel(struct sctp_tcb *st if (holds_lock == 0) { SCTP_TCB_SEND_LOCK(stcb); } - if ((strq->next_spoke.tqe_next) || - (strq->next_spoke.tqe_prev)) { - /* already on wheel */ - goto outof_here; + if ((strq->next_spoke.tqe_next == NULL) && + (strq->next_spoke.tqe_prev == NULL)) { + TAILQ_INSERT_TAIL(&asoc->out_wheel, strq, next_spoke); } - TAILQ_INSERT_TAIL(&asoc->out_wheel, strq, next_spoke); -outof_here: if (holds_lock == 0) { SCTP_TCB_SEND_UNLOCK(stcb); } @@ -5624,19 +5621,26 @@ sctp_remove_from_wheel(struct sctp_tcb * int holds_lock) { /* take off and then setup so we know it is not on the wheel */ - if (holds_lock == 0) + if (holds_lock == 0) { SCTP_TCB_SEND_LOCK(stcb); - if (TAILQ_FIRST(&strq->outqueue)) { - /* more was added */ - if (holds_lock == 0) - SCTP_TCB_SEND_UNLOCK(stcb); - return; } - TAILQ_REMOVE(&asoc->out_wheel, strq, next_spoke); - strq->next_spoke.tqe_next = NULL; - strq->next_spoke.tqe_prev = NULL; - if (holds_lock == 0) + if (TAILQ_EMPTY(&strq->outqueue)) { + if (asoc->last_out_stream == strq) { + asoc->last_out_stream = TAILQ_PREV(asoc->last_out_stream, sctpwheel_listhead, next_spoke); + if (asoc->last_out_stream == NULL) { + asoc->last_out_stream = TAILQ_LAST(&asoc->out_wheel, sctpwheel_listhead); + } + if (asoc->last_out_stream == strq) { + asoc->last_out_stream = NULL; + } + } + TAILQ_REMOVE(&asoc->out_wheel, strq, next_spoke); + strq->next_spoke.tqe_next = NULL; + strq->next_spoke.tqe_prev = NULL; + } + if (holds_lock == 0) { SCTP_TCB_SEND_UNLOCK(stcb); + } } static void @@ -7185,7 +7189,7 @@ sctp_fill_outqueue(struct sctp_tcb *stcb struct sctp_nets *net, int frag_point, int eeor_mode, int *quit_now) { struct sctp_association *asoc; - struct sctp_stream_out *strq, *strqn, *strqt; + struct sctp_stream_out *strq, *strqn; int goal_mtu, moved_how_much, total_moved = 0, bail = 0; int locked, giveup; struct sctp_stream_queue_pending *sp; @@ -7261,11 +7265,10 @@ sctp_fill_outqueue(struct sctp_tcb *stcb break; } else { asoc->locked_on_sending = NULL; - strqt = sctp_select_a_stream(stcb, asoc); - if (TAILQ_FIRST(&strq->outqueue) == NULL) { + if (TAILQ_EMPTY(&strq->outqueue)) { if (strq == strqn) { /* Must move start to next one */ - strqn = TAILQ_NEXT(asoc->last_out_stream, next_spoke); + strqn = TAILQ_NEXT(strq, next_spoke); if (strqn == NULL) { strqn = TAILQ_FIRST(&asoc->out_wheel); if (strqn == NULL) { @@ -7278,7 +7281,7 @@ sctp_fill_outqueue(struct sctp_tcb *stcb if ((giveup) || bail) { break; } - strq = strqt; + strq = sctp_select_a_stream(stcb, asoc); if (strq == NULL) { break; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:46:49 2010 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 421C61065672; Sun, 17 Jan 2010 17:46:49 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3132B8FC0C; Sun, 17 Jan 2010 17:46:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHknal098218; Sun, 17 Jan 2010 17:46:49 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHknnL098216; Sun, 17 Jan 2010 17:46:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171746.o0HHknnL098216@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 17:46:49 +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: r202498 - stable/8/sys/netinet 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, 17 Jan 2010 17:46:49 -0000 Author: tuexen Date: Sun Jan 17 17:46:48 2010 New Revision: 202498 URL: http://svn.freebsd.org/changeset/base/202498 Log: MFC 199374 Fix a bug where queued ASCONF messags are not sent out. From Irene Ruengeler. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:45:09 2010 (r202497) +++ stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:46:48 2010 (r202498) @@ -9442,6 +9442,7 @@ sctp_chunk_output(struct sctp_inpcb *inp if ((un_sent <= 0) && (TAILQ_EMPTY(&asoc->control_send_queue)) && + (TAILQ_EMPTY(&asoc->asconf_send_queue)) && (asoc->sent_queue_retran_cnt == 0)) { /* Nothing to do unless there is something to be sent left */ return; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:49:29 2010 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 3A919106566B; Sun, 17 Jan 2010 17:49:29 +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 296CC8FC0A; Sun, 17 Jan 2010 17:49:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHnTRJ098897; Sun, 17 Jan 2010 17:49:29 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHnS6S098863; Sun, 17 Jan 2010 17:49:28 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171749.o0HHnS6S098863@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 17:49:28 +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: r202499 - stable/8/sys/netinet 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, 17 Jan 2010 17:49:29 -0000 Author: tuexen Date: Sun Jan 17 17:49:28 2010 New Revision: 202499 URL: http://svn.freebsd.org/changeset/base/202499 Log: MFC 199459 Get rid of unused fields addr_over which is never really used, only copied around. Modified: stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_structs.h stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:46:48 2010 (r202498) +++ stable/8/sys/netinet/sctp_output.c Sun Jan 17 17:49:28 2010 (r202499) @@ -5875,10 +5875,8 @@ sctp_msg_append(struct sctp_tcb *stcb, sp->strseq = 0; if (sp->sinfo_flags & SCTP_ADDR_OVER) { sp->net = net; - sp->addr_over = 1; } else { sp->net = stcb->asoc.primary_destination; - sp->addr_over = 0; } atomic_add_int(&sp->net->ref_count, 1); (void)SCTP_GETTIME_TIMEVAL(&sp->ts); @@ -7052,7 +7050,6 @@ dont_do_it: chk->rec.data.timetodrop = sp->ts; chk->flags = sp->act_flags; - chk->addr_over = sp->addr_over; chk->whoTo = net; atomic_add_int(&chk->whoTo->ref_count, 1); @@ -12252,10 +12249,8 @@ skip_copy: } else { if (sp->sinfo_flags & SCTP_ADDR_OVER) { sp->net = net; - sp->addr_over = 1; } else { sp->net = asoc->primary_destination; - sp->addr_over = 0; } atomic_add_int(&sp->net->ref_count, 1); sctp_set_prsctp_policy(sp); Modified: stable/8/sys/netinet/sctp_structs.h ============================================================================== --- stable/8/sys/netinet/sctp_structs.h Sun Jan 17 17:46:48 2010 (r202498) +++ stable/8/sys/netinet/sctp_structs.h Sun Jan 17 17:49:28 2010 (r202499) @@ -364,9 +364,6 @@ struct sctp_tmit_chunk { uint8_t pad_inplace; uint8_t do_rtt; uint8_t book_size_scale; - uint8_t addr_over; /* flag which is set if the dest address for - * this chunk is overridden by user. Used for - * CMT (iyengar@cis.udel.edu, 2005/06/21) */ uint8_t no_fr_allowed; uint8_t pr_sctp_on; uint8_t copy_by_ref; @@ -444,7 +441,6 @@ struct sctp_stream_queue_pending { uint8_t holds_key_ref; uint8_t msg_is_complete; uint8_t some_taken; - uint8_t addr_over; uint8_t pr_sctp_on; uint8_t sender_all_done; uint8_t put_last_out; Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sun Jan 17 17:46:48 2010 (r202498) +++ stable/8/sys/netinet/sctputil.c Sun Jan 17 17:49:28 2010 (r202499) @@ -4791,7 +4791,6 @@ next_on_sent: chk->rec.data.payloadtype = sp->ppid; chk->rec.data.context = sp->context; chk->flags = sp->act_flags; - chk->addr_over = sp->addr_over; chk->whoTo = sp->net; atomic_add_int(&chk->whoTo->ref_count, 1); chk->rec.data.TSN_seq = atomic_fetchadd_int(&stcb->asoc.sending_seq, 1); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 17:52:35 2010 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 EF576106566C; Sun, 17 Jan 2010 17:52:35 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF8998FC16; Sun, 17 Jan 2010 17:52:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHqZpU099662; Sun, 17 Jan 2010 17:52:35 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHqZPU099660; Sun, 17 Jan 2010 17:52:35 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001171752.o0HHqZPU099660@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 17:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202500 - head/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, 17 Jan 2010 17:52:36 -0000 Author: ed Date: Sun Jan 17 17:52:35 2010 New Revision: 202500 URL: http://svn.freebsd.org/changeset/base/202500 Log: Fix a regression that was introduced in r191882. I changed login_tty() to only work when the application is not a session leader yet. This works fine for applications in the base system, but it turns out various applications call this function after daemonizing, which means they already use their own session. If setsid() fails, just call tcsetsid() on the current session. tcsetsid() will already perform proper security checks. Reported by: Oliver Lehmann MFC after: 1 week Modified: head/lib/libutil/login_tty.c Modified: head/lib/libutil/login_tty.c ============================================================================== --- head/lib/libutil/login_tty.c Sun Jan 17 17:49:28 2010 (r202499) +++ head/lib/libutil/login_tty.c Sun Jan 17 17:52:35 2010 (r202500) @@ -50,7 +50,7 @@ login_tty(int fd) s = setsid(); if (s == -1) - return (-1); + s = getsid(0); if (tcsetsid(fd, s) == -1) return (-1); (void) dup2(fd, 0); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:17:00 2010 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 B5E25106566B; Sun, 17 Jan 2010 18:17:00 +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 A52F68FC13; Sun, 17 Jan 2010 18:17:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIH03t005743; Sun, 17 Jan 2010 18:17:00 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIH0Tl005741; Sun, 17 Jan 2010 18:17:00 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001171817.o0HIH0Tl005741@svn.freebsd.org> From: Christian Brueffer Date: Sun, 17 Jan 2010 18:17:00 +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: r202501 - stable/8 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, 17 Jan 2010 18:17:00 -0000 Author: brueffer Date: Sun Jan 17 18:17:00 2010 New Revision: 202501 URL: http://svn.freebsd.org/changeset/base/202501 Log: MFC: r197056 by des Fix comment about KERNFAST. PR: 142854 Submitted by: Nikolay Denev Modified: stable/8/Makefile.inc1 Directory Properties: stable/8/ (props changed) Modified: stable/8/Makefile.inc1 ============================================================================== --- stable/8/Makefile.inc1 Sun Jan 17 17:52:35 2010 (r202500) +++ stable/8/Makefile.inc1 Sun Jan 17 18:17:00 2010 (r202501) @@ -5,7 +5,7 @@ # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir # -DNO_CLEAN do not clean at all # -DNO_SHARE do not go into share subdir -# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELCONFIG +# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELDEPEND # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel # -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:18:02 2010 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 1EA30106566C; Sun, 17 Jan 2010 18:18:02 +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 0E1898FC13; Sun, 17 Jan 2010 18:18:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HII1Vr006061; Sun, 17 Jan 2010 18:18:01 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HII1wY006059; Sun, 17 Jan 2010 18:18:01 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001171818.o0HII1wY006059@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 18:18:01 +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: r202502 - stable/8/sys/netinet 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, 17 Jan 2010 18:18:02 -0000 Author: tuexen Date: Sun Jan 17 18:18:01 2010 New Revision: 202502 URL: http://svn.freebsd.org/changeset/base/202502 Log: MFC 201523 Correct usage of parenthesis. Modified: stable/8/sys/netinet/sctp_pcb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sun Jan 17 18:17:00 2010 (r202501) +++ stable/8/sys/netinet/sctp_pcb.c Sun Jan 17 18:18:01 2010 (r202502) @@ -5528,7 +5528,7 @@ sctp_pcb_init() /* Init the TIMEWAIT list */ for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { - LIST_INIT(&SCTP_BASE_INFO(vtag_timewait[i])); + LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } #if defined(SCTP_USE_THREAD_BASED_ITERATOR) @@ -6385,7 +6385,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp } skip_vtag_check: - chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))]; + chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; /* Now what about timed wait ? */ if (!LIST_EMPTY(chain)) { /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:22:42 2010 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 8DC08106568F; Sun, 17 Jan 2010 18:22:42 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79DC38FC12; Sun, 17 Jan 2010 18:22:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIMgqh007228; Sun, 17 Jan 2010 18:22:42 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIMgRl007217; Sun, 17 Jan 2010 18:22:42 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171822.o0HIMgRl007217@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:22:42 +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: r202503 - in stable/8: share/man/man4 sys/conf sys/dev/usb sys/dev/usb/net sys/modules/usb/uhso usr.sbin usr.sbin/uhsoctl 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, 17 Jan 2010 18:22:42 -0000 Author: thompsa Date: Sun Jan 17 18:22:42 2010 New Revision: 202503 URL: http://svn.freebsd.org/changeset/base/202503 Log: MFC r202181,202243,202270 Add a driver by Fredrik Lindberg for Option HSDPA USB devices. These differ from standard 3G wireless units by supplying a raw IP/IPv6 endpoint rather than using PPP over serial. uhsoctl(1) is used to initiate and close the WAN connection. Obtained from: Fredrik Lindberg Added: stable/8/share/man/man4/uhso.4 - copied, changed from r202181, head/share/man/man4/uhso.4 stable/8/sys/dev/usb/net/uhso.c - copied, changed from r202181, head/sys/dev/usb/net/uhso.c stable/8/sys/modules/usb/uhso/ - copied from r202181, head/sys/modules/usb/uhso/ stable/8/usr.sbin/uhsoctl/ stable/8/usr.sbin/uhsoctl/Makefile (contents, props changed) stable/8/usr.sbin/uhsoctl/uhsoctl.1 (contents, props changed) stable/8/usr.sbin/uhsoctl/uhsoctl.c (contents, props changed) Modified: stable/8/share/man/man4/Makefile stable/8/sys/conf/NOTES stable/8/sys/conf/files stable/8/sys/dev/usb/usbdevs stable/8/usr.sbin/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Sun Jan 17 18:18:01 2010 (r202502) +++ stable/8/share/man/man4/Makefile Sun Jan 17 18:22:42 2010 (r202503) @@ -421,6 +421,7 @@ MAN= aac.4 \ ugen.4 \ uhci.4 \ uhid.4 \ + uhso.4 \ uipaq.4 \ ukbd.4 \ ulpt.4 \ Copied and modified: stable/8/share/man/man4/uhso.4 (from r202181, head/share/man/man4/uhso.4) ============================================================================== --- head/share/man/man4/uhso.4 Wed Jan 13 03:16:31 2010 (r202181, copy source) +++ stable/8/share/man/man4/uhso.4 Sun Jan 17 18:22:42 2010 (r202503) @@ -23,11 +23,11 @@ .\" .\" $FreeBSD$ .\" -.Dd Aug 12, 2009 +.Dd January 14, 2010 .Os .Dt UHSO 4 .Sh NAME -.Nm hso +.Nm uhso .Nd support for several HSxPA devices from Option N.V. .Sh SYNOPSIS The module can be loaded at boot time by placing the following line in @@ -47,12 +47,12 @@ driver which makes them behave like a .Xr tty 4 . The packet interface is exposed as a network interface. .Pp -To establish a connection on the packet interface the use of the proprietary -AT commands +Establishing a connection on the packet interface is achieved by using the +proprietary AT commands .Dq Li AT_OWANCALL and .Dq Li AT_OWANDATA -are required on any of the serial ports. +on any of the available serial ports. .Pp The network interface must be configured manually using the data obtain from these calls. @@ -70,12 +70,23 @@ driver supports at least the following c Option GlobeSurfer iCON 7.2 (new firmware) .It Option iCON 225 +.It +Option iCON 505 .El .Pp The device features a mass storage device referred to as .Dq Zero-CD -which contains drivers for Microsoft Windows. -The driver automatically switches the device to modem mode. +which contains drivers for Microsoft Windows; this is the default +mode for the device. +The +.Nm +driver automatically switches the device from +.Dq Zero-CD +mode to modem mode. +This behavior can be disabled by setting +.Va hw.usb.uhso.auto_switch +to 0 using +.Xr sysctl 8 .Sh EXAMPLES Establishing a packet interface connection .Bd -literal -offset indent Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Sun Jan 17 18:18:01 2010 (r202502) +++ stable/8/sys/conf/NOTES Sun Jan 17 18:22:42 2010 (r202503) @@ -2589,6 +2589,9 @@ device rue # # Davicom DM9601E USB to fast ethernet. Supports the Corega FEther USB-TXC. device udav +# +# HSxPA devices from Option N.V +device uhso # # Ralink Technology RT2501USB/RT2601USB wireless driver Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sun Jan 17 18:18:01 2010 (r202502) +++ stable/8/sys/conf/files Sun Jan 17 18:22:42 2010 (r202503) @@ -1615,7 +1615,7 @@ dev/usb/usb_request.c optional usb dev/usb/usb_transfer.c optional usb dev/usb/usb_util.c optional usb # -# USB ethernet drivers +# USB network drivers # dev/usb/net/if_aue.c optional aue dev/usb/net/if_axe.c optional axe @@ -1626,6 +1626,7 @@ dev/usb/net/if_rue.c optional rue dev/usb/net/if_udav.c optional udav dev/usb/net/usb_ethernet.c optional aue | axe | cdce | cue | kue | rue | \ udav +dev/usb/net/uhso.c optional uhso # # USB WLAN drivers # Copied and modified: stable/8/sys/dev/usb/net/uhso.c (from r202181, head/sys/dev/usb/net/uhso.c) ============================================================================== --- head/sys/dev/usb/net/uhso.c Wed Jan 13 03:16:31 2010 (r202181, copy source) +++ stable/8/sys/dev/usb/net/uhso.c Sun Jan 17 18:22:42 2010 (r202503) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Fredrik Lindberg + * Copyright (c) 2009 Fredrik Lindberg * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,13 +63,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include struct uhso_tty { struct uhso_softc *ht_sc; struct usb_xfer *ht_xfer[3]; - int ht_muxport; + int ht_muxport; /* Mux. port no */ int ht_open; char ht_name[32]; }; @@ -78,7 +80,7 @@ struct uhso_softc { device_t sc_dev; struct usb_device *sc_udev; struct mtx sc_mtx; - uint32_t sc_type; + uint32_t sc_type; /* Interface definition */ struct usb_xfer *sc_xfer[3]; uint8_t sc_iface_no; @@ -91,14 +93,14 @@ struct uhso_softc { /* Network */ struct usb_xfer *sc_if_xfer[2]; struct ifnet *sc_ifp; - struct mbuf *sc_mwait; /* partial packet */ - size_t sc_waitlen; /* no. of outstanding bytes */ + struct mbuf *sc_mwait; /* Partial packet */ + size_t sc_waitlen; /* No. of outstanding bytes */ struct ifqueue sc_rxq; struct callout sc_c; /* TTY related structures */ struct ucom_super_softc sc_super_ucom; - int sc_ttys; + int sc_ttys; struct uhso_tty *sc_tty; struct ucom_softc *sc_ucom; int sc_msr; @@ -106,7 +108,6 @@ struct uhso_softc { int sc_line; }; - #define UHSO_MAX_MTU 2048 /* @@ -135,7 +136,7 @@ struct uhso_softc { * Port types */ #define UHSO_PORT_UNKNOWN 0x00 -#define UHSO_PORT_SERIAL 0x01 /* Serial port */ +#define UHSO_PORT_SERIAL 0x01 /* Serial port */ #define UHSO_PORT_NETWORK 0x02 /* Network packet interface */ /* @@ -145,12 +146,14 @@ struct uhso_softc { #define UHSO_MPORT_TYPE_APP 0x01 /* Application */ #define UHSO_MPORT_TYPE_PCSC 0x02 #define UHSO_MPORT_TYPE_GPS 0x03 -#define UHSO_MPORT_TYPE_APP2 0x04 +#define UHSO_MPORT_TYPE_APP2 0x04 /* Secondary application */ #define UHSO_MPORT_TYPE_MAX UHSO_MPORT_TYPE_APP2 #define UHSO_MPORT_TYPE_NOMAX 8 /* Max number of mux ports */ /* * Port definitions + * Note that these definitions are arbitrary and do not match the values + * returned by the auto config descriptor. */ #define UHSO_PORT_TYPE_CTL 0x01 #define UHSO_PORT_TYPE_APP 0x02 @@ -176,8 +179,12 @@ static char *uhso_port[] = { "Network/Serial" }; -/* Map between interface port type read from device and description type */ -static char uhso_port_map[] = { +/* + * Map between interface port type read from device and description type. + * The position in this array is a direct map to the auto config + * descriptor values. + */ +static unsigned char uhso_port_map[] = { 0, UHSO_PORT_TYPE_DIAG, UHSO_PORT_TYPE_GPS, @@ -193,7 +200,7 @@ static char uhso_port_map[] = { }; static char uhso_port_map_max = sizeof(uhso_port_map) / sizeof(char); -static char uhso_mux_port_map[] = { +static unsigned char uhso_mux_port_map[] = { UHSO_PORT_TYPE_CTL, UHSO_PORT_TYPE_APP, UHSO_PORT_TYPE_PCSC, @@ -202,7 +209,7 @@ static char uhso_mux_port_map[] = { }; static char *uhso_port_type[] = { - "Unknown", + "Unknown", /* Not a valid port */ "Control", "Application", "Application (Secondary)", @@ -233,7 +240,6 @@ static char *uhso_port_type_sysctl[] = { "voice", }; - #define UHSO_STATIC_IFACE 0x01 #define UHSO_AUTO_IFACE 0x02 @@ -263,11 +269,16 @@ static const struct usb_device_id uhso_d /* Option iCON 321 */ UHSO_DEV(OPTION, ICON321, UHSO_STATIC_IFACE), /* Option iCON 322 */ - UHSO_DEV(OPTION, GTICON322, UHSO_STATIC_IFACE) + UHSO_DEV(OPTION, GTICON322, UHSO_STATIC_IFACE), + /* Option iCON 505 */ + UHSO_DEV(OPTION, ICON505, UHSO_AUTO_IFACE), #undef UHSO_DEV }; SYSCTL_NODE(_hw_usb, OID_AUTO, uhso, CTLFLAG_RW, 0, "USB uhso"); +static int uhso_autoswitch = 1; +SYSCTL_INT(_hw_usb_uhso, OID_AUTO, auto_switch, CTLFLAG_RW, + &uhso_autoswitch, 0, "Automatically switch to modem mode"); #ifdef USB_DEBUG #ifdef UHSO_DEBUG @@ -335,6 +346,7 @@ static usb_callback_t uhso_bs_intr_callb static usb_callback_t uhso_ifnet_read_callback; static usb_callback_t uhso_ifnet_write_callback; +/* Config used for the default control pipes */ static const struct usb_config uhso_ctrl_config[UHSO_CTRL_MAX] = { [UHSO_CTRL_READ] = { .type = UE_CONTROL, @@ -356,6 +368,7 @@ static const struct usb_config uhso_ctrl } }; +/* Config for the multiplexed serial ports */ static const struct usb_config uhso_mux_config[UHSO_MUX_ENDPT_MAX] = { [UHSO_MUX_ENDPT_INTR] = { .type = UE_INTERRUPT, @@ -367,6 +380,7 @@ static const struct usb_config uhso_mux_ } }; +/* Config for the raw IP-packet interface */ static const struct usb_config uhso_ifnet_config[UHSO_IFNET_MAX] = { [UHSO_IFNET_READ] = { .type = UE_BULK, @@ -387,6 +401,7 @@ static const struct usb_config uhso_ifne } }; +/* Config for interfaces with normal bulk serial ports */ static const struct usb_config uhso_bs_config[UHSO_BULK_ENDPT_MAX] = { [UHSO_BULK_ENDPT_READ] = { .type = UE_BULK, @@ -416,20 +431,19 @@ static const struct usb_config uhso_bs_c } }; -static int uhso_probe_iface(struct uhso_softc *, int, +static int uhso_probe_iface(struct uhso_softc *, int, int (*probe)(struct uhso_softc *, int)); -static int uhso_probe_iface_auto(struct uhso_softc *, int); -static int uhso_probe_iface_static(struct uhso_softc *, int); - -static int uhso_attach_muxserial(struct uhso_softc *, struct usb_interface *, +static int uhso_probe_iface_auto(struct uhso_softc *, int); +static int uhso_probe_iface_static(struct uhso_softc *, int); +static int uhso_attach_muxserial(struct uhso_softc *, struct usb_interface *, int type); -static int uhso_attach_bulkserial(struct uhso_softc *, struct usb_interface *, +static int uhso_attach_bulkserial(struct uhso_softc *, struct usb_interface *, int type); -static int uhso_attach_ifnet(struct uhso_softc *, struct usb_interface *, +static int uhso_attach_ifnet(struct uhso_softc *, struct usb_interface *, int type); static void uhso_test_autoinst(void *, struct usb_device *, struct usb_attach_arg *); -static int uhso_driver_loaded(struct module *, int, void *); +static int uhso_driver_loaded(struct module *, int, void *); static void uhso_ucom_start_read(struct ucom_softc *); static void uhso_ucom_stop_read(struct ucom_softc *); @@ -438,12 +452,11 @@ static void uhso_ucom_stop_write(struct static void uhso_ucom_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); static void uhso_ucom_cfg_set_dtr(struct ucom_softc *, uint8_t); static void uhso_ucom_cfg_set_rts(struct ucom_softc *, uint8_t); - static void uhso_if_init(void *); static void uhso_if_start(struct ifnet *); static void uhso_if_stop(struct uhso_softc *); -static int uhso_if_ioctl(struct ifnet *, u_long, caddr_t); -static int uhso_if_output(struct ifnet *, struct mbuf *, struct sockaddr *, +static int uhso_if_ioctl(struct ifnet *, u_long, caddr_t); +static int uhso_if_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct route *); static void uhso_if_rxflush(void *); @@ -512,11 +525,6 @@ uhso_attach(device_t self) usb_error_t uerr; char *desc; - device_set_usb_desc(self); - - UHSO_DPRINTF(0, "Device is in modem mode, devClass=%x\n", - uaa->device->ddesc.bDeviceClass); - sc->sc_dev = self; sc->sc_udev = uaa->device; mtx_init(&sc->sc_mtx, "uhso", NULL, MTX_DEF); @@ -552,7 +560,6 @@ uhso_attach(device_t self) if (error != 0) goto out; - sctx = device_get_sysctl_ctx(sc->sc_dev); soid = device_get_sysctl_tree(sc->sc_dev); @@ -560,6 +567,18 @@ uhso_attach(device_t self) CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0, "Port available at this interface"); + /* + * The default interface description on most Option devices isn't + * very helpful. So we skip device_set_usb_desc and set the + * device description manually. + */ + device_set_desc_copy(self, uhso_port_type[UHSO_IFACE_PORT_TYPE(sc->sc_type)]); + /* Announce device */ + device_printf(self, "<%s port> at <%s %s> on %s\n", + uhso_port_type[UHSO_IFACE_PORT_TYPE(sc->sc_type)], + uaa->device->manufacturer, uaa->device->product, + device_get_nameunit(uaa->device->bus->bdev)); + if (sc->sc_ttys > 0) { SYSCTL_ADD_INT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "ports", CTLFLAG_RD, &sc->sc_ttys, 0, "Number of attached serial ports"); @@ -568,11 +587,14 @@ uhso_attach(device_t self) "port", CTLFLAG_RD, NULL, "Serial ports"); } + /* + * Loop through the number of found TTYs and create sysctl + * nodes for them. + */ for (i = 0; i < sc->sc_ttys; i++) { ht = &sc->sc_tty[i]; ucom = &sc->sc_ucom[i]; - if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_MUX) port = uhso_mux_port_map[ht->ht_muxport]; else @@ -607,7 +629,6 @@ uhso_attach(device_t self) out: uhso_detach(sc->sc_dev); return (ENXIO); - } static int @@ -633,21 +654,17 @@ uhso_detach(device_t self) } if (sc->sc_ifp != NULL) { - callout_drain(&sc->sc_c); - mtx_lock(&sc->sc_mtx); uhso_if_stop(sc); bpfdetach(sc->sc_ifp); if_detach(sc->sc_ifp); if_free(sc->sc_ifp); mtx_unlock(&sc->sc_mtx); - usbd_transfer_unsetup(sc->sc_if_xfer, UHSO_IFNET_MAX); } mtx_destroy(&sc->sc_mtx); - return (0); } @@ -658,7 +675,7 @@ uhso_test_autoinst(void *arg, struct usb struct usb_interface *iface; struct usb_interface_descriptor *id; - if (uaa->dev_state != UAA_DEV_READY) + if (uaa->dev_state != UAA_DEV_READY || !uhso_autoswitch) return; iface = usbd_get_iface(udev, 0); @@ -694,7 +711,13 @@ uhso_driver_loaded(struct module *mod, i return (0); } -static int uhso_probe_iface_auto(struct uhso_softc *sc, int index) +/* + * Probe the interface type by querying the device. The elements + * of an array indicates the capabilities of a particular interface. + * Returns a bit mask with the interface capabilities. + */ +static int +uhso_probe_iface_auto(struct uhso_softc *sc, int index) { struct usb_device_request req; usb_error_t uerr; @@ -716,7 +739,7 @@ static int uhso_probe_iface_auto(struct return (0); } - UHSO_DPRINTF(3, "actlen=%d\n", actlen); + UHSO_DPRINTF(1, "actlen=%d\n", actlen); UHSO_HEXDUMP(buf, 17); if (index < 0 || index > 16) { @@ -724,21 +747,25 @@ static int uhso_probe_iface_auto(struct return (0); } - UHSO_DPRINTF(3, "index=%d, type=%x\n", index, buf[index]); + UHSO_DPRINTF(1, "index=%d, type=%x[%s]\n", index, buf[index], + uhso_port_type[(int)uhso_port_map[(int)buf[index]]]); if (buf[index] >= uhso_port_map_max) port = 0; else port = uhso_port_map[(int)buf[index]]; - if (port == UHSO_PORT_TYPE_NETWORK) - return (UHSO_IFACE_SPEC(UHSO_IF_BULK, - UHSO_PORT_NETWORK, port)); - else if (port == UHSO_PORT_TYPE_VOICE) + switch (port) { + case UHSO_PORT_TYPE_NETWORK: + return (UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, + UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, port)); + case UHSO_PORT_TYPE_VOICE: + /* Don't claim 'voice' ports */ return (0); - else + default: return (UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, port)); + } return (0); } @@ -750,10 +777,12 @@ uhso_probe_iface_static(struct uhso_soft cd = usbd_get_config_descriptor(sc->sc_udev); if (cd->bNumInterface <= 3) { + /* Cards with 3 or less interfaces */ switch (index) { case 0: return UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, - UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, 0); + UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, + UHSO_PORT_TYPE_NETWORK); case 1: return UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG); @@ -761,12 +790,13 @@ uhso_probe_iface_static(struct uhso_soft return UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, UHSO_PORT_TYPE_MODEM); } - } - else { + } else { + /* Cards with 4 interfaces */ switch (index) { case 0: return UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, - UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, 0); + UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, + UHSO_PORT_TYPE_NETWORK); case 1: return UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, UHSO_PORT_TYPE_DIAG2); @@ -781,14 +811,18 @@ uhso_probe_iface_static(struct uhso_soft return (0); } +/* + * Probes an interface for its particular capabilities and attaches if + * it's a supported interface. + */ static int uhso_probe_iface(struct uhso_softc *sc, int index, int (*probe)(struct uhso_softc *, int)) { struct usb_interface *iface; - int type, error, error0; + int type, error; - UHSO_DPRINTF(1, "Probing for interface %d, cb=%p\n", index, probe); + UHSO_DPRINTF(1, "Probing for interface %d, probe_func=%p\n", index, probe); type = probe(sc, index); UHSO_DPRINTF(1, "Probe result %x\n", type); @@ -798,27 +832,41 @@ uhso_probe_iface(struct uhso_softc *sc, sc->sc_type = type; iface = usbd_get_iface(sc->sc_udev, index); - if (UHSO_IFACE_USB_TYPE(type) & (UHSO_IF_MUX | UHSO_IF_NET)) { - error0 = uhso_attach_muxserial(sc, iface, type); + if (UHSO_IFACE_PORT_TYPE(type) == UHSO_PORT_TYPE_NETWORK) { error = uhso_attach_ifnet(sc, iface, type); - - if (error0 && error) + if (error) { + UHSO_DPRINTF(1, "uhso_attach_ifnet failed"); return (ENXIO); + } - if (sc->sc_ttys > 0) { + /* + * If there is an additional interrupt endpoint on this + * interface then we most likely have a multiplexed serial port + * available. + */ + if (iface->idesc->bNumEndpoints < 3) { + sc->sc_type = UHSO_IFACE_SPEC( + UHSO_IFACE_USB_TYPE(type) & ~UHSO_IF_MUX, + UHSO_IFACE_PORT(type) & ~UHSO_PORT_SERIAL, + UHSO_IFACE_PORT_TYPE(type)); + return (0); + } + + UHSO_DPRINTF(1, "Trying to attach mux. serial\n"); + error = uhso_attach_muxserial(sc, iface, type); + if (error == 0 && sc->sc_ttys > 0) { error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_ttys, sc, &uhso_ucom_callback, &sc->sc_mtx); if (error) { device_printf(sc->sc_dev, "ucom_attach failed\n"); return (ENXIO); } - } - mtx_lock(&sc->sc_mtx); - usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); - mtx_unlock(&sc->sc_mtx); - } - else if ((UHSO_IFACE_USB_TYPE(type) & UHSO_IF_BULK) && + mtx_lock(&sc->sc_mtx); + usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); + mtx_unlock(&sc->sc_mtx); + } + } else if ((UHSO_IFACE_USB_TYPE(type) & UHSO_IF_BULK) && UHSO_IFACE_PORT(type) & UHSO_PORT_SERIAL) { error = uhso_attach_bulkserial(sc, iface, type); @@ -833,12 +881,18 @@ uhso_probe_iface(struct uhso_softc *sc, } } else { + UHSO_DPRINTF(0, "Unknown type %x\n", type); return (ENXIO); } return (0); } +/* + * Expands allocated memory to fit an additional TTY. + * Two arrays are kept with matching indexes, one for ucom and one + * for our private data. + */ static int uhso_alloc_tty(struct uhso_softc *sc) { @@ -856,11 +910,15 @@ uhso_alloc_tty(struct uhso_softc *sc) sc->sc_tty[sc->sc_ttys - 1].ht_sc = sc; - UHSO_DPRINTF(2, "Allocated TTY %d\n", sc->sc_ttys - 1); + UHSO_DPRINTF(1, "Allocated TTY %d\n", sc->sc_ttys - 1); return (sc->sc_ttys - 1); } - +/* + * Attach a multiplexed serial port + * Data is read/written with requests on the default control pipe. An interrupt + * endpoint returns when there is new data to be read. + */ static int uhso_attach_muxserial(struct uhso_softc *sc, struct usb_interface *iface, int type) @@ -885,6 +943,10 @@ uhso_attach_muxserial(struct uhso_softc if (desc->bDescriptorSubtype == 0) return (ENXIO); + /* + * The bitmask is one octet, loop through the number of + * bits that are set and create a TTY for each. + */ for (i = 0; i < 8; i++) { port = (1 << i); if ((port & desc->bDescriptorSubtype) == port) { @@ -905,6 +967,7 @@ uhso_attach_muxserial(struct uhso_softc } } + /* Setup the intr. endpoint */ uerr = usbd_transfer_setup(sc->sc_udev, &iface->idesc->bInterfaceNumber, sc->sc_xfer, uhso_mux_config, 1, sc, &sc->sc_mtx); @@ -914,6 +977,10 @@ uhso_attach_muxserial(struct uhso_softc return (0); } +/* + * Interrupt callback for the multiplexed serial port. Indicates + * which serial port has data waiting. + */ static void uhso_mux_intr_callback(struct usb_xfer *xfer, usb_error_t error) { @@ -943,6 +1010,7 @@ uhso_mux_intr_callback(struct usb_xfer * if (mux > UHSO_MPORT_TYPE_NOMAX) break; + /* Issue a read for this serial port */ usbd_xfer_set_priv( sc->sc_tty[mux].ht_xfer[UHSO_CTRL_READ], &sc->sc_tty[mux]); @@ -962,7 +1030,6 @@ tr_setup: usbd_xfer_set_stall(xfer); goto tr_setup; } - } static void @@ -1079,7 +1146,6 @@ uhso_mux_write_callback(struct usb_xfer break; break; } - } static int @@ -1089,9 +1155,7 @@ uhso_attach_bulkserial(struct uhso_softc usb_error_t uerr; int tty; - /* - * Try attaching RD/WR/INTR first - */ + /* Try attaching RD/WR/INTR first */ uerr = usbd_transfer_setup(sc->sc_udev, &iface->idesc->bInterfaceNumber, sc->sc_xfer, uhso_bs_config, UHSO_BULK_ENDPT_MAX, sc, &sc->sc_mtx); @@ -1146,7 +1210,6 @@ tr_setup: } } - static void uhso_bs_write_callback(struct usb_xfer *xfer, usb_error_t error) { @@ -1208,9 +1271,7 @@ uhso_bs_intr_callback(struct usb_xfer *x int actlen; struct usb_cdc_notification cdc; - usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); - UHSO_DPRINTF(3, "status %d, actlen=%d\n", USB_GET_STATE(xfer), actlen); switch (USB_GET_STATE(xfer)) { @@ -1228,14 +1289,14 @@ uhso_bs_intr_callback(struct usb_xfer *x usbd_copy_out(pc, 0, &cdc, actlen); if (UGETW(cdc.wIndex) != sc->sc_iface_no) { - UHSO_DPRINTF(0, "Interface missmatch, got %d expected %d\n", + UHSO_DPRINTF(0, "Interface mismatch, got %d expected %d\n", UGETW(cdc.wIndex), sc->sc_iface_no); goto tr_setup; } if (cdc.bmRequestType == UCDC_NOTIFICATION && cdc.bNotification == UCDC_N_SERIAL_STATE) { - UHSO_DPRINTF(1, "notify = 0x%02x\n", cdc.data[0]); + UHSO_DPRINTF(2, "notify = 0x%02x\n", cdc.data[0]); sc->sc_msr = 0; sc->sc_lsr = 0; @@ -1299,7 +1360,6 @@ uhso_ucom_cfg_set_rts(struct ucom_softc uhso_bs_cfg(sc); } - static void uhso_ucom_start_read(struct ucom_softc *ucom) { @@ -1373,7 +1433,6 @@ uhso_ucom_stop_write(struct ucom_softc * else if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_BULK) { usbd_transfer_stop(sc->sc_xfer[UHSO_BULK_ENDPT_WRITE]); } - } static int uhso_attach_ifnet(struct uhso_softc *sc, struct usb_interface *iface, @@ -1393,7 +1452,7 @@ static int uhso_attach_ifnet(struct uhso return (-1); } - sc->sc_ifp = ifp = if_alloc(IFT_PPP); + sc->sc_ifp = ifp = if_alloc(IFT_OTHER); if (sc->sc_ifp == NULL) { device_printf(sc->sc_dev, "if_alloc() failed\n"); return (-1); @@ -1406,7 +1465,6 @@ static int uhso_attach_ifnet(struct uhso if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); ifp->if_mtu = UHSO_MAX_MTU; - ifp->if_ioctl = uhso_if_ioctl; ifp->if_init = uhso_if_init; ifp->if_start = uhso_if_start; @@ -1448,6 +1506,7 @@ uhso_ifnet_read_callback(struct usb_xfer m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); usbd_copy_out(pc, 0, mtod(m, uint8_t *), actlen); m->m_pkthdr.len = m->m_len = actlen; + /* Enqueue frame for further processing */ _IF_ENQUEUE(&sc->sc_rxq, m); if (!callout_pending(&sc->sc_c) || !callout_active(&sc->sc_c)) { @@ -1470,7 +1529,11 @@ tr_setup: } /* - * Defered RX processing, called with mutex locked. + * Deferred RX processing, called with mutex locked. + * + * Each frame we receive might contain several small ip-packets as well + * as partial ip-packets. We need to separate/assemble them into individual + * packets before sending them to the ip-layer. */ static void uhso_if_rxflush(void *arg) @@ -1493,7 +1556,7 @@ uhso_if_rxflush(void *arg) _IF_DEQUEUE(&sc->sc_rxq, m); if (m == NULL) break; - UHSO_DPRINTF(2, "dequeue m=%p, len=%d\n", m, m->m_len); + UHSO_DPRINTF(3, "dequeue m=%p, len=%d\n", m, m->m_len); } mtx_unlock(&sc->sc_mtx); @@ -1502,7 +1565,7 @@ uhso_if_rxflush(void *arg) m0 = mwait; mwait = NULL; - UHSO_DPRINTF(1, "partial m0=%p(%d), concat w/ m=%p(%d)\n", + UHSO_DPRINTF(3, "partial m0=%p(%d), concat w/ m=%p(%d)\n", m0, m0->m_len, m, m->m_len); len = m->m_len + m0->m_len; @@ -1518,7 +1581,7 @@ uhso_if_rxflush(void *arg) mtx_lock(&sc->sc_mtx); continue; } - UHSO_DPRINTF(2, "Constructed mbuf=%p, len=%d\n", + UHSO_DPRINTF(3, "Constructed mbuf=%p, len=%d\n", m, m->m_pkthdr.len); } @@ -1560,7 +1623,7 @@ uhso_if_rxflush(void *arg) continue; } - UHSO_DPRINTF(1, "m=%p, len=%d, cp=%p, iplen=%d\n", + UHSO_DPRINTF(3, "m=%p, len=%d, cp=%p, iplen=%d\n", m, m->m_pkthdr.len, cp, iplen); m0 = NULL; @@ -1581,12 +1644,12 @@ uhso_if_rxflush(void *arg) m_adj(m0, iplen); m0 = m_defrag(m0, M_WAIT); - UHSO_DPRINTF(1, "New mbuf=%p, len=%d/%d, m0=%p, " + UHSO_DPRINTF(3, "New mbuf=%p, len=%d/%d, m0=%p, " "m0_len=%d/%d\n", m, m->m_pkthdr.len, m->m_len, m0, m0->m_pkthdr.len, m0->m_len); } else if (iplen > m->m_pkthdr.len) { - UHSO_DPRINTF(1, "Defered mbuf=%p, len=%d\n", + UHSO_DPRINTF(3, "Deferred mbuf=%p, len=%d\n", m, m->m_pkthdr.len); mwait = m; m = NULL; @@ -1649,7 +1712,6 @@ tr_setup: usbd_xfer_set_stall(xfer); goto tr_setup; } - } static int @@ -1698,7 +1760,7 @@ uhso_if_init(void *priv) ifp->if_drv_flags |= IFF_DRV_RUNNING; mtx_unlock(&sc->sc_mtx); - UHSO_DPRINTF(3, "ifnet initialized\n"); + UHSO_DPRINTF(2, "ifnet initialized\n"); } static int @@ -1722,7 +1784,6 @@ uhso_if_output(struct ifnet *ifp, struct return (ENOBUFS); } ifp->if_opackets++; - return (0); } @@ -1749,6 +1810,5 @@ uhso_if_stop(struct uhso_softc *sc) usbd_transfer_stop(sc->sc_if_xfer[UHSO_IFNET_READ]); usbd_transfer_stop(sc->sc_if_xfer[UHSO_IFNET_WRITE]); - sc->sc_ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); } Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sun Jan 17 18:18:01 2010 (r202502) +++ stable/8/sys/dev/usb/usbdevs Sun Jan 17 18:22:42 2010 (r202503) @@ -2095,6 +2095,18 @@ product OPTION E7041 0x7041 3G modem product OPTION E7061 0x7061 3G modem product OPTION E7100 0x7100 3G modem product OPTION GTM380 0x7201 3G modem +product OPTION GSICON72 0x6911 GlobeSurfer iCON +product OPTION GSICONHSUPA 0x7251 Globetrotter HSUPA +product OPTION ICON401 0x7401 GlobeSurfer iCON 401 +product OPTION GTHSUPA 0x7011 Globetrotter HSUPA +product OPTION GMT382 0x7501 Globetrotter HSUPA +product OPTION GE40X_1 0x7301 Globetrotter HSUPA +product OPTION GE40X_2 0x7361 Globetrotter HSUPA +product OPTION GE40X_3 0x7381 Globetrotter HSUPA +product OPTION ICONEDGE 0xc031 GlobeSurfer iCON EDGE +product OPTION MODHSXPA 0xd013 Globetrotter HSUPA +product OPTION ICON321 0xd031 Globetrotter HSUPA +product OPTION ICON505 0xd055 Globetrotter iCON 505 /* OQO */ product OQO WIFI01 0x0002 model 01 WiFi interface Modified: stable/8/usr.sbin/Makefile ============================================================================== --- stable/8/usr.sbin/Makefile Sun Jan 17 18:18:01 2010 (r202502) +++ stable/8/usr.sbin/Makefile Sun Jan 17 18:22:42 2010 (r202503) @@ -189,6 +189,7 @@ SUBDIR= ${_ac} \ tzsetup \ ${_uathload} \ ugidfw \ + ${_uhsoctl} \ ${_usbdevs} \ ${_usbconfig} \ ${_vidcontrol} \ @@ -410,6 +411,7 @@ _crunch= crunch .if ${MACHINE_ARCH} != "ia64" _uathload= uathload .endif +_uhsoctl= uhsoctl #_usbdevs= usbdevs _usbconfig= usbconfig .endif Added: stable/8/usr.sbin/uhsoctl/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/usr.sbin/uhsoctl/Makefile Sun Jan 17 18:22:42 2010 (r202503) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +PROG= uhsoctl +MAN= uhsoctl.1 +WARNS= 1 + +DPADD= ${LIBUTIL} +LDADD= -lutil + +.include Added: stable/8/usr.sbin/uhsoctl/uhsoctl.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/usr.sbin/uhsoctl/uhsoctl.1 Sun Jan 17 18:22:42 2010 (r202503) @@ -0,0 +1,104 @@ +.\" Copyright (c) 2008-2009 Fredrik Lindberg +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Aug 12, 2009 +.Os +.Dt UHSOCTL 1 +.Sh NAME +.Nm uhsoctl +.Nd connection utility for Option based devices +.Sh SYNOPSIS +.Nm +.Op Fl a Ar apn +.Op Fl c Ar cid +.Op Fl p Ar pin +.Op Fl u Ar username +.Op Fl k Ar password +.Op Fl r Ar path +.Op Fl f Ar path +.Op Fl b | n +.Ar interface +.Nm +.Fl d +.Ar interface +.Nm +.Fl h +.Sh DESCRIPTION +.Nm +is a small connection utility for Option N.V. devices that are based on Options +packet interface and uses proprietary AT_* calls to establish connections. +The utility (tries to) configure both default route and name servers +(/etc/resolv.conf). +.Pp +By default +.Nm +detaches from the terminal upon on a successful connection, a few command-line +options exists that allows this behavior to be changed. +.Pp +.Nm +attempts to find a usable controlling serial port based on the provided network +interface. +If this fails you might specify a serial port manually. +.Sh OPTIONS +.Bl -tag -width XXXX +.It Fl a Ar apn +Specify APN to connect to. +.It Fl c Ar cid +Specify CID (Context ID) to use, by default CID 1 is used. +If an APN has been configured once, it's enough to specify the CID used for +further accesses. +.It Fl p Ar pin +Specify SIM PIN. +.It Fl u Ar username +Specify username. +.It Fl k Ar password +Specify username. +.It Fl r Ar path +Path to resolv.conf, default /etc/resolv.conf. +Use /dev/null to disable updating of name servers. +.It Fl f Ar path +Explicitly set the serial port to use as controlling terminal. +Might be needed if the automatic detection fails. +.It Fl b +Fork into background directly, before a connection has been established. +.It Fl n +Never fork into background, run entirely in foreground. +.El +.Sh EXAMPLES +Connect to +.Dq Li apn.example.com +on interface +.Dq Li uhso0 +and use PIN +.Dq 1234 +to enable the SIM card. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:24:40 2010 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 CC6C81065696; Sun, 17 Jan 2010 18:24:40 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBDF78FC0A; Sun, 17 Jan 2010 18:24:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIOe6h007720; Sun, 17 Jan 2010 18:24:40 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIOe2H007718; Sun, 17 Jan 2010 18:24:40 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171824.o0HIOe2H007718@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:24:40 +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: r202504 - stable/8/lib/libusb 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, 17 Jan 2010 18:24:40 -0000 Author: thompsa Date: Sun Jan 17 18:24:40 2010 New Revision: 202504 URL: http://svn.freebsd.org/changeset/base/202504 Log: MFC r202025 Reset variable fields in case the transfer is opened again Modified: stable/8/lib/libusb/libusb20.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb20.c ============================================================================== --- stable/8/lib/libusb/libusb20.c Sun Jan 17 18:22:42 2010 (r202503) +++ stable/8/lib/libusb/libusb20.c Sun Jan 17 18:24:40 2010 (r202504) @@ -130,8 +130,19 @@ libusb20_tr_close(struct libusb20_transf if (xfer->ppBuffer) { free(xfer->ppBuffer); } - /* clear some fields */ + /* reset variable fields in case the transfer is opened again */ + xfer->priv_sc0 = 0; + xfer->priv_sc1 = 0; xfer->is_opened = 0; + xfer->is_pending = 0; + xfer->is_cancel = 0; + xfer->is_draining = 0; + xfer->is_restart = 0; + xfer->status = 0; + xfer->flags = 0; + xfer->nFrames = 0; + xfer->aFrames = 0; + xfer->timeout = 0; xfer->maxFrames = 0; xfer->maxTotalLength = 0; xfer->maxPacketLen = 0; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:26:21 2010 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 C08391065707; Sun, 17 Jan 2010 18:26:21 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEA188FC23; Sun, 17 Jan 2010 18:26:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIQLVn008191; Sun, 17 Jan 2010 18:26:21 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIQL5E008186; Sun, 17 Jan 2010 18:26:21 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171826.o0HIQL5E008186@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:26:21 +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: r202505 - stable/8/usr.sbin/usbconfig 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, 17 Jan 2010 18:26:21 -0000 Author: thompsa Date: Sun Jan 17 18:26:21 2010 New Revision: 202505 URL: http://svn.freebsd.org/changeset/base/202505 Log: MFC r201705 Sync to p4 - Add new quirks commands and the '-d' option optionally to specify the ugen device. Modified: stable/8/usr.sbin/usbconfig/dump.c stable/8/usr.sbin/usbconfig/dump.h stable/8/usr.sbin/usbconfig/usbconfig.8 stable/8/usr.sbin/usbconfig/usbconfig.c Directory Properties: stable/8/usr.sbin/usbconfig/ (props changed) Modified: stable/8/usr.sbin/usbconfig/dump.c ============================================================================== --- stable/8/usr.sbin/usbconfig/dump.c Sun Jan 17 18:24:40 2010 (r202504) +++ stable/8/usr.sbin/usbconfig/dump.c Sun Jan 17 18:26:21 2010 (r202505) @@ -365,3 +365,40 @@ dump_config(struct libusb20_device *pdev } return; } + +void +dump_string_by_index(struct libusb20_device *pdev, uint8_t str_index) +{ + char *pbuf; + uint8_t n; + uint8_t len; + + pbuf = malloc(256); + if (pbuf == NULL) + err(1, "out of memory"); + + if (str_index == 0) { + /* language table */ + if (libusb20_dev_req_string_sync(pdev, + str_index, 0, pbuf, 256)) { + printf("STRING_0x%02x = \n", str_index); + } else { + printf("STRING_0x%02x = ", str_index); + len = (uint8_t)pbuf[0]; + for (n = 0; n != len; n++) { + printf("0x%02x%s", (uint8_t)pbuf[n], + (n != (len-1)) ? ", " : ""); + } + printf("\n"); + } + } else { + /* ordinary string */ + if (libusb20_dev_req_string_simple_sync(pdev, + str_index, pbuf, 256)) { + printf("STRING_0x%02x = \n", str_index); + } else { + printf("STRING_0x%02x = <%s>\n", str_index, pbuf); + } + } + free(pbuf); +} Modified: stable/8/usr.sbin/usbconfig/dump.h ============================================================================== --- stable/8/usr.sbin/usbconfig/dump.h Sun Jan 17 18:24:40 2010 (r202504) +++ stable/8/usr.sbin/usbconfig/dump.h Sun Jan 17 18:26:21 2010 (r202505) @@ -24,11 +24,17 @@ * SUCH DAMAGE. */ +#ifndef _DUMP_H_ +#define _DUMP_H_ + const char *dump_mode(uint8_t value); const char *dump_speed(uint8_t value); const char *dump_power_mode(uint8_t value); +void dump_string_by_index(struct libusb20_device *pdev, uint8_t index); void dump_device_info(struct libusb20_device *pdev, uint8_t show_drv); void dump_be_quirk_names(struct libusb20_backend *pbe); void dump_be_dev_quirks(struct libusb20_backend *pbe); void dump_device_desc(struct libusb20_device *pdev); void dump_config(struct libusb20_device *pdev, uint8_t all_cfg); + +#endif /* _DUMP_H_ */ Modified: stable/8/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- stable/8/usr.sbin/usbconfig/usbconfig.8 Sun Jan 17 18:24:40 2010 (r202504) +++ stable/8/usr.sbin/usbconfig/usbconfig.8 Sun Jan 17 18:26:21 2010 (r202505) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved. +.\" Copyright (c) 2008-2010 Hans Petter Selasky. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 1, 2009 +.Dd January 6, 2010 .Dt USBCONFIG 8 .Os .Sh NAME @@ -34,6 +34,9 @@ .Op Fl u Ar unit .Op Fl a Ar addr .Op cmds... +.Nm +.Op Fl d Ar [ugen]. +.Op cmds... .Sh DESCRIPTION The .Nm @@ -46,6 +49,9 @@ Limit device range to USB devices connec .It Fl a Ar addr Limit device range to the given USB device index. Should only be used in conjunction with the unit argument. +.It Fl d Ar [ugen]. +Limit device range to USB devices connected to the given unit and address. +The unit and address coordinates may be prefixed by the lowercased word "ugen". .It Fl h Show help and available commands. .El @@ -57,5 +63,34 @@ prints a list of all available USB devic Show information about the device on USB bus 1 at address 2: .Pp .Dl usbconfig -u 1 -a 2 dump_info +.Pp +Dump HID descriptor for device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 do_request 0x81 0x06 0x2200 0 0x100 +.Pp +Dump string descriptor at index Z for device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 dump_string Z +.Pp +Dump current configuration descriptor for device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 dump_curr_config_desc +.Pp +Dump device descriptor for device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 dump_device_desc +.Pp +Program the device on USB bus 1 at address 2 to suspend, resume, power off, go into power save, or power on: +.Pp +.Dl usbconfig -u 1 -a 2 suspend +.Dl usbconfig -u 1 -a 2 resume +.Dl usbconfig -u 1 -a 2 power_off +.Dl usbconfig -u 1 -a 2 power_save +.Dl usbconfig -u 1 -a 2 power_on +.Pp +Display a list of available quirk names: +.Pp +.Dl usbconfig dump_quirk_names +.Pp .Sh SEE ALSO .Xr usb 4 Modified: stable/8/usr.sbin/usbconfig/usbconfig.c ============================================================================== --- stable/8/usr.sbin/usbconfig/usbconfig.c Sun Jan 17 18:24:40 2010 (r202504) +++ stable/8/usr.sbin/usbconfig/usbconfig.c Sun Jan 17 18:26:21 2010 (r202505) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2009 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -81,6 +81,8 @@ struct options { uint8_t got_show_iface_driver:1; uint8_t got_remove_device_quirk:1; uint8_t got_add_device_quirk:1; + uint8_t got_remove_quirk:1; + uint8_t got_add_quirk:1; uint8_t got_dump_string:1; uint8_t got_do_request:1; }; @@ -94,6 +96,7 @@ struct token { enum { T_UNIT, T_ADDR, + T_UGEN, T_IFACE, T_SET_CONFIG, T_SET_ALT, @@ -101,6 +104,8 @@ enum { T_GET_TEMPLATE, T_ADD_DEVICE_QUIRK, T_REMOVE_DEVICE_QUIRK, + T_ADD_QUIRK, + T_REMOVE_QUIRK, T_SHOW_IFACE_DRIVER, T_DUMP_QUIRK_NAMES, T_DUMP_DEVICE_QUIRKS, @@ -124,6 +129,7 @@ static struct options options; static const struct token token[] = { {"-u", T_UNIT, 1}, {"-a", T_ADDR, 1}, + {"-d", T_UGEN, 1}, {"-i", T_IFACE, 1}, {"set_config", T_SET_CONFIG, 1}, {"set_alt", T_SET_ALT, 1}, @@ -131,6 +137,8 @@ static const struct token token[] = { {"get_template", T_GET_TEMPLATE, 0}, {"add_dev_quirk_vplh", T_ADD_DEVICE_QUIRK, 5}, {"remove_dev_quirk_vplh", T_REMOVE_DEVICE_QUIRK, 5}, + {"add_quirk", T_ADD_QUIRK, 1}, + {"remove_quirk", T_REMOVE_QUIRK, 1}, {"dump_quirk_names", T_DUMP_QUIRK_NAMES, 0}, {"dump_device_quirks", T_DUMP_DEVICE_QUIRKS, 0}, {"dump_device_desc", T_DUMP_DEVICE_DESC, 0}, @@ -247,11 +255,20 @@ get_int(const char *s) } static void +duplicate_option(const char *ptr) +{ + printf("Syntax error: " + "Duplicate option: '%s'\n", ptr); + exit(1); +} + +static void usage(void) { printf("" "usbconfig - configure the USB subsystem" "\n" "usage: usbconfig -u -a -i [cmds...]" "\n" + "usage: usbconfig -d [ugen]. -i [cmds...]" "\n" "commands:" "\n" " set_config " "\n" " set_alt " "\n" @@ -259,6 +276,8 @@ usage(void) " get_template" "\n" " add_dev_quirk_vplh " "\n" " remove_dev_quirk_vplh " "\n" + " add_quirk " "\n" + " remove_quirk " "\n" " dump_quirk_names" "\n" " dump_device_quirks" "\n" " dump_device_desc" "\n" @@ -360,25 +379,33 @@ flush_command(struct libusb20_backend *p } matches++; + if (opt->got_remove_quirk) { + struct LIBUSB20_DEVICE_DESC_DECODED *ddesc; + + ddesc = libusb20_dev_get_device_desc(pdev); + + be_dev_remove_quirk(pbe, + ddesc->idVendor, ddesc->idProduct, + ddesc->bcdDevice, ddesc->bcdDevice, + opt->quirkname); + } + + if (opt->got_add_quirk) { + struct LIBUSB20_DEVICE_DESC_DECODED *ddesc; + + ddesc = libusb20_dev_get_device_desc(pdev); + + be_dev_add_quirk(pbe, + ddesc->idVendor, ddesc->idProduct, + ddesc->bcdDevice, ddesc->bcdDevice, + opt->quirkname); + } + if (libusb20_dev_open(pdev, 0)) { err(1, "could not open device"); } if (opt->got_dump_string) { - char *pbuf; - - pbuf = malloc(256); - if (pbuf == NULL) { - err(1, "out of memory"); - } - if (libusb20_dev_req_string_simple_sync(pdev, - opt->string_index, pbuf, 256)) { - printf("STRING_0x%02x = \n", - opt->string_index); - } else { - printf("STRING_0x%02x = <%s>\n", - opt->string_index, pbuf); - } - free(pbuf); + dump_string_by_index(pdev, opt->string_index); } if (opt->got_do_request) { uint16_t actlen; @@ -501,6 +528,9 @@ main(int argc, char **argv) { struct libusb20_backend *pbe; struct options *opt = &options; + const char *ptr; + int unit; + int addr; int n; int t; @@ -518,6 +548,28 @@ main(int argc, char **argv) if (t > 255) t = 255; switch (get_token(argv[n], t)) { + case T_ADD_QUIRK: + if (opt->got_add_quirk) { + flush_command(pbe, opt); + } + opt->quirkname = argv[n + 1]; + n++; + + opt->got_add_quirk = 1; + opt->got_any++; + break; + + case T_REMOVE_QUIRK: + if (opt->got_remove_quirk) { + flush_command(pbe, opt); + } + opt->quirkname = argv[n + 1]; + n++; + + opt->got_remove_quirk = 1; + opt->got_any++; + break; + case T_ADD_DEVICE_QUIRK: if (opt->got_add_device_quirk) { flush_command(pbe, opt); @@ -548,11 +600,15 @@ main(int argc, char **argv) break; case T_DUMP_QUIRK_NAMES: + if (opt->got_dump_quirk_names) + duplicate_option(argv[n]); opt->got_dump_quirk_names = 1; opt->got_any++; break; case T_DUMP_DEVICE_QUIRKS: + if (opt->got_dump_device_quirks) + duplicate_option(argv[n]); opt->got_dump_device_quirks = 1; opt->got_any++; break; @@ -561,6 +617,33 @@ main(int argc, char **argv) opt->got_show_iface_driver = 1; break; + case T_UGEN: + if (opt->got_any) { + /* allow multiple commands on the same line */ + flush_command(pbe, opt); + } + ptr = argv[n + 1]; + + if ((ptr[0] == 'u') && + (ptr[1] == 'g') && + (ptr[2] == 'e') && + (ptr[3] == 'n')) + ptr += 4; + + if ((sscanf(ptr, "%d.%d", + &unit, &addr) != 2) || + (unit < 0) || (unit > 65535) || + (addr < 0) || (addr > 65535)) { + errx(1, "cannot " + "parse '%s'", argv[n + 1]); + } + opt->bus = unit; + opt->addr = addr; + opt->got_bus = 1; +; opt->got_addr = 1; + n++; + break; + case T_UNIT: if (opt->got_any) { /* allow multiple commands on the same line */ @@ -581,84 +664,112 @@ main(int argc, char **argv) n++; break; case T_SET_CONFIG: + if (opt->got_set_config) + duplicate_option(argv[n]); opt->config_index = num_id(argv[n + 1], "cfg_index"); opt->got_set_config = 1; opt->got_any++; n++; break; case T_SET_ALT: + if (opt->got_set_alt) + duplicate_option(argv[n]); opt->alt_index = num_id(argv[n + 1], "cfg_index"); opt->got_set_alt = 1; opt->got_any++; n++; break; case T_SET_TEMPLATE: + if (opt->got_set_template) + duplicate_option(argv[n]); opt->template = get_int(argv[n + 1]); opt->got_set_template = 1; opt->got_any++; n++; break; case T_GET_TEMPLATE: + if (opt->got_get_template) + duplicate_option(argv[n]); opt->got_get_template = 1; opt->got_any++; break; case T_DUMP_DEVICE_DESC: + if (opt->got_dump_device_desc) + duplicate_option(argv[n]); opt->got_dump_device_desc = 1; opt->got_any++; break; case T_DUMP_CURR_CONFIG_DESC: + if (opt->got_dump_curr_config) + duplicate_option(argv[n]); opt->got_dump_curr_config = 1; opt->got_any++; break; case T_DUMP_ALL_CONFIG_DESC: + if (opt->got_dump_all_config) + duplicate_option(argv[n]); opt->got_dump_all_config = 1; opt->got_any++; break; case T_DUMP_INFO: + if (opt->got_dump_info) + duplicate_option(argv[n]); opt->got_dump_info = 1; opt->got_any++; break; case T_DUMP_STRING: - if (opt->got_dump_string) { - flush_command(pbe, opt); - } + if (opt->got_dump_string) + duplicate_option(argv[n]); opt->string_index = num_id(argv[n + 1], "str_index"); opt->got_dump_string = 1; opt->got_any++; n++; break; case T_SUSPEND: + if (opt->got_suspend) + duplicate_option(argv[n]); opt->got_suspend = 1; opt->got_any++; break; case T_RESUME: + if (opt->got_resume) + duplicate_option(argv[n]); opt->got_resume = 1; opt->got_any++; break; case T_POWER_OFF: + if (opt->got_power_off) + duplicate_option(argv[n]); opt->got_power_off = 1; opt->got_any++; break; case T_POWER_SAVE: + if (opt->got_power_save) + duplicate_option(argv[n]); opt->got_power_save = 1; opt->got_any++; break; case T_POWER_ON: + if (opt->got_power_on) + duplicate_option(argv[n]); opt->got_power_on = 1; opt->got_any++; break; case T_RESET: + if (opt->got_reset) + duplicate_option(argv[n]); opt->got_reset = 1; opt->got_any++; break; case T_LIST: + if (opt->got_list) + duplicate_option(argv[n]); opt->got_list = 1; opt->got_any++; break; case T_DO_REQUEST: - if (opt->got_do_request) { - flush_command(pbe, opt); - } + if (opt->got_do_request) + duplicate_option(argv[n]); LIBUSB20_INIT(LIBUSB20_CONTROL_SETUP, &opt->setup); opt->setup.bmRequestType = num_id(argv[n + 1], "bmReqTyp"); opt->setup.bRequest = num_id(argv[n + 2], "bReq"); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:27:13 2010 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 5CD7F106566B; Sun, 17 Jan 2010 18:27:13 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C41D8FC23; Sun, 17 Jan 2010 18:27:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIRDlQ008420; Sun, 17 Jan 2010 18:27:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIRDeG008418; Sun, 17 Jan 2010 18:27:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171827.o0HIRDeG008418@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:27:13 +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: r202506 - stable/8/usr.sbin/usbconfig 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, 17 Jan 2010 18:27:13 -0000 Author: thompsa Date: Sun Jan 17 18:27:13 2010 New Revision: 202506 URL: http://svn.freebsd.org/changeset/base/202506 Log: MFC r201922 Add missing library dependency. Modified: stable/8/usr.sbin/usbconfig/Makefile Directory Properties: stable/8/usr.sbin/usbconfig/ (props changed) Modified: stable/8/usr.sbin/usbconfig/Makefile ============================================================================== --- stable/8/usr.sbin/usbconfig/Makefile Sun Jan 17 18:26:21 2010 (r202505) +++ stable/8/usr.sbin/usbconfig/Makefile Sun Jan 17 18:27:13 2010 (r202506) @@ -4,6 +4,7 @@ PROG= usbconfig MAN= usbconfig.8 SRCS= usbconfig.c dump.c +DPADD+= ${LIBUSB} LDADD+= -lusb .include From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:27:53 2010 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 F0950106568D; Sun, 17 Jan 2010 18:27:53 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFBFE8FC16; Sun, 17 Jan 2010 18:27:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIRrJD008648; Sun, 17 Jan 2010 18:27:53 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIRroo008646; Sun, 17 Jan 2010 18:27:53 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171827.o0HIRroo008646@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:27:53 +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: r202507 - stable/8/usr.sbin/usbconfig 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, 17 Jan 2010 18:27:54 -0000 Author: thompsa Date: Sun Jan 17 18:27:53 2010 New Revision: 202507 URL: http://svn.freebsd.org/changeset/base/202507 Log: MFC r202026 Print error messages to stderr. Modified: stable/8/usr.sbin/usbconfig/usbconfig.c Directory Properties: stable/8/usr.sbin/usbconfig/ (props changed) Modified: stable/8/usr.sbin/usbconfig/usbconfig.c ============================================================================== --- stable/8/usr.sbin/usbconfig/usbconfig.c Sun Jan 17 18:27:13 2010 (r202506) +++ stable/8/usr.sbin/usbconfig/usbconfig.c Sun Jan 17 18:27:53 2010 (r202507) @@ -175,7 +175,7 @@ be_dev_remove_quirk(struct libusb20_back error = libusb20_be_remove_dev_quirk(pbe, &q); if (error) { - printf("Removing quirk '%s' failed, continuing.\n", str); + fprintf(stderr, "Removing quirk '%s' failed, continuing.\n", str); } return; } @@ -198,7 +198,7 @@ be_dev_add_quirk(struct libusb20_backend error = libusb20_be_add_dev_quirk(pbe, &q); if (error) { - printf("Adding quirk '%s' failed, continuing.\n", str); + fprintf(stderr, "Adding quirk '%s' failed, continuing.\n", str); } return; } @@ -257,7 +257,7 @@ get_int(const char *s) static void duplicate_option(const char *ptr) { - printf("Syntax error: " + fprintf(stderr, "Syntax error: " "Duplicate option: '%s'\n", ptr); exit(1); } @@ -265,7 +265,7 @@ duplicate_option(const char *ptr) static void usage(void) { - printf("" + fprintf(stderr, "" "usbconfig - configure the USB subsystem" "\n" "usage: usbconfig -u -a -i [cmds...]" "\n" "usage: usbconfig -d [ugen]. -i [cmds...]" "\n" @@ -349,7 +349,7 @@ flush_command(struct libusb20_backend *p if (opt->got_set_template) { opt->got_any--; if (libusb20_be_set_template(pbe, opt->template)) { - printf("Setting USB template %u failed, " + fprintf(stderr, "Setting USB template %u failed, " "continuing.\n", opt->template); } } From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:29:30 2010 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 D9BC410656AA; Sun, 17 Jan 2010 18:29:30 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8E688FC1C; Sun, 17 Jan 2010 18:29:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HITUuL009110; Sun, 17 Jan 2010 18:29:30 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HITUf6009107; Sun, 17 Jan 2010 18:29:30 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171829.o0HITUf6009107@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:29:30 +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: r202508 - in stable/8/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, 17 Jan 2010 18:29:31 -0000 Author: thompsa Date: Sun Jan 17 18:29:30 2010 New Revision: 202508 URL: http://svn.freebsd.org/changeset/base/202508 Log: MFC r201318 Add new device ID to uipaq driver PR: usb/141936 Submitted by: HASHI Hiroaki Modified: stable/8/sys/dev/usb/serial/uipaq.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/uipaq.c ============================================================================== --- stable/8/sys/dev/usb/serial/uipaq.c Sun Jan 17 18:27:53 2010 (r202507) +++ stable/8/sys/dev/usb/serial/uipaq.c Sun Jan 17 18:29:30 2010 (r202508) @@ -1015,6 +1015,8 @@ static const struct usb_device_id uipaq_ /**/ {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_WZERO3ES, 0)}, /**/ + {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_WZERO3ADES, 0)}, + /**/ {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_WILLCOM03, 0)}, /* Symbol USB Sync */ {USB_VPI(USB_VENDOR_SYMBOL, 0x2000, 0)}, Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sun Jan 17 18:27:53 2010 (r202507) +++ stable/8/sys/dev/usb/usbdevs Sun Jan 17 18:29:30 2010 (r202508) @@ -2417,6 +2417,7 @@ product SHARP SL5600 0x8006 Zaurus SL-5 product SHARP SLC700 0x8007 Zaurus SL-C700 PDA product SHARP SLC750 0x9031 Zaurus SL-C750 PDA product SHARP WZERO3ES 0x9123 W-ZERO3 ES Smartphone +product SHARP WZERO3ADES 0x91ac Advanced W-ZERO3 ES Smartphone product SHARP WILLCOM03 0x9242 WILLCOM03 /* Shuttle Technology products */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:30:37 2010 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 CB297106568B; Sun, 17 Jan 2010 18:30:37 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA72C8FC22; Sun, 17 Jan 2010 18:30:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIUbAT009456; Sun, 17 Jan 2010 18:30:37 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIUbxY009454; Sun, 17 Jan 2010 18:30:37 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171830.o0HIUbxY009454@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:30:37 +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: r202509 - stable/8/sys/dev/usb 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, 17 Jan 2010 18:30:37 -0000 Author: thompsa Date: Sun Jan 17 18:30:37 2010 New Revision: 202509 URL: http://svn.freebsd.org/changeset/base/202509 Log: MFC r201680 scratch_size was incorrectly passed as language ID when retrieving the language ID table, this broke string retrieval on some devices. Submitted by: Hans Petter Selasky Reported by: Renato Botelho Modified: stable/8/sys/dev/usb/usb_device.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Sun Jan 17 18:29:30 2010 (r202508) +++ stable/8/sys/dev/usb/usb_device.c Sun Jan 17 18:30:37 2010 (r202509) @@ -1691,8 +1691,7 @@ usb_alloc_device(device_t parent_dev, st udev->ddesc.iSerialNumber) { /* read out the language ID string */ err = usbd_req_get_string_desc(udev, NULL, - (char *)scratch_ptr, 4, scratch_size, - USB_LANGUAGE_TABLE); + (char *)scratch_ptr, 4, 0, USB_LANGUAGE_TABLE); } else { err = USB_ERR_INVAL; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:31:27 2010 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 DD705106566B; Sun, 17 Jan 2010 18:31:27 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA7928FC15; Sun, 17 Jan 2010 18:31:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIVRQ1009691; Sun, 17 Jan 2010 18:31:27 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIVRwC009686; Sun, 17 Jan 2010 18:31:27 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171831.o0HIVRwC009686@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:31:27 +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: r202510 - in stable/8/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, 17 Jan 2010 18:31:28 -0000 Author: thompsa Date: Sun Jan 17 18:31:27 2010 New Revision: 202510 URL: http://svn.freebsd.org/changeset/base/202510 Log: MFC r201681 Improve u3g device ejecting by providing additional methods for the eject command in the usb_msctest routines, as well as a general tidyup. Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_msctest.c stable/8/sys/dev/usb/usb_msctest.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Sun Jan 17 18:30:37 2010 (r202509) +++ stable/8/sys/dev/usb/serial/u3g.c Sun Jan 17 18:31:27 2010 (r202510) @@ -86,10 +86,14 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #define U3GSP_HSPA 6 #define U3GSP_MAX 7 -#define U3GFL_HUAWEI_INIT 0x0001 /* Init command required */ -#define U3GFL_SCSI_EJECT 0x0002 /* SCSI eject command required */ -#define U3GFL_SIERRA_INIT 0x0004 /* Init command required */ -#define U3GFL_SAEL_M460_INIT 0x0008 /* Init device */ +#define U3GINIT_HUAWEI 1 /* Requires Huawei init command */ +#define U3GINIT_SIERRA 2 /* Requires Sierra init command */ +#define U3GINIT_SCSIEJECT 3 /* Requires SCSI eject command */ +#define U3GINIT_REZERO 4 /* Requires SCSI rezero command */ +#define U3GINIT_ZTESTOR 5 /* Requires ZTE SCSI command */ +#define U3GINIT_CMOTECH 6 /* Requires CMOTECH SCSI command */ +#define U3GINIT_WAIT 7 /* Device reappears after a delay */ +#define U3GINIT_SAEL_M460 8 /* Requires vendor init */ enum { U3G_BULK_WR, @@ -192,6 +196,7 @@ static const struct usb_device_id u3g_de U3G_DEV(ANYDATA, ADU_E100X, 0), U3G_DEV(AXESSTEL, DATAMODEM, 0), U3G_DEV(CMOTECH, CDMA_MODEM1, 0), + U3G_DEV(CMOTECH, CGU628, U3GINIT_CMOTECH), U3G_DEV(DELL, U5500, 0), U3G_DEV(DELL, U5505, 0), U3G_DEV(DELL, U5510, 0), @@ -211,73 +216,73 @@ static const struct usb_device_id u3g_de U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), - U3G_DEV(HUAWEI, E1401, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1402, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1403, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1404, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1405, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1406, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1407, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1408, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1409, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140A, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140B, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140D, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140E, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140F, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1410, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1411, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1412, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1413, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1414, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1415, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1416, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1417, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1418, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1419, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141A, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141B, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141C, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141D, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141E, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141F, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1420, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1421, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1422, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1423, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1424, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1425, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1426, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1427, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1428, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1429, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142A, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142B, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142C, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142D, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142E, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142F, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1430, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1431, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1432, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1433, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1434, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1435, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1436, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1437, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1438, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1439, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143A, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143B, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143C, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143D, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143E, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143F, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E14AC, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E180V, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E220, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E220BIS, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, MOBILE, U3GFL_HUAWEI_INIT), + U3G_DEV(HUAWEI, E1401, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1402, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1403, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1404, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1405, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1406, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1407, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1408, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1409, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140A, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140B, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140D, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140E, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140F, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1410, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1411, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1412, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1413, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1414, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1415, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1416, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1417, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1418, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1419, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141A, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141B, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141C, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141D, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141E, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141F, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1420, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1421, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1422, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1423, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1424, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1425, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1426, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1427, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1428, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1429, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142A, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142B, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142C, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142D, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142E, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142F, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1430, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1431, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1432, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1433, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1434, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1435, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1436, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1437, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1438, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1439, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143A, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143B, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143C, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143D, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143E, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143F, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E14AC, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E180V, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(MERLIN, V620, 0), @@ -294,7 +299,7 @@ static const struct usb_device_id u3g_de U3G_DEV(NOVATEL, U727_2, 0), U3G_DEV(NOVATEL, U740, 0), U3G_DEV(NOVATEL, U740_2, 0), - U3G_DEV(NOVATEL, U760, U3GFL_SCSI_EJECT), + U3G_DEV(NOVATEL, U760, U3GINIT_SCSIEJECT), U3G_DEV(NOVATEL, U870, 0), U3G_DEV(NOVATEL, V620, 0), U3G_DEV(NOVATEL, V640, 0), @@ -338,7 +343,7 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, AC2726, 0), U3G_DEV(QUALCOMMINC, AC8700, 0), U3G_DEV(QUALCOMMINC, AC8710, 0), - U3G_DEV(QUALCOMMINC, CDMA_MSM, U3GFL_SCSI_EJECT), + U3G_DEV(QUALCOMMINC, CDMA_MSM, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, E0002, 0), U3G_DEV(QUALCOMMINC, E0003, 0), U3G_DEV(QUALCOMMINC, E0004, 0), @@ -405,7 +410,6 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), - U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GFL_SCSI_EJECT), U3G_DEV(QUANTA, GKE, 0), U3G_DEV(QUANTA, GLE, 0), U3G_DEV(QUANTA, GLX, 0), @@ -466,7 +470,7 @@ static const struct usb_device_id u3g_de U3G_DEV(SIERRA, MINI5725, 0), U3G_DEV(SIERRA, T11, 0), U3G_DEV(SIERRA, T598, 0), - U3G_DEV(SILABS, SAEL, U3GFL_SAEL_M460_INIT), + U3G_DEV(SILABS, SAEL, U3GINIT_SAEL_M460), U3G_DEV(STELERA, C105, 0), U3G_DEV(STELERA, E1003, 0), U3G_DEV(STELERA, E1004, 0), @@ -492,12 +496,14 @@ static const struct usb_device_id u3g_de U3G_DEV(TOSHIBA, HSDPA, 0), U3G_DEV(YISO, C893, 0), /* Autoinstallers */ - U3G_DEV(NOVATEL, ZEROCD, U3GFL_SCSI_EJECT), - U3G_DEV(SIERRA, TRUINSTALL, U3GFL_SIERRA_INIT), + U3G_DEV(NOVATEL, ZEROCD, U3GINIT_SCSIEJECT), + U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO), + U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GINIT_ZTESTOR), + U3G_DEV(SIERRA, TRUINSTALL, U3GINIT_SIERRA), #undef U3G_DEV }; -static void +static int u3g_sierra_init(struct usb_device *udev) { struct usb_device_request req; @@ -512,10 +518,10 @@ u3g_sierra_init(struct usb_device *udev) NULL, 0, NULL, USB_MS_HZ)) { /* ignore any errors */ } - return; + return (0); } -static void +static int u3g_huawei_init(struct usb_device *udev) { struct usb_device_request req; @@ -530,7 +536,7 @@ u3g_huawei_init(struct usb_device *udev) NULL, 0, NULL, USB_MS_HZ)) { /* ignore any errors */ } - return; + return (0); } static void @@ -625,7 +631,7 @@ u3g_test_autoinst(void *arg, struct usb_ { struct usb_interface *iface; struct usb_interface_descriptor *id; - uint32_t flags; + int error; if (uaa->dev_state != UAA_DEV_READY) return; @@ -636,25 +642,41 @@ u3g_test_autoinst(void *arg, struct usb_ id = iface->idesc; if (id == NULL || id->bInterfaceClass != UICLASS_MASS) return; - if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa)) { - /* no device match */ - return; - } - flags = USB_GET_DRIVER_INFO(uaa); + if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa)) + return; /* no device match */ - if (flags & U3GFL_HUAWEI_INIT) { - u3g_huawei_init(udev); - } else if (flags & U3GFL_SCSI_EJECT) { - if (usb_test_autoinstall(udev, 0, 1) != 0) - return; - } else if (flags & U3GFL_SIERRA_INIT) { - u3g_sierra_init(udev); - } else { - /* no quirks */ - return; + switch (USB_GET_DRIVER_INFO(uaa)) { + case U3GINIT_HUAWEI: + error = u3g_huawei_init(udev); + break; + case U3GINIT_SCSIEJECT: + error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); + break; + case U3GINIT_REZERO: + error = usb_msc_eject(udev, 0, MSC_EJECT_REZERO); + break; + case U3GINIT_ZTESTOR: + error = usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); + break; + case U3GINIT_CMOTECH: + error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH); + break; + case U3GINIT_SIERRA: + error = u3g_sierra_init(udev); + break; + case U3GINIT_WAIT: + /* Just pretend we ejected, the card will timeout */ + error = 0; + break; + default: + /* no 3G eject quirks */ + error = EOPNOTSUPP; + break; + } + if (error == 0) { + /* success, mark the udev as disappearing */ + uaa->dev_state = UAA_DEV_EJECTING; } - uaa->dev_state = UAA_DEV_EJECTING; - return; /* success */ } static int @@ -701,15 +723,14 @@ u3g_attach(device_t dev) struct usb_interface *iface; struct usb_interface_descriptor *id; uint32_t iface_valid; - int error, flags, nports; + int error, type, nports; int ep, n; uint8_t i; DPRINTF("sc=%p\n", sc); - flags = USB_GET_DRIVER_INFO(uaa); - - if (flags & U3GFL_SAEL_M460_INIT) + type = USB_GET_DRIVER_INFO(uaa); + if (type == U3GINIT_SAEL_M460) u3g_sael_m460_init(uaa->device); /* copy in USB config */ @@ -781,8 +802,8 @@ u3g_attach(device_t dev) DPRINTF("ucom_attach failed\n"); goto detach; } - if (sc->sc_numports > 1) - device_printf(dev, "Found %u ports.\n", sc->sc_numports); + device_printf(dev, "Found %u port%s.\n", sc->sc_numports, + sc->sc_numports > 1 ? "s":""); return (0); detach: Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Sun Jan 17 18:30:37 2010 (r202509) +++ stable/8/sys/dev/usb/usb_device.c Sun Jan 17 18:31:27 2010 (r202510) @@ -1805,7 +1805,7 @@ repeat_set_config: * Try to figure out if we have an * auto-install disk there: */ - if (usb_test_autoinstall(udev, 0, 0) == 0) { + if (usb_iface_is_cdrom(udev, 0)) { DPRINTFN(0, "Found possible auto-install " "disk (trying next config)\n"); config_index++; Modified: stable/8/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.c Sun Jan 17 18:30:37 2010 (r202509) +++ stable/8/sys/dev/usb/usb_msctest.c Sun Jan 17 18:31:27 2010 (r202510) @@ -67,8 +67,7 @@ #include #include #include - -#include +#include enum { ST_COMMAND, @@ -86,7 +85,18 @@ enum { DIR_NONE, }; +#define SCSI_INQ_LEN 0x24 +static uint8_t scsi_test_unit_ready[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_inquiry[] = { 0x12, 0x00, 0x00, 0x00, SCSI_INQ_LEN, 0x00 }; +static uint8_t scsi_rezero_init[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_start_stop_unit[] = { 0x1b, 0x00, 0x00, 0x00, 0x02, 0x00 }; +static uint8_t scsi_ztestor_eject[] = { 0x85, 0x01, 0x01, 0x01, 0x18, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00 }; +static uint8_t scsi_cmotech_eject[] = { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43, + 0x48, 0x47 }; + #define BULK_SIZE 64 /* dummy */ +#define ERR_CSW_FAILED -1 /* Command Block Wrapper */ struct bbb_cbw { @@ -134,8 +144,8 @@ struct bbb_transfer { uint8_t dir; uint8_t lun; uint8_t state; - uint8_t error; uint8_t status_try; + int error; uint8_t buffer[256]; }; @@ -147,6 +157,15 @@ static usb_callback_t bbb_data_write_cal static usb_callback_t bbb_data_wr_cs_callback; static usb_callback_t bbb_status_callback; +static void bbb_done(struct bbb_transfer *, int); +static void bbb_transfer_start(struct bbb_transfer *, uint8_t); +static void bbb_data_clear_stall_callback(struct usb_xfer *, uint8_t, + uint8_t); +static uint8_t bbb_command_start(struct bbb_transfer *, uint8_t, uint8_t, + void *, size_t, void *, size_t, usb_timeout_t); +static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t); +static void bbb_detach(struct bbb_transfer *); + static const struct usb_config bbb_config[ST_MAX] = { [ST_COMMAND] = { @@ -208,25 +227,9 @@ static const struct usb_config bbb_confi }; static void -bbb_done(struct bbb_transfer *sc, uint8_t error) +bbb_done(struct bbb_transfer *sc, int error) { - struct usb_xfer *xfer; - - xfer = sc->xfer[sc->state]; - - /* verify the error code */ - if (error) { - switch (USB_GET_STATE(xfer)) { - case USB_ST_SETUP: - case USB_ST_TRANSFERRED: - error = 1; - break; - default: - error = 2; - break; - } - } sc->error = error; sc->state = ST_COMMAND; sc->status_try = 1; @@ -253,7 +256,7 @@ bbb_data_clear_stall_callback(struct usb bbb_transfer_start(sc, next_xfer); break; default: - bbb_done(sc, 1); + bbb_done(sc, USB_ERR_STALLED); break; } } @@ -291,7 +294,7 @@ bbb_command_callback(struct usb_xfer *xf break; default: /* Error */ - bbb_done(sc, 1); + bbb_done(sc, error); break; } } @@ -333,7 +336,7 @@ bbb_data_read_callback(struct usb_xfer * default: /* Error */ if (error == USB_ERR_CANCELLED) { - bbb_done(sc, 1); + bbb_done(sc, error); } else { bbb_transfer_start(sc, ST_DATA_RD_CS); } @@ -385,7 +388,7 @@ bbb_data_write_callback(struct usb_xfer default: /* Error */ if (error == USB_ERR_CANCELLED) { - bbb_done(sc, 1); + bbb_done(sc, error); } else { bbb_transfer_start(sc, ST_DATA_WR_CS); } @@ -415,11 +418,11 @@ bbb_status_callback(struct usb_xfer *xfe /* very simple status check */ if (actlen < sizeof(sc->csw)) { - bbb_done(sc, 1);/* error */ + bbb_done(sc, USB_ERR_SHORT_XFER); } else if (sc->csw.bCSWStatus == CSWSTATUS_GOOD) { - bbb_done(sc, 0);/* success */ + bbb_done(sc, 0); /* success */ } else { - bbb_done(sc, 1);/* error */ + bbb_done(sc, ERR_CSW_FAILED); /* error */ } break; @@ -429,11 +432,11 @@ bbb_status_callback(struct usb_xfer *xfe break; default: - DPRINTFN(0, "Failed to read CSW: %s, try %d\n", + DPRINTF("Failed to read CSW: %s, try %d\n", usbd_errstr(error), sc->status_try); if (error == USB_ERR_CANCELLED || sc->status_try) { - bbb_done(sc, 1); + bbb_done(sc, error); } else { sc->status_try = 1; bbb_transfer_start(sc, ST_DATA_RD_CS); @@ -451,7 +454,7 @@ bbb_status_callback(struct usb_xfer *xfe *------------------------------------------------------------------------*/ static uint8_t bbb_command_start(struct bbb_transfer *sc, uint8_t dir, uint8_t lun, - void *data_ptr, usb_size_t data_len, uint8_t cmd_len, + void *data_ptr, size_t data_len, void *cmd_ptr, size_t cmd_len, usb_timeout_t data_timeout) { sc->lun = lun; @@ -461,54 +464,46 @@ bbb_command_start(struct bbb_transfer *s sc->data_rem = data_len; sc->data_timeout = (data_timeout + USB_MS_HZ); sc->actlen = 0; + sc->data_ptr = data_ptr; sc->cmd_len = cmd_len; + bzero(&sc->cbw.CBWCDB, sizeof(sc->cbw.CBWCDB)); + bcopy(cmd_ptr, &sc->cbw.CBWCDB, cmd_len); + DPRINTFN(1, "SCSI cmd = %*D\n", cmd_len, &sc->cbw.CBWCDB, ":"); + mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[sc->state]); while (usbd_transfer_pending(sc->xfer[sc->state])) { cv_wait(&sc->cv, &sc->mtx); } + mtx_unlock(&sc->mtx); return (sc->error); } -/*------------------------------------------------------------------------* - * usb_test_autoinstall - * - * Return values: - * 0: This interface is an auto install disk (CD-ROM) - * Else: Not an auto install disk. - *------------------------------------------------------------------------*/ -usb_error_t -usb_test_autoinstall(struct usb_device *udev, uint8_t iface_index, - uint8_t do_eject) +static struct bbb_transfer * +bbb_attach(struct usb_device *udev, uint8_t iface_index) { struct usb_interface *iface; struct usb_interface_descriptor *id; - usb_error_t err; - uint8_t timeout; - uint8_t sid_type; struct bbb_transfer *sc; + usb_error_t err; - if (udev == NULL) { - return (USB_ERR_INVAL); - } iface = usbd_get_iface(udev, iface_index); - if (iface == NULL) { - return (USB_ERR_INVAL); - } + if (iface == NULL) + return (NULL); + id = iface->idesc; - if (id == NULL) { - return (USB_ERR_INVAL); - } - if (id->bInterfaceClass != UICLASS_MASS) { - return (USB_ERR_INVAL); - } + if (id == NULL || id->bInterfaceClass != UICLASS_MASS) + return (NULL); + switch (id->bInterfaceSubClass) { case UISUBCLASS_SCSI: case UISUBCLASS_UFI: + case UISUBCLASS_SFF8020I: + case UISUBCLASS_SFF8070I: break; default: - return (USB_ERR_INVAL); + return (NULL); } switch (id->bInterfaceProtocol) { @@ -516,75 +511,112 @@ usb_test_autoinstall(struct usb_device * case UIPROTO_MASS_BBB: break; default: - return (USB_ERR_INVAL); + return (NULL); } sc = malloc(sizeof(*sc), M_USB, M_WAITOK | M_ZERO); - if (sc == NULL) { - return (USB_ERR_NOMEM); - } mtx_init(&sc->mtx, "USB autoinstall", NULL, MTX_DEF); cv_init(&sc->cv, "WBBB"); - err = usbd_transfer_setup(udev, - &iface_index, sc->xfer, bbb_config, + err = usbd_transfer_setup(udev, &iface_index, sc->xfer, bbb_config, ST_MAX, sc, &sc->mtx); - if (err) { - goto done; + bbb_detach(sc); + return (NULL); } - mtx_lock(&sc->mtx); - - timeout = 4; /* tries */ - -repeat_inquiry: - - sc->cbw.CBWCDB[0] = 0x12; /* INQUIRY */ - sc->cbw.CBWCDB[1] = 0; - sc->cbw.CBWCDB[2] = 0; - sc->cbw.CBWCDB[3] = 0; - sc->cbw.CBWCDB[4] = 0x24; /* length */ - sc->cbw.CBWCDB[5] = 0; - err = bbb_command_start(sc, DIR_IN, 0, - sc->buffer, 0x24, 6, USB_MS_HZ); - - if ((sc->actlen != 0) && (err == 0)) { - sid_type = sc->buffer[0] & 0x1F; - if (sid_type == 0x05) { - /* CD-ROM */ - if (do_eject) { - /* 0: opcode: SCSI START/STOP */ - sc->cbw.CBWCDB[0] = 0x1b; - /* 1: byte2: Not immediate */ - sc->cbw.CBWCDB[1] = 0x00; - /* 2..3: reserved */ - sc->cbw.CBWCDB[2] = 0x00; - sc->cbw.CBWCDB[3] = 0x00; - /* 4: Load/Eject command */ - sc->cbw.CBWCDB[4] = 0x02; - /* 5: control */ - sc->cbw.CBWCDB[5] = 0x00; - err = bbb_command_start(sc, DIR_OUT, 0, - NULL, 0, 6, USB_MS_HZ); - - DPRINTFN(0, "Eject CD command " - "status: %s\n", usbd_errstr(err)); - } - err = 0; - goto done; - } - } else if ((err != 2) && --timeout) { - usb_pause_mtx(&sc->mtx, hz); - goto repeat_inquiry; - } - err = USB_ERR_INVAL; - goto done; + return (sc); +} -done: - mtx_unlock(&sc->mtx); +static void +bbb_detach(struct bbb_transfer *sc) +{ usbd_transfer_unsetup(sc->xfer, ST_MAX); mtx_destroy(&sc->mtx); cv_destroy(&sc->cv); free(sc, M_USB); - return (err); +} + +/*------------------------------------------------------------------------* + * usb_iface_is_cdrom + * + * Return values: + * 1: This interface is an auto install disk (CD-ROM) + * 0: Not an auto install disk. + *------------------------------------------------------------------------*/ +int +usb_iface_is_cdrom(struct usb_device *udev, uint8_t iface_index) +{ + struct bbb_transfer *sc; + usb_error_t err; + uint8_t timeout, is_cdrom; + uint8_t sid_type; + + sc = bbb_attach(udev, iface_index); + if (sc == NULL) + return (0); + + is_cdrom = 0; + timeout = 4; /* tries */ + while (--timeout) { + err = bbb_command_start(sc, DIR_IN, 0, sc->buffer, + SCSI_INQ_LEN, &scsi_inquiry, sizeof(scsi_inquiry), + USB_MS_HZ); + + if (err == 0 && sc->actlen > 0) { + sid_type = sc->buffer[0] & 0x1F; + if (sid_type == 0x05) + is_cdrom = 1; + break; + } else if (err != ERR_CSW_FAILED) + break; /* non retryable error */ + usb_pause_mtx(NULL, hz); + } + bbb_detach(sc); + return (is_cdrom); +} + +usb_error_t +usb_msc_eject(struct usb_device *udev, uint8_t iface_index, int method) +{ + struct bbb_transfer *sc; + usb_error_t err; + + sc = bbb_attach(udev, iface_index); + if (sc == NULL) + return (USB_ERR_INVAL); + + err = 0; + switch (method) { + case MSC_EJECT_STOPUNIT: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_test_unit_ready, sizeof(scsi_test_unit_ready), + USB_MS_HZ); + DPRINTF("Test unit ready status: %s\n", usbd_errstr(err)); + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_start_stop_unit, sizeof(scsi_start_stop_unit), + USB_MS_HZ); + break; + case MSC_EJECT_REZERO: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_rezero_init, sizeof(scsi_rezero_init), + USB_MS_HZ); + break; + case MSC_EJECT_ZTESTOR: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_ztestor_eject, sizeof(scsi_ztestor_eject), + USB_MS_HZ); + break; + case MSC_EJECT_CMOTECH: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_cmotech_eject, sizeof(scsi_cmotech_eject), + USB_MS_HZ); + break; + default: + printf("usb_msc_eject: unknown eject method (%d)\n", method); + break; + } + DPRINTF("Eject CD command status: %s\n", usbd_errstr(err)); + + bbb_detach(sc); + return (0); } Modified: stable/8/sys/dev/usb/usb_msctest.h ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.h Sun Jan 17 18:30:37 2010 (r202509) +++ stable/8/sys/dev/usb/usb_msctest.h Sun Jan 17 18:31:27 2010 (r202510) @@ -27,7 +27,16 @@ #ifndef _USB_MSCTEST_H_ #define _USB_MSCTEST_H_ -usb_error_t usb_test_autoinstall(struct usb_device *udev, - uint8_t iface_index, uint8_t do_eject); +enum { + MSC_EJECT_STOPUNIT, + MSC_EJECT_REZERO, + MSC_EJECT_ZTESTOR, + MSC_EJECT_CMOTECH +}; + +int usb_iface_is_cdrom(struct usb_device *udev, + uint8_t iface_index); +usb_error_t usb_msc_eject(struct usb_device *udev, + uint8_t iface_index, int method); #endif /* _USB_MSCTEST_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:32:20 2010 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 7EA5C106566C; Sun, 17 Jan 2010 18:32:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53F328FC22; Sun, 17 Jan 2010 18:32:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIWKkH009948; Sun, 17 Jan 2010 18:32:20 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIWKvl009945; Sun, 17 Jan 2010 18:32:20 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171832.o0HIWKvl009945@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:32:20 +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: r202511 - in stable/8/sys/dev/usb: . quirk 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, 17 Jan 2010 18:32:20 -0000 Author: thompsa Date: Sun Jan 17 18:32:20 2010 New Revision: 202511 URL: http://svn.freebsd.org/changeset/base/202511 Log: MFC r201701 Add new umass quirks for Western Digital MYBook and JMicron JM20337. PR: usb/142225, usb/142228 Submitted by: Thomas Ward, Yoshikazu GOTO Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Sun Jan 17 18:31:27 2010 (r202510) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Sun Jan 17 18:32:20 2010 (r202511) @@ -225,6 +225,9 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(IOMEGA, ZIP100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */ + USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, + UQ_MSC_FORCE_PROTO_SCSI, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(KYOCERA, FINECAM_L3, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(KYOCERA, FINECAM_S3X, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, @@ -413,7 +416,8 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(WESTERN, MYBOOK, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, - UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY_EVPD), + UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY_EVPD, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(WESTERN, MYPASSWORD, 0x0000, 0xffff, UQ_MSC_FORCE_SHORT_INQ), USB_QUIRK(WINMAXGROUP, FLASH64MC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sun Jan 17 18:31:27 2010 (r202510) +++ stable/8/sys/dev/usb/usbdevs Sun Jan 17 18:32:20 2010 (r202511) @@ -603,6 +603,7 @@ vendor SUPERTOP 0x14cd Super Top vendor PLANEX3 0x14ea Planex Communications vendor SILICONPORTALS 0x1527 Silicon Portals vendor UBIQUAM 0x1529 UBIQUAM Co., Ltd. +vendor JMICRON 0x152d JMicron vendor UBLOX 0x1546 U-blox vendor PNY 0x154b PNY vendor OQO 0x1557 OQO @@ -1671,6 +1672,9 @@ product JABLOTRON PC60B 0x0001 PC-60B /* Jaton products */ product JATON EDA 0x5704 Ethernet +/* JMicron products */ +product JMICRON JM20337 0x2338 USB to ATA/ATAPI Bridge + /* JVC products */ product JVC GR_DX95 0x000a GR-DX95 product JVC MP_PRX1 0x3008 MP-PRX1 Ethernet From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:33:05 2010 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 E1625106568D; Sun, 17 Jan 2010 18:33:05 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0D4A8FC08; Sun, 17 Jan 2010 18:33:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIX5EB010189; Sun, 17 Jan 2010 18:33:05 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIX5qv010187; Sun, 17 Jan 2010 18:33:05 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171833.o0HIX5qv010187@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:33: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: r202512 - stable/8/sys/dev/usb 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, 17 Jan 2010 18:33:06 -0000 Author: thompsa Date: Sun Jan 17 18:33:05 2010 New Revision: 202512 URL: http://svn.freebsd.org/changeset/base/202512 Log: MFC r201714 Fix debug printf on 64bit arches. Modified: stable/8/sys/dev/usb/usb_msctest.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.c Sun Jan 17 18:32:20 2010 (r202511) +++ stable/8/sys/dev/usb/usb_msctest.c Sun Jan 17 18:33:05 2010 (r202512) @@ -468,7 +468,7 @@ bbb_command_start(struct bbb_transfer *s sc->cmd_len = cmd_len; bzero(&sc->cbw.CBWCDB, sizeof(sc->cbw.CBWCDB)); bcopy(cmd_ptr, &sc->cbw.CBWCDB, cmd_len); - DPRINTFN(1, "SCSI cmd = %*D\n", cmd_len, &sc->cbw.CBWCDB, ":"); + DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, &sc->cbw.CBWCDB, ":"); mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[sc->state]); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:33:48 2010 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 08D0E1065694; Sun, 17 Jan 2010 18:33:48 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC44C8FC0A; Sun, 17 Jan 2010 18:33:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIXlI2010415; Sun, 17 Jan 2010 18:33:47 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIXlmM010413; Sun, 17 Jan 2010 18:33:47 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171833.o0HIXlmM010413@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:33:47 +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: r202513 - stable/8/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, 17 Jan 2010 18:33:48 -0000 Author: thompsa Date: Sun Jan 17 18:33:47 2010 New Revision: 202513 URL: http://svn.freebsd.org/changeset/base/202513 Log: MFC r201766 Remove unneeded includes. Modified: stable/8/sys/dev/usb/serial/u3g.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Sun Jan 17 18:33:05 2010 (r202512) +++ stable/8/sys/dev/usb/serial/u3g.c Sun Jan 17 18:33:47 2010 (r202513) @@ -59,9 +59,7 @@ #define USB_DEBUG_VAR u3g_debug #include #include -#include #include -#include #include From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:36:22 2010 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 6E06C1065670; Sun, 17 Jan 2010 18:36:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D4648FC12; Sun, 17 Jan 2010 18:36:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIaMR0011056; Sun, 17 Jan 2010 18:36:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIaMlM011053; Sun, 17 Jan 2010 18:36:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171836.o0HIaMlM011053@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:36:22 +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: r202514 - in stable/8/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, 17 Jan 2010 18:36:22 -0000 Author: thompsa Date: Sun Jan 17 18:36:22 2010 New Revision: 202514 URL: http://svn.freebsd.org/changeset/base/202514 Log: MFC r202054 Add the Globetrotter GE40x. Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Sun Jan 17 18:33:47 2010 (r202513) +++ stable/8/sys/dev/usb/serial/u3g.c Sun Jan 17 18:36:22 2010 (r202514) @@ -316,6 +316,7 @@ static const struct usb_device_id u3g_de U3G_DEV(OPTION, E7041, 0), U3G_DEV(OPTION, E7061, 0), U3G_DEV(OPTION, E7100, 0), + U3G_DEV(OPTION, GE40X, 0), U3G_DEV(OPTION, GT3G, 0), U3G_DEV(OPTION, GT3GPLUS, 0), U3G_DEV(OPTION, GT3GQUAD, 0), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sun Jan 17 18:33:47 2010 (r202513) +++ stable/8/sys/dev/usb/usbdevs Sun Jan 17 18:36:22 2010 (r202514) @@ -2099,6 +2099,7 @@ product OPTION E7041 0x7041 3G modem product OPTION E7061 0x7061 3G modem product OPTION E7100 0x7100 3G modem product OPTION GTM380 0x7201 3G modem +product OPTION GE40X 0x7601 Globetrotter HSUPA product OPTION GSICON72 0x6911 GlobeSurfer iCON product OPTION GSICONHSUPA 0x7251 Globetrotter HSUPA product OPTION ICON401 0x7401 GlobeSurfer iCON 401 From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 18:37:37 2010 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 16DBF106566B; Sun, 17 Jan 2010 18:37:37 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 062FA8FC18; Sun, 17 Jan 2010 18:37:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HIbauo011386; Sun, 17 Jan 2010 18:37:36 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HIba5o011384; Sun, 17 Jan 2010 18:37:36 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001171837.o0HIba5o011384@svn.freebsd.org> From: Andrew Thompson Date: Sun, 17 Jan 2010 18:37:36 +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: r202515 - stable/8/sys/modules/usb 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, 17 Jan 2010 18:37:37 -0000 Author: thompsa Date: Sun Jan 17 18:37:36 2010 New Revision: 202515 URL: http://svn.freebsd.org/changeset/base/202515 Log: Hook up uhso to the build. Modified: stable/8/sys/modules/usb/Makefile Modified: stable/8/sys/modules/usb/Makefile ============================================================================== --- stable/8/sys/modules/usb/Makefile Sun Jan 17 18:36:22 2010 (r202514) +++ stable/8/sys/modules/usb/Makefile Sun Jan 17 18:37:36 2010 (r202515) @@ -31,7 +31,7 @@ SUBDIR += rum uath upgt ural zyd ${_urtw SUBDIR += atp uhid ukbd ums udbp ufm SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ umct umodem umoscom uplcom uslcom uvisor uvscom -SUBDIR += uether aue axe cdce cue kue rue udav +SUBDIR += uether aue axe cdce cue kue rue udav uhso SUBDIR += usfs umass urio SUBDIR += quirk template From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:10:08 2010 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 F37F7106566B; Sun, 17 Jan 2010 19:10:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id AADE38FC18; Sun, 17 Jan 2010 19:10:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 15FCE41C757; Sun, 17 Jan 2010 20:10:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id Wg8jYtvqTEwK; Sun, 17 Jan 2010 20:10:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 4C2E841C759; Sun, 17 Jan 2010 20:10:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 77F2D4448EC; Sun, 17 Jan 2010 19:06:26 +0000 (UTC) Date: Sun, 17 Jan 2010 19:06:26 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: TAKAHASHI Yoshihiro In-Reply-To: <20100117.124146.27866377.nyan@FreeBSD.org> Message-ID: <20100117190512.A50938@maildrop.int.zabbadoz.net> References: <201001161224.o0GCOCOI094360@svn.freebsd.org> <20100116.220840.91363215.nyan@FreeBSD.org> <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> <20100117.124146.27866377.nyan@FreeBSD.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: attilio@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202441 - 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, 17 Jan 2010 19:10:08 -0000 On Sun, 17 Jan 2010, TAKAHASHI Yoshihiro wrote: > In article <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> > Attilio Rao writes: > >> Thanks for reporting this. >> This further patch should fix the problem for i386 and possibly pc98 >> (linked with your patch): >> http://www.freebsd.org/~attilio/atpic.diff > > Please apply the same change to sys/pc98/cbus/clock.c, and it's fine. > > Please feel free to commit my patch. Something similar is also still needed for i386 as the XBOX kernel still doesn't compile. I would have tested the following patch there, just when I found this thread: Index: sys/i386/isa/clock.c =================================================================== --- sys/i386/isa/clock.c (revision 202484) +++ sys/i386/isa/clock.c (working copy) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); */ #include "opt_apic.h" +#include "opt_atpic.h" #include "opt_clock.h" #include "opt_kdtrace.h" #include "opt_isa.h" @@ -65,7 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef DEV_APIC +#if defined(DEV_APIC) || defined(DEV_ATPIC) #include #endif #include -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:17:16 2010 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 ACD9B1065670; Sun, 17 Jan 2010 19:17:16 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D3EE8FC18; Sun, 17 Jan 2010 19:17:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJHGhU020595; Sun, 17 Jan 2010 19:17:16 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJHGUp020593; Sun, 17 Jan 2010 19:17:16 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171917.o0HJHGUp020593@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202516 - head/sys/netinet 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, 17 Jan 2010 19:17:16 -0000 Author: rrs Date: Sun Jan 17 19:17:16 2010 New Revision: 202516 URL: http://svn.freebsd.org/changeset/base/202516 Log: Remove strange APPLE define that leaked through the scrubber scripts. Scripts are now fixed so this won't happen again. Modified: head/sys/netinet/sctp_constants.h Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sun Jan 17 18:37:36 2010 (r202515) +++ head/sys/netinet/sctp_constants.h Sun Jan 17 19:17:16 2010 (r202516) @@ -276,28 +276,16 @@ __FBSDID("$FreeBSD$"); #define SCTP_SCALE_FOR_ADDR 2 /* default AUTO_ASCONF mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_AUTO_ASCONF) -#define SCTP_DEFAULT_AUTO_ASCONF 0 -#else #define SCTP_DEFAULT_AUTO_ASCONF 1 -#endif /* default MULTIPLE_ASCONF mode enable(1)/disable(0) value (sysctl) */ #define SCTP_DEFAULT_MULTIPLE_ASCONFS 0 /* default MOBILITY_BASE mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_MOBILITY_BASE) -#define SCTP_DEFAULT_MOBILITY_BASE 0 -#else #define SCTP_DEFAULT_MOBILITY_BASE 0 -#endif /* default MOBILITY_FASTHANDOFF mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) #define SCTP_DEFAULT_MOBILITY_FASTHANDOFF 0 -#else -#define SCTP_DEFAULT_MOBILITY_FASTHANDOFF 0 -#endif /* * Theshold for rwnd updates, we have to read (sb_hiwat >> From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:21:50 2010 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 E223E1065692; Sun, 17 Jan 2010 19:21:50 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2D828FC1A; Sun, 17 Jan 2010 19:21:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJLosS021679; Sun, 17 Jan 2010 19:21:50 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJLopD021677; Sun, 17 Jan 2010 19:21:50 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171921.o0HJLopD021677@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202517 - head/sys/netinet 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, 17 Jan 2010 19:21:51 -0000 Author: rrs Date: Sun Jan 17 19:21:50 2010 New Revision: 202517 URL: http://svn.freebsd.org/changeset/base/202517 Log: Remove another set of "leaked" ifdefs that somehow found their way into FreeBSD. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Jan 17 19:17:16 2010 (r202516) +++ head/sys/netinet/sctp_output.c Sun Jan 17 19:21:50 2010 (r202517) @@ -3490,11 +3490,7 @@ sctp_lowlevel_chunk_output(struct sctp_i tos_value = inp->ip_inp.inp.inp_ip_tos; } if ((nofragment_flag) && (port == 0)) { -#if defined(WITH_CONVERT_IP_OFF) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__Userspace__) ip->ip_off = IP_DF; -#else - ip->ip_off = htons(IP_DF); -#endif } else ip->ip_off = 0; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:24:30 2010 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 95B89106566B; Sun, 17 Jan 2010 19:24:30 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B6CB8FC14; Sun, 17 Jan 2010 19:24:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJOU0I022336; Sun, 17 Jan 2010 19:24:30 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJOU36022334; Sun, 17 Jan 2010 19:24:30 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171924.o0HJOU36022334@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202518 - head/sys/netinet 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, 17 Jan 2010 19:24:30 -0000 Author: rrs Date: Sun Jan 17 19:24:30 2010 New Revision: 202518 URL: http://svn.freebsd.org/changeset/base/202518 Log: More leaked ifdefs for APPLE and its mobility stuff. Modified: head/sys/netinet/sctp_sysctl.c Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Sun Jan 17 19:21:50 2010 (r202517) +++ head/sys/netinet/sctp_sysctl.c Sun Jan 17 19:24:30 2010 (r202518) @@ -556,9 +556,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) if (error == 0) { RANGECHK(SCTP_BASE_SYSCTL(sctp_sendspace), SCTPCTL_MAXDGRAM_MIN, SCTPCTL_MAXDGRAM_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_recvspace), SCTPCTL_RECVSPACE_MIN, SCTPCTL_RECVSPACE_MAX); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF) RANGECHK(SCTP_BASE_SYSCTL(sctp_auto_asconf), SCTPCTL_AUTOASCONF_MIN, SCTPCTL_AUTOASCONF_MAX); -#endif RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_nonce), SCTPCTL_ECN_NONCE_MIN, SCTPCTL_ECN_NONCE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); @@ -613,12 +611,8 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_default_frag_interleave), SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN, SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_vtag_time_wait), SCTPCTL_TIME_WAIT_MIN, SCTPCTL_TIME_WAIT_MAX); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_BASE) RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_base), SCTPCTL_MOBILITY_BASE_MIN, SCTPCTL_MOBILITY_BASE_MAX); -#endif -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), SCTPCTL_MOBILITY_FASTHANDOFF_MIN, SCTPCTL_MOBILITY_FASTHANDOFF_MAX); -#endif RANGECHK(SCTP_BASE_SYSCTL(sctp_udp_tunneling_for_client_enable), SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MIN, SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_enable_sack_immediately), SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN, SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly), SCTPCTL_NAT_FRIENDLY_INITS_MIN, SCTPCTL_NAT_FRIENDLY_INITS_MAX); @@ -660,11 +654,9 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, re &SCTP_BASE_SYSCTL(sctp_recvspace), 0, sysctl_sctp_check, "IU", SCTPCTL_RECVSPACE_DESC); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, auto_asconf, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_auto_asconf), 0, sysctl_sctp_check, "IU", SCTPCTL_AUTOASCONF_DESC); -#endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, ecn_enable, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_ecn_enable), 0, sysctl_sctp_check, "IU", @@ -871,17 +863,13 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, de &SCTP_BASE_SYSCTL(sctp_default_frag_interleave), 0, sysctl_sctp_check, "IU", SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_BASE) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mobility_base, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_mobility_base), 0, sysctl_sctp_check, "IU", SCTPCTL_MOBILITY_BASE_DESC); -#endif -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mobility_fasthandoff, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), 0, sysctl_sctp_check, "IU", SCTPCTL_MOBILITY_FASTHANDOFF_DESC); -#endif #if defined(SCTP_LOCAL_TRACE_BUF) SYSCTL_STRUCT(_net_inet_sctp, OID_AUTO, log, CTLFLAG_RD, From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:33:32 2010 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 BE95A106566C; Sun, 17 Jan 2010 19:33:32 +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 AE5E28FC0C; Sun, 17 Jan 2010 19:33:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJXWWs024454; Sun, 17 Jan 2010 19:33:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJXWZf024452; Sun, 17 Jan 2010 19:33:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001171933.o0HJXWZf024452@svn.freebsd.org> From: Christian Brueffer Date: Sun, 17 Jan 2010 19:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202519 - head/sbin/geom/class/mountver 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, 17 Jan 2010 19:33:32 -0000 Author: brueffer Date: Sun Jan 17 19:33:32 2010 New Revision: 202519 URL: http://svn.freebsd.org/changeset/base/202519 Log: Small fixes. Modified: head/sbin/geom/class/mountver/gmountver.8 Modified: head/sbin/geom/class/mountver/gmountver.8 ============================================================================== --- head/sbin/geom/class/mountver/gmountver.8 Sun Jan 17 19:24:30 2010 (r202518) +++ head/sbin/geom/class/mountver/gmountver.8 Sun Jan 17 19:33:32 2010 (r202519) @@ -54,7 +54,7 @@ .Sh DESCRIPTION The .Nm -utility is used to control mount verification GEOM class. +utility is used to control the mount verification GEOM class. When configured, it passes all the I/O requests to the underlying provider. When the underlying provider disappears - for example because the disk device got disconnected - it queues all the I/O requests and waits for the provider @@ -111,9 +111,10 @@ This can be set to a number between 0 an If set to 0 minimal debug information is printed, and if set to 3 the maximum amount of debug information is printed. .It Va kern.geom.mountver.check.check_ident : No 1 -This can be set to 0 or 1. If set to 0, +This can be set to 0 or 1. +If set to 0, .Nm -will reattach to the device even if the device reports different disk ID. +will reattach to the device even if the device reports a different disk ID. .El .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:35:38 2010 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 7E9551065692; Sun, 17 Jan 2010 19:35:38 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 642258FC12; Sun, 17 Jan 2010 19:35:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJZcSt024982; Sun, 17 Jan 2010 19:35:38 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJZcqU024979; Sun, 17 Jan 2010 19:35:38 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171935.o0HJZcqU024979@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202520 - head/sys/netinet 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, 17 Jan 2010 19:35:38 -0000 Author: rrs Date: Sun Jan 17 19:35:38 2010 New Revision: 202520 URL: http://svn.freebsd.org/changeset/base/202520 Log: This change syncs up the socketAPI stream-reset values to match those in linux and the I-D just released to the IETF. Modified: head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Sun Jan 17 19:33:32 2010 (r202519) +++ head/sys/netinet/sctp_uio.h Sun Jan 17 19:35:38 2010 (r202520) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); typedef uint32_t sctp_assoc_t; +/* Compatibility to previous define's */ +#define sctp_stream_reset_events sctp_stream_reset_event + /* On/Off setup for subscription to events */ struct sctp_event_subscribe { uint8_t sctp_data_io_event; @@ -57,7 +60,7 @@ struct sctp_event_subscribe { uint8_t sctp_adaptation_layer_event; uint8_t sctp_authentication_event; uint8_t sctp_sender_dry_event; - uint8_t sctp_stream_reset_events; + uint8_t sctp_stream_reset_event; }; /* ancillary data types */ @@ -402,19 +405,19 @@ union sctp_notification { }; /* notification types */ -#define SCTP_ASSOC_CHANGE 0x0001 -#define SCTP_PEER_ADDR_CHANGE 0x0002 -#define SCTP_REMOTE_ERROR 0x0003 -#define SCTP_SEND_FAILED 0x0004 -#define SCTP_SHUTDOWN_EVENT 0x0005 -#define SCTP_ADAPTATION_INDICATION 0x0006 +#define SCTP_ASSOC_CHANGE 0x0001 +#define SCTP_PEER_ADDR_CHANGE 0x0002 +#define SCTP_REMOTE_ERROR 0x0003 +#define SCTP_SEND_FAILED 0x0004 +#define SCTP_SHUTDOWN_EVENT 0x0005 +#define SCTP_ADAPTATION_INDICATION 0x0006 /* same as above */ -#define SCTP_ADAPTION_INDICATION 0x0006 -#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 -#define SCTP_AUTHENTICATION_EVENT 0x0008 -#define SCTP_STREAM_RESET_EVENT 0x0009 -#define SCTP_SENDER_DRY_EVENT 0x000a - +#define SCTP_ADAPTION_INDICATION 0x0006 +#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 +#define SCTP_AUTHENTICATION_EVENT 0x0008 +#define SCTP_STREAM_RESET_EVENT 0x0009 +#define SCTP_SENDER_DRY_EVENT 0x000a +#define SCTP__NOTIFICATIONS_STOPPED_EVENT 0x000b /* we dont send this */ /* * socket option structs */ Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun Jan 17 19:33:32 2010 (r202519) +++ head/sys/netinet/sctp_usrreq.c Sun Jan 17 19:35:38 2010 (r202520) @@ -2008,7 +2008,7 @@ flags_out: events->sctp_sender_dry_event = 1; if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT)) - events->sctp_stream_reset_events = 1; + events->sctp_stream_reset_event = 1; SCTP_INP_RUNLOCK(inp); *optsize = sizeof(struct sctp_event_subscribe); } @@ -3650,7 +3650,7 @@ sctp_setopt(struct socket *so, int optna sctp_feature_off(inp, SCTP_PCB_FLAGS_DRYEVNT); } - if (events->sctp_stream_reset_events) { + if (events->sctp_stream_reset_event) { sctp_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT); } else { sctp_feature_off(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:40:21 2010 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 8E7F2106566B; Sun, 17 Jan 2010 19:40:21 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F23E8FC1C; Sun, 17 Jan 2010 19:40:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJeLXc026079; Sun, 17 Jan 2010 19:40:21 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJeLoM026077; Sun, 17 Jan 2010 19:40:21 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171940.o0HJeLoM026077@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:40: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: r202521 - head/sys/netinet 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, 17 Jan 2010 19:40:21 -0000 Author: rrs Date: Sun Jan 17 19:40:21 2010 New Revision: 202521 URL: http://svn.freebsd.org/changeset/base/202521 Log: Pulls out another leaked windows ifdef that somehow made its way through the scrubber. Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Jan 17 19:35:38 2010 (r202520) +++ head/sys/netinet/sctputil.c Sun Jan 17 19:40:21 2010 (r202521) @@ -52,15 +52,9 @@ __FBSDID("$FreeBSD$"); #define NUMBER_OF_MTU_SIZES 18 -#if defined(__Windows__) && !defined(SCTP_LOCAL_TRACE_BUF) -#include "eventrace_netinet.h" -#include "sctputil.tmh" /* this is the file that will be auto - * generated */ -#else #ifndef KTR_SCTP #define KTR_SCTP KTR_SUBSYS #endif -#endif void sctp_sblog(struct sockbuf *sb, From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:47:42 2010 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 D67171065676; Sun, 17 Jan 2010 19:47:42 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6AAB8FC0A; Sun, 17 Jan 2010 19:47:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJlgRa027825; Sun, 17 Jan 2010 19:47:42 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJlghn027823; Sun, 17 Jan 2010 19:47:42 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001171947.o0HJlghn027823@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 17 Jan 2010 19:47: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: r202522 - head/lib/libpam/modules/pam_krb5 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, 17 Jan 2010 19:47:42 -0000 Author: marcel Date: Sun Jan 17 19:47:42 2010 New Revision: 202522 URL: http://svn.freebsd.org/changeset/base/202522 Log: Unbreak builds with _FREEFALL_CONFIG=yes, by forcing a lower WARNS level in that case. Modified: head/lib/libpam/modules/pam_krb5/Makefile Modified: head/lib/libpam/modules/pam_krb5/Makefile ============================================================================== --- head/lib/libpam/modules/pam_krb5/Makefile Sun Jan 17 19:40:21 2010 (r202521) +++ head/lib/libpam/modules/pam_krb5/Makefile Sun Jan 17 19:47:42 2010 (r202522) @@ -29,6 +29,7 @@ SRCS= pam_krb5.c MAN= pam_krb5.8 .if defined(_FREEFALL_CONFIG) CFLAGS+=-D_FREEFALL_CONFIG +WARNS= 3 .endif DPADD= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:48:00 2010 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 1106B106566B; Sun, 17 Jan 2010 19:48:00 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01C2E8FC12; Sun, 17 Jan 2010 19:48:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJlxxn027925; Sun, 17 Jan 2010 19:47:59 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJlxTb027923; Sun, 17 Jan 2010 19:47:59 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171947.o0HJlxTb027923@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:47:59 +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: r202523 - head/sys/netinet 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, 17 Jan 2010 19:48:00 -0000 Author: rrs Date: Sun Jan 17 19:47:59 2010 New Revision: 202523 URL: http://svn.freebsd.org/changeset/base/202523 Log: Bug fix: If the allocation of a socket failed and we freed the inpcb, it was possible to not set the proper flags on the pcb (i.e. the socket is not there). This is HIGHLY unlikely since no one else should be able to find the socket.. but for consistency we do the proper loop thing to make sure that we mark the socket as gone on the PCB. Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun Jan 17 19:47:42 2010 (r202522) +++ head/sys/netinet/sctp_usrreq.c Sun Jan 17 19:47:59 2010 (r202523) @@ -551,6 +551,7 @@ sctp_attach(struct socket *so, int proto sctp_log_closing(inp, NULL, 17); #endif if (error != 0) { +try_again: flags = inp->sctp_flags; if (((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && (atomic_cmpset_int(&inp->sctp_flags, flags, (flags | SCTP_PCB_FLAGS_SOCKET_GONE | SCTP_PCB_FLAGS_CLOSE_IP)))) { @@ -561,7 +562,12 @@ sctp_attach(struct socket *so, int proto sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, SCTP_CALLED_AFTER_CMPSET_OFCLOSE); } else { - SCTP_INP_WUNLOCK(inp); + flags = inp->sctp_flags; + if ((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { + goto try_again; + } else { + SCTP_INP_WUNLOCK(inp); + } } return error; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:52:14 2010 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 01CBF1065672; Sun, 17 Jan 2010 19:52:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 4658B8FC12; Sun, 17 Jan 2010 19:52:12 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0HJq9Ko008393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 17 Jan 2010 21:52:09 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0HJq9ek043480; Sun, 17 Jan 2010 21:52:09 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0HJq92k043479; Sun, 17 Jan 2010 21:52:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 17 Jan 2010 21:52:09 +0200 From: Kostik Belousov To: Christian Brueffer Message-ID: <20100117195209.GI62907@deviant.kiev.zoral.com.ua> References: <201001171817.o0HIH0Tl005741@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LYDt+Tnt2WQ/hIRe" Content-Disposition: inline In-Reply-To: <201001171817.o0HIH0Tl005741@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r202501 - stable/8 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, 17 Jan 2010 19:52:14 -0000 --LYDt+Tnt2WQ/hIRe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 17, 2010 at 06:17:00PM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Sun Jan 17 18:17:00 2010 > New Revision: 202501 > URL: http://svn.freebsd.org/changeset/base/202501 >=20 > Log: > MFC: r197056 by des > =20 > Fix comment about KERNFAST. > =20 > PR: 142854 > Submitted by: Nikolay Denev >=20 > Modified: > stable/8/Makefile.inc1 > Directory Properties: > stable/8/ (props changed) >=20 > Modified: stable/8/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/8/Makefile.inc1 Sun Jan 17 17:52:35 2010 (r202500) > +++ stable/8/Makefile.inc1 Sun Jan 17 18:17:00 2010 (r202501) > @@ -5,7 +5,7 @@ > # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir > # -DNO_CLEAN do not clean at all > # -DNO_SHARE do not go into share subdir > -# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELCONFIG > +# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELDEPEND > # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel > # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel > # -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel Am I right that you did this merge on partial checkout, limited by depth 1 ? --LYDt+Tnt2WQ/hIRe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktTamgACgkQC3+MBN1Mb4gS9QCgvoXo/USB/cMvcKQKOsiH3kKD QM8AoMKkVXTXWOIcM5LO1lMLpFf9Eyg3 =+oMQ -----END PGP SIGNATURE----- --LYDt+Tnt2WQ/hIRe-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 19:58:27 2010 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 1A9861065693; Sun, 17 Jan 2010 19:58:27 +0000 (UTC) (envelope-from chris@brueffer.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 82A888FC20; Sun, 17 Jan 2010 19:58:26 +0000 (UTC) Received: from brueffer.de (84-73-206-110.dclient.hispeed.ch [84.73.206.110]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MbtgI-1NFU5W3C90-00JRXr; Sun, 17 Jan 2010 20:58:25 +0100 Received: by brueffer.de (Postfix, from userid 1001) id 7616917040; Sun, 17 Jan 2010 19:58:22 +0100 (CET) Date: Sun, 17 Jan 2010 19:58:22 +0100 From: Christian Brueffer To: Kostik Belousov Message-ID: <20100117185821.GA1918@serenity> References: <201001171817.o0HIH0Tl005741@svn.freebsd.org> <20100117195209.GI62907@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <20100117195209.GI62907@deviant.kiev.zoral.com.ua> X-Operating-System: FreeBSD 9.0-CURRENT X-PGP-Key: http://people.FreeBSD.org/~brueffer/brueffer.key.asc X-PGP-Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D User-Agent: Mutt/1.5.19 (2009-01-05) X-Provags-ID: V01U2FsdGVkX1+Rj2cKlV+Ha5M8HfKBOKTJeA/3ik9uGVYlrTY mYa2g4Mo3ECG5ut4Upt8l+I2shwQRxC0VDxpLRaz5YRadCRqQg 24IqHAA1xbIEheyNyDNPy6apZEHwnF3 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r202501 - stable/8 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, 17 Jan 2010 19:58:27 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 17, 2010 at 09:52:09PM +0200, Kostik Belousov wrote: > On Sun, Jan 17, 2010 at 06:17:00PM +0000, Christian Brueffer wrote: > > Author: brueffer > > Date: Sun Jan 17 18:17:00 2010 > > New Revision: 202501 > > URL: http://svn.freebsd.org/changeset/base/202501 > >=20 > > Log: > > MFC: r197056 by des > > =20 > > Fix comment about KERNFAST. > > =20 > > PR: 142854 > > Submitted by: Nikolay Denev > >=20 > > Modified: > > stable/8/Makefile.inc1 > > Directory Properties: > > stable/8/ (props changed) > >=20 > > Modified: stable/8/Makefile.inc1 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- stable/8/Makefile.inc1 Sun Jan 17 17:52:35 2010 (r202500) > > +++ stable/8/Makefile.inc1 Sun Jan 17 18:17:00 2010 (r202501) > > @@ -5,7 +5,7 @@ > > # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir > > # -DNO_CLEAN do not clean at all > > # -DNO_SHARE do not go into share subdir > > -# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELCONFIG > > +# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELDEPEND > > # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel > > # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel > > # -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel >=20 > Am I right that you did this merge on partial checkout, limited by depth = 1 ? Full checkout, but I did the merge with -depth empty to avoid propagating the mergeinfo down the subdirectories. Was that the wrong thing to do? - Christian --=20 Christian Brueffer chris@unixpages.org brueffer@FreeBSD.org GPG Key: http://people.freebsd.org/~brueffer/brueffer.key.asc GPG Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAktTXc0ACgkQbHYXjKDtmC2koQCaAlRA4vwEsSVzeZK9nG8BaPME J2AAoLnRc3NYNiQV5Syq/A8ZmDb6FiVL =gdZ4 -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 20:00:21 2010 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 BC5031065676; Sun, 17 Jan 2010 20:00:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 482228FC16; Sun, 17 Jan 2010 20:00:20 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0HK0HA0009360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 17 Jan 2010 22:00:17 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0HK0Hum043611; Sun, 17 Jan 2010 22:00:17 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0HK0HhD043610; Sun, 17 Jan 2010 22:00:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 17 Jan 2010 22:00:17 +0200 From: Kostik Belousov To: Christian Brueffer Message-ID: <20100117200017.GK62907@deviant.kiev.zoral.com.ua> References: <201001171817.o0HIH0Tl005741@svn.freebsd.org> <20100117195209.GI62907@deviant.kiev.zoral.com.ua> <20100117185821.GA1918@serenity> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K511Q2pAJ3dpTMb/" Content-Disposition: inline In-Reply-To: <20100117185821.GA1918@serenity> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r202501 - stable/8 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, 17 Jan 2010 20:00:21 -0000 --K511Q2pAJ3dpTMb/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 17, 2010 at 07:58:22PM +0100, Christian Brueffer wrote: > On Sun, Jan 17, 2010 at 09:52:09PM +0200, Kostik Belousov wrote: > > On Sun, Jan 17, 2010 at 06:17:00PM +0000, Christian Brueffer wrote: > > > Author: brueffer > > > Date: Sun Jan 17 18:17:00 2010 > > > New Revision: 202501 > > > URL: http://svn.freebsd.org/changeset/base/202501 > > >=20 > > > Log: > > > MFC: r197056 by des > > > =20 > > > Fix comment about KERNFAST. > > > =20 > > > PR: 142854 > > > Submitted by: Nikolay Denev > > >=20 > > > Modified: > > > stable/8/Makefile.inc1 > > > Directory Properties: > > > stable/8/ (props changed) > > >=20 > > > Modified: stable/8/Makefile.inc1 > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > --- stable/8/Makefile.inc1 Sun Jan 17 17:52:35 2010 (r202500) > > > +++ stable/8/Makefile.inc1 Sun Jan 17 18:17:00 2010 (r202501) > > > @@ -5,7 +5,7 @@ > > > # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir > > > # -DNO_CLEAN do not clean at all > > > # -DNO_SHARE do not go into share subdir > > > -# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELCON= FIG > > > +# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELDEP= END > > > # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel > > > # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel > > > # -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel > >=20 > > Am I right that you did this merge on partial checkout, limited by dept= h 1 ? >=20 > Full checkout, but I did the merge with -depth empty to avoid > propagating the mergeinfo down the subdirectories. Was that the wrong > thing to do? I think yes. You should merge the whole tree and commit it as a whole, in such situation. Alternatively, it seems that most people do not see much harm in merging to the files at top level. --K511Q2pAJ3dpTMb/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktTbFAACgkQC3+MBN1Mb4jwoACgi6/zJ/pamTkCWdumKBhrQKEC WUgAoOt01ENE83GzyU5YP+G2jcVyH+oD =dQLz -----END PGP SIGNATURE----- --K511Q2pAJ3dpTMb/-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 20:18:59 2010 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 655971065670; Sun, 17 Jan 2010 20:18:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 546898FC12; Sun, 17 Jan 2010 20:18:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HKIxqK035176; Sun, 17 Jan 2010 20:18:59 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HKIxP3035174; Sun, 17 Jan 2010 20:18:59 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001172018.o0HKIxP3035174@svn.freebsd.org> From: Rick Macklem Date: Sun, 17 Jan 2010 20:18:59 +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: r202524 - stable/8/sys/fs/nfsclient 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, 17 Jan 2010 20:18:59 -0000 Author: rmacklem Date: Sun Jan 17 20:18:59 2010 New Revision: 202524 URL: http://svn.freebsd.org/changeset/base/202524 Log: MFC: r201439 Fix three related problems in the experimental nfs client when checking for conflicts w.r.t. byte range locks for NFSv4. 1 - Return 0 instead of EACCES when a conflict is found, for F_GETLK. 2 - Check for "same file" when checking for a conflict. 3 - Don't check for a conflict for the F_UNLCK case. Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clstate.c Sun Jan 17 19:47:59 2010 (r202523) +++ stable/8/sys/fs/nfsclient/nfs_clstate.c Sun Jan 17 20:18:59 2010 (r202524) @@ -116,8 +116,8 @@ static int nfscl_checkconflict(struct nf u_int8_t *, struct nfscllock **); static void nfscl_freelockowner(struct nfscllockowner *, int); static void nfscl_freealllocks(struct nfscllockownerhead *, int); -static int nfscl_localconflict(struct nfsclclient *, struct nfscllock *, - u_int8_t *, struct nfscldeleg *, struct nfscllock **); +static int nfscl_localconflict(struct nfsclclient *, u_int8_t *, int, + struct nfscllock *, u_int8_t *, struct nfscldeleg *, struct nfscllock **); static void nfscl_newopen(struct nfsclclient *, struct nfscldeleg *, struct nfsclowner **, struct nfsclowner **, struct nfsclopen **, struct nfsclopen **, u_int8_t *, u_int8_t *, int, int *); @@ -955,7 +955,8 @@ nfscl_getbytelock(vnode_t vp, u_int64_t lhp = &op->nfso_lock; } if (!error && !recovery) - error = nfscl_localconflict(clp, nlop, ownp, ldp, NULL); + error = nfscl_localconflict(clp, np->n_fhp->nfh_fh, + np->n_fhp->nfh_len, nlop, ownp, ldp, NULL); if (error) { if (!recovery) { nfscl_clrelease(clp); @@ -1047,7 +1048,7 @@ nfscl_relbytelock(vnode_t vp, u_int64_t struct nfscldeleg *dp; struct nfsnode *np; u_int8_t own[NFSV4CL_LOCKNAMELEN]; - int ret = 0, fnd, error; + int ret = 0, fnd; np = VTONFS(vp); *lpp = NULL; @@ -1082,16 +1083,6 @@ nfscl_relbytelock(vnode_t vp, u_int64_t dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len); - /* Search for a local conflict. */ - error = nfscl_localconflict(clp, nlop, own, dp, NULL); - if (error) { - NFSUNLOCKCLSTATE(); - FREE((caddr_t)nlop, M_NFSCLLOCK); - if (other_lop != NULL) - FREE((caddr_t)other_lop, M_NFSCLLOCK); - return (error); - } - /* * First, unlock any local regions on a delegation. */ @@ -3169,8 +3160,9 @@ nfscl_getmnt(u_int32_t cbident) * a write lock or this is an unlock. */ static int -nfscl_localconflict(struct nfsclclient *clp, struct nfscllock *nlop, - u_int8_t *own, struct nfscldeleg *dp, struct nfscllock **lopp) +nfscl_localconflict(struct nfsclclient *clp, u_int8_t *fhp, int fhlen, + struct nfscllock *nlop, u_int8_t *own, struct nfscldeleg *dp, + struct nfscllock **lopp) { struct nfsclowner *owp; struct nfsclopen *op; @@ -3183,10 +3175,13 @@ nfscl_localconflict(struct nfsclclient * } LIST_FOREACH(owp, &clp->nfsc_owner, nfsow_list) { LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { - ret = nfscl_checkconflict(&op->nfso_lock, nlop, own, - lopp); - if (ret) - return (ret); + if (op->nfso_fhlen == fhlen && + !NFSBCMP(op->nfso_fh, fhp, fhlen)) { + ret = nfscl_checkconflict(&op->nfso_lock, nlop, + own, lopp); + if (ret) + return (ret); + } } } return (0); @@ -3245,10 +3240,9 @@ nfscl_lockt(vnode_t vp, struct nfsclclie nfscl_filllockowner(p, own); NFSLOCKCLSTATE(); dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len); - error = nfscl_localconflict(clp, &nlck, own, dp, &lop); - if (error == NFSERR_DENIED) - error = EACCES; - if (error) { + error = nfscl_localconflict(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, + &nlck, own, dp, &lop); + if (error != 0) { fl->l_whence = SEEK_SET; fl->l_start = lop->nfslo_first; if (lop->nfslo_end == NFS64BITSSET) @@ -3257,6 +3251,7 @@ nfscl_lockt(vnode_t vp, struct nfsclclie fl->l_len = lop->nfslo_end - lop->nfslo_first; fl->l_pid = (pid_t)0; fl->l_type = lop->nfslo_type; + error = -1; /* no RPC required */ } else if (dp != NULL && ((dp->nfsdl_flags & NFSCLDL_WRITE) || fl->l_type == F_RDLCK)) { /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 20:49:35 2010 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 387A1106568F; Sun, 17 Jan 2010 20:49:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27DA08FC1A; Sun, 17 Jan 2010 20:49:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HKnZNC042011; Sun, 17 Jan 2010 20:49:35 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HKnZNW042009; Sun, 17 Jan 2010 20:49:35 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001172049.o0HKnZNW042009@svn.freebsd.org> From: Rick Macklem Date: Sun, 17 Jan 2010 20:49: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: r202525 - stable/8/sys/fs/nfsserver 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, 17 Jan 2010 20:49:35 -0000 Author: rmacklem Date: Sun Jan 17 20:49:34 2010 New Revision: 202525 URL: http://svn.freebsd.org/changeset/base/202525 Log: MFC: r201442 The test for "same client" for the experimental nfs server over NFSv4 was broken w.r.t. byte range lock conflicts when it was the same client and the request used the open_to_lock_owner4 case, since lckstp->ls_clp was not set. This patch fixes it by using "clp" instead of "lckstp->ls_clp". Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sun Jan 17 20:18:59 2010 (r202524) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sun Jan 17 20:49:34 2010 (r202525) @@ -1753,7 +1753,7 @@ tryagain: (new_lop->lo_flags == NFSLCK_WRITE || lop->lo_flags == NFSLCK_WRITE) && lckstp != lop->lo_stp && - (lckstp->ls_clp != lop->lo_stp->ls_clp || + (clp != lop->lo_stp->ls_clp || lckstp->ls_ownerlen != lop->lo_stp->ls_ownerlen || NFSBCMP(lckstp->ls_owner, lop->lo_stp->ls_owner, lckstp->ls_ownerlen))) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 21:00:29 2010 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 28E961065676; Sun, 17 Jan 2010 21:00:29 +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 1841B8FC19; Sun, 17 Jan 2010 21:00:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HL0TrQ044463; Sun, 17 Jan 2010 21:00:29 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HL0TFM044459; Sun, 17 Jan 2010 21:00:29 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001172100.o0HL0TFM044459@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 21:00:29 +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: r202526 - head/sys/netinet 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, 17 Jan 2010 21:00:29 -0000 Author: tuexen Date: Sun Jan 17 21:00:28 2010 New Revision: 202526 URL: http://svn.freebsd.org/changeset/base/202526 Log: Get rid of a lot of duplicated code for NR-SACK handle. Generalize the SACK to code handle also NR-SACKs. Modified: head/sys/netinet/sctp_header.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_indata.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_structs.h Modified: head/sys/netinet/sctp_header.h ============================================================================== --- head/sys/netinet/sctp_header.h Sun Jan 17 20:49:34 2010 (r202525) +++ head/sys/netinet/sctp_header.h Sun Jan 17 21:00:28 2010 (r202526) @@ -284,13 +284,6 @@ struct sctp_sack_chunk { struct sctp_sack sack; } SCTP_PACKED; - -/* EY Following 3 structs define NR Selective Ack (NR_SACK) chunk */ -struct sctp_nr_gap_ack_block { - uint16_t start; /* NR Gap Ack block start */ - uint16_t end; /* NR Gap Ack block end */ -} SCTP_PACKED; - struct sctp_nr_sack { uint32_t cum_tsn_ack; /* cumulative TSN Ack */ uint32_t a_rwnd; /* updated a_rwnd of sender */ @@ -299,7 +292,6 @@ struct sctp_nr_sack { uint16_t num_dup_tsns; /* number of duplicate TSNs */ uint16_t reserved; /* not currently used */ /* struct sctp_gap_ack_block's follow */ - /* struct sctp_nr_gap_ack_block's follow */ /* uint32_t duplicate_tsn's follow */ } SCTP_PACKED; Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sun Jan 17 20:49:34 2010 (r202525) +++ head/sys/netinet/sctp_indata.c Sun Jan 17 21:00:28 2010 (r202526) @@ -439,12 +439,11 @@ abandon: * EY!-TODO- this tsn should be tagged nr only if it is * out-of-order, the if statement should be modified */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { nr_tsn = chk->rec.data.TSN_seq; SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { + if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { /* * EY The 1st should never happen, as in * process_a_data_chunk method this check @@ -525,11 +524,11 @@ abandon: * nr_gap and tag this tsn * NR */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible NR gap calculation?\n"); /* * EY The * 1st @@ -694,7 +693,8 @@ protocol_error: * calculate the gap and such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -750,11 +750,11 @@ protocol_error: * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible nr TSN set 3?\n"); /* * EY The 1st should never * happen, as in @@ -773,7 +773,8 @@ protocol_error: SCTP_TCB_LOCK_ASSERT(stcb); SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, + if (compare_with_wrap(nr_tsn, + asoc->highest_tsn_inside_nr_map, MAX_TSN)) asoc->highest_tsn_inside_nr_map = nr_tsn; } @@ -1759,7 +1760,8 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); /* EY set this tsn present in nr_sack's nr_mapping_array */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); SCTP_REVERSE_OUT_TSN_PRES(gap, tsn, asoc); @@ -2015,7 +2017,8 @@ failed_express_del: * block here I should check if this delivered tsn * is out_of_order, if yes then update the nr_map */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { /* EY debugging block */ { /* @@ -2260,13 +2263,13 @@ failed_pdapi_express_del: sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* * EY It is added to the read queue in prev if block * here I should check if this delivered tsn is * out_of_order, if yes then update the nr_map */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { /* * EY check if the mapping_array and * nr_mapping array are consistent @@ -2412,6 +2415,10 @@ finish_express_del: SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); + /* + * EY - set tsn present in nr-map if doing nr-sacks and the tsn is + * non-renegable + */ if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack && (SCTP_BASE_SYSCTL(sctp_do_drain) == 0)) { @@ -3416,49 +3423,37 @@ sctp_process_segment_range(struct sctp_t } -static void +static int sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc, - struct sctp_sack_chunk *ch, uint32_t last_tsn, uint32_t * biggest_tsn_acked, + uint32_t last_tsn, uint32_t * biggest_tsn_acked, uint32_t * biggest_newly_acked_tsn, uint32_t * this_sack_lowest_newack, - int num_seg, int *ecn_seg_sums) + int num_seg, int num_nr_seg, int *ecn_seg_sums) { - /************************************************/ - /* process fragments and update sendqueue */ - /************************************************/ - struct sctp_sack *sack; struct sctp_gap_ack_block *frag, block; struct sctp_tmit_chunk *tp1; int i; int num_frs = 0; + int chunk_freed; + int non_revocable; + uint16_t frag_strt, frag_end; + uint32_t last_frag_high; - uint16_t frag_strt, frag_end, primary_flag_set; - u_long last_frag_high; - - /* - * @@@ JRI : TODO: This flag is not used anywhere .. remove? - */ - if (asoc->primary_destination->dest_state & SCTP_ADDR_SWITCH_PRIMARY) { - primary_flag_set = 1; - } else { - primary_flag_set = 0; - } - sack = &ch->sack; - - frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); - *offset += sizeof(block); - if (frag == NULL) { - return; - } tp1 = NULL; last_frag_high = 0; - for (i = 0; i < num_seg; i++) { + chunk_freed = 0; + + for (i = 0; i < (num_seg + num_nr_seg); i++) { + frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, + sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); + *offset += sizeof(block); + if (frag == NULL) { + return (chunk_freed); + } frag_strt = ntohs(frag->start); frag_end = ntohs(frag->end); /* some sanity checks on the fragment offsets */ if (frag_strt > frag_end) { /* this one is malformed, skip */ - frag++; continue; } if (compare_with_wrap((frag_end + last_tsn), *biggest_tsn_acked, @@ -3468,7 +3463,6 @@ sctp_handle_segments(struct mbuf *m, int /* mark acked dgs and find out the highestTSN being acked */ if (tp1 == NULL) { tp1 = TAILQ_FIRST(&asoc->sent_queue); - /* save the locations of the last frags */ last_frag_high = frag_end + last_tsn; } else { @@ -3496,14 +3490,15 @@ sctp_handle_segments(struct mbuf *m, int } last_frag_high = frag_end + last_tsn; } - sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, - 0, &num_frs, biggest_newly_acked_tsn, - this_sack_lowest_newack, ecn_seg_sums); - frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); - *offset += sizeof(block); - if (frag == NULL) { - break; + if (i < num_seg) { + non_revocable = 0; + } else { + non_revocable = 1; + } + if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, + non_revocable, &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums)) { + chunk_freed = 1; } } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) { @@ -3512,6 +3507,7 @@ sctp_handle_segments(struct mbuf *m, int *biggest_newly_acked_tsn, last_tsn, SCTP_FR_LOG_BIGGEST_TSNS); } + return (chunk_freed); } static void @@ -4450,7 +4446,6 @@ sctp_express_handle_sack(struct sctp_tcb struct socket *so; #endif - SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { /* sa_ignore NO_NULL_CHK */ @@ -4525,10 +4520,10 @@ sctp_express_handle_sack(struct sctp_tcb if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_resync_tsn, MAX_TSN)) { asoc->nonce_sum_check = 1; /* - * now we must calculate what the base is. + * Now we must calculate what the base is. * We do this based on two things, we know * the total's for all the segments - * gap-acked in the SACK (none), We also + * gap-acked in the SACK (none). We also * know the SACK's nonce sum, its in * nonce_sum_flag. So we can build a truth * table to back-calculate the new value of @@ -4567,6 +4562,7 @@ again: /* sa_ignore FREED_MEMORY */ TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { if (tp1->window_probe) { + /* move back to data send queue */ sctp_window_probe_recovery(stcb, asoc, net, tp1); break; } @@ -4620,9 +4616,7 @@ again: */ if (sctp_fs_audit(asoc)) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - if (net->flight_size) { - net->flight_size = 0; - } + net->flight_size = 0; } asoc->total_flight = 0; asoc->total_flight_count = 0; @@ -4782,20 +4776,62 @@ again: } } +/* EY- nr_sack */ +/* Identifies the non-renegable tsns that are revoked*/ +static void +sctp_check_for_nr_revoked(struct sctp_tcb *stcb, + struct sctp_association *asoc, uint32_t cumack, + u_long biggest_tsn_acked) +{ + struct sctp_tmit_chunk *tp1; + + for (tp1 = TAILQ_FIRST(&asoc->sent_queue); tp1; tp1 = TAILQ_NEXT(tp1, sctp_next)) { + if (compare_with_wrap(tp1->rec.data.TSN_seq, cumack, + MAX_TSN)) { + /* + * ok this guy is either ACK or MARKED. If it is + * ACKED it has been previously acked but not this + * time i.e. revoked. If it is MARKED it was ACK'ed + * again. + */ + if (compare_with_wrap(tp1->rec.data.TSN_seq, biggest_tsn_acked, + MAX_TSN)) + break; + + + if (tp1->sent == SCTP_DATAGRAM_NR_ACKED) { + /* + * EY! a non-renegable TSN is revoked, need + * to abort the association + */ + /* + * EY TODO: put in the code to abort the + * assoc. + */ + return; + } else if (tp1->sent == SCTP_DATAGRAM_NR_MARKED) { + /* it has been re-acked in this SACK */ + tp1->sent = SCTP_DATAGRAM_NR_ACKED; + } + } + if (tp1->sent == SCTP_DATAGRAM_UNSENT) + break; + } + return; +} + void -sctp_handle_sack(struct mbuf *m, int offset, - struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, - struct sctp_nets *net_from, int *abort_now, int sack_len, uint32_t rwnd) +sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, + struct sctp_tcb *stcb, struct sctp_nets *net_from, + uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup, + int *abort_now, uint8_t flags, + uint32_t cum_ack, uint32_t rwnd) { struct sctp_association *asoc; - struct sctp_sack *sack; struct sctp_tmit_chunk *tp1, *tp2; - uint32_t cum_ack, last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, - this_sack_lowest_newack; + uint32_t last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack; uint32_t sav_cum_ack; - uint16_t num_seg, num_dup; uint16_t wake_him = 0; - unsigned int sack_length; uint32_t send_s = 0; long j; int accum_moved = 0; @@ -4831,15 +4867,13 @@ sctp_handle_sack(struct mbuf *m, int off * if in shutdown_recv state. */ SCTP_TCB_LOCK_ASSERT(stcb); - sack = &ch->sack; /* CMT DAC algo */ this_sack_lowest_newack = 0; j = 0; - sack_length = (unsigned int)sack_len; - /* ECN Nonce */ SCTP_STAT_INCR(sctps_slowpath_sack); - nonce_sum_flag = ch->ch.chunk_flags & SCTP_SACK_NONCE_SUM; - cum_ack = last_tsn = ntohl(sack->cum_tsn_ack); + last_tsn = cum_ack; + nonce_sum_flag = flags & SCTP_SACK_NONCE_SUM; + cmt_dac_flag = flags & SCTP_SACK_CMT_DAC; #ifdef SCTP_ASOCLOG_OF_TSNS stcb->asoc.cumack_log[stcb->asoc.cumack_log_at] = cum_ack; stcb->asoc.cumack_log_at++; @@ -4847,13 +4881,12 @@ sctp_handle_sack(struct mbuf *m, int off stcb->asoc.cumack_log_at = 0; } #endif - num_seg = ntohs(sack->num_gap_ack_blks); a_rwnd = rwnd; - /* CMT DAC algo */ - cmt_dac_flag = ch->ch.chunk_flags & SCTP_SACK_CMT_DAC; - num_dup = ntohs(sack->num_dup_tsns); - + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_SACK_ARRIVALS_ENABLE) { + sctp_misc_ints(SCTP_SACK_LOG_NORMAL, cum_ack, + rwnd, stcb->asoc.last_acked_seq, stcb->asoc.peers_rwnd); + } old_rwnd = stcb->asoc.peers_rwnd; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, @@ -4873,27 +4906,16 @@ sctp_handle_sack(struct mbuf *m, int off SCTP_LOG_NEW_SACK); } if ((num_dup) && (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_FR_LOGGING_ENABLE | SCTP_EARLYFR_LOGGING_ENABLE))) { - int off_to_dup, iii; + uint16_t i; uint32_t *dupdata, dblock; - off_to_dup = (num_seg * sizeof(struct sctp_gap_ack_block)) + sizeof(struct sctp_sack_chunk); - if ((off_to_dup + (num_dup * sizeof(uint32_t))) <= sack_length) { - dupdata = (uint32_t *) sctp_m_getptr(m, off_to_dup, + for (i = 0; i < num_dup; i++) { + dupdata = (uint32_t *) sctp_m_getptr(m, offset_dup + i * sizeof(uint32_t), sizeof(uint32_t), (uint8_t *) & dblock); - off_to_dup += sizeof(uint32_t); - if (dupdata) { - for (iii = 0; iii < num_dup; iii++) { - sctp_log_fr(*dupdata, 0, 0, SCTP_FR_DUPED); - dupdata = (uint32_t *) sctp_m_getptr(m, off_to_dup, - sizeof(uint32_t), (uint8_t *) & dblock); - if (dupdata == NULL) - break; - off_to_dup += sizeof(uint32_t); - } + if (dupdata == NULL) { + break; } - } else { - SCTP_PRINTF("Size invalid offset to dups:%d number dups:%d sack_len:%d num gaps:%d\n", - off_to_dup, num_dup, sack_length, num_seg); + sctp_log_fr(*dupdata, 0, 0, SCTP_FR_DUPED); } } if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { @@ -4915,8 +4937,6 @@ sctp_handle_sack(struct mbuf *m, int off hopeless_peer: panic("Impossible sack 1"); #else - - /* * no way, we have not even sent this TSN out yet. * Peer is hopelessly messed up with us. @@ -4956,8 +4976,7 @@ sctp_handle_sack(struct mbuf *m, int off /* update the Rwnd of the peer */ if (TAILQ_EMPTY(&asoc->sent_queue) && TAILQ_EMPTY(&asoc->send_queue) && - (asoc->stream_queue_cnt == 0) - ) { + (asoc->stream_queue_cnt == 0)) { /* nothing left on send/sent and strmq */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_RWND_ENABLE) { sctp_log_rwnd_set(SCTP_SET_PEER_RWND_VIA_SACK, @@ -5128,14 +5147,7 @@ sctp_handle_sack(struct mbuf *m, int off /* always set this up to cum-ack */ asoc->this_sack_highest_gap = last_tsn; - /* Move offset up to point to gaps/dups */ - offset += sizeof(struct sctp_sack_chunk); - if (((num_seg * (sizeof(struct sctp_gap_ack_block))) + sizeof(struct sctp_sack_chunk)) > sack_length) { - - /* skip corrupt segments */ - goto skip_segments; - } - if (num_seg > 0) { + if ((num_seg > 0) || (num_nr_seg > 0)) { /* * CMT: SFR algo (and HTNA) - this_sack_highest_newack has @@ -5153,10 +5165,11 @@ sctp_handle_sack(struct mbuf *m, int off * handling NEWLY ACKED chunks. this_sack_lowest_newack is * used for CMT DAC algo. saw_newack will also change. */ - sctp_handle_segments(m, &offset, stcb, asoc, ch, last_tsn, - &biggest_tsn_acked, &biggest_tsn_newly_acked, &this_sack_lowest_newack, - num_seg, &ecn_seg_sums); - + if (sctp_handle_segments(m, &offset_seg, stcb, asoc, last_tsn, &biggest_tsn_acked, + &biggest_tsn_newly_acked, &this_sack_lowest_newack, + num_seg, num_nr_seg, &ecn_seg_sums)) { + wake_him++; + } if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { /* * validate the biggest_tsn_acked in the gap acks if @@ -5172,7 +5185,6 @@ sctp_handle_sack(struct mbuf *m, int off } } } -skip_segments: /*******************************************/ /* cancel ALL T3-send timer if accum moved */ /*******************************************/ @@ -5310,6 +5322,19 @@ done_with_it: if (tp1 != NULL) { /* Peer revoked all dg's marked or acked */ TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { + /* + * EY- maybe check only if it is nr_acked + * nr_marked may not be possible + */ + if ((tp1->sent == SCTP_DATAGRAM_NR_ACKED) || + (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { + /* + * EY! - TODO: Something previously + * nr_gapped is reneged, abort the + * association + */ + return; + } if ((tp1->sent > SCTP_DATAGRAM_RESEND) && (tp1->sent < SCTP_FORWARD_TSN_SKIP)) { tp1->sent = SCTP_DATAGRAM_SENT; @@ -5345,6 +5370,10 @@ done_with_it: else asoc->saw_sack_with_frags = 0; + /* EY! - not sure about if there should be an IF */ + if (num_nr_seg > 0) + sctp_check_for_nr_revoked(stcb, asoc, cum_ack, biggest_tsn_acked); + /* JRS - Use the congestion control given in the CC module */ asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); @@ -5480,7 +5509,7 @@ done_with_it: if (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && SCTP_BASE_SYSCTL(sctp_cmt_use_dac) && (cmt_dac_flag == 0)) { this_sack_lowest_newack = cum_ack; } - if (num_seg > 0) { + if ((num_seg > 0) || (num_nr_seg > 0)) { sctp_strike_gap_ack_chunks(stcb, asoc, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack, accum_moved); } @@ -5603,9 +5632,12 @@ again: } if (net->flight_size) { j++; - sctp_timer_start(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net); + if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { + sctp_timer_start(SCTP_TIMER_TYPE_SEND, + stcb->sctp_ep, stcb, net); + } if (net->window_probe) { + net->window_probe = 0; } } else { if (net->window_probe) { @@ -5613,7 +5645,6 @@ again: * In window probes we must assure a timer * is still running there */ - if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); @@ -5661,7 +5692,11 @@ again: done_once = 1; goto again; } - /* Fix up the a-p-a-p for future PR-SCTP sends */ + /*********************************************/ + /* Here we perform PR-SCTP procedures */ + /* (section 4.2) */ + /*********************************************/ + /* C1. update advancedPeerAckPoint */ if (compare_with_wrap(cum_ack, asoc->advanced_peer_ack_point, MAX_TSN)) { asoc->advanced_peer_ack_point = cum_ack; } @@ -5773,8 +5808,8 @@ sctp_kick_prsctp_reorder_queue(struct sc * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -5874,7 +5909,8 @@ sctp_kick_prsctp_reorder_queue(struct sc * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -6359,1743 +6395,3 @@ sctp_handle_forward_tsn(struct sctp_tcb sctp_deliver_reasm_check(stcb, &stcb->asoc); } } - -/* EY fully identical to sctp_express_handle_sack, duplicated for only naming convention */ -void -sctp_express_handle_nr_sack(struct sctp_tcb *stcb, uint32_t cumack, - uint32_t rwnd, int nonce_sum_flag, int *abort_now) -{ - struct sctp_nets *net; - struct sctp_association *asoc; - struct sctp_tmit_chunk *tp1, *tp2; - uint32_t old_rwnd; - int win_probe_recovery = 0; - int win_probe_recovered = 0; - int j, done_once = 0; - - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_SACK_ARRIVALS_ENABLE) { - sctp_misc_ints(SCTP_SACK_LOG_EXPRESS, cumack, - rwnd, stcb->asoc.last_acked_seq, stcb->asoc.peers_rwnd); - } - SCTP_TCB_LOCK_ASSERT(stcb); -#ifdef SCTP_ASOCLOG_OF_TSNS - stcb->asoc.cumack_log[stcb->asoc.cumack_log_at] = cumack; - stcb->asoc.cumack_log_at++; - if (stcb->asoc.cumack_log_at > SCTP_TSN_LOG_SIZE) { - stcb->asoc.cumack_log_at = 0; - } -#endif - asoc = &stcb->asoc; - old_rwnd = asoc->peers_rwnd; - if (compare_with_wrap(asoc->last_acked_seq, cumack, MAX_TSN)) { - /* old ack */ - return; - } else if (asoc->last_acked_seq == cumack) { - /* Window update sack */ - asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); - if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { - /* SWS sender side engages */ - asoc->peers_rwnd = 0; - } - if (asoc->peers_rwnd > old_rwnd) { - goto again; - } - return; - } - /* First setup for CC stuff */ - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->prev_cwnd = net->cwnd; - net->net_ack = 0; - net->net_ack2 = 0; - - /* - * CMT: Reset CUC and Fast recovery algo variables before - * SACK processing - */ - net->new_pseudo_cumack = 0; - net->will_exit_fast_recovery = 0; - } - if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { - uint32_t send_s; - - if (!TAILQ_EMPTY(&asoc->sent_queue)) { - tp1 = TAILQ_LAST(&asoc->sent_queue, - sctpchunk_listhead); - send_s = tp1->rec.data.TSN_seq + 1; - } else { - send_s = asoc->sending_seq; - } - if ((cumack == send_s) || - compare_with_wrap(cumack, send_s, MAX_TSN)) { -#ifndef INVARIANTS - struct mbuf *oper; - -#endif -#ifdef INVARIANTS - panic("Impossible sack 1"); -#else - *abort_now = 1; - /* XXX */ - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - sizeof(uint32_t); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); - } - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - return; -#endif - } - } - asoc->this_sack_highest_gap = cumack; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INDATA, - __LINE__); - } - stcb->asoc.overall_error_count = 0; - if (compare_with_wrap(cumack, asoc->last_acked_seq, MAX_TSN)) { - /* process the new consecutive TSN first */ - tp1 = TAILQ_FIRST(&asoc->sent_queue); - while (tp1) { - tp2 = TAILQ_NEXT(tp1, sctp_next); - if (compare_with_wrap(cumack, tp1->rec.data.TSN_seq, - MAX_TSN) || - cumack == tp1->rec.data.TSN_seq) { - if (tp1->sent == SCTP_DATAGRAM_UNSENT) { - printf("Warning, an unsent is now acked?\n"); - } - /* - * ECN Nonce: Add the nonce to the sender's - * nonce sum - */ - asoc->nonce_sum_expect_base += tp1->rec.data.ect_nonce; - if (tp1->sent < SCTP_DATAGRAM_ACKED) { - /* - * If it is less than ACKED, it is - * now no-longer in flight. Higher - * values may occur during marking - */ - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { - sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_CA, - tp1->whoTo->flight_size, - tp1->book_size, - (uintptr_t) tp1->whoTo, - tp1->rec.data.TSN_seq); - } - sctp_flight_size_decrease(tp1); - /* sa_ignore NO_NULL_CHK */ - sctp_total_flight_decrease(stcb, tp1); - } - tp1->whoTo->net_ack += tp1->send_size; - if (tp1->snd_count < 2) { - /* - * True non-retransmited - * chunk - */ - tp1->whoTo->net_ack2 += - tp1->send_size; - - /* update RTO too? */ - if (tp1->do_rtt) { - tp1->whoTo->RTO = - /* - * sa_ignore - * NO_NULL_CHK - */ - sctp_calculate_rto(stcb, - asoc, tp1->whoTo, - &tp1->sent_rcv_time, - sctp_align_safe_nocopy); - tp1->do_rtt = 0; - } - } - /* - * CMT: CUCv2 algorithm. From the - * cumack'd TSNs, for each TSN being - * acked for the first time, set the - * following variables for the - * corresp destination. - * new_pseudo_cumack will trigger a - * cwnd update. - * find_(rtx_)pseudo_cumack will - * trigger search for the next - * expected (rtx-)pseudo-cumack. - */ - tp1->whoTo->new_pseudo_cumack = 1; - tp1->whoTo->find_pseudo_cumack = 1; - tp1->whoTo->find_rtx_pseudo_cumack = 1; - - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { - /* sa_ignore NO_NULL_CHK */ - sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); - } - } - if (tp1->sent == SCTP_DATAGRAM_RESEND) { - sctp_ucount_decr(asoc->sent_queue_retran_cnt); - } - if (tp1->rec.data.chunk_was_revoked) { - /* deflate the cwnd */ - tp1->whoTo->cwnd -= tp1->book_size; - tp1->rec.data.chunk_was_revoked = 0; - } - tp1->sent = SCTP_DATAGRAM_ACKED; - TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next); - if (tp1->data) { - /* sa_ignore NO_NULL_CHK */ - sctp_free_bufspace(stcb, asoc, tp1, 1); - sctp_m_freem(tp1->data); - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(asoc->last_acked_seq, - cumack, - tp1->rec.data.TSN_seq, - 0, - 0, - SCTP_LOG_FREE_SENT); - } - tp1->data = NULL; - asoc->sent_queue_cnt--; - sctp_free_a_chunk(stcb, tp1); - tp1 = tp2; - } else { - break; - } - } - - } - /* sa_ignore NO_NULL_CHK */ - if (stcb->sctp_socket) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - -#endif - - SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { - /* sa_ignore NO_NULL_CHK */ - sctp_wakeup_log(stcb, cumack, 1, SCTP_WAKESND_FROM_SACK); - } -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif - sctp_sowwakeup_locked(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif - } else { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { - sctp_wakeup_log(stcb, cumack, 1, SCTP_NOWAKE_FROM_SACK); - } - } - - /* JRS - Use the congestion control given in the CC module */ - if (asoc->last_acked_seq != cumack) - asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, 1, 0, 0); - - asoc->last_acked_seq = cumack; - - if (TAILQ_EMPTY(&asoc->sent_queue)) { - /* nothing left in-flight */ - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->flight_size = 0; - net->partial_bytes_acked = 0; - } - asoc->total_flight = 0; - asoc->total_flight_count = 0; - } - /* Fix up the a-p-a-p for future PR-SCTP sends */ - if (compare_with_wrap(cumack, asoc->advanced_peer_ack_point, MAX_TSN)) { - asoc->advanced_peer_ack_point = cumack; - } - /* ECN Nonce updates */ - if (asoc->ecn_nonce_allowed) { - if (asoc->nonce_sum_check) { - if (nonce_sum_flag != ((asoc->nonce_sum_expect_base) & SCTP_SACK_NONCE_SUM)) { - if (asoc->nonce_wait_for_ecne == 0) { - struct sctp_tmit_chunk *lchk; - - lchk = TAILQ_FIRST(&asoc->send_queue); - asoc->nonce_wait_for_ecne = 1; - if (lchk) { - asoc->nonce_wait_tsn = lchk->rec.data.TSN_seq; - } else { - asoc->nonce_wait_tsn = asoc->sending_seq; - } - } else { - if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_wait_tsn, MAX_TSN) || - (asoc->last_acked_seq == asoc->nonce_wait_tsn)) { - /* - * Misbehaving peer. We need - * to react to this guy - */ - asoc->ecn_allowed = 0; - asoc->ecn_nonce_allowed = 0; - } - } - } - } else { - /* See if Resynchronization Possible */ - if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_resync_tsn, MAX_TSN)) { - asoc->nonce_sum_check = 1; - /* - * now we must calculate what the base is. - * We do this based on two things, we know - * the total's for all the segments - * gap-acked in the SACK (none), We also - * know the SACK's nonce sum, its in - * nonce_sum_flag. So we can build a truth - * table to back-calculate the new value of - * asoc->nonce_sum_expect_base: - * - * SACK-flag-Value Seg-Sums Base 0 0 0 - * 1 0 1 0 1 1 1 1 0 - */ - asoc->nonce_sum_expect_base = (0 ^ nonce_sum_flag) & SCTP_SACK_NONCE_SUM; - } - } - } - /* RWND update */ - asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); - if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { - /* SWS sender side engages */ - asoc->peers_rwnd = 0; - } - if (asoc->peers_rwnd > old_rwnd) { - win_probe_recovery = 1; - } - /* Now assure a timer where data is queued at */ -again: - j = 0; - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - int to_ticks; - - if (win_probe_recovery && (net->window_probe)) { - win_probe_recovered = 1; - /* - * Find first chunk that was used with window probe - * and clear the sent - */ - /* sa_ignore FREED_MEMORY */ - TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { - if (tp1->window_probe) { - /* move back to data send queue */ - sctp_window_probe_recovery(stcb, asoc, net, tp1); - break; - } - } - } - if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); - } else { - to_ticks = MSEC_TO_TICKS(net->RTO); - } - if (net->flight_size) { - - j++; - (void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); - if (net->window_probe) { - net->window_probe = 0; - } - } else { - if (net->window_probe) { - /* - * In window probes we must assure a timer - * is still running there - */ - net->window_probe = 0; - (void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); - } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { - sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_22); - } - if (SCTP_BASE_SYSCTL(sctp_early_fr)) { - if (SCTP_OS_TIMER_PENDING(&net->fr_timer.timer)) { - SCTP_STAT_INCR(sctps_earlyfrstpidsck4); - sctp_timer_stop(SCTP_TIMER_TYPE_EARLYFR, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_23); - } - } - } - } - if ((j == 0) && - (!TAILQ_EMPTY(&asoc->sent_queue)) && - (asoc->sent_queue_retran_cnt == 0) && - (win_probe_recovered == 0) && - (done_once == 0)) { - /* - * huh, this should not happen unless all packets are - * PR-SCTP and marked to skip of course. - */ - if (sctp_fs_audit(asoc)) { - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->flight_size = 0; - } - asoc->total_flight = 0; - asoc->total_flight_count = 0; - asoc->sent_queue_retran_cnt = 0; - TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - sctp_flight_size_increase(tp1); - sctp_total_flight_increase(stcb, tp1); - } else if (tp1->sent == SCTP_DATAGRAM_RESEND) { - asoc->sent_queue_retran_cnt++; - } - } - } - done_once = 1; - goto again; - } - /**********************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 21:00:30 2010 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 5250D1065672; Sun, 17 Jan 2010 21:00:30 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 431C78FC1B; Sun, 17 Jan 2010 21:00:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HL0U8i044497; Sun, 17 Jan 2010 21:00:30 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HL0UZv044495; Sun, 17 Jan 2010 21:00:30 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001172100.o0HL0UZv044495@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 21:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202527 - head/lib/libc/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: Sun, 17 Jan 2010 21:00:30 -0000 Author: ed Date: Sun Jan 17 21:00:29 2010 New Revision: 202527 URL: http://svn.freebsd.org/changeset/base/202527 Log: Add forgotten break; keyword to getutxid(). We should not fall through to the ut_id comparison. Only ut_type should be compared when using OLD_TIME, NEW_TIME, BOOT_TIME or SHUTDOWN_TIME. Modified: head/lib/libc/gen/getutxent.c Modified: head/lib/libc/gen/getutxent.c ============================================================================== --- head/lib/libc/gen/getutxent.c Sun Jan 17 21:00:28 2010 (r202526) +++ head/lib/libc/gen/getutxent.c Sun Jan 17 21:00:29 2010 (r202527) @@ -164,6 +164,7 @@ getutxid(const struct utmpx *id) case SHUTDOWN_TIME: if (fu->fu_type == id->ut_type) goto found; + break; case USER_PROCESS: case INIT_PROCESS: case LOGIN_PROCESS: @@ -177,6 +178,7 @@ getutxid(const struct utmpx *id) MIN(sizeof fu->fu_id, sizeof id->ut_id)) == 0) goto found; } + break; } } From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 21:24:27 2010 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 E6BEA106566C; Sun, 17 Jan 2010 21:24:27 +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 D64028FC08; Sun, 17 Jan 2010 21:24:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLOR9m049819; Sun, 17 Jan 2010 21:24:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLOREj049816; Sun, 17 Jan 2010 21:24:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001172124.o0HLOREj049816@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 17 Jan 2010 21:24: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: r202528 - in head/sys: kern sys 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, 17 Jan 2010 21:24:28 -0000 Author: kib Date: Sun Jan 17 21:24:27 2010 New Revision: 202528 URL: http://svn.freebsd.org/changeset/base/202528 Log: Add new function vunref(9) that decrements vnode use count (and hold count) while vnode is exclusively locked. The code for vput(9), vrele(9) and vunref(9) is merged. In collaboration with: pho Reviewed by: alc MFC after: 3 weeks Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Jan 17 21:00:29 2010 (r202527) +++ head/sys/kern/vfs_subr.c Sun Jan 17 21:24:27 2010 (r202528) @@ -2149,37 +2149,44 @@ vrefcnt(struct vnode *vp) return (usecnt); } +#define VPUTX_VRELE 1 +#define VPUTX_VPUT 2 +#define VPUTX_VUNREF 3 -/* - * Vnode put/release. - * If count drops to zero, call inactive routine and return to freelist. - */ -void -vrele(struct vnode *vp) +static void +vputx(struct vnode *vp, int func) { - struct thread *td = curthread; /* XXX */ + int error; - KASSERT(vp != NULL, ("vrele: null vp")); + KASSERT(vp != NULL, ("vputx: null vp")); + if (func == VPUTX_VUNREF) + ASSERT_VOP_ELOCKED(vp, "vunref"); + else if (func == VPUTX_VPUT) + ASSERT_VOP_LOCKED(vp, "vput"); + else + KASSERT(func == VPUTX_VRELE, ("vputx: wrong func")); VFS_ASSERT_GIANT(vp->v_mount); - + CTR2(KTR_VFS, "%s: vp %p", __func__, vp); VI_LOCK(vp); /* Skip this v_writecount check if we're going to panic below. */ VNASSERT(vp->v_writecount < vp->v_usecount || vp->v_usecount < 1, vp, - ("vrele: missed vn_close")); - CTR2(KTR_VFS, "%s: vp %p", __func__, vp); + ("vputx: missed vn_close")); + error = 0; if (vp->v_usecount > 1 || ((vp->v_iflag & VI_DOINGINACT) && vp->v_usecount == 1)) { + if (func == VPUTX_VPUT) + VOP_UNLOCK(vp, 0); v_decr_usecount(vp); return; } + if (vp->v_usecount != 1) { #ifdef DIAGNOSTIC - vprint("vrele: negative ref count", vp); + vprint("vputx: negative ref count", vp); #endif - VI_UNLOCK(vp); - panic("vrele: negative ref cnt"); + panic("vputx: negative ref cnt"); } CTR2(KTR_VFS, "%s: return vnode %p to the freelist", __func__, vp); /* @@ -2193,22 +2200,36 @@ vrele(struct vnode *vp) * as VI_DOINGINACT to avoid recursion. */ vp->v_iflag |= VI_OWEINACT; - if (vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK) == 0) { + if (func == VPUTX_VRELE) { + error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK); VI_LOCK(vp); - if (vp->v_usecount > 0) - vp->v_iflag &= ~VI_OWEINACT; - if (vp->v_iflag & VI_OWEINACT) - vinactive(vp, td); - VOP_UNLOCK(vp, 0); - } else { + } else if (func == VPUTX_VPUT && VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + error = VOP_LOCK(vp, LK_UPGRADE | LK_INTERLOCK | LK_NOWAIT); VI_LOCK(vp); - if (vp->v_usecount > 0) - vp->v_iflag &= ~VI_OWEINACT; + } + if (vp->v_usecount > 0) + vp->v_iflag &= ~VI_OWEINACT; + if (error == 0) { + if (vp->v_iflag & VI_OWEINACT) + vinactive(vp, curthread); + if (func != VPUTX_VUNREF) + VOP_UNLOCK(vp, 0); } vdropl(vp); } /* + * Vnode put/release. + * If count drops to zero, call inactive routine and return to freelist. + */ +void +vrele(struct vnode *vp) +{ + + vputx(vp, VPUTX_VRELE); +} + +/* * Release an already locked vnode. This give the same effects as * unlock+vrele(), but takes less time and avoids releasing and * re-aquiring the lock (as vrele() acquires the lock internally.) @@ -2216,56 +2237,18 @@ vrele(struct vnode *vp) void vput(struct vnode *vp) { - struct thread *td = curthread; /* XXX */ - int error; - KASSERT(vp != NULL, ("vput: null vp")); - ASSERT_VOP_LOCKED(vp, "vput"); - VFS_ASSERT_GIANT(vp->v_mount); - CTR2(KTR_VFS, "%s: vp %p", __func__, vp); - VI_LOCK(vp); - /* Skip this v_writecount check if we're going to panic below. */ - VNASSERT(vp->v_writecount < vp->v_usecount || vp->v_usecount < 1, vp, - ("vput: missed vn_close")); - error = 0; + vputx(vp, VPUTX_VPUT); +} - if (vp->v_usecount > 1 || ((vp->v_iflag & VI_DOINGINACT) && - vp->v_usecount == 1)) { - VOP_UNLOCK(vp, 0); - v_decr_usecount(vp); - return; - } +/* + * Release an exclusively locked vnode. Do not unlock the vnode lock. + */ +void +vunref(struct vnode *vp) +{ - if (vp->v_usecount != 1) { -#ifdef DIAGNOSTIC - vprint("vput: negative ref count", vp); -#endif - panic("vput: negative ref cnt"); - } - CTR2(KTR_VFS, "%s: return to freelist the vnode %p", __func__, vp); - /* - * We want to hold the vnode until the inactive finishes to - * prevent vgone() races. We drop the use count here and the - * hold count below when we're done. - */ - v_decr_useonly(vp); - vp->v_iflag |= VI_OWEINACT; - if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { - error = VOP_LOCK(vp, LK_UPGRADE|LK_INTERLOCK|LK_NOWAIT); - VI_LOCK(vp); - if (error) { - if (vp->v_usecount > 0) - vp->v_iflag &= ~VI_OWEINACT; - goto done; - } - } - if (vp->v_usecount > 0) - vp->v_iflag &= ~VI_OWEINACT; - if (vp->v_iflag & VI_OWEINACT) - vinactive(vp, td); - VOP_UNLOCK(vp, 0); -done: - vdropl(vp); + vputx(vp, VPUTX_VUNREF); } /* Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sun Jan 17 21:00:29 2010 (r202527) +++ head/sys/sys/vnode.h Sun Jan 17 21:24:27 2010 (r202528) @@ -632,6 +632,7 @@ void vholdl(struct vnode *); int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); int vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td, off_t length, int blksize); +void vunref(struct vnode *); void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3); #define vprint(label, vp) vn_printf((vp), "%s\n", (label)) int vrecycle(struct vnode *vp, struct thread *td); From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 21:26:15 2010 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 6C97E106568B; Sun, 17 Jan 2010 21:26:15 +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 43CC88FC18; Sun, 17 Jan 2010 21:26:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLQFG5050255; Sun, 17 Jan 2010 21:26:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLQFkQ050252; Sun, 17 Jan 2010 21:26:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001172126.o0HLQFkQ050252@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 17 Jan 2010 21:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202529 - 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, 17 Jan 2010 21:26:15 -0000 Author: kib Date: Sun Jan 17 21:26:14 2010 New Revision: 202529 URL: http://svn.freebsd.org/changeset/base/202529 Log: When a vnode-backed vm object is referenced, it increments the vnode reference count, and decrements it on dereference. If referenced object is deallocated, object type is reset to OBJT_DEAD. Consequently, all vnode references that are owned by object references are never released. vunref() the vnode in vm object deallocation code for OBJT_VNODE appropriate number of times to prevent leak. Add an assertion to the vm_pageout() to make sure that we never get reference on the vnode but then do not execute code to release it. In collaboration with: pho Reviewed by: alc MFC after: 3 weeks Modified: head/sys/vm/vm_pageout.c head/sys/vm/vnode_pager.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Jan 17 21:24:27 2010 (r202528) +++ head/sys/vm/vm_pageout.c Sun Jan 17 21:26:14 2010 (r202529) @@ -951,6 +951,8 @@ rescan0: vnodes_skipped++; goto unlock_and_continue; } + KASSERT(mp != NULL, + ("vp %p with NULL v_mount", vp)); vm_page_unlock_queues(); vm_object_reference_locked(object); VM_OBJECT_UNLOCK(object); Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sun Jan 17 21:24:27 2010 (r202528) +++ head/sys/vm/vnode_pager.c Sun Jan 17 21:26:14 2010 (r202529) @@ -250,13 +250,16 @@ static void vnode_pager_dealloc(object) vm_object_t object; { - struct vnode *vp = object->handle; + struct vnode *vp; + int refs; + vp = object->handle; if (vp == NULL) panic("vnode_pager_dealloc: pager already dealloced"); VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); vm_object_pip_wait(object, "vnpdea"); + refs = object->ref_count; object->handle = NULL; object->type = OBJT_DEAD; @@ -267,6 +270,8 @@ vnode_pager_dealloc(object) ASSERT_VOP_ELOCKED(vp, "vnode_pager_dealloc"); vp->v_object = NULL; vp->v_vflag &= ~VV_TEXT; + while (refs-- > 0) + vunref(vp); } static boolean_t From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 21:40:05 2010 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 C5AA21065693; Sun, 17 Jan 2010 21:40:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4E888FC14; Sun, 17 Jan 2010 21:40:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLe5Lt053327; Sun, 17 Jan 2010 21:40:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLe5RR053321; Sun, 17 Jan 2010 21:40:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001172140.o0HLe5RR053321@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 21:40: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: r202530 - head/lib/libc/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: Sun, 17 Jan 2010 21:40:06 -0000 Author: ed Date: Sun Jan 17 21:40:05 2010 New Revision: 202530 URL: http://svn.freebsd.org/changeset/base/202530 Log: Perform several small cleanups to the utmpx code. - Massively reduce BSS usage. Let futx_to_utx() dynamically allocate the structure. There is only a very small amount of applications out there that needs to use the utmpx database. Wasting 1 KB on unused structures makes little sense. - Just let getutxid() search for matching ut_id's for any *PROCESS-type. This makes the code a bit more future-proof. - Fix a POSIX-mistake: when reading POSIX and the OpenSolaris implementation, getutxline() must return USER_PROCESS and LOGIN_PROCESS records whose ut_lines match. When reading POSIX, it seems LOGIN_PROCESS should not use ut_line at the first place. I have reported this issue. Modified: head/lib/libc/gen/getutxent.3 head/lib/libc/gen/getutxent.c head/lib/libc/gen/pututxline.c head/lib/libc/gen/utxdb.c head/lib/libc/gen/utxdb.h Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/getutxent.3 Sun Jan 17 21:40:05 2010 (r202530) @@ -174,7 +174,9 @@ prefix, corresponding with the device us session. If no TTY character device is used, this field is left blank. This field is only applicable to entries of type -.Dv USER_PROCESS . +.Dv USER_PROCESS +and +.Dv LOGIN_PROCESS . .It Fa ut_host The network hostname of the remote system, connecting to perform a user login. Modified: head/lib/libc/gen/getutxent.c ============================================================================== --- head/lib/libc/gen/getutxent.c Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/getutxent.c Sun Jan 17 21:40:05 2010 (r202530) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); static FILE *uf = NULL; static int udb; -static struct utmpx utx; int setutxdb(int db, const char *file) @@ -101,70 +100,59 @@ endutxent(void) } } -static struct futx * -getfutxent(void) +static int +getfutxent(struct futx *fu) { - static struct futx fu; if (uf == NULL) setutxent(); if (uf == NULL) - return (NULL); + return (-1); if (udb == UTXDB_LOG) { uint16_t len; if (fread(&len, sizeof len, 1, uf) != 1) - return (NULL); + return (-1); len = be16toh(len); - if (len > sizeof fu) { + if (len > sizeof *fu) { /* Forward compatibility. */ - if (fread(&fu, sizeof fu, 1, uf) != 1) - return (NULL); - fseek(uf, len - sizeof fu, SEEK_CUR); + if (fread(fu, sizeof *fu, 1, uf) != 1) + return (-1); + fseek(uf, len - sizeof *fu, SEEK_CUR); } else { /* Partial record. */ - memset(&fu, 0, sizeof fu); - if (fread(&fu, len, 1, uf) != 1) - return (NULL); + memset(fu, 0, sizeof *fu); + if (fread(fu, len, 1, uf) != 1) + return (-1); } } else { - if (fread(&fu, sizeof fu, 1, uf) != 1) - return (NULL); + if (fread(fu, sizeof *fu, 1, uf) != 1) + return (-1); } - return (&fu); + return (0); } struct utmpx * getutxent(void) { - struct futx *fu; + struct futx fu; - fu = getfutxent(); - if (fu == NULL) + if (getfutxent(&fu) != 0) return (NULL); - futx_to_utx(fu, &utx); - return (&utx); + return (futx_to_utx(&fu)); } struct utmpx * getutxid(const struct utmpx *id) { - struct futx *fu; + struct futx fu; for (;;) { - fu = getfutxent(); - if (fu == NULL) + if (getfutxent(&fu) != 0) return (NULL); - switch (fu->fu_type) { - case BOOT_TIME: - case OLD_TIME: - case NEW_TIME: - case SHUTDOWN_TIME: - if (fu->fu_type == id->ut_type) - goto found; - break; + switch (fu.fu_type) { case USER_PROCESS: case INIT_PROCESS: case LOGIN_PROCESS: @@ -174,61 +162,62 @@ getutxid(const struct utmpx *id) case INIT_PROCESS: case LOGIN_PROCESS: case DEAD_PROCESS: - if (memcmp(fu->fu_id, id->ut_id, - MIN(sizeof fu->fu_id, sizeof id->ut_id)) == 0) + if (memcmp(fu.fu_id, id->ut_id, + MIN(sizeof fu.fu_id, sizeof id->ut_id)) == 0) goto found; } break; + default: + if (fu.fu_type == id->ut_type) + goto found; + break; } } found: - futx_to_utx(fu, &utx); - return (&utx); + return (futx_to_utx(&fu)); } struct utmpx * getutxline(const struct utmpx *line) { - struct futx *fu; + struct futx fu; for (;;) { - fu = getfutxent(); - if (fu == NULL) + if (getfutxent(&fu) != 0) return (NULL); - switch (fu->fu_type) { + switch (fu.fu_type) { case USER_PROCESS: case LOGIN_PROCESS: - if (strncmp(fu->fu_line, line->ut_line, - MIN(sizeof fu->fu_line, sizeof line->ut_line)) == 0) + if (strncmp(fu.fu_line, line->ut_line, + MIN(sizeof fu.fu_line, sizeof line->ut_line)) == 0) goto found; + break; } } found: - futx_to_utx(fu, &utx); - return (&utx); + return (futx_to_utx(&fu)); } struct utmpx * getutxuser(const char *user) { - struct futx *fu; + struct futx fu; for (;;) { - fu = getfutxent(); - if (fu == NULL) + if (getfutxent(&fu) != 0) return (NULL); - switch (fu->fu_type) { + switch (fu.fu_type) { case USER_PROCESS: - if (strncmp(fu->fu_user, user, sizeof fu->fu_user) == 0) + if (strncmp(fu.fu_user, user, sizeof fu.fu_user) == 0) goto found; + break; } } found: - futx_to_utx(fu, &utx); - return (&utx); + return (futx_to_utx(&fu)); } Modified: head/lib/libc/gen/pututxline.c ============================================================================== --- head/lib/libc/gen/pututxline.c Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/pututxline.c Sun Jan 17 21:40:05 2010 (r202530) @@ -240,7 +240,6 @@ struct utmpx * pututxline(const struct utmpx *utmpx) { struct futx fu; - static struct utmpx ut; utx_to_futx(utmpx, &fu); @@ -272,6 +271,5 @@ pututxline(const struct utmpx *utmpx) } utx_log_add(&fu); - futx_to_utx(&fu, &ut); - return (&ut); + return (futx_to_utx(&fu)); } Modified: head/lib/libc/gen/utxdb.c ============================================================================== --- head/lib/libc/gen/utxdb.c Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/utxdb.c Sun Jan 17 21:40:05 2010 (r202530) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #include #include #include "utxdb.h" @@ -82,6 +83,8 @@ utx_to_futx(const struct utmpx *ut, stru case LOGIN_PROCESS: UTOF_ID(ut, fu); UTOF_STRING(ut, fu, user); + /* XXX: bug in the specification? Needed for getutxline(). */ + UTOF_STRING(ut, fu, line); UTOF_PID(ut, fu); break; case DEAD_PROCESS: @@ -118,11 +121,18 @@ utx_to_futx(const struct utmpx *ut, stru (ut)->ut_tv.tv_usec = t % 1000000; \ } while (0) -void -futx_to_utx(const struct futx *fu, struct utmpx *ut) +struct utmpx * +futx_to_utx(const struct futx *fu) { + static struct utmpx *ut; - memset(ut, 0, sizeof *ut); + if (ut == NULL) { + ut = calloc(1, sizeof *ut); + if (ut == NULL) + return (NULL); + } else { + memset(ut, 0, sizeof *ut); + } switch (fu->fu_type) { case BOOT_TIME: @@ -146,6 +156,8 @@ futx_to_utx(const struct futx *fu, struc case LOGIN_PROCESS: FTOU_ID(fu, ut); FTOU_STRING(fu, ut, user); + /* XXX: bug in the specification? Needed for getutxline(). */ + FTOU_STRING(fu, ut, line); FTOU_PID(fu, ut); break; case DEAD_PROCESS: @@ -154,9 +166,10 @@ futx_to_utx(const struct futx *fu, struc break; default: ut->ut_type = EMPTY; - return; + return (ut); } FTOU_TYPE(fu, ut); FTOU_TV(fu, ut); + return (ut); } Modified: head/lib/libc/gen/utxdb.h ============================================================================== --- head/lib/libc/gen/utxdb.h Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/utxdb.h Sun Jan 17 21:40:05 2010 (r202530) @@ -56,6 +56,6 @@ struct futx { } __packed; void utx_to_futx(const struct utmpx *, struct futx *); -void futx_to_utx(const struct futx *, struct utmpx *); +struct utmpx *futx_to_utx(const struct futx *); #endif /* !_UTXDB_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 21:53:41 2010 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 8B120106566B; Sun, 17 Jan 2010 21:53:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B16A8FC0C; Sun, 17 Jan 2010 21:53:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLrflA056365; Sun, 17 Jan 2010 21:53:41 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLrfWE056363; Sun, 17 Jan 2010 21:53:41 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001172153.o0HLrfWE056363@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 21:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202531 - head/sbin/natd 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, 17 Jan 2010 21:53:41 -0000 Author: ed Date: Sun Jan 17 21:53:41 2010 New Revision: 202531 URL: http://svn.freebsd.org/changeset/base/202531 Log: Mute some (hidden) warnings about old-style function definitions. Submitted by: Marius Nünnerich Modified: head/sbin/natd/natd.c Modified: head/sbin/natd/natd.c ============================================================================== --- head/sbin/natd/natd.c Sun Jan 17 21:40:05 2010 (r202530) +++ head/sbin/natd/natd.c Sun Jan 17 21:53:41 2010 (r202531) @@ -444,7 +444,7 @@ int main (int argc, char** argv) return 0; } -static void DaemonMode () +static void DaemonMode(void) { FILE* pidFile; @@ -1558,7 +1558,7 @@ void ReadConfigFile (const char* fileNam fclose (file); } -static void Usage () +static void Usage(void) { int i; int max; From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 21:56:28 2010 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 303F8106566B; Sun, 17 Jan 2010 21:56:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1B58FC16; Sun, 17 Jan 2010 21:56:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLuSK1057087; Sun, 17 Jan 2010 21:56:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLuRFD057075; Sun, 17 Jan 2010 21:56:27 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001172156.o0HLuRFD057075@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 21:56: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: r202532 - in head: bin/pkill sbin/adjkerntz sbin/ifconfig sbin/kldconfig sbin/kldload sbin/kldstat sbin/natd sbin/newfs sbin/swapon sbin/tunefs usr.bin/locale 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, 17 Jan 2010 21:56:28 -0000 Author: ed Date: Sun Jan 17 21:56:27 2010 New Revision: 202532 URL: http://svn.freebsd.org/changeset/base/202532 Log: Raise WARNS for various tools where possible. Submitted by: Marius Nünnerich Modified: head/bin/pkill/Makefile head/sbin/adjkerntz/Makefile head/sbin/ifconfig/Makefile head/sbin/kldconfig/Makefile head/sbin/kldload/Makefile head/sbin/kldstat/Makefile head/sbin/natd/Makefile head/sbin/newfs/Makefile head/sbin/swapon/Makefile head/sbin/tunefs/Makefile head/usr.bin/locale/Makefile Modified: head/bin/pkill/Makefile ============================================================================== --- head/bin/pkill/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/bin/pkill/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -2,7 +2,6 @@ # $FreeBSD$ PROG= pkill -WARNS?= 5 DPADD= ${LIBKVM} LDADD= -lkvm Modified: head/sbin/adjkerntz/Makefile ============================================================================== --- head/sbin/adjkerntz/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/adjkerntz/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -2,6 +2,5 @@ PROG= adjkerntz MAN= adjkerntz.8 -WARNS?= 2 .include Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/ifconfig/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -47,6 +47,6 @@ LDADD+= -lipx MAN= ifconfig.8 CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs -WARNS?= 0 +WARNS?= 2 .include Modified: head/sbin/kldconfig/Makefile ============================================================================== --- head/sbin/kldconfig/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/kldconfig/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -28,6 +28,5 @@ PROG= kldconfig MAN= kldconfig.8 -WARNS?= 5 .include Modified: head/sbin/kldload/Makefile ============================================================================== --- head/sbin/kldload/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/kldload/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -28,6 +28,5 @@ PROG= kldload MAN= kldload.8 -WARNS?= 5 .include Modified: head/sbin/kldstat/Makefile ============================================================================== --- head/sbin/kldstat/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/kldstat/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -28,6 +28,5 @@ PROG= kldstat MAN= kldstat.8 -WARNS?= 5 .include Modified: head/sbin/natd/Makefile ============================================================================== --- head/sbin/natd/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/natd/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -2,7 +2,7 @@ PROG = natd SRCS = natd.c icmp.c -WARNS?= 0 +WARNS?= 3 LDADD = -lalias DPADD = ${LIBALIAS} MAN = natd.8 Modified: head/sbin/newfs/Makefile ============================================================================== --- head/sbin/newfs/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/newfs/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -8,7 +8,7 @@ DPADD= ${LIBUFS} LDADD= -lufs SRCS= newfs.c mkfs.c geom_bsd_enc.c -WARNS?= 2 +WARNS?= 3 MAN= newfs.8 .include Modified: head/sbin/swapon/Makefile ============================================================================== --- head/sbin/swapon/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/swapon/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -8,7 +8,7 @@ LINKS+= ${BINDIR}/swapon ${BINDIR}/swapc MLINKS= swapon.8 swapoff.8 MLINKS+=swapon.8 swapctl.8 -WARNS?= 2 +WARNS?= 3 DPADD= ${LIBUTIL} LDADD= -lutil Modified: head/sbin/tunefs/Makefile ============================================================================== --- head/sbin/tunefs/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/tunefs/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -5,6 +5,5 @@ PROG= tunefs DPADD= ${LIBUFS} LDADD= -lufs MAN= tunefs.8 -WARNS?= 2 .include Modified: head/usr.bin/locale/Makefile ============================================================================== --- head/usr.bin/locale/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/usr.bin/locale/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -2,6 +2,6 @@ PROG = locale CFLAGS += -I${.CURDIR}/../../lib/libc/locale -WARNS ?= 1 +WARNS ?= 3 .include From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 23:11:08 2010 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 71D98106566B; Sun, 17 Jan 2010 23:11:08 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id DCEB58FC15; Sun, 17 Jan 2010 23:11:06 +0000 (UTC) Received: by fxm27 with SMTP id 27so1767886fxm.3 for ; Sun, 17 Jan 2010 15:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=94QPzovYeCIm6q8DWeZqsgC7GDobURLZ0nnQ9tX4Dkk=; b=dtl1Q4+bthWoYtaiOLl0u36VIafrvVsx87X0PUrX9JsMYQCjc9qQW//DT2G+cu3RhY eEoSodtpsN4NO8F9iNmFG1d7zWziFBOu5pWTdDHa12WF5ytZaRsESNtODN5MfmnkZsnc vl2Q8B4AYXl78ifwjofhlL0sUa685hYlD9t9w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=A2Owm7Ll1iprUv0NznDie9lHmNBi7DRVbuaJ879dwyWhgT+hp0gnAhnP4BQ/Gr1CI/ +Z8S3bp7vu89fYg6WQHe7IHtr5muX50FHN1e4/tcVV0stpfSHfE8f/pGnkZXuvuM5tcP 2Cy7o48tBOzWExyG2+/l36mSlUDtnjidwJDIs= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.77.19 with SMTP id e19mr6620966fak.39.1263769865847; Sun, 17 Jan 2010 15:11:05 -0800 (PST) In-Reply-To: <20100117190512.A50938@maildrop.int.zabbadoz.net> References: <201001161224.o0GCOCOI094360@svn.freebsd.org> <20100116.220840.91363215.nyan@FreeBSD.org> <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> <20100117.124146.27866377.nyan@FreeBSD.org> <20100117190512.A50938@maildrop.int.zabbadoz.net> Date: Mon, 18 Jan 2010 00:11:05 +0100 X-Google-Sender-Auth: 9be8f332b23b286d Message-ID: <3bbf2fe11001171511m56c2dd1dqce5cbe7a6ba82b94@mail.gmail.com> From: Attilio Rao To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, TAKAHASHI Yoshihiro Subject: Re: svn commit: r202441 - 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, 17 Jan 2010 23:11:08 -0000 2010/1/17 Bjoern A. Zeeb : > On Sun, 17 Jan 2010, TAKAHASHI Yoshihiro wrote: > >> In article <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> >> Attilio Rao writes: >> >>> Thanks for reporting this. >>> This further patch should fix the problem for i386 and possibly pc98 >>> (linked with your patch): >>> http://www.freebsd.org/~attilio/atpic.diff >> >> Please apply the same change to sys/pc98/cbus/clock.c, and it's fine. >> >> Please feel free to commit my patch. > > Something similar is also still needed for i386 as the XBOX kernel > still doesn't compile. Actually XBOX seems compiling with the change I outlined. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Sun Jan 17 23:23:35 2010 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 E0FD01065672; Sun, 17 Jan 2010 23:23:35 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5E278FC17; Sun, 17 Jan 2010 23:23:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HNNZPj076873; Sun, 17 Jan 2010 23:23:35 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HNNZkd076868; Sun, 17 Jan 2010 23:23:35 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001172323.o0HNNZkd076868@svn.freebsd.org> From: Attilio Rao Date: Sun, 17 Jan 2010 23:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202534 - in head/sys: conf i386/isa pc98/cbus pc98/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, 17 Jan 2010 23:23:36 -0000 Author: attilio Date: Sun Jan 17 23:23:35 2010 New Revision: 202534 URL: http://svn.freebsd.org/changeset/base/202534 Log: - Allow clock subsystem to be compiled without the apic support [0] - ATPIC, on pc98 is never defined somewhere, differently from i386. Turn its compilation to be conditional as i386 does. [1] [0] Reported by: nyan [1] Submitted by: nyan Modified: head/sys/conf/files.pc98 head/sys/i386/isa/clock.c head/sys/pc98/cbus/clock.c head/sys/pc98/conf/DEFAULTS Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Sun Jan 17 22:40:47 2010 (r202533) +++ head/sys/conf/files.pc98 Sun Jan 17 23:23:35 2010 (r202534) @@ -194,7 +194,7 @@ i386/ibcs2/ibcs2_util.c optional ibcs2 i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 -i386/isa/atpic.c standard +i386/isa/atpic.c optional atpic #i386/isa/atpic_vector.s standard i386/isa/elink.c optional ep | ie i386/isa/isa.c optional isa @@ -240,7 +240,7 @@ pc98/cbus/gdc.c optional gdc pc98/cbus/nmi.c standard pc98/cbus/olpt.c optional olpt pc98/cbus/pckbd.c optional pckbd -pc98/cbus/pcrtc.c standard +pc98/cbus/pcrtc.c optional atpic pc98/cbus/pmc.c optional pmc pc98/cbus/scgdcrndr.c optional sc gdc pc98/cbus/scterm-sck.c optional sc Modified: head/sys/i386/isa/clock.c ============================================================================== --- head/sys/i386/isa/clock.c Sun Jan 17 22:40:47 2010 (r202533) +++ head/sys/i386/isa/clock.c Sun Jan 17 23:23:35 2010 (r202534) @@ -65,9 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef DEV_APIC #include -#endif #include #include #include Modified: head/sys/pc98/cbus/clock.c ============================================================================== --- head/sys/pc98/cbus/clock.c Sun Jan 17 22:40:47 2010 (r202533) +++ head/sys/pc98/cbus/clock.c Sun Jan 17 23:23:35 2010 (r202534) @@ -67,9 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef DEV_APIC #include -#endif #include #include #include Modified: head/sys/pc98/conf/DEFAULTS ============================================================================== --- head/sys/pc98/conf/DEFAULTS Sun Jan 17 22:40:47 2010 (r202533) +++ head/sys/pc98/conf/DEFAULTS Sun Jan 17 23:23:35 2010 (r202534) @@ -24,3 +24,6 @@ device uart_ns8250 # Default partitioning schemes options GEOM_PART_BSD options GEOM_PART_PC98 + +# enable support for native hardware +device atpic From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 00:53:22 2010 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 64534106568B; Mon, 18 Jan 2010 00:53:22 +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 517CE8FC0C; Mon, 18 Jan 2010 00:53:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0I0rMBT097652; Mon, 18 Jan 2010 00:53:22 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0I0rMNG097644; Mon, 18 Jan 2010 00:53:22 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001180053.o0I0rMNG097644@svn.freebsd.org> From: Warner Losh Date: Mon, 18 Jan 2010 00:53:22 +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: r202536 - in stable/8/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/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: Mon, 18 Jan 2010 00:53:22 -0000 Author: imp Date: Mon Jan 18 00:53:21 2010 New Revision: 202536 URL: http://svn.freebsd.org/changeset/base/202536 Log: MFC r202019: Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. # This is the resolution of removing it from DEFAULTS... Modified: stable/8/sys/amd64/conf/GENERIC stable/8/sys/i386/conf/GENERIC stable/8/sys/ia64/conf/GENERIC stable/8/sys/pc98/conf/GENERIC stable/8/sys/powerpc/conf/GENERIC stable/8/sys/sparc64/conf/GENERIC stable/8/sys/sun4v/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Mon Jan 18 00:43:33 2010 (r202535) +++ stable/8/sys/amd64/conf/GENERIC Mon Jan 18 00:53:21 2010 (r202536) @@ -75,6 +75,7 @@ options MAC # TrustedBSD MAC Framewor options FLOWTABLE # per-cpu routing cache #options KDTRACE_FRAME # Ensure frames are compiled in #options KDTRACE_HOOKS # Kernel DTrace hooks +options INCLUDE_CONFIG_FILE # Include this file in kernel # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel Modified: stable/8/sys/i386/conf/GENERIC ============================================================================== --- stable/8/sys/i386/conf/GENERIC Mon Jan 18 00:43:33 2010 (r202535) +++ stable/8/sys/i386/conf/GENERIC Mon Jan 18 00:53:21 2010 (r202536) @@ -75,6 +75,7 @@ options AUDIT # Security event auditi options MAC # TrustedBSD MAC Framework options FLOWTABLE # per-cpu routing cache #options KDTRACE_HOOKS # Kernel DTrace hooks +options INCLUDE_CONFIG_FILE # Include this file in kernel # To make an SMP kernel, the next two lines are needed options SMP # Symmetric MultiProcessor Kernel Modified: stable/8/sys/ia64/conf/GENERIC ============================================================================== --- stable/8/sys/ia64/conf/GENERIC Mon Jan 18 00:43:33 2010 (r202535) +++ stable/8/sys/ia64/conf/GENERIC Mon Jan 18 00:53:21 2010 (r202536) @@ -62,6 +62,7 @@ options UFS_DIRHASH # Hash-based direct options UFS_GJOURNAL # Enable gjournal-based UFS journaling options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +options INCLUDE_CONFIG_FILE # Include this file in kernel # Various "busses" device firewire # FireWire bus code Modified: stable/8/sys/pc98/conf/GENERIC ============================================================================== --- stable/8/sys/pc98/conf/GENERIC Mon Jan 18 00:43:33 2010 (r202535) +++ stable/8/sys/pc98/conf/GENERIC Mon Jan 18 00:53:21 2010 (r202536) @@ -75,6 +75,7 @@ options KBD_INSTALL_CDEV # install a CD options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework +options INCLUDE_CONFIG_FILE # Include this file in kernel # To make an SMP kernel, the next two lines are needed #options SMP # Symmetric MultiProcessor Kernel Modified: stable/8/sys/powerpc/conf/GENERIC ============================================================================== --- stable/8/sys/powerpc/conf/GENERIC Mon Jan 18 00:43:33 2010 (r202535) +++ stable/8/sys/powerpc/conf/GENERIC Mon Jan 18 00:53:21 2010 (r202536) @@ -66,6 +66,7 @@ options _KPOSIX_PRIORITY_SCHEDULING #Po options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework +options INCLUDE_CONFIG_FILE # Include this file in kernel # To make an SMP kernel, the next line is needed #options SMP # Symmetric MultiProcessor Kernel Modified: stable/8/sys/sparc64/conf/GENERIC ============================================================================== --- stable/8/sys/sparc64/conf/GENERIC Mon Jan 18 00:43:33 2010 (r202535) +++ stable/8/sys/sparc64/conf/GENERIC Mon Jan 18 00:53:21 2010 (r202536) @@ -72,6 +72,7 @@ options PRINTF_BUFR_SIZE=128 # Prevent options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework +options INCLUDE_CONFIG_FILE # Include this file in kernel # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel Modified: stable/8/sys/sun4v/conf/GENERIC ============================================================================== --- stable/8/sys/sun4v/conf/GENERIC Mon Jan 18 00:43:33 2010 (r202535) +++ stable/8/sys/sun4v/conf/GENERIC Mon Jan 18 00:53:21 2010 (r202536) @@ -66,6 +66,7 @@ options PRINTF_BUFR_SIZE=128 # Prevent options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework +options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging for use in -current options KDB # Enable kernel debugger support. @@ -219,4 +220,3 @@ device ccd # on most arches and in most cases 1000Hz pessimizes performance # its choice was not adequately researched options HZ=100 - From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 04:08:43 2010 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 9F229106566C; Mon, 18 Jan 2010 04:08: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 8BD2D8FC12; Mon, 18 Jan 2010 04:08:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0I48h6i043324; Mon, 18 Jan 2010 04:08:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0I48hID043316; Mon, 18 Jan 2010 04:08:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001180408.o0I48hID043316@svn.freebsd.org> From: Warner Losh Date: Mon, 18 Jan 2010 04:08:43 +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: r202547 - in stable/7/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/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: Mon, 18 Jan 2010 04:08:43 -0000 Author: imp Date: Mon Jan 18 04:08:43 2010 New Revision: 202547 URL: http://svn.freebsd.org/changeset/base/202547 Log: MFC 202019: Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms. # This is the resolution of removing it from DEFAULTS... Modified: stable/7/sys/amd64/conf/GENERIC stable/7/sys/i386/conf/GENERIC stable/7/sys/ia64/conf/GENERIC stable/7/sys/pc98/conf/GENERIC stable/7/sys/powerpc/conf/GENERIC stable/7/sys/sparc64/conf/GENERIC stable/7/sys/sun4v/conf/GENERIC Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/conf/GENERIC ============================================================================== --- stable/7/sys/amd64/conf/GENERIC Mon Jan 18 03:58:23 2010 (r202546) +++ stable/7/sys/amd64/conf/GENERIC Mon Jan 18 04:08:43 2010 (r202547) @@ -66,6 +66,7 @@ options STOP_NMI # Stop CPUS using NMI options AUDIT # Security event auditing #options KDTRACE_FRAME # Ensure frames are compiled in #options KDTRACE_HOOKS # Kernel DTrace hooks +options INCLUDE_CONFIG_FILE # Include this file in kernel # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel Modified: stable/7/sys/i386/conf/GENERIC ============================================================================== --- stable/7/sys/i386/conf/GENERIC Mon Jan 18 03:58:23 2010 (r202546) +++ stable/7/sys/i386/conf/GENERIC Mon Jan 18 04:08:43 2010 (r202547) @@ -66,6 +66,7 @@ options ADAPTIVE_GIANT # Giant mutex i options STOP_NMI # Stop CPUS using NMI instead of IPI options AUDIT # Security event auditing #options KDTRACE_HOOKS # Kernel DTrace hooks +options INCLUDE_CONFIG_FILE # Include this file in kernel # To make an SMP kernel, the next two lines are needed options SMP # Symmetric MultiProcessor Kernel Modified: stable/7/sys/ia64/conf/GENERIC ============================================================================== --- stable/7/sys/ia64/conf/GENERIC Mon Jan 18 03:58:23 2010 (r202546) +++ stable/7/sys/ia64/conf/GENERIC Mon Jan 18 04:08:43 2010 (r202547) @@ -60,6 +60,7 @@ options UFS_ACL # Support for access c options UFS_DIRHASH # Hash-based directory lookup scheme options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions options AUDIT # Security event auditing +options INCLUDE_CONFIG_FILE # Include this file in kernel # Various "busses" device firewire # FireWire bus code Modified: stable/7/sys/pc98/conf/GENERIC ============================================================================== --- stable/7/sys/pc98/conf/GENERIC Mon Jan 18 03:58:23 2010 (r202546) +++ stable/7/sys/pc98/conf/GENERIC Mon Jan 18 04:08:43 2010 (r202547) @@ -66,6 +66,7 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options AUDIT # Security event auditing +options INCLUDE_CONFIG_FILE # Include this file in kernel # To make an SMP kernel, the next two lines are needed #options SMP # Symmetric MultiProcessor Kernel Modified: stable/7/sys/powerpc/conf/GENERIC ============================================================================== --- stable/7/sys/powerpc/conf/GENERIC Mon Jan 18 03:58:23 2010 (r202546) +++ stable/7/sys/powerpc/conf/GENERIC Mon Jan 18 04:08:43 2010 (r202547) @@ -63,6 +63,7 @@ options SYSVSEM #SYSV-style semaphore options P1003_1B_SEMAPHORES # POSIX-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options AUDIT # Security event auditing +options INCLUDE_CONFIG_FILE # Include this file in kernel # To make an SMP kernel, the next line is needed #options SMP # Symmetric MultiProcessor Kernel Modified: stable/7/sys/sparc64/conf/GENERIC ============================================================================== --- stable/7/sys/sparc64/conf/GENERIC Mon Jan 18 03:58:23 2010 (r202546) +++ stable/7/sys/sparc64/conf/GENERIC Mon Jan 18 04:08:43 2010 (r202547) @@ -65,6 +65,7 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options ADAPTIVE_GIANT # Giant mutex is adaptive. options AUDIT # Security event auditing +options INCLUDE_CONFIG_FILE # Include this file in kernel # To make an SMP kernel, the next line is needed options SMP # Symmetric MultiProcessor Kernel Modified: stable/7/sys/sun4v/conf/GENERIC ============================================================================== --- stable/7/sys/sun4v/conf/GENERIC Mon Jan 18 03:58:23 2010 (r202546) +++ stable/7/sys/sun4v/conf/GENERIC Mon Jan 18 04:08:43 2010 (r202547) @@ -67,6 +67,7 @@ options AHC_REG_PRETTY_PRINT # Print re options ADAPTIVE_GIANT # Giant mutex is adaptive. options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options AUDIT # Security event auditing +options INCLUDE_CONFIG_FILE # Include this file in kernel # To make an SMP kernel, the next line is needed options SMP # Symmetric MultiProcessor Kernel @@ -210,4 +211,3 @@ device ccd # on most arches and in most cases 1000Hz pessimizes performance # its choice was not adequately researched options HZ=100 - From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 04:58:14 2010 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 D6136106568F; Mon, 18 Jan 2010 04:58:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1D6D8FC22; Mon, 18 Jan 2010 04:58:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0I4wEZj054836; Mon, 18 Jan 2010 04:58:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0I4wETh054834; Mon, 18 Jan 2010 04:58:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001180458.o0I4wETh054834@svn.freebsd.org> From: Xin LI Date: Mon, 18 Jan 2010 04:58:14 +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: r202548 - stable/8/usr.sbin/rtsold 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, 18 Jan 2010 04:58:15 -0000 Author: delphij Date: Mon Jan 18 04:58:14 2010 New Revision: 202548 URL: http://svn.freebsd.org/changeset/base/202548 Log: MFC r210520: Test index value is within the range before using it to reference array member. PR: bin/141838 Submitted by: Henning Petersen Modified: stable/8/usr.sbin/rtsold/probe.c Directory Properties: stable/8/usr.sbin/rtsold/ (props changed) Modified: stable/8/usr.sbin/rtsold/probe.c ============================================================================== --- stable/8/usr.sbin/rtsold/probe.c Mon Jan 18 04:08:43 2010 (r202547) +++ stable/8/usr.sbin/rtsold/probe.c Mon Jan 18 04:58:14 2010 (r202548) @@ -118,7 +118,7 @@ defrouter_probe(struct ifinfo *ifinfo) goto closeandend; } - for (i = 0; dr.defrouter[i].if_index && i < PRLSTSIZ; i++) { + for (i = 0; i < DRLSTSIZ && dr.defrouter[i].if_index; i++) { if (ifindex && dr.defrouter[i].if_index == ifindex) { /* sanity check */ if (!IN6_IS_ADDR_LINKLOCAL(&dr.defrouter[i].rtaddr)) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 05:03:40 2010 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 CC4DE106568B; Mon, 18 Jan 2010 05:03:40 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9E5D8FC21; Mon, 18 Jan 2010 05:03:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0I53eGG056129; Mon, 18 Jan 2010 05:03:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0I53eDX056127; Mon, 18 Jan 2010 05:03:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001180503.o0I53eDX056127@svn.freebsd.org> From: Xin LI Date: Mon, 18 Jan 2010 05:03:40 +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: r202549 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 18 Jan 2010 05:03:40 -0000 Author: delphij Date: Mon Jan 18 05:03:40 2010 New Revision: 202549 URL: http://svn.freebsd.org/changeset/base/202549 Log: MFC r202129: Report ZFS filesystem version instead of the zpool version when we say it. Reported by: Yuri Pankov (on -fs@) Submitted by: delphij Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Jan 18 04:58:14 2010 (r202548) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Jan 18 05:03:40 2010 (r202549) @@ -1388,7 +1388,7 @@ void zfs_init(void) { - printf("ZFS filesystem version " SPA_VERSION_STRING "\n"); + printf("ZFS filesystem version " ZPL_VERSION_STRING "\n"); /* * Initialize znode cache, vnode ops, etc... From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 05:22:28 2010 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 4E7971065670; Mon, 18 Jan 2010 05:22:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C69B8FC1A; Mon, 18 Jan 2010 05:22:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0I5MSQE060496; Mon, 18 Jan 2010 05:22:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0I5MS2O060494; Mon, 18 Jan 2010 05:22:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001180522.o0I5MS2O060494@svn.freebsd.org> From: Xin LI Date: Mon, 18 Jan 2010 05:22:28 +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: r202550 - stable/7/usr.sbin/rtsold 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, 18 Jan 2010 05:22:28 -0000 Author: delphij Date: Mon Jan 18 05:22:27 2010 New Revision: 202550 URL: http://svn.freebsd.org/changeset/base/202550 Log: MFC r201520: Test index value is within the range before using it to reference array member. PR: bin/141838 Submitted by: Henning Petersen Modified: stable/7/usr.sbin/rtsold/probe.c Directory Properties: stable/7/usr.sbin/rtsold/ (props changed) Modified: stable/7/usr.sbin/rtsold/probe.c ============================================================================== --- stable/7/usr.sbin/rtsold/probe.c Mon Jan 18 05:03:40 2010 (r202549) +++ stable/7/usr.sbin/rtsold/probe.c Mon Jan 18 05:22:27 2010 (r202550) @@ -118,7 +118,7 @@ defrouter_probe(struct ifinfo *ifinfo) goto closeandend; } - for (i = 0; dr.defrouter[i].if_index && i < PRLSTSIZ; i++) { + for (i = 0; i < DRLSTSIZ && dr.defrouter[i].if_index; i++) { if (ifindex && dr.defrouter[i].if_index == ifindex) { /* sanity check */ if (!IN6_IS_ADDR_LINKLOCAL(&dr.defrouter[i].rtaddr)) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 05:24:52 2010 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 4FBEC106566C; Mon, 18 Jan 2010 05:24:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D5398FC1B; Mon, 18 Jan 2010 05:24:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0I5Oq3L061089; Mon, 18 Jan 2010 05:24:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0I5Oqd6061087; Mon, 18 Jan 2010 05:24:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001180524.o0I5Oqd6061087@svn.freebsd.org> From: Xin LI Date: Mon, 18 Jan 2010 05:24:52 +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: r202551 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 18 Jan 2010 05:24:52 -0000 Author: delphij Date: Mon Jan 18 05:24:51 2010 New Revision: 202551 URL: http://svn.freebsd.org/changeset/base/202551 Log: MFC r202129: Report ZFS filesystem version instead of the zpool version when we say it. Reported by: Yuri Pankov (on -fs@) Submitted by: delphij Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Jan 18 05:22:27 2010 (r202550) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Jan 18 05:24:51 2010 (r202551) @@ -1398,7 +1398,7 @@ void zfs_init(void) { - printf("ZFS filesystem version " SPA_VERSION_STRING "\n"); + printf("ZFS filesystem version " ZPL_VERSION_STRING "\n"); /* * Initialize znode cache, vnode ops, etc... From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 06:48:25 2010 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 0FD9C1065693; Mon, 18 Jan 2010 06:48:25 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F26DA8FC18; Mon, 18 Jan 2010 06:48:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0I6mO1v080288; Mon, 18 Jan 2010 06:48:24 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0I6mODW080285; Mon, 18 Jan 2010 06:48:24 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001180648.o0I6mODW080285@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 18 Jan 2010 06:48: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: r202552 - head/sys/boot/ia64/efi 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, 18 Jan 2010 06:48:25 -0000 Author: marcel Date: Mon Jan 18 06:48:24 2010 New Revision: 202552 URL: http://svn.freebsd.org/changeset/base/202552 Log: Add command-line option -dev to set the default value of the currdev variable. This is to be used by the EFI boot manager. While here, re-factor the code a little bit and bump the version to 2.1. Modified: head/sys/boot/ia64/efi/main.c head/sys/boot/ia64/efi/version Modified: head/sys/boot/ia64/efi/main.c ============================================================================== --- head/sys/boot/ia64/efi/main.c Mon Jan 18 05:24:51 2010 (r202551) +++ head/sys/boot/ia64/efi/main.c Mon Jan 18 06:48:24 2010 (r202552) @@ -50,7 +50,6 @@ extern char bootprog_rev[]; extern char bootprog_date[]; extern char bootprog_maker[]; -struct devdesc currdev; /* our current device */ struct arch_switch archsw; /* MI/MD interface boundary */ extern u_int64_t ia64_pal_entry; @@ -101,10 +100,49 @@ find_pal_proc(void) return; } +static int +usc2cmp(CHAR16 *s1, CHAR16 *s2) +{ + + while (*s1 == *s2++) { + if (*s1++ == 0) + return (0); + } + return (*s1 - *(s2 - 1)); +} + +static char * +get_dev_option(int argc, CHAR16 *argv[]) +{ + static char dev[32]; + CHAR16 *arg; + char *devp; + int i, j; + + devp = NULL; + for (i = 0; i < argc; i++) { + if (usc2cmp(argv[i], L"-dev") == 0 && i < argc - 1) { + arg = argv[i + 1]; + j = 0; + while (j < sizeof(dev) && *arg != 0) + dev[j++] = *arg++; + if (j == sizeof(dev)) + j--; + dev[j] = '\0'; + devp = dev; + break; + } + } + + return (devp); +} + EFI_STATUS main(int argc, CHAR16 *argv[]) { + struct devdesc currdev; EFI_LOADED_IMAGE *img; + char *dev; int i; /* @@ -115,6 +153,10 @@ main(int argc, CHAR16 *argv[]) */ cons_probe(); + printf("\n"); + printf("%s, Revision %s\n", bootprog_name, bootprog_rev); + printf("(%s, %s)\n", bootprog_maker, bootprog_date); + find_pal_proc(); /* @@ -124,16 +166,6 @@ main(int argc, CHAR16 *argv[]) if (devsw[i]->dv_init != NULL) (devsw[i]->dv_init)(); - /* Get our loaded image protocol interface structure. */ - BS->HandleProtocol(IH, &imgid, (VOID**)&img); - - printf("\n"); - printf("%s, Revision %s\n", bootprog_name, bootprog_rev); - printf("(%s, %s)\n", bootprog_maker, bootprog_date); - - efi_handle_lookup(img->DeviceHandle, &currdev.d_dev, &currdev.d_unit); - currdev.d_type = currdev.d_dev->dv_type; - /* * Disable the watchdog timer. By default the boot manager sets * the timer to 5 minutes before invoking a boot option. If we @@ -145,13 +177,24 @@ main(int argc, CHAR16 *argv[]) */ BS->SetWatchdogTimer(0, 0, 0, NULL); - env_setenv("currdev", EV_VOLATILE, ia64_fmtdev(&currdev), - ia64_setcurrdev, env_nounset); + /* Get our loaded image protocol interface structure. */ + BS->HandleProtocol(IH, &imgid, (VOID**)&img); + + bzero(&currdev, sizeof(currdev)); + efi_handle_lookup(img->DeviceHandle, &currdev.d_dev, &currdev.d_unit); + currdev.d_type = currdev.d_dev->dv_type; + env_setenv("loaddev", EV_VOLATILE, ia64_fmtdev(&currdev), env_noset, env_nounset); + dev = get_dev_option(argc, argv); + if (dev == NULL) + dev = ia64_fmtdev(&currdev); + + env_setenv("currdev", EV_VOLATILE, dev, ia64_setcurrdev, env_nounset); + setenv("LINES", "24", 1); /* optional */ - + archsw.arch_autoload = ia64_autoload; archsw.arch_getdev = ia64_getdev; archsw.arch_copyin = ia64_copyin; Modified: head/sys/boot/ia64/efi/version ============================================================================== --- head/sys/boot/ia64/efi/version Mon Jan 18 05:24:51 2010 (r202551) +++ head/sys/boot/ia64/efi/version Mon Jan 18 06:48:24 2010 (r202552) @@ -3,6 +3,7 @@ $FreeBSD$ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important. Make sure the current version number is on line 6. +2.1: Add support for "-dev " argument parsing. 2.0: Provide devices based on the block I/O protocol, rather than the simple file services protocol. Use the FreeBSD file system code on top of those devices to access files. From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 09:04:54 2010 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 4F3B4106566B; Mon, 18 Jan 2010 09:04:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DB3E8FC1C; Mon, 18 Jan 2010 09:04:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0I94sIY011668; Mon, 18 Jan 2010 09:04:54 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0I94seL011664; Mon, 18 Jan 2010 09:04:54 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001180904.o0I94seL011664@svn.freebsd.org> From: Ed Schouten Date: Mon, 18 Jan 2010 09:04:54 +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: r202553 - in stable/8/sys: kern sys 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, 18 Jan 2010 09:04:54 -0000 Author: ed Date: Mon Jan 18 09:04:53 2010 New Revision: 202553 URL: http://svn.freebsd.org/changeset/base/202553 Log: MFC r201532: Make TIOCSTI work again. It looks like I didn't implement this when I imported MPSAFE TTY. Applications like mail(1) still use this. I think it's conceptually bad. Tested by: Pete French Modified: stable/8/sys/kern/tty.c stable/8/sys/kern/tty_compat.c stable/8/sys/kern/tty_pts.c stable/8/sys/sys/tty.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/tty.c ============================================================================== --- stable/8/sys/kern/tty.c Mon Jan 18 06:48:24 2010 (r202552) +++ stable/8/sys/kern/tty.c Mon Jan 18 09:04:53 2010 (r202553) @@ -504,12 +504,12 @@ ttydev_ioctl(struct cdev *dev, u_long cm case TIOCSPGRP: case TIOCSTART: case TIOCSTAT: + case TIOCSTI: case TIOCSTOP: case TIOCSWINSZ: #if 0 case TIOCSDRAINWAIT: case TIOCSETD: - case TIOCSTI: #endif #ifdef COMPAT_43TTY case TIOCLBIC: @@ -558,7 +558,7 @@ ttydev_ioctl(struct cdev *dev, u_long cm new->c_ospeed = old->c_ospeed; } - error = tty_ioctl(tp, cmd, data, td); + error = tty_ioctl(tp, cmd, data, fflag, td); done: tty_unlock(tp); return (error); @@ -1330,7 +1330,8 @@ tty_flush(struct tty *tp, int flags) } static int -tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, struct thread *td) +tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, + struct thread *td) { int error; @@ -1657,17 +1658,26 @@ tty_generic_ioctl(struct tty *tp, u_long case TIOCSTAT: tty_info(tp); return (0); + case TIOCSTI: + if ((fflag & FREAD) == 0 && priv_check(td, PRIV_TTY_STI)) + return (EPERM); + if (!tty_is_ctty(tp, td->td_proc) && + priv_check(td, PRIV_TTY_STI)) + return (EACCES); + ttydisc_rint(tp, *(char *)data, 0); + ttydisc_rint_done(tp); + return (0); } #ifdef COMPAT_43TTY - return tty_ioctl_compat(tp, cmd, data, td); + return tty_ioctl_compat(tp, cmd, data, fflag, td); #else /* !COMPAT_43TTY */ return (ENOIOCTL); #endif /* COMPAT_43TTY */ } int -tty_ioctl(struct tty *tp, u_long cmd, void *data, struct thread *td) +tty_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, struct thread *td) { int error; @@ -1678,7 +1688,7 @@ tty_ioctl(struct tty *tp, u_long cmd, vo error = ttydevsw_ioctl(tp, cmd, data, td); if (error == ENOIOCTL) - error = tty_generic_ioctl(tp, cmd, data, td); + error = tty_generic_ioctl(tp, cmd, data, fflag, td); return (error); } Modified: stable/8/sys/kern/tty_compat.c ============================================================================== --- stable/8/sys/kern/tty_compat.c Mon Jan 18 06:48:24 2010 (r202552) +++ stable/8/sys/kern/tty_compat.c Mon Jan 18 09:04:53 2010 (r202553) @@ -180,7 +180,8 @@ ttsetcompat(struct tty *tp, u_long *com, /*ARGSUSED*/ int -tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, struct thread *td) +tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, int fflag, + struct thread *td) { switch (com) { case TIOCSETP: @@ -196,7 +197,7 @@ tty_ioctl_compat(struct tty *tp, u_long term = tp->t_termios; if ((error = ttsetcompat(tp, &com, data, &term)) != 0) return error; - return tty_ioctl(tp, com, &term, td); + return tty_ioctl(tp, com, &term, fflag, td); } case TIOCGETP: { struct sgttyb *sg = (struct sgttyb *)data; @@ -255,12 +256,13 @@ tty_ioctl_compat(struct tty *tp, u_long int ldisczero = 0; return (tty_ioctl(tp, TIOCSETD, - *(int *)data == 2 ? (caddr_t)&ldisczero : data, td)); + *(int *)data == 2 ? (caddr_t)&ldisczero : data, + fflag, td)); } case OTIOCCONS: *(int *)data = 1; - return (tty_ioctl(tp, TIOCCONS, data, td)); + return (tty_ioctl(tp, TIOCCONS, data, fflag, td)); default: return (ENOIOCTL); Modified: stable/8/sys/kern/tty_pts.c ============================================================================== --- stable/8/sys/kern/tty_pts.c Mon Jan 18 06:48:24 2010 (r202552) +++ stable/8/sys/kern/tty_pts.c Mon Jan 18 09:04:53 2010 (r202553) @@ -396,7 +396,7 @@ ptsdev_ioctl(struct file *fp, u_long cmd /* Just redirect this ioctl to the slave device. */ tty_lock(tp); - error = tty_ioctl(tp, cmd, data, td); + error = tty_ioctl(tp, cmd, data, fp->f_flag, td); tty_unlock(tp); if (error == ENOIOCTL) error = ENOTTY; Modified: stable/8/sys/sys/tty.h ============================================================================== --- stable/8/sys/sys/tty.h Mon Jan 18 06:48:24 2010 (r202552) +++ stable/8/sys/sys/tty.h Mon Jan 18 09:04:53 2010 (r202553) @@ -182,9 +182,10 @@ void tty_wakeup(struct tty *tp, int flag int tty_checkoutq(struct tty *tp); int tty_putchar(struct tty *tp, char c); -int tty_ioctl(struct tty *tp, u_long cmd, void *data, struct thread *td); -int tty_ioctl_compat(struct tty *tp, u_long cmd, caddr_t data, +int tty_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, struct thread *td); +int tty_ioctl_compat(struct tty *tp, u_long cmd, caddr_t data, + int fflag, struct thread *td); void tty_init_console(struct tty *tp, speed_t speed); void tty_flush(struct tty *tp, int flags); void tty_hiwat_in_block(struct tty *tp); From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:17:51 2010 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 EE76F106566B; Mon, 18 Jan 2010 10:17:51 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B57038FC08; Mon, 18 Jan 2010 10:17:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAHpDA028524; Mon, 18 Jan 2010 10:17:51 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAHpbs028521; Mon, 18 Jan 2010 10:17:51 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001181017.o0IAHpbs028521@svn.freebsd.org> From: "Andrey A. Chernov" Date: Mon, 18 Jan 2010 10:17:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202556 - head/lib/libc/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, 18 Jan 2010 10:17:52 -0000 Author: ache Date: Mon Jan 18 10:17:51 2010 New Revision: 202556 URL: http://svn.freebsd.org/changeset/base/202556 Log: a) Use strcoll() in opendir() and alphasort() as POSIX 2008 requires. It also matches now how our 'ls' works for years. b) Remove comment expressed 2 fears: 1) One just simple describe how strcoll() works in _any_ context, not for directories only. Are we plan to remove strcoll() from everything just because it is little more complex than strcmp()? I doubt, and directories give nothing different here. Moreover, strcoll() used in 'ls' for years and nobody complaints yet. 2) Plain wrong statement about undefined strcoll() behaviour. strcoll() always gives predictable results, falling back to strcmp() on any trouble, see strcoll(3). No objections from -current list discussion. Modified: head/lib/libc/gen/opendir.c head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Mon Jan 18 09:41:54 2010 (r202555) +++ head/lib/libc/gen/opendir.c Mon Jan 18 10:17:51 2010 (r202556) @@ -94,13 +94,13 @@ __opendir2(const char *name, int flags) /* * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for - * directory entries ordering. Use local copy that uses strcmp(). + * directory entries ordering. */ static int opendir_alphasort(const void *p1, const void *p2) { - return (strcmp((*(const struct dirent **)p1)->d_name, + return (strcoll((*(const struct dirent **)p1)->d_name, (*(const struct dirent **)p2)->d_name)); } Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Mon Jan 18 09:41:54 2010 (r202555) +++ head/lib/libc/gen/scandir.c Mon Jan 18 10:17:51 2010 (r202556) @@ -127,17 +127,13 @@ fail: /* * Alphabetic order comparison routine for those who want it. * - * XXXKIB POSIX 2008 requires the alphasort() to use strcoll(). Keep - * strcmp() for now, since environment locale settings could have no - * relevance for the byte sequence of the file name. Moreover, it - * might be even invalid sequence in current locale, and then - * behaviour of alphasort would be undefined. + * POSIX 2008 requires the alphasort() to use strcoll(). */ int alphasort(const struct dirent **d1, const struct dirent **d2) { - return (strcmp((*d1)->d_name, (*d2)->d_name)); + return (strcoll((*d1)->d_name, (*d2)->d_name)); } static int From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:29:05 2010 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 23C141065670; Mon, 18 Jan 2010 10:29:05 +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 138DD8FC16; Mon, 18 Jan 2010 10:29:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAT4MD031130; Mon, 18 Jan 2010 10:29:04 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAT4Dk031128; Mon, 18 Jan 2010 10:29:04 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001181029.o0IAT4Dk031128@svn.freebsd.org> From: David Xu Date: Mon, 18 Jan 2010 10:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202557 - head/lib/libc/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, 18 Jan 2010 10:29:05 -0000 Author: davidxu Date: Mon Jan 18 10:29:04 2010 New Revision: 202557 URL: http://svn.freebsd.org/changeset/base/202557 Log: preserve errno when processing error cases. Modified: head/lib/libc/gen/sem_new.c Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Mon Jan 18 10:17:51 2010 (r202556) +++ head/lib/libc/gen/sem_new.c Mon Jan 18 10:29:04 2010 (r202557) @@ -142,7 +142,7 @@ _sem_open(const char *name, int flags, . va_list ap; struct sem_nameinfo *ni = NULL; sem_t *sem = NULL; - int fd = -1, mode, len; + int fd = -1, mode, len, errsave; int value = 0; if (name[0] != '/') { @@ -233,12 +233,14 @@ _sem_open(const char *name, int flags, . return (sem); error: + errsave = errno; _pthread_mutex_unlock(&sem_llock); if (fd != -1) _close(fd); if (sem != NULL) munmap(sem, sizeof(sem_t)); free(ni); + errno = errsave; return (SEM_FAILED); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:30:11 2010 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 CA7A1106566C; Mon, 18 Jan 2010 10:30: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 BA8678FC15; Mon, 18 Jan 2010 10:30:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAUBvL031407; Mon, 18 Jan 2010 10:30:11 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAUB3Y031405; Mon, 18 Jan 2010 10:30:11 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001181030.o0IAUB3Y031405@svn.freebsd.org> From: Andriy Gapon Date: Mon, 18 Jan 2010 10:30: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: r202558 - head/sys/dev/acpica 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, 18 Jan 2010 10:30:11 -0000 Author: avg Date: Mon Jan 18 10:30:11 2010 New Revision: 202558 URL: http://svn.freebsd.org/changeset/base/202558 Log: acpi_ec: clean up 'private' ivar when freeing memory to which it points This is not only a prudent thing to do, but also makes sure that probe method is not confused by non-NULL 'private', if the previous attach attempt fails for any reason. PR: kern/142561 Tested by: Alex Goncharov MFC after: 4 days Modified: head/sys/dev/acpica/acpi_ec.c Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Mon Jan 18 10:29:04 2010 (r202557) +++ head/sys/dev/acpica/acpi_ec.c Mon Jan 18 10:30:11 2010 (r202558) @@ -469,6 +469,7 @@ acpi_ec_attach(device_t dev) sc->ec_gpehandle = params->gpe_handle; sc->ec_uid = params->uid; sc->ec_suspending = FALSE; + acpi_set_private(dev, NULL); free(params, M_TEMP); /* Attach bus resources for data and command/status ports. */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:39:07 2010 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 AF9031065670; Mon, 18 Jan 2010 10:39:07 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 64C148FC19; Mon, 18 Jan 2010 10:39:07 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 67A1E1FFC22; Mon, 18 Jan 2010 10:39:06 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 246568448A; Mon, 18 Jan 2010 11:39:06 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> <20100114.135930.80200584442733547.imp@bsdimp.com> Date: Mon, 18 Jan 2010 11:39:06 +0100 In-Reply-To: <20100114.135930.80200584442733547.imp@bsdimp.com> (M. Warner Losh's message of "Thu, 14 Jan 2010 13:59:30 -0700 (MST)") Message-ID: <86k4vf66k5.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: dougb@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, freebsd-arch@freebsd.org, svn-src-head@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC 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, 18 Jan 2010 10:39:07 -0000 "M. Warner Losh" writes: > [...] I think this > is the model that best fits most user's needs, since they EITHER take > GENERIC and hack on it (in which case we preserve all that), OR they > include GENERIC and opt in/out of things based on that default. The latter is a far better option - I use the former and have been bitten several times by new mandatory devices and options such as device io, scheduler selection, etc. However, the latter option is not very practical. Picking one of my machines at random, its kernel config has 65 device / option lines, while GENERIC has 219, and they only have 51 lines in common. Instead of 65 device / option lines, I would need 168 nodevice / nooption lines plus 14 device / option lines, for a total of 182 lines. > Heck, we could save the whole src/sys tree as a tarball in a separate > non-loadable ELF section if people that that was useful. Ouch. OTOH, the sys tree is actually smaller than a full GENERIC build... Is there any way we could limit this to those parts of the tree that were actually used to build the kernel? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:50:25 2010 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 AB8B3106566B; Mon, 18 Jan 2010 10:50:25 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8EC8FC08; Mon, 18 Jan 2010 10:50:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAoPZ5036157; Mon, 18 Jan 2010 10:50:25 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAoPiP036155; Mon, 18 Jan 2010 10:50:25 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001181050.o0IAoPiP036155@svn.freebsd.org> From: Ed Schouten Date: Mon, 18 Jan 2010 10:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202559 - head/usr.bin/getent 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, 18 Jan 2010 10:50:25 -0000 Author: ed Date: Mon Jan 18 10:50:25 2010 New Revision: 202559 URL: http://svn.freebsd.org/changeset/base/202559 Log: Also let getent(1) print values of ut_pid. Modified: head/usr.bin/getent/getent.c Modified: head/usr.bin/getent/getent.c ============================================================================== --- head/usr.bin/getent/getent.c Mon Jan 18 10:30:11 2010 (r202558) +++ head/usr.bin/getent/getent.c Mon Jan 18 10:50:25 2010 (r202559) @@ -601,13 +601,13 @@ utmpxprint(const struct utmpx *ut) case USER_PROCESS: printf("user process: id=\""); UTMPXPRINTID; - printf("\" user=\"%s\" line=\"%s\" host=\"%s\"\n", - ut->ut_user, ut->ut_line, ut->ut_host); + printf("\" pid=\"%d\" user=\"%s\" line=\"%s\" host=\"%s\"\n", + ut->ut_pid, ut->ut_user, ut->ut_line, ut->ut_host); break; case DEAD_PROCESS: printf("dead process: id=\""); UTMPXPRINTID; - printf("\"\n"); + printf("\" pid=\"%d\"\n", ut->ut_pid); break; default: printf("unknown record type\n"); From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:53:03 2010 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 9D5E2106566C; Mon, 18 Jan 2010 10:53:03 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB0D8FC08; Mon, 18 Jan 2010 10:53:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAr39N036784; Mon, 18 Jan 2010 10:53:03 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAr3NI036782; Mon, 18 Jan 2010 10:53:03 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001181053.o0IAr3NI036782@svn.freebsd.org> From: Takahashi Yoshihiro Date: Mon, 18 Jan 2010 10:53: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: r202560 - stable/8/release 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, 18 Jan 2010 10:53:03 -0000 Author: nyan Date: Mon Jan 18 10:53:03 2010 New Revision: 202560 URL: http://svn.freebsd.org/changeset/base/202560 Log: MFC: revision 201391 Do kgzip to the loader on pc98, too. Now pc98's boot2 works for ELF. Modified: stable/8/release/Makefile Directory Properties: stable/8/release/ (props changed) stable/8/release/doc/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/8/release/Makefile ============================================================================== --- stable/8/release/Makefile Mon Jan 18 10:50:25 2010 (r202559) +++ stable/8/release/Makefile Mon Jan 18 10:53:03 2010 (r202560) @@ -1347,7 +1347,7 @@ buildBootFloppy: @mkdir ${IMAGEDIR} @echo "Setting up /boot directory for ${FSIMAGE} floppy" @mkdir -p ${IMAGEDIR}/boot -.if ${TARGET} == "i386" +.if ${TARGET_ARCH} == "i386" @${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o -o \ ${IMAGEDIR}/boot/loader ${BOOTDIR}/loader .else From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:54:00 2010 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 5B59C106566C; Mon, 18 Jan 2010 10:54:00 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AB2E8FC16; Mon, 18 Jan 2010 10:54:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAs03E037039; Mon, 18 Jan 2010 10:54:00 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAs0MH037037; Mon, 18 Jan 2010 10:54:00 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001181054.o0IAs0MH037037@svn.freebsd.org> From: Takahashi Yoshihiro Date: Mon, 18 Jan 2010 10:54:00 +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: r202561 - stable/7/release 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, 18 Jan 2010 10:54:00 -0000 Author: nyan Date: Mon Jan 18 10:53:59 2010 New Revision: 202561 URL: http://svn.freebsd.org/changeset/base/202561 Log: MFC: revision 201391 Do kgzip to the loader on pc98, too. Now pc98's boot2 works for ELF. Modified: stable/7/release/Makefile Directory Properties: stable/7/release/ (props changed) stable/7/release/doc/ (props changed) stable/7/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/7/release/Makefile ============================================================================== --- stable/7/release/Makefile Mon Jan 18 10:53:03 2010 (r202560) +++ stable/7/release/Makefile Mon Jan 18 10:53:59 2010 (r202561) @@ -1374,7 +1374,7 @@ buildBootFloppy: @mkdir ${IMAGEDIR} @echo "Setting up /boot directory for ${FSIMAGE} floppy" @mkdir -p ${IMAGEDIR}/boot -.if ${TARGET} == "i386" +.if ${TARGET_ARCH} == "i386" @${WMAKEENV} kgzip -v -l ${RD}/trees/base/usr/lib/kgzldr.o -o \ ${IMAGEDIR}/boot/loader ${BOOTDIR}/loader .else From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:55:29 2010 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 8C8C1106566B; Mon, 18 Jan 2010 10:55:29 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC948FC15; Mon, 18 Jan 2010 10:55:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAtTEk037450; Mon, 18 Jan 2010 10:55:29 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAtTGf037448; Mon, 18 Jan 2010 10:55:29 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001181055.o0IAtTGf037448@svn.freebsd.org> From: Takahashi Yoshihiro Date: Mon, 18 Jan 2010 10:55:29 +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: r202562 - stable/8/usr.sbin/sysinstall 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, 18 Jan 2010 10:55:29 -0000 Author: nyan Date: Mon Jan 18 10:55:29 2010 New Revision: 202562 URL: http://svn.freebsd.org/changeset/base/202562 Log: MFC: revision 201392 Use UFS2 as default filesystem on pc98. Now pc98's boot2 works for UFS2. Modified: stable/8/usr.sbin/sysinstall/label.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/label.c ============================================================================== --- stable/8/usr.sbin/sysinstall/label.c Mon Jan 18 10:53:59 2010 (r202561) +++ stable/8/usr.sbin/sysinstall/label.c Mon Jan 18 10:55:29 2010 (r202562) @@ -384,11 +384,7 @@ new_part(PartType type, char *mpoint, Bo pi->newfs_data.newfs_ufs.acls = FALSE; pi->newfs_data.newfs_ufs.multilabel = FALSE; pi->newfs_data.newfs_ufs.softupdates = strcmp(mpoint, "/"); -#ifdef PC98 - pi->newfs_data.newfs_ufs.ufs1 = TRUE; -#else pi->newfs_data.newfs_ufs.ufs1 = FALSE; -#endif } return pi; From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 10:56:32 2010 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 32987106568D; Mon, 18 Jan 2010 10:56:32 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21B8E8FC14; Mon, 18 Jan 2010 10:56:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAuWZ8037740; Mon, 18 Jan 2010 10:56:32 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAuWnU037738; Mon, 18 Jan 2010 10:56:32 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001181056.o0IAuWnU037738@svn.freebsd.org> From: Takahashi Yoshihiro Date: Mon, 18 Jan 2010 10:56:32 +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: r202563 - stable/7/usr.sbin/sysinstall 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, 18 Jan 2010 10:56:32 -0000 Author: nyan Date: Mon Jan 18 10:56:31 2010 New Revision: 202563 URL: http://svn.freebsd.org/changeset/base/202563 Log: MFC: revision 201392 Use UFS2 as default filesystem on pc98. Now pc98's boot2 works for UFS2. Modified: stable/7/usr.sbin/sysinstall/label.c Directory Properties: stable/7/usr.sbin/sysinstall/ (props changed) Modified: stable/7/usr.sbin/sysinstall/label.c ============================================================================== --- stable/7/usr.sbin/sysinstall/label.c Mon Jan 18 10:55:29 2010 (r202562) +++ stable/7/usr.sbin/sysinstall/label.c Mon Jan 18 10:56:31 2010 (r202563) @@ -384,11 +384,7 @@ new_part(PartType type, char *mpoint, Bo pi->newfs_data.newfs_ufs.acls = FALSE; pi->newfs_data.newfs_ufs.multilabel = FALSE; pi->newfs_data.newfs_ufs.softupdates = strcmp(mpoint, "/"); -#ifdef PC98 - pi->newfs_data.newfs_ufs.ufs1 = TRUE; -#else pi->newfs_data.newfs_ufs.ufs1 = FALSE; -#endif } return pi; From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 11:03:39 2010 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 A5D66106568F; Mon, 18 Jan 2010 11:03:39 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94DDE8FC18; Mon, 18 Jan 2010 11:03:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IB3dQF042028; Mon, 18 Jan 2010 11:03:39 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IB3d19042026; Mon, 18 Jan 2010 11:03:39 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001181103.o0IB3d19042026@svn.freebsd.org> From: Takahashi Yoshihiro Date: Mon, 18 Jan 2010 11:03:39 +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: r202564 - stable/8/sys/pc98/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: Mon, 18 Jan 2010 11:03:39 -0000 Author: nyan Date: Mon Jan 18 11:03:39 2010 New Revision: 202564 URL: http://svn.freebsd.org/changeset/base/202564 Log: MFC: revision 201415 Re-enable more options and devices. Now kernel size problem is gone. Modified: stable/8/sys/pc98/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/pc98/conf/GENERIC ============================================================================== --- stable/8/sys/pc98/conf/GENERIC Mon Jan 18 10:56:31 2010 (r202563) +++ stable/8/sys/pc98/conf/GENERIC Mon Jan 18 11:03:39 2010 (r202564) @@ -38,7 +38,7 @@ options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists @@ -46,13 +46,13 @@ options UFS_DIRHASH # Improve performa options UFS_GJOURNAL # Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device options NFSCLIENT # Network Filesystem Client -#options NFSSERVER # Network Filesystem Server -#options NFSLOCKD # Network Lock Manager +options NFSSERVER # Network Filesystem Server +options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCLIENT options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -#options PSEUDOFS # Pseudo-filesystem framework +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) @@ -66,9 +66,9 @@ options EPSON_BOUNCEDMA # use bounce b #options LINE30 options KTRACE # ktrace(1) support options STACK # stack(9) support -#options SYSVSHM # SYSV-style shared memory -#options SYSVMSG # SYSV-style message queues -#options SYSVSEM # SYSV-style semaphores +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores options P1003_1B_SEMAPHORES # POSIX-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev @@ -106,9 +106,9 @@ device sym # NCR/Symbios Logic (newer device aic # PC-9801-100 device ct # host adapter using WD33C93[ABC] chip (C bus) -#device ncv # NCR 53C500 -#device nsp # Workbit Ninja SCSI-3 -#device stg # TMC 18C30/18C50 +device ncv # NCR 53C500 +device nsp # Workbit Ninja SCSI-3 +device stg # TMC 18C30/18C50 # SCSI peripherals device scbus # SCSI bus (required for SCSI) @@ -147,9 +147,9 @@ device sc # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support -#device cbb # cardbus (yenta) bridge -#device pccard # PC Card (16-bit) bus -#device cardbus # CardBus (32-bit) bus +device cbb # cardbus (yenta) bridge +device pccard # PC Card (16-bit) bus +device cardbus # CardBus (32-bit) bus # Serial (COM) ports #options COM_MULTIPORT @@ -161,15 +161,15 @@ device mse #device joy # NEW Parallel port -#device ppc -#device ppbus # Parallel port bus (required) -#device lpt # Printer -#device plip # TCP/IP over parallel -#device ppi # Parallel port interface device +device ppc +device ppbus # Parallel port bus (required) +device lpt # Printer +device plip # TCP/IP over parallel +device ppi # Parallel port interface device #device vpo # Requires scbus and da # OLD Parallel port # Please stay olpt driver after ppc driver -#device olpt +device olpt # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 11:08:48 2010 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 073EE10656B9; Mon, 18 Jan 2010 11:08:48 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D13B28FC18; Mon, 18 Jan 2010 11:08:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IB8lYB043269; Mon, 18 Jan 2010 11:08:47 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IB8lcP043267; Mon, 18 Jan 2010 11:08:47 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001181108.o0IB8lcP043267@svn.freebsd.org> From: Takahashi Yoshihiro Date: Mon, 18 Jan 2010 11:08:47 +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: r202565 - stable/7/sys/pc98/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: Mon, 18 Jan 2010 11:08:48 -0000 Author: nyan Date: Mon Jan 18 11:08:47 2010 New Revision: 202565 URL: http://svn.freebsd.org/changeset/base/202565 Log: MFC: part of revision 201415 Re-enable more options and devices. Now kernel size problem is gone. Modified: stable/7/sys/pc98/conf/GENERIC Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/pc98/conf/GENERIC ============================================================================== --- stable/7/sys/pc98/conf/GENERIC Mon Jan 18 11:03:39 2010 (r202564) +++ stable/7/sys/pc98/conf/GENERIC Mon Jan 18 11:08:47 2010 (r202565) @@ -97,9 +97,9 @@ device sym # NCR/Symbios Logic (newer device aic # PC-9801-100 device ct # host adapter using WD33C93[ABC] chip (C bus) -#device ncv # NCR 53C500 -#device nsp # Workbit Ninja SCSI-3 -#device stg # TMC 18C30/18C50 +device ncv # NCR 53C500 +device nsp # Workbit Ninja SCSI-3 +device stg # TMC 18C30/18C50 # SCSI peripherals device scbus # SCSI bus (required for SCSI) @@ -138,9 +138,9 @@ device sc # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support -#device cbb # cardbus (yenta) bridge -#device pccard # PC Card (16-bit) bus -#device cardbus # CardBus (32-bit) bus +device cbb # cardbus (yenta) bridge +device pccard # PC Card (16-bit) bus +device cardbus # CardBus (32-bit) bus # Serial (COM) ports options COM_MULTIPORT @@ -151,15 +151,15 @@ device mse #device joy # NEW Parallel port -#device ppc -#device ppbus # Parallel port bus (required) -#device lpt # Printer -#device plip # TCP/IP over parallel -#device ppi # Parallel port interface device +device ppc +device ppbus # Parallel port bus (required) +device lpt # Printer +device plip # TCP/IP over parallel +device ppi # Parallel port interface device #device vpo # Requires scbus and da # OLD Parallel port # Please stay olpt driver after ppc driver -#device olpt +device olpt # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 11:29:52 2010 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 23241106566C; Mon, 18 Jan 2010 11:29:52 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 129138FC16; Mon, 18 Jan 2010 11:29:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IBTpJO048146; Mon, 18 Jan 2010 11:29:51 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IBTpQl048143; Mon, 18 Jan 2010 11:29:51 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001181129.o0IBTpQl048143@svn.freebsd.org> From: Ed Schouten Date: Mon, 18 Jan 2010 11:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202566 - head/lib/libpam/modules/pam_lastlog 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, 18 Jan 2010 11:29:52 -0000 Author: ed Date: Mon Jan 18 11:29:51 2010 New Revision: 202566 URL: http://svn.freebsd.org/changeset/base/202566 Log: Let pam_lastlog use random ut_id's. By using random values for ut_id, not based on the TTY name, it is possible to run for example login(1) multiple times on the same TTY, without overwriting any previous records. The output of w(1) will then be as follows: | 12:26PM up 2 days, 2:31, 5 users, load averages: 0.01, 0.03, 0.03 | USER TTY FROM LOGIN@ IDLE WHAT | ed pts/2 mekker.80386.nl 12:26PM - w | root pts/2 - 12:26PM - w | root pts/2 - 12:26PM - w | root pts/2 - 12:26PM - w Approved by: des Modified: head/lib/libpam/modules/pam_lastlog/Makefile head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Modified: head/lib/libpam/modules/pam_lastlog/Makefile ============================================================================== --- head/lib/libpam/modules/pam_lastlog/Makefile Mon Jan 18 11:08:47 2010 (r202565) +++ head/lib/libpam/modules/pam_lastlog/Makefile Mon Jan 18 11:29:51 2010 (r202566) @@ -28,7 +28,4 @@ LIB= pam_lastlog SRCS= pam_lastlog.c MAN= pam_lastlog.8 -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.c ============================================================================== --- head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Mon Jan 18 11:08:47 2010 (r202565) +++ head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Mon Jan 18 11:29:51 2010 (r202566) @@ -46,9 +46,12 @@ __FBSDID("$FreeBSD$"); #define _BSD_SOURCE +#include #include +#include +#include #include -#include +#include #include #define PAM_SM_SESSION @@ -57,15 +60,18 @@ __FBSDID("$FreeBSD$"); #include #include +#define PAM_UTMPX_ID "utmpx_id" + PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc __unused, const char *argv[] __unused) { struct passwd *pwd; - struct utmpx *utx; + struct utmpx *utx, utl; time_t t; const char *user; const void *rhost, *tty; + char *id; int pam_err; pam_err = pam_get_user(pamh, &user, NULL); @@ -109,7 +115,29 @@ pam_sm_open_session(pam_handle_t *pamh, } } - ulog_login(tty, user, rhost); + id = malloc(sizeof utl.ut_id); + if (id == NULL) { + pam_err = PAM_SERVICE_ERR; + goto err; + } + arc4random_buf(id, sizeof utl.ut_id); + + pam_err = pam_set_data(pamh, PAM_UTMPX_ID, id, openpam_free_data); + if (pam_err != PAM_SUCCESS) { + free(id); + goto err; + } + + memset(&utl, 0, sizeof utl); + utl.ut_type = USER_PROCESS; + memcpy(utl.ut_id, id, sizeof utl.ut_id); + strncpy(utl.ut_user, user, sizeof utl.ut_user); + strncpy(utl.ut_line, tty, sizeof utl.ut_line); + if (rhost != NULL) + strncpy(utl.ut_host, rhost, sizeof utl.ut_host); + utl.ut_pid = getpid(); + gettimeofday(&utl.ut_tv, NULL); + pututxline(&utl); return (PAM_SUCCESS); @@ -123,18 +151,21 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags __unused, int argc __unused, const char *argv[] __unused) { - const void *tty; + struct utmpx utl; + const void *id; int pam_err; - pam_err = pam_get_item(pamh, PAM_TTY, (const void **)&tty); + pam_err = pam_get_data(pamh, PAM_UTMPX_ID, (const void **)&id); if (pam_err != PAM_SUCCESS) goto err; - if (tty == NULL) { - PAM_LOG("No PAM_TTY"); - pam_err = PAM_SERVICE_ERR; - goto err; - } - ulog_logout(tty); + + memset(&utl, 0, sizeof utl); + utl.ut_type = DEAD_PROCESS; + memcpy(utl.ut_id, id, sizeof utl.ut_id); + utl.ut_pid = getpid(); + gettimeofday(&utl.ut_tv, NULL); + pututxline(&utl); + return (PAM_SUCCESS); err: From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 11:33:58 2010 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 EF1C3106566B; Mon, 18 Jan 2010 11:33:58 +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 DF29E8FC08; Mon, 18 Jan 2010 11:33:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IBXwJw049119; Mon, 18 Jan 2010 11:33:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IBXwqR049117; Mon, 18 Jan 2010 11:33:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001181133.o0IBXwqR049117@svn.freebsd.org> From: Andriy Gapon Date: Mon, 18 Jan 2010 11:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202567 - head/sys/dev/acpica 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, 18 Jan 2010 11:33:59 -0000 Author: avg Date: Mon Jan 18 11:33:58 2010 New Revision: 202567 URL: http://svn.freebsd.org/changeset/base/202567 Log: acpi_ec: remove redundant acpi_disabled check in probe method MFC after: 4 days Modified: head/sys/dev/acpica/acpi_ec.c Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Mon Jan 18 11:29:51 2010 (r202566) +++ head/sys/dev/acpica/acpi_ec.c Mon Jan 18 11:33:58 2010 (r202567) @@ -366,8 +366,7 @@ acpi_ec_probe(device_t dev) if (params != NULL) { ecdt = 1; ret = 0; - } else if (!acpi_disabled("ec") && - ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { + } else if (ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { params = malloc(sizeof(struct acpi_ec_params), M_TEMP, M_WAITOK | M_ZERO); h = acpi_get_handle(dev); From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 13:11:38 2010 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 17E0E106568B; Mon, 18 Jan 2010 13:11:38 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 046178FC1C; Mon, 18 Jan 2010 13:11:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IDBcxw071453; Mon, 18 Jan 2010 13:11:38 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IDBbf2071444; Mon, 18 Jan 2010 13:11:37 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001181311.o0IDBbf2071444@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 18 Jan 2010 13:11:37 +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: r202570 - in stable/8: contrib/groff/font/devutf8 contrib/groff/tmac gnu/usr.bin/groff/tmac 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, 18 Jan 2010 13:11:38 -0000 Author: ru Date: Mon Jan 18 13:11:37 2010 New Revision: 202570 URL: http://svn.freebsd.org/changeset/base/202570 Log: MFC: Sync Groff with trunk except libulog addition. Modified: stable/8/contrib/groff/font/devutf8/R.proto stable/8/contrib/groff/tmac/an-old.tmac stable/8/contrib/groff/tmac/doc-common stable/8/contrib/groff/tmac/doc-old.tmac stable/8/contrib/groff/tmac/doc-syms stable/8/contrib/groff/tmac/doc.tmac stable/8/contrib/groff/tmac/groff_mdoc.man stable/8/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/8/contrib/groff/ (props changed) stable/8/gnu/usr.bin/groff/ (props changed) Modified: stable/8/contrib/groff/font/devutf8/R.proto ============================================================================== --- stable/8/contrib/groff/font/devutf8/R.proto Mon Jan 18 12:52:42 2010 (r202569) +++ stable/8/contrib/groff/font/devutf8/R.proto Mon Jan 18 13:11:37 2010 (r202570) @@ -726,7 +726,7 @@ st 24 0 0x220B product 24 0 0x220F coproduct 24 0 0x2210 sum 24 0 0x2211 -\- 24 0 0x002D +\- 24 0 0x2212 mi " -+ 24 0 0x2213 ** 24 0 0x2217 Modified: stable/8/contrib/groff/tmac/an-old.tmac ============================================================================== --- stable/8/contrib/groff/tmac/an-old.tmac Mon Jan 18 12:52:42 2010 (r202569) +++ stable/8/contrib/groff/tmac/an-old.tmac Mon Jan 18 13:11:37 2010 (r202570) @@ -630,6 +630,18 @@ . hy \n[HY] .\} . +.\" For UTF-8, map some characters conservatively for the sake +.\" of easy cut and paste. +. +.if '\*[.T]'utf8' \{\ +. rchar \- - ' ` +. +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char ` \N'96' +.\} +. .\" Load local modifications. .mso man.local . Modified: stable/8/contrib/groff/tmac/doc-common ============================================================================== --- stable/8/contrib/groff/tmac/doc-common Mon Jan 18 12:52:42 2010 (r202569) +++ stable/8/contrib/groff/tmac/doc-common Mon Jan 18 13:11:37 2010 (r202570) @@ -46,6 +46,7 @@ .nr %Q 1 .nr %R 1 .nr %T 1 +.nr %U 1 .nr %V 1 .nr Ac 3 .nr Ad 12n @@ -77,6 +78,7 @@ .nr Dq 12n .nr Ds 6n\" many manpages still use this as a -width value .nr Dv 12n +.nr Dx 1 .nr Ec 3 .nr Ef 8n\" ? .nr Ek 8n\" ? @@ -219,6 +221,7 @@ .\" NS doc-document-title .\" NS doc-section .\" NS doc-volume +.\" NS doc-command-name .\" NS .\" NS local variables: .\" NS doc-volume-as-XXX @@ -319,6 +322,7 @@ . ds doc-document-title UNTITLED . ds doc-volume LOCAL . ds doc-section Null +. ds doc-command-name . . if !"\$1"" \ . ds doc-document-title "\$1 @@ -357,6 +361,12 @@ . if !"\$3"" \ . if "\*[doc-volume]"LOCAL" \ . ds doc-volume \$3 +. +. if !\n[cR] \ +. if \n[nl] \{\ + . doc-setup-header +. bp +. \} .. . . @@ -379,6 +389,7 @@ .\" NS .\" NS modifies: .\" NS doc-operating-system +.\" NS doc-command-name .\" NS .\" NS local variables: .\" NS doc-operating-system-XXX-XXX @@ -435,9 +446,14 @@ .ds doc-operating-system-NetBSD-2.0 2.0 .ds doc-operating-system-NetBSD-2.0.1 2.0.1 .ds doc-operating-system-NetBSD-2.0.2 2.0.2 +.ds doc-operating-system-NetBSD-2.0.3 2.0.3 .ds doc-operating-system-NetBSD-2.1 2.1 .ds doc-operating-system-NetBSD-3.0 3.0 +.ds doc-operating-system-NetBSD-3.0.1 3.0.1 +.ds doc-operating-system-NetBSD-3.0.2 3.0.2 +.ds doc-operating-system-NetBSD-3.1 3.1 .ds doc-operating-system-NetBSD-4.0 4.0 +.ds doc-operating-system-NetBSD-4.0.1 4.0.1 . .ds doc-operating-system-FreeBSD-1.0 1.0 .ds doc-operating-system-FreeBSD-1.1 1.1 @@ -486,23 +502,48 @@ .ds doc-operating-system-FreeBSD-6.0 6.0 .ds doc-operating-system-FreeBSD-6.1 6.1 .ds doc-operating-system-FreeBSD-6.2 6.2 +.ds doc-operating-system-FreeBSD-6.3 6.3 +.ds doc-operating-system-FreeBSD-6.4 6.4 .ds doc-operating-system-FreeBSD-7.0 7.0 +.ds doc-operating-system-FreeBSD-7.1 7.1 . -.ds doc-operating-system-Darwin-8.0.0 8.0.0 -.ds doc-operating-system-Darwin-8.1.0 8.1.0 -.ds doc-operating-system-Darwin-8.2.0 8.2.0 -.ds doc-operating-system-Darwin-8.3.0 8.3.0 -.ds doc-operating-system-Darwin-8.4.0 8.4.0 -.ds doc-operating-system-Darwin-8.5.0 8.5.0 -. -.ds doc-operating-system-DragonFly-1.0 1.0 -.ds doc-operating-system-DragonFly-1.1 1.1 -.ds doc-operating-system-DragonFly-1.2 1.2 -.ds doc-operating-system-DragonFly-1.3 1.3 -.ds doc-operating-system-DragonFly-1.4 1.4 -.ds doc-operating-system-DragonFly-1.5 1.5 +.ds doc-operating-system-Darwin-8.0.0 8.0.0 +.ds doc-operating-system-Darwin-8.1.0 8.1.0 +.ds doc-operating-system-Darwin-8.2.0 8.2.0 +.ds doc-operating-system-Darwin-8.3.0 8.3.0 +.ds doc-operating-system-Darwin-8.4.0 8.4.0 +.ds doc-operating-system-Darwin-8.5.0 8.5.0 +.ds doc-operating-system-Darwin-8.6.0 8.6.0 +.ds doc-operating-system-Darwin-8.7.0 8.7.0 +.ds doc-operating-system-Darwin-8.8.0 8.8.0 +.ds doc-operating-system-Darwin-8.9.0 8.9.0 +.ds doc-operating-system-Darwin-8.10.0 8.10.0 +.ds doc-operating-system-Darwin-8.11.0 8.11.0 +.ds doc-operating-system-Darwin-9.0.0 9.0.0 +.ds doc-operating-system-Darwin-9.1.0 9.1.0 +.ds doc-operating-system-Darwin-9.2.0 9.2.0 +.ds doc-operating-system-Darwin-9.3.0 9.3.0 +.ds doc-operating-system-Darwin-9.4.0 9.4.0 +.ds doc-operating-system-Darwin-9.5.0 9.5.0 +.ds doc-operating-system-Darwin-9.6.0 9.6.0 +. +.ds doc-operating-system-DragonFly-1.0 1.0 +.ds doc-operating-system-DragonFly-1.1 1.1 +.ds doc-operating-system-DragonFly-1.2 1.2 +.ds doc-operating-system-DragonFly-1.3 1.3 +.ds doc-operating-system-DragonFly-1.4 1.4 +.ds doc-operating-system-DragonFly-1.5 1.5 +.ds doc-operating-system-DragonFly-1.6 1.6 +.ds doc-operating-system-DragonFly-1.8 1.8 +.ds doc-operating-system-DragonFly-1.8.1 1.8.1 +.ds doc-operating-system-DragonFly-1.10 1.10 +.ds doc-operating-system-DragonFly-1.12 1.12 +.ds doc-operating-system-DragonFly-1.12.2 1.12.2 +.ds doc-operating-system-DragonFly-2.0 2.0 . .de Os +. ds doc-command-name +. . ie "\$1"" \ . ds doc-operating-system "\*[doc-default-operating-system] . el \{ .ie "\$1"ATT" \{\ @@ -563,6 +604,7 @@ .\" NS .\" NS modifies: .\" NS doc-date-string +.\" NS doc-command-name .\" NS .\" NS local variables: .\" NS doc-date-XXX @@ -583,6 +625,8 @@ .ds doc-date-12 December . .de Dd +. ds doc-command-name +. . ie \n[.$] \{\ . ie (\n[.$] == 3) \ . ds doc-date-string \$1\~\$2 \$3 @@ -1128,6 +1172,8 @@ . tm doc-reference-title-count == \n[doc-reference-title-count] . tm doc-reference-title-name == `\*[doc-reference-title-name]' . tm doc-reference-title-name-for-book == `\*[doc-reference-title-name-for-book]' +. tm doc-url-count == \n[doc-url-count] +. tm doc-url-name == `\*[doc-url-name]' . tm doc-volume-count == \n[doc-volume-count] . tm doc-volume-name == `\*[doc-volume-name]' . tm doc-have-author == \n[doc-have-author] Modified: stable/8/contrib/groff/tmac/doc-old.tmac ============================================================================== --- stable/8/contrib/groff/tmac/doc-old.tmac Mon Jan 18 12:52:42 2010 (r202569) +++ stable/8/contrib/groff/tmac/doc-old.tmac Mon Jan 18 13:11:37 2010 (r202570) @@ -40,7 +40,7 @@ .ds aD \fI .\" Argument Reference Style .ds aR \f(CO -.\" Interactive Comand Modifier (flag) +.\" Interactive Command Modifier (flag) .ds cM \f(CB .\" Emphasis (in the English sense - usually italics) .ds eM \fI Modified: stable/8/contrib/groff/tmac/doc-syms ============================================================================== --- stable/8/contrib/groff/tmac/doc-syms Mon Jan 18 12:52:42 2010 (r202569) +++ stable/8/contrib/groff/tmac/doc-syms Mon Jan 18 13:11:37 2010 (r202570) @@ -651,6 +651,8 @@ .\" X/Open .ds doc-str-St--susv2 Version\~2 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification .as doc-str-St--susv2 " (\*[Lq]\*[doc-Tn-font-size]SUSv2\*[doc-str-St]\*[Rq]) +.ds doc-str-St--susv3 Version\~3 of the Single \*[doc-Tn-font-size]UNIX\*[doc-str-St] Specification +.as doc-str-St--susv3 " (\*[Lq]\*[doc-Tn-font-size]SUSv3\*[doc-str-St]\*[Rq]) .ds doc-str-St--svid4 System\~V Interface Definition, Fourth Edition .as doc-str-St--svid4 " (\*[Lq]\*[doc-Tn-font-size]SVID\*[doc-str-St]\^4\*[Rq]) .ds doc-str-St--xbd5 \*[doc-Tn-font-size]X/Open\*[doc-str-St] System Interface Definitions Issue\~5 Modified: stable/8/contrib/groff/tmac/doc.tmac ============================================================================== --- stable/8/contrib/groff/tmac/doc.tmac Mon Jan 18 12:52:42 2010 (r202569) +++ stable/8/contrib/groff/tmac/doc.tmac Mon Jan 18 13:11:37 2010 (r202570) @@ -356,10 +356,10 @@ . ds doc-macro-name Fl . doc-parse-args \$@ . -. if !\n[.$] \{\ -. \" no arguments +. \" no arguments +. if !\n[.$] \ . nop \|\-\|\f[]\s[0] -. \}\} +. \} . . if !\n[doc-arg-limit] \ . return @@ -481,8 +481,8 @@ . el \{\ . nr doc-reg-dpr \n[doc-arg-ptr] . +. \" the `\%' prevents hyphenation on a dash (`-') . ie (\n[doc-reg-dpr1] == 2) \ -. \" the `\%' prevents hyphenation on a dash (`-') . nop \%\*[doc-str-dpr]\&\c . el \{\ . \" punctuation character @@ -595,10 +595,10 @@ . ds doc-macro-name Ar . doc-parse-args \$@ . -. if !\n[.$] \{\ -. \" no argument +. \" no argument +. if !\n[.$] \ . nop \)\*[doc-str-Ar-default]\&\f[]\s[0] -. \}\} +. \} . . if !\n[doc-arg-limit] \ . return @@ -1034,10 +1034,10 @@ . ds doc-macro-name Pa . doc-parse-args \$@ . -. if !\n[.$] \{\ -. \" default value +. \" default value +. if !\n[.$] \ . nop \*[doc-Pa-font]~\f[]\s[0] -. \}\} +. \} . . if !\n[doc-arg-limit] \ . return @@ -3430,6 +3430,8 @@ . nr doc-reference-title-count-saved \n[doc-reference-title-count] . ds doc-reference-title-name-saved "\*[doc-reference-title-name] . ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book] +. nr doc-url-count-saved \n[doc-url-count] +. ds doc-url-name-saved "\*[doc-url-name] . nr doc-volume-count-saved \n[doc-volume-count] . ds doc-volume-name-saved "\*[doc-volume-name] . nr doc-have-author-saved \n[doc-have-author] @@ -3570,6 +3572,8 @@ . nr doc-reference-title-count \n[doc-reference-title-count-saved] . ds doc-reference-title-name "\*[doc-reference-title-name-saved] . ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved] +. nr doc-url-count \n[doc-url-count-saved] +. ds doc-url-name "\*[doc-url-name-saved] . nr doc-volume-count \n[doc-volume-count-saved] . ds doc-volume-name "\*[doc-volume-name-saved] . nr doc-have-author \n[doc-have-author-saved] @@ -5194,6 +5198,8 @@ .\" NS doc-reference-title-name-for-book .\" NS doc-report-count .\" NS doc-report-name +.\" NS doc-url-count +.\" NS doc-url-name .\" NS doc-volume-count .\" NS doc-volume-name . @@ -5208,6 +5214,7 @@ . nr doc-corporate-count 0 . nr doc-report-count 0 . nr doc-reference-title-count 0 +. nr doc-url-count 0 . nr doc-volume-count 0 . nr doc-date-count 0 . nr doc-page-number-count 0 @@ -5222,6 +5229,7 @@ . ds doc-report-name . ds doc-reference-title-name . ds doc-reference-title-name-for-book +. ds doc-url-name . ds doc-volume-name . ds doc-date . ds doc-page-number-string @@ -5316,6 +5324,13 @@ . doc-finish-reference \n[doc-volume-count] . \} . +. if \n[doc-url-count] \{\ +. unformat doc-url-name +. chop doc-url-name +. nop \*[doc-url-name]\c +. doc-finish-reference \n[doc-url-count] +. \} +. . if \n[doc-page-number-count] \{\ . unformat doc-page-number-string . chop doc-page-number-string @@ -6019,6 +6034,18 @@ .. . . +.\" NS doc-url-count global register +.\" NS counter of hypertext references +. +.nr doc-url-count 0 +. +. +.\" NS doc-url-name global box +.\" NS string of collected hypertext references +. +.ds doc-url-name +. +. .\" NS doc-volume-count global register .\" NS counter of reference title references . @@ -6031,6 +6058,48 @@ .ds doc-volume-name . . +.\" NS %U user macro +.\" NS hypertext reference +.\" NS +.\" NS modifies: +.\" NS doc-arg-ptr +.\" NS doc-curr-font +.\" NS doc-curr-size +.\" NS doc-macro-name +.\" NS doc-reference-count +.\" NS doc-url-count +.\" NS +.\" NS local variables: +.\" NS doc-env-%U +.\" NS +.\" NS width register `%U' set in doc-common +. +.de %U +. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\ +. tm Usage: .%U URL ... (#\n[.c]) +. return +. \} +. +. nr doc-url-count +1 +. nr doc-reference-count +1 +. +. ds doc-macro-name %U +. doc-parse-args \$@ +. +. nr doc-arg-ptr +1 +. nr doc-curr-font \n[.f] +. nr doc-curr-size \n[.ps] +. +. \" append to reference box +. boxa doc-url-name +. ev doc-env-%U +. evc 0 +. in 0 +. nf +. doc-do-references +.. +. +. .\" NS %V user macro .\" NS reference volume .\" NS @@ -6039,7 +6108,7 @@ .\" NS doc-curr-font .\" NS doc-curr-size .\" NS doc-macro-name -.\" NS doc-reference-title-count +.\" NS doc-reference-count .\" NS doc-volume-count .\" NS .\" NS local variables: @@ -6428,6 +6497,19 @@ .ec . . +.\" For UTF-8, map some characters conservatively for the sake +.\" of easy cut and paste. +. +.if '\*[.T]'utf8' \{\ +. rchar \- - ' ` +. +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char ` \N'96' +.\} +. +. .\" load local modifications .mso mdoc.local . Modified: stable/8/contrib/groff/tmac/groff_mdoc.man ============================================================================== --- stable/8/contrib/groff/tmac/groff_mdoc.man Mon Jan 18 12:52:42 2010 (r202569) +++ stable/8/contrib/groff/tmac/groff_mdoc.man Mon Jan 18 13:11:37 2010 (r202570) @@ -864,16 +864,18 @@ the release ID. .It NetBSD 0.8, 0.8a, 0.9, 0.9a, 1.0, 1.0a, 1.1, 1.2, 1.2a, 1.2b, 1.2c, 1.2d, 1.2e, 1.3, 1.3a, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.6.1, -1.6.2, 2.0, 2.0.1, 2.0.2, 2.1, 3.0 +1.6.2, 1.6.3, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 3.0, 3.0.1, 3.0.2, 3.1, 4.0, +4.0.1 .It FreeBSD 1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1, 2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1, 4.1.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.6.2, 4.7, 4.8, 4.9, 4.10, 4.11, 5.0, 5.1, -5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 7.0 +5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1 .It DragonFly -1.0, 1.1, 1.2, 1.3, 1.4, 1.5 +1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.10, 1.12, 1.12.2, 2.0 .It Darwin -8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0 +8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0, 8.6.0, 8.7.0, 8.8.0, 8.9.0, +8.10.0, 8.11.0, 9.0.0, 9.1.0, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.6.0 .El .Ed .Pp @@ -1995,6 +1997,8 @@ X/Open .Pp .It Li \-susv2 .St -susv2 +.It Li \-susv3 +.St -susv3 .It Li \-svid4 .St -svid4 .It Li \-xbd5 @@ -2552,6 +2556,8 @@ Corporate or foreign author. Report name. .It Li .%T Title of article. +.It Li .%U +Optional hypertext reference. .It Li .%V Volume. .El @@ -4086,11 +4092,12 @@ Definitions used for all other devices. .It Pa mdoc.local Local additions and customizations. .It Pa andoc.tmac -This file checks whether the +Use this file if you don't know whether the .Nm \-mdoc or the .Nm \-man package should be used. +Multiple man pages (in either format) can be handled. .El . . Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Mon Jan 18 12:52:42 2010 (r202569) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Mon Jan 18 13:11:37 2010 (r202570) @@ -69,12 +69,10 @@ .ds doc-default-operating-system FreeBSD\~8.0 . .\" FreeBSD releases not found in doc-common -.ds doc-operating-system-FreeBSD-6.3 6.3 -.ds doc-operating-system-FreeBSD-6.4 6.4 -.ds doc-operating-system-FreeBSD-7.1 7.1 .ds doc-operating-system-FreeBSD-7.2 7.2 .ds doc-operating-system-FreeBSD-7.3 7.3 .ds doc-operating-system-FreeBSD-8.0 8.0 +.ds doc-operating-system-FreeBSD-9.0 9.0 . .\" Definitions not (yet) in doc-syms .ds doc-str-St--p1003.1-2008 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-2008 From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 13:44:44 2010 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 B1FB5106566C; Mon, 18 Jan 2010 13:44:44 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16158FC15; Mon, 18 Jan 2010 13:44:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IDiiaZ079039; Mon, 18 Jan 2010 13:44:44 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IDiiEL079037; Mon, 18 Jan 2010 13:44:44 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001181344.o0IDiiEL079037@svn.freebsd.org> From: "Andrey A. Chernov" Date: Mon, 18 Jan 2010 13:44: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: r202572 - head/lib/libc/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, 18 Jan 2010 13:44:44 -0000 Author: ache Date: Mon Jan 18 13:44:44 2010 New Revision: 202572 URL: http://svn.freebsd.org/changeset/base/202572 Log: Double checking my commit I found that comment saying that POSIX 2008 and XSI 7require strcoll() for opendir() is not true. I can't find such requirement in POSIX 2008 and XSI 7. So, back out that part of my commit, returning old strcmp(), and remove this misleading comment. Modified: head/lib/libc/gen/opendir.c Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Mon Jan 18 13:38:45 2010 (r202571) +++ head/lib/libc/gen/opendir.c Mon Jan 18 13:44:44 2010 (r202572) @@ -92,15 +92,11 @@ __opendir2(const char *name, int flags) return __opendir_common(fd, name, flags); } -/* - * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for - * directory entries ordering. - */ static int -opendir_alphasort(const void *p1, const void *p2) +opendir_sort(const void *p1, const void *p2) { - return (strcoll((*(const struct dirent **)p1)->d_name, + return (strcmp((*(const struct dirent **)p1)->d_name, (*(const struct dirent **)p2)->d_name)); } @@ -253,7 +249,7 @@ __opendir_common(int fd, const char *nam * This sort must be stable. */ mergesort(dpv, n, sizeof(*dpv), - opendir_alphasort); + opendir_sort); dpv[n] = NULL; xp = NULL; From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 14:07:41 2010 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 D8418106566B; Mon, 18 Jan 2010 14:07:41 +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 C7C708FC0A; Mon, 18 Jan 2010 14:07:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IE7fqp084276; Mon, 18 Jan 2010 14:07:41 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IE7f5n084274; Mon, 18 Jan 2010 14:07:41 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001181407.o0IE7f5n084274@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 18 Jan 2010 14:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202573 - head/sbin/mdconfig 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, 18 Jan 2010 14:07:41 -0000 Author: jh Date: Mon Jan 18 14:07:41 2010 New Revision: 202573 URL: http://svn.freebsd.org/changeset/base/202573 Log: Print sizes up to INT64_MAX in md_prthumanval(). PR: bin/125365 Approved by: trasz (mentor) MFC after: 2 weeks Modified: head/sbin/mdconfig/mdconfig.c Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Mon Jan 18 13:44:44 2010 (r202572) +++ head/sbin/mdconfig/mdconfig.c Mon Jan 18 14:07:41 2010 (r202573) @@ -454,14 +454,15 @@ static void md_prthumanval(char *length) { char buf[6]; - uint64_t bytes; + uintmax_t bytes; char *endptr; - bytes = strtoul(length, &endptr, 10); - if (bytes == (unsigned)ULONG_MAX || *endptr != '\0') + errno = 0; + bytes = strtoumax(length, &endptr, 10); + if (errno != 0 || *endptr != '\0' || bytes > INT64_MAX) return; - humanize_number(buf, sizeof(buf) - (bytes < 0 ? 0 : 1), - bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); + humanize_number(buf, sizeof(buf), (int64_t)bytes, "", + HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); (void)printf("%6s", buf); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 14:43:45 2010 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 E2DCF106568D; Mon, 18 Jan 2010 14:43:44 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF6588FC18; Mon, 18 Jan 2010 14:43:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IEhiQ3092519; Mon, 18 Jan 2010 14:43:44 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IEhibu092512; Mon, 18 Jan 2010 14:43:44 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001181443.o0IEhibu092512@svn.freebsd.org> From: Attilio Rao Date: Mon, 18 Jan 2010 14:43:44 +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: r202576 - in stable/8: share/man/man9 sys/kern sys/sys 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, 18 Jan 2010 14:43:45 -0000 Author: attilio Date: Mon Jan 18 14:43:44 2010 New Revision: 202576 URL: http://svn.freebsd.org/changeset/base/202576 Log: MFC r200447,201703,201709-201710: In current code, threads performing an interruptible sleep will leave the waiters flag on forcing the owner to do a wakeup even when the waiter queue is empty. That operation may lead to a deadlock in the case of doing a fake wakeup on the "preferred" queue while the other queue has real waiters on it, because nobody is going to wakeup the 2nd queue waiters and they will sleep indefinitively. A similar bug, is present, for lockmgr in the case the waiters are sleeping with LK_SLEEPFAIL on. Add a sleepqueue interface which does report the actual number of waiters on a specified queue of a waitchannel and track if at least one sleepfail waiter is present or not. In presence of this or empty "preferred" queue, wakeup both waiters queues. Discussed with: kib Tested by: Pete French , Justin Head Modified: stable/8/share/man/man9/sleepqueue.9 stable/8/sys/kern/kern_lock.c stable/8/sys/kern/kern_sx.c stable/8/sys/kern/subr_sleepqueue.c stable/8/sys/sys/lockmgr.h stable/8/sys/sys/sleepqueue.h Directory Properties: stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man9/sleepqueue.9 ============================================================================== --- stable/8/share/man/man9/sleepqueue.9 Mon Jan 18 14:32:38 2010 (r202575) +++ stable/8/share/man/man9/sleepqueue.9 Mon Jan 18 14:43:44 2010 (r202576) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2009 +.Dd January 18, 2010 .Dt SLEEPQUEUE 9 .Os .Sh NAME @@ -41,6 +41,7 @@ .Nm sleepq_remove , .Nm sleepq_signal , .Nm sleepq_set_timeout , +.Nm sleepq_sleepcnt , .Nm sleepq_timedwait , .Nm sleepq_timedwait_sig , .Nm sleepq_wait , @@ -77,6 +78,8 @@ .Fn sleepq_signal "void *wchan" "int flags" "int pri" "int queue" .Ft void .Fn sleepq_set_timeout "void *wchan" "int timo" +.Ft u_int +.Fn sleepq_sleepcnt "void *wchan" "int queue" .Ft int .Fn sleepq_timedwait "void *wchan" .Ft int @@ -355,6 +358,14 @@ One possible use is waking up a specific channel. .Pp The +.Fn sleepq_sleepcnt +function offer a simple way to retrieve the number of threads sleeping for +the specified +.Fa queue , +given a +.Fa wchan . +.Pp +The .Fn sleepq_abort , .Fn sleepq_broadcast , and Modified: stable/8/sys/kern/kern_lock.c ============================================================================== --- stable/8/sys/kern/kern_lock.c Mon Jan 18 14:32:38 2010 (r202575) +++ stable/8/sys/kern/kern_lock.c Mon Jan 18 14:43:44 2010 (r202576) @@ -54,8 +54,8 @@ __FBSDID("$FreeBSD$"); #include #endif -CTASSERT(((LK_ADAPTIVE | LK_NOSHARE) & LO_CLASSFLAGS) == - (LK_ADAPTIVE | LK_NOSHARE)); +CTASSERT(((LK_ADAPTIVE | LK_EXSLPFAIL | LK_NOSHARE) & LO_CLASSFLAGS) == + (LK_ADAPTIVE | LK_EXSLPFAIL | LK_NOSHARE)); CTASSERT(LK_UNLOCKED == (LK_UNLOCKED & ~(LK_ALL_WAITERS | LK_EXCLUSIVE_SPINNERS))); @@ -194,6 +194,14 @@ sleeplk(struct lock *lk, u_int flags, st if (flags & LK_INTERLOCK) class->lc_unlock(ilk); + + /* + * LK_EXSLPFAIL is not invariant during the lock pattern but it is + * always protected by the sleepqueue spinlock, thus it is safe to + * handle within the lo_flags. + */ + if (queue == SQ_EXCLUSIVE_QUEUE && (flags & LK_SLEEPFAIL) != 0) + lk->lock_object.lo_flags |= LK_EXSLPFAIL; GIANT_SAVE(); sleepq_add(&lk->lock_object, NULL, wmesg, SLEEPQ_LK | (catch ? SLEEPQ_INTERRUPTIBLE : 0), queue); @@ -222,6 +230,7 @@ static __inline int wakeupshlk(struct lock *lk, const char *file, int line) { uintptr_t v, x; + u_int realexslp; int queue, wakeup_swapper; TD_LOCKS_DEC(curthread); @@ -267,13 +276,45 @@ wakeupshlk(struct lock *lk, const char * /* * If the lock has exclusive waiters, give them preference in * order to avoid deadlock with shared runners up. + * If interruptible sleeps left the exclusive queue empty + * avoid a starvation for the threads sleeping on the shared + * queue by giving them precedence and cleaning up the + * exclusive waiters bit anyway. + * Please note that the LK_EXSLPFAIL flag may be lying about + * the real presence of waiters with the LK_SLEEPFAIL flag on + * because they may be used in conjuction with interruptible + * sleeps. */ - if (x & LK_EXCLUSIVE_WAITERS) { - queue = SQ_EXCLUSIVE_QUEUE; - v |= (x & LK_SHARED_WAITERS); + realexslp = sleepq_sleepcnt(&lk->lock_object, + SQ_EXCLUSIVE_QUEUE); + if ((x & LK_EXCLUSIVE_WAITERS) != 0 && realexslp != 0) { + if ((lk->lock_object.lo_flags & LK_EXSLPFAIL) == 0) { + lk->lock_object.lo_flags &= ~LK_EXSLPFAIL; + queue = SQ_EXCLUSIVE_QUEUE; + v |= (x & LK_SHARED_WAITERS); + } else { + lk->lock_object.lo_flags &= ~LK_EXSLPFAIL; + LOCK_LOG2(lk, + "%s: %p has only LK_SLEEPFAIL sleepers", + __func__, lk); + LOCK_LOG2(lk, + "%s: %p waking up threads on the exclusive queue", + __func__, lk); + wakeup_swapper = + sleepq_broadcast(&lk->lock_object, + SLEEPQ_LK, 0, SQ_EXCLUSIVE_QUEUE); + queue = SQ_SHARED_QUEUE; + } + } else { - MPASS((x & ~LK_EXCLUSIVE_SPINNERS) == - LK_SHARED_WAITERS); + + /* + * Exclusive waiters sleeping with LK_SLEEPFAIL on + * and using interruptible sleeps/timeout may have + * left spourious LK_EXSLPFAIL flag on, so clean + * it up anyway. + */ + lk->lock_object.lo_flags &= ~LK_EXSLPFAIL; queue = SQ_SHARED_QUEUE; } @@ -285,7 +326,7 @@ wakeupshlk(struct lock *lk, const char * LOCK_LOG3(lk, "%s: %p waking up threads on the %s queue", __func__, lk, queue == SQ_SHARED_QUEUE ? "shared" : "exclusive"); - wakeup_swapper = sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, + wakeup_swapper |= sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, 0, queue); sleepq_release(&lk->lock_object); break; @@ -362,6 +403,8 @@ lockdestroy(struct lock *lk) KASSERT(lk->lk_lock == LK_UNLOCKED, ("lockmgr still held")); KASSERT(lk->lk_recurse == 0, ("lockmgr still recursed")); + KASSERT((lk->lock_object.lo_flags & LK_EXSLPFAIL) == 0, + ("lockmgr still exclusive waiters")); lock_destroy(&lk->lock_object); } @@ -373,7 +416,7 @@ __lockmgr_args(struct lock *lk, u_int fl struct lock_class *class; const char *iwmesg; uintptr_t tid, v, x; - u_int op; + u_int op, realexslp; int error, ipri, itimo, queue, wakeup_swapper; #ifdef LOCK_PROFILING uint64_t waittime = 0; @@ -903,14 +946,48 @@ __lockmgr_args(struct lock *lk, u_int fl * If the lock has exclusive waiters, give them * preference in order to avoid deadlock with * shared runners up. + * If interruptible sleeps left the exclusive queue + * empty avoid a starvation for the threads sleeping + * on the shared queue by giving them precedence + * and cleaning up the exclusive waiters bit anyway. + * Please note that the LK_EXSLPFAIL flag may be lying + * about the real presence of waiters with the + * LK_SLEEPFAIL flag on because they may be used in + * conjuction with interruptible sleeps. */ MPASS((x & LK_EXCLUSIVE_SPINNERS) == 0); - if (x & LK_EXCLUSIVE_WAITERS) { - queue = SQ_EXCLUSIVE_QUEUE; - v |= (x & LK_SHARED_WAITERS); + realexslp = sleepq_sleepcnt(&lk->lock_object, + SQ_EXCLUSIVE_QUEUE); + if ((x & LK_EXCLUSIVE_WAITERS) != 0 && realexslp != 0) { + if ((lk->lock_object.lo_flags & + LK_EXSLPFAIL) == 0) { + lk->lock_object.lo_flags &= + ~LK_EXSLPFAIL; + queue = SQ_EXCLUSIVE_QUEUE; + v |= (x & LK_SHARED_WAITERS); + } else { + lk->lock_object.lo_flags &= + ~LK_EXSLPFAIL; + LOCK_LOG2(lk, + "%s: %p has only LK_SLEEPFAIL sleepers", + __func__, lk); + LOCK_LOG2(lk, + "%s: %p waking up threads on the exclusive queue", + __func__, lk); + wakeup_swapper = + sleepq_broadcast(&lk->lock_object, + SLEEPQ_LK, 0, SQ_EXCLUSIVE_QUEUE); + queue = SQ_SHARED_QUEUE; + } } else { - MPASS((x & LK_ALL_WAITERS) == - LK_SHARED_WAITERS); + + /* + * Exclusive waiters sleeping with LK_SLEEPFAIL + * on and using interruptible sleeps/timeout + * may have left spourious LK_EXSLPFAIL flag + * on, so clean it up anyway. + */ + lk->lock_object.lo_flags &= ~LK_EXSLPFAIL; queue = SQ_SHARED_QUEUE; } @@ -919,7 +996,7 @@ __lockmgr_args(struct lock *lk, u_int fl __func__, lk, queue == SQ_SHARED_QUEUE ? "shared" : "exclusive"); atomic_store_rel_ptr(&lk->lk_lock, v); - wakeup_swapper = sleepq_broadcast(&lk->lock_object, + wakeup_swapper |= sleepq_broadcast(&lk->lock_object, SLEEPQ_LK, 0, queue); sleepq_release(&lk->lock_object); break; @@ -976,14 +1053,64 @@ __lockmgr_args(struct lock *lk, u_int fl v = x & (LK_ALL_WAITERS | LK_EXCLUSIVE_SPINNERS); if ((x & ~v) == LK_UNLOCKED) { v = (x & ~LK_EXCLUSIVE_SPINNERS); + + /* + * If interruptible sleeps left the exclusive + * queue empty avoid a starvation for the + * threads sleeping on the shared queue by + * giving them precedence and cleaning up the + * exclusive waiters bit anyway. + * Please note that the LK_EXSLPFAIL flag may + * be lying about the real presence of waiters + * with the LK_SLEEPFAIL flag on because they + * may be used in conjuction with interruptible + * sleeps. + */ if (v & LK_EXCLUSIVE_WAITERS) { queue = SQ_EXCLUSIVE_QUEUE; v &= ~LK_EXCLUSIVE_WAITERS; } else { + + /* + * Exclusive waiters sleeping with + * LK_SLEEPFAIL on and using + * interruptible sleeps/timeout may + * have left spourious LK_EXSLPFAIL + * flag on, so clean it up anyway. + */ MPASS(v & LK_SHARED_WAITERS); + lk->lock_object.lo_flags &= + ~LK_EXSLPFAIL; queue = SQ_SHARED_QUEUE; v &= ~LK_SHARED_WAITERS; } + if (queue == SQ_EXCLUSIVE_QUEUE) { + realexslp = + sleepq_sleepcnt(&lk->lock_object, + SQ_EXCLUSIVE_QUEUE); + if ((lk->lock_object.lo_flags & + LK_EXSLPFAIL) == 0) { + lk->lock_object.lo_flags &= + ~LK_EXSLPFAIL; + queue = SQ_SHARED_QUEUE; + v &= ~LK_SHARED_WAITERS; + if (realexslp != 0) { + LOCK_LOG2(lk, + "%s: %p has only LK_SLEEPFAIL sleepers", + __func__, lk); + LOCK_LOG2(lk, + "%s: %p waking up threads on the exclusive queue", + __func__, lk); + wakeup_swapper = + sleepq_broadcast( + &lk->lock_object, + SLEEPQ_LK, 0, + SQ_EXCLUSIVE_QUEUE); + } + } else + lk->lock_object.lo_flags &= + ~LK_EXSLPFAIL; + } if (!atomic_cmpset_ptr(&lk->lk_lock, x, v)) { sleepq_release(&lk->lock_object); continue; Modified: stable/8/sys/kern/kern_sx.c ============================================================================== --- stable/8/sys/kern/kern_sx.c Mon Jan 18 14:32:38 2010 (r202575) +++ stable/8/sys/kern/kern_sx.c Mon Jan 18 14:43:44 2010 (r202576) @@ -702,8 +702,12 @@ _sx_xunlock_hard(struct sx *sx, uintptr_ * ideal. It gives precedence to shared waiters if they are * present. For this condition, we have to preserve the * state of the exclusive waiters flag. + * If interruptible sleeps left the shared queue empty avoid a + * starvation for the threads sleeping on the exclusive queue by giving + * them precedence and cleaning up the shared waiters bit anyway. */ - if (sx->sx_lock & SX_LOCK_SHARED_WAITERS) { + if ((sx->sx_lock & SX_LOCK_SHARED_WAITERS) != 0 && + sleepq_sleepcnt(&sx->lock_object, SQ_SHARED_QUEUE) != 0) { queue = SQ_SHARED_QUEUE; x |= (sx->sx_lock & SX_LOCK_EXCLUSIVE_WAITERS); } else Modified: stable/8/sys/kern/subr_sleepqueue.c ============================================================================== --- stable/8/sys/kern/subr_sleepqueue.c Mon Jan 18 14:32:38 2010 (r202575) +++ stable/8/sys/kern/subr_sleepqueue.c Mon Jan 18 14:43:44 2010 (r202576) @@ -118,6 +118,7 @@ __FBSDID("$FreeBSD$"); */ struct sleepqueue { TAILQ_HEAD(, thread) sq_blocked[NR_SLEEPQS]; /* (c) Blocked threads. */ + u_int sq_blockedcnt[NR_SLEEPQS]; /* (c) N. of blocked threads. */ LIST_ENTRY(sleepqueue) sq_hash; /* (c) Chain and free list. */ LIST_HEAD(, sleepqueue) sq_free; /* (c) Free queues. */ void *sq_wchan; /* (c) Wait channel. */ @@ -306,9 +307,12 @@ sleepq_add(void *wchan, struct lock_obje int i; sq = td->td_sleepqueue; - for (i = 0; i < NR_SLEEPQS; i++) + for (i = 0; i < NR_SLEEPQS; i++) { KASSERT(TAILQ_EMPTY(&sq->sq_blocked[i]), - ("thread's sleep queue %d is not empty", i)); + ("thread's sleep queue %d is not empty", i)); + KASSERT(sq->sq_blockedcnt[i] == 0, + ("thread's sleep queue %d count mismatches", i)); + } KASSERT(LIST_EMPTY(&sq->sq_free), ("thread's sleep queue has a non-empty free list")); KASSERT(sq->sq_wchan == NULL, ("stale sq_wchan pointer")); @@ -334,6 +338,7 @@ sleepq_add(void *wchan, struct lock_obje } thread_lock(td); TAILQ_INSERT_TAIL(&sq->sq_blocked[queue], td, td_slpq); + sq->sq_blockedcnt[queue]++; td->td_sleepqueue = NULL; td->td_sqqueue = queue; td->td_wchan = wchan; @@ -367,6 +372,22 @@ sleepq_set_timeout(void *wchan, int timo } /* + * Return the number of actual sleepers for the specified queue. + */ +u_int +sleepq_sleepcnt(void *wchan, int queue) +{ + struct sleepqueue *sq; + + KASSERT(wchan != NULL, ("%s: invalid NULL wait channel", __func__)); + MPASS((queue >= 0) && (queue < NR_SLEEPQS)); + sq = sleepq_lookup(wchan); + if (sq == NULL) + return (0); + return (sq->sq_blockedcnt[queue]); +} + +/* * Marks the pending sleep of the current thread as interruptible and * makes an initial check for pending signals before putting a thread * to sleep. Enters and exits with the thread lock held. Thread lock @@ -665,6 +686,7 @@ sleepq_resume_thread(struct sleepqueue * mtx_assert(&sc->sc_lock, MA_OWNED); /* Remove the thread from the queue. */ + sq->sq_blockedcnt[td->td_sqqueue]--; TAILQ_REMOVE(&sq->sq_blocked[td->td_sqqueue], td, td_slpq); /* @@ -720,8 +742,10 @@ sleepq_dtor(void *mem, int size, void *a int i; sq = mem; - for (i = 0; i < NR_SLEEPQS; i++) + for (i = 0; i < NR_SLEEPQS; i++) { MPASS(TAILQ_EMPTY(&sq->sq_blocked[i])); + MPASS(sq->sq_blockedcnt[i] == 0); + } } #endif @@ -736,8 +760,10 @@ sleepq_init(void *mem, int size, int fla bzero(mem, size); sq = mem; - for (i = 0; i < NR_SLEEPQS; i++) + for (i = 0; i < NR_SLEEPQS; i++) { TAILQ_INIT(&sq->sq_blocked[i]); + sq->sq_blockedcnt[i] = 0; + } LIST_INIT(&sq->sq_free); return (0); } @@ -1170,6 +1196,7 @@ found: td->td_tid, td->td_proc->p_pid, td->td_name); } + db_printf("(expected: %u)\n", sq->sq_blockedcnt[i]); } } Modified: stable/8/sys/sys/lockmgr.h ============================================================================== --- stable/8/sys/sys/lockmgr.h Mon Jan 18 14:32:38 2010 (r202575) +++ stable/8/sys/sys/lockmgr.h Mon Jan 18 14:43:44 2010 (r202576) @@ -144,6 +144,9 @@ _lockmgr_args_rw(struct lock *lk, u_int #define LK_QUIET 0x000020 #define LK_ADAPTIVE 0x000040 +/* LK_EXSLPFAIL to follow, even if not used in lockinit() */ +#define LK_EXSLPFAIL 0x000080 + /* * Additional attributes to be used in lockmgr(). */ Modified: stable/8/sys/sys/sleepqueue.h ============================================================================== --- stable/8/sys/sys/sleepqueue.h Mon Jan 18 14:32:38 2010 (r202575) +++ stable/8/sys/sys/sleepqueue.h Mon Jan 18 14:43:44 2010 (r202576) @@ -109,6 +109,7 @@ void sleepq_release(void *wchan); void sleepq_remove(struct thread *td, void *wchan); int sleepq_signal(void *wchan, int flags, int pri, int queue); void sleepq_set_timeout(void *wchan, int timo); +u_int sleepq_sleepcnt(void *wchan, int queue); int sleepq_timedwait(void *wchan, int pri); int sleepq_timedwait_sig(void *wchan, int pri); void sleepq_wait(void *wchan, int pri); From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 15:41:55 2010 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 54CC2106566B; Mon, 18 Jan 2010 15:41:55 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440FA8FC13; Mon, 18 Jan 2010 15:41:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IFftFB005617; Mon, 18 Jan 2010 15:41:55 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IFftNe005615; Mon, 18 Jan 2010 15:41:55 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001181541.o0IFftNe005615@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 18 Jan 2010 15:41:55 +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: r202578 - head/share/mk 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, 18 Jan 2010 15:41:55 -0000 Author: ru Date: Mon Jan 18 15:41:55 2010 New Revision: 202578 URL: http://svn.freebsd.org/changeset/base/202578 Log: If CTAGS is not set or set to something other than "ctags" or "gtags", "cleandepend" was not removing the .depend file; fixed. PR: 126747 MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Jan 18 14:51:00 2010 (r202577) +++ head/share/mk/bsd.dep.mk Mon Jan 18 15:41:55 2010 (r202578) @@ -182,6 +182,8 @@ cleandepend: .if defined(HTML) rm -rf HTML .endif +.else + rm -f ${DEPENDFILE} .endif .endif .endif From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 15:58:02 2010 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 EFFB7106568F; Mon, 18 Jan 2010 15:58:02 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF1A88FC0A; Mon, 18 Jan 2010 15:58:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IFw2SB009279; Mon, 18 Jan 2010 15:58:02 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IFw22D009277; Mon, 18 Jan 2010 15:58:02 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001181558.o0IFw22D009277@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 18 Jan 2010 15:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202579 - head/share/mk 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, 18 Jan 2010 15:58:03 -0000 Author: ru Date: Mon Jan 18 15:58:02 2010 New Revision: 202579 URL: http://svn.freebsd.org/changeset/base/202579 Log: Allow the CTAGS to be set to something other than "gtags" or "ctags", but assume it supports a ctags(1)-compatible syntax. PR: 46676 Submitted by: Lyndon Nerenberg MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Jan 18 15:41:55 2010 (r202578) +++ head/share/mk/bsd.dep.mk Mon Jan 18 15:58:02 2010 (r202579) @@ -58,14 +58,14 @@ DEPENDFILE?= .depend # Keep `tags' here, before SRCS are mangled below for `depend'. .if !target(tags) && defined(SRCS) && !defined(NO_TAGS) tags: ${SRCS} -.if ${CTAGS:T} == "ctags" - @${CTAGS} ${CTAGSFLAGS} -f /dev/stdout \ - ${.ALLSRC:N*.h} | sed "s;${.CURDIR}/;;" > ${.TARGET} -.elif ${CTAGS:T} == "gtags" +.if ${CTAGS:T} == "gtags" @cd ${.CURDIR} && ${CTAGS} ${GTAGSFLAGS} ${.OBJDIR} .if defined(HTML) @cd ${.CURDIR} && htags ${HTAGSFLAGS} -d ${.OBJDIR} ${.OBJDIR} .endif +.else + @${CTAGS} ${CTAGSFLAGS} -f /dev/stdout \ + ${.ALLSRC:N*.h} | sed "s;${.CURDIR}/;;" > ${.TARGET} .endif .endif @@ -175,15 +175,13 @@ afterdepend: .if !target(cleandepend) cleandepend: .if defined(SRCS) -.if ${CTAGS:T} == "ctags" - rm -f ${DEPENDFILE} tags -.elif ${CTAGS:T} == "gtags" +.if ${CTAGS:T} == "gtags" rm -f ${DEPENDFILE} GPATH GRTAGS GSYMS GTAGS .if defined(HTML) rm -rf HTML .endif .else - rm -f ${DEPENDFILE} + rm -f ${DEPENDFILE} tags .endif .endif .endif From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 17:52:57 2010 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 924A0106566C; Mon, 18 Jan 2010 17:52:57 +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 6852B8FC14; Mon, 18 Jan 2010 17:52:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IHqvkr034903; Mon, 18 Jan 2010 17:52:57 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IHqvER034901; Mon, 18 Jan 2010 17:52:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001181752.o0IHqvER034901@svn.freebsd.org> From: Warner Losh Date: Mon, 18 Jan 2010 17:52:57 +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: r202580 - head/sys/dev/cs 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, 18 Jan 2010 17:52:57 -0000 Author: imp Date: Mon Jan 18 17:52:57 2010 New Revision: 202580 URL: http://svn.freebsd.org/changeset/base/202580 Log: Fix indentation nit. Modified: head/sys/dev/cs/if_cs.c Modified: head/sys/dev/cs/if_cs.c ============================================================================== --- head/sys/dev/cs/if_cs.c Mon Jan 18 15:58:02 2010 (r202579) +++ head/sys/dev/cs/if_cs.c Mon Jan 18 17:52:57 2010 (r202580) @@ -852,7 +852,7 @@ cs_write_mbufs( struct cs_softc *sc, str * Ignore empty parts */ if (!len) - continue; + continue; /* * Find actual data address From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 17:53:44 2010 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 BA0CC106568B; Mon, 18 Jan 2010 17:53: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 A99218FC0C; Mon, 18 Jan 2010 17:53:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IHriIW035104; Mon, 18 Jan 2010 17:53:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IHrioQ035102; Mon, 18 Jan 2010 17:53:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001181753.o0IHrioQ035102@svn.freebsd.org> From: Warner Losh Date: Mon, 18 Jan 2010 17:53: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: r202581 - head/sys/dev/cs 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, 18 Jan 2010 17:53:44 -0000 Author: imp Date: Mon Jan 18 17:53:44 2010 New Revision: 202581 URL: http://svn.freebsd.org/changeset/base/202581 Log: Add a warning if we're inw'ing from an odd address. This could happen due to a bug and might be the real basis for the cardbus workaround hack. Modified: head/sys/dev/cs/if_csreg.h Modified: head/sys/dev/cs/if_csreg.h ============================================================================== --- head/sys/dev/cs/if_csreg.h Mon Jan 18 17:52:57 2010 (r202580) +++ head/sys/dev/cs/if_csreg.h Mon Jan 18 17:53:44 2010 (r202581) @@ -539,6 +539,8 @@ static __inline uint16_t cs_inw(struct cs_softc *sc, int off) { + if (off & 1) + device_printf(sc->dev, "BUG: inw to an odd address.\n"); return ((inb(sc->nic_addr + off) & 0xff) | (inb(sc->nic_addr + off + 1) << 8)); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 18:37:47 2010 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 CD8461065692; Mon, 18 Jan 2010 18:37:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A38128FC19; Mon, 18 Jan 2010 18:37:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IIblU8044780; Mon, 18 Jan 2010 18:37:47 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IIblg7044778; Mon, 18 Jan 2010 18:37:47 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001181837.o0IIblg7044778@svn.freebsd.org> From: Doug Barton Date: Mon, 18 Jan 2010 18:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202582 - head/etc/namedb 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, 18 Jan 2010 18:37:47 -0000 Author: dougb Date: Mon Jan 18 18:37:47 2010 New Revision: 202582 URL: http://svn.freebsd.org/changeset/base/202582 Log: Update the example named.conf file to answer locally for the newly released IPv4 documentation ranges (http://tools.ietf.org/html/rfc5737) and catch up to the IPv6 documentation range and domain names that 5737 also references. Modified: head/etc/namedb/named.conf Modified: head/etc/namedb/named.conf ============================================================================== --- head/etc/namedb/named.conf Mon Jan 18 17:53:44 2010 (r202581) +++ head/etc/namedb/named.conf Mon Jan 18 18:37:47 2010 (r202582) @@ -125,7 +125,7 @@ zone "in-addr.arpa" { 1. Faster local resolution for your users 2. No spurious traffic will be sent from your network to the roots */ -// RFC 1912 +// RFC 1912 (and BCP 32 for localhost) zone "localhost" { type master; file "/etc/namedb/master/localhost-forward.db"; }; zone "127.in-addr.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; }; zone "255.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; @@ -159,8 +159,21 @@ zone "168.192.in-addr.arpa" { type maste // Link-local/APIPA (RFCs 3330 and 3927) zone "254.169.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; -// TEST-NET for Documentation (RFC 3330) +// TEST-NET-[1-3] for Documentation (RFC 5737) zone "2.0.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "100.51.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "113.0.203.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// IPv6 Range for Documentation (RFC 3849) +zone "0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// Domain Names for Documentation and Testing (BCP 32) +zone "test" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example" { type master; file "/etc/namedb/master/empty.db"; }; +zone "invalid" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.com" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.net" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.org" { type master; file "/etc/namedb/master/empty.db"; }; // Router Benchmark Testing (RFC 3330) zone "18.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 18:58:03 2010 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 A6C291065670; Mon, 18 Jan 2010 18:58:03 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96B3A8FC18; Mon, 18 Jan 2010 18:58:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IIw3pJ049360; Mon, 18 Jan 2010 18:58:03 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IIw3F3049358; Mon, 18 Jan 2010 18:58:03 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001181858.o0IIw3F3049358@svn.freebsd.org> From: Ed Schouten Date: Mon, 18 Jan 2010 18:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202583 - head/sys/kern 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, 18 Jan 2010 18:58:03 -0000 Author: ed Date: Mon Jan 18 18:58:03 2010 New Revision: 202583 URL: http://svn.freebsd.org/changeset/base/202583 Log: Remove a dead initialization. Spotted by: scan-build (uqs) Modified: head/sys/kern/tty_inq.c Modified: head/sys/kern/tty_inq.c ============================================================================== --- head/sys/kern/tty_inq.c Mon Jan 18 18:37:47 2010 (r202582) +++ head/sys/kern/tty_inq.c Mon Jan 18 18:58:03 2010 (r202583) @@ -379,7 +379,7 @@ ttyinq_findchar(struct ttyinq *ti, const void ttyinq_flush(struct ttyinq *ti) { - struct ttyinq_block *tib = ti->ti_lastblock; + struct ttyinq_block *tib; ti->ti_begin = 0; ti->ti_linestart = 0; From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 19:09:16 2010 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 A6ECE1065670; Mon, 18 Jan 2010 19:09:16 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96D788FC19; Mon, 18 Jan 2010 19:09:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IJ9GUv051861; Mon, 18 Jan 2010 19:09:16 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IJ9GEG051859; Mon, 18 Jan 2010 19:09:16 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201001181909.o0IJ9GEG051859@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 18 Jan 2010 19:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202584 - head/sys/fs/ext2fs 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, 18 Jan 2010 19:09:16 -0000 Author: lulf Date: Mon Jan 18 19:09:16 2010 New Revision: 202584 URL: http://svn.freebsd.org/changeset/base/202584 Log: Revert parts of r202283: - Return EOPNOTSUPP before EROFS to be consistent with other filesystems. - Fix setting of the nodump flag for users without PRIV_VFS_SYSFLAGS privilege. Submitted by: jh@ Modified: head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Mon Jan 18 18:58:03 2010 (r202583) +++ head/sys/fs/ext2fs/ext2_vnops.c Mon Jan 18 19:09:16 2010 (r202584) @@ -402,11 +402,12 @@ ext2_setattr(ap) return (EINVAL); } if (vap->va_flags != VNOVAL) { - if (vp->v_mount->mnt_flag & MNT_RDONLY) - return (EROFS); /* Disallow flags not supported by ext2fs. */ if(vap->va_flags & ~(SF_APPEND | SF_IMMUTABLE | UF_NODUMP)) - return(EOPNOTSUPP); + return (EOPNOTSUPP); + + if (vp->v_mount->mnt_flag & MNT_RDONLY) + return (EROFS); /* * Callers may only modify the file flags on objects they * have VADMIN rights for. @@ -430,9 +431,11 @@ ext2_setattr(ap) ip->i_flags = vap->va_flags; } else { if (ip->i_flags - & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) + & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND) || + (vap->va_flags & UF_SETTABLE) != vap->va_flags) return (EPERM); ip->i_flags &= SF_SETTABLE; + ip->i_flags |= (vap->va_flags & UF_SETTABLE); } ip->i_flag |= IN_CHANGE; if (vap->va_flags & (IMMUTABLE | APPEND)) From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 19:10:15 2010 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 4B2C4106568F; Mon, 18 Jan 2010 19:10:15 +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 3B1588FC0A; Mon, 18 Jan 2010 19:10:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IJAFvG052131; Mon, 18 Jan 2010 19:10:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IJAF1I052129; Mon, 18 Jan 2010 19:10:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001181910.o0IJAF1I052129@svn.freebsd.org> From: Andriy Gapon Date: Mon, 18 Jan 2010 19:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202585 - head/lib/libstand 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, 18 Jan 2010 19:10:15 -0000 Author: avg Date: Mon Jan 18 19:10:14 2010 New Revision: 202585 URL: http://svn.freebsd.org/changeset/base/202585 Log: fix a comment typo MFC after: 3 days Modified: head/lib/libstand/bzipfs.c Modified: head/lib/libstand/bzipfs.c ============================================================================== --- head/lib/libstand/bzipfs.c Mon Jan 18 19:09:16 2010 (r202584) +++ head/lib/libstand/bzipfs.c Mon Jan 18 19:10:14 2010 (r202585) @@ -279,7 +279,7 @@ bzf_rewind(struct open_file *f) /* * Since bzip2 does not have an equivalent inflateReset function a crude * one needs to be provided. The functions all called in such a way that - * at any time an error occurs a role back can be done (effectively making + * at any time an error occurs a roll back can be done (effectively making * this rewind 'atomic', either the reset occurs successfully or not at all, * with no 'undefined' state happening). */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 19:39:55 2010 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 69EA41065676; Mon, 18 Jan 2010 19:39:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59DC48FC20; Mon, 18 Jan 2010 19:39:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IJdt4U058650; Mon, 18 Jan 2010 19:39:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IJdtDE058648; Mon, 18 Jan 2010 19:39:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001181939.o0IJdtDE058648@svn.freebsd.org> From: Xin LI Date: Mon, 18 Jan 2010 19:39:55 +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: r202586 - head/sbin/geom/core 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, 18 Jan 2010 19:39:55 -0000 Author: delphij Date: Mon Jan 18 19:39:55 2010 New Revision: 202586 URL: http://svn.freebsd.org/changeset/base/202586 Log: Also output stripeoffset for consumer even if stripesize is zero, while stripeoffset is non-zero. Pointed out by: mav Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Mon Jan 18 19:10:14 2010 (r202585) +++ head/sbin/geom/core/geom.c Mon Jan 18 19:39:55 2010 (r202586) @@ -800,7 +800,7 @@ list_one_consumer(struct gconsumer *cp, printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_mediasize, buf); printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); - if (pp->lg_stripesize > 0) { + if (pp->lg_stripesize > 0 || pp->lg_stripeoffset > 0) { printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 20:25:30 2010 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 2CC9A1065670; Mon, 18 Jan 2010 20:25:30 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C9338FC0A; Mon, 18 Jan 2010 20:25:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IKPUd3068641; Mon, 18 Jan 2010 20:25:30 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IKPTh9068639; Mon, 18 Jan 2010 20:25:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001182025.o0IKPTh9068639@svn.freebsd.org> From: Marius Strobl Date: Mon, 18 Jan 2010 20:25:29 +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: r202587 - head/sys/sparc64/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: Mon, 18 Jan 2010 20:25:30 -0000 Author: marius Date: Mon Jan 18 20:25:29 2010 New Revision: 202587 URL: http://svn.freebsd.org/changeset/base/202587 Log: Add epic(4) also here. MFC after: 3 days Modified: head/sys/sparc64/conf/NOTES Modified: head/sys/sparc64/conf/NOTES ============================================================================== --- head/sys/sparc64/conf/NOTES Mon Jan 18 19:39:55 2010 (r202586) +++ head/sys/sparc64/conf/NOTES Mon Jan 18 20:25:29 2010 (r202587) @@ -43,6 +43,7 @@ device mc146818 # Motorola MC146818 and # device auxio # auxiliary I/O device +device epic # Sun Fire V215/V245 LEDs device creator # Creator, Creator3D and Elite3D framebuffers device machfb # ATI Mach64 framebuffers From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 20:34:01 2010 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 546121065694; Mon, 18 Jan 2010 20:34:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 438C08FC20; Mon, 18 Jan 2010 20:34:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IKY1eT070560; Mon, 18 Jan 2010 20:34:01 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IKY1p4070521; Mon, 18 Jan 2010 20:34:01 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001182034.o0IKY1p4070521@svn.freebsd.org> From: Andrew Thompson Date: Mon, 18 Jan 2010 20:34: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: r202588 - in head/sys: net netgraph 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, 18 Jan 2010 20:34:01 -0000 Author: thompsa Date: Mon Jan 18 20:34:00 2010 New Revision: 202588 URL: http://svn.freebsd.org/changeset/base/202588 Log: Declare a new EVENTHANDLER called iflladdr_event which signals that the L2 address on an interface has changed. This lets stacked interfaces such as vlan(4) detect that their lower interface has changed and adjust things in order to keep working. Previously this situation broke at least vlan(4) and lagg(4) configurations. The EVENTHANDLER_INVOKE call was not placed within if_setlladdr() due to the risk of a loop. PR: kern/142927 Submitted by: Nikolay Denev Modified: head/sys/net/if.c head/sys/net/if_bridge.c head/sys/net/if_lagg.c head/sys/net/if_var.h head/sys/net/if_vlan.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_ether.c head/sys/netgraph/ng_fec.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if.c Mon Jan 18 20:34:00 2010 (r202588) @@ -2268,6 +2268,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, return (error); error = if_setlladdr(ifp, ifr->ifr_addr.sa_data, ifr->ifr_addr.sa_len); + EVENTHANDLER_INVOKE(iflladdr_event, ifp); break; case SIOCAIFGROUP: Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if_bridge.c Mon Jan 18 20:34:00 2010 (r202588) @@ -917,6 +917,7 @@ bridge_delete_member(struct bridge_softc IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = fif; } + EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); } bridge_mutecaps(sc); /* recalcuate now this interface is removed */ @@ -1033,6 +1034,7 @@ bridge_ioctl_add(struct bridge_softc *sc !memcmp(IF_LLADDR(sc->sc_ifp), sc->sc_defaddr, ETHER_ADDR_LEN)) { bcopy(IF_LLADDR(ifs), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = ifs; + EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); } ifs->if_bridge = sc; Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if_lagg.c Mon Jan 18 20:34:00 2010 (r202588) @@ -305,6 +305,7 @@ lagg_lladdr(struct lagg_softc *sc, uint8 /* Let the protocol know the MAC has changed */ if (sc->sc_lladdr != NULL) (*sc->sc_lladdr)(sc); + EVENTHANDLER_INVOKE(iflladdr_event, ifp); } static void Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if_var.h Mon Jan 18 20:34:00 2010 (r202588) @@ -339,6 +339,9 @@ void if_maddr_runlock(struct ifnet *ifp) } while(0) #ifdef _KERNEL +/* interface link layer address change event */ +typedef void (*iflladdr_event_handler_t)(void *, struct ifnet *); +EVENTHANDLER_DECLARE(iflladdr_event, iflladdr_event_handler_t); /* interface address change event */ typedef void (*ifaddr_event_handler_t)(void *, struct ifnet *); EVENTHANDLER_DECLARE(ifaddr_event, ifaddr_event_handler_t); Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if_vlan.c Mon Jan 18 20:34:00 2010 (r202588) @@ -138,6 +138,7 @@ SYSCTL_INT(_net_link_vlan, OID_AUTO, sof static MALLOC_DEFINE(M_VLAN, VLANNAME, "802.1Q Virtual LAN Interface"); static eventhandler_tag ifdetach_tag; +static eventhandler_tag iflladdr_tag; /* * We have a global mutex, that is used to serialize configuration @@ -199,6 +200,7 @@ static int vlan_clone_create(struct if_c static int vlan_clone_destroy(struct if_clone *, struct ifnet *); static void vlan_ifdetach(void *arg, struct ifnet *ifp); +static void vlan_iflladdr(void *arg, struct ifnet *ifp); static struct if_clone vlan_cloner = IFC_CLONE_INITIALIZER(VLANNAME, NULL, IF_MAXUNIT, NULL, vlan_clone_match, vlan_clone_create, vlan_clone_destroy); @@ -463,6 +465,41 @@ vlan_setmulti(struct ifnet *ifp) } /* + * A handler for parent interface link layer address changes. + * If the parent interface link layer address is changed we + * should also change it on all children vlans. + */ +static void +vlan_iflladdr(void *arg __unused, struct ifnet *ifp) +{ + struct ifvlan *ifv; + int i; + + /* + * Check if it's a trunk interface first of all + * to avoid needless locking. + */ + if (ifp->if_vlantrunk == NULL) + return; + + VLAN_LOCK(); + /* + * OK, it's a trunk. Loop over and change all vlan's lladdrs on it. + */ +#ifdef VLAN_ARRAY + for (i = 0; i < VLAN_ARRAY_SIZE; i++) + if ((ifv = ifp->if_vlantrunk->vlans[i])) + if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); +#else /* VLAN_ARRAY */ + for (i = 0; i < (1 << ifp->if_vlantrunk->hwidth); i++) + LIST_FOREACH(ifv, &ifp->if_vlantrunk->hash[i], ifv_list) + if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); +#endif /* VLAN_ARRAY */ + VLAN_UNLOCK(); + +} + +/* * A handler for network interface departure events. * Track departure of trunks here so that we don't access invalid * pointers or whatever if a trunk is ripped from under us, e.g., @@ -537,6 +574,10 @@ vlan_modevent(module_t mod, int type, vo vlan_ifdetach, NULL, EVENTHANDLER_PRI_ANY); if (ifdetach_tag == NULL) return (ENOMEM); + iflladdr_tag = EVENTHANDLER_REGISTER(iflladdr_event, + vlan_iflladdr, NULL, EVENTHANDLER_PRI_ANY); + if (iflladdr_tag == NULL) + return (ENOMEM); VLAN_LOCK_INIT(); vlan_input_p = vlan_input; vlan_link_state_p = vlan_link_state; @@ -555,6 +596,7 @@ vlan_modevent(module_t mod, int type, vo case MOD_UNLOAD: if_clone_detach(&vlan_cloner); EVENTHANDLER_DEREGISTER(ifnet_departure_event, ifdetach_tag); + EVENTHANDLER_DEREGISTER(iflladdr_event, iflladdr_tag); vlan_input_p = NULL; vlan_link_state_p = NULL; vlan_trunk_cap_p = NULL; Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/netgraph/ng_eiface.c Mon Jan 18 20:34:00 2010 (r202588) @@ -431,6 +431,7 @@ ng_eiface_rcvmsg(node_p node, item_p ite } error = if_setlladdr(priv->ifp, (u_char *)msg->data, ETHER_ADDR_LEN); + EVENTHANDLER_INVOKE(iflladdr_event, priv->ifp); break; } Modified: head/sys/netgraph/ng_ether.c ============================================================================== --- head/sys/netgraph/ng_ether.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/netgraph/ng_ether.c Mon Jan 18 20:34:00 2010 (r202588) @@ -481,6 +481,7 @@ ng_ether_rcvmsg(node_p node, item_p item } error = if_setlladdr(priv->ifp, (u_char *)msg->data, ETHER_ADDR_LEN); + EVENTHANDLER_INVOKE(iflladdr_event, priv->ifp); break; } case NGM_ETHER_GET_PROMISC: Modified: head/sys/netgraph/ng_fec.c ============================================================================== --- head/sys/netgraph/ng_fec.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/netgraph/ng_fec.c Mon Jan 18 20:34:00 2010 (r202588) @@ -433,6 +433,7 @@ ng_fec_addport(struct ng_fec_private *pr /* Set up phony MAC address. */ if_setlladdr(bifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + EVENTHANDLER_INVOKE(iflladdr_event, bifp); /* Save original input vector */ new->fec_if_input = bifp->if_input; From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 20:57:50 2010 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 DA53D106566C; Mon, 18 Jan 2010 20:57: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 C9DB68FC1F; Mon, 18 Jan 2010 20:57:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IKvodZ075873; Mon, 18 Jan 2010 20:57:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IKvohY075871; Mon, 18 Jan 2010 20:57:50 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001182057.o0IKvohY075871@svn.freebsd.org> From: Michael Tuexen Date: Mon, 18 Jan 2010 20:57:50 +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: r202589 - stable/7/sys/netinet 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, 18 Jan 2010 20:57:51 -0000 Author: tuexen Date: Mon Jan 18 20:57:50 2010 New Revision: 202589 URL: http://svn.freebsd.org/changeset/base/202589 Log: MFC 198522: Bugfix: Use formula from section 7.2.3 of RFC 4960. Reported by Martin Becke. Modified: stable/7/sys/netinet/sctp_cc_functions.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/sctp_cc_functions.c ============================================================================== --- stable/7/sys/netinet/sctp_cc_functions.c Mon Jan 18 20:34:00 2010 (r202588) +++ stable/7/sys/netinet/sctp_cc_functions.c Mon Jan 18 20:57:50 2010 (r202589) @@ -348,7 +348,7 @@ sctp_cwnd_update_after_timeout(struct sc { int old_cwnd = net->cwnd; - net->ssthresh = max(net->cwnd / 2, 2 * net->mtu); + net->ssthresh = max(net->cwnd / 2, 4 * net->mtu); net->cwnd = net->mtu; net->partial_bytes_acked = 0; From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 21:17:03 2010 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 B5950106566B; Mon, 18 Jan 2010 21:17:03 +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 9B0978FC13; Mon, 18 Jan 2010 21:17:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ILH3hh080390; Mon, 18 Jan 2010 21:17:03 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ILH3xF080386; Mon, 18 Jan 2010 21:17:03 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001182117.o0ILH3xF080386@svn.freebsd.org> From: Alan Cox Date: Mon, 18 Jan 2010 21:17: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: r202591 - in stable/8/sys: amd64/amd64 i386/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: Mon, 18 Jan 2010 21:17:03 -0000 Author: alc Date: Mon Jan 18 21:17:03 2010 New Revision: 202591 URL: http://svn.freebsd.org/changeset/base/202591 Log: MFC r202085 Simplify pmap_init(). Additionally, correct a harmless misbehavior on i386. Modified: stable/8/sys/amd64/amd64/pmap.c stable/8/sys/i386/i386/locore.s stable/8/sys/i386/i386/pmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/pmap.c ============================================================================== --- stable/8/sys/amd64/amd64/pmap.c Mon Jan 18 21:00:29 2010 (r202590) +++ stable/8/sys/amd64/amd64/pmap.c Mon Jan 18 21:17:03 2010 (r202591) @@ -626,7 +626,6 @@ pmap_page_init(vm_page_t m) void pmap_init(void) { - pd_entry_t *pd; vm_page_t mpte; vm_size_t s; int i, pv_npg; @@ -635,18 +634,13 @@ pmap_init(void) * Initialize the vm page array entries for the kernel pmap's * page table pages. */ - pd = pmap_pde(kernel_pmap, KERNBASE); for (i = 0; i < NKPT; i++) { - if ((pd[i] & (PG_PS | PG_V)) == (PG_PS | PG_V)) - continue; - KASSERT((pd[i] & PG_V) != 0, - ("pmap_init: page table page is missing")); - mpte = PHYS_TO_VM_PAGE(pd[i] & PG_FRAME); + mpte = PHYS_TO_VM_PAGE(KPTphys + (i << PAGE_SHIFT)); KASSERT(mpte >= vm_page_array && mpte < &vm_page_array[vm_page_array_size], ("pmap_init: page table page is out of range")); mpte->pindex = pmap_pde_pindex(KERNBASE) + i; - mpte->phys_addr = pd[i] & PG_FRAME; + mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); } /* Modified: stable/8/sys/i386/i386/locore.s ============================================================================== --- stable/8/sys/i386/i386/locore.s Mon Jan 18 21:00:29 2010 (r202590) +++ stable/8/sys/i386/i386/locore.s Mon Jan 18 21:17:03 2010 (r202591) @@ -104,9 +104,7 @@ IdlePTD: .long 0 /* phys addr of kernel IdlePDPT: .long 0 /* phys addr of kernel PDPT */ #endif -#ifdef SMP .globl KPTphys -#endif KPTphys: .long 0 /* phys addr of kernel page tables */ .globl proc0kstack Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Mon Jan 18 21:00:29 2010 (r202590) +++ stable/8/sys/i386/i386/pmap.c Mon Jan 18 21:17:03 2010 (r202591) @@ -206,6 +206,7 @@ int pseflag = 0; /* PG_PS or-in */ static int nkpt; vm_offset_t kernel_vm_end; extern u_int32_t KERNend; +extern u_int32_t KPTphys; #ifdef PAE pt_entry_t pg_nx; @@ -649,13 +650,13 @@ pmap_init(void) * Initialize the vm page array entries for the kernel pmap's * page table pages. */ - for (i = 0; i < nkpt; i++) { - mpte = PHYS_TO_VM_PAGE(PTD[i + KPTDI] & PG_FRAME); + for (i = 0; i < NKPT; i++) { + mpte = PHYS_TO_VM_PAGE(KPTphys + (i << PAGE_SHIFT)); KASSERT(mpte >= vm_page_array && mpte < &vm_page_array[vm_page_array_size], ("pmap_init: page table page is out of range")); mpte->pindex = i + KPTDI; - mpte->phys_addr = PTD[i + KPTDI] & PG_FRAME; + mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); } /* From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 21:25:12 2010 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 9B22010656A5; Mon, 18 Jan 2010 21:25:12 +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 8A17E8FC15; Mon, 18 Jan 2010 21:25:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ILPCeD082283; Mon, 18 Jan 2010 21:25:12 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ILPC3o082280; Mon, 18 Jan 2010 21:25:12 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001182125.o0ILPC3o082280@svn.freebsd.org> From: Michael Tuexen Date: Mon, 18 Jan 2010 21:25:12 +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: r202592 - stable/7/sys/netinet 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, 18 Jan 2010 21:25:12 -0000 Author: tuexen Date: Mon Jan 18 21:25:12 2010 New Revision: 202592 URL: http://svn.freebsd.org/changeset/base/202592 Log: MFC 193089: Fix a small memory leak from the nr-sack code - the mapping array was not being freed at term of association. Also get rid of the MICHAELS_EXP code. Modified: stable/7/sys/netinet/sctp_pcb.c stable/7/sys/netinet/sctputil.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/sctp_pcb.c ============================================================================== --- stable/7/sys/netinet/sctp_pcb.c Mon Jan 18 21:17:03 2010 (r202591) +++ stable/7/sys/netinet/sctp_pcb.c Mon Jan 18 21:25:12 2010 (r202592) @@ -4102,9 +4102,6 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(stcb->asoc.my_vtag, SCTP_BASE_INFO(hashasocmark))]; /* put it in the bucket in the vtag hash of assoc's for the system */ LIST_INSERT_HEAD(head, stcb, sctp_asocs); -#ifdef MICHAELS_EXPERIMENT - sctp_delete_from_timewait(stcb->asoc.my_vtag, inp->sctp_lport, stcb->rport); -#endif SCTP_INP_INFO_WUNLOCK(); if ((err = sctp_add_remote_addr(stcb, firstaddr, SCTP_DO_SETSCOPE, SCTP_ALLOC_ASOC))) { @@ -4117,6 +4114,10 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, SCTP_FREE(asoc->mapping_array, SCTP_M_MAP); asoc->mapping_array = NULL; } + if (asoc->nr_mapping_array) { + SCTP_FREE(asoc->nr_mapping_array, SCTP_M_MAP); + asoc->nr_mapping_array = NULL; + } SCTP_DECR_ASOC_COUNT(); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); @@ -4879,6 +4880,10 @@ sctp_free_assoc(struct sctp_inpcb *inp, SCTP_FREE(asoc->mapping_array, SCTP_M_MAP); asoc->mapping_array = NULL; } + if (asoc->nr_mapping_array) { + SCTP_FREE(asoc->nr_mapping_array, SCTP_M_MAP); + asoc->nr_mapping_array = NULL; + } /* the stream outs */ if (asoc->strmout) { SCTP_FREE(asoc->strmout, SCTP_M_STRMO); @@ -6361,21 +6366,6 @@ skip_vtag_check: } } SCTP_INP_INFO_RUNLOCK(); -#ifdef MICHAELS_EXPERIMENT - /*- - * Not found, ok to use the tag, add it to the time wait hash - * as well this will prevent two sucessive cookies from getting - * the same tag or two inits sent quickly on multi-processors. - * We only keep the tag for the life of a cookie and when we - * add this tag to the assoc hash we need to purge it from - * the t-wait hash. - */ - SCTP_INP_INFO_WLOCK(); - if (save_in_twait) - sctp_add_vtag_to_timewait(tag, TICKS_TO_SEC(inp->sctp_ep.def_cookie_life, lport, rport)); - SCTP_INP_INFO_WUNLOCK(); -#endif - return (1); } Modified: stable/7/sys/netinet/sctputil.c ============================================================================== --- stable/7/sys/netinet/sctputil.c Mon Jan 18 21:17:03 2010 (r202591) +++ stable/7/sys/netinet/sctputil.c Mon Jan 18 21:25:12 2010 (r202592) @@ -912,24 +912,7 @@ sctp_init_asoc(struct sctp_inpcb *m, str #endif asoc->sb_send_resv = 0; if (override_tag) { -#ifdef MICHAELS_EXPERIMENT - if (sctp_is_in_timewait(override_tag, stcb->sctp_ep->sctp_lport, stcb->rport)) { - /* - * It must be in the time-wait hash, we put it there - * when we aloc one. If not the peer is playing - * games. - */ - asoc->my_vtag = override_tag; - } else { - SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOMEM); -#ifdef INVARIANTS - panic("Huh is_in_timewait fails"); -#endif - return (ENOMEM); - } -#else asoc->my_vtag = override_tag; -#endif } else { asoc->my_vtag = sctp_select_a_tag(m, stcb->sctp_ep->sctp_lport, stcb->rport, 1); } @@ -1154,11 +1137,12 @@ sctp_init_asoc(struct sctp_inpcb *m, str asoc->nr_mapping_array_size = SCTP_INITIAL_NR_MAPPING_ARRAY; SCTP_MALLOC(asoc->nr_mapping_array, uint8_t *, asoc->nr_mapping_array_size, SCTP_M_MAP); - /* - * if (asoc->nr_mapping_array == NULL) { SCTP_FREE(asoc->strmout, - * SCTP_M_STRMO); SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, - * SCTP_FROM_SCTPUTIL, ENOMEM); return (ENOMEM); } - */ + if (asoc->nr_mapping_array == NULL) { + SCTP_FREE(asoc->strmout, SCTP_M_STRMO); + SCTP_FREE(asoc->mapping_array, SCTP_M_MAP); + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOMEM); + return (ENOMEM); + } memset(asoc->nr_mapping_array, 0, asoc->nr_mapping_array_size); /* Now the init of the other outqueues */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 21:28:11 2010 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 AAB76106568D; Mon, 18 Jan 2010 21:28:11 +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 9A46B8FC0A; Mon, 18 Jan 2010 21:28:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ILSB9R082957; Mon, 18 Jan 2010 21:28:11 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ILSB14082955; Mon, 18 Jan 2010 21:28:11 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001182128.o0ILSB14082955@svn.freebsd.org> From: Michael Tuexen Date: Mon, 18 Jan 2010 21:28:11 +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: r202593 - stable/7/sys/netinet 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, 18 Jan 2010 21:28:11 -0000 Author: tuexen Date: Mon Jan 18 21:28:11 2010 New Revision: 202593 URL: http://svn.freebsd.org/changeset/base/202593 Log: MFC 195894: Add a missing unlock for the inp lock when returning early from sctp_add_to_readq(). Modified: stable/7/sys/netinet/sctputil.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/sctputil.c ============================================================================== --- stable/7/sys/netinet/sctputil.c Mon Jan 18 21:25:12 2010 (r202592) +++ stable/7/sys/netinet/sctputil.c Mon Jan 18 21:28:11 2010 (r202593) @@ -4463,6 +4463,7 @@ sctp_add_to_readq(struct sctp_inpcb *inp control->tail_mbuf = prev; } else { /* Everything got collapsed out?? */ + SCTP_INP_READ_UNLOCK(inp); return; } if (end) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 21:55:13 2010 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 45C89106566B; Mon, 18 Jan 2010 21:55:13 +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 3608F8FC15; Mon, 18 Jan 2010 21:55:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ILtD6T088956; Mon, 18 Jan 2010 21:55:13 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ILtDQ0088954; Mon, 18 Jan 2010 21:55:13 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001182155.o0ILtDQ0088954@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 18 Jan 2010 21:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202595 - vendor/tzdata/dist 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, 18 Jan 2010 21:55:13 -0000 Author: edwin Date: Mon Jan 18 21:55:12 2010 New Revision: 202595 URL: http://svn.freebsd.org/changeset/base/202595 Log: Vendor import of tzdata2010a: Administrative only: Fix AT fields for Asia/Dhaka Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/asia Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Mon Jan 18 21:35:22 2010 (r202594) +++ vendor/tzdata/dist/asia Mon Jan 18 21:55:12 2010 (r202595) @@ -1,4 +1,4 @@ -# @(#)asia 8.50 +# @(#)asia 8.51 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -226,10 +226,10 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # # establishment of a rule. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Dhaka 2009 only - Jun 29 23:00 1 S -Rule Dhaka 2010 only - Jan 1 0:00 - - -Rule Dhaka 2010 max - Mar 31 23:00 1 S -Rule Dhaka 2010 max - Nov 1 0:00 - - +Rule Dhaka 2009 only - Jun 19 23:00 1:00 S +Rule Dhaka 2010 only - Jan 1 0:00 0 - +Rule Dhaka 2010 max - Mar 31 23:00 1:00 S +Rule Dhaka 2010 max - Nov 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 21:56:09 2010 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 21E771065670; Mon, 18 Jan 2010 21:56:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11D168FC15; Mon, 18 Jan 2010 21:56:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ILu8hc089192; Mon, 18 Jan 2010 21:56:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ILu8iF089189; Mon, 18 Jan 2010 21:56:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001182156.o0ILu8iF089189@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 18 Jan 2010 21:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202596 - in head: share/mk 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: Mon, 18 Jan 2010 21:56:09 -0000 Author: trasz Date: Mon Jan 18 21:56:08 2010 New Revision: 202596 URL: http://svn.freebsd.org/changeset/base/202596 Log: Undo r169961, removing WITH_GCC3, added as a temporary workaround three years ago. Modified: head/share/mk/bsd.sys.mk head/sys/conf/kern.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Mon Jan 18 21:55:12 2010 (r202595) +++ head/share/mk/bsd.sys.mk Mon Jan 18 21:56:08 2010 (r202596) @@ -55,9 +55,7 @@ CWARNFLAGS += -Wchar-subscripts -Winline # XXX always get it right. CWARNFLAGS += -Wno-uninitialized . endif -. if !defined(WITH_GCC3) CWARNFLAGS += -Wno-pointer-sign -. endif . endif . if defined(FORMAT_AUDIT) Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Mon Jan 18 21:55:12 2010 (r202595) +++ head/sys/conf/kern.mk Mon Jan 18 21:56:08 2010 (r202596) @@ -12,10 +12,7 @@ CWARNFLAGS= .else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - ${_wundef} ${_Wno_pointer_sign} -fformat-extensions -.if !defined(WITH_GCC3) -_Wno_pointer_sign=-Wno-pointer-sign -.endif + ${_wundef} -Wno-pointer-sign -fformat-extensions .if !defined(NO_UNDEF) _wundef= -Wundef .endif From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 22:46:07 2010 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 21738106566B; Mon, 18 Jan 2010 22:46:07 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 070008FC1B; Mon, 18 Jan 2010 22:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IMk6QR000349; Mon, 18 Jan 2010 22:46:06 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IMk6dw000346; Mon, 18 Jan 2010 22:46:06 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182246.o0IMk6dw000346@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 22:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202598 - head/sys/compat/linux 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, 18 Jan 2010 22:46:07 -0000 Author: wkoszek Date: Mon Jan 18 22:46:06 2010 New Revision: 202598 URL: http://svn.freebsd.org/changeset/base/202598 Log: Let us to use our libusb(3) in Linuxolator. With this change, Linux binaries can work with our libusb(3) when it's compiled against our header files on GNU/Linux system -- this solves the problem with differences between /dev layouts. With ported libusb(3), I am able to use my USB JTAG cable with Linux binaries that support it. Reviewed by: thompsa Modified: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Mon Jan 18 22:39:33 2010 (r202597) +++ head/sys/compat/linux/linux_ioctl.c Mon Jan 18 22:46:06 2010 (r202598) @@ -96,6 +96,7 @@ static linux_ioctl_function_t linux_ioct static linux_ioctl_function_t linux_ioctl_sg; static linux_ioctl_function_t linux_ioctl_v4l; static linux_ioctl_function_t linux_ioctl_special; +static linux_ioctl_function_t linux_ioctl_fbsd_usb; static struct linux_ioctl_handler cdrom_handler = { linux_ioctl_cdrom, LINUX_IOCTL_CDROM_MIN, LINUX_IOCTL_CDROM_MAX }; @@ -121,6 +122,8 @@ static struct linux_ioctl_handler sg_han { linux_ioctl_sg, LINUX_IOCTL_SG_MIN, LINUX_IOCTL_SG_MAX }; static struct linux_ioctl_handler video_handler = { linux_ioctl_v4l, LINUX_IOCTL_VIDEO_MIN, LINUX_IOCTL_VIDEO_MAX }; +static struct linux_ioctl_handler fbsd_usb = +{ linux_ioctl_fbsd_usb, LINUX_FBSD_USB_MIN, LINUX_FBSD_USB_MAX }; DATA_SET(linux_ioctl_handler_set, cdrom_handler); DATA_SET(linux_ioctl_handler_set, vfat_handler); @@ -134,6 +137,7 @@ DATA_SET(linux_ioctl_handler_set, privat DATA_SET(linux_ioctl_handler_set, drm_handler); DATA_SET(linux_ioctl_handler_set, sg_handler); DATA_SET(linux_ioctl_handler_set, video_handler); +DATA_SET(linux_ioctl_handler_set, fbsd_usb); struct handler_element { @@ -2960,6 +2964,24 @@ linux_ioctl_special(struct thread *td, s } /* + * Support for mounting our devfs under /compat/linux/dev and using + * our libusb(3) compiled on Linux to access it from within Linuxolator + * environment. + */ +static int +linux_ioctl_fbsd_usb(struct thread *td, struct linux_ioctl_args *args) +{ + + /* + * Because on GNU/Linux we build our libusb(3) with our header + * files and ioccom.h macros, ioctl() will contain our native + * command value. This means that we can basically redirect this + * call further. + */ + return (ioctl(td, (struct ioctl_args *)args)); +} + +/* * main ioctl syscall function */ Modified: head/sys/compat/linux/linux_ioctl.h ============================================================================== --- head/sys/compat/linux/linux_ioctl.h Mon Jan 18 22:39:33 2010 (r202597) +++ head/sys/compat/linux/linux_ioctl.h Mon Jan 18 22:46:06 2010 (r202598) @@ -611,4 +611,10 @@ int linux_ifname(struct ifnet *, char #define LINUX_IOCTL_VIDEO_MIN LINUX_VIDIOCGCAP #define LINUX_IOCTL_VIDEO_MAX LINUX_VIDIOCSVBIFMT +/* + * Keep in sync with our include/dev/usb/usb_ioctl.h. + */ +#define LINUX_FBSD_USB_MIN 0x5100 +#define LINUX_FBSD_USB_MAX 0x55c7 + #endif /* !_LINUX_IOCTL_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 22:48:42 2010 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 1377F1065670; Mon, 18 Jan 2010 22:48:42 +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 ED0878FC13; Mon, 18 Jan 2010 22:48:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IMmfDE000958; Mon, 18 Jan 2010 22:48:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IMmfe9000954; Mon, 18 Jan 2010 22:48:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001182248.o0IMmfe9000954@svn.freebsd.org> From: Alan Cox Date: Mon, 18 Jan 2010 22:48:41 +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: r202599 - in stable/7/sys: amd64/amd64 i386/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: Mon, 18 Jan 2010 22:48:42 -0000 Author: alc Date: Mon Jan 18 22:48:41 2010 New Revision: 202599 URL: http://svn.freebsd.org/changeset/base/202599 Log: MFC r202085 Simplify pmap_init(). Additionally, correct a harmless misbehavior on i386. Modified: stable/7/sys/amd64/amd64/pmap.c stable/7/sys/i386/i386/locore.s stable/7/sys/i386/i386/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Mon Jan 18 22:46:06 2010 (r202598) +++ stable/7/sys/amd64/amd64/pmap.c Mon Jan 18 22:48:41 2010 (r202599) @@ -629,7 +629,6 @@ pmap_page_init(vm_page_t m) void pmap_init(void) { - pd_entry_t *pd; vm_page_t mpte; vm_size_t s; int i, pv_npg; @@ -638,18 +637,13 @@ pmap_init(void) * Initialize the vm page array entries for the kernel pmap's * page table pages. */ - pd = pmap_pde(kernel_pmap, KERNBASE); for (i = 0; i < NKPT; i++) { - if ((pd[i] & (PG_PS | PG_V)) == (PG_PS | PG_V)) - continue; - KASSERT((pd[i] & PG_V) != 0, - ("pmap_init: page table page is missing")); - mpte = PHYS_TO_VM_PAGE(pd[i] & PG_FRAME); + mpte = PHYS_TO_VM_PAGE(KPTphys + (i << PAGE_SHIFT)); KASSERT(mpte >= vm_page_array && mpte < &vm_page_array[vm_page_array_size], ("pmap_init: page table page is out of range")); mpte->pindex = pmap_pde_pindex(KERNBASE) + i; - mpte->phys_addr = pd[i] & PG_FRAME; + mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); } /* Modified: stable/7/sys/i386/i386/locore.s ============================================================================== --- stable/7/sys/i386/i386/locore.s Mon Jan 18 22:46:06 2010 (r202598) +++ stable/7/sys/i386/i386/locore.s Mon Jan 18 22:48:41 2010 (r202599) @@ -104,9 +104,7 @@ IdlePTD: .long 0 /* phys addr of kernel IdlePDPT: .long 0 /* phys addr of kernel PDPT */ #endif -#ifdef SMP .globl KPTphys -#endif KPTphys: .long 0 /* phys addr of kernel page tables */ .globl proc0kstack Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Mon Jan 18 22:46:06 2010 (r202598) +++ stable/7/sys/i386/i386/pmap.c Mon Jan 18 22:48:41 2010 (r202599) @@ -205,6 +205,7 @@ int pseflag = 0; /* PG_PS or-in */ static int nkpt; vm_offset_t kernel_vm_end; extern u_int32_t KERNend; +extern u_int32_t KPTphys; #ifdef PAE pt_entry_t pg_nx; @@ -642,13 +643,13 @@ pmap_init(void) * Initialize the vm page array entries for the kernel pmap's * page table pages. */ - for (i = 0; i < nkpt; i++) { - mpte = PHYS_TO_VM_PAGE(PTD[i + KPTDI] & PG_FRAME); + for (i = 0; i < NKPT; i++) { + mpte = PHYS_TO_VM_PAGE(KPTphys + (i << PAGE_SHIFT)); KASSERT(mpte >= vm_page_array && mpte < &vm_page_array[vm_page_array_size], ("pmap_init: page table page is out of range")); mpte->pindex = i + KPTDI; - mpte->phys_addr = PTD[i + KPTDI] & PG_FRAME; + mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); } /* From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 22:59:53 2010 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 5B653106566C; Mon, 18 Jan 2010 22:59:53 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AEE58FC15; Mon, 18 Jan 2010 22:59:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IMxrPW003464; Mon, 18 Jan 2010 22:59:53 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IMxrfW003462; Mon, 18 Jan 2010 22:59:53 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182259.o0IMxrfW003462@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 22:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202600 - head/share/examples/kld/firmware/fwconsumer 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, 18 Jan 2010 22:59:53 -0000 Author: wkoszek Date: Mon Jan 18 22:59:53 2010 New Revision: 202600 URL: http://svn.freebsd.org/changeset/base/202600 Log: Small fix for making this KLD to compile. Modified: head/share/examples/kld/firmware/fwconsumer/fw_consumer.c Modified: head/share/examples/kld/firmware/fwconsumer/fw_consumer.c ============================================================================== --- head/share/examples/kld/firmware/fwconsumer/fw_consumer.c Mon Jan 18 22:48:41 2010 (r202599) +++ head/share/examples/kld/firmware/fwconsumer/fw_consumer.c Mon Jan 18 22:59:53 2010 (r202600) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -static struct firmware *fp; +static const struct firmware *fp; static int fw_consumer_modevent(module_t mod, int type, void *unused) From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 23:04:38 2010 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 C06891065670; Mon, 18 Jan 2010 23:04:38 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B05BF8FC18; Mon, 18 Jan 2010 23:04:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IN4cCI004537; Mon, 18 Jan 2010 23:04:38 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IN4cNV004535; Mon, 18 Jan 2010 23:04:38 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182304.o0IN4cNV004535@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 23:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202601 - head/share/examples/kld/syscall/test 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, 18 Jan 2010 23:04:38 -0000 Author: wkoszek Date: Mon Jan 18 23:04:38 2010 New Revision: 202601 URL: http://svn.freebsd.org/changeset/base/202601 Log: Include stdlib.h for exit(3) and unistd.h for syscall(2). This makes this program to compile cleanly. Modified: head/share/examples/kld/syscall/test/call.c Modified: head/share/examples/kld/syscall/test/call.c ============================================================================== --- head/share/examples/kld/syscall/test/call.c Mon Jan 18 22:59:53 2010 (r202600) +++ head/share/examples/kld/syscall/test/call.c Mon Jan 18 23:04:38 2010 (r202601) @@ -27,6 +27,8 @@ */ #include +#include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 23:09:08 2010 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 16DF41065670; Mon, 18 Jan 2010 23:09:08 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 068208FC14; Mon, 18 Jan 2010 23:09:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IN976Y005599; Mon, 18 Jan 2010 23:09:07 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IN97c9005596; Mon, 18 Jan 2010 23:09:07 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182309.o0IN97c9005596@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 23:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202602 - head/share/examples/kld/syscall/test 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, 18 Jan 2010 23:09:08 -0000 Author: wkoszek Date: Mon Jan 18 23:09:07 2010 New Revision: 202602 URL: http://svn.freebsd.org/changeset/base/202602 Log: Small cleanup while being here: - sort includes - remove usage(), since it seems to come from older version of the KLD - remove unnecessary variable - mark argc/argv as unused Bring WARNS = 5 to the Makefile. Modified: head/share/examples/kld/syscall/test/Makefile head/share/examples/kld/syscall/test/call.c Modified: head/share/examples/kld/syscall/test/Makefile ============================================================================== --- head/share/examples/kld/syscall/test/Makefile Mon Jan 18 23:04:38 2010 (r202601) +++ head/share/examples/kld/syscall/test/Makefile Mon Jan 18 23:09:07 2010 (r202602) @@ -3,5 +3,6 @@ PROG= call NO_MAN= +WARNS+= 5 .include Modified: head/share/examples/kld/syscall/test/call.c ============================================================================== --- head/share/examples/kld/syscall/test/call.c Mon Jan 18 23:04:38 2010 (r202601) +++ head/share/examples/kld/syscall/test/call.c Mon Jan 18 23:09:07 2010 (r202602) @@ -26,26 +26,17 @@ * $FreeBSD$ */ -#include -#include -#include -#include #include #include +#include -static void usage (void); - -static void -usage (void) -{ - fprintf (stderr, "call syscall-number\n"); - exit (1); -} +#include +#include +#include int -main(int argc, char **argv) +main(int argc __unused, char **argv __unused) { - char *endptr; int syscall_num; struct module_stat stat; From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 23:13:23 2010 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 21FB11065676; Mon, 18 Jan 2010 23:13:23 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 117EC8FC14; Mon, 18 Jan 2010 23:13:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0INDMlx006578; Mon, 18 Jan 2010 23:13:22 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0INDMNE006575; Mon, 18 Jan 2010 23:13:22 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182313.o0INDMNE006575@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 23:13: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: r202603 - head/share/examples/kld/cdev/test 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, 18 Jan 2010 23:13:23 -0000 Author: wkoszek Date: Mon Jan 18 23:13:22 2010 New Revision: 202603 URL: http://svn.freebsd.org/changeset/base/202603 Log: Include unistd.h for read(), write() and stdlib.h for exit(). Bump WARNS to 5 while being here. Modified: head/share/examples/kld/cdev/test/Makefile head/share/examples/kld/cdev/test/testcdev.c Modified: head/share/examples/kld/cdev/test/Makefile ============================================================================== --- head/share/examples/kld/cdev/test/Makefile Mon Jan 18 23:09:07 2010 (r202602) +++ head/share/examples/kld/cdev/test/Makefile Mon Jan 18 23:13:22 2010 (r202603) @@ -68,6 +68,7 @@ # PROG= testcdev NO_MAN= +WARNS= 5 MODSTAT= /sbin/kldstat Modified: head/share/examples/kld/cdev/test/testcdev.c ============================================================================== --- head/share/examples/kld/cdev/test/testcdev.c Mon Jan 18 23:09:07 2010 (r202602) +++ head/share/examples/kld/cdev/test/testcdev.c Mon Jan 18 23:13:22 2010 (r202603) @@ -70,13 +70,15 @@ * * $FreeBSD$ */ +#include +#include #include +#include #include #include #include -#include -#include +#include #define CDEV_IOCTL1 _IOR('C', 1, u_int) #define CDEV_DEVICE "cdev" @@ -85,7 +87,7 @@ static char writestr[] = "Hello kernel!" static char buf[512+1]; int -main(int argc, char *argv[]) +main(int argc __unused, char *argv[] __unused) { int kernel_fd; int one; From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 23:28:25 2010 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 D43DC1065672; Mon, 18 Jan 2010 23:28:25 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C44828FC18; Mon, 18 Jan 2010 23:28:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0INSPp1009925; Mon, 18 Jan 2010 23:28:25 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0INSPQs009922; Mon, 18 Jan 2010 23:28:25 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001182328.o0INSPQs009922@svn.freebsd.org> From: Ed Schouten Date: Mon, 18 Jan 2010 23:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202604 - head/libexec/ftpd 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, 18 Jan 2010 23:28:25 -0000 Author: ed Date: Mon Jan 18 23:28:25 2010 New Revision: 202604 URL: http://svn.freebsd.org/changeset/base/202604 Log: Really disable wtmp logging when chrooting. Also perform a small cleanup to ftpd_logwtmp(). Just use a NULL parameter for the username to indicate a logout, instead of an empty string. Reported by: Alexey Shuvaev Modified: head/libexec/ftpd/ftpd.c head/libexec/ftpd/logwtmp.c Modified: head/libexec/ftpd/ftpd.c ============================================================================== --- head/libexec/ftpd/ftpd.c Mon Jan 18 23:13:22 2010 (r202603) +++ head/libexec/ftpd/ftpd.c Mon Jan 18 23:28:25 2010 (r202604) @@ -1178,8 +1178,8 @@ end_login(void) #endif (void) seteuid(0); - if (logged_in && dowtmp && !dochroot) - ftpd_logwtmp(wtmpid, "", NULL); + if (logged_in && dowtmp) + ftpd_logwtmp(wtmpid, NULL, NULL); pw = NULL; #ifdef LOGIN_CAP setusercontext(NULL, getpwuid(0), 0, @@ -1482,7 +1482,10 @@ skip: ; chrootdir = NULL; - if (dowtmp && !dochroot) + /* Disable wtmp logging when chrooting. */ + if (dochroot || guest) + dowtmp = 0; + if (dowtmp) ftpd_logwtmp(wtmpid, pw->pw_name, (struct sockaddr *)&his_addr); logged_in = 1; @@ -2730,9 +2733,9 @@ void dologout(int status) { - if (logged_in && dowtmp && !dochroot) { + if (logged_in && dowtmp) { (void) seteuid(0); - ftpd_logwtmp(wtmpid, "", NULL); + ftpd_logwtmp(wtmpid, NULL, NULL); } /* beware of flushing buffers after a SIGPIPE */ _exit(status); Modified: head/libexec/ftpd/logwtmp.c ============================================================================== --- head/libexec/ftpd/logwtmp.c Mon Jan 18 23:13:22 2010 (r202603) +++ head/libexec/ftpd/logwtmp.c Mon Jan 18 23:28:25 2010 (r202604) @@ -60,7 +60,7 @@ ftpd_logwtmp(char *id, char *user, struc memset(&ut, 0, sizeof(ut)); - if (*user != '\0') { + if (user != NULL) { /* Log in. */ ut.ut_type = USER_PROCESS; (void)strncpy(ut.ut_user, user, sizeof(ut.ut_user)); From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 23:32:54 2010 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 64CBD106566C; Mon, 18 Jan 2010 23:32:54 +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 3B6408FC08; Mon, 18 Jan 2010 23:32:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0INWsKS010951; Mon, 18 Jan 2010 23:32:54 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0INWsbo010950; Mon, 18 Jan 2010 23:32:54 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001182332.o0INWsbo010950@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 18 Jan 2010 23:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202605 - vendor/tzdata/tzdata2010a 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, 18 Jan 2010 23:32:54 -0000 Author: edwin Date: Mon Jan 18 23:32:53 2010 New Revision: 202605 URL: http://svn.freebsd.org/changeset/base/202605 Log: Tag tzdata2010a Added: vendor/tzdata/tzdata2010a/ - copied from r202604, vendor/tzdata/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 23:34:24 2010 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 2E1781065672; Mon, 18 Jan 2010 23:34: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 1E34E8FC08; Mon, 18 Jan 2010 23:34:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0INYORP011345; Mon, 18 Jan 2010 23:34:24 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0INYNSb011343; Mon, 18 Jan 2010 23:34:23 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001182334.o0INYNSb011343@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 18 Jan 2010 23:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202606 - head/share/zoneinfo 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, 18 Jan 2010 23:34:24 -0000 Author: edwin Date: Mon Jan 18 23:34:23 2010 New Revision: 202606 URL: http://svn.freebsd.org/changeset/base/202606 Log: MFV of tzdata2010a: Administrative only: Fix AT fields for Asia/Dhaka Modified: head/share/zoneinfo/asia Directory Properties: head/share/zoneinfo/ (props changed) Modified: head/share/zoneinfo/asia ============================================================================== --- head/share/zoneinfo/asia Mon Jan 18 23:32:53 2010 (r202605) +++ head/share/zoneinfo/asia Mon Jan 18 23:34:23 2010 (r202606) @@ -1,4 +1,4 @@ -# @(#)asia 8.50 +# @(#)asia 8.51 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -226,10 +226,10 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # # establishment of a rule. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Dhaka 2009 only - Jun 29 23:00 1 S -Rule Dhaka 2010 only - Jan 1 0:00 - - -Rule Dhaka 2010 max - Mar 31 23:00 1 S -Rule Dhaka 2010 max - Nov 1 0:00 - - +Rule Dhaka 2009 only - Jun 19 23:00 1:00 S +Rule Dhaka 2010 only - Jan 1 0:00 0 - +Rule Dhaka 2010 max - Mar 31 23:00 1:00 S +Rule Dhaka 2010 max - Nov 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 01:04:45 2010 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 271761065676; Tue, 19 Jan 2010 01:04:45 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 151758FC0C; Tue, 19 Jan 2010 01:04:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J14j2u031211; Tue, 19 Jan 2010 01:04:45 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J14jf2031209; Tue, 19 Jan 2010 01:04:45 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001190104.o0J14jf2031209@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 19 Jan 2010 01:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202607 - head/sys/contrib/dev/uath 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: Tue, 19 Jan 2010 01:04:45 -0000 Author: weongyo Date: Tue Jan 19 01:04:44 2010 New Revision: 202607 URL: http://svn.freebsd.org/changeset/base/202607 Log: Fixes a firmware bug that in some devices (e.g. Netgear WG111T or TRENDnet TEW-504UB/EU) idProduct didn't be decreased after loading the firmware. Pointed by: Steven Friedrich Reviewed by: sam Modified: head/sys/contrib/dev/uath/ar5523.bin.uu Modified: head/sys/contrib/dev/uath/ar5523.bin.uu ============================================================================== --- head/sys/contrib/dev/uath/ar5523.bin.uu Mon Jan 18 23:34:23 2010 (r202606) +++ head/sys/contrib/dev/uath/ar5523.bin.uu Tue Jan 19 01:04:44 2010 (r202607) @@ -59,34 +59,34 @@ M``````````````````````````````````````` M```````````````````````````````````````````````````````````` M``````!`@&@``````#P"$``T0O\`0()@`````````````````"0"``)`@H`` M`````````````````^`((3P:@``G6@MT/!^``"?_!&0#7]`B!!$``0`````# -M7]`@`"#X(0-`^`D``````^`((3P:@`(G6D:X/!^``"?_!)0#7]`B!!$``0`` +M7]`@`"#X(0-`^`D``````^`((3P:@`(G6E98/!^``"?_!)0#7]`B!!$``0`` M```#7]`@`"#X(0-`^`D`````0`)@```````\`___-&,`_P!#$"1`@F`````` -M````````````/`2``B2$5_``@.@A/`$?_S0A__\#H>@D/`&@``.AZ"5`!(`` -M`````````````````^`((3P:@`(G6J6$/!^``"?_!1@#7]`B!!$``0`````# -M7]`@`"#X(3P!'_\T(?__`T'0)#P!H``#0=`E`T#X"0`````\'(`#)YS&L#P$ -M@`(DA%?P`(#H(3P(@``\"8``)2D!P#P+@``E:P'DC2(``"$I``2M`@``(0@` +M````````````/`2``B2$9Y``@.@A/`$?_S0A__\#H>@D/`&@``.AZ"5`!(`` +M`````````````````^`((3P:@`(G6JL0/!^``"?_!1@#7]`B!!$``0`````# +M7]`@`"#X(3P!'_\T(?__`T'0)#P!H``#0=`E`T#X"0`````\'(`#)YS64#P$ +M@`(DA&>0`(#H(3P(@``\"8``)2D!P#P+@``E:P'DC2(``"$I``2M`@``(0@` M!!4K__L`````-`0`$#P%@``DI09T/`:``"3&`@"LQ0``(,8`!""$__\4@/_\ M`````#P$@``DA`(`/`6``"2E!X"LA0``/`6``"2E"RBLA0`D/`6``"2E!G2L -MA0"`K(4`A*R%`(@,``*L``````P`:5H`````#`!J>P`````,`&D:``````@` -M;<\\'P``$````0````!`&F``/!O__S=[__`#6]`D0)I@```````````````` +MA0"`K(4`A*R%`(@,``*L``````P`:KT`````#`!KW@`````,`&I]``````@` +M;S(\'P``$````0````!`&F``/!O__S=[__`#6]`D0)I@```````````````` M`$`:\`````````````````!`FG``````````````````0!I@`#P;_[\W>___ M`UO0)$":8``D&@"(/!N``"=[`@"/>P"(`V``"``````#H-@A([W^L*^Z`(BO MH```KZ$`!*^B``BOHP`,KZ0`$*^E`!2OI@`8KZ<`'*^H`""OJ0`DKZH`**^K M`"ROK``PKZT`-*^N`#BOKP`\K[``0*^Q`$2OL@!(K[,`3*^T`%"OM0!4K[8` M6*^W`%RON`!@K[D`9*^\`'"OO@!XK[\`?```(!```"@2KZ0`@*^E`(2ONP!T M0`AH`$`)8`!`"C@`0`M``$`,&`!`#7@`0`YP`*^H`)BOJ0",KZH`E*^K`)RO -MK`"DKZT`H*^N`)`\'(`#)YS&L`.@@"$CO?_@0!I@`#P;__\W>__P`UO0)$": -M8``````````````````,`&D.`@`@(0@``DT``````Z#8(2.]_K"ON@"(KZ`` +MK`"DKZT`H*^N`)`\'(`#)YS64`.@@"$CO?_@0!I@`#P;__\W>__P`UO0)$": +M8``````````````````,`&IQ`@`@(0@``DT``````Z#8(2.]_K"ON@"(KZ`` M`*^A``2OH@`(KZ,`#*^D`!"OI0`4KZ8`&*^G`!ROJ``@KZD`)*^J`"BOJP`L MKZP`,*^M`#2OK@`XKZ\`/*^P`$"OL0!$K[(`2*^S`$ROM`!0K[4`5*^V`%BO MMP!*^_`'P``"`0```H$J^D`("OI0"$K[L`=$`) -M8`!`"C@`0`MP`*^I`(ROJ@"4KZL`D#P<@`,GG,:P/`*``B1"1E2,1```((0` +M8`!`"C@`0`MP`*^I`(ROJ@"4KZL`D#P<@`,GG-90/`*``B1"5?2,1```((0` M`:Q$```#H(`A)[W_X$`#8```````0`)H````````0Q`D``(2@C!"`'\\`X`` M)&,*/`!#$""`4@```D"((20!``02(0`#`````!````P`````/!&@P#8Q`!". M,0``,C$`?SP#@``D8PH\`'$8((!Q```F,0`&`B"0(0``````$8B`0!I@`#P; -M__\W>__P`UO0)$":8``````````````````\"H`")4HQ>`%14""-2@``/`6` -M`B2E,?``L2@@C*4```)`("$!0/@)``````!`D"$\!8`")*4R:`"Q*"",I0`` -M`@`P(0P`=7,`0"`A`D`0(2.]`"!``F``/`/__S1C__X`0Q`D0()@```````` +M__\W>__P`UO0)$":8``````````````````\"H`")4HW(`%14""-2@``/`6` +M`B2E-Y@`L2@@C*4```)`("$!0/@)``````!`D"$\!8`")*4X$`"Q*"",I0`` +M`@`P(0P`=M8`0"`A`D`0(2.]`"!``F``/`/__S1C__X`0Q`D0()@```````` M`````````(^H`)2/J0"`CZH`A$"(.``!(``1`4``$X^A``2/H@`(CZ,`#(^D M`!"/I0`4CZ8`&(^G`!R/J``@CZD`)(^J`"B/JP`LCZP`,(^M`#2/K@`XCZ\` M/(^P`$"/L0!$C[(`2(^S`$R/M`!0C[4`5(^V`%B/MP!(^_`'R/NP",-!K_``-:T"<#>M@D0!I@``` MN@"0C[T`=#=[``)`FV``````````````````0)IP```````````````````` M``]"```8`````````0`"``$``P`!``(``0`$``$``@`!``,``0`"``$`!0`! M``(``0`#``$``@`!``0``0`"``$``P`!``(``0`#X``(``````.@&"$`H.@A -M([W_X*^C``BOOP`0`(#X"0````"/OP`0C[T`"`/@``@`````/`2``B2$1Z@\ -M!8`#)*6B'#"&``,4P``2``````"D.",`!SE"``P(``WK8((][```#8``(`````#0:`"0( @@ -111,7 +111,7 @@ MGP`LC)X`*(R<`"2,EP`@C)8`'(R5`!B,E``4C), M```#X``(`*`0(0`````GO?_PK[\```P``TL``$`AC[\```/@``@GO0`0)[W_ M\*^R``BOLP`,K[$`!*^P````P$@A`0"0(0#@6"$`H'`A%,`!``"`4"$`AQ`K M$$``9#0"__\`1Q`K%$``60#@*"$D`@`(+.,!``!`,"$``S`+/`.``@#%$`8D -M8Q9\`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8!`!B +M8QP<`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8!`!B M4"4`ZU@$`.YP!``+-`(!1@`;,6K__P`.)`)0P``!```!S0``$!(``!@0``,< M``!D&"4``"@2``````````!P2D@"`&D0*U!```L`:1@C`&L8(0!K$"L40``& M)*7__P!I$"M00``$`&D8(R2E__\`:Q@A`&D8(P!F`!M0P``!```!S3'$__\` @@ -120,7 +120,7 @@ M&"$`:Q`K%$``!B3&__\`:1`K$$``!``%%```:Q@ M(P``F"$20``$`.[(!@``P"&N6```KED`!`)@$"&/L@`(C[,`#(^Q``2/L``` M`,`8(0/@``@GO0`0/`(`_S1"__\D`P`0`$<0*R0$`!@`8#`A$`#_I0"",`L4 MX``*`$L0*R0"``$`1@`;4.```0```",!2U`C)!,``0`+9`(Q:/__`4P`&P`.+`)1@``! M```!S0``(!(``!@0``,<``!E&"4``&@2``````````!PB$@"`&D0*U!```L` M:1@C`&L8(0!K$"L40``&)(W__P!I$"M00``$`&D8(R6M__\`:Q@A`&D8(P!L @@ -134,7 +134,7 @@ M``,<``!D&"4``#`2``````````!P4T@"`&D0*Q! M0``&),;__P!I$"L00``$``\4`"3&__\`:Q@A``\4``!&F"40`/^.`&E0(S1" M__\D`P`0`$L0*R0$`!@`8"@A$`#_>0""*`L`AA`K$$``!S0"__\``#`A``"8 M(1$`_U$`H,@A$`#_30%`P"$`1A`K%$``?#P"`/\D`@`(+,,!``!`*"$``R@+ -M/`.``@"I$`8D8Q9\`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J$"L4 +M/`.``@"I$`8D8QP<`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J$"L4 M0``%`H@!@",`!LQ,___`>X0 M!@#J&`0`8E`E``HL`E&```$```'-`.M8!```,!(``"`0``0D``"%&"4``$`2 @@ -148,7 +148,7 @@ M(",!I!`K`8D8(P!B8",`@&@A$`#_[B3&__\T0O_ M(1``_X,`@B@+)[W_X*^_`!`,``3L`Z!`(8^B``"/HP`$C[\`$`/@``@GO0`@ M)[W_\*^R``BOLP`,K[$`!*^P````P$@A`0"0(0#@6"$`H'`A%,`!``"`4"$` MAQ`K$$``9#0"__\`1Q`K%$``60#@*"$D`@`(+.,!``!`,"$``S`+/`.``@#% -M$`8D8Q9\`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8 +M$`8D8QP<`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8 M!`!B4"4`ZU@$`.YP!``+-`(!1@`;,6K__P`.)`)0P``!```!S0``$!(``!@0 M``,<``!D&"4``"@2``````````!P2D@"`&D0*U!```L`:1@C`&L8(0!K$"L4 M0``&)*7__P!I$"M00``$`&D8(R2E__\`:Q@A`&D8(P!F`!M0P``!```!S3'$ @@ -157,7 +157,7 @@ M``!K&"$`:Q`K%$``!B3&__\`:1`K$$``!``%%`` M`&EP(P``F"$20``$`.[(!@``P"&N6```KED`!`)@$"&/L@`(C[,`#(^Q``2/ ML````,`8(0/@``@GO0`0/`(`_S1"__\D`P`0`$<0*R0$`!@`8#`A$`#_I0"" M,`L4X``*`$L0*R0"``$`1@`;4.```0```",!2U`C)!,``0`+9`(Q:/__`4P`&P`.+`)1 M@``!```!S0``(!(``!@0``,<``!E&"4``&@2``````````!PB$@"`&D0*U!` M``L`:1@C`&L8(0!K$"L40``&)(W__P!I$"M00``$`&D8(R6M__\`:Q@A`&D8 @@ -171,7 +171,7 @@ M`!@0``,<``!D&"4``#`2``````````!P4T@"`&D M$"L40``&),;__P!I$"L00``$``\4`"3&__\`:Q@A``\4``!&F"40`/^.`&E0 M(S1"__\D`P`0`$L0*R0$`!@`8"@A$`#_>0""*`L`AA`K$$``!S0"__\``#`A M``"8(1$`_U$`H,@A$`#_30%`P"$`1A`K%$``?#P"`/\D`@`(+,,!``!`*"$` -M`R@+/`.``@"I$`8D8Q9\`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J +M`R@+/`.``@"I$`8D8QP<`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J M$"L40``%`H@!@",`!LQ,___ M`>X0!@#J&`0`8E`E``HL`E&```$```'-`.M8!```,!(``"`0``0D``"%&"4` @@ -183,173 +183,173 @@ M`&`0````````````K!`K``!H$@``````````%$` M_N(``)@A`]`"`G -MO?_0K[``$`"`@"$D!`!`.@*"$00``+`$"( M(5:```&ND0``C[\`)(^T`""/LP`]`#"/H@`` -M`$`@(0P`!L^N8@`$%$#_\0!`B"$,`!FN`F`@(11`_^T`0(@A#``2D`)@("$4 -M0/_I`$"((0P`&=D"8"`A`$"0(1!`_^0D$0`"C[````!`("$,`!G1)`4'(`!` -MB"$D`@<@K@(;[`)`*"$"8"`A#``<@JYR```\`X`"K'-'J!``_]6N8@`()[W_ -M\*^P``"OOP`$#``4GP"`@"$"`"`A#``4K```*"$00``&)`,`%H^_``2/L``` -M`&`0(0/@``@GO0`0#``?*P(`("$`0!@A)@4;<`(`("$40/_U)`8``0P`-X4` -M`````$`8(20%``$40/_O`@`@(0P`%*P`````)`,`%A``_^H``A@*K*0`!`/@ -M``BLX```)[W_H*^S`$P`H)@A```H(:^Q`$2OOP!0K[(`2*^P`$`,`!2L`("( -M(11``!6OH@`PCB(7W!1``"T#H"`A#`!Z=0````"/I@`@CZ4`'#P$@`(DT,0` -M`!`7P@("$"$``I!##`!P="2$"(@"("`A#``)M@)`*"&OH@`P$$``"P.@("$2 -M8``"CZ(`,*YB``"/OP!0C[,`3(^R`$B/L0!$C[``0`/@``@GO0!@#`!Z=0`` -M``"/H@`@`B`@(210Q``,``RQ`@`H(3P$@`(DA`BD`@`H(0)`,"$40/_JKZ(` -M,`P`<'0`````)`(``:XB%]P"("`A#``'5R>E`#"/H@`P4$#_X*X@%^@0`/_> +M`$`@(0P`!L^N8@`$%$#_\0!`B"$,`!G!`F`@(11`_^T`0(@A#``2E`)@("$4 +M0/_I`$"((0P`&>P"8"`A`$"0(1!`_^0D$0`"C[````!`("$,`!GD)`4'(`!` +MB"$D`@<@K@(;\`)`*"$"8"`A#``E`#"/H@`P4$#_X*X@%^@0`/_> M`````">]_^"OL0`4K[``$*^_`!B,@Q?@)`(``0"@B"$`@(`A`Z`H(1!B``NO MH```$B``!JX`%^B/OP`8C[$`%(^P`!`#X``()[T`((^B```0`/_YKB(```P` -M!Y4`````CZ(``!1`__("`"`A#`!1E``````"`"`A#``4K"0%``$0`/_K```` -M`">]_^"OL@`(`*"0(0``*"&OLP`,K[$`!*^P``"OOP`0#``4K`"`@"$D$P`! +M!Y4`````CZ(``!1`__("`"`A#`!2K``````"`"`A#``4L"0%``$0`/_K```` +M`">]_^"OL@`(`*"0(0``*"&OLP`,K[$`!*^P``"OOP`0#``4L`"`@"$D$P`! M`$"((1!```L"`"`A$D```JX`%^BN40``C[\`$(^S``R/L@`(C[$`!(^P```# -MX``()[T`(*X`&QP,``A^KA,;)`P`"A@"`"`A#`!Q7``````D8P#(+&4`R(X$ -M&`@`11`A`$`P(20(```D"0#(#`!Q=`!@."$,`'%<`````"1C`,@L90#(C@08 -M0`!%$"$`0#`A)`@``"0)`,@,`'%T`&`X(8X"``0,`!T8C$0```(`("$,`"D\ +MX``()[T`(*X`&QP,``A^KA,;)`P`"A@"`"`A#`!ROP`````D8P#(+&4`R(X$ +M&`@`11`A`$`P(20(```D"0#(#`!RUP!@."$,`'*_`````"1C`,@L90#(C@08 +M0`!%$"$`0#`A)`@``"0)`,@,`'+7`&`X(8X"``0,`!TKC$0```(`("$,`"E6 M/`6```P`!_8"`"`AKA,7X!``_]$`````)[W_\*^R``BOL0`$K[```*^_``R, M@A?@)!(``0"@B"$`@(`A$%(`"@``*"$2(``"KA(7Z*X@``"/OP`,C[(`"(^Q -M``2/L````^``"">]`!`,`!2L`````#P%@``,`"EL`@`@(0P`<7N.!!@(#`!Q -M>XX$&$`,``LT`@`@(0P`$7<"`"`A#``(E0(`("$D!0`!#``*2`(`("$,``@' -M`@`@(8X"``0,`!T*C$0``*X`%^`0`/_>`````">]__"OL````*"`(:^Q``0` -MP"@A`("((0(`("&OOP`,K[(`"`P`!S8`P)`A#`!1E`(`("$"("`A)`4`"``` -M,"$,`!$9)`<``59```&N0```C[\`#(^R``B/L0`$C[````/@``@GO0`0)[W_ -M\*^Q``2OL````("((0"@@"&OOP`(#``4;20%``$"("`A$@``"SP%``0,`"D\ -M``````(@("$,`!1M```H(8^_``B/L0`$C[````/@``@GO0`0#``I;#P%``00 -M`/_V`B`@(2>]__`D`@`!K((]`!`,`!2P`````#P%@``,`"F&`@`@(0P``````">]__"OL````*"`(:^Q``0` +MP"@A`("((0(`("&OOP`,K[(`"`P`!S8`P)`A#`!2K`(`("$"("`A)`4`"``` +M,"$,`!$=)`<``59```&N0```C[\`#(^R``B/L0`$C[````/@``@GO0`0)[W_ +M\*^Q``2OL````("((0"@@"&OOP`(#``4<20%``$"("`A$@``"SP%``0,`"E6 +M``````(@("$,`!1Q```H(8^_``B/L0`$C[````/@``@GO0`0#``IACP%``00 +M`/_V`B`@(2>]__`D`@`!K((]_]"OM0`4`*"H(20%``&OOP`@K[<` -M'*^V`!BOM``0K[,`#`$`H"$`X)@AK[(`"*^Q``0`P)`A`("((:^P```,`!1M -M/!:``CP0@`(FI``0/!>``@``*"&N$C.`KM,SA`P`:S2N]#.(`J`@(0P`:S0D -M!0`!CB4``(X$,X`\`O_QC*-`$#1"__\`!"1``&(8)#P"``X`@B`D`&08):RC -M0!".)0``CL0SA#P"_X^,HT`0-$+__P`$)0``8A@D/`(`<`""("0`9!@EK*-` -M$(XE``".Y#.(/`+_?XRC0!`T0O__``0EP`!B&"0\`@"``((@)`!D&"6LHT`0 -M`B`@(0P`%&T``"@AC[\`((^W`!R/M@`8C[4`%(^T`!"/LP`,C[(`"(^Q``2/ -ML````^``"">]`#`GO?_PK[```"0&``0`@(`AK[\`!`P`-@X``"@A#`!1O28$ -M'8P00``'`@`@(0P`-;2,10`D#``UN`(`("$,`#7H`@`@(0P`<=`F!!K(C[\` -M!(^P```#X``()[T`$">]__```"@A)`8``Z^P``"OOP`$#``V#@"`@"$,`''" -M)@0:R`P`<+4`````#``U_0(`("$,`#6_`@`@(0P`<+H`````#``(VP(`("$D +M'*^V`!BOM``0K[,`#`$`H"$`X)@AK[(`"*^Q``0`P)`A`("((:^P```,`!1Q +M/!:``CP0@`(FI``0/!>``@``*"&N$CDHKM,Y+`P`;)>N]#DP`J`@(0P`;)]`#`GO?_PK[```"0&``0`@(`AK[\`!`P`-F$``"@A#`!2U28$ +M'9`00``'`@`@(0P`-@>,10`D#``V"P(`("$,`#8[`@`@(0P`]__```"@A)`8``Z^P``"OOP`$#``V80"`@"$,`',E +M)@0:R`P`]`!",I0`H)`/_\#"B``\D0@`G`$,X)`"C M&"0`9Q`A`$,0*Q1```<`8#`AO'$``"1C`!``QQ`A`$,0*Q!`__L`````D*(` -M`"0#`(`P0@#\4$,`!)2C`!0``"`A`^``"`"`$"&4@AQ>5&+__```("&4HP`2 -ME((<7%1B__@``"`AE((<6I2C`!`48O_S)`0``1``__(`````C((:_(Q#```# +M`"0#`(`P0@#\4$,`!)2C`!0``"`A`^``"`"`$"&4@AQB5&+__```("&4HP`2 +ME((<8%1B__@``"`AE((<7I2C`!`48O_S)`0``1``__(`````C((:_(Q#```# MX``(K(,:_(R"&ORLH@```^``"*R%&OPGO?_@)`(``:^P``"OOP`, +MK((`)%*@``&N!Q?`C@(`!`)`*"$,`!K:C$0``!(@``0"("@AC@(`!`P`&MJ, M1```H@`:^!``_XBN`!KT#``(TP(`("$`0(@AD@(:^"8E``0D0@`!HB(``"0" M``.B(@`!)`(`0!``_\2F(@`"D@,:^`)`*"$D8@`!H@(:^))"``&B0P``,$(` -M_J)"``&.`@`$#``:QXQ$```0`/]P)A8=C`P`"*X"`"`A$`#_F*X"&MR/OP`< +M_J)"``&.`@`$#``:VHQ$```0`/]P)A8=D`P`"*X"`"`A$`#_F*X"&MR/OP`< MC[8`&(^U`!2/M``0C[,`#(^R``B/L0`$C[````"`$"$#X``()[T`(">]__"O -ML0`$K[````#`B"$`H(`A)`4``:^_``ROL@`(#``4;0"`D"$"`"`A#``W=`(@ -M*"$"`#`A`@`H(0P`4=@F1!V,`D`@(0P`%&T``"@AC[\`#(^R``B/L0`$C[`` +ML0`$K[````#`B"$`H(`A)`4``:^_``ROL@`(#``4<0"`D"$"`"`A#``WQP(@ +M*"$"`#`A`@`H(0P`4O`F1!V0`D`@(0P`%'$``"@AC[\`#(^R``B/L0`$C[`` M``/@``@GO0`0)[W_\*^_``"0H@`!,$(``A!```8DI_^D#``(UP````"/OP`` -M`^``"">]`!"@H```H*```8R&&^RDH``"`.`H(0P`"8@DQO_\$`#_]H^_```G -MO?_0K[\`(*^W`!ROM@`8K[,`#*^Q``2OL```K[4`%*^T`!"OL@`(C((;[`"` -MF"$DA!V,)%``H`"P`!JN8!M44@```0```]`#!RT!@")`(``:YB';0D<``0#`!Z5P(`("$0 -M0``R`$"((0!`("$``"@A`@`P(0!`D"$,`'"J)C4`8`+V$"JN<1JX`B"@(:YP -M&KP00``5`J"((0+`@"&.9AOLKE0`)*Y5`"BN40`$`D`H(0)@("$,``F(),;_ -M_(YB&^PF$/__`B(H(0)"&"$"HB`A`H(0(21R`%PDE0!<)%0`7!8`_^XDL0!< +M`^``"">]`!"@H```H*```8R&&_"DH``"`.`H(0P`"8@DQO_\$`#_]H^_```G +MO?_0K[\`(*^W`!ROM@`8K[,`#*^Q``2OL```K[4`%*^T`!"OL@`(C((;\`"` +MF"$DA!V0)%``H`"P`!JN8!M44@```0```]`#!RT!@")`(``:YB';@D<``0#`![N@(`("$0 +M0``R`$"((0!`("$``"@A`@`P(0!`D"$,`'(-)C4`8`+V$"JN<1JX`B"@(:YP +M&KP00``5`J"((0+`@"&.9AOPKE0`)*Y5`"BN40`$`D`H(0)@("$,``F(),;_ +M_(YB&_`F$/__`B(H(0)"&"$"HB`A`H(0(21R`%PDE0!<)%0`7!8`_^XDL0!< M)I$`$!K```BN8!K\`L"`(0(@*"$"8"`A#``(UR80__\6`/_[)C$`1"9P&L@, -M`'&T`@`@(0P`<]__"OL````("`(:^_ -M``0,`''0)(0:F`P`<=`F!!J$)`(``:X"&K2/OP`$C[````/@``@GO0`0)[W_ +M`',7`@`@(0P`]__"OL````("`(:^_ +M``0,`',S)(0:F`P`] -M__"OL0`$`("((:X@&K0DA!J$K[\`"*^P```,`''"`*"`(0P`<<(F)!J8$@`` +M`!#D`D`@(28Q__\&(?_M)A`!'(^_``R/L@`(C[$`!(^P```#X``()[T`$">] +M__"OL0`$`("((:X@&K0DA!J$K[\`"*^P```,`',E`*"`(0P`LC@,`.*X@```"0A`JKA$`.*QQ```40/_N -MKB,`!"8$`"0,`'&'```H(0)@$"&/OP`0C[,`#(^R``B/L0`$C[````/@``@G -MO0`@$`#_]R03``(GO?_PK[$`!*^_``BOL```C)``!`P`<+4`H(@AC@0`-(R% +ML@`(K[```#P"@`*OOP`0K[$`!(Q%5TPD@P`T)((`+`"`@"&L@@`PK(,`.*R` +M`"RL@``T``"0(1B@`!0``)@A#`![NB0$``PF4@`!`$"((0!`("$``"@A$$`` +M%R0&``P,`'(-`````#P"@`*,0E=,C@,`.*X@```"0A`JKA$`.*QQ```40/_N +MKB,`!"8$`"0,`'+J```H(0)@$"&/OP`0C[,`#(^R``B/L0`$C[````/@``@G +MO0`@$`#_]R03``(GO?_PK[$`!*^_``BOL```C)``!`P`]`"`,``L3`D`@(1!`__<` M0"@A,$(`#R1"`"LD`__P`$,P)`"C&"0`9A`A`$,0*Q1```<`8"`AO'$``"1C M`!``AA`A`$,0*Q!`__L`````C*,`""0"`!`08@`*``````P`"H,"`"`ACZ(` M`"8Q``$"(A`J%$#_XX^_`!P0`/_=C[(`&`P`"O0"`"`A$`#_]X^B```GO?_P MK[(`"*^P``"OOP`,K[$`!(R1``0D`@`!``"`(0(@("&N(A?8#``*@R8R&JP" -M0"`A#`!QAP``*"$,``ZZ`B`@(2H#``440``.)A```5!@``TF,!J8#`!Q7``` -M```D8P!D+&0`9`!$$"$`0#`A`&`X(0P`<94"0"`A$`#_[P`````F,!J8#`!Q -MT`(`("$,`'&C)B07T`P`<8XF)!?(`@`@(:X@%]@,`''"`````(^_``R/L@`( +M0"`A#`!RZ@``*"$,``Z^`B`@(2H#``440``.)A```5!@``TF,!J8#`!ROP`` +M```D8P!D+&0`9`!$$"$`0#`A`&`X(0P`]_]"OL0`DK[\`+*^R`"BOL``@`*"((8R2``0` M`%`A``!P(1"@`'X``'@AC*T`#(RD`!`QH@`/``(8P`!B&",``QC``D,8(20" M__\0@@`8)'D8>``$$,``1!`A``(0P`!$$",``A"``D(0(8Q$``@D`P`!KZ,` M!!2```X`6!'``&DD`@`& MC<,`!%!B`&<``'@A)BG__(XL`!@!((`A)CC_H!$@`#\D!@`<`29`(24J_Z0E M"``$K4@`!(TK``"10P`.)`7P```+$"L``A$`,&,`[P!B&"6A0P`.CB(``)5# -M``HE9_^D)$+_Y#!"#_\`91@D`&(8):5#``J.0AOLE40`#@`+.`H`1A`C)$+_ +M``HE9_^D)$+_Y#!"#_\`91@D`&(8):5#``J.0AOPE40`#@`+.`H`1A`C)$+_ M_`&"&"L!@Q`+`(4@)#!"#_\`@B`EI40`#I5&``ZM)_^DC4(`/"0#_?\`#2E` M`$,0)#"E`@``#1E"/`3^_S2$__\`11`E,&,``0!$$"0``QX``$,0):U"`#RM M2``HCB,`$##&#_\D`O__)&0`!*U'`""M6``PK4\`4*U.`$P08@`C`89@(ZU$ M`#@!8$@A%6#_PP``,"$"`$@A$2``#`%`@"$E*O^DC4,`/(TK```\`G__-$+_ -M_P!B&"0!8$@AK4,`/*U9`%@58/_VK5``+`)`("$#("@A`P`P(0P`#TL``#@A +M_P!B&"0!8$@AK4,`/*U9`%@58/_VK5``+`)`("$#("@A`P`P(0P`#T\``#@A MCB(`%%!```.N``!4CB(`!*X"`%2/OP`LC[(`*(^Q`"2/L``@`^``"">]`#`D M`G__$`#_W:U"`#@``'@A$`#_F0``<"$,``JD`Z`P(:X@``0"0"`A#``*@P(@ -M*"$0`/_NC[\`+">]_]"OL0`4K[\`(*^S`!ROL@`8K[``$`"`B"$,`'#^C)(` -M!`!`("$,`'$!```H(0(@("$,``L3)E,:F`)@("$,`''"`$"`(0)`("$,`!1M +M*"$0`/_NC[\`+">]_]"OL0`4K[\`(*^S`!ROL@`8K[``$`"`B"$,`')AC)(` +M!`!`("$,`')D```H(0(@("$,``L3)E,:F`)@("$,`',E`$"`(0)`("$,`!1Q M)`4``8X#``@D`@`0`@`H(1!B`!X"("`ACD(7X`(`*"$40``6`D`@(0P`"H,` -M````)B0`)`P`<:H#H"@ACZ(`````@"$00``$`B`@(0P`"Q,``````$"`(58` -M_^N.`P`(#`!QT`)@("$"0"`A#``4;0``*"$0`/_;`B`@(0P`"YX"("`A$`#_ +M````)B0`)`P`]`"`,`'&T)@0:F#P%@``\!X`"/`B``CP+@`(D!``!)FID$"2E -M,.@"(#`A).<(Q"4(6!`E:V08#`!PRR0)#``,`'#DCF1D$!``_^<"0!`A)[W_ -M\*^P``"OOP`$C((;]`"`@"&,0@!$%$``!20$.@"/OP`$C[````/@``@GO0`0 -M)`(`!PP`>E>N`AL`)$("`"0#_@``0Q`DK@(=Q!``__2N`AL$)[W_X*^_`!RO -MM@`8K[4`%*^T`!"OL@`(K[$`!*^P``"OLP`,C((;[`"`B"$DD!AX)%4`7`"U -M`!H\`H`"4J```0```]`"`,`',7)@0:F#P%@``\!X`"/`B``CP+@`(D!``!)FISL"2E +M,.@"(#`A).<.5"4(9[`E:W.X#`!R+B0)#``,`')'CF1SL!``_^<"0!`A)[W_ +M\*^P``"OOP`$C((;^`"`@"&,0@!$%$``!20$.@"/OP`$C[````/@``@GO0`0 +M)`(`!PP`>[JN`AL`)$("`"0#_@``0Q`DK@(=R!``__2N`AL$)[W_X*^_`!RO +MM@`8K[4`%*^T`!"OL@`(K[$`!*^P``"OLP`,C((;\`"`B"$DD!AX)%4`7`"U +M`!H\`H`"4J```0```L)E(``0)"$"H40/_X`A6`(1``_]P`````$`#_WB03``(GO?_`K[``,*^_ -M`#BOL0`TC((;](S+```D#``!C$,`"`%L$`0`@(`A`&(8)!1@`"D`H$@A+*(` +M)C`:A`P`]__"OL@`( +MH``D$0``!J^@`"@5(``6`````(X"'<@D0AP`KZ(`*`(`("$,`$MR`Z`H(0!` +M&"&.`AOXC$(`:`!B$"M40``&KB,`)(^_`#B/L0`TC[``,`/@``@GO0!`#`!S +M%P(@("$0`/_YC[\`.%$L_^R.`AW()`+_]P%"$"00`/_IKZ(`!">]__"OL@`( MK[$`!*^P``"OOP`,`("`(0``D"$DD1G(C@,:<"0"``$"0A`$`&(8)`)`*"$4 M8``+`@`@(292``$N0@`&%$#_]B8Q`!R/OP`,C[(`"(^Q``2/L````^``"">] -M`!`,`$J'``````(`("$"0"@A#``-%@(@,"$0`/_P)E(``2>]__"OL@`(K[$` +M`!`,`$N1``````(`("$"0"@A#``-%@(@,"$0`/_P)E(``2>]__"OL@`(K[$` M!*^P``"OOP`,`("`(0``D"$DD1AXC@(:<"0#``$"0Q@$`$,0)%!```DF4@`! -MC@(;]`)`*"$"`"`AC$(`"`!#$"040``+)`8`!"92``$N0@`&%$#_\"8Q`#B/ -MOP`,C[(`"(^Q``2/L````^``"">]`!`,`$JV)E(``0(`("$,`!#@`B`H(1`` -M__(N0@`&)[W_\*^_``2OL```C*8`.`P`2[4`H(`AC@(`+(^_``2/L```K$`` +MC@(;^`)`*"$"`"`AC$(`"`!#$"040``+)`8`!"92``$N0@`&%$#_\"8Q`#B/ +MOP`,C[(`"(^Q``2/L````^``"">]`!`,`$O`)E(``0(`("$,`!#D`B`H(1`` +M__(N0@`&)[W_\*^_``2OL```C*8`.`P`3,(`H(`AC@(`+(^_``2/L```K$`` M0`/@``@GO0`0)[W_L*^U`#2OM``PK[,`+*^_`$"OMP`\K[8`.*^R`"BOL0`D -MK[``((RR`!0`H*@A`("8(1)``&XDE`2`CD(`/`1!``0``+`ACD(`(!!``.8` +MK[``((RR`!0`H*@A`("8(1)``&XDE`2`CD(`/`1!``0``+`ACD(`(!!``.H` M0)`ACD(`4%!```6.40`LC$(``%!```&N0`!0CE$`+(XB`$`40``')C<`0`)@ -M("$,`$VK`B`H(20#``T00P!9C[\`0`)@("$,`!"&`B`H(11``,\D`@`!CB,` -M0*Y@&QP08@`&CE``4%(```6.H@`(ZB`#"50P`(EF(<7E!B``.50P`&$`#_VB5"`!"68AQ<%&+_UR5"`!"50P`$ -MEF(<6E1B_],E0@`0CH(!+"1"``$0`/_TKH(!+`*@*"$,`!`!`B`P(5!`_X6. -ML@`4$`#_/8ZB`!P0`/^#KB``0(YB%]A00/^!C[\`0`P`<:,F9!JL$`#_?8^_ -M`$",@P`4$&``""0$``&,8@`\!$,`!0``("&,8@`@$$```@```````"`A`^`` -M"`"`$"$GO?_PK[$`!*^_``@`@(@AK[```(XB&\P00``4)(08>`P`#JX````` -M)B08L`P`#JX``H`K)B08Z`P`#JX``H`*)B09(`P`#JX``H`*4$```0``@"$" -M`!`AC[\`"(^Q``2/L````^``"">]`!`,``ZN`````!``__<``H`K)[W_\*^P -M``"OOP`$#`!PM0"`@"&.`AO,)@48>!!```L"`"`A#``-K0`````F!1BP#``- -MK0(`("$F!1CH#``-K0(`("$F!1D@`@`@(0P`#:T`````#`!PN@````"/OP`$ -MC[````/@``@GO0`0C*<`*```2"&0X@`!,$(`!!1``!",J``LD.(`%C!#``]4 -M8``-C*(`/)4"`$8``"`A``(1`J#B`!>1`@!',$(`#P`"$0``8A`EH.(`%@/@ -M``@`@!`AC*(`/``"%H(P0@`!5$``#Y#B``&5"0!&D.,`%C$B``\``A$`,&,` -M#P!B&"4`"1$"H.,`%J#B`!>,H@`\/`,$``!#$"6LH@`\D.(``3!"``000/_I -M`2`@(8T&`"!0P/_F`2`@(8S(`"PD!/_PC,<`*"4#``@P8@`/)$(`)P!D&"0` -M1"@D`&40(0!#$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[`````(S" -M`#P``A:",$(``51```Z0X@`!D.,`%C$B``\``A$`,&,`#P!B&"4`"1$"H.,` -M%J#B`!>,P@`\/`,$``!#$"6LP@`\D.(``3!"``140/_8C08`(!``_[T!("`A -M)[W_X*^S``P`P)@AK[4`%*^T`!"OL0`$K[```*^_`!BOL@`(`("@(0"@B"$, -M`'"U``"H(1)@`$("8(`AC@(`/``"%D(P0@`!%$``58X2`%`20`!4`H`@(8Y" -M`%000`!1`````!*@`$R.`@`LC$,``(Q"`""NHP``KJ(`((X&`"PF1`!<`@`H -M(:S``""LP```#`!1V`````".0@!X)$(``:Y"`'@2H``"`F"`(8ZP`"!6`/_C -MC@(`/!)@`"$`````EB,`-%!@`!&.(@`8CF0`*)""`!8P10`/4*``"Z8@`#0` -M`Q$"H((`%Y(B`#60@P`!,$(`#P`"$0``HA`E-&,`"*"#``&@@@`6CB(`&%1` -M`!VL4P`@)`(``:XB`"RN,P`4KC4`&`````^.(@`L5$``$(YF`"2.)0`D#`!* -MG`*`("$,`'"Z`````(^_`!B/M0`4C[0`$(^S``R/L@`(C[$`!(^P`````!`A -M`^``"">]`"".)0`D#`!*E0*`("$0`/_MKB``+(XC`!B.8@`DK&(``!``_^2N -M-0`8$`#_N(Q3`"`"@"`A#``-H0(`*"&.@ALX4$``&(XB`!Q2```6CB(`'(X" -M`#P``A9",$(``11```D"@"`ACB8`&(XG`#".*``D#`!*_@(`*"%40``*CB(` -M'`*`("$,`"EL/`6``(X"`#`"@"`A/`6```P`*3RN(@`PCB(`'"1"``$20``* -MKB(`'(XB`"2.1`!0``(0P`!2$"&40P`P)(0``:Y$`%`D8P`!I$,`,!``_Y>. -M%0`L)[W_\*^R``BOOP`,K[$`!*^P``",H@!4%$``!P"`D"$DL0!]`!",P@`LC,4` -M6`)`("&,4``@K$```*Q``"`,``]+```X(8XB`!P"`#`A)$+__Q1`__2N(@`< -M$`#_ZZX@`!@GO?_@K[0`$*^S``ROL0`$K[\`%*^R``BOL```C-``,(RB`"2, -MPP!`CA(`4``"$,``H(@A`D(H(20"``(`@*`A$&(`.22S`#".(P`4C&(`/`1" -M`"V,8@`@C@(`/#P#`@".!P`L`$,0):X"`#R.(@`] -M`""L8````&`H(:XB`!0"@"`A#``*8ZQ@`"`0`/_.C@(`/)2C`#".0@!4)`8` -M`:YF``0`0Q`AKD(`5*9C``*.`P`\/`6'_S2E__\``Q;",$(`#R1"``$P0@`/ -M``(6P`!E&"0`8A@EK@,`/(R"&V@``Q[",&,`#P!#$"M40``%CD(`5(R"&K14 -M0``1C((%@(Y"`%268P`")`7__R1"__^N0@!4CH(%A"1C__^F8P`")$(``0P` -M5NZN@@6$`H`@(0P`#]X"0"@A$`#_QB0"__\D0@`!K((%@(X"`#P``A;",$(` -M#Q!&``8`````C@,`*)!B``$T0@`($`#_DJ!B``$,``[T`@`H(1``__BF(@`T -M)[W_\*^Q``2OL```K[\`"`"@@"&.`P!`C*4`,"0"``$`@(@A$&(`3HRD`%". -M(AMH$$``1@``$"%0@`!%C[\`"(RB`"B00@`!,$(`!!!``"6.`P`@$&``/0`` -M$"&,<``LC@(`,(Q"`"B00@`6,$(`#Q!``#LF!``(,((`#R0#__`D0@`G`(,@ -M)`!#*"0`A1`A`$00*Q1```<`@!@AO)$``"2$`!``91`A`$00*Q!`__L````` -M`B`@(0(`*"$,`$Z')`8``1!``"$D`O__C@(`,(Q"`"B00@`!,$(`!!1`_]V. -M`P`@$&``&0``$"&,<``L)`3_\"8#``@P8@`/)$(`)P!D&"0`1"@D`&40(0!# -M$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[``````(@("$"`"@A#`!. -MAR0&``$D`___``(8"P!@$"&/OP`(C[$`!(^P```#X``()[T`$!``__H``!`A -M)[W_T*^Q`"0`H(@AK[(`**^P`""OOP`L#`!PM0"`D"&.,``4$@``&0````". -M0@2PCD,$M(X$`%0D8P`!+&4``0!%$"&N0@2PKD,$M!2``!]`!`0`/_JK@(`4`P`<9P` -M````)`,``11#__,D!``"$`#_W``````GO?_PK[````"`@"$DA``\K[\`#*^Q -M``2OL@`(#`!QC@"@B"$,`'"U`````(X%`$2,HP``$&``'(RB``2L8@`$C*(` -M!"8$`%2,L@`($B```ZQ#``",H@`,KB(``(X"`%`D`___K*```*RB``2.`@!0 -MK*,`"*X%`%"L10``#`!QHZR@``P,`'"Z``````)`$"&/OP`,C[(`"(^Q``2/ -ML````^``"">]`!`0`/_EK@(`2">]_^"OOP`4K[``$(R0``2OH```)@0`/`P` -M<:H#H"@ACZ(```(`("$40``()Z4`!(^B``!40/_X)@0`/(^_`!2/L``0`^`` -M"">]`"`,`!%+`````!``__>/H@``)[W_\"2E__^OL0`$K[\`#*^R``BOL``` -M+*(`&0"`B"$00``4C)(`!#P#@`(`!1"`)&,(X`!#$"&,0@```$``"`````", -MA```#``;"B0%`!$`0(`A)D8$@`!`("$D!0$X#``;/@````".)```#``:O0(` -M*"&/OP`,C[(`"(^Q``2/L````^``"">]`!```#`A`D`@(0P`+H$D!0`"CB0` -M``P`&PHD!0`2`$"`(29&!(@`0"`A$`#_ZB0%``B,A```#``;"B0%`!..)``` -M`$"`(20"`@`0`/_EK@(```P`$ZB,A``$$`#_Y(^_``P,`!/`C(0`!!``_^"/ -MOP`,)[W_T*^S`!ROOP`@K[(`&*^Q`!2OL``0C)(`!`"`F"$#H"@A`F`@(0P` -M$4LF41?L`B`@(0P`<<(`0(`A`D`@(0P`%&TD!0`!CZ8```(`*"$,`!&.`F`@ -M(0)`("$,`!1M```H(0P`<=`"("`A$`#_[0.@*"$GO?_@K[0`$*^S``ROOP`< -MK[8`&*^U`!2OL@`(K[$`!*^P``",D0`$``"@(0``F"&.(A?@5$``"HXB%]PF -M,!K(#`!QP@(`("$,`''0`@`@(8XB%^!00/_Z)C`:R(XB%]P00``X`````"8V -M&N`,`''"`L`@(8XC'*0D`@`#$&(`-0`````D!0`!`B`@(0P`%&TF,AK()C4: -MA`P`<]__"OOP``C*(`!`"@("$``#`A -MC$(7Q"0%`!@40``$```X(8^_```#X``()[T`$`P`$1D`````$`#_^X^_```G -MO?_P`*`@(0``,"$D!0`9K[\```P`$1D``#@AC[\```/@``@GO0`0)[W_\*^_ -M``BOL0`$K[```(R0``0,`'%9`("((0!`("$,`'%7)@4;7(X$&UP\!8``)@<8 -M""8(&!`"(#`A#`!Q822E20P,`'%<`````"1C`,@L90#(C@08"`!%$"$D"``` -M)`D`R`!`,"$,`'%T`&`X(8X$&UP\!8``)@<80"8(&$@"(#`A#`!Q822E24P, -M`'%<`````"1C`,B.!!A`+&4`R`!%$"$`0#`A)`@``"0)`,@,`'%T`&`X(8^_ -M``B/L0`$C[````/@``@GO0`0)[W_X"2"`$0D@P!,K[$`!`"`B"&OOP`8K[4` -M%*^S``ROL@`(K[0`$*^P```DA``\KB(`2*XC`%```"@AKB``1*X@`$PF,P!4 -M#`!QAXXT``0"8"`A#`!QAP``*"$``*@A``"0(0P`>EH).<)1"4(9+@E:VS``B`P(20)"``,`'#+ -M)`0``8X$;+@,`'#D/!"``CP%@``\!X`"/`B``CP+@`(F"GE@)*5'-"3G"50E -M"&U@)6MY:"0$``$"(#`A#`!PRR0)#``,`'#DC@1Y8`P`$ET"("`A`J`0(8^_ -M`!B/M0`4C[0`$(^S``R/L@`(C[$`!(^P```#X``()[T`(!``__4D%0`")[W_ -MT*^P`!``H(`AK[\`(*^S`!ROL@`8`("8(:^Q`!0,`'%"KZ``!`P`*.@"`"`A -M%$``$B02``$,`'%0`F`@(20"``$20@`)``````)`$"&/OP`@C[,`'(^R`!B/ -ML0`4C[``$`/@``@GO0`P#`!Q20)@("$0`/_V`D`0(0(`("$#H"@A#``H[2>F -M``0`0(@A,$(``11``%`"`"`A,B(`(%1``$:.`@2$,B((`!1``#X"`"`A,B(` -M0!1``#<"`"`A/`(`!`(B$"040``O`@`@(3(B`(`00``2`````(X"&\Q00``B -MC@48G(^B``0P0@`(5$``&HX%&42/H@`$,$(`!%1``!*.!1D,CZ(`!#!"``)4 -M0``*C@48U"0"_W\"(H@D$B#_Q:^@``".`AV$)!(``P!1$"40`/_`K@(=A`P` -M2IP"`"`A$`#_]20"_W\,`$J<`@`@(1``_^V/H@`$#`!*G`(`("$0`/_ECZ(` -M!(^B``0`LA@$`$,0)!!`_^D`````$`#_[@`````,`"EL/`4`!!``_]`R(@"` -M#``I;"0%`$`0`/_(/`(`!`P`2@HD!0`!)`+W_Q``_[\"(H@D`@`@(20%`"`D -M0@`!#``I;*X"!(00`/^V,B((``P`*6PD!0`!$`#_KS(B`"`GO?_@K[0`$*^R -M``BOL```K[\`%*^S``ROL0`$C,,] -M`"`,`#>``````%1```..!``$$`#_Z0)3D"4``#`A```X(0P`$1DD!0`#4$#_ -MY`)`*"$0`/_A`E.0)2>]__"OL```K[\`!(R"%^`00``/`("`(8R"%]P00``, -M)`(``HR#'*008@`))`(``1!B``B/OP`$#`!PM0`````,`##@`@`@(0P`<+H` -M````C[\`!(^P```#X``()[T`$">]_]"OL0`DK[\`+*^R`"BOL``@C((7X!!` -M`"8`@(@AC((7W!!``",D`@`"C(,)`(``1``_]RN(AL<)[W_X"0#``&OLP`,K[(`"*^Q``2O -ML```K[\`$`"@D"$`P)@A`("`(1"C`$8``(@A4*``,(R"'*0D`@`"$*(`$R0" -M``,0H@`,`````%(@``&N$ARD5F```:YQ``"/OP`0C[,`#(^R``B/L0`$C[`` -M``/@``@GO0`@#``4K"0%``(D$0`6$`#_\0`"B`H,`"EL/`6```(`("$,`!2L -M```H(201`!8"`"`A#``(E0`"B`HD!0`!#``*2`(`("&.`@`$#``="HQ$```, -M`%&4`@`@(0(`("&N`!?@#``I/#P%@``"`"`A#``4K"0%``$0`/_7`````!!# -M``D``````@`@(0``*"$,`!2L`````%1`_\\D$0`6$`#_S0````",@A?@4$#_ -M]P(`("&,@@`$#``=&(Q$```,`''0)@0:X!``__`"`"`AC((7X%1```2,@@`$ -M`@`@(1``_^LD!0`!#``="HQ$```,`''")@0:X!``__D"`"`A)[W_\*^P```P -ML`#_K[\`#*^R``BOL0`$``"0(0P`<+4`@(@A#`!Q-``````2```:CB(]`!`,`#3E)`8``8X#%]PD -M$@`6$&``!``"D`J.`A?@$%$`&3P%@``60/_O)`(``8X#'*A08@`/C@(%)`8``1!```0`0)`A)!(`%A9` -M_[X"0!`A`@`@(1``_]]__`D@@`4 -M)(,`'*^R``BOL```K[\`#*^Q``0`@(`AK((`&*R#`""L@``4K(``'```D"$, -M`'I7)`0`#`!`B"$2(``1)`(``@(@("$``"@A#`!PJB0&``R.`@`@)E(``2I# -M``*N$0`@KB```*XB``048/_PK%$``"8$``P,`'&'```H(0``$"&/OP`,C[(` -M"(^Q``2/L````^``"">]`!`GO?_PK[\``(R&`!R,R```$0``$0"`."&,P@`$ -MK0(`!(SB`!B,PP`$).0`#*S"``2,X@`8K&@``*S%``BLP```K.8`&`P`<:.L -M1@``C[\```/@``@GO0`0C,(`!!``__"L@@`@)[W_\*^Q``0`@(@A)(0`#*^_ -M``@,`'&.K[````P`<+4`````CB0`%(R%```0H``3C((`!*RB``2.(@`@C(,` -M!(R0``BL@@`$CB(`(*QE``"N)``@K(```*R```@,`'"ZK$0```(`$"&/OP`( -MC[$`!(^P```#X``()[T`$!``_^ZN(@`8,*8`#R>]_?`D`O_P),,`3Z^T`@`` -M8A@D`*"@(0"B*"0`HQ`AK[$!]*^_`@ROM@((K[4"!*^S`?ROL@'XK[`!\`!% -M$"L`@(@AC),`!(R6``"OH`"TKZ``H!1```<`H"`AO+$``"2E`!``@Q`A`$40 -M*Q!`__L`````CH,``"QB`$%40``1CH(`#`!F$"$D0@`/)`/_\`!#*"0"@Q@D -M`&40(0!#$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[`````(Z"``P4 -M0`.[CI``!```J"$F!?__+*(`0Q!``!L\`X`"``40@"1C"80`0Q`AC$(```!` -M``@`````)Z4`H">F`*0,`!MH`H`@(0*`("$GI0"@#``;:">F`*@"@"`A)Z4` -MH`P`&V@GI@"L`H`@(2>F`+`,`!MH)Z4`H`(@("$"8"@A#``'PR>F`+02H``' -M`L`@(8Z"``@"H"@AKJ(`"(^B`+0,`!J]KJ(`#(^_`@R/M@((C[4"!(^T`@"/ -MLP'\C[(!^(^Q`?2/L`'P`^``"">]`A`"@"`A)Z4`H`P`&V@GI@"XCZ8`N`(@ -M("$"8"@A#``&\">G`+00`/_D``````)@("$,`%>0)Z4`M!``_]\``````H`@ -M(2>E`*`,`!MH)Z8`O(^E`+P"8"`A)Z8`P```."$,`%!<)Z@`Q(^E`,`,`!LW -M`J`@(8^B`,`00``1CZ4`O`*@("$GI0#(#``;5R>F`,R/I0"\CZ<`R`)@("$G -MI@#0#`!07">H`,2/I0#0`J`@(0P`&V$`````$`#_OP`````"8"`A)Z8`P">G -M`-0,`%!<)Z@`Q(^E`-0"H"`A#``;-P`````0`/^T`````">E`*`GI@#8#``; -M:`*`("$"@"`A)Z4`H`P`&V@GI@#F`.B/ -MI0#8CZ<`Z`)@("$0`/_U```P(0*`("$GI0"@#``;:">F`.R/I0#L`F`@(2>F -M`/```#@A#`!8(2>H`/2/I0#P#``;-P*@("&/H@#P4$``#H^E`.P"H"`A)Z4` -M^`P`&UF`/`GIP$`#`!8(2>H`/2/I0$`$`#_N@*@("$"("`A)`4``0``,"$, -M`!$9```X(1``_VH``````F`@(0P`!O,GI0"T/`2``@P`<'0DA`ET$J#_:X^_ -M`@P,`"YR`F`@(0*@("$0`/^F`$`H(0)@("$,``E`+00`/].`````">E`*`GI@$$ -M#``;:`*`("$"@"`A)Z4`H`P`&V@GI@$(`H`@(2>E`*`,`!MH)Z8!#`*`("$G -MI0"@#``;F`1"/I0$$CZ8!"(^G`1`,`%#?`F`@(1``_S<`````)Z4`H">F -M`10,`!MH`H`@(0*`("$GI0"@#``;:">F`1@"@"`A)Z4`H`P`&V@GI@$E`*`,`!MH)Z8!/(^E -M`3P"8"`A#``4$">F`+00`/\#``````*`("$GI0"@#``;:">F`42/I0%$#``' -MW0)@("$0`/[Z`````">E`*`GI@%(#``;:`*`("$"@"`A)Z4`H`P`&V@GI@%, -MCZ4!2(^F`4P,``@6`F`@(1``_NP`````)Z4`H">F`5`,`!MH`H`@(0*`("$G -MI0"@#``;:">F`50"@"`A)Z4`H`P`&V@GI@%8`H`@(2>E`*`,`!MH)Z8!7(^E -M`5"/I@%4CZF`6`,`!MH`H`@ -M(0*`("$GI0"@#``;:">F`60GL``0`H`@(2>E`*`,`!MR)Z8!:`(`("$``"@A -M#`!PJB0&`!R/HP%DCZ(!:)>E`6("8"`A`@`P(:^B`!2OHP`D#`!/@*^C`!P0 -M`/ZX``````*`("$GI0"@#``;:">F`6R/I@%L`F`@(0P`3\@``"@A$`#^K@`` -M```,`!VR`F`@(1``_JH``````H`@(2>E`*`,`!MH)Z8!<(^E`7`,`"F>`F`@ -M(1``_J$`````)Z0`,```*"$,`'"J)`8`!@*`("$GI0"@#``;:">F`70"@"`A -M)Z4`H`P`&V@GI@%X`H`@(2>E`*`,`!MH)Z8!?`*`("$GI0"@#``;F`8"/ -MI@&`EZ4`-```@"&4QP`4E,0`!"3#``@XX@`'$*0`,P!B@`L`P(@ACZ,!="QB -M``040``8``,0P`!#$"$``A#``$,0(P`"$(`"8A`A)$/[F"0"``<0X@`B)`(` -M!*1B`18D`@`#$.(`&B0"`!`0X@`8)`(`$5#B`!>48@$6).+__BQ"``(40``" -M)`0`""0$``2D9`$8#``(E0)@("&.8AM4`F`@(0(@,"$D0@`!KF(;5(^E`72/ -MJ`%X#``IO`(`."$,``A^`F`@(1``_ED`````E&(!%B1"``00`/_HI&(!%J1@ -M`1@0`/_KI&`!%I>C`#*4P@`"%&+_S`#`B"&7HP`PE,(``!1B_\<``(@A$`#_ -MQX^C`70GI0"@)Z8!A`P`&V@"@"`A`H`@(2>E`*`,`!MH)Z8!B`*`("$GI0"@ -M#``;:">F`8R/IP&,CZ4!A(^F`8@,`"P_`F`@(8^C`80``A0```(D`RQB``04 -M0/XQ``,0P`!#$"$``A#``$,0(P`"$(`"8A`A$`#^*J1$_*P"@"`A)Z4`H`P` -M&V@GI@%`CZ4!0`P`5W\"8"`A$`#^(0`````GI0"@)Z8!D`P`&V@"@"`A`H`@ -M(2>E`*`,`!MH)Z8!E`*`("$GI0"@#``;:">F`9@"@"`A)Z4`H`P`&V@GI@&< -M)Z4`H">F`9P"@"`A#``;:(^P`9P"@"`A)Z4`H`P`&W(GI@&@CZ8!E(^G`9B/ -MJ`&@CZD!D`)@("$"`%`A#`!0$@``*"$0`/W^`````">E`*`GI@&D#``;:`*` -M("$"@"`A)Z4`H`P`&W(GI@&HCZ4!J`P`+2("8"`A$`#]\0`````GL``X`F`@ -M(0P`+>T"`"@A`J`@(0(`,"$D!0`(#``;/@`````0`/WF``````P`+@0"8"`A -M$`#]X@`````D`@`"KF(;L`P`+A("8"`A$`#]W``````GI0"@)Z8!K`P`&V@" -M@"`A`H`@(2>E`*`,`!MH)Z8!L">E`*`GI@&P`H`@(0P`&VB/L`&P`H`@(2>E -M`*`,`!MR)Z8!M(^C`:PD`O__$&(`)0`#$,``0Q`A``(0P`!#$"./I0&T``(0 -M@`)B$"$D1@`0`*88)3!C``,D1``($&``'R2G`"``X!@AB*(``)BB``.(IP`$ -MF*<`!XBH``B8J``+B*D`#)BI``^HP@``N,(``ZC'``2XQP`'J,@`"+C(``NH -MR0`,N,D`#R2E`!`4H__N),8`$("B``"@P@``#`!2Q0(`*"$6`/VACZ4!M`P` -M+BX"8"`A$`#]G0````",H@``C*,`!(RH``B,J0`,K,(``*S#``2LR``(K,D` -M#"2E`!`4I__V),8`$!``_^H``````H`@(2>E`*`,`!MH)Z8!N(Z"``P00``? -MCZ,!N"0"``408@`()`(`!!1B_80"8"`A```P(0P`+H$D!0`$$`#^(0*@("$" -M8"`A)Z8`0`P`+H$D!0`%CZ(`0">F`%@"H"`AKZ(`6(^B`$0D!0`4KZ(`7(^B -M`$BOH@!@CZ(`3*^B`&27H@!2IZ(`:)>B`%80`/^"IZ(`:H^E`;@"8"`A#``N -M@0``,"$0`/UE``````P`+PX"8"`A$`#^`P*@("$GI0"@)Z8!O`P`&V@"@"`A -M`H`@(2>E`*`,`!MH)Z8!P(^E`;R/I@'`#``RH0)@("$0`/U3``````P`,XT" -M8"`A$`#]3P`````"@"`A)Z4`H`P`&V@GI@'DCZ4!Y`P`,\$"8"`A$`#]1@`` -M```"@"`A)Z4`H`P`&V@GI@'HCF8<_(^E`>@,`#,5`F`@(1``_3RN8AS\)Z4` -MH">F`30,`!MH`H`@(0*`("$GI0"@#``;:">F`3B/I0$TCZ8!.`P`-@4"8"`A -M$`#]+@`````GI0"@)Z8!+`P`&V@"@"`A`H`@(2>E`*`,`!MH)Z8!,(^E`2R/ -MI@$P#``V#@)@("$0`/T@``````P`2'\"8"`AKF(%L"9E&W`,`#KG`F`@(1`` -M_1@`````)[`!Q`*`("$GI0"@#``;:`(`,"$"@"`A)Z4`H`(`,"$,`!MHE[(! -MQB>E`*`GI@'(`H`@(0P`&VB7L0'&`H`@(2>E`*`,`!MH)Z8!S`*`("$GI0"@ -M#``;:">F`=`"@"`A)Z4`H`P`&V@"`#`A`@`P(0*`("$GI0"@#``;:(^P`<2/ -MIP'(CZ@!S(^I`="/JP'$)Z(`M`)@("$"0"@A`B`P(0(`4"&OH@``#`!7EZ^@ -M``00`/SJ``````P`.F<"8"`A$`#\Y@`````"@"`A)Z4`H`P`&V@GI@'4CZ4! -MU`P`0=<"8"`A$`#\W0`````"@"`A)Z4`H`P`&V@GI@'8CZ(!V`*`("$GI0"@ -M``*`P`("@",,`!MH)Z8!W``0B("/H@'<`G&((28Q&E`*"N -M(@`$#``;:">F`=R/H@'<`H`@(2>E`*"OH@"`)Z8!W`P`&VBN(@`(CZ(!W`*` -M("$GI0"@KZ(`A">F`=P,`!MHKB(`#(^B`=P`$(#``H`@(:^B`)`GI0"@KB(` -M$">F`=P,`!MH`G"`(280&'B/H@'F`20"@"`A#``;:(^P`20" -M@"`A)Z4`H`P`&W(GI@$HCZ8!*``0$,``4!`CC,,````"$(``4Q`AK$,9R(S# -M``0D0AG()`<``:Q#``2,PP`(`@F`>"/HP'@`F`@(0`#$,``0Q`C``(0P`!3$"$, -M`$J'C$48G!``_&T``````H`@(2>E`*`,`!MH)Z8![)>B`>X0`/QFIF(;\`+` -M("$,`!L*`@`H(11`_$,`0*@A)`(``A``_&:OH@"T)[W_\*^Q``2OOP`(`("( -M(0P`]__"OL@`(K[$`!*^P``"OOP`,`("`(0P`%4,\ -M$H`#/`6``#P'@`(\"(`"/`N``P!`B"$F2HH()*5F;`(`,"$DYPJ0)0AZ""5K -MBA`D!``!$$``""0)$``"(!`AC[\`#(^R``B/L0`$C[````/@``@GO0`0#`!P -MRP`````,`'#DCD2*"!``__4"(!`A)`(``:R"`#`\`H`"K$5$1#P"@`*L140\ -M`^``"```$"$GO?_0K[0`(*^R`!BOL0`4K[``$*^_`"0\$(`"K[,`'(X%,N`\ -M!H``/`>```"`B"$DQFI0```@(23G:K@GJ@`!)Z@`!`P`66L#H$@A/`*``HQ4 -M1$`\`H`"C$9$.(X#,N"3H@``CZ4`!*QQ``"@8@`(K&4`!).B``&.!#+@``"0 -M(:""``F.`C+@K$8`$*Q4``P\$X`"CG`RX`P`>E<"@"`ACF,RX``2B(`",(`A -MK@(`%`(CB"&.)``4#``;'B92``$J0@`"5$#_\SP3@`*.9#+@#``:VB02``\\ -M$(`"C@(RX"92__\,`'I7C$0`#(X$,N`,`!KW`$`H(09#__@\$(`"C@(RX(^_ -M`"2/M``@C[,`'(^R`!B/L0`4C[``$`/@``@GO0`P)[W_T#"B``\D0@!-)`/_ -M\*^R`!@`H)`A`$,H)`)#&"0`91`A`$,0*Z^Q`!2OOP`@`("((:^S`!ROL``0 -M%$``!P!@("&\<0``)&,`$`"%$"$`0Q`K$$#_^P````"20@`!DD0``)(C`$`0 -M@P`2,%,``8XC`#B.(@`\K&```(XD`#0D0@`!$(``!:XB`#P,`!LIC)```!8` -M__T"`"`AKB``1*X@`#2B(`!`DD(``!1``$(`````DD(``%1```6.(@!$KC(` -M-*XR`#BN(`!$CB(`1)9#``*.)``X`$,0(:R2``"N(@!$%F``"ZXR`#B2(@!` -M)$(``:(B`$"/OP`@C[,`'(^R`!B/L0`4C[``$`/@``@GO0`PKD```(XC``". -M(@`THB``0"1D`"0D4@`$KB``-`.@*"&,<``$#`!QJJ^@``".0P`()`(`$!!B -M``J/H@``5$``"8XB``".`A?8)`,``5!#``6.(@``C@(:M!!#`` -M`D`H(0P`<=`"`"`A$`#_TH^_`"`,`!LI`D`@(1``_\Z/OP`@)[W_\*^_```0 -MX``-,*(`_Q!```8`P"@A#``:(@````"/OP```^``"">]`!",A```#``5:P#` -M*"$0`/_ZC[\``!!```4`P"`A#``;*0`````0`/_TC[\```P`&QX`P"`A$`#_ -M\(^_```GO?_P,*(`_Z^_```40``&`,`H(0P`&Q8`````C[\```/@``@GO0`0 -MC((```P`":*,1``$$`#_^H^_```GO?_PK[\``(RG``",A``$`*`P(0P`6@0` -M`"@AC[\```/@``@GO0`0)[W_\*^_```\`H`"C$(RY`"@,"$00``+D(4`,Y3" -M``(D1P`$#`!:!(R$``2/OP``)`0``3P#@`*L9#+D`^``"">]`!`0`/_W)`<' -M("2"`!PGO?_PK(``)```*"&OOP``#`!QAP!`("&/OP```^``"">]`!`GO?_P -MK[````"`@"$DA``]__"OOP`$K[````P`&N0`H(`AK%``!(^_``2/L``` -M)`,`(*Q#```#X``()[T`$">]__"LH``$K[\```P`&O<`````C[\```/@``@G -MO0`0)[W_\*^_```\`H`"C$(RX`"`,"$``"@A#`!9[HQ$``2/OP```^``"">] -M`!`GO?_PK[\``#P"@`*,0S+@`(`P(3P"B(B090`SC&0`!#1"B(@,`%GNK,(` -M`(^_```#X``()[T`$(R"````@A`AK$4``(R"```D0@`$`^``"*R"```GO?_P -MK[\`"*^Q``2OL````("((8R$````H(`A)`+__`(D("$`P"@AK)````(`,"$D -MA``$)A```PP`<)T"`H`DCB(``(^_``@`4!`A)$(`!*XB``"/L```C[$`!`/@ -M``@GO0`0C(,``"0"`@``0Q`C$*```@"#("&LI```5,```:S"```#X``(```` -M`(R#```DI0`#)`+__`"B*"0`91@A`^``"*R#```0H``"```8(8RC````@Q`A -MC$(`(!"@``(D8P`$K*,```/@``BLP@``C*(```""("$0P``")(0`(*S$```# -MX``(`````">]__"OOP`$K[````P`:_(`@(`A)`,``:X#``RN`@``K@``"*X` -M``2/OP`$C[````/@``@GO0`0)[W_\*^P``"OOP`$C((`.`"`@"$40``F)`0` -M`0P`:LDD!``!#`!K\@````"N`@`L#`!K]20$``*.`@`````H(0P`%-^,1``$ -M%$``$P````".`@`P%$``#```("&.`@`X%$``!0``("&/OP`$C[````/@``@G -MO0`0#`!K#P`````0`/_ZC[\`!`P`:P$`````$`#_\XX"`#@,`&OUC@0`+`P` -M:LD``"`A$`#_[8X"`#@,`&L/`````!``_]@`````)[W_\*^P``"OOP`$C((` -M.`"`@"$40``=)`0``8X"```D!0`!#``4WXQ$``000``%`````(^_``2/L``` -M`^``"">]`!`,`&OUC@0`+`P`:LD``"`AC@(`,!1```@D!``!C@(`.!!`__,` -M`"`A#`!K#P`````0`/_PC[\`!`P`:P$`````$`#_]XX"`#@,`&L/`````!`` -M_^*.`@``)[W_\*^P``"OOP`(K[$`!(S#`"@D`@`!$&(`!@#`@"&/OP`(C[$` -M!(^P```#X``()[T`$*S``#P,`'$T``````P`&[<"`"`AC@(`*!1``"```"`A -M$(``$`````".`@`\/`,``C1C2?`D0@`!K@(`/(X"`#P`8A@K$&``!P````". -M`@``C$(`!(Q1%^@D`@`!$B(`"@`````,`!S\C@0`!"0$``4,`'%)``````P` -M<3L`````$`#_VX^_``@,`!N'`@`@(20$``L0`/_VKA$`*`P`'0..!``$#``= -M(XX$``0\`P`"`$`@(1!```XT8TGPC@(`/"1"``&N`@`\C@(`/`!B$"M00``( -MC@(`*(X"``",0@`$C$,7Z"0"``$08O_-`````(X"`"@40/_I`````!``_\@` -M````)[W_\*^Q``2OL````*"((:^_``@,`'%"`("`(0(`("$"(#`A#``;W@`` -M*"&/OP`(C[$`!(^P```D`@`!`^``"">]`!`GO?_PK[```#P'@```@(`A/`B` -M`"2)`"0DB@`().=PL"0$``LE"&]X```H(:^_``0,`'$(`@`P(8X"`"040``% -M`$`@(8^_``2/L````^``"">]`!`,`'$F`````!``__J/OP`$)[W_\"0#``&O -ML```K[\`"*^Q``00HP`1`("`(5"@`!*,@@`H)`(``A"B``PD`@`#4*(`!HR" -M`"B/OP`(C[$`!(^P```#X``()[T`$%1`__JL@``H$`#_^8^_``BN```\$`#_ -M]H^_``@40/_TC[\`"(R"``",0@`$C%$7Z%8C__"/L0`$#``<]8R$``0,`'%" -M)`0`!0P`&X<"`"`AKA$`*`P`<4DD!``+$`#_Y(^_``@GO?_PK[(`"`"`D"$D -M!`!`K[$`!*^P``"OOP`,#`!Z5P"@B"$`0(`A$@``%```$"$``"@A)`8`0`P` -M<*H"`"`A)@0`+*X2``"N$0`$#``;>:X``"@,`'%))`0`!`P`'#T"`"`AC@0` -M!#P%@``DI7%8#``]`!``0/@)C(0`+!``__N/ -MOP``)[W_\*^_``",@@`H%$``!"0%``&/OP```^``"">]`!``0/@)C(0`+!`` -M__N/OP``)[W_\*^_``",@@`H%$``!"0%``*/OP```^``"">]`!``0/@)C(0` -M+!``__N/OP``)[W_\*^_``",@@`H%$``!"0%``./OP```^``"">]`!``0/@) -MC(0`+!``__N/OP``)[W_\*^_``2OL````("`(8R$``2N!@`L/`:``*X%`"@D -MQG*<#`!9U```*"&.!``$/`:``"3&]__"OOP``#`!:SXR$``2/OP`` -M`^``"">]`!`GO?_PK[\```P`6N",A``$C[\```/@``@GO0`0)[W_\*^_``2O -ML````("`(0P`6M>,A``$#``<_`(`("$,`!T#`@`@(8^_``2/L````^``"">] -M`!`GO?_PK[```*^_``0,`!SU`("`(0P`6MN.!``$C[\`!(^P```#X``()[T` -M$">]__"OOP``#`!:](R$``2/OP```^``"">]`!",@@`````H(8Q"0"`P1@#_ -M/`.``@`%$(`D8S,P`$,@(92"```DI0`!$,(`!2RC``A48/_X/`.``@/@``@` -M`!`A`^``")2"``(D`A0`I((`"B0""9ZD@@`()`(`!:2"`!0D`@`$K((`8"0" -M`!ZD@@`<)`()*J2"`'0D`@`'K((`>"0"``\D`P`")`4``20&``,D!P`\H((` -M4R0"$`"LA0!(H(8`?*"#`'VL@@!4I(<`6JR```2@@P`6H(``%ZR%`'"LA@`` -MK(``:*R``&RL@`!,K(``9*R``#2D@`!]_^"O -ML````("`(20$'`!`&"$``(`A/`*``B12,N@`$!#``%(0(91"```00P`& -M)`(`"280``$J`@`)%$#_]SP"@`(D`@`)$@(`%20#``$,`'I7)`0`O*XB&_00 -M0``0)`/__P``*"$D!@"\#`!PJ@!`("$,`!T\)B0;:``0$,``4A`AC$(`!`!` -M^`D"("`A%$``"P!`@"&N<0```@`8(8^_`!"/LP`,C[(`"(^Q``2/L````&`0 -M(0/@``@GO0`@#`!Z:HXD&_00`/_SKB`;]!``__(D$``")[W_\"0%``X``#`A -MK[(`"*^Q``2OL```K[\`#`P`'B``(40`!K)!0$```4 -M$$`D4?Z`#`!Z5P(@("$`0)@A$$#_YB0$``("(#`A`$`@(0P`<*H``"@AC@(; -M]"01`,`"-!@KK%,`M!!@``P"8)`A`B`H(0(`("$"H#`A#``LKR8Q``$40``* -M`C08*Y>B``*F0@``%&#_]B92``("@"@A#``@YP)@("$00``*`````!)@``8D -M!0`6#`!Z:@)@("&.`AOTK$``M"0%`!80`/_#`*`@(0P`>EB``(0`/^,`H*@)2Q"``440/]U)`0`%A``_VX"`"`A+((``A1`_W`D -M!``6$`#_#S0"@``GO?_PK[$`!*^P``"OOP`,K[(`"(R"&_0`@(@A)`0`(`P` -M>E>,4@"T$$``%P!`@"$`0"`A```H(0P`<*HD!@`@CB(;]`(`*"$"("`A#`!( -M#JQ0``0``(`A`@`H(0(@("$,`"F>)A```2H"`(`40/_[`@`H(8XE&_0,`#\Y -M`B`@(11```\`````$D```P`````,`'IJ`D`@(0P`'WP"("`A)`0`%H^_``R/ -ML@`(C[$`!(^P````@!`A`^``"">]`!`,`#3``B`@(0P`+V0"("`ACB0;]#P# -M@`(D8RRT/!"``CP'@``\"(``/`J``ZR#`!BN(A?$)@E'L"3G2\`E"$VH)4JA -M8```*"$"(#`A#`!Q"```("$,`'$FC@1'L`P`<4D``"`A#`!Z:@)`("&.(QOT -M)`(`"@``("&L8@!H$`#_V:Q@`+0GO?_@K[0`$*^_`!2OLP`,K[(`"*^Q``2O -ML```C)(;](Y0```2```=`("@(8X$``04@`!!`````(X$``@4@``Z`````(X$ -M``P4@``S`````(X$`!`4@``L````````F"$"`(@ACB(`%"9S``$40``B`$`@ -M(8XB`!PF,0`,%$``&@!`("$N8@`#5$#_]XXB`!0,`'IJ`@`@(:Y```".1``$ -M%(``#0`````"@"`A#``_1@)`*"&/OP`4C[0`$(^S``R/L@`(C[$`!(^P```` -M`!`A`^``"">]`"`,`'IJ`````!``__&N0``$#`!Z:@`````0`/_E+F(``PP` -M>FH`````$`#_W8XB`!P,`'IJ``"8(1``_]0"`(@A#`!Z:@`````0`/_,C@0` -M$`P`>FH`````$`#_Q8X$``P,`'IJ`````!``_[Z.!``(C(,;]"0"``XD8P`T -M`^``"``#$`LGO?_0K[0`(*^R`!BOL``0K[\`)*^S`!ROL0`4C)$;]"0%`+\# -MH#`ACB(```"`D"&GH``$#``LKXQ3``0F,``T%$``I@!`H"&.0AOTEZ,``(Q" -M``"N(P`TE$(``"Q"4`,40`"_)Z8`!`)`("$,`"RO)`4`RA1``)D`0*`AEZ(` -M!#!"#\```A%"-$(``:X"`#R.0AOTC$(``)1"```L0E`!$$``IR>F``*GH``" -MEF(`$I9D`!"68P`4``(0@`""("4``QC`EF4```"#("4T@@`"`$4@"I9C``(` -M@"@A-*(`$)>D````0R@*,*(``11```.N!```)`+__0"B*"0PH@`(%$``!"0" -M"0@D`O_O`*(H)"0""0BF`@!$ED(<]C!"`/`L0@`P$$``A*X%``260QSP)`(` -M!Q!B``4D`@G$)`(`"A!B``(D`@G$)`(*K*8"`$:7J``")`(3.*8"`$`D`A?4 -MI@(`0C$#``(D`@`!K@(`8*X``%P48``(```P(99#'/`L8@`&4$``!"0&``$D -M`@`%4&(`8I9#'/*61!SP)`(``:X&`%@L@P`&K@(`4*X``$P08`!8```P(20" -M``50@@!2ED(<\C$$__\`!!!".$(``20'``$P0@`!,0,``:X&`%2N`@!(K@<` -M"*X'``P48``#```P(3"B``D``C`K``00PCA"``$P0@`!,0,`!*X&`!"N`@`4 -M%&```P``,"$PH@`)``(P*Y9B``:.9``8``49`C!C``&N!@`8K@,`(*X'`"2N -M`@`HK@<`'!"```0``"@ACF(`'%1```,D`@`!)`4``20"``$Q`P'PK@(`,*X% -M`"P48``"``,1`B0"``HQ`_``$&``'ZX"`#0``QL")`(``0!B$`2N`@`XCD(; -M](Q#``"7H@`$,$(/P``"(4*48@``+$)0`Q1```.N!``\-((``:X"`#R"8@`@ -M`D`@(:X"`&2"8@`A#``?SJX"`&@"@!`AC[\`)(^T`""/LP`]`#`0`/_D)`(`@"Q"``@40/^N,03__Q``_ZLD!@`!)`(``A!B -M``,L8@`$5$#_G)9$'/`0`/^9)`8``1``_X0D`@G$`D`@(0P`+*\D!0#)%$#_ -MXP!`H"&7H@`"$`#_5*9B`#@"0"`A#``LKR0%`,H40/_;`$"@(9>B``0P0@P` -M``(90JX#`#P0`/]"IZ(`!">]_]"OLP`B -M``"3HP`!``(2`J(#``"B`@`!%(#_\B80``*20P`+)`(`_Q!B``H``(@AHD`` -M#(^_`""/LP`] -M__"OL````("`(:^_``0,`'I7)`0!6*X"``000`!")`,``@!`("$``"@A#`!P -MJB0&`5@,`'I7)`0#9*X"``@00``Y)`,``@!`("$``"@A#`!PJB0&`V2."0`( -M)`(`"B0(``FE(@`4)`(``Z4B`AXE(P`<)`(`"R4(__^D8@``!0'__21C`#0` -M`$`A`2`X(3P#@`(\`H`"``@@0"1C%X0D0A=\`((0(0"#&"&41@``E&,``"4( -M``$`B2`A)`(`"RD%``.D@P(@I(8")J3B`C*DX@+.%*#_[B3G`#0,`'I7)`0` -MB*X"``P00``/)`,``@!`("$``"@A#`!PJB0&`(@,`'I7)`0(`*X"`!`00``& -M)`,``@!`("$``"@A#`!PJB0&"````!@AC[\`!(^P````8!`A`^``"">]`!`G -MO?_@K[\`$*^S``ROL@`(K[$`!*^P``",@AOT`*!((3##__^,4P``EF(``"Q" -M,`,40``ICG``")8&`!0``)`A`D80*U!``!"6`@`4`@`X(0`#$$``21`AE$@` -M`"92``(D8P`!,00`_P`($@("1B@KI.(``*3D``(P8___%*#_]"3G``26`@`4 -M$$``#```D"$"`(@AEB4``)9D`````#`A#``HGB92``&6`P`4IB(```)#&"L4 -M8/_W)C$``H^_`!"/LP`,C[(`"(^Q``2/L````^``"">]`"```Q!``$40(91( -M```D8P`!,&/__P!@*"$`"#%```@8@@`($D(PQ@!_,&,`?P`%($"F!@`$I@(` -M`*8#``(`B2`AE(@``"2E``$PH___`&`@(0`($L(`""C```@9`@#","4PI0!_ -M,&,`?P`$$$"F!0`(I@8`!*8#``8`21`AE$@``"2$``$P@___`&`@(0`($T(` -M"#A```@9@@"B*"4PYP!_,&,`?P`$$$"F!P`,I@4`"*8#``H`21`AE$@``"2$ -M``$PA/__``@I@``(,\(`"!("``@80C"E`'\P0@!_`.8X)3!C`'\`!"!`I@4` -M$J8"``ZF!P`,I@,`$`")("&4B`````@2@@"B*"40`/^HI@4`$B>]_\"OMP`L -MK[4`)*^Q`!2OOP`TK[X`,*^V`"BOM``@K[,`'*^R`!BOL``0C((;]##&__^O -MI0``C%0``*^F``0``+@ACH(`!(Z2``@``(@AE%X`$@``J"$D`@`!```@(1*B -M`'>/HP`$4J``<997`!0D`@`"$J(`9P`````2X`!5``"P(0`#$$"/HP```("8 -M(0!#@"&68@``)B<`"*8B``"6"@``)A```@`*((``"BD"``HR@C"E`#\PA``_ -MIB0`'J8F``2F)0`"E@H``"80``(`"DN"``I!```*$@(`"AB"`(D@)3$(`#\P -M0@`_,&,`/Z8H`"2F)``>IB(`(*8C`"*6"@``)A```@`*&P(`"A&"`0-`)3!" -M`#\Q0P`_IB@`)*8B`":F(P`HE@H``"80``(`"D"```H9`@`*$H(Q"``_,&,` -M/Z8H`"ZF(@`JIB,`+)8*```F$``"``HC@@`*&((`"A("`01`)3!"`#\P8P`_ -MIB@`+J8B`#"F(P`R#``H>I:$``"6)P`&$.``#0``,"$"("@AA*(`'B3&``$` -MQR`K``(80`!B&"$``QC``&(8(0`#&$"DHP`>%(#_]B2E``(FU@`!`M<0*R8Q -M`#040/^Q)G,``B:U``$NH@`#5$#_GR0"``&/OP`TC[X`,(^W`"R/M@`HC[4` -M)(^T`""/LP`]`$!3P/_P)K4``997`AXD8P!& -M)E$"+!``_Y0F1`(@)&,`!291`!80`/^0`D`@(5/`_^4FM0`!EE<"'B1C`#`````":#``$P=/__EB,````4*$``O8@A``,:`H^D`!@``#`AIF(``!!@ -M``H`8"@A#``HG@`````F`P`!,'#__R:#``$P=/__`I(8*Q1@_^*F(@```!(0 -M0@+"$"$P4/__IO0`%!*``&$``$`A``@@0`"($"$`G1@A``(0@)1C````2!`A -M``(00`!7,"$`$"A``)<@(:2#````M2@AI,,`&)2C```F`@`!,%#__P`#$$`P -M0@$`,&,`_P!B&".DPP`$$"/OP!$`$,0(91"`'Z/O@!`C[8`.*;B`!:/M0`TC[<`/(^T`#"/ -MLP`LC[(`*(^Q`"2/L``@`^``"">]`%"4X@``)`,``:3#`!H``AO"``,:```" -M$@(`0Q`C$`#_X:3"`"H`"!!``$D0(91%```E`P`!,&C__R0"`/\`%!A`+08` -M`R:$``$010`#`'T8(3"4__^D90``%,#_\P`($$`0`/]TIO0`%">]__"OL``` -M,+#__P`0$$"OL0`$`("((0!`("&OL@`(K[\`#`P`>E<`P)`AKB(``!!``#,D -M`P`"`!`@@`"0("$`!""``)`@(0P`>E<`!""`$$``,JXB``BF,``$$@``)P`` -M,"$`!D"```880`$&$"$`K0"`8"&GH@`"I*,` -M!J>B````8#@A```P(0``("$`AQ`',$(``1A```@LPP`"$&``@```$"$`!AA` -M),(``0!]&"$P1O__I&0``"2"``$P1/__+((`!!1`__(`AQ`'E8(`%```2"$0 -M0`!QI*(`!``)&$``:1@A``,8@`!I&"$`"4"```,80`$)$"$!@Q@A``(0@(RJ -M``B49``8`$D0(0`"$(``2A`AI$0``"1F`!B4PP`2I$,``I>C``(T`MZM$&(` -M7@``("$!"1@A``,8@`!I&"$`!!"``$00(0`#6(`D@P`!``(0@#!D__\!:C@A -M`$<0(2R#``048/_SI$``!I>C``"4Q``"``,0@`!#$"$``A"``$<0(:1$``B7 -MHP`"``,0@`!#$"$``A"``$<0(20#`!2D0P`(EZ,``@`#$(``0Q`A``(0@`!' -M$"$D`P`CI$,`"I>C``(``Q"``$,0(0`"$(``1Q`A)`,`/Z1#``R7I`````00 -M@`!$$"$``A"``6(0(0!*$"$D1``$)`(`!*2"``*4PP`&E((`!`!#$"&D@@`& -ME,,`"@!#$"&D@@`(E,,`#@!#$"&D@@`*E,(`!*2"``R4P@`(I((`#I3"``RD -M@@`0E,(`$*2"`!*7I``"``00@`!$$"$``A"``6(0(0!*$"$D1``$)`(``Z2" -M``*4P@`4I((`#)3"`!:D@@`.E,(`&*2"`!"4H@`$)2,``3!I__\!(A`K%$#_ -MD@`)&$`D`@`!`^``"">]`!`!"1@A``,8@`!I&"$`!!"``$00(0`#.(`D@P`! -M,&3__P`"$(``ZA@A`$,0(2R#``048/_SI$``!I>D````!!"``$00(0`"$(`` -MXA`A`$H0(21$``0D`@`$I((``I3"``*D@@`$E,,`!@!#$"&D@@`&E,,`"@!# -M$"&D@@`(E,,`#@!#$"&D@@`*E,(`!*2"``R4P@`(I((`#I3"``RD@@`0E,(` -M$!``_\VD@@`2)[W^L*^W`3ROM@$XK[4!-*^S`2ROL@$HK[$!)*^P`2"OOP%` -MK[0!,(R"&_0`@+`A`*"X(8Q"```PT?__`."0(8Q4``0``)@A``"H(0``@"$D -M`@`!4@(`-I:"`!)2```XEH(`$"0"``)2`@`QEH(`%`.@("$``"@A#`!PJB0& -M`1P"P"`A`Z`H(0(@,"$"H#@A`N!`(0P`(E4"`$@AEZ4`%`)`("$,`",F`Z`P -M(0!`F"$40``3`$`8(0.@("$,`"-Q`D`H(1!```XD`___EZ,`%``#$(``0Q`A -M`B(0(18```,P4?__)B(`!3!1__\F$``!+@(``Q1`_]8F4@`,`F`8(8^_`4"/ -MMP$\C[8!.(^U`32/M`$PC[,!+(^R`2B/L0$DC[`!(`!@$"$#X``()[T!4%!` -M_^\F$``!$`#_S205``-00/_K)A```1``_\DD%0`*)[W_P*^W`"ROM``@K[\` -M-*^^`#"OM@`HK[4`)*^S`!ROL@`8K[$`%*^P`!",@AOT,,;__Z^E``",4P`` -MKZ<`"*^F``2.8@`$``"X(0``H"&47@`2)`(``0``D"$``*@A$H(`]`$"60P`$`!`@0@`0*T(`$!'"`&48)3!"`#\0`/_=,(0`/Q``_\@` -M$!#"$`#_O20&``$0`/_=,%'__Q``_[(`$!)"%\``!#!1__\F(@`&$`#_VC!1 -M__^.8@`,)!<``R15`%(0`/^;)%(`5"8B`%4P4?__`&"H(207``@0`/^5)'(` -M`B8B`&4P4?__$\#_\"8B``2.8@`,)!<``B15`'(0`/^,)%(`=">]_]"OM@`8 -MK[0`$*^Q``2OOP`@K[<`'*^U`!2OLP`,K[(`"*^P``",@AOT`*"@(3#1__^, -M50````"P(8ZC``248@$6$$``$8ZR`!``%KA``N,0(91"`1@40``7EJ(``"8C -M``@F)``'+$(P`P!@B"$`@H@+CJ,`!";6``&48@$6`L(0*Q1`__$F4@!`C[\` -M((^W`!R/M@`8C[4`%(^T`!"/LP`,C[(`"(^Q``2/L````^``"">]`#`L0C`# -M%$``0``1$$``5#`A``"8(0)`*"&4R```)G,``BYD``@Q`P#_``@2`J2B``"D -MHP`(),8``B8Q``$4@/_V)*4`$``1$$``5$@A``"8(0)`."&5*```)G,``BYF -M``@`""&"``@2`@`(&X(P0@`_,&,``3"$``$Q!0`_I.(``JSC``2DY0`*K.0` -M#"4I``(F,0`!%,#_[R3G`!```)@A`D"`(8X"``!00``/)G,``8ZB``0"XA`A -ME$(!&#!#``<08``.```P(20"``,08@`,EJ0``)8%```D!@`!#``HGB9S``&F -M`@``+F(`"!1`_^TF$``($`#_LHZC``26I```$`#_]I8%````5!`AE$@``"8Q -M``$`$2!```@I0``(&((`"!)",*4`?S!C`'^F10`0ID(``*9#``@`E"`AE(@` -M`"8Q``$`$3!```@:P@`((,``"!$"`*,H)3"$`'\P0@!_ID0`(*9%`!"F0@`8 -M`-0P(93(```F,0`!`!$H0``(&T(`"#!```@1@@"#("4PQ@!_,$(`?Z9&`#"F -M1``@ID(`*`"T*"&4J```)C$``0`1.$``""/"``@I```($@(`"!B"`,0P)3"E -M`#\P0@!_,&,`/Z9%``JF0@`XID,``J9&`#``]#@AE.@``"8Q``$`$2!```@; -M`@`($8(`HR@E,$(`/S$#`#^F10`*ID(`$J9#`!H`E"`AE(@``"8Q``$`$2A` -M``@@@``(&0(`"!*",(0`/S!C`#^F1``RID(`(J9#`"H`M"@AE*@``"8Q``$` -M"!H"``@3@@""("4P8P`_ID0`,A``_XZF0P`Z)[W_T*^U`"2OM``@K[,`'*^_ -M`"BOL@`8K[$`%*^P`!",@AOT`*`P(0"@H"&,4@```("8(0``J"$,`"8TCD4` -M!)9B'/8P0@#P+$(`,%1```:60@``CD(`!)1"`"@00``I)`,`%I9"```D$`"0 -M)!$`0"Q",`,"`#`A`B(P"P)@("$,`"%$`H`H(99"```"`#`A+$-``"Q",`,4 -M8``&`B(P"XY"``240P`H)`(``1!B`",F1P`4`F`@(0P`(;X"@"@AED,``"QB -M0``40``8+&,P`XY"``240@`L)$+^ZS!&__\"8"`A`H`H(0P`)($#H#@AEZ8` -M``)@("$,`"45`H`H(0*@&"&/OP`HC[4`)(^T`""/LP`F1@#JID(`[*9#`.:F1`#HID4`XJ9'`.0`$1!``%,0 -M(910```F,0`!`9)0(3($`/\`$!H"`!$00*5#`%"E1`!6`%,0(910```F,0`! -M`!$80#($`/\`$!("I4(`7*5$`&(`DH@`"`!$00`!3$"&44```+H5``"8Q -M``$`$!E"`!`@0C!C`/\PA``/,@(``:5"`(2E0P!X%*``!J5$`'X2H`$T`!`3 -M0B0"``(2H@$N`!`30A;``!$N@C`$`!$00`!3$"&44````9(8(0`0$8(P0@!_ -MI&(`S"0"``$2H@$<)C$``2JB``(40`$4)`(``A*B`0T`$!#"+H(P!!1``00` -M%1!``!480`!R&"$`$"-")&,`T``1$$"D9``"`%,0(910```F,0`!`!`0P#!" -M`#@`@B`E)`(``A*B`.VD9``"%J``"2Z"0``4H``'`!`8P@`0$@(P0@`_,&,` -M'Z9"`0*F0P$&+H)``!1``#`FH@`!)`(``1*B`,$D`@`"$J(`:P`1$$`6H``I -M)J(``2Z"0`$40``F)J(``0`1$$``4Q`AE%```"Z#4``F,0`!,@(`/Q1@`!VF -M0@#8`!`1@@`0,T(P0@!_`!$80*9&`$RF0@!"`',8(91P```F,0`!`!$H0#(" -M``<``A#``!`8P@`0(D(`PC`E,&,`/Z)$`&NF1@!,ID,`W@"S*"&4L```)C$` -M`3("``$``A'``((@)0`0$$*B1`!KHD(`<":B``$P5?__+J(``Q1`_O\`%1"` -M4L``$X[B`!0`$1!``%,0(910```F,0`!`!$@0``0$,(R`P`',$(`!Z9#`/JF -M0@#^`),@(920````$!#",$(`!S(#``>F0P#\ID(!`([B`!261P$6``"H(1#@ -M``\D4?]``!$00`!3,"&4T```)J,``@`5$$`P=?__`%(0(3(#`/\`$"("`J,@4`_R8Q``$`$"H"`H`@(20&``$,`"B>ID(!$``1 -M&$``F0P#Z$`#^Y:9" -M`/XP0@`!$`#^T:9"`#`P0@`!$`#^SJ9"`"XP0@`',@,`!Z9"`/80`/Z`ID,` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 01:11:28 2010 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 43D98106566B; Tue, 19 Jan 2010 01:11:28 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32E978FC1E; Tue, 19 Jan 2010 01:11:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J1BSQx032706; Tue, 19 Jan 2010 01:11:28 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J1BS4S032703; Tue, 19 Jan 2010 01:11:28 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001190111.o0J1BS4S032703@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 19 Jan 2010 01:11: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: r202608 - in head/sys/dev/usb: . wlan 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: Tue, 19 Jan 2010 01:11:28 -0000 Author: weongyo Date: Tue Jan 19 01:11:27 2010 New Revision: 202608 URL: http://svn.freebsd.org/changeset/base/202608 Log: removes a hack to attach TRENDnet TEW-504UB/EU that I think this issue is solved with r202607. Now idProduct of all uath(4) devices should be decreased after loading the firmware. Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_uath.c Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jan 19 01:04:44 2010 (r202607) +++ head/sys/dev/usb/usbdevs Tue Jan 19 01:11:27 2010 (r202608) @@ -2778,7 +2778,6 @@ product UMEDIA TEW429UBC1 0x300d TEW-429 product UMEDIA ALL0298V2 0x3204 ALL0298 v2 product UMEDIA AR5523_2 0x3205 AR5523 product UMEDIA AR5523_2_NF 0x3206 AR5523 (no firmware) -product UMEDIA AR5523_3 0x3207 AR5523 /* Universal Access products */ product UNIACCESS PANACHE 0x0101 Panache Surf USB ISDN Adapter Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Tue Jan 19 01:04:44 2010 (r202607) +++ head/sys/dev/usb/wlan/if_uath.c Tue Jan 19 01:11:27 2010 (r202608) @@ -190,7 +190,6 @@ static const struct usb_device_id uath_d UATH_DEV(NETGEAR3, WPN111), UATH_DEV(UMEDIA, TEW444UBEU), UATH_DEV(UMEDIA, AR5523_2), - UATH_DEV(UMEDIA, AR5523_3), UATH_DEV(WISTRONNEWEB, AR5523_1), UATH_DEV(WISTRONNEWEB, AR5523_2), UATH_DEV(ZCOM, AR5523) From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 01:26:41 2010 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 57E271065672; Tue, 19 Jan 2010 01:26:41 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4734B8FC12; Tue, 19 Jan 2010 01:26:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J1Qfga036044; Tue, 19 Jan 2010 01:26:41 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J1Qfrf036042; Tue, 19 Jan 2010 01:26:41 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001190126.o0J1Qfrf036042@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 19 Jan 2010 01:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202609 - head/sys/dev/usb 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: Tue, 19 Jan 2010 01:26:41 -0000 Author: weongyo Date: Tue Jan 19 01:26:40 2010 New Revision: 202609 URL: http://svn.freebsd.org/changeset/base/202609 Log: Product ID of D-Link DWA-120 after loading the firmware is incorrect. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jan 19 01:11:27 2010 (r202608) +++ head/sys/dev/usb/usbdevs Tue Jan 19 01:26:40 2010 (r202609) @@ -1236,8 +1236,8 @@ product DLINK DSB650TX_PNA 0x4003 1/10/1 product DLINK DSB650TX3 0x400b 10/100 Ethernet product DLINK DSB650TX2 0x4102 10/100 Ethernet product DLINK DSB650 0xabc1 10/100 Ethernet +product DLINK2 DWA120 0x3a0c DWA-120 product DLINK2 DWA120_NF 0x3a0d DWA-120 (no firmware) -product DLINK2 DWA120 0x3a0e DWA-120 product DLINK2 DWLG122C1 0x3c03 DWL-G122 c1 product DLINK2 WUA1340 0x3c04 WUA-1340 product DLINK2 DWA111 0x3c06 DWA-111 From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 01:33:56 2010 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 5E0951065670; Tue, 19 Jan 2010 01:33:56 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3978FC14; Tue, 19 Jan 2010 01:33:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J1XuV8037698; Tue, 19 Jan 2010 01:33:56 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J1XuHq037695; Tue, 19 Jan 2010 01:33:56 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001190133.o0J1XuHq037695@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 19 Jan 2010 01:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202610 - head/etc/devd 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: Tue, 19 Jan 2010 01:33:56 -0000 Author: weongyo Date: Tue Jan 19 01:33:56 2010 New Revision: 202610 URL: http://svn.freebsd.org/changeset/base/202610 Log: adds a hardware specific configuration file for uath(4). Pointed by: sam Reviewed by: imp, thompsa Added: head/etc/devd/uath.conf (contents, props changed) Modified: head/etc/devd/Makefile Modified: head/etc/devd/Makefile ============================================================================== --- head/etc/devd/Makefile Tue Jan 19 01:26:40 2010 (r202609) +++ head/etc/devd/Makefile Tue Jan 19 01:33:56 2010 (r202610) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= asus.conf +FILES= asus.conf uath.conf NO_OBJ= FILESDIR= /etc/devd Added: head/etc/devd/uath.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/devd/uath.conf Tue Jan 19 01:33:56 2010 (r202610) @@ -0,0 +1,120 @@ +# $FreeBSD$ +# +# Atheros USB wireless network device specific devd events + +# Accton +# SMCWUSB-G and SMCWUSBT-G2 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x083a"; + match "product" "(0x4505|0x4507)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Atheros Communications +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x168c"; + match "product" "0x0002"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Atheros Communications +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0cf3"; + match "product" "(0x0002|0x0004|0x0006)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Conceptronic +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0d8e"; + match "product" "(0x7802|0x7812)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# D-Link +# DWL-AG132, DWL-G132 and DWL-AG122 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x2001"; + match "product" "(0x3a01|0x3a03|0x3a05)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# D-Link +# DWA-120 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x07d1"; + match "product" "0x3a0c"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Gigaset +# SMCWUSBT-G +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1690"; + match "product" "(0x0711|0x0713)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Global Sun Technology +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x16ab"; + match "product" "(0x7802|0x7812)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# BayNETGEAR +# WG111U +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0846"; + match "product" "0x4301"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Netgear +# WG111T and WPN111 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1385"; + match "product" "(0x4251|0x5f01)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# U-MEDIA Communications +# TEW-444UB and AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x157e"; + match "product" "(0x3007|0x3206)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Wistron NeWeb +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1435"; + match "product" "(0x0827|0x0829)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Z-Com +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0cde"; + match "product" "0x0013"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 03:00:20 2010 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 D7F1F106566B; Tue, 19 Jan 2010 03:00:19 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 0AD788FC0C; Tue, 19 Jan 2010 03:00:18 +0000 (UTC) Received: by fxm27 with SMTP id 27so2956317fxm.3 for ; Mon, 18 Jan 2010 19:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=mZSyeNCdNYcmgqykCYrjjwIwpu6oQ7F68IVdspIvny0=; b=hwlVCXLTjK1kRUs05PqsS/Tpun0H1g9AQsF+BXytyAjeY57Smx+sd9bIDadWGeJanK ZFk5hCo1cOvwDax4+Zv1BQxrsYTjAxRtUjiVdZT1d7CkDDNG6dTKeHffNXUofieGUrlg gi/ffkhIw9Wpu25M30YLMiudJKfHxDFti0mM0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=ajShzuXQZoWbTfwlRvQ82eCzYKNIpTOEPD+8UIkfKkvibdU6ppgYFR3vsbFgpm0Rei xjIGlAPPWOj4TWmWFkAzdK75kHqorQv7cd3aNId45djQ50me5SMhH3T7iIZugO07tLYq oxrHmSk2mHJHllKwnLx4hyLuO48s/SlBX/f38= Received: by 10.223.94.200 with SMTP id a8mr8470779fan.77.1263870017758; Mon, 18 Jan 2010 19:00:17 -0800 (PST) Received: from mbp-gige.totalterror.net (93-152-151-19.ddns.onlinedirect.bg [93.152.151.19]) by mx.google.com with ESMTPS id 28sm7509713fkx.28.2010.01.18.19.00.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 18 Jan 2010 19:00:16 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Nikolay Denev In-Reply-To: <201001182034.o0IKY1p4070521@svn.freebsd.org> Date: Tue, 19 Jan 2010 05:00:13 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <347EFF83-64D3-4C83-B652-C9A0F94B8FC6@gmail.com> References: <201001182034.o0IKY1p4070521@svn.freebsd.org> To: Andrew Thompson X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202588 - in head/sys: net netgraph 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: Tue, 19 Jan 2010 03:00:20 -0000 On 18 Jan, 2010, at 22:34 , Andrew Thompson wrote: > Author: thompsa > Date: Mon Jan 18 20:34:00 2010 > New Revision: 202588 > URL: http://svn.freebsd.org/changeset/base/202588 >=20 > Log: > Declare a new EVENTHANDLER called iflladdr_event which signals that = the L2 > address on an interface has changed. This lets stacked interfaces = such as > vlan(4) detect that their lower interface has changed and adjust = things in > order to keep working. Previously this situation broke at least = vlan(4) and > lagg(4) configurations. >=20 > The EVENTHANDLER_INVOKE call was not placed within if_setlladdr() due = to the > risk of a loop. >=20 > PR: kern/142927 > Submitted by: Nikolay Denev >=20 > Modified: > head/sys/net/if.c > head/sys/net/if_bridge.c > head/sys/net/if_lagg.c > head/sys/net/if_var.h > head/sys/net/if_vlan.c > head/sys/netgraph/ng_eiface.c > head/sys/netgraph/ng_ether.c > head/sys/netgraph/ng_fec.c >=20 Thanks! -- Regards, Nikolay Denev From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 04:29:43 2010 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 24F7A1065679; Tue, 19 Jan 2010 04:29:43 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 153048FC12; Tue, 19 Jan 2010 04:29:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J4Tg1G076488; Tue, 19 Jan 2010 04:29:42 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J4TgTR076487; Tue, 19 Jan 2010 04:29:42 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001190429.o0J4TgTR076487@svn.freebsd.org> From: Andrew Thompson Date: Tue, 19 Jan 2010 04:29: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: r202611 - 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: Tue, 19 Jan 2010 04:29:43 -0000 Author: thompsa Date: Tue Jan 19 04:29:42 2010 New Revision: 202611 URL: http://svn.freebsd.org/changeset/base/202611 Log: Do not hold the lock over if_setlladdr() as it calls into the interface driver init routine. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Tue Jan 19 01:33:56 2010 (r202610) +++ head/sys/net/if_vlan.c Tue Jan 19 04:29:42 2010 (r202611) @@ -473,6 +473,9 @@ static void vlan_iflladdr(void *arg __unused, struct ifnet *ifp) { struct ifvlan *ifv; +#ifndef VLAN_ARRAY + struct ifvlan *next; +#endif int i; /* @@ -488,13 +491,15 @@ vlan_iflladdr(void *arg __unused, struct */ #ifdef VLAN_ARRAY for (i = 0; i < VLAN_ARRAY_SIZE; i++) - if ((ifv = ifp->if_vlantrunk->vlans[i])) - if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + if ((ifv = ifp->if_vlantrunk->vlans[i])) { #else /* VLAN_ARRAY */ for (i = 0; i < (1 << ifp->if_vlantrunk->hwidth); i++) - LIST_FOREACH(ifv, &ifp->if_vlantrunk->hash[i], ifv_list) - if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + LIST_FOREACH_SAFE(ifv, &ifp->if_vlantrunk->hash[i], ifv_list, next) { #endif /* VLAN_ARRAY */ + VLAN_UNLOCK(); + if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + VLAN_LOCK(); + } VLAN_UNLOCK(); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 05:00:58 2010 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 0C6461065692; Tue, 19 Jan 2010 05:00:58 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F070D8FC19; Tue, 19 Jan 2010 05:00:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J50vp3083378; Tue, 19 Jan 2010 05:00:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J50vGJ083374; Tue, 19 Jan 2010 05:00:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001190500.o0J50vGJ083374@svn.freebsd.org> From: Andrew Thompson Date: Tue, 19 Jan 2010 05:00:57 +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: r202612 - head/sys/net80211 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: Tue, 19 Jan 2010 05:00:58 -0000 Author: thompsa Date: Tue Jan 19 05:00:57 2010 New Revision: 202612 URL: http://svn.freebsd.org/changeset/base/202612 Log: Use the iflladdr_event event to keep the mac address on the vap in sync with the parent wirless interface. If the user passed in a mac address or it was autogenerated then flag this to avoid trashing it on update. This will fix wlan+lagg in a post vap world. Modified: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Tue Jan 19 04:29:42 2010 (r202611) +++ head/sys/net80211/ieee80211.c Tue Jan 19 05:00:57 2010 (r202612) @@ -440,6 +440,9 @@ ieee80211_vap_setup(struct ieee80211com /* auto-enable s/w beacon miss support */ if (flags & IEEE80211_CLONE_NOBEACONS) vap->iv_flags_ext |= IEEE80211_FEXT_SWBMISS; + /* auto-generated or user supplied MAC address */ + if (flags & (IEEE80211_CLONE_BSSID|IEEE80211_CLONE_MACADDR)) + vap->iv_flags_ext |= IEEE80211_FEXT_UNIQMAC; /* * Enable various functionality by default if we're * capable; the driver can override us if it knows better. Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Tue Jan 19 04:29:42 2010 (r202611) +++ head/sys/net80211/ieee80211_freebsd.c Tue Jan 19 05:00:57 2010 (r202612) @@ -730,6 +730,7 @@ ieee80211_load_module(const char *modnam } static eventhandler_tag wlan_bpfevent; +static eventhandler_tag wlan_ifllevent; static void bpf_track(void *arg, struct ifnet *ifp, int dlt, int attach) @@ -756,6 +757,33 @@ bpf_track(void *arg, struct ifnet *ifp, } } +static void +wlan_iflladdr(void *arg __unused, struct ifnet *ifp) +{ + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap, *next; + + if (ifp->if_type != IFT_IEEE80211 || ic == NULL) + return; + + IEEE80211_LOCK(ic); + TAILQ_FOREACH_SAFE(vap, &ic->ic_vaps, iv_next, next) { + /* + * If the MAC address has changed on the parent and it was + * copied to the vap on creation then re-sync. + */ + if (vap->iv_ic == ic && + (vap->iv_flags_ext & IEEE80211_FEXT_UNIQMAC) == 0) { + IEEE80211_ADDR_COPY(vap->iv_myaddr, IF_LLADDR(ifp)); + IEEE80211_UNLOCK(ic); + if_setlladdr(vap->iv_ifp, IF_LLADDR(ifp), + IEEE80211_ADDR_LEN); + IEEE80211_LOCK(ic); + } + } + IEEE80211_UNLOCK(ic); +} + /* * Module glue. * @@ -772,6 +800,12 @@ wlan_modevent(module_t mod, int type, vo bpf_track, 0, EVENTHANDLER_PRI_ANY); if (wlan_bpfevent == NULL) return ENOMEM; + wlan_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event, + wlan_iflladdr, NULL, EVENTHANDLER_PRI_ANY); + if (wlan_ifllevent == NULL) { + EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); + return ENOMEM; + } if_clone_attach(&wlan_cloner); if_register_com_alloc(IFT_IEEE80211, wlan_alloc, wlan_free); return 0; @@ -779,6 +813,7 @@ wlan_modevent(module_t mod, int type, vo if_deregister_com_alloc(IFT_IEEE80211); if_clone_detach(&wlan_cloner); EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); + EVENTHANDLER_DEREGISTER(iflladdr_event, wlan_ifllevent); return 0; } return EINVAL; Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Tue Jan 19 04:29:42 2010 (r202611) +++ head/sys/net80211/ieee80211_var.h Tue Jan 19 05:00:57 2010 (r202612) @@ -545,11 +545,12 @@ MALLOC_DECLARE(M_80211_VAP); /* NB: immutable: should be set only when creating a vap */ #define IEEE80211_FEXT_WDSLEGACY 0x00010000 /* CONF: legacy WDS operation */ #define IEEE80211_FEXT_PROBECHAN 0x00020000 /* CONF: probe passive channel*/ +#define IEEE80211_FEXT_UNIQMAC 0x00040000 /* CONF: user or computed mac */ #define IEEE80211_FEXT_BITS \ "\20\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ "\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \ - "\20BPF\21WDSLEGACY\22PROBECHAN" + "\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC" /* ic_flags_ht/iv_flags_ht */ #define IEEE80211_FHT_NONHT_PR 0x00000001 /* STATUS: non-HT sta present */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 08:15:12 2010 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 E433C1065695; Tue, 19 Jan 2010 08:15:12 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8A35C8FC1B; Tue, 19 Jan 2010 08:15:12 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2D797.dip.t-dialin.net [217.226.215.151]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 27102844023; Tue, 19 Jan 2010 09:15:06 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 8B47A1435A; Tue, 19 Jan 2010 09:15:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1263888902; bh=NFFjxsy1TJ7P7OTJ5KtpGm2frWp1mWqf0EyZk9NZJ/o=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=KH2IJ3g/cZzd4+bbiOAs7v7cADGx1BB4YdWTN/aVHIlC9EsJLv8HaY8bAkzEdPM4u b8lIw1xqXKR5bUNhqTmVNNFb60Jrt6rkMVT+V5HSA3pq7oRvhu1mdgtoSn258b5stp NdqHyH8Fu2ddaeT2k07em4lZZa/kan0g6yLY9BXAh4TlfFNyjSFvxjMWPEIQwe73le s31zqwlbSqCqNqTFHRe4falB1ZoM2lHRujU5loXCGL1HxuiAWbGa6Tn51D3ity9DQ3 JdtY6cRC2iW9wJgwqsdLWCqB6wSFg/DDujCY7OC3xDCEI/UtRGr9Buwv0KXAG6JYJN /+owVHL1qF3eg== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o0J8F1Et064922; Tue, 19 Jan 2010 09:15:01 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 19 Jan 2010 09:15:00 +0100 Message-ID: <20100119091500.17856jhlpl7mjsow@webmail.leidinger.net> Date: Tue, 19 Jan 2010 09:15:00 +0100 From: Alexander Leidinger To: "Wojciech A. Koszek" References: <201001182246.o0IMk6dw000346@svn.freebsd.org> In-Reply-To: <201001182246.o0IMk6dw000346@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 27102844023.5D894 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1264493708.452@4zeddjp7X7Umw1wLXkDsNA X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202598 - head/sys/compat/linux 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: Tue, 19 Jan 2010 08:15:13 -0000 Quoting "Wojciech A. Koszek" (from Mon, 18 Jan 2010 22:46:06 +0000 (UTC)): > Author: wkoszek > Date: Mon Jan 18 22:46:06 2010 > New Revision: 202598 > URL: http://svn.freebsd.org/changeset/base/202598 > > Log: > Let us to use our libusb(3) in Linuxolator. > > With this change, Linux binaries can work with our libusb(3) when > it's compiled against our header files on GNU/Linux system -- this > solves the problem with differences between /dev layouts. > > With ported libusb(3), I am able to use my USB JTAG cable with Linux > binaries that support it. The commit log is IMHO omitting the info if you checked (or not) that there is no linux ioctl in this range. It would also be nice if the comment in linux_ioctl.h tells to check that there is no clash with a linux ioctl when the min/max is changed. Bye, Alexander. -- The longer the title the less important the job. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 10:19:55 2010 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 C0996106568D; Tue, 19 Jan 2010 10:19:55 +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 AEC048FC1F; Tue, 19 Jan 2010 10:19:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JAJtiO058166; Tue, 19 Jan 2010 10:19:55 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JAJttr058163; Tue, 19 Jan 2010 10:19:55 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201001191019.o0JAJttr058163@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 19 Jan 2010 10:19:55 +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: r202613 - head/lib/libfetch 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: Tue, 19 Jan 2010 10:19:55 -0000 Author: des Date: Tue Jan 19 10:19:55 2010 New Revision: 202613 URL: http://svn.freebsd.org/changeset/base/202613 Log: Add HTTP digest authentication. Submitted by: Jean-Francois Dockes Forgotten by: des (repeatedly) Modified: head/lib/libfetch/Makefile head/lib/libfetch/http.c Modified: head/lib/libfetch/Makefile ============================================================================== --- head/lib/libfetch/Makefile Tue Jan 19 05:00:57 2010 (r202612) +++ head/lib/libfetch/Makefile Tue Jan 19 10:19:55 2010 (r202613) @@ -17,7 +17,9 @@ CFLAGS+= -DINET6 .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_SSL DPADD= ${LIBSSL} ${LIBCRYPTO} -LDADD= -lssl -lcrypto +LDADD= -lssl -lcrypto -lmd +.else +LDADD= -lmd .endif CFLAGS+= -DFTP_COMBINE_CWDS Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Tue Jan 19 05:00:57 2010 (r202612) +++ head/lib/libfetch/http.c Tue Jan 19 10:19:55 2010 (r202613) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -343,7 +344,8 @@ typedef enum { hdr_last_modified, hdr_location, hdr_transfer_encoding, - hdr_www_authenticate + hdr_www_authenticate, + hdr_proxy_authenticate, } hdr_t; /* Names of interesting headers */ @@ -357,6 +359,7 @@ static struct { { hdr_location, "Location" }, { hdr_transfer_encoding, "Transfer-Encoding" }, { hdr_www_authenticate, "WWW-Authenticate" }, + { hdr_proxy_authenticate, "Proxy-Authenticate" }, { hdr_unknown, NULL }, }; @@ -446,21 +449,114 @@ http_match(const char *str, const char * return (hdr); } + /* - * Get the next header and return the appropriate symbolic code. - */ -static hdr_t -http_next_header(conn_t *conn, const char **p) + * Get the next header and return the appropriate symbolic code. We + * need to read one line ahead for checking for a continuation line + * belonging to the current header (continuation lines start with + * white space). + * + * We get called with a fresh line already in the conn buffer, either + * from the previous http_next_header() invocation, or, the first + * time, from a fetch_getln() performed by our caller. + * + * This stops when we encounter an empty line (we dont read beyond the header + * area). + * + * Note that the "headerbuf" is just a place to return the result. Its + * contents are not used for the next call. This means that no cleanup + * is needed when ie doing another connection, just call the cleanup when + * fully done to deallocate memory. + */ + +/* Limit the max number of continuation lines to some reasonable value */ +#define HTTP_MAX_CONT_LINES 10 + +/* Place into which to build a header from one or several lines */ +typedef struct { + char *buf; /* buffer */ + size_t bufsize; /* buffer size */ + size_t buflen; /* length of buffer contents */ +} http_headerbuf_t; + +static void +init_http_headerbuf(http_headerbuf_t *buf) { - int i; + buf->buf = NULL; + buf->bufsize = 0; + buf->buflen = 0; +} - if (fetch_getln(conn) == -1) - return (hdr_syserror); - while (conn->buflen && isspace((unsigned char)conn->buf[conn->buflen - 1])) +static void +clean_http_headerbuf(http_headerbuf_t *buf) +{ + if (buf->buf) + free(buf->buf); + init_http_headerbuf(buf); +} + +/* Remove whitespace at the end of the buffer */ +static void +http_conn_trimright(conn_t *conn) +{ + while (conn->buflen && + isspace((unsigned char)conn->buf[conn->buflen - 1])) conn->buflen--; conn->buf[conn->buflen] = '\0'; +} + +static hdr_t +http_next_header(conn_t *conn, http_headerbuf_t *hbuf, const char **p) +{ + int i, len; + + /* + * Have to do the stripping here because of the first line. So + * it's done twice for the subsequent lines. No big deal + */ + http_conn_trimright(conn); if (conn->buflen == 0) return (hdr_end); + + /* Copy the line to the headerbuf */ + if (hbuf->bufsize < conn->buflen + 1) { + if ((hbuf->buf = realloc(hbuf->buf, conn->buflen + 1)) == NULL) + return (hdr_syserror); + hbuf->bufsize = conn->buflen + 1; + } + strcpy(hbuf->buf, conn->buf); + hbuf->buflen = conn->buflen; + + /* + * Fetch possible continuation lines. Stop at 1st non-continuation + * and leave it in the conn buffer + */ + for (i = 0; i < HTTP_MAX_CONT_LINES; i++) { + if (fetch_getln(conn) == -1) + return (hdr_syserror); + + /* + * Note: we carry on the idea from the previous version + * that a pure whitespace line is equivalent to an empty + * one (so it's not continuation and will be handled when + * we are called next) + */ + http_conn_trimright(conn); + if (conn->buf[0] != ' ' && conn->buf[0] != "\t"[0]) + break; + + /* Got a continuation line. Concatenate to previous */ + len = hbuf->buflen + conn->buflen; + if (hbuf->bufsize < len + 1) { + len *= 2; + if ((hbuf->buf = realloc(hbuf->buf, len + 1)) == NULL) + return (hdr_syserror); + hbuf->bufsize = len + 1; + } + strcpy(hbuf->buf + hbuf->buflen, conn->buf); + hbuf->buflen += conn->buflen; + } + /* * We could check for malformed headers but we don't really care. * A valid header starts with a token immediately followed by a @@ -468,11 +564,290 @@ http_next_header(conn_t *conn, const cha * characters except "()<>@,;:\\\"{}". */ for (i = 0; hdr_names[i].num != hdr_unknown; i++) - if ((*p = http_match(hdr_names[i].name, conn->buf)) != NULL) + if ((*p = http_match(hdr_names[i].name, hbuf->buf)) != NULL) return (hdr_names[i].num); + return (hdr_unknown); } +/************************** + * [Proxy-]Authenticate header parsing + */ + +/* + * Read doublequote-delimited string into output buffer obuf (allocated + * by caller, whose responsibility it is to ensure that it's big enough) + * cp points to the first char after the initial '"' + * Handles \ quoting + * Returns pointer to the first char after the terminating double quote, or + * NULL for error. + */ +static const char * +http_parse_headerstring(const char *cp, char *obuf) +{ + for (;;) { + switch (*cp) { + case 0: /* Unterminated string */ + *obuf = 0; + return (NULL); + case '"': /* Ending quote */ + *obuf = 0; + return (++cp); + case '\\': + if (*++cp == 0) { + *obuf = 0; + return (NULL); + } + /* FALLTHROUGH */ + default: + *obuf++ = *cp++; + } + } +} + +/* Http auth challenge schemes */ +typedef enum {HTTPAS_UNKNOWN, HTTPAS_BASIC,HTTPAS_DIGEST} http_auth_schemes_t; + +/* Data holder for a Basic or Digest challenge. */ +typedef struct { + http_auth_schemes_t scheme; + char *realm; + char *qop; + char *nonce; + char *opaque; + char *algo; + int stale; + int nc; /* Nonce count */ +} http_auth_challenge_t; + +static void +init_http_auth_challenge(http_auth_challenge_t *b) +{ + b->scheme = HTTPAS_UNKNOWN; + b->realm = b->qop = b->nonce = b->opaque = b->algo = NULL; + b->stale = b->nc = 0; +} + +static void +clean_http_auth_challenge(http_auth_challenge_t *b) +{ + if (b->realm) + free(b->realm); + if (b->qop) + free(b->qop); + if (b->nonce) + free(b->nonce); + if (b->opaque) + free(b->opaque); + if (b->algo) + free(b->algo); + init_http_auth_challenge(b); +} + +/* Data holder for an array of challenges offered in an http response. */ +#define MAX_CHALLENGES 10 +typedef struct { + http_auth_challenge_t *challenges[MAX_CHALLENGES]; + int count; /* Number of parsed challenges in the array */ + int valid; /* We did parse an authenticate header */ +} http_auth_challenges_t; + +static void +init_http_auth_challenges(http_auth_challenges_t *cs) +{ + int i; + for (i = 0; i < MAX_CHALLENGES; i++) + cs->challenges[i] = NULL; + cs->count = cs->valid = 0; +} + +static void +clean_http_auth_challenges(http_auth_challenges_t *cs) +{ + int i; + /* We rely on non-zero pointers being allocated, not on the count */ + for (i = 0; i < MAX_CHALLENGES; i++) { + if (cs->challenges[i] != NULL) { + clean_http_auth_challenge(cs->challenges[i]); + free(cs->challenges[i]); + } + } + init_http_auth_challenges(cs); +} + +/* + * Enumeration for lexical elements. Separators will be returned as their own + * ascii value + */ +typedef enum {HTTPHL_WORD=256, HTTPHL_STRING=257, HTTPHL_END=258, + HTTPHL_ERROR = 259} http_header_lex_t; + +/* + * Determine what kind of token comes next and return possible value + * in buf, which is supposed to have been allocated big enough by + * caller. Advance input pointer and return element type. + */ +static int +http_header_lex(const char **cpp, char *buf) +{ + size_t l; + /* Eat initial whitespace */ + *cpp += strspn(*cpp, " \t"); + if (**cpp == 0) + return (HTTPHL_END); + + /* Separator ? */ + if (**cpp == ',' || **cpp == '=') + return (*((*cpp)++)); + + /* String ? */ + if (**cpp == '"') { + *cpp = http_parse_headerstring(++*cpp, buf); + if (*cpp == NULL) + return (HTTPHL_ERROR); + return (HTTPHL_STRING); + } + + /* Read other token, until separator or whitespace */ + l = strcspn(*cpp, " \t,="); + memcpy(buf, *cpp, l); + buf[l] = 0; + *cpp += l; + return (HTTPHL_WORD); +} + +/* + * Read challenges from http xxx-authenticate header and accumulate them + * in the challenges list structure. + * + * Headers with multiple challenges are specified by rfc2617, but + * servers (ie: squid) often send them in separate headers instead, + * which in turn is forbidden by the http spec (multiple headers with + * the same name are only allowed for pure comma-separated lists, see + * rfc2616 sec 4.2). + * + * We support both approaches anyway + */ +static int +http_parse_authenticate(const char *cp, http_auth_challenges_t *cs) +{ + int ret = -1; + http_header_lex_t lex; + char *key = malloc(strlen(cp) + 1); + char *value = malloc(strlen(cp) + 1); + char *buf = malloc(strlen(cp) + 1); + + if (key == NULL || value == NULL || buf == NULL) { + fetch_syserr(); + goto out; + } + + /* In any case we've seen the header and we set the valid bit */ + cs->valid = 1; + + /* Need word first */ + lex = http_header_lex(&cp, key); + if (lex != HTTPHL_WORD) + goto out; + + /* Loop on challenges */ + for (; cs->count < MAX_CHALLENGES; cs->count++) { + cs->challenges[cs->count] = + malloc(sizeof(http_auth_challenge_t)); + if (cs->challenges[cs->count] == NULL) { + fetch_syserr(); + goto out; + } + init_http_auth_challenge(cs->challenges[cs->count]); + if (!strcasecmp(key, "basic")) { + cs->challenges[cs->count]->scheme = HTTPAS_BASIC; + } else if (!strcasecmp(key, "digest")) { + cs->challenges[cs->count]->scheme = HTTPAS_DIGEST; + } else { + cs->challenges[cs->count]->scheme = HTTPAS_UNKNOWN; + /* + * Continue parsing as basic or digest may + * follow, and the syntax is the same for + * all. We'll just ignore this one when + * looking at the list + */ + } + + /* Loop on attributes */ + for (;;) { + /* Key */ + lex = http_header_lex(&cp, key); + if (lex != HTTPHL_WORD) + goto out; + + /* Equal sign */ + lex = http_header_lex(&cp, buf); + if (lex != '=') + goto out; + + /* Value */ + lex = http_header_lex(&cp, value); + if (lex != HTTPHL_WORD && lex != HTTPHL_STRING) + goto out; + + if (!strcasecmp(key, "realm")) + cs->challenges[cs->count]->realm = + strdup(value); + else if (!strcasecmp(key, "qop")) + cs->challenges[cs->count]->qop = + strdup(value); + else if (!strcasecmp(key, "nonce")) + cs->challenges[cs->count]->nonce = + strdup(value); + else if (!strcasecmp(key, "opaque")) + cs->challenges[cs->count]->opaque = + strdup(value); + else if (!strcasecmp(key, "algorithm")) + cs->challenges[cs->count]->algo = + strdup(value); + else if (!strcasecmp(key, "stale")) + cs->challenges[cs->count]->stale = + strcasecmp(value, "no"); + /* Else ignore unknown attributes */ + + /* Comma or Next challenge or End */ + lex = http_header_lex(&cp, key); + /* + * If we get a word here, this is the beginning of the + * next challenge. Break the attributes loop + */ + if (lex == HTTPHL_WORD) + break; + + if (lex == HTTPHL_END) { + /* End while looking for ',' is normal exit */ + cs->count++; + ret = 0; + goto out; + } + /* Anything else is an error */ + if (lex != ',') + goto out; + + } /* End attributes loop */ + } /* End challenge loop */ + + /* + * Challenges max count exceeded. This really can't happen + * with normal data, something's fishy -> error + */ + +out: + if (key) + free(key); + if (value) + free(value); + if (buf) + free(buf); + return (ret); +} + + /* * Parse a last-modified header */ @@ -618,6 +993,291 @@ http_base64(const char *src) return (str); } + +/* + * Extract authorization parameters from environment value. + * The value is like scheme:realm:user:pass + */ +typedef struct { + char *scheme; + char *realm; + char *user; + char *password; +} http_auth_params_t; + +static void +init_http_auth_params(http_auth_params_t *s) +{ + s->scheme = s->realm = s->user = s->password = 0; +} + +static void +clean_http_auth_params(http_auth_params_t *s) +{ + if (s->scheme) + free(s->scheme); + if (s->realm) + free(s->realm); + if (s->user) + free(s->user); + if (s->password) + free(s->password); + init_http_auth_params(s); +} + +static int +http_authfromenv(const char *p, http_auth_params_t *parms) +{ + int ret = -1; + char *v, *ve; + char *str = strdup(p); + + if (str == NULL) { + fetch_syserr(); + return (-1); + } + v = str; + + if ((ve = strchr(v, ':')) == NULL) + goto out; + + *ve = 0; + if ((parms->scheme = strdup(v)) == NULL) { + fetch_syserr(); + goto out; + } + v = ve + 1; + + if ((ve = strchr(v, ':')) == NULL) + goto out; + + *ve = 0; + if ((parms->realm = strdup(v)) == NULL) { + fetch_syserr(); + goto out; + } + v = ve + 1; + + if ((ve = strchr(v, ':')) == NULL) + goto out; + + *ve = 0; + if ((parms->user = strdup(v)) == NULL) { + fetch_syserr(); + goto out; + } + v = ve + 1; + + + if ((parms->password = strdup(v)) == NULL) { + fetch_syserr(); + goto out; + } + ret = 0; +out: + if (ret == -1) + clean_http_auth_params(parms); + if (str) + free(str); + return (ret); +} + + +/* + * Digest response: the code to compute the digest is taken from the + * sample implementation in RFC2616 + */ +#define IN +#define OUT + +#define HASHLEN 16 +typedef char HASH[HASHLEN]; +#define HASHHEXLEN 32 +typedef char HASHHEX[HASHHEXLEN+1]; + +static const char *hexchars = "0123456789abcdef"; +static void +CvtHex(IN HASH Bin, OUT HASHHEX Hex) +{ + unsigned short i; + unsigned char j; + + for (i = 0; i < HASHLEN; i++) { + j = (Bin[i] >> 4) & 0xf; + Hex[i*2] = hexchars[j]; + j = Bin[i] & 0xf; + Hex[i*2+1] = hexchars[j]; + }; + Hex[HASHHEXLEN] = '\0'; +}; + +/* calculate H(A1) as per spec */ +static void +DigestCalcHA1( + IN char * pszAlg, + IN char * pszUserName, + IN char * pszRealm, + IN char * pszPassword, + IN char * pszNonce, + IN char * pszCNonce, + OUT HASHHEX SessionKey + ) +{ + MD5_CTX Md5Ctx; + HASH HA1; + + MD5Init(&Md5Ctx); + MD5Update(&Md5Ctx, pszUserName, strlen(pszUserName)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszRealm, strlen(pszRealm)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszPassword, strlen(pszPassword)); + MD5Final(HA1, &Md5Ctx); + if (strcasecmp(pszAlg, "md5-sess") == 0) { + + MD5Init(&Md5Ctx); + MD5Update(&Md5Ctx, HA1, HASHLEN); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce)); + MD5Final(HA1, &Md5Ctx); + }; + CvtHex(HA1, SessionKey); +} + +/* calculate request-digest/response-digest as per HTTP Digest spec */ +static void +DigestCalcResponse( + IN HASHHEX HA1, /* H(A1) */ + IN char * pszNonce, /* nonce from server */ + IN char * pszNonceCount, /* 8 hex digits */ + IN char * pszCNonce, /* client nonce */ + IN char * pszQop, /* qop-value: "", "auth", "auth-int" */ + IN char * pszMethod, /* method from the request */ + IN char * pszDigestUri, /* requested URL */ + IN HASHHEX HEntity, /* H(entity body) if qop="auth-int" */ + OUT HASHHEX Response /* request-digest or response-digest */ + ) +{ +/* DEBUG(fprintf(stderr, + "Calc: HA1[%s] Nonce[%s] qop[%s] method[%s] URI[%s]\n", + HA1, pszNonce, pszQop, pszMethod, pszDigestUri));*/ + MD5_CTX Md5Ctx; + HASH HA2; + HASH RespHash; + HASHHEX HA2Hex; + + // calculate H(A2) + MD5Init(&Md5Ctx); + MD5Update(&Md5Ctx, pszMethod, strlen(pszMethod)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszDigestUri, strlen(pszDigestUri)); + if (strcasecmp(pszQop, "auth-int") == 0) { + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, HEntity, HASHHEXLEN); + }; + MD5Final(HA2, &Md5Ctx); + CvtHex(HA2, HA2Hex); + + // calculate response + MD5Init(&Md5Ctx); + MD5Update(&Md5Ctx, HA1, HASHHEXLEN); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce)); + MD5Update(&Md5Ctx, ":", 1); + if (*pszQop) { + MD5Update(&Md5Ctx, pszNonceCount, strlen(pszNonceCount)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszQop, strlen(pszQop)); + MD5Update(&Md5Ctx, ":", 1); + }; + MD5Update(&Md5Ctx, HA2Hex, HASHHEXLEN); + MD5Final(RespHash, &Md5Ctx); + CvtHex(RespHash, Response); +} + +/* + * Generate/Send a Digest authorization header + * This looks like: [Proxy-]Authorization: credentials + * + * credentials = "Digest" digest-response + * digest-response = 1#( username | realm | nonce | digest-uri + * | response | [ algorithm ] | [cnonce] | + * [opaque] | [message-qop] | + * [nonce-count] | [auth-param] ) + * username = "username" "=" username-value + * username-value = quoted-string + * digest-uri = "uri" "=" digest-uri-value + * digest-uri-value = request-uri ; As specified by HTTP/1.1 + * message-qop = "qop" "=" qop-value + * cnonce = "cnonce" "=" cnonce-value + * cnonce-value = nonce-value + * nonce-count = "nc" "=" nc-value + * nc-value = 8LHEX + * response = "response" "=" request-digest + * request-digest = <"> 32LHEX <"> + */ +static int +http_digest_auth(conn_t *conn, const char *hdr, http_auth_challenge_t *c, + http_auth_params_t *parms, struct url *url) +{ + int r; + char noncecount[10]; + char cnonce[40]; + char *options = 0; + + if (!c->realm || !c->nonce) { + DEBUG(fprintf(stderr, "realm/nonce not set in challenge\n")); + return(-1); + } + if (!c->algo) + c->algo = strdup(""); + + if (asprintf(&options, "%s%s%s%s", + *c->algo? ",algorithm=" : "", c->algo, + c->opaque? ",opaque=" : "", c->opaque?c->opaque:"")== -1) + return (-1); + + if (!c->qop) { + c->qop = strdup(""); + *noncecount = 0; + *cnonce = 0; + } else { + c->nc++; + sprintf(noncecount, "%08x", c->nc); + /* We don't try very hard with the cnonce ... */ + sprintf(cnonce, "%x%lx", getpid(), (unsigned long)time(0)); + } + + HASHHEX HA1; + DigestCalcHA1(c->algo, parms->user, c->realm, + parms->password, c->nonce, cnonce, HA1); + DEBUG(fprintf(stderr, "HA1: [%s]\n", HA1)); + HASHHEX digest; + DigestCalcResponse(HA1, c->nonce, noncecount, cnonce, c->qop, + "GET", url->doc, "", digest); + + if (c->qop[0]) { + r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\"," + "nonce=\"%s\",uri=\"%s\",response=\"%s\"," + "qop=\"auth\", cnonce=\"%s\", nc=%s%s", + hdr, parms->user, c->realm, + c->nonce, url->doc, digest, + cnonce, noncecount, options); + } else { + r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\"," + "nonce=\"%s\",uri=\"%s\",response=\"%s\"%s", + hdr, parms->user, c->realm, + c->nonce, url->doc, digest, options); + } + if (options) + free(options); + return (r); +} + /* * Encode username and password */ @@ -627,8 +1287,8 @@ http_basic_auth(conn_t *conn, const char char *upw, *auth; int r; - DEBUG(fprintf(stderr, "usr: [%s]\n", usr)); - DEBUG(fprintf(stderr, "pwd: [%s]\n", pwd)); + DEBUG(fprintf(stderr, "basic: usr: [%s]\n", usr)); + DEBUG(fprintf(stderr, "basic: pwd: [%s]\n", pwd)); if (asprintf(&upw, "%s:%s", usr, pwd) == -1) return (-1); auth = http_base64(upw); @@ -641,33 +1301,49 @@ http_basic_auth(conn_t *conn, const char } /* - * Send an authorization header + * Chose the challenge to answer and call the appropriate routine to + * produce the header. */ static int -http_authorize(conn_t *conn, const char *hdr, const char *p) +http_authorize(conn_t *conn, const char *hdr, http_auth_challenges_t *cs, + http_auth_params_t *parms, struct url *url) { - /* basic authorization */ - if (strncasecmp(p, "basic:", 6) == 0) { - char *user, *pwd, *str; - int r; - - /* skip realm */ - for (p += 6; *p && *p != ':'; ++p) - /* nothing */ ; - if (!*p || strchr(++p, ':') == NULL) - return (-1); - if ((str = strdup(p)) == NULL) - return (-1); /* XXX */ - user = str; - pwd = strchr(str, ':'); - *pwd++ = '\0'; - r = http_basic_auth(conn, hdr, user, pwd); - free(str); - return (r); + http_auth_challenge_t *basic = NULL; + http_auth_challenge_t *digest = NULL; + int i; + + /* If user or pass are null we're not happy */ + if (!parms->user || !parms->password) { + DEBUG(fprintf(stderr, "NULL usr or pass\n")); + return (-1); } - return (-1); -} + /* Look for a Digest and a Basic challenge */ + for (i = 0; i < cs->count; i++) { + if (cs->challenges[i]->scheme == HTTPAS_BASIC) + basic = cs->challenges[i]; + if (cs->challenges[i]->scheme == HTTPAS_DIGEST) + digest = cs->challenges[i]; + } + + /* Error if "Digest" was specified and there is no Digest challenge */ + if (!digest && (parms->scheme && + !strcasecmp(parms->scheme, "digest"))) { + DEBUG(fprintf(stderr, + "Digest auth in env, not supported by peer\n")); + return (-1); + } + /* + * If "basic" was specified in the environment, or there is no Digest + * challenge, do the basic thing. Don't need a challenge for this, + * so no need to check basic!=NULL + */ + if (!digest || (parms->scheme && !strcasecmp(parms->scheme,"basic"))) + return (http_basic_auth(conn,hdr,parms->user,parms->password)); + + /* Else, prefer digest. We just checked that it's not NULL */ + return (http_digest_auth(conn, hdr, digest, parms, url)); +} /***************************************************************************** * Helper functions for connecting to a server or proxy @@ -797,13 +1473,13 @@ http_print_html(FILE *out, FILE *in) */ FILE * http_request(struct url *URL, const char *op, struct url_stat *us, - struct url *purl, const char *flags) + struct url *purl, const char *flags) { char timebuf[80]; char hbuf[MAXHOSTNAMELEN + 7], *host; conn_t *conn; struct url *url, *new; - int chunked, direct, ims, need_auth, noredirect, verbose; + int chunked, direct, ims, noredirect, verbose; int e, i, n, val; off_t offset, clength, length, size; time_t mtime; @@ -811,6 +1487,14 @@ http_request(struct url *URL, const char FILE *f; hdr_t h; struct tm *timestruct; + http_headerbuf_t headerbuf; + http_auth_challenges_t server_challenges; + http_auth_challenges_t proxy_challenges; + + /* The following calls don't allocate anything */ + init_http_headerbuf(&headerbuf); + init_http_auth_challenges(&server_challenges); + init_http_auth_challenges(&proxy_challenges); direct = CHECK_FLAG('d'); noredirect = CHECK_FLAG('A'); @@ -830,7 +1514,6 @@ http_request(struct url *URL, const char i = 0; e = HTTP_PROTOCOL_ERROR; - need_auth = 0; do { new = NULL; chunked = 0; @@ -895,27 +1578,67 @@ http_request(struct url *URL, const char /* virtual host */ http_cmd(conn, "Host: %s", host); - /* proxy authorization */ - if (purl) { - if (*purl->user || *purl->pwd) - http_basic_auth(conn, "Proxy-Authorization", - purl->user, purl->pwd); - else if ((p = getenv("HTTP_PROXY_AUTH")) != NULL && *p != '\0') - http_authorize(conn, "Proxy-Authorization", p); + /* + * Proxy authorization: we only send auth after we received + * a 407 error. We do not first try basic anyway (changed + * when support was added for digest-auth) + */ + if (purl && proxy_challenges.valid) { + http_auth_params_t aparams; + init_http_auth_params(&aparams); + if (*purl->user || *purl->pwd) { + aparams.user = purl->user ? + strdup(purl->user) : strdup(""); + aparams.password = purl->pwd? + strdup(purl->pwd) : strdup(""); + } else if ((p = getenv("HTTP_PROXY_AUTH")) != NULL && + *p != '\0') { + if (http_authfromenv(p, &aparams) < 0) { + http_seterr(HTTP_NEED_PROXY_AUTH); + goto ouch; + } + } + http_authorize(conn, "Proxy-Authorization", + &proxy_challenges, &aparams, url); + clean_http_auth_params(&aparams); } - /* server authorization */ - if (need_auth || *url->user || *url->pwd) { - if (*url->user || *url->pwd) - http_basic_auth(conn, "Authorization", url->user, url->pwd); - else if ((p = getenv("HTTP_AUTH")) != NULL && *p != '\0') - http_authorize(conn, "Authorization", p); - else if (fetchAuthMethod && fetchAuthMethod(url) == 0) { - http_basic_auth(conn, "Authorization", url->user, url->pwd); + /* + * Server authorization: we never send "a priori" + * Basic auth, which used to be done if user/pass were + * set in the url. This would be weird because we'd send the + * password in the clear even if Digest is finally to be + * used (it would have made more sense for the + * pre-digest version to do this when Basic was specified + * in the environment) + */ + if (server_challenges.valid) { + http_auth_params_t aparams; + init_http_auth_params(&aparams); + if (*url->user || *url->pwd) { + aparams.user = url->user ? + strdup(url->user) : strdup(""); + aparams.password = url->pwd ? + strdup(url->pwd) : strdup(""); + } else if ((p = getenv("HTTP_AUTH")) != NULL && + *p != '\0') { + if (http_authfromenv(p, &aparams) < 0) { + http_seterr(HTTP_NEED_AUTH); + goto ouch; + } + } else if (fetchAuthMethod && + fetchAuthMethod(url) == 0) { + aparams.user = url->user ? + strdup(url->user) : strdup(""); + aparams.password = url->pwd ? + strdup(url->pwd) : strdup(""); } else { http_seterr(HTTP_NEED_AUTH); goto ouch; } + http_authorize(conn, "Authorization", + &server_challenges, &aparams, url); + clean_http_auth_params(&aparams); } /* other headers */ @@ -965,7 +1688,7 @@ http_request(struct url *URL, const char */ break; case HTTP_NEED_AUTH: - if (need_auth) { + if (server_challenges.valid) { /* * We already sent out authorization code, * so there's nothing more we can do. @@ -978,13 +1701,18 @@ http_request(struct url *URL, const char fetch_info("server requires authorization"); break; case HTTP_NEED_PROXY_AUTH: - /* - * If we're talking to a proxy, we already sent - * our proxy authorization code, so there's - * nothing more we can do. - */ - http_seterr(conn->err); - goto ouch; + if (proxy_challenges.valid) { + /* + * We already sent our proxy + * authorization code, so there's + * nothing more we can do. */ + http_seterr(conn->err); + goto ouch; + } + /* try again, but send the password this time */ + if (verbose) + fetch_info("proxy requires authorization"); + break; case HTTP_BAD_RANGE: /* * This can happen if we ask for 0 bytes because @@ -1004,9 +1732,13 @@ http_request(struct url *URL, const char /* fall through so we can get the full error message */ } - /* get headers */ + /* get headers. http_next_header expects one line readahead */ + if (fetch_getln(conn) == -1) { + fetch_syserr(); + goto ouch; + } do { - switch ((h = http_next_header(conn, &p))) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 11:42:16 2010 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 B409A106566C; Tue, 19 Jan 2010 11:42:16 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3C008FC17; Tue, 19 Jan 2010 11:42:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JBgGfP076968; Tue, 19 Jan 2010 11:42:16 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JBgGbq076967; Tue, 19 Jan 2010 11:42:16 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001191142.o0JBgGbq076967@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 19 Jan 2010 11:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202614 - 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: Tue, 19 Jan 2010 11:42:16 -0000 Author: ru Date: Tue Jan 19 11:42:15 2010 New Revision: 202614 URL: http://svn.freebsd.org/changeset/base/202614 Log: Removed NO_UNDEF. Nudged by: trasz Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Jan 19 10:19:55 2010 (r202613) +++ head/sys/conf/kern.mk Tue Jan 19 11:42:15 2010 (r202614) @@ -12,10 +12,7 @@ CWARNFLAGS= .else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - ${_wundef} -Wno-pointer-sign -fformat-extensions -.if !defined(NO_UNDEF) -_wundef= -Wundef -.endif + -Wundef -Wno-pointer-sign -fformat-extensions .endif # # The following flags are next up for working on: From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 12:58:29 2010 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 E12071065679; Tue, 19 Jan 2010 12:58:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEC338FC08; Tue, 19 Jan 2010 12:58:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JCwTgq094796; Tue, 19 Jan 2010 12:58:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JCwTdO094791; Tue, 19 Jan 2010 12:58:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191258.o0JCwTdO094791@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 12:58:29 +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: r202615 - in stable/8/sys: cam/ata geom sys 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: Tue, 19 Jan 2010 12:58:30 -0000 Author: mav Date: Tue Jan 19 12:58:29 2010 New Revision: 202615 URL: http://svn.freebsd.org/changeset/base/202615 Log: MFC r201139: Add BIO_DELETE support to ada(4): - For SSDs use TRIM feature of DATA SET MANAGEMENT command, as defined by ACS-2 specification working draft. - For CompactFlash use CFA ERASE command, same as ad(4) does. With this patch, `newfs -E /dev/ada1` was able to restore write speed of my heavily weared OCZ Vertex SSD (firmware 1.4) up to the initial level for the most part of it's capacity. I have no idea whether it is normal, but for some reason it takes 200ms to handle any TRIM command on this drive, that was making delete extremely slow. But TRIM command is able to accept long list of LBAs and the length of that list seems doesn't affect it's execution time. Implemented request clusting algorithm allowed me to rise delete rate up to reasonable numbers, when many parallel DELETE requests running. Modified: stable/8/sys/cam/ata/ata_all.c stable/8/sys/cam/ata/ata_da.c stable/8/sys/geom/geom_dev.c stable/8/sys/sys/ata.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/ata/ata_all.c ============================================================================== --- stable/8/sys/cam/ata/ata_all.c Tue Jan 19 11:42:15 2010 (r202614) +++ stable/8/sys/cam/ata/ata_all.c Tue Jan 19 12:58:29 2010 (r202615) @@ -75,6 +75,11 @@ ata_op_string(struct ata_cmd *cmd) switch (cmd->command) { case 0x00: return ("NOP"); case 0x03: return ("CFA_REQUEST_EXTENDED_ERROR"); + case 0x06: + switch (cmd->features) { + case 0x01: return ("DSM TRIM"); + } + return "DSM"; case 0x08: return ("DEVICE_RESET"); case 0x20: return ("READ"); case 0x24: return ("READ48"); @@ -338,7 +343,8 @@ ata_48bit_cmd(struct ccb_ataio *ataio, u cmd == ATA_WRITE_DMA_FUA48 || cmd == ATA_WRITE_DMA_QUEUED48 || cmd == ATA_WRITE_DMA_QUEUED_FUA48 || - cmd == ATA_WRITE_STREAM_DMA48) + cmd == ATA_WRITE_STREAM_DMA48 || + cmd == ATA_DATA_SET_MANAGEMENT) ataio->cmd.flags |= CAM_ATAIO_DMA; ataio->cmd.command = cmd; ataio->cmd.features = features; Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Tue Jan 19 11:42:15 2010 (r202614) +++ stable/8/sys/cam/ata/ata_da.c Tue Jan 19 12:58:29 2010 (r202615) @@ -74,8 +74,10 @@ typedef enum { ADA_FLAG_CAN_DMA = 0x010, ADA_FLAG_NEED_OTAG = 0x020, ADA_FLAG_WENT_IDLE = 0x040, + ADA_FLAG_CAN_TRIM = 0x080, ADA_FLAG_OPEN = 0x100, - ADA_FLAG_SCTX_INIT = 0x200 + ADA_FLAG_SCTX_INIT = 0x200, + ADA_FLAG_CAN_CFA = 0x400 } ada_flags; typedef enum { @@ -86,6 +88,7 @@ typedef enum { ADA_CCB_BUFFER_IO = 0x03, ADA_CCB_WAITING = 0x04, ADA_CCB_DUMP = 0x05, + ADA_CCB_TRIM = 0x06, ADA_CCB_TYPE_MASK = 0x0F, } ada_ccb_state; @@ -101,13 +104,23 @@ struct disk_params { u_int64_t sectors; /* Total number sectors */ }; +#define TRIM_MAX_BLOCKS 4 +#define TRIM_MAX_RANGES TRIM_MAX_BLOCKS * 64 +struct trim_request { + uint8_t data[TRIM_MAX_RANGES * 8]; + struct bio *bps[TRIM_MAX_RANGES]; +}; + struct ada_softc { struct bio_queue_head bio_queue; + struct bio_queue_head trim_queue; ada_state state; ada_flags flags; ada_quirks quirks; int ordered_tag_count; int outstanding_cmds; + int trim_max_ranges; + int trim_running; struct disk_params params; struct disk *disk; union ccb saved_ccb; @@ -115,6 +128,7 @@ struct ada_softc { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; struct callout sendordered_c; + struct trim_request trim_req; }; struct ada_quirk_entry { @@ -309,6 +323,18 @@ adaclose(struct disk *dp) return (0); } +static void +adaschedule(struct cam_periph *periph) +{ + struct ada_softc *softc = (struct ada_softc *)periph->softc; + + if (bioq_first(&softc->bio_queue) || + (!softc->trim_running && bioq_first(&softc->trim_queue))) { + /* Have more work to do, so ensure we stay scheduled */ + xpt_schedule(periph, CAM_PRIORITY_NORMAL); + } +} + /* * Actually translate the requested transfer into one the physical driver * can understand. The transfer is described by a buf and will include @@ -341,12 +367,16 @@ adastrategy(struct bio *bp) /* * Place it in the queue of disk activities for this disk */ - bioq_disksort(&softc->bio_queue, bp); + if (bp->bio_cmd == BIO_DELETE && + (softc->flags & ADA_FLAG_CAN_TRIM)) + bioq_disksort(&softc->trim_queue, bp); + else + bioq_disksort(&softc->bio_queue, bp); /* * Schedule ourselves for performing the work. */ - xpt_schedule(periph, CAM_PRIORITY_NORMAL); + adaschedule(periph); cam_periph_unlock(periph); return; @@ -485,6 +515,7 @@ adaoninvalidate(struct cam_periph *perip * with XPT_ABORT_CCB. */ bioq_flush(&softc->bio_queue, NULL, ENXIO); + bioq_flush(&softc->trim_queue, NULL, ENXIO); disk_gone(softc->disk); xpt_print(periph->path, "lost device\n"); @@ -618,6 +649,7 @@ adaregister(struct cam_periph *periph, v } bioq_init(&softc->bio_queue); + bioq_init(&softc->trim_queue); if (cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA) softc->flags |= ADA_FLAG_CAN_DMA; @@ -628,6 +660,17 @@ adaregister(struct cam_periph *periph, v if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ && cgd->inq_flags & SID_CmdQue) softc->flags |= ADA_FLAG_CAN_NCQ; + if (cgd->ident_data.support_dsm & ATA_SUPPORT_DSM_TRIM) { + softc->flags |= ADA_FLAG_CAN_TRIM; + softc->trim_max_ranges = TRIM_MAX_RANGES; + if (cgd->ident_data.max_dsm_blocks != 0) { + softc->trim_max_ranges = + min(cgd->ident_data.max_dsm_blocks * 64, + softc->trim_max_ranges); + } + } + if (cgd->ident_data.support.command2 & ATA_SUPPORT_CFA) + softc->flags |= ADA_FLAG_CAN_CFA; softc->state = ADA_STATE_NORMAL; periph->softc = softc; @@ -672,7 +715,7 @@ adaregister(struct cam_periph *periph, v maxio = DFLTPHYS; /* traditional default */ else if (maxio > MAXPHYS) maxio = MAXPHYS; /* for safety */ - if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48) + if (softc->flags & ADA_FLAG_CAN_48BIT) maxio = min(maxio, 65536 * softc->params.secsize); else /* 28bit ATA command limit */ maxio = min(maxio, 256 * softc->params.secsize); @@ -681,6 +724,10 @@ adaregister(struct cam_periph *periph, v softc->disk->d_flags = 0; if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; + if ((softc->flags & ADA_FLAG_CAN_TRIM) || + ((softc->flags & ADA_FLAG_CAN_CFA) && + !(softc->flags & ADA_FLAG_CAN_48BIT))) + softc->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(softc->disk->d_ident, cgd->serial_num, MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); @@ -743,13 +790,10 @@ adastart(struct cam_periph *periph, unio switch (softc->state) { case ADA_STATE_NORMAL: { - /* Pull a buffer from the queue and get going on it */ struct bio *bp; + u_int8_t tag_code; - /* - * See if there is a buf with work for us to do.. - */ - bp = bioq_first(&softc->bio_queue); + /* Execute immediate CCB if waiting. */ if (periph->immediate_priority <= periph->pinfo.priority) { CAM_DEBUG_PRINT(CAM_DEBUG_SUBTRACE, ("queuing for immediate ccb\n")); @@ -758,115 +802,188 @@ adastart(struct cam_periph *periph, unio periph_links.sle); periph->immediate_priority = CAM_PRIORITY_NONE; wakeup(&periph->ccb_list); - } else if (bp == NULL) { + /* Have more work to do, so ensure we stay scheduled */ + adaschedule(periph); + break; + } + /* Run TRIM if not running yet. */ + if (!softc->trim_running && + (bp = bioq_first(&softc->trim_queue)) != 0) { + struct trim_request *req = &softc->trim_req; + struct bio *bp1; + int bps = 0, ranges = 0; + + softc->trim_running = 1; + bzero(req, sizeof(*req)); + bp1 = bp; + do { + uint64_t lba = bp1->bio_pblkno; + int count = bp1->bio_bcount / + softc->params.secsize; + + bioq_remove(&softc->trim_queue, bp1); + while (count > 0) { + int c = min(count, 0xffff); + int off = ranges * 8; + + req->data[off + 0] = lba & 0xff; + req->data[off + 1] = (lba >> 8) & 0xff; + req->data[off + 2] = (lba >> 16) & 0xff; + req->data[off + 3] = (lba >> 24) & 0xff; + req->data[off + 4] = (lba >> 32) & 0xff; + req->data[off + 5] = (lba >> 40) & 0xff; + req->data[off + 6] = c & 0xff; + req->data[off + 7] = (c >> 8) & 0xff; + lba += c; + count -= c; + ranges++; + } + req->bps[bps++] = bp1; + bp1 = bioq_first(&softc->trim_queue); + if (bp1 == NULL || + bp1->bio_bcount / softc->params.secsize > + (softc->trim_max_ranges - ranges) * 0xffff) + break; + } while (1); + cam_fill_ataio(ataio, + ada_retry_count, + adadone, + CAM_DIR_OUT, + 0, + req->data, + ((ranges + 63) / 64) * 512, + ada_default_timeout * 1000); + ata_48bit_cmd(ataio, ATA_DATA_SET_MANAGEMENT, + ATA_DSM_TRIM, 0, (ranges + 63) / 64); + start_ccb->ccb_h.ccb_state = ADA_CCB_TRIM; + goto out; + } + /* Run regular command. */ + bp = bioq_first(&softc->bio_queue); + if (bp == NULL) { xpt_release_ccb(start_ccb); - } else { - u_int8_t tag_code; - - bioq_remove(&softc->bio_queue, bp); - - if ((softc->flags & ADA_FLAG_NEED_OTAG) != 0) { - softc->flags &= ~ADA_FLAG_NEED_OTAG; - softc->ordered_tag_count++; - tag_code = 0; - } else { - tag_code = 1; - } - switch (bp->bio_cmd) { - case BIO_READ: - case BIO_WRITE: - { - uint64_t lba = bp->bio_pblkno; - uint16_t count = bp->bio_bcount / softc->params.secsize; + break; + } + bioq_remove(&softc->bio_queue, bp); - cam_fill_ataio(ataio, - ada_retry_count, - adadone, - bp->bio_cmd == BIO_READ ? - CAM_DIR_IN : CAM_DIR_OUT, - tag_code, - bp->bio_data, - bp->bio_bcount, - ada_default_timeout*1000); + if ((softc->flags & ADA_FLAG_NEED_OTAG) != 0) { + softc->flags &= ~ADA_FLAG_NEED_OTAG; + softc->ordered_tag_count++; + tag_code = 0; + } else { + tag_code = 1; + } + switch (bp->bio_cmd) { + case BIO_READ: + case BIO_WRITE: + { + uint64_t lba = bp->bio_pblkno; + uint16_t count = bp->bio_bcount / softc->params.secsize; - if ((softc->flags & ADA_FLAG_CAN_NCQ) && tag_code) { + cam_fill_ataio(ataio, + ada_retry_count, + adadone, + bp->bio_cmd == BIO_READ ? + CAM_DIR_IN : CAM_DIR_OUT, + tag_code, + bp->bio_data, + bp->bio_bcount, + ada_default_timeout*1000); + + if ((softc->flags & ADA_FLAG_CAN_NCQ) && tag_code) { + if (bp->bio_cmd == BIO_READ) { + ata_ncq_cmd(ataio, ATA_READ_FPDMA_QUEUED, + lba, count); + } else { + ata_ncq_cmd(ataio, ATA_WRITE_FPDMA_QUEUED, + lba, count); + } + } else if ((softc->flags & ADA_FLAG_CAN_48BIT) && + (lba + count >= ATA_MAX_28BIT_LBA || + count > 256)) { + if (softc->flags & ADA_FLAG_CAN_DMA) { + if (bp->bio_cmd == BIO_READ) { + ata_48bit_cmd(ataio, ATA_READ_DMA48, + 0, lba, count); + } else { + ata_48bit_cmd(ataio, ATA_WRITE_DMA48, + 0, lba, count); + } + } else { if (bp->bio_cmd == BIO_READ) { - ata_ncq_cmd(ataio, ATA_READ_FPDMA_QUEUED, - lba, count); + ata_48bit_cmd(ataio, ATA_READ_MUL48, + 0, lba, count); } else { - ata_ncq_cmd(ataio, ATA_WRITE_FPDMA_QUEUED, - lba, count); + ata_48bit_cmd(ataio, ATA_WRITE_MUL48, + 0, lba, count); } - } else if ((softc->flags & ADA_FLAG_CAN_48BIT) && - (lba + count >= ATA_MAX_28BIT_LBA || - count > 256)) { - if (softc->flags & ADA_FLAG_CAN_DMA) { - if (bp->bio_cmd == BIO_READ) { - ata_48bit_cmd(ataio, ATA_READ_DMA48, - 0, lba, count); - } else { - ata_48bit_cmd(ataio, ATA_WRITE_DMA48, - 0, lba, count); - } + } + } else { + if (count == 256) + count = 0; + if (softc->flags & ADA_FLAG_CAN_DMA) { + if (bp->bio_cmd == BIO_READ) { + ata_28bit_cmd(ataio, ATA_READ_DMA, + 0, lba, count); } else { - if (bp->bio_cmd == BIO_READ) { - ata_48bit_cmd(ataio, ATA_READ_MUL48, - 0, lba, count); - } else { - ata_48bit_cmd(ataio, ATA_WRITE_MUL48, - 0, lba, count); - } + ata_28bit_cmd(ataio, ATA_WRITE_DMA, + 0, lba, count); } } else { - if (count == 256) - count = 0; - if (softc->flags & ADA_FLAG_CAN_DMA) { - if (bp->bio_cmd == BIO_READ) { - ata_28bit_cmd(ataio, ATA_READ_DMA, - 0, lba, count); - } else { - ata_28bit_cmd(ataio, ATA_WRITE_DMA, - 0, lba, count); - } + if (bp->bio_cmd == BIO_READ) { + ata_28bit_cmd(ataio, ATA_READ_MUL, + 0, lba, count); } else { - if (bp->bio_cmd == BIO_READ) { - ata_28bit_cmd(ataio, ATA_READ_MUL, - 0, lba, count); - } else { - ata_28bit_cmd(ataio, ATA_WRITE_MUL, - 0, lba, count); - } + ata_28bit_cmd(ataio, ATA_WRITE_MUL, + 0, lba, count); } } } - break; - case BIO_FLUSH: - cam_fill_ataio(ataio, - 1, - adadone, - CAM_DIR_NONE, - 0, - NULL, - 0, - ada_default_timeout*1000); + break; + } + case BIO_DELETE: + { + uint64_t lba = bp->bio_pblkno; + uint16_t count = bp->bio_bcount / softc->params.secsize; - if (softc->flags & ADA_FLAG_CAN_48BIT) - ata_48bit_cmd(ataio, ATA_FLUSHCACHE48, 0, 0, 0); - else - ata_28bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0); - break; - } - start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO; - start_ccb->ccb_h.ccb_bp = bp; - softc->outstanding_cmds++; - xpt_action(start_ccb); - bp = bioq_first(&softc->bio_queue); + cam_fill_ataio(ataio, + ada_retry_count, + adadone, + CAM_DIR_NONE, + 0, + NULL, + 0, + ada_default_timeout*1000); + + if (count >= 256) + count = 0; + ata_28bit_cmd(ataio, ATA_CFA_ERASE, 0, lba, count); + break; } - - if (bp != NULL) { - /* Have more work to do, so ensure we stay scheduled */ - xpt_schedule(periph, CAM_PRIORITY_NORMAL); + case BIO_FLUSH: + cam_fill_ataio(ataio, + 1, + adadone, + CAM_DIR_NONE, + 0, + NULL, + 0, + ada_default_timeout*1000); + + if (softc->flags & ADA_FLAG_CAN_48BIT) + ata_48bit_cmd(ataio, ATA_FLUSHCACHE48, 0, 0, 0); + else + ata_28bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0); + break; } + start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO; +out: + start_ccb->ccb_h.ccb_bp = bp; + softc->outstanding_cmds++; + xpt_action(start_ccb); + + /* May have more work to do, so ensure we stay scheduled */ + adaschedule(periph); break; } } @@ -882,6 +999,7 @@ adadone(struct cam_periph *periph, union ataio = &done_ccb->ataio; switch (ataio->ccb_h.ccb_state & ADA_CCB_TYPE_MASK) { case ADA_CCB_BUFFER_IO: + case ADA_CCB_TRIM: { struct bio *bp; @@ -908,13 +1026,6 @@ adadone(struct cam_periph *periph, union "Invalidating pack\n"); softc->flags |= ADA_FLAG_PACK_INVALID; } - - /* - * return all queued I/O with EIO, so that - * the client can retry these I/Os in the - * proper order should it attempt to recover. - */ - bioq_flush(&softc->bio_queue, NULL, EIO); bp->bio_error = error; bp->bio_resid = bp->bio_bcount; bp->bio_flags |= BIO_ERROR; @@ -940,8 +1051,27 @@ adadone(struct cam_periph *periph, union softc->outstanding_cmds--; if (softc->outstanding_cmds == 0) softc->flags |= ADA_FLAG_WENT_IDLE; - - biodone(bp); + if ((ataio->ccb_h.ccb_state & ADA_CCB_TYPE_MASK) == + ADA_CCB_TRIM) { + struct trim_request *req = + (struct trim_request *)ataio->data_ptr; + int i; + + for (i = 1; i < softc->trim_max_ranges && + req->bps[i]; i++) { + struct bio *bp1 = req->bps[i]; + + bp1->bio_resid = bp->bio_resid; + bp1->bio_error = bp->bio_error; + if (bp->bio_flags & BIO_ERROR) + bp1->bio_flags |= BIO_ERROR; + biodone(bp1); + } + softc->trim_running = 0; + biodone(bp); + adaschedule(periph); + } else + biodone(bp); break; } case ADA_CCB_WAITING: Modified: stable/8/sys/geom/geom_dev.c ============================================================================== --- stable/8/sys/geom/geom_dev.c Tue Jan 19 11:42:15 2010 (r202614) +++ stable/8/sys/geom/geom_dev.c Tue Jan 19 12:58:29 2010 (r202615) @@ -299,8 +299,8 @@ g_dev_ioctl(struct cdev *dev, u_long cmd } while (length > 0) { chunk = length; - if (chunk > 1024 * cp->provider->sectorsize) - chunk = 1024 * cp->provider->sectorsize; + if (chunk > 65536 * cp->provider->sectorsize) + chunk = 65536 * cp->provider->sectorsize; error = g_delete_data(cp, offset, chunk); length -= chunk; offset += chunk; Modified: stable/8/sys/sys/ata.h ============================================================================== --- stable/8/sys/sys/ata.h Tue Jan 19 11:42:15 2010 (r202614) +++ stable/8/sys/sys/ata.h Tue Jan 19 12:58:29 2010 (r202615) @@ -101,7 +101,9 @@ struct ata_params { /*066*/ u_int16_t mwdmarec; /* rec. M/W DMA time ns */ /*067*/ u_int16_t pioblind; /* min. PIO cycle w/o flow */ /*068*/ u_int16_t pioiordy; /* min. PIO cycle IORDY flow */ - u_int16_t reserved69; +/*069*/ u_int16_t support3; +#define ATA_SUPPORT_RZAT 0x0020 +#define ATA_SUPPORT_DRAT 0x4000 u_int16_t reserved70; /*071*/ u_int16_t rlsovlap; /* rel time (us) for overlap */ /*072*/ u_int16_t rlsservice; /* rel time (us) for service */ @@ -204,7 +206,8 @@ struct ata_params { u_int16_t lba_size48_2; u_int16_t lba_size48_3; u_int16_t lba_size48_4; - u_int16_t reserved104[2]; + u_int16_t reserved104; +/*105*/ u_int16_t max_dsm_blocks; /*106*/ u_int16_t pss; #define ATA_PSS_LSPPS 0x000F #define ATA_PSS_LSSABOVE512 0x1000 @@ -230,7 +233,10 @@ struct ata_params { /*162*/ u_int16_t cfa_kms_support; /*163*/ u_int16_t cfa_trueide_modes; /*164*/ u_int16_t cfa_memory_modes; - u_int16_t reserved165[11]; + u_int16_t reserved165[4]; +/*169*/ u_int16_t support_dsm; +#define ATA_SUPPORT_DSM_TRIM 0x0001 + u_int16_t reserved170[6]; /*176*/ u_int8_t media_serial[60]; /*206*/ u_int16_t sct; u_int16_t reserved206[2]; @@ -284,6 +290,8 @@ struct ata_params { #define ATA_NOP 0x00 /* NOP */ #define ATA_NF_FLUSHQUEUE 0x00 /* flush queued cmd's */ #define ATA_NF_AUTOPOLL 0x01 /* start autopoll function */ +#define ATA_DATA_SET_MANAGEMENT 0x06 +#define ATA_DSM_TRIM 0x01 #define ATA_DEVICE_RESET 0x08 /* reset device */ #define ATA_READ 0x20 /* read */ #define ATA_READ48 0x24 /* read 48bit LBA */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:00:33 2010 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 9CD2D106568F; Tue, 19 Jan 2010 13:00:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B7FA8FC14; Tue, 19 Jan 2010 13:00:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JD0XOr095496; Tue, 19 Jan 2010 13:00:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JD0X0q095493; Tue, 19 Jan 2010 13:00:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191300.o0JD0X0q095493@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:00:33 +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: r202616 - in stable/8/sys: cam/ata dev/ata 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: Tue, 19 Jan 2010 13:00:33 -0000 Author: mav Date: Tue Jan 19 13:00:33 2010 New Revision: 202616 URL: http://svn.freebsd.org/changeset/base/202616 Log: MFC r201990: - Report SATA in legacy emulation mode still as SATA. - Make ATA XPT able to handle such case. Modified: stable/8/sys/cam/ata/ata_xpt.c stable/8/sys/dev/ata/ata-all.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Tue Jan 19 12:58:29 2010 (r202615) +++ stable/8/sys/cam/ata/ata_xpt.c Tue Jan 19 13:00:33 2010 (r202616) @@ -1001,7 +1001,6 @@ typedef struct { union ccb *request_ccb; struct ccb_pathinq *cpi; int counter; - int found; } ata_scan_bus_info; /* @@ -1049,14 +1048,11 @@ ata_scan_bus(struct cam_periph *periph, } scan_info->request_ccb = request_ccb; scan_info->cpi = &work_ccb->cpi; - if (scan_info->cpi->transport == XPORT_ATA) - scan_info->found = 0x0003; - else - scan_info->found = 0x8001; - scan_info->counter = 0; /* If PM supported, probe it first. */ if (scan_info->cpi->hba_inquiry & PI_SATAPM) - scan_info->counter = 15; + scan_info->counter = scan_info->cpi->max_target; + else + scan_info->counter = 0; work_ccb = xpt_alloc_ccb_nowait(); if (work_ccb == NULL) { @@ -1073,10 +1069,11 @@ ata_scan_bus(struct cam_periph *periph, /* Free the current request path- we're done with it. */ xpt_free_path(work_ccb->ccb_h.path); /* If there is PMP... */ - if (scan_info->counter == 15) { + if ((scan_info->cpi->hba_inquiry & PI_SATAPM) && + (scan_info->counter == scan_info->cpi->max_target)) { if (work_ccb->ccb_h.ppriv_field1 != 0) { /* everything else willbe probed by it */ - scan_info->found = 0x8000; + goto done; } else { struct ccb_trans_settings cts; @@ -1091,11 +1088,10 @@ ata_scan_bus(struct cam_periph *periph, xpt_action((union ccb *)&cts); } } -take_next: - /* Take next device. Wrap from 15 (PM) to 0. */ - scan_info->counter = (scan_info->counter + 1 ) & 0x0f; - if (scan_info->counter > scan_info->cpi->max_target - - ((scan_info->cpi->hba_inquiry & PI_SATAPM) ? 1 : 0)) { + if (scan_info->counter == + ((scan_info->cpi->hba_inquiry & PI_SATAPM) ? + 0 : scan_info->cpi->max_target)) { +done: xpt_free_ccb(work_ccb); xpt_free_ccb((union ccb *)scan_info->cpi); request_ccb = scan_info->request_ccb; @@ -1104,9 +1100,10 @@ take_next: xpt_done(request_ccb); break; } + /* Take next device. Wrap from max (PMP) to 0. */ + scan_info->counter = (scan_info->counter + 1 ) % + (scan_info->cpi->max_target + 1); scan_next: - if ((scan_info->found & (1 << scan_info->counter)) == 0) - goto take_next; status = xpt_create_path(&path, xpt_periph, scan_info->request_ccb->ccb_h.path_id, scan_info->counter, 0); Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Tue Jan 19 12:58:29 2010 (r202615) +++ stable/8/sys/dev/ata/ata-all.c Tue Jan 19 13:00:33 2010 (r202616) @@ -1473,7 +1473,7 @@ ataaction(struct cam_sim *sim, union ccb d = &ch->curr[ccb->ccb_h.target_id]; else d = &ch->user[ccb->ccb_h.target_id]; - if ((ch->flags & ATA_SATA) && (ch->flags & ATA_NO_SLAVE)) { + if (ch->flags & ATA_SATA) { if (cts->xport_specific.sata.valid & CTS_SATA_VALID_REVISION) d->revision = cts->xport_specific.sata.revision; if (cts->xport_specific.ata.valid & CTS_SATA_VALID_MODE) { @@ -1497,8 +1497,6 @@ ataaction(struct cam_sim *sim, union ccb } if (cts->xport_specific.ata.valid & CTS_ATA_VALID_BYTECOUNT) d->bytecount = cts->xport_specific.ata.bytecount; - if (ch->flags & ATA_SATA) - d->bytecount = min(8192, d->bytecount); } ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -1515,7 +1513,7 @@ ataaction(struct cam_sim *sim, union ccb d = &ch->user[ccb->ccb_h.target_id]; cts->protocol = PROTO_ATA; cts->protocol_version = PROTO_VERSION_UNSPECIFIED; - if ((ch->flags & ATA_SATA) && (ch->flags & ATA_NO_SLAVE)) { + if (ch->flags & ATA_SATA) { cts->transport = XPORT_SATA; cts->transport_version = XPORT_VERSION_UNSPECIFIED; cts->xport_specific.sata.mode = d->mode; @@ -1604,7 +1602,7 @@ ataaction(struct cam_sim *sim, union ccb strncpy(cpi->hba_vid, "ATA", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - if ((ch->flags & ATA_SATA) && (ch->flags & ATA_NO_SLAVE)) + if (ch->flags & ATA_SATA) cpi->transport = XPORT_SATA; else cpi->transport = XPORT_ATA; From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:07:25 2010 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 D515D106566B; Tue, 19 Jan 2010 13:07:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3E618FC08; Tue, 19 Jan 2010 13:07:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JD7PL1097354; Tue, 19 Jan 2010 13:07:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JD7PUm097352; Tue, 19 Jan 2010 13:07:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191307.o0JD7PUm097352@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:07:25 +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: r202617 - stable/8/sys/dev/ata/chipsets 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: Tue, 19 Jan 2010 13:07:25 -0000 Author: mav Date: Tue Jan 19 13:07:25 2010 New Revision: 202617 URL: http://svn.freebsd.org/changeset/base/202617 Log: MFC r200655: Serverworks OSB4 has no 0x4a (piomode) register, do not touch it. Also OSB4 has some problems with UDMA transfers, limit it to WDMA2. Modified: stable/8/sys/dev/ata/chipsets/ata-serverworks.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-serverworks.c Tue Jan 19 13:00:33 2010 (r202616) +++ stable/8/sys/dev/ata/chipsets/ata-serverworks.c Tue Jan 19 13:07:25 2010 (r202617) @@ -80,7 +80,7 @@ ata_serverworks_probe(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); static struct ata_chip_id ids[] = - {{ ATA_ROSB4, 0x00, SWKS_33, 0, ATA_UDMA2, "ROSB4" }, + {{ ATA_ROSB4, 0x00, SWKS_33, 0, ATA_WDMA2, "ROSB4" }, { ATA_CSB5, 0x92, SWKS_100, 0, ATA_UDMA5, "CSB5" }, { ATA_CSB5, 0x00, SWKS_66, 0, ATA_UDMA4, "CSB5" }, { ATA_CSB6, 0x00, SWKS_100, 0, ATA_UDMA5, "CSB6" }, @@ -388,10 +388,12 @@ ata_serverworks_setmode(device_t dev, in piomode = mode; } /* Set PIO mode and timings, calculated above. */ - pci_write_config(parent, 0x4a, + if (ctlr->chip->cfg1 != SWKS_33) { + pci_write_config(parent, 0x4a, (pci_read_config(parent, 0x4a, 2) & ~(0xf << (devno << 2))) | ((piomode - ATA_PIO0) << (devno<<2)),2); + } pci_write_config(parent, 0x40, (pci_read_config(parent, 0x40, 4) & ~(0xff << offset)) | From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:21:26 2010 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 0F0501065692; Tue, 19 Jan 2010 13:21:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8BE68FC14; Tue, 19 Jan 2010 13:21:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDLPHB000573; Tue, 19 Jan 2010 13:21:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDLPFf000571; Tue, 19 Jan 2010 13:21:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191321.o0JDLPFf000571@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:21:25 +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: r202618 - stable/8/sys/dev/ata/chipsets 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: Tue, 19 Jan 2010 13:21:26 -0000 Author: mav Date: Tue Jan 19 13:21:25 2010 New Revision: 202618 URL: http://svn.freebsd.org/changeset/base/202618 Log: MFC r200753: Fairly set master/slave shared PIO/WDMA timings on ITE 821x controllers. Previous implementation could only limit mode, but not rise it back. Modified: stable/8/sys/dev/ata/chipsets/ata-ite.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-ite.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ite.c Tue Jan 19 13:07:25 2010 (r202617) +++ stable/8/sys/dev/ata/chipsets/ata-ite.c Tue Jan 19 13:21:25 2010 (r202618) @@ -105,6 +105,8 @@ ata_ite_chipinit(device_t dev) pci_write_config(dev, 0x56, 0x31, 1); ctlr->setmode = ata_ite_821x_setmode; + /* No timing restrictions initally. */ + ctlr->chipset_data = (void *)0; } ctlr->ch_attach = ata_ite_ch_attach; return 0; @@ -129,6 +131,7 @@ ata_ite_821x_setmode(device_t dev, int t struct ata_channel *ch = device_get_softc(dev); int devno = (ch->unit << 1) + target; int piomode; + uint8_t *timings = (uint8_t*)(&ctlr->chipset_data); u_int8_t udmatiming[] = { 0x44, 0x42, 0x31, 0x21, 0x11, 0xa2, 0x91 }; u_int8_t chtiming[] = @@ -158,11 +161,10 @@ ata_ite_821x_setmode(device_t dev, int t (1 << (devno + 3)), 1); piomode = mode; } + timings[devno] = chtiming[ata_mode2idx(piomode)]; /* set active and recover timing (shared between master & slave) */ - if (pci_read_config(parent, 0x54 + (ch->unit << 2), 1) < - chtiming[ata_mode2idx(piomode)]) - pci_write_config(parent, 0x54 + (ch->unit << 2), - chtiming[ata_mode2idx(piomode)], 1); + pci_write_config(parent, 0x54 + (ch->unit << 2), + max(timings[ch->unit << 1], timings[(ch->unit << 1) + 1]), 1); return (mode); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:24:12 2010 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 14051106566B; Tue, 19 Jan 2010 13:24:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02B868FC12; Tue, 19 Jan 2010 13:24:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDOBsS001277; Tue, 19 Jan 2010 13:24:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDOBqb001274; Tue, 19 Jan 2010 13:24:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191324.o0JDOBqb001274@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:24: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: r202619 - in stable/8/sys/dev/ata: . chipsets 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: Tue, 19 Jan 2010 13:24:12 -0000 Author: mav Date: Tue Jan 19 13:24:11 2010 New Revision: 202619 URL: http://svn.freebsd.org/changeset/base/202619 Log: MFC r200754: Add VIA CX700/VX800 chipsets SATA/PATA support. PR: kern/121521 Modified: stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/ata/chipsets/ata-via.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Tue Jan 19 13:21:25 2010 (r202618) +++ stable/8/sys/dev/ata/ata-pci.h Tue Jan 19 13:24:11 2010 (r202619) @@ -482,6 +482,11 @@ struct ata_pci_controller { #define ATA_VIA6410 0x31641106 #define ATA_VIA6420 0x31491106 #define ATA_VIA6421 0x32491106 +#define ATA_VIACX700IDE 0x05811106 +#define ATA_VIACX700 0x83241106 +#define ATA_VIASATAIDE 0x53241106 +#define ATA_VIAVX800 0x83531106 +#define ATA_VIAVX855 0x84091106 /* global prototypes ata-pci.c */ int ata_pci_probe(device_t dev); Modified: stable/8/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-via.c Tue Jan 19 13:21:25 2010 (r202618) +++ stable/8/sys/dev/ata/chipsets/ata-via.c Tue Jan 19 13:24:11 2010 (r202619) @@ -59,6 +59,9 @@ static void ata_via_reset(device_t dev); static int ata_via_old_setmode(device_t dev, int target, int mode); static void ata_via_southbridge_fixup(device_t dev); static int ata_via_new_setmode(device_t dev, int target, int mode); +static int ata_via_sata_ch_attach(device_t dev); +static int ata_via_sata_getrev(device_t dev, int target); +static int ata_via_sata_setmode(device_t dev, int target, int mode); /* misc defines */ #define VIA33 0 @@ -70,6 +73,7 @@ static int ata_via_new_setmode(device_t #define VIABUG 0x02 #define VIABAR 0x04 #define VIAAHCI 0x08 +#define VIASATA 0x10 /* @@ -98,6 +102,9 @@ ata_via_probe(device_t dev) { ATA_VIA8237_5372, 0x00, VIA133, 0x00, ATA_UDMA6, "8237" }, { ATA_VIA8237_7372, 0x00, VIA133, 0x00, ATA_UDMA6, "8237" }, { ATA_VIA8251, 0x00, VIA133, 0x00, ATA_UDMA6, "8251" }, + { ATA_VIACX700, 0x00, VIA133, VIASATA, ATA_SA150, "CX700" }, + { ATA_VIAVX800, 0x00, VIA133, VIASATA, ATA_SA150, "VX800" }, + { ATA_VIAVX855, 0x00, VIA133, 0x00, ATA_UDMA6, "VX855" }, { 0, 0, 0, 0, 0, 0 }}; static struct ata_chip_id new_ids[] = {{ ATA_VIA6410, 0x00, 0, 0x00, ATA_UDMA6, "6410" }, @@ -113,7 +120,9 @@ ata_via_probe(device_t dev) if (pci_get_vendor(dev) != ATA_VIA_ID) return ENXIO; - if (pci_get_devid(dev) == ATA_VIA82C571) { + if (pci_get_devid(dev) == ATA_VIA82C571 || + pci_get_devid(dev) == ATA_VIACX700IDE || + pci_get_devid(dev) == ATA_VIASATAIDE) { if (!(ctlr->chip = ata_find_chip(dev, ids, -99))) return ENXIO; } @@ -134,12 +143,21 @@ ata_via_chipinit(device_t dev) if (ata_setup_interrupt(dev, ata_generic_intr)) return ENXIO; - - if (ctlr->chip->max_dma >= ATA_SA150) { - /* do we have AHCI capability ? */ - if ((ctlr->chip->cfg2 == VIAAHCI) && ata_ahci_chipinit(dev) != ENXIO) - return 0; + /* AHCI SATA */ + if (ctlr->chip->cfg2 & VIAAHCI) { + if (ata_ahci_chipinit(dev) != ENXIO) + return (0); + } + /* 2 SATA without SATA registers on first channel + 1 PATA on second */ + if (ctlr->chip->cfg2 & VIASATA) { + ctlr->ch_attach = ata_via_sata_ch_attach; + ctlr->setmode = ata_via_sata_setmode; + ctlr->getrev = ata_via_sata_getrev; + return 0; + } + /* Legacy SATA/SATA+PATA with SATA registers in BAR(5). */ + if (ctlr->chip->max_dma >= ATA_SA150) { ctlr->r_type2 = SYS_RES_IOPORT; ctlr->r_rid2 = PCIR_BAR(5); if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2, @@ -148,7 +166,6 @@ ata_via_chipinit(device_t dev) ctlr->ch_detach = ata_via_ch_detach; ctlr->reset = ata_via_reset; } - if (ctlr->chip->cfg2 & VIABAR) { ctlr->channels = 3; ctlr->setmode = ata_via_new_setmode; @@ -365,5 +382,37 @@ ata_via_southbridge_fixup(device_t dev) free(children, M_TEMP); } +static int +ata_via_sata_ch_attach(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + + if (ata_pci_ch_attach(dev)) + return ENXIO; + if (ch->unit == 0) + ch->flags |= ATA_SATA; + return (0); +} + +static int +ata_via_sata_getrev(device_t dev, int target) +{ + struct ata_channel *ch = device_get_softc(dev); + + if (ch->unit == 0) + return (1); + return (0); +} + +static int +ata_via_sata_setmode(device_t dev, int target, int mode) +{ + struct ata_channel *ch = device_get_softc(dev); + + if (ch->unit == 0) + return (mode); + return (ata_via_old_setmode(dev, target, mode)); +} + ATA_DECLARE_DRIVER(ata_via); MODULE_DEPEND(ata_via, ata_ahci, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:25:32 2010 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 4EE521065670; Tue, 19 Jan 2010 13:25:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E3168FC28; Tue, 19 Jan 2010 13:25:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDPW1E001627; Tue, 19 Jan 2010 13:25:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDPWX0001625; Tue, 19 Jan 2010 13:25:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191325.o0JDPWX0001625@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:25:32 +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: r202620 - stable/8/sys/dev/ata/chipsets 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: Tue, 19 Jan 2010 13:25:32 -0000 Author: mav Date: Tue Jan 19 13:25:31 2010 New Revision: 202620 URL: http://svn.freebsd.org/changeset/base/202620 Log: MFC r200817: Spell AMD properly. Modified: stable/8/sys/dev/ata/chipsets/ata-amd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-amd.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-amd.c Tue Jan 19 13:24:11 2010 (r202619) +++ stable/8/sys/dev/ata/chipsets/ata-amd.c Tue Jan 19 13:25:31 2010 (r202620) @@ -61,7 +61,7 @@ static int ata_amd_setmode(device_t dev, #define AMD_CABLE 0x02 /* - * American Micro Devices (AMD) chipset support functions + * Advanced Micro Devices (AMD) chipset support functions */ static int ata_amd_probe(device_t dev) From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:26:45 2010 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 A35E41065670; Tue, 19 Jan 2010 13:26:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9208F8FC0A; Tue, 19 Jan 2010 13:26:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDQjQc001944; Tue, 19 Jan 2010 13:26:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDQjDA001941; Tue, 19 Jan 2010 13:26:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191326.o0JDQjDA001941@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:26:45 +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: r202621 - in stable/8/sys/dev/ata: . chipsets 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: Tue, 19 Jan 2010 13:26:45 -0000 Author: mav Date: Tue Jan 19 13:26:45 2010 New Revision: 202621 URL: http://svn.freebsd.org/changeset/base/202621 Log: MFC r200857: Add support for Intel SCH PATA controller. PR: kern/140251 Modified: stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/ata/chipsets/ata-intel.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Tue Jan 19 13:25:31 2010 (r202620) +++ stable/8/sys/dev/ata/ata-pci.h Tue Jan 19 13:26:45 2010 (r202621) @@ -204,6 +204,7 @@ struct ata_pci_controller { #define ATA_I82801JI_R1 0x3a258086 #define ATA_I82801JI_S2 0x3a268086 #define ATA_I31244 0x32008086 +#define ATA_ISCH 0x811a8086 #define ATA_ITE_ID 0x1283 #define ATA_IT8211F 0x82111283 Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Tue Jan 19 13:25:31 2010 (r202620) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Tue Jan 19 13:26:45 2010 (r202621) @@ -57,6 +57,7 @@ static int ata_intel_ch_attach(device_t static void ata_intel_reset(device_t dev); static int ata_intel_old_setmode(device_t dev, int target, int mode); static int ata_intel_new_setmode(device_t dev, int target, int mode); +static int ata_intel_sch_setmode(device_t dev, int target, int mode); static int ata_intel_sata_getrev(device_t dev, int target); static int ata_intel_31244_ch_attach(device_t dev); static int ata_intel_31244_ch_detach(device_t dev); @@ -140,6 +141,7 @@ ata_intel_probe(device_t dev) { ATA_I82801JI_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" }, { ATA_I82801JI_S2, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" }, { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, + { ATA_ISCH, 0, 0, 1, ATA_UDMA5, "SCH" }, { 0, 0, 0, 0, 0, 0}}; if (pci_get_vendor(dev) != ATA_INTEL_ID) @@ -183,7 +185,13 @@ ata_intel_chipinit(device_t dev) ctlr->setmode = ata_sata_setmode; ctlr->getrev = ata_sata_getrev; } - + /* SCH */ + else if (ctlr->chip->chipid == ATA_ISCH) { + ctlr->channels = 1; + ctlr->ch_attach = ata_intel_ch_attach; + ctlr->ch_detach = ata_pci_ch_detach; + ctlr->setmode = ata_intel_sch_setmode; + } /* non SATA intel chips goes here */ else if (ctlr->chip->max_dma < ATA_SA150) { ctlr->channels = ctlr->chip->cfg2; @@ -245,7 +253,7 @@ ata_intel_ch_attach(device_t dev) (pci_read_config(device_get_parent(dev), 0x90, 1) & 0x04) == 0) ch->flags |= ATA_NO_SLAVE; ch->flags |= ATA_SATA; - } else + } else if (ctlr->chip->chipid != ATA_ISCH) ch->flags |= ATA_CHECKS_CABLE; return 0; } @@ -360,6 +368,35 @@ ata_intel_new_setmode(device_t dev, int } static int +ata_intel_sch_setmode(device_t dev, int target, int mode) +{ + device_t parent = device_get_parent(dev); + struct ata_pci_controller *ctlr = device_get_softc(parent); + u_int8_t dtim = 0x80 + (target << 2); + u_int32_t tim = pci_read_config(parent, dtim, 4); + int piomode; + + mode = min(mode, ctlr->chip->max_dma); + if (mode >= ATA_UDMA0) { + tim |= (0x1 << 31); + tim &= ~(0x7 << 16); + tim |= ((mode & ATA_MODE_MASK) << 16); + piomode = ATA_PIO4; + } else if (mode >= ATA_WDMA0) { + tim &= ~(0x1 << 31); + tim &= ~(0x3 << 8); + tim |= ((mode & ATA_MODE_MASK) << 8); + piomode = (mode == ATA_WDMA0) ? ATA_PIO0 : + (mode == ATA_WDMA1) ? ATA_PIO3 : ATA_PIO4; + } else + piomode = mode; + tim &= ~(0x7); + tim |= (piomode & 0x7); + pci_write_config(parent, dtim, tim, 4); + return (mode); +} + +static int ata_intel_sata_getrev(device_t dev, int target) { struct ata_channel *ch = device_get_softc(dev); From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:27:54 2010 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 D59B11065670; Tue, 19 Jan 2010 13:27:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB7188FC16; Tue, 19 Jan 2010 13:27:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDRsPk002254; Tue, 19 Jan 2010 13:27:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDRsNA002252; Tue, 19 Jan 2010 13:27:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191327.o0JDRsNA002252@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:27:54 +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: r202622 - stable/8/sys/dev/ata/chipsets 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: Tue, 19 Jan 2010 13:27:54 -0000 Author: mav Date: Tue Jan 19 13:27:54 2010 New Revision: 202622 URL: http://svn.freebsd.org/changeset/base/202622 Log: MFC r201993: Report which of IXP700 legacy ATA channels are SATA. Modified: stable/8/sys/dev/ata/chipsets/ata-ati.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ati.c Tue Jan 19 13:26:45 2010 (r202621) +++ stable/8/sys/dev/ata/chipsets/ata-ati.c Tue Jan 19 13:27:54 2010 (r202622) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_ati_chipinit(device_t dev); +static int ata_ati_ixp700_ch_attach(device_t dev); static int ata_ati_setmode(device_t dev, int target, int mode); /* misc defines */ @@ -121,7 +122,7 @@ ata_ati_chipinit(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); device_t smbdev; - int satacfg; + uint8_t satacfg; if (ata_setup_interrupt(dev, ata_generic_intr)) return ENXIO; @@ -145,13 +146,16 @@ ata_ati_chipinit(device_t dev) (satacfg & 0x01) == 0 ? "disabled" : "enabled", (satacfg & 0x08) == 0 ? "" : "combined mode, ", (satacfg & 0x10) == 0 ? "primary" : "secondary"); - + ctlr->chipset_data = (void *)(uintptr_t)satacfg; /* * If SATA controller is enabled but combined mode is disabled, * we have only one PATA channel. Ignore a non-existent channel. */ if ((satacfg & 0x09) == 0x01) ctlr->ichannels &= ~(1 << ((satacfg & 0x10) >> 4)); + else { + ctlr->ch_attach = ata_ati_ixp700_ch_attach; + } } break; } @@ -161,6 +165,23 @@ ata_ati_chipinit(device_t dev) } static int +ata_ati_ixp700_ch_attach(device_t dev) +{ + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); + struct ata_channel *ch = device_get_softc(dev); + uint8_t satacfg = (uint8_t)(uintptr_t)ctlr->chipset_data; + + /* Setup the usual register normal pci style. */ + if (ata_pci_ch_attach(dev)) + return ENXIO; + + /* One of channels is PATA, another is SATA. */ + if (ch->unit == ((satacfg & 0x10) >> 4)) + ch->flags |= ATA_SATA; + return (0); +} + +static int ata_ati_setmode(device_t dev, int target, int mode) { device_t parent = device_get_parent(dev); From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:31:58 2010 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 5ECE410656B5; Tue, 19 Jan 2010 13:31:58 +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 ABEC78FC08; Tue, 19 Jan 2010 13:31:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDVvrZ003211; Tue, 19 Jan 2010 13:31:57 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDVvOH003209; Tue, 19 Jan 2010 13:31:57 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201001191331.o0JDVvOH003209@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 19 Jan 2010 13:31:57 +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: r202623 - head/lib/libfetch 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: Tue, 19 Jan 2010 13:31:58 -0000 Author: des Date: Tue Jan 19 13:31:57 2010 New Revision: 202623 URL: http://svn.freebsd.org/changeset/base/202623 Log: Add missing DPADD and fix whitespace. Submitted by: ru Modified: head/lib/libfetch/Makefile Modified: head/lib/libfetch/Makefile ============================================================================== --- head/lib/libfetch/Makefile Tue Jan 19 13:27:54 2010 (r202622) +++ head/lib/libfetch/Makefile Tue Jan 19 13:31:57 2010 (r202623) @@ -16,10 +16,11 @@ CFLAGS+= -DINET6 .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_SSL -DPADD= ${LIBSSL} ${LIBCRYPTO} +DPADD= ${LIBSSL} ${LIBCRYPTO} ${LIBMD} LDADD= -lssl -lcrypto -lmd .else -LDADD= -lmd +DPADD= ${LIBMD} +LDADD= -lmd .endif CFLAGS+= -DFTP_COMBINE_CWDS From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:33:32 2010 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 117D11065693; Tue, 19 Jan 2010 13:33:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 008DF8FC1B; Tue, 19 Jan 2010 13:33:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDXVu8003599; Tue, 19 Jan 2010 13:33:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDXVHf003597; Tue, 19 Jan 2010 13:33:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191333.o0JDXVHf003597@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:33:31 +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: r202624 - stable/8/sys/dev/ahci 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: Tue, 19 Jan 2010 13:33:32 -0000 Author: mav Date: Tue Jan 19 13:33:31 2010 New Revision: 202624 URL: http://svn.freebsd.org/changeset/base/202624 Log: MFC r200814: Clear all ports interrupt status bits in single write. Clearing one by one causes additional MSIs messages sent if several ports asked for attention same time. Time window before clearing is not important, as these interrupts are level triggered by interrupt source. Modified: stable/8/sys/dev/ahci/ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Tue Jan 19 13:31:57 2010 (r202623) +++ stable/8/sys/dev/ahci/ahci.c Tue Jan 19 13:33:31 2010 (r202624) @@ -596,20 +596,18 @@ ahci_intr(void *data) unit = irq->r_irq_rid - 1; is = ATA_INL(ctlr->r_mem, AHCI_IS); } + /* Some controllers have edge triggered IS. */ + if (ctlr->quirks & AHCI_Q_EDGEIS) + ATA_OUTL(ctlr->r_mem, AHCI_IS, is); for (; unit < ctlr->channels; unit++) { if ((is & (1 << unit)) != 0 && (arg = ctlr->interrupt[unit].argument)) { - if (ctlr->quirks & AHCI_Q_EDGEIS) { - /* Some controller have edge triggered IS. */ - ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); - ctlr->interrupt[unit].function(arg); - } else { - /* but AHCI declares level triggered IS. */ ctlr->interrupt[unit].function(arg); - ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); - } } } + /* AHCI declares level triggered IS. */ + if (!(ctlr->quirks & AHCI_Q_EDGEIS)) + ATA_OUTL(ctlr->r_mem, AHCI_IS, is); } /* From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:36:13 2010 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 4D9BA1065698; Tue, 19 Jan 2010 13:36:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32E038FC1D; Tue, 19 Jan 2010 13:36:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDaD5t004321; Tue, 19 Jan 2010 13:36:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDaD1j004318; Tue, 19 Jan 2010 13:36:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191336.o0JDaD1j004318@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:36:13 +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: r202626 - stable/8/sys/dev/siis 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: Tue, 19 Jan 2010 13:36:13 -0000 Author: mav Date: Tue Jan 19 13:36:12 2010 New Revision: 202626 URL: http://svn.freebsd.org/changeset/base/202626 Log: MFC r201222: Usually these controllers are able to automatically decode command code to get required command protocol. But they have no idea about new commands, such as DATA SET MANAGEMENT (TRIM). As soon as this info any way provided by CAM, give controller specific instructions. Modified: stable/8/sys/dev/siis/siis.c stable/8/sys/dev/siis/siis.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Tue Jan 19 13:33:54 2010 (r202625) +++ stable/8/sys/dev/siis/siis.c Tue Jan 19 13:36:12 2010 (r202626) @@ -987,13 +987,29 @@ siis_execute_transaction(struct siis_slo ctp->protocol_override = 0; ctp->transfer_count = 0; /* Special handling for Soft Reset command. */ - if ((ccb->ccb_h.func_code == XPT_ATA_IO) && - (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) { - ctp->control |= htole16(SIIS_PRB_SOFT_RESET); + if (ccb->ccb_h.func_code == XPT_ATA_IO) { + if (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) { + ctp->control |= htole16(SIIS_PRB_SOFT_RESET); + } else { + ctp->control |= htole16(SIIS_PRB_PROTOCOL_OVERRIDE); + if (ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) { + ctp->protocol_override |= + htole16(SIIS_PRB_PROTO_NCQ); + } + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + ctp->protocol_override |= + htole16(SIIS_PRB_PROTO_READ); + } else + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) { + ctp->protocol_override |= + htole16(SIIS_PRB_PROTO_WRITE); + } + } } else if (ccb->ccb_h.func_code == XPT_SCSI_IO) { - if (ccb->ccb_h.flags & CAM_DIR_IN) + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) ctp->control |= htole16(SIIS_PRB_PACKET_READ); - if (ccb->ccb_h.flags & CAM_DIR_OUT) + else + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) ctp->control |= htole16(SIIS_PRB_PACKET_WRITE); } /* Setup the FIS for this request */ Modified: stable/8/sys/dev/siis/siis.h ============================================================================== --- stable/8/sys/dev/siis/siis.h Tue Jan 19 13:33:54 2010 (r202625) +++ stable/8/sys/dev/siis/siis.h Tue Jan 19 13:36:12 2010 (r202626) @@ -304,6 +304,12 @@ struct siis_cmd { #define SIIS_PRB_INTERRUPT_MASK 0x0040 #define SIIS_PRB_SOFT_RESET 0x0080 u_int16_t protocol_override; +#define SIIS_PRB_PROTO_PACKET 0x0001 +#define SIIS_PRB_PROTO_TCQ 0x0002 +#define SIIS_PRB_PROTO_NCQ 0x0004 +#define SIIS_PRB_PROTO_READ 0x0008 +#define SIIS_PRB_PROTO_WRITE 0x0010 +#define SIIS_PRB_PROTO_TRANSPARENT 0x0020 u_int32_t transfer_count; u_int8_t fis[24]; union { From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 14:42:12 2010 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 C8D4E106566B; Tue, 19 Jan 2010 14:42:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 5BF4C8FC17; Tue, 19 Jan 2010 14:42:11 +0000 (UTC) Received: from c220-239-227-214.carlnfd1.nsw.optusnet.com.au (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0JEg8Gk004687 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2010 01:42:10 +1100 Date: Wed, 20 Jan 2010 01:42:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "Andrey A. Chernov" In-Reply-To: <201001181344.o0IDiiEL079037@svn.freebsd.org> Message-ID: <20100120012639.B67517@delplex.bde.org> References: <201001181344.o0IDiiEL079037@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202572 - head/lib/libc/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: Tue, 19 Jan 2010 14:42:12 -0000 On Mon, 18 Jan 2010, Andrey A. Chernov wrote: > Log: > Double checking my commit I found that comment saying that > POSIX 2008 and XSI 7require strcoll() for opendir() is not true. > I can't find such requirement in POSIX 2008 and XSI 7. The comment was correct. It says that POSIX requires strcoll() for alphasort(), not for opendir(). Since opendir() is not alphasort(), and it wants plain ASCII sorting to support union file systems, it intentionally doesn't use either alphasort() or strcoll(). > So, back out that part of my commit, returning old strcmp(), and remove > this misleading comment. > > Modified: > head/lib/libc/gen/opendir.c > > Modified: head/lib/libc/gen/opendir.c > ============================================================================== > --- head/lib/libc/gen/opendir.c Mon Jan 18 13:38:45 2010 (r202571) > +++ head/lib/libc/gen/opendir.c Mon Jan 18 13:44:44 2010 (r202572) > @@ -92,15 +92,11 @@ __opendir2(const char *name, int flags) > return __opendir_common(fd, name, flags); > } > > -/* > - * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for > - * directory entries ordering. > - */ Was correct, but it could have been clearer by saying ", so opendir() uses this comparison function instead of alphasort()". > static int > -opendir_alphasort(const void *p1, const void *p2) > +opendir_sort(const void *p1, const void *p2) I forget what the old name was. Having alphasort in the name here was wrong 3 layers deep, since this is not alphasort(), and alphasort() is not an alpha sorting function -- it is a lexicographically-on-the-whole- character-set comparison function. fts's internal comparison function is named correctly -- fts_compar. > { > > - return (strcoll((*(const struct dirent **)p1)->d_name, > + return (strcmp((*(const struct dirent **)p1)->d_name, > (*(const struct dirent **)p2)->d_name)); Now correct (was broken by previous commit). > } > > @@ -253,7 +249,7 @@ __opendir_common(int fd, const char *nam > * This sort must be stable. > */ > mergesort(dpv, n, sizeof(*dpv), > - opendir_alphasort); > + opendir_sort); Correct modulo the name. > > dpv[n] = NULL; > xp = NULL; > New bug in a comment in scandir(): now has an extra blank line, due to partial removal. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 15:31:18 2010 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 7DCE21065679; Tue, 19 Jan 2010 15:31:18 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 634AA8FC15; Tue, 19 Jan 2010 15:31:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JFVIRp029722; Tue, 19 Jan 2010 15:31:18 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JFVI6n029716; Tue, 19 Jan 2010 15:31:18 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001191531.o0JFVI6n029716@svn.freebsd.org> From: Ed Schouten Date: Tue, 19 Jan 2010 15:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 15:31:18 -0000 Author: ed Date: Tue Jan 19 15:31:18 2010 New Revision: 202628 URL: http://svn.freebsd.org/changeset/base/202628 Log: Recommit r193732: Remove __gnu89_inline. Now that we use C99 almost everywhere, just use C99-style in the pmap code. Since the pmap code is the only consumer of __gnu89_inline, remove it from cdefs.h as well. Because the flag was only introduced 17 months ago, I don't expect any problems. Reviewed by: alc It was backed out, because it prevented us from building kernels using a 7.x compiler. Now that most people use 8.x, there is nothing that holds us back. Even if people run 7.x, they should be able to build a kernel if they run `make kernel-toolchain' or `make buildworld' first. Modified: head/Makefile head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/sys/cdefs.h Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jan 19 14:45:58 2010 (r202627) +++ head/Makefile Tue Jan 19 15:31:18 2010 (r202628) @@ -303,7 +303,7 @@ universe_${target}: .if !defined(MAKE_JUST_KERNELS) @echo ">> ${target} started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} buildworld \ + ${MAKE} ${JFLAG} kernel-toolchain \ TARGET=${target} \ > _.${target}.buildworld 2>&1 || \ (echo "${target} world failed," \ Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Jan 19 14:45:58 2010 (r202627) +++ head/sys/amd64/amd64/pmap.c Tue Jan 19 15:31:18 2010 (r202628) @@ -153,7 +153,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) -#define PMAP_INLINE __gnu89_inline +#define PMAP_INLINE extern inline #else #define PMAP_INLINE #endif Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Tue Jan 19 14:45:58 2010 (r202627) +++ head/sys/i386/i386/pmap.c Tue Jan 19 15:31:18 2010 (r202628) @@ -162,7 +162,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) -#define PMAP_INLINE __gnu89_inline +#define PMAP_INLINE extern inline #else #define PMAP_INLINE #endif Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue Jan 19 14:45:58 2010 (r202627) +++ head/sys/i386/xen/pmap.c Tue Jan 19 15:31:18 2010 (r202628) @@ -173,7 +173,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(PMAP_DIAGNOSTIC) -#define PMAP_INLINE __gnu89_inline +#define PMAP_INLINE extern inline #else #define PMAP_INLINE #endif Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Tue Jan 19 14:45:58 2010 (r202627) +++ head/sys/sys/cdefs.h Tue Jan 19 15:31:18 2010 (r202628) @@ -234,12 +234,6 @@ #define __always_inline #endif -#if __GNUC_PREREQ__(4, 2) /* actually 4.1.3 */ -#define __gnu89_inline __attribute__((__gnu_inline__)) __inline -#else -#define __gnu89_inline -#endif - #if __GNUC_PREREQ__(3, 1) #define __noinline __attribute__ ((__noinline__)) #else From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 15:34:16 2010 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 B2CB0106566C; Tue, 19 Jan 2010 15:34:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A37E08FC15; Tue, 19 Jan 2010 15:34:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JFYG45030443; Tue, 19 Jan 2010 15:34:16 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JFYGEs030441; Tue, 19 Jan 2010 15:34:16 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001191534.o0JFYGEs030441@svn.freebsd.org> From: Ed Schouten Date: Tue, 19 Jan 2010 15:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202629 - head 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: Tue, 19 Jan 2010 15:34:16 -0000 Author: ed Date: Tue Jan 19 15:34:16 2010 New Revision: 202629 URL: http://svn.freebsd.org/changeset/base/202629 Log: Back out the change to Makefile made in r202628. It was just a local modification to build the i386 and amd64 more quickly. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jan 19 15:31:18 2010 (r202628) +++ head/Makefile Tue Jan 19 15:34:16 2010 (r202629) @@ -303,7 +303,7 @@ universe_${target}: .if !defined(MAKE_JUST_KERNELS) @echo ">> ${target} started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} kernel-toolchain \ + ${MAKE} ${JFLAG} buildworld \ TARGET=${target} \ > _.${target}.buildworld 2>&1 || \ (echo "${target} world failed," \ From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 15:57:01 2010 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 77CFE1065670; Tue, 19 Jan 2010 15:57:01 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 29FA78FC16; Tue, 19 Jan 2010 15:57:00 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o0JFuv9j043631; Tue, 19 Jan 2010 08:56:57 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Scott Long In-Reply-To: <201001191531.o0JFVI6n029716@svn.freebsd.org> Date: Tue, 19 Jan 2010 08:56:57 -0700 Content-Transfer-Encoding: 7bit Message-Id: <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> To: Ed Schouten X-Mailer: Apple Mail (2.1076) X-Spam-Status: No, score=-8.2 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 15:57:01 -0000 On Jan 19, 2010, at 8:31 AM, Ed Schouten wrote: > Author: ed > Date: Tue Jan 19 15:31:18 2010 > New Revision: 202628 > URL: http://svn.freebsd.org/changeset/base/202628 > > Log: > Recommit r193732: > > Remove __gnu89_inline. > > Now that we use C99 almost everywhere, just use C99-style in the > pmap > code. Since the pmap code is the only consumer of __gnu89_inline, > remove > it from cdefs.h as well. Because the flag was only introduced 17 > months > ago, I don't expect any problems. > > Reviewed by: alc > > It was backed out, because it prevented us from building kernels > using a > 7.x compiler. Now that most people use 8.x, there is nothing that > holds > us back. Even if people run 7.x, they should be able to build a > kernel > if they run `make kernel-toolchain' or `make buildworld' first. Ok, so you've broken a legitimate piece of compatibility. What's the gain? Scott From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 15:59:22 2010 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 00FB5106568D; Tue, 19 Jan 2010 15:59:22 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 989DB8FC17; Tue, 19 Jan 2010 15:59:21 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 4D00A1CDEE; Tue, 19 Jan 2010 16:59:20 +0100 (CET) Date: Tue, 19 Jan 2010 16:59:20 +0100 From: Ed Schouten To: Scott Long Message-ID: <20100119155920.GU64905@hoeg.nl> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AGgD4W3rQzQsN0LU" Content-Disposition: inline In-Reply-To: <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.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: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 15:59:22 -0000 --AGgD4W3rQzQsN0LU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Scott, * Scott Long wrote: > Ok, so you've broken a legitimate piece of compatibility. What's the > gain? That we no longer have a blend of GNU and ISO C inline throughout our entire source tree, making the code more accessible for alternative compilers. --=20 Ed Schouten WWW: http://80386.nl/ --AGgD4W3rQzQsN0LU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktV1tgACgkQ52SDGA2eCwWFcgCfQ5IXStaZrI1HdFfZ92UHGPTS mygAnix7IT1A3TRzEq4Wk2Px8qVfDJ3W =wrXg -----END PGP SIGNATURE----- --AGgD4W3rQzQsN0LU-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 16:27:43 2010 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 71CFE1065676; Tue, 19 Jan 2010 16:27:43 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 265778FC0A; Tue, 19 Jan 2010 16:27:42 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o0JGRZ0X043796; Tue, 19 Jan 2010 09:27:35 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Scott Long In-Reply-To: <20100119155920.GU64905@hoeg.nl> Date: Tue, 19 Jan 2010 09:27:34 -0700 Content-Transfer-Encoding: 7bit Message-Id: <02BD244A-E287-46E0-B6A4-B6643CA7BA2E@samsco.org> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> <20100119155920.GU64905@hoeg.nl> To: Ed Schouten X-Mailer: Apple Mail (2.1076) X-Spam-Status: No, score=-8.0 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 16:27:43 -0000 On Jan 19, 2010, at 8:59 AM, Ed Schouten wrote: > Hi Scott, > > * Scott Long wrote: >> Ok, so you've broken a legitimate piece of compatibility. What's the >> gain? > > That we no longer have a blend of GNU and ISO C inline throughout our > entire source tree, making the code more accessible for alternative > compilers. > Which compilers? Is this a requirement for CLANG? Or is it just a nice-to-have clean-up? Scott From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 16:30:58 2010 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 04DA0106568D; Tue, 19 Jan 2010 16:30:58 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8051B8FC17; Tue, 19 Jan 2010 16:30:56 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA26524; Tue, 19 Jan 2010 18:30:54 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4B55DE3E.6050504@freebsd.org> Date: Tue, 19 Jan 2010 18:30:54 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ed Schouten References: <201001191531.o0JFVI6n029716@svn.freebsd.org> In-Reply-To: <201001191531.o0JFVI6n029716@svn.freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 16:30:58 -0000 on 19/01/2010 17:31 Ed Schouten said the following: > It was backed out, because it prevented us from building kernels using a > 7.x compiler. Ed, could you please clarify this part? It seems that we have the same compiler in 7/8/9. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 16:35:29 2010 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 C3AA4106566B; Tue, 19 Jan 2010 16:35:29 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 782668FC13; Tue, 19 Jan 2010 16:35:29 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id E290C1CE5E; Tue, 19 Jan 2010 17:35:28 +0100 (CET) Date: Tue, 19 Jan 2010 17:35:28 +0100 From: Ed Schouten To: Scott Long Message-ID: <20100119163528.GV64905@hoeg.nl> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> <20100119155920.GU64905@hoeg.nl> <02BD244A-E287-46E0-B6A4-B6643CA7BA2E@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OEHaWX2QSImgzVur" Content-Disposition: inline In-Reply-To: <02BD244A-E287-46E0-B6A4-B6643CA7BA2E@samsco.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: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 16:35:30 -0000 --OEHaWX2QSImgzVur Content-Type: multipart/mixed; boundary="iWGX19zdMYUyUiWh" Content-Disposition: inline --iWGX19zdMYUyUiWh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Scott Long wrote: > Which compilers? Is this a requirement for CLANG? Or is it just a > nice-to-have clean-up? Clang's support for the gnu89 inline semantics works sometimes, while there have been many regressions over time where fixes related to the ISO C99 inlining broke the GNU semantics. I agreed with other people back in June last year that we should just commit this after releasing 8.0, since our policy has always been to support an upgrade from one major to another, not skipping one in between. If there are such strong feelings about this, we could just commit the attached patch, which brings us the best of both worlds. It uses the C99 keywords when compilers are intelligent enough to do so, but falls back to GNU-style inlining in cases where it has to do this. --=20 Ed Schouten WWW: http://80386.nl/ --iWGX19zdMYUyUiWh Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pmap.diff" Content-Transfer-Encoding: quoted-printable Index: sys/i386/i386/pmap.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/i386/i386/pmap.c (revision 202629) +++ sys/i386/i386/pmap.c (working copy) @@ -162,7 +162,11 @@ #endif =20 #if !defined(DIAGNOSTIC) +#ifdef __GNUC_GNU_INLINE__ +#define PMAP_INLINE inline +#else #define PMAP_INLINE extern inline +#endif #else #define PMAP_INLINE #endif Index: sys/i386/xen/pmap.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/i386/xen/pmap.c (revision 202629) +++ sys/i386/xen/pmap.c (working copy) @@ -173,7 +173,11 @@ #endif =20 #if !defined(PMAP_DIAGNOSTIC) +#ifdef __GNUC_GNU_INLINE__ +#define PMAP_INLINE inline +#else #define PMAP_INLINE extern inline +#endif #else #define PMAP_INLINE #endif Index: sys/amd64/amd64/pmap.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/amd64/amd64/pmap.c (revision 202629) +++ sys/amd64/amd64/pmap.c (working copy) @@ -153,7 +153,11 @@ #endif =20 #if !defined(DIAGNOSTIC) +#ifdef __GNUC_GNU_INLINE__ +#define PMAP_INLINE inline +#else #define PMAP_INLINE extern inline +#endif #else #define PMAP_INLINE #endif --iWGX19zdMYUyUiWh-- --OEHaWX2QSImgzVur Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktV31AACgkQ52SDGA2eCwVjJgCeIzBaF2qttF+X59RdalMz7iqY jw0AoIE1/YQ7efHHfb68B7hqLUJf5LSm =2uNG -----END PGP SIGNATURE----- --OEHaWX2QSImgzVur-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 16:37:10 2010 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 4D5651065670; Tue, 19 Jan 2010 16:37:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 1540C8FC23; Tue, 19 Jan 2010 16:37:10 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 7F76E1CED6; Tue, 19 Jan 2010 17:37:09 +0100 (CET) Date: Tue, 19 Jan 2010 17:37:09 +0100 From: Ed Schouten To: Andriy Gapon Message-ID: <20100119163709.GW64905@hoeg.nl> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r0wErS0FX4g8JKWD" Content-Disposition: inline In-Reply-To: <4B55DE3E.6050504@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: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 16:37:10 -0000 --r0wErS0FX4g8JKWD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Andriy, * Andriy Gapon wrote: > could you please clarify this part? > It seems that we have the same compiler in 7/8/9. Well, not entirely. They do share the same version number, but back in March last year, das@ backported ISO C99 inlining from a GPLv2 licensed snapshot of GCC 4.2: http://svn.freebsd.org/viewvc/base?view=3Drevision&revision=3D189824 This patch has never been merged back to 7.x. --=20 Ed Schouten WWW: http://80386.nl/ --r0wErS0FX4g8JKWD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktV37UACgkQ52SDGA2eCwUdawCfc0LvDXDNvgiU0YlbqXJNEBbu zj0An1x2tqujg+m+wN40iZNX3S7tuMom =1EJs -----END PGP SIGNATURE----- --r0wErS0FX4g8JKWD-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 16:42:55 2010 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 70417106566C; Tue, 19 Jan 2010 16:42:55 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 2F69E8FC1F; Tue, 19 Jan 2010 16:42:54 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 3C6D31FFC22; Tue, 19 Jan 2010 16:42:54 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 17EE8844BD; Tue, 19 Jan 2010 17:42:54 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Scott Long References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> Date: Tue, 19 Jan 2010 17:42:54 +0100 In-Reply-To: <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> (Scott Long's message of "Tue, 19 Jan 2010 08:56:57 -0700") Message-ID: <863a22dp0x.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ed Schouten Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 16:42:55 -0000 Scott Long writes: > Ok, so you've broken a legitimate piece of compatibility. What's the > gain? GCC had inline functions long before they were added to the C standard. Inline functions were introduced in C99 with different semantics (and believe me, that was not a gratuitous decision). We use C99 semantics throughout the kernel, except in the pmap code, which Ed just modified, where we use GCC semantics. This means that in order to compile FreeBSD with a different compiler, that compiler must not only support both C99 and GCC semantics, but it must also support GCC's syntax - or something close to it - for specifying, on a per-function basis, which semantics apply. I say "on a per-function basis" because there are places in the kernel where pmap headers are included alongside headers that use C99 semantics, so you can't select inline semantics on a per-compilation- unit basis. To add insult to injury, GCC's syntax for specifying the precise manner in which GCC should violate the standard violates the standard... I haven't checked, but I believe that we can still build 8 / 9 kernels on 7 as long as we have a cross toolchain available (i.e. make buildworld, make toolchain or make kernel-toolchain before make buildkernel), so this really isn't a big issue. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 16:51:52 2010 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 83328106568D; Tue, 19 Jan 2010 16:51:52 +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 71FCA8FC0A; Tue, 19 Jan 2010 16:51:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JGpqFv049919; Tue, 19 Jan 2010 16:51:52 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JGpqlX049917; Tue, 19 Jan 2010 16:51:52 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001191651.o0JGpqlX049917@svn.freebsd.org> From: Christian Brueffer Date: Tue, 19 Jan 2010 16:51:52 +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: r202630 - stable/8/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: Tue, 19 Jan 2010 16:51:52 -0000 Author: brueffer Date: Tue Jan 19 16:51:51 2010 New Revision: 202630 URL: http://svn.freebsd.org/changeset/base/202630 Log: MFC: r201603 Fix a double free(). Modified: stable/8/lib/libc/rpc/getnetpath.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/rpc/getnetpath.c ============================================================================== --- stable/8/lib/libc/rpc/getnetpath.c Tue Jan 19 15:34:16 2010 (r202629) +++ stable/8/lib/libc/rpc/getnetpath.c Tue Jan 19 16:51:51 2010 (r202630) @@ -101,7 +101,7 @@ setnetpath() if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) { free(np_sessionp); syslog (LOG_ERR, "rpc: failed to open " NETCONFIG); - goto failed; + return (NULL); } np_sessionp->valid = NP_VALID; np_sessionp->ncp_list = NULL; From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 16:58:51 2010 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 35E341065676; Tue, 19 Jan 2010 16:58:51 +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 24F728FC1A; Tue, 19 Jan 2010 16:58:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JGwpFo051608; Tue, 19 Jan 2010 16:58:51 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JGwppk051606; Tue, 19 Jan 2010 16:58:51 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001191658.o0JGwppk051606@svn.freebsd.org> From: Christian Brueffer Date: Tue, 19 Jan 2010 16:58:51 +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: r202631 - stable/7/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: Tue, 19 Jan 2010 16:58:51 -0000 Author: brueffer Date: Tue Jan 19 16:58:50 2010 New Revision: 202631 URL: http://svn.freebsd.org/changeset/base/202631 Log: MFC: r201603 Fix a double free(). Modified: stable/7/lib/libc/rpc/getnetpath.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/rpc/getnetpath.c ============================================================================== --- stable/7/lib/libc/rpc/getnetpath.c Tue Jan 19 16:51:51 2010 (r202630) +++ stable/7/lib/libc/rpc/getnetpath.c Tue Jan 19 16:58:50 2010 (r202631) @@ -101,7 +101,7 @@ setnetpath() if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) { free(np_sessionp); syslog (LOG_ERR, "rpc: failed to open " NETCONFIG); - goto failed; + return (NULL); } np_sessionp->valid = NP_VALID; np_sessionp->ncp_list = NULL; From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 17:01:48 2010 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 2F2C3106566B; Tue, 19 Jan 2010 17:01:48 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0C4AD8FC0C; Tue, 19 Jan 2010 17:01:46 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA26907; Tue, 19 Jan 2010 19:01:44 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4B55E577.10105@freebsd.org> Date: Tue, 19 Jan 2010 19:01:43 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ed Schouten References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> <20100119163709.GW64905@hoeg.nl> In-Reply-To: <20100119163709.GW64905@hoeg.nl> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 17:01:48 -0000 on 19/01/2010 18:37 Ed Schouten said the following: > Hi Andriy, > > * Andriy Gapon wrote: >> could you please clarify this part? >> It seems that we have the same compiler in 7/8/9. > > Well, not entirely. They do share the same version number, but back in > March last year, das@ backported ISO C99 inlining from a GPLv2 licensed > snapshot of GCC 4.2: > > http://svn.freebsd.org/viewvc/base?view=revision&revision=189824 > > This patch has never been merged back to 7.x. So perhaps that should be done as well? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 17:02:05 2010 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 D9205106568F; Tue, 19 Jan 2010 17:02:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A9BA58FC19; Tue, 19 Jan 2010 17:02:05 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3C5A246B1A; Tue, 19 Jan 2010 12:02:05 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id B2CDB8A025; Tue, 19 Jan 2010 12:02:03 -0500 (EST) From: John Baldwin To: Alexander Motin Date: Tue, 19 Jan 2010 10:44:53 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091231; KDE/4.3.1; amd64; ; ) References: <201001160755.o0G7tkUV033288@svn.freebsd.org> In-Reply-To: <201001160755.o0G7tkUV033288@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201001191044.53487.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 19 Jan 2010 12:02:03 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r202431 - stable/8/sys/dev/ahci 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: Tue, 19 Jan 2010 17:02:06 -0000 On Saturday 16 January 2010 2:55:46 am Alexander Motin wrote: > Author: mav > Date: Sat Jan 16 07:55:46 2010 > New Revision: 202431 > URL: http://svn.freebsd.org/changeset/base/202431 > > Log: > Partially revert r202428. There is no bus_describe_intr() on RELENG_8. I can MFC it. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 17:04:01 2010 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 0D4D7106566B; Tue, 19 Jan 2010 17:04:01 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id C82E78FC0A; Tue, 19 Jan 2010 17:04:00 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 417451CE5E; Tue, 19 Jan 2010 18:04:00 +0100 (CET) Date: Tue, 19 Jan 2010 18:04:00 +0100 From: Ed Schouten To: Andriy Gapon Message-ID: <20100119170400.GY64905@hoeg.nl> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> <20100119163709.GW64905@hoeg.nl> <4B55E577.10105@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HccAQglVq4ohk2lm" Content-Disposition: inline In-Reply-To: <4B55E577.10105@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: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 17:04:01 -0000 --HccAQglVq4ohk2lm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Andriy Gapon wrote: > So perhaps that should be done as well? Well, I'd say it would be a useful thing to MFC, but I can't really judge how big the impact is, like whether it breaks anything in Ports. --=20 Ed Schouten WWW: http://80386.nl/ --HccAQglVq4ohk2lm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktV5gAACgkQ52SDGA2eCwXNPgCffGZTLYogfb172wgAsMEcX5eX sgUAnj/zNHbFxwS6p7hi+RL5GcDITiBE =OULS -----END PGP SIGNATURE----- --HccAQglVq4ohk2lm-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 17:09:18 2010 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 827CC106568B; Tue, 19 Jan 2010 17:09:18 +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 67BF88FC19; Tue, 19 Jan 2010 17:09:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JH9It6053983; Tue, 19 Jan 2010 17:09:18 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JH9Ixi053970; Tue, 19 Jan 2010 17:09:18 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001191709.o0JH9Ixi053970@svn.freebsd.org> From: Christian Brueffer Date: Tue, 19 Jan 2010 17:09:18 +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: r202632 - in stable/8/lib/libc: net sys 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: Tue, 19 Jan 2010 17:09:18 -0000 Author: brueffer Date: Tue Jan 19 17:09:18 2010 New Revision: 202632 URL: http://svn.freebsd.org/changeset/base/202632 Log: MFC: r202176 Miscellaneous mdoc, spelling and inconsistency fixes. Modified: stable/8/lib/libc/net/sctp_bindx.3 stable/8/lib/libc/net/sctp_connectx.3 stable/8/lib/libc/net/sctp_getaddrlen.3 stable/8/lib/libc/net/sctp_getassocid.3 stable/8/lib/libc/net/sctp_getpaddrs.3 stable/8/lib/libc/net/sctp_opt_info.3 stable/8/lib/libc/net/sctp_recvmsg.3 stable/8/lib/libc/net/sctp_send.3 stable/8/lib/libc/net/sctp_sendmsg.3 stable/8/lib/libc/sys/sctp_generic_recvmsg.2 stable/8/lib/libc/sys/sctp_generic_sendmsg.2 stable/8/lib/libc/sys/sctp_peeloff.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/net/sctp_bindx.3 ============================================================================== --- stable/8/lib/libc/net/sctp_bindx.3 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/net/sctp_bindx.3 Tue Jan 19 17:09:18 2010 (r202632) @@ -90,7 +90,7 @@ The call returns 0 on success and -1 upo .Sh ERRORS The .Fn sctp_bindx -can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL This value is returned if the Modified: stable/8/lib/libc/net/sctp_connectx.3 ============================================================================== --- stable/8/lib/libc/net/sctp_connectx.3 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/net/sctp_connectx.3 Tue Jan 19 17:09:18 2010 (r202632) @@ -44,7 +44,7 @@ .In sys/socket.h .In netinet/sctp.h .Ft int -.Fn sctp_connectx "int s" "struct sockaddr *" "int addrcnt" "sctp_assoc_t *" +.Fn sctp_connectx "int sd" "struct sockaddr *addrs" "int addrcnt" "sctp_assoc_t *id" .Sh DESCRIPTION The .Fn sctp_connectx @@ -75,7 +75,7 @@ the extra addresses sent in the call will be silently discarded from the association. On successful completion the provided -.Fa "sctp_assoc_t *" +.Fa id will be filled in with the association identification of the newly forming association. @@ -84,7 +84,7 @@ The call returns 0 on success and -1 upo .Sh ERRORS The .Fn sctp_connectx -can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL An address listed has an invalid family or no Modified: stable/8/lib/libc/net/sctp_getaddrlen.3 ============================================================================== --- stable/8/lib/libc/net/sctp_getaddrlen.3 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/net/sctp_getaddrlen.3 Tue Jan 19 17:09:18 2010 (r202632) @@ -76,7 +76,7 @@ system expects for the specific address .Sh ERRORS The .Fn sctp_getaddrlen -function can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL The address family specified does NOT exist. Modified: stable/8/lib/libc/net/sctp_getassocid.3 ============================================================================== --- stable/8/lib/libc/net/sctp_getassocid.3 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/net/sctp_getassocid.3 Tue Jan 19 17:09:18 2010 (r202632) @@ -58,7 +58,7 @@ The call returns the association id upon .Sh ERRORS The .Fn sctp_getassocid -function can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er ENOENT The address does not have an association setup to it. Modified: stable/8/lib/libc/net/sctp_getpaddrs.3 ============================================================================== --- stable/8/lib/libc/net/sctp_getpaddrs.3 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/net/sctp_getpaddrs.3 Tue Jan 19 17:09:18 2010 (r202632) @@ -33,7 +33,7 @@ .\" $FreeBSD$ .\" .Dd December 15, 2006 -.Dt SCTP_GETPADDR 3 +.Dt SCTP_GETPADDRS 3 .Os .Sh NAME .Nm sctp_getpaddrs , @@ -64,7 +64,7 @@ array of socket addresses returned in th .Fa addrs upon success. .Pp -After the caller is through the function +After the caller is finished, the function .Fn sctp_freepaddrs or .Fn sctp_freeladdrs @@ -76,7 +76,7 @@ the number of addresses returned in .Fa addrs upon success. .Sh ERRORS -The functions can return the following errors. +The functions can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL An address listed has an invalid family or no Modified: stable/8/lib/libc/net/sctp_opt_info.3 ============================================================================== --- stable/8/lib/libc/net/sctp_opt_info.3 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/net/sctp_opt_info.3 Tue Jan 19 17:09:18 2010 (r202632) @@ -45,7 +45,7 @@ .In sys/socket.h .In netinet/sctp.h .Ft int -.Fn sctp_opt_info "int s" "sctp_assoc_t" "int opt" "void *arg" "socklen_t *size" +.Fn sctp_opt_info "int sd" "sctp_assoc_t id" "int opt" "void *arg" "socklen_t *size" .Sh DESCRIPTION The .Fn sctp_opt_info @@ -90,7 +90,7 @@ socket options. .Sh ERRORS The .Fn sctp_opt_info -function can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL The argument Modified: stable/8/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- stable/8/lib/libc/net/sctp_recvmsg.3 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/net/sctp_recvmsg.3 Tue Jan 19 17:09:18 2010 (r202632) @@ -160,7 +160,7 @@ struct sctp_sndrcvinfo { .Pp The .Fa sinfo->sinfo_ppid -is an opaque 32 bit value that is passed transparently +field is an opaque 32 bit value that is passed transparently through the stack from the peer endpoint. Note that the stack passes this value without regard to byte order. @@ -180,12 +180,13 @@ as soon as possible. When this flag is absent the message was delivered in order within the stream it was received. .Pp +The .Fa sinfo->sinfo_stream -is the SCTP stream that the message was received on. +field is the SCTP stream that the message was received on. Streams in SCTP are reliable (or partially reliable) flows of ordered messages. .Pp -The +The .Fa sinfo->sinfo_context field is used only if the local application set an association level context with the @@ -197,7 +198,7 @@ association. .Pp The .Fa sinfo->sinfo_ssn -will hold the stream sequence number assigned +field will hold the stream sequence number assigned by the peer endpoint if the message is .Em not unordered. @@ -205,7 +206,7 @@ For unordered messages this field holds .Pp The .Fa sinfo->sinfo_tsn -holds a transport sequence number (TSN) that was assigned +field holds a transport sequence number (TSN) that was assigned to this message by the peer endpoint. For messages that fit in or less than the path MTU this will be the only TSN assigned. @@ -215,12 +216,12 @@ message. .Pp The .Fa sinfo->sinfo_cumtsn -holds the current cumulative acknowledgment point of +field holds the current cumulative acknowledgment point of the transport association. Note that this may be larger or smaller than the TSN assigned to the message itself. .Pp -The +The .Fa sinfo->sinfo_assoc_id is the unique association identification that was assigned to the association. @@ -232,10 +233,10 @@ setting various socket options on the sp (see .Xr sctp 4 ) . .Pp -The +The .Fa sinfo->info_timetolive field is not used by -.Fa sctp_recvmsg . +.Fn sctp_recvmsg . .Sh RETURN VALUES The call returns the number of characters sent, or -1 if an error occurred. Modified: stable/8/lib/libc/net/sctp_send.3 ============================================================================== --- stable/8/lib/libc/net/sctp_send.3 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/net/sctp_send.3 Tue Jan 19 17:09:18 2010 (r202632) @@ -294,7 +294,7 @@ if an error occurred. The .Fn sctp_send system call -fail if: +fails if: .Bl -tag -width Er .It Bq Er EBADF An invalid descriptor was specified. Modified: stable/8/lib/libc/net/sctp_sendmsg.3 ============================================================================== --- stable/8/lib/libc/net/sctp_sendmsg.3 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/net/sctp_sendmsg.3 Tue Jan 19 17:09:18 2010 (r202632) @@ -271,7 +271,7 @@ if an error occurred. The .Fn sctp_sendmsg system call -fail if: +fails if: .Bl -tag -width Er .It Bq Er EBADF An invalid descriptor was specified. @@ -324,7 +324,7 @@ is not connected and is a one-to-one sty .Xr sendmsg 3 , .Xr sctp 4 .Sh BUGS -Because in the one-to-many style socket the +Because in the one-to-many style socket .Fn sctp_sendmsg or .Fn sctp_sendmsgx Modified: stable/8/lib/libc/sys/sctp_generic_recvmsg.2 ============================================================================== --- stable/8/lib/libc/sys/sctp_generic_recvmsg.2 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/sys/sctp_generic_recvmsg.2 Tue Jan 19 17:09:18 2010 (r202632) @@ -36,7 +36,7 @@ .Os .Sh NAME .Nm sctp_generic_recvmsg -.Nd receive data from a peer. +.Nd receive data from a peer .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -46,16 +46,20 @@ .Ft int .Fn sctp_generic_recvmsg "int s" "struct iovec *iov" "int iovlen" "struct sockaddr *from" "socklen_t *fromlen" "struct sctp_sndrcvinfo *sinfo" "int *msgflags" .Sh DESCRIPTION -The .Fn sctp_generic_recvmsg -is the true system calls used by the -.Fn sctp_recvmsg -function call. This call is more efficient since it is a -true system calls but it is specific to FreeBSD and -can be expected NOT to be present on any other Operating -System. For detailed useage please see either the -.Fn sctp_recvmsg -function call. +is the true system call used by the +.Xr sctp_recvmsg 3 +function call. +This call is more efficient since it is a +true system call but it is specific to +.Fx +and can be expected +.Em not +to be present on any other operating +system. +For detailed usage please see the +.Xr sctp_recvmsg 3 +function call. .Sh RETURN VALUES The call returns the number of bytes read on success and -1 upon failure. .Sh ERRORS Modified: stable/8/lib/libc/sys/sctp_generic_sendmsg.2 ============================================================================== --- stable/8/lib/libc/sys/sctp_generic_sendmsg.2 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/sys/sctp_generic_sendmsg.2 Tue Jan 19 17:09:18 2010 (r202632) @@ -37,7 +37,7 @@ .Sh NAME .Nm sctp_generic_sendmsg .Nm sctp_generic_sendmsg_iov -.Nd send data to a peer. +.Nd send data to a peer .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -49,21 +49,25 @@ .Ft int .Fn sctp_generic_sendmsg_iov "int s" "struct iovec *iov" "int iovlen" "struct sockaddr *to" "struct sctp_sndrcvinfo *sinfo" "int flags" .Sh DESCRIPTION -The .Fn sctp_generic_sendmsg and .Fn sctp_generic_sendmsg_iov are the true system calls used by the -.Fn sctp_sendmsg +.Xr sctp_sendmsg 3 and -.Fn sctp_send -function calls. These are more efficient since they are -true system calls but they are specific to FreeBSD and -can be expected NOT to be present on any other Operating -System. For detailed useage please see either the -.Fn sctp_send +.Xr sctp_send 3 +function calls. +These are more efficient since they are +true system calls but they are specific to +.Fx +and can be expected +.Em not +to be present on any other operating +system. +For detailed usage please see either the +.Xr sctp_send 3 or -.Fn sctp_sendmsg +.Xr sctp_sendmsg 3 function calls. .Sh RETURN VALUES The call returns the number of bytes written on success and -1 upon failure. Modified: stable/8/lib/libc/sys/sctp_peeloff.2 ============================================================================== --- stable/8/lib/libc/sys/sctp_peeloff.2 Tue Jan 19 16:58:50 2010 (r202631) +++ stable/8/lib/libc/sys/sctp_peeloff.2 Tue Jan 19 17:09:18 2010 (r202632) @@ -36,7 +36,7 @@ .Os .Sh NAME .Nm sctp_peeloff -.Nd detach an association from a one-to-many socket to its on fd +.Nd detach an association from a one-to-many socket to its own fd .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -58,7 +58,7 @@ upon success. .Sh ERRORS The .Fn sctp_peeloff -can return the following errors. +system call can return the following errors: .Bl -tag -width Er .It Bq Er ENOTCONN The From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 17:10:35 2010 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 2659E1065670; Tue, 19 Jan 2010 17:10: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 13FC98FC1D; Tue, 19 Jan 2010 17:10:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JHAYMI054342; Tue, 19 Jan 2010 17:10:34 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JHAYdp054328; Tue, 19 Jan 2010 17:10:34 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001191710.o0JHAYdp054328@svn.freebsd.org> From: Christian Brueffer Date: Tue, 19 Jan 2010 17:10:34 +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: r202633 - in stable/7/lib/libc: net sys 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: Tue, 19 Jan 2010 17:10:35 -0000 Author: brueffer Date: Tue Jan 19 17:10:34 2010 New Revision: 202633 URL: http://svn.freebsd.org/changeset/base/202633 Log: MFC: r202176 Miscellaneous mdoc, spelling and inconsistency fixes. Modified: stable/7/lib/libc/net/sctp_bindx.3 stable/7/lib/libc/net/sctp_connectx.3 stable/7/lib/libc/net/sctp_getaddrlen.3 stable/7/lib/libc/net/sctp_getassocid.3 stable/7/lib/libc/net/sctp_getpaddrs.3 stable/7/lib/libc/net/sctp_opt_info.3 stable/7/lib/libc/net/sctp_recvmsg.3 stable/7/lib/libc/net/sctp_send.3 stable/7/lib/libc/net/sctp_sendmsg.3 stable/7/lib/libc/sys/sctp_generic_recvmsg.2 stable/7/lib/libc/sys/sctp_generic_sendmsg.2 stable/7/lib/libc/sys/sctp_peeloff.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/net/sctp_bindx.3 ============================================================================== --- stable/7/lib/libc/net/sctp_bindx.3 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/net/sctp_bindx.3 Tue Jan 19 17:10:34 2010 (r202633) @@ -90,7 +90,7 @@ The call returns 0 on success and -1 upo .Sh ERRORS The .Fn sctp_bindx -can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL This value is returned if the Modified: stable/7/lib/libc/net/sctp_connectx.3 ============================================================================== --- stable/7/lib/libc/net/sctp_connectx.3 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/net/sctp_connectx.3 Tue Jan 19 17:10:34 2010 (r202633) @@ -44,7 +44,7 @@ .In sys/socket.h .In netinet/sctp.h .Ft int -.Fn sctp_connectx "int s" "struct sockaddr *" "int addrcnt" "sctp_assoc_t *" +.Fn sctp_connectx "int sd" "struct sockaddr *addrs" "int addrcnt" "sctp_assoc_t *id" .Sh DESCRIPTION The .Fn sctp_connectx @@ -75,7 +75,7 @@ the extra addresses sent in the call will be silently discarded from the association. On successful completion the provided -.Fa "sctp_assoc_t *" +.Fa id will be filled in with the association identification of the newly forming association. @@ -84,7 +84,7 @@ The call returns 0 on success and -1 upo .Sh ERRORS The .Fn sctp_connectx -can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL An address listed has an invalid family or no Modified: stable/7/lib/libc/net/sctp_getaddrlen.3 ============================================================================== --- stable/7/lib/libc/net/sctp_getaddrlen.3 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/net/sctp_getaddrlen.3 Tue Jan 19 17:10:34 2010 (r202633) @@ -76,7 +76,7 @@ system expects for the specific address .Sh ERRORS The .Fn sctp_getaddrlen -function can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL The address family specified does NOT exist. Modified: stable/7/lib/libc/net/sctp_getassocid.3 ============================================================================== --- stable/7/lib/libc/net/sctp_getassocid.3 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/net/sctp_getassocid.3 Tue Jan 19 17:10:34 2010 (r202633) @@ -58,7 +58,7 @@ The call returns the association id upon .Sh ERRORS The .Fn sctp_getassocid -function can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er ENOENT The address does not have an association setup to it. Modified: stable/7/lib/libc/net/sctp_getpaddrs.3 ============================================================================== --- stable/7/lib/libc/net/sctp_getpaddrs.3 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/net/sctp_getpaddrs.3 Tue Jan 19 17:10:34 2010 (r202633) @@ -33,7 +33,7 @@ .\" $FreeBSD$ .\" .Dd December 15, 2006 -.Dt SCTP_GETPADDR 3 +.Dt SCTP_GETPADDRS 3 .Os .Sh NAME .Nm sctp_getpaddrs , @@ -64,7 +64,7 @@ array of socket addresses returned in th .Fa addrs upon success. .Pp -After the caller is through the function +After the caller is finished, the function .Fn sctp_freepaddrs or .Fn sctp_freeladdrs @@ -76,7 +76,7 @@ the number of addresses returned in .Fa addrs upon success. .Sh ERRORS -The functions can return the following errors. +The functions can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL An address listed has an invalid family or no Modified: stable/7/lib/libc/net/sctp_opt_info.3 ============================================================================== --- stable/7/lib/libc/net/sctp_opt_info.3 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/net/sctp_opt_info.3 Tue Jan 19 17:10:34 2010 (r202633) @@ -45,7 +45,7 @@ .In sys/socket.h .In netinet/sctp.h .Ft int -.Fn sctp_opt_info "int s" "sctp_assoc_t" "int opt" "void *arg" "socklen_t *size" +.Fn sctp_opt_info "int sd" "sctp_assoc_t id" "int opt" "void *arg" "socklen_t *size" .Sh DESCRIPTION The .Fn sctp_opt_info @@ -90,7 +90,7 @@ socket options. .Sh ERRORS The .Fn sctp_opt_info -function can return the following errors. +function can return the following errors: .Bl -tag -width Er .It Bq Er EINVAL The argument Modified: stable/7/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- stable/7/lib/libc/net/sctp_recvmsg.3 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/net/sctp_recvmsg.3 Tue Jan 19 17:10:34 2010 (r202633) @@ -160,7 +160,7 @@ struct sctp_sndrcvinfo { .Pp The .Fa sinfo->sinfo_ppid -is an opaque 32 bit value that is passed transparently +field is an opaque 32 bit value that is passed transparently through the stack from the peer endpoint. Note that the stack passes this value without regard to byte order. @@ -180,12 +180,13 @@ as soon as possible. When this flag is absent the message was delivered in order within the stream it was received. .Pp +The .Fa sinfo->sinfo_stream -is the SCTP stream that the message was received on. +field is the SCTP stream that the message was received on. Streams in SCTP are reliable (or partially reliable) flows of ordered messages. .Pp -The +The .Fa sinfo->sinfo_context field is used only if the local application set an association level context with the @@ -197,7 +198,7 @@ association. .Pp The .Fa sinfo->sinfo_ssn -will hold the stream sequence number assigned +field will hold the stream sequence number assigned by the peer endpoint if the message is .Em not unordered. @@ -205,7 +206,7 @@ For unordered messages this field holds .Pp The .Fa sinfo->sinfo_tsn -holds a transport sequence number (TSN) that was assigned +field holds a transport sequence number (TSN) that was assigned to this message by the peer endpoint. For messages that fit in or less than the path MTU this will be the only TSN assigned. @@ -215,12 +216,12 @@ message. .Pp The .Fa sinfo->sinfo_cumtsn -holds the current cumulative acknowledgment point of +field holds the current cumulative acknowledgment point of the transport association. Note that this may be larger or smaller than the TSN assigned to the message itself. .Pp -The +The .Fa sinfo->sinfo_assoc_id is the unique association identification that was assigned to the association. @@ -232,10 +233,10 @@ setting various socket options on the sp (see .Xr sctp 4 ) . .Pp -The +The .Fa sinfo->info_timetolive field is not used by -.Fa sctp_recvmsg . +.Fn sctp_recvmsg . .Sh RETURN VALUES The call returns the number of characters sent, or -1 if an error occurred. Modified: stable/7/lib/libc/net/sctp_send.3 ============================================================================== --- stable/7/lib/libc/net/sctp_send.3 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/net/sctp_send.3 Tue Jan 19 17:10:34 2010 (r202633) @@ -294,7 +294,7 @@ if an error occurred. The .Fn sctp_send system call -fail if: +fails if: .Bl -tag -width Er .It Bq Er EBADF An invalid descriptor was specified. Modified: stable/7/lib/libc/net/sctp_sendmsg.3 ============================================================================== --- stable/7/lib/libc/net/sctp_sendmsg.3 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/net/sctp_sendmsg.3 Tue Jan 19 17:10:34 2010 (r202633) @@ -271,7 +271,7 @@ if an error occurred. The .Fn sctp_sendmsg system call -fail if: +fails if: .Bl -tag -width Er .It Bq Er EBADF An invalid descriptor was specified. @@ -324,7 +324,7 @@ is not connected and is a one-to-one sty .Xr sendmsg 3 , .Xr sctp 4 .Sh BUGS -Because in the one-to-many style socket the +Because in the one-to-many style socket .Fn sctp_sendmsg or .Fn sctp_sendmsgx Modified: stable/7/lib/libc/sys/sctp_generic_recvmsg.2 ============================================================================== --- stable/7/lib/libc/sys/sctp_generic_recvmsg.2 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/sys/sctp_generic_recvmsg.2 Tue Jan 19 17:10:34 2010 (r202633) @@ -36,7 +36,7 @@ .Os .Sh NAME .Nm sctp_generic_recvmsg -.Nd receive data from a peer. +.Nd receive data from a peer .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -46,16 +46,20 @@ .Ft int .Fn sctp_generic_recvmsg "int s" "struct iovec *iov" "int iovlen" "struct sockaddr *from" "socklen_t *fromlen" "struct sctp_sndrcvinfo *sinfo" "int *msgflags" .Sh DESCRIPTION -The .Fn sctp_generic_recvmsg -is the true system calls used by the -.Fn sctp_recvmsg -function call. This call is more efficient since it is a -true system calls but it is specific to FreeBSD and -can be expected NOT to be present on any other Operating -System. For detailed useage please see either the -.Fn sctp_recvmsg -function call. +is the true system call used by the +.Xr sctp_recvmsg 3 +function call. +This call is more efficient since it is a +true system call but it is specific to +.Fx +and can be expected +.Em not +to be present on any other operating +system. +For detailed usage please see the +.Xr sctp_recvmsg 3 +function call. .Sh RETURN VALUES The call returns the number of bytes read on success and -1 upon failure. .Sh ERRORS Modified: stable/7/lib/libc/sys/sctp_generic_sendmsg.2 ============================================================================== --- stable/7/lib/libc/sys/sctp_generic_sendmsg.2 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/sys/sctp_generic_sendmsg.2 Tue Jan 19 17:10:34 2010 (r202633) @@ -37,7 +37,7 @@ .Sh NAME .Nm sctp_generic_sendmsg .Nm sctp_generic_sendmsg_iov -.Nd send data to a peer. +.Nd send data to a peer .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -50,21 +50,25 @@ .Fn sctp_generic_sendmsg_iov "int s" "struct iovec *iov" "int iovlen" "struct sockaddr *to" "struct sctp_sndrcvinfo *sinfo" "int flags" .Sh DESCRIPTION -The .Fn sctp_generic_sendmsg and .Fn sctp_generic_sendmsg_iov are the true system calls used by the -.Fn sctp_sendmsg +.Xr sctp_sendmsg 3 and -.Fn sctp_send -function calls. These are more efficient since they are -true system calls but they are specific to FreeBSD and -can be expected NOT to be present on any other Operating -System. For detailed useage please see either the -.Fn sctp_send +.Xr sctp_send 3 +function calls. +These are more efficient since they are +true system calls but they are specific to +.Fx +and can be expected +.Em not +to be present on any other operating +system. +For detailed usage please see either the +.Xr sctp_send 3 or -.Fn sctp_sendmsg +.Xr sctp_sendmsg 3 function calls. .Sh RETURN VALUES The call returns the number of bytes written on success and -1 upon failure. Modified: stable/7/lib/libc/sys/sctp_peeloff.2 ============================================================================== --- stable/7/lib/libc/sys/sctp_peeloff.2 Tue Jan 19 17:09:18 2010 (r202632) +++ stable/7/lib/libc/sys/sctp_peeloff.2 Tue Jan 19 17:10:34 2010 (r202633) @@ -36,7 +36,7 @@ .Os .Sh NAME .Nm sctp_peeloff -.Nd detach an association from a one-to-many socket to its on fd +.Nd detach an association from a one-to-many socket to its own fd .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -58,7 +58,7 @@ upon success. .Sh ERRORS The .Fn sctp_peeloff -can return the following errors. +system call can return the following errors: .Bl -tag -width Er .It Bq Er ENOTCONN The From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 17:13:39 2010 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 EBE311065694; Tue, 19 Jan 2010 17:13:39 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id AF8EA8FC1B; Tue, 19 Jan 2010 17:13:38 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA27098; Tue, 19 Jan 2010 19:13:36 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4B55E840.2010602@freebsd.org> Date: Tue, 19 Jan 2010 19:13:36 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ed Schouten References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> <20100119163709.GW64905@hoeg.nl> <4B55E577.10105@freebsd.org> <20100119170400.GY64905@hoeg.nl> In-Reply-To: <20100119170400.GY64905@hoeg.nl> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Tue, 19 Jan 2010 17:13:40 -0000 on 19/01/2010 19:04 Ed Schouten said the following: > * Andriy Gapon wrote: >> So perhaps that should be done as well? > > Well, I'd say it would be a useful thing to MFC, but I can't really > judge how big the impact is, like whether it breaks anything in Ports. There should be some experience from back when it was originally committed. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 17:20:34 2010 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 C117E1065670; Tue, 19 Jan 2010 17:20: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 AF2C08FC14; Tue, 19 Jan 2010 17:20:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JHKYT7056556; Tue, 19 Jan 2010 17:20:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JHKYmh056541; Tue, 19 Jan 2010 17:20:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001191720.o0JHKYmh056541@svn.freebsd.org> From: John Baldwin Date: Tue, 19 Jan 2010 17:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202634 - in head/sys: amd64/conf arm/conf conf i386/conf mips/conf pc98/conf powerpc/conf sparc64/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: Tue, 19 Jan 2010 17:20:34 -0000 Author: jhb Date: Tue Jan 19 17:20:34 2010 New Revision: 202634 URL: http://svn.freebsd.org/changeset/base/202634 Log: Move the examples for the 'hints' and 'env' keywords from various GENERIC kernel configs into NOTES. Reviewed by: imp Modified: head/sys/amd64/conf/GENERIC head/sys/amd64/conf/XENHVM head/sys/arm/conf/CRB head/sys/arm/conf/EP80219 head/sys/arm/conf/GUMSTIX head/sys/arm/conf/IQ31244 head/sys/arm/conf/SIMICS head/sys/arm/conf/SKYEYE head/sys/conf/NOTES head/sys/i386/conf/GENERIC head/sys/mips/conf/QEMU head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/amd64/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -21,15 +21,6 @@ cpu HAMMER ident GENERIC -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler Modified: head/sys/amd64/conf/XENHVM ============================================================================== --- head/sys/amd64/conf/XENHVM Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/amd64/conf/XENHVM Tue Jan 19 17:20:34 2010 (r202634) @@ -21,15 +21,6 @@ cpu HAMMER ident XENHVM -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions MODULES_OVERRIDE="" Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/CRB Tue Jan 19 17:20:34 2010 (r202634) @@ -26,8 +26,6 @@ options KERNVIRTADDR=0xc0200000 # Used options COUNTS_PER_SEC=400000000 options STARTUP_PAGETABLE_ADDR=0x00000000 include "../xscale/i8134x/std.crb" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/EP80219 Tue Jan 19 17:20:34 2010 (r202634) @@ -26,8 +26,6 @@ options KERNVIRTADDR=0xc0200000 # Used options STARTUP_PAGETABLE_ADDR=0xa0000000 #options ARM32_NEW_VM_LAYOUT include "../xscale/i80321/std.ep80219" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/GUMSTIX ============================================================================== --- head/sys/arm/conf/GUMSTIX Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/GUMSTIX Tue Jan 19 17:20:34 2010 (r202634) @@ -32,8 +32,6 @@ options KERNVIRTADDR=0xc0200000 # Used options STARTUP_PAGETABLE_ADDR=0xa0000000 include "../xscale/pxa/std.pxa" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/IQ31244 Tue Jan 19 17:20:34 2010 (r202634) @@ -27,8 +27,6 @@ options LOADERRAMADDR=0x00000000 options STARTUP_PAGETABLE_ADDR=0xa0000000 include "../xscale/i80321/std.iq31244" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/SIMICS ============================================================================== --- head/sys/arm/conf/SIMICS Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/SIMICS Tue Jan 19 17:20:34 2010 (r202634) @@ -23,8 +23,6 @@ options KERNPHYSADDR=0xc0000000 options KERNVIRTADDR=0xc0000000 options PHYSADDR=0xc0000000 include "../sa11x0/std.sa11x0" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/SKYEYE ============================================================================== --- head/sys/arm/conf/SKYEYE Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/SKYEYE Tue Jan 19 17:20:34 2010 (r202634) @@ -24,8 +24,6 @@ options KERNPHYSADDR=0xc0000000 options KERNVIRTADDR=0xc0000000 options PHYSADDR=0xc0000000 include "../at91/std.kb920x" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/conf/NOTES Tue Jan 19 17:20:34 2010 (r202634) @@ -50,6 +50,15 @@ ident LINT # maxusers 10 +# To statically compile in device wiring instead of /boot/device.hints +#hints "LINT.hints" # Default places to look for devices. + +# Use the following to compile in values accessible to the kernel +# through getenv() (or kenv(1) in userland). The format of the file +# is 'variable=value', see kenv(1) +# +#env "LINT.env" + # # The `makeoptions' parameter allows variables to be passed to the # generated Makefile in the build area. Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/i386/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -23,15 +23,6 @@ cpu I586_CPU cpu I686_CPU ident GENERIC -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler Modified: head/sys/mips/conf/QEMU ============================================================================== --- head/sys/mips/conf/QEMU Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/mips/conf/QEMU Tue Jan 19 17:20:34 2010 (r202634) @@ -30,8 +30,6 @@ makeoptions MODULES_OVERRIDE="" options KERNVIRTADDR=0x80100000 include "../adm5120/std.adm5120" -#hints "GENERIC.hints" #Default places to look for devices. - makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options DDB Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/pc98/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -23,15 +23,6 @@ cpu I586_CPU cpu I686_CPU ident GENERIC -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_4BSD # 4BSD scheduler Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/powerpc/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -21,9 +21,6 @@ cpu AIM ident GENERIC -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" - makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # Platform support Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/sparc64/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -21,15 +21,6 @@ cpu SUN4U ident GENERIC -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols # Platforms supported From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 17:21:42 2010 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 CC7D91065670; Tue, 19 Jan 2010 17:21:42 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by mx1.freebsd.org (Postfix) with ESMTP id 9D40F8FC13; Tue, 19 Jan 2010 17:21:41 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id e21so1090091fga.13 for ; Tue, 19 Jan 2010 09:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=xT8PdM5V1NDL/FxEdLdz0MTozFlFTgIhgCBFDGWlbCE=; b=cutExneFFZoUimHJw93e1z95LtkvKLPryOuu32n5aNvoMgnAIYC9NRYrOXDYzkxsjQ EG2cpBoC/eisCbvo7q6KxM2QIjMXAcQ2mrV7uFsEaNl++qcUUbNY+aDwgCvQZxRzLtCI fxRKm+fZlwhkMcttLEC3aKksY4b+BVE4Z3D/c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=iBUaFytcuimb7mcM3p0Hgxyn6IFtSlmUa+nddcpqAqrvbSg2Bzu1VmuY7ExLJzfpfH T9k/F6B6HNgqommNPof+uvJf3gGAvs/TuKbpZtoamFh3kjvFt0XnqcWn8MtAxOsH2P6k 7PO8CSZMwJTm/1PpAIM6JOEs5Xpy8bYz5kzXY= Received: by 10.87.21.36 with SMTP id y36mr10438456fgi.17.1263921700498; Tue, 19 Jan 2010 09:21:40 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 13sm3133400fxm.13.2010.01.19.09.21.39 (version=SSLv3 cipher=RC4-MD5); Tue, 19 Jan 2010 09:21:39 -0800 (PST) Sender: Alexander Motin Message-ID: <4B55EA21.70806@FreeBSD.org> Date: Tue, 19 Jan 2010 19:21:37 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: John Baldwin References: <201001160755.o0G7tkUV033288@svn.freebsd.org> <201001191044.53487.jhb@freebsd.org> In-Reply-To: <201001191044.53487.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r202431 - stable/8/sys/dev/ahci 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: Tue, 19 Jan 2010 17:21:42 -0000 John Baldwin wrote: > On Saturday 16 January 2010 2:55:46 am Alexander Motin wrote: >> Author: mav >> Date: Sat Jan 16 07:55:46 2010 >> New Revision: 202431 >> URL: http://svn.freebsd.org/changeset/base/202431 >> >> Log: >> Partially revert r202428. There is no bus_describe_intr() on RELENG_8. > > I can MFC it. If it is easy, it would be nice. If not, I don't think it will create much problems. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 18:13:54 2010 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 896C01065694; Tue, 19 Jan 2010 18:13:54 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77D3D8FC0A; Tue, 19 Jan 2010 18:13:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JIDshs068345; Tue, 19 Jan 2010 18:13:54 GMT (envelope-from fanf@svn.freebsd.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JIDsPs068342; Tue, 19 Jan 2010 18:13:54 GMT (envelope-from fanf@svn.freebsd.org) Message-Id: <201001191813.o0JIDsPs068342@svn.freebsd.org> From: Tony Finch Date: Tue, 19 Jan 2010 18:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202635 - head/usr.bin/unifdef 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: Tue, 19 Jan 2010 18:13:54 -0000 Author: fanf Date: Tue Jan 19 18:13:54 2010 New Revision: 202635 URL: http://svn.freebsd.org/changeset/base/202635 Log: Add a -o outfile option, which can be used to specify an output file. The file can safely be the same as the input file. Idea from IRIX unifdef(1). This version fixes a bug in the NetBSD unifdef which refuses to write to a -o outfile which does not exist. Obtained from: NetBSD Modified: head/usr.bin/unifdef/unifdef.1 head/usr.bin/unifdef/unifdef.c Modified: head/usr.bin/unifdef/unifdef.1 ============================================================================== --- head/usr.bin/unifdef/unifdef.1 Tue Jan 19 17:20:34 2010 (r202634) +++ head/usr.bin/unifdef/unifdef.1 Tue Jan 19 18:13:54 2010 (r202635) @@ -1,6 +1,6 @@ .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. -.\" Copyright (c) 2002 - 2009 Tony Finch . All rights reserved. +.\" Copyright (c) 2002 - 2010 Tony Finch . All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Dave Yost. It was rewritten to support ANSI C by Tony Finch. @@ -30,10 +30,10 @@ .\" SUCH DAMAGE. .\" .\" @(#)unifdef.1 8.2 (Berkeley) 4/1/94 -.\" $dotat: unifdef/unifdef.1,v 1.60 2009/11/25 00:11:02 fanf2 Exp $ +.\" $dotat: unifdef/unifdef.1,v 1.62 2010/01/19 17:33:53 fanf2 Exp $ .\" $FreeBSD$ .\" -.Dd September 24, 2002 +.Dd January 19, 2010 .Dt UNIFDEF 1 .Os .Sh NAME @@ -48,7 +48,8 @@ .Op Fl iD Ns Ar sym Ns Op = Ns Ar val .Op Fl iU Ns Ar sym .Ar ... -.Op Ar file +.Op Fl o Ar outfile +.Op Ar infile .Nm unifdefall .Op Fl I Ns Ar path .Ar ... @@ -254,6 +255,18 @@ directives to the output following any d so that errors produced when compiling the output file correspond to line numbers in the input file. .Pp +.It Fl o Ar outfile +Write output to the file +.Ar outfile +instead of the standard output. +If +.Ar outfile +is the same as the input file, +the output is written to a temporary file +which is renamed into place when +.Nm +completes successfully. +.Pp .It Fl s Instead of processing the input file as usual, this option causes Modified: head/usr.bin/unifdef/unifdef.c ============================================================================== --- head/usr.bin/unifdef/unifdef.c Tue Jan 19 17:20:34 2010 (r202634) +++ head/usr.bin/unifdef/unifdef.c Tue Jan 19 18:13:54 2010 (r202635) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 - 2009 Tony Finch + * Copyright (c) 2002 - 2010 Tony Finch * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,27 +24,14 @@ */ /* + * unifdef - remove ifdef'ed lines + * * This code was derived from software contributed to Berkeley by Dave Yost. * It was rewritten to support ANSI C by Tony Finch. The original version * of unifdef carried the 4-clause BSD copyright licence. None of its code * remains in this version (though some of the names remain) so it now * carries a more liberal licence. * - * The latest version is available from http://dotat.at/prog/unifdef - */ - -#include - -#ifdef __IDSTRING -__IDSTRING(dotat, "$dotat: unifdef/unifdef.c,v 1.190 2009/11/27 17:21:26 fanf2 Exp $"); -#endif -#ifdef __FBSDID -__FBSDID("$FreeBSD$"); -#endif - -/* - * unifdef - remove ifdef'ed lines - * * Wishlist: * provide an option which will append the name of the * appropriate symbol after #else's and #endif's @@ -56,8 +43,12 @@ __FBSDID("$FreeBSD$"); * also make it possible to handle all "dodgy" directives correctly. */ +#include +#include + #include #include +#include #include #include #include @@ -65,6 +56,13 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __IDSTRING +__IDSTRING(dotat, "$dotat: unifdef/unifdef.c,v 1.193 2010/01/19 18:03:02 fanf2 Exp $"); +#endif +#ifdef __FBSDID +__FBSDID("$FreeBSD$"); +#endif + /* types of input lines: */ typedef enum { LT_TRUEI, /* a true #if with ignore flag */ @@ -157,6 +155,11 @@ static char const * const linestate_name #define EDITSLOP 10 /* + * For temporary filenames + */ +#define TEMPLATE "unifdef.XXXXXX" + +/* * Globals. */ @@ -179,6 +182,10 @@ static int nsyms; /* numb static FILE *input; /* input file pointer */ static const char *filename; /* input file name */ static int linenum; /* current line number */ +static FILE *output; /* output file pointer */ +static const char *ofilename; /* output file name */ +static bool overwriting; /* output overwrites input */ +static char tempname[FILENAME_MAX]; /* used when overwriting */ static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */ static char *keyword; /* used for editing #elif's */ @@ -197,6 +204,7 @@ static bool constexpr; /* c static int exitstat; /* program exit status */ static void addsym(bool, bool, char *); +static void closeout(void); static void debug(const char *, ...); static void done(void); static void error(const char *); @@ -227,7 +235,7 @@ main(int argc, char *argv[]) { int opt; - while ((opt = getopt(argc, argv, "i:D:U:I:BbcdeKklnst")) != -1) + while ((opt = getopt(argc, argv, "i:D:U:I:o:BbcdeKklnst")) != -1) switch (opt) { case 'i': /* treat stuff controlled by these symbols as text */ /* @@ -277,6 +285,9 @@ main(int argc, char *argv[]) case 'n': /* add #line directive after deleted lines */ lnnum = true; break; + case 'o': /* output to a file */ + ofilename = optarg; + break; case 's': /* only output list of symbols that control #ifs */ symlist = true; break; @@ -301,6 +312,43 @@ main(int argc, char *argv[]) filename = "[stdin]"; input = stdin; } + if (ofilename == NULL) { + output = stdout; + } else { + struct stat ist, ost; + memset(&ist, 0, sizeof(ist)); + memset(&ost, 0, sizeof(ost)); + + if (fstat(fileno(input), &ist) != 0) + err(2, "can't fstat %s", filename); + if (stat(ofilename, &ost) != 0 && errno != ENOENT) + warn("can't stat %s", ofilename); + + overwriting = (ist.st_dev == ost.st_dev + && ist.st_ino == ost.st_ino); + if (overwriting) { + const char *dirsep; + int ofd; + + dirsep = strrchr(ofilename, '/'); + if (dirsep != NULL) + snprintf(tempname, sizeof(tempname), + "%.*s/" TEMPLATE, + dirsep - ofilename, ofilename); + else + strlcpy(tempname, TEMPLATE, sizeof(tempname)); + ofd = mkstemp(tempname); + if (ofd != -1) + output = fdopen(ofd, "w+"); + if (output == NULL) + err(2, "can't create temporary file"); + fchmod(ofd, ist.st_mode & ACCESSPERMS); + } else { + output = fopen(ofilename, "w"); + if (output == NULL) + err(2, "can't open %s", ofilename); + } + } process(); abort(); /* bug */ } @@ -435,13 +483,6 @@ static state_fn * const trans_table[IS_C * State machine utility functions */ static void -done(void) -{ - if (incomment) - error("EOF in comment"); - exit(exitstat); -} -static void ignoreoff(void) { if (depth == 0) @@ -498,13 +539,13 @@ flushline(bool keep) } else { if (lnnum && delcount > 0) printf("#line %d\n", linenum); - fputs(tline, stdout); + fputs(tline, output); delcount = 0; blankmax = blankcount = blankline ? blankcount + 1 : 0; } } else { if (lnblank) - putc('\n', stdout); + putc('\n', output); exitstat = 1; delcount += 1; blankcount = 0; @@ -533,6 +574,40 @@ process(void) } /* + * Flush the output and handle errors. + */ +static void +closeout(void) +{ + if (fclose(output) == EOF) { + warn("couldn't write to output"); + if (overwriting) { + unlink(tempname); + errx(2, "%s unchanged", filename); + } else { + exit(2); + } + } +} + +/* + * Clean up and exit. + */ +static void +done(void) +{ + if (incomment) + error("EOF in comment"); + closeout(); + if (overwriting && rename(tempname, filename) == -1) { + warn("couldn't rename temporary file"); + unlink(tempname); + errx(2, "%s unchanged", filename); + } + exit(exitstat); +} + +/* * Parse a line and determine its type. We keep the preprocessor line * parser state between calls in the global variable linestate, with * help from skipcomment(). @@ -1097,5 +1172,6 @@ error(const char *msg) else warnx("%s: %d: %s (#if line %d depth %d)", filename, linenum, msg, stifline[depth], depth); + closeout(); errx(2, "output may be truncated"); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 18:18:16 2010 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 0BFE21065695; Tue, 19 Jan 2010 18:18:16 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D67E98FC08; Tue, 19 Jan 2010 18:18:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JIIFnH069345; Tue, 19 Jan 2010 18:18:15 GMT (envelope-from fanf@svn.freebsd.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JIIFbT069343; Tue, 19 Jan 2010 18:18:15 GMT (envelope-from fanf@svn.freebsd.org) Message-Id: <201001191818.o0JIIFbT069343@svn.freebsd.org> From: Tony Finch Date: Tue, 19 Jan 2010 18:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202636 - head/usr.bin/unifdef 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: Tue, 19 Jan 2010 18:18:16 -0000 Author: fanf Date: Tue Jan 19 18:18:15 2010 New Revision: 202636 URL: http://svn.freebsd.org/changeset/base/202636 Log: Sync unifdefall with upstream. It no longer relies entirely on $PATH to find unifdef, in order to support running the test suite before installing. Modified: head/usr.bin/unifdef/unifdefall.sh Modified: head/usr.bin/unifdef/unifdefall.sh ============================================================================== --- head/usr.bin/unifdef/unifdefall.sh Tue Jan 19 18:13:54 2010 (r202635) +++ head/usr.bin/unifdef/unifdefall.sh Tue Jan 19 18:18:15 2010 (r202636) @@ -2,7 +2,8 @@ # # unifdefall: remove all the #if's from a source file # -# Copyright (c) 2002 - 2009 Tony Finch . All rights reserved. +# Copyright (c) 2002 - 2010 Tony Finch +# Copyright (c) 2009 - 2010 Jonathan Nieder # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -25,19 +26,27 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $dotat: unifdef/unifdefall.sh,v 1.24 2009/11/26 12:54:39 fanf2 Exp $ +# $dotat: unifdef/unifdefall.sh,v 1.27 2010/01/19 16:09:50 fanf2 Exp $ # $FreeBSD$ set -e -basename=$(basename $0) +unifdef="$(dirname "$0")/unifdef" +if [ ! -e "$unifdef" ] +then + unifdef=unifdef +fi +# export to the final shell command +export unifdef + +basename=$(basename "$0") tmp=$(mktemp -d "${TMPDIR:-/tmp}/$basename.XXXXXXXXXX") || exit 2 trap 'rm -r "$tmp" || exit 1' EXIT export LC_ALL=C # list of all controlling macros -unifdef -s "$@" | sort | uniq >"$tmp/ctrl" +"$unifdef" -s "$@" | sort | uniq >"$tmp/ctrl" # list of all macro definitions cpp -dM "$@" | sort | sed 's/^#define //' >"$tmp/hashdefs" # list of defined macro names @@ -49,7 +58,7 @@ comm -12 "$tmp/ctrl" "$tmp/alldef" >"$tm # and converts them to unifdef command-line arguments sed 's|.*|s/^&\\(([^)]*)\\)\\{0,1\\} /-D&=/p|' <"$tmp/def" >"$tmp/script" # create the final unifdef command -{ echo unifdef -k \\ +{ echo '"$unifdef" -k \' # convert the controlling undefined macros to -U arguments sed 's/.*/-U& \\/' <"$tmp/undef" # convert the controlling defined macros to quoted -D arguments From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 18:25:11 2010 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 4B85A106566C; Tue, 19 Jan 2010 18:25:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A9BB8FC1B; Tue, 19 Jan 2010 18:25:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JIPBvZ070975; Tue, 19 Jan 2010 18:25:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JIPBDs070972; Tue, 19 Jan 2010 18:25:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001191825.o0JIPBDs070972@svn.freebsd.org> From: Xin LI Date: Tue, 19 Jan 2010 18:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202637 - vendor/netcat/dist 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: Tue, 19 Jan 2010 18:25:11 -0000 Author: delphij Date: Tue Jan 19 18:25:10 2010 New Revision: 202637 URL: http://svn.freebsd.org/changeset/base/202637 Log: Vendor import of netcat as of OPENBSD_4_6. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Tue Jan 19 18:18:15 2010 (r202636) +++ vendor/netcat/dist/nc.1 Tue Jan 19 18:25:10 2010 (r202637) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.48 2008/09/19 13:24:41 sobrado Exp $ +.\" $OpenBSD: nc.1,v 1.50 2009/06/05 06:47:12 jmc Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: May 6 2008 $ +.Dd $Mdocdate: June 5 2009 $ .Dt NC 1 .Os .Sh NAME @@ -42,6 +42,7 @@ .Op Fl p Ar source_port .Op Fl s Ar source_ip_address .Op Fl T Ar ToS +.Op Fl V Ar rdomain .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol .Oo Xo @@ -176,6 +177,9 @@ to script telnet sessions. Specifies to use Unix Domain Sockets. .It Fl u Use UDP instead of the default option of TCP. +.It Fl V Ar rdomain +Set the routing domain. +The default is 0. .It Fl v Have .Nm Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Tue Jan 19 18:18:15 2010 (r202636) +++ vendor/netcat/dist/netcat.c Tue Jan 19 18:25:10 2010 (r202637) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.92 2008/09/19 13:24:41 sobrado Exp $ */ +/* $OpenBSD: netcat.c,v 1.93 2009/06/05 00:18:10 claudio Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -84,6 +84,7 @@ int Iflag; /* TCP receive buffer siz int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ +u_int rdomain; int timeout = -1; int family = AF_UNSPEC; @@ -125,7 +126,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt(argc, argv, - "46DdhI:i:jklnO:P:p:rSs:tT:Uuvw:X:x:z")) != -1) { + "46DdhI:i:jklnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) { switch (ch) { case '4': family = AF_INET; @@ -187,6 +188,12 @@ main(int argc, char *argv[]) case 'u': uflag = 1; break; + case 'V': + rdomain = (unsigned int)strtonum(optarg, 0, + RT_TABLEID_MAX, &errstr); + if (errstr) + errx(1, "rdomain %s: %s", errstr, optarg); + break; case 'v': vflag = 1; break; @@ -498,6 +505,12 @@ remote_connect(const char *host, const c res0->ai_protocol)) < 0) continue; + if (rdomain) { + if (setsockopt(s, IPPROTO_IP, SO_RDOMAIN, &rdomain, + sizeof(rdomain)) == -1) + err(1, "setsockopt SO_RDOMAIN"); + } + /* Bind to a local port or source address if specified. */ if (sflag || pflag) { struct addrinfo ahints, *ares; @@ -566,6 +579,12 @@ local_listen(char *host, char *port, str res0->ai_protocol)) < 0) continue; + if (rdomain) { + if (setsockopt(s, IPPROTO_IP, SO_RDOMAIN, &rdomain, + sizeof(rdomain)) == -1) + err(1, "setsockopt SO_RDOMAIN"); + } + ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) err(1, NULL); @@ -851,6 +870,7 @@ help(void) \t-t Answer TELNET negotiation\n\ \t-U Use UNIX domain socket\n\ \t-u UDP mode\n\ + \t-V rdomain Specify alternate routing domain\n\ \t-v Verbose\n\ \t-w secs\t Timeout for connects and final net reads\n\ \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ @@ -866,8 +886,8 @@ usage(int ret) fprintf(stderr, "usage: nc [-46DdhklnrStUuvz] [-I length] [-i interval] [-O length]\n" "\t [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]\n" - "\t [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [hostname]\n" - "\t [port]\n"); + "\t [-V rdomain] [-w timeout] [-X proxy_protocol]\n" + "\t [-x proxy_address[:port]] [hostname] [port]\n"); if (ret) exit(1); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 18:25:49 2010 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 B43F5106566B; Tue, 19 Jan 2010 18:25:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8838FC25; Tue, 19 Jan 2010 18:25:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JIPnF2071175; Tue, 19 Jan 2010 18:25:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JIPnO1071174; Tue, 19 Jan 2010 18:25:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001191825.o0JIPnO1071174@svn.freebsd.org> From: Xin LI Date: Tue, 19 Jan 2010 18:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202638 - vendor/netcat/4.6 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: Tue, 19 Jan 2010 18:25:49 -0000 Author: delphij Date: Tue Jan 19 18:25:49 2010 New Revision: 202638 URL: http://svn.freebsd.org/changeset/base/202638 Log: Tag netcat 4.6. Added: vendor/netcat/4.6/ - copied from r202637, vendor/netcat/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 18:45:29 2010 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 C7C68106566C; Tue, 19 Jan 2010 18:45:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6B188FC18; Tue, 19 Jan 2010 18:45:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JIjTUR075573; Tue, 19 Jan 2010 18:45:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JIjTXR075570; Tue, 19 Jan 2010 18:45:29 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001191845.o0JIjTXR075570@svn.freebsd.org> From: Xin LI Date: Tue, 19 Jan 2010 18:45:29 +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: r202640 - head/contrib/netcat 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: Tue, 19 Jan 2010 18:45:29 -0000 Author: delphij Date: Tue Jan 19 18:45:29 2010 New Revision: 202640 URL: http://svn.freebsd.org/changeset/base/202640 Log: Update to 4.6. Note: the -V option from OpenBSD is implemented using setfib(2) on FreeBSD. MFC after: 2 weeks Modified: head/contrib/netcat/nc.1 head/contrib/netcat/netcat.c Directory Properties: head/contrib/netcat/ (props changed) Modified: head/contrib/netcat/nc.1 ============================================================================== --- head/contrib/netcat/nc.1 Tue Jan 19 18:42:09 2010 (r202639) +++ head/contrib/netcat/nc.1 Tue Jan 19 18:45:29 2010 (r202640) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.48 2008/09/19 13:24:41 sobrado Exp $ +.\" $OpenBSD: nc.1,v 1.50 2009/06/05 06:47:12 jmc Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6 2008 +.Dd June 5 2009 .Dt NC 1 .Os .Sh NAME @@ -46,6 +46,7 @@ .Op Fl p Ar source_port .Op Fl s Ar source_ip_address .Op Fl T Ar ToS +.Op Fl V Ar fib .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol .Oo Xo @@ -208,6 +209,9 @@ to script telnet sessions. Specifies to use Unix Domain Sockets. .It Fl u Use UDP instead of the default option of TCP. +.It Fl V Ar fib +Set the routing table (FIB). +The default is 0. .It Fl v Have .Nm @@ -449,6 +453,7 @@ if the proxy requires it: .Ex -std .Sh SEE ALSO .Xr cat 1 , +.Xr setfib 1 , .Xr ssh 1 , .Xr tcp 4 .Sh AUTHORS Modified: head/contrib/netcat/netcat.c ============================================================================== --- head/contrib/netcat/netcat.c Tue Jan 19 18:42:09 2010 (r202639) +++ head/contrib/netcat/netcat.c Tue Jan 19 18:45:29 2010 (r202640) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.92 2008/09/19 13:24:41 sobrado Exp $ */ +/* $OpenBSD: netcat.c,v 1.93 2009/06/05 00:18:10 claudio Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -94,6 +95,7 @@ int Iflag; /* TCP receive buffer siz int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ +u_int rdomain; int timeout = -1; int family = AF_UNSPEC; @@ -124,6 +126,8 @@ int main(int argc, char *argv[]) { int ch, s, ret, socksv, ipsec_count; + int numfibs; + size_t intsize = sizeof(int); char *host, *uport; struct addrinfo hints; struct servent *sv; @@ -137,6 +141,7 @@ main(int argc, char *argv[]) { NULL, 0, NULL, 0 } }; + rdomain = 0; ret = 1; ipsec_count = 0; s = 0; @@ -146,7 +151,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt_long(argc, argv, - "46e:DEdhi:jklnoI:O:P:p:rSs:tT:Uuvw:X:x:z", + "46DdEe:hI:i:jklnO:oP:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -229,6 +234,14 @@ main(int argc, char *argv[]) case 'u': uflag = 1; break; + case 'V': + if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) + errx(1, "Multiple FIBS not supported"); + rdomain = (unsigned int)strtonum(optarg, 0, + numfibs - 1, &errstr); + if (errstr) + errx(1, "FIB %s: %s", errstr, optarg); + break; case 'v': vflag = 1; break; @@ -550,6 +563,11 @@ remote_connect(const char *host, const c add_ipsec_policy(s, ipsec_policy[1]); #endif + if (rdomain) { + if (setfib(rdomain) == -1) + err(1, "setfib"); + } + /* Bind to a local port or source address if specified. */ if (sflag || pflag) { struct addrinfo ahints, *ares; @@ -620,6 +638,11 @@ local_listen(char *host, char *port, str res0->ai_protocol)) < 0) continue; + if (rdomain) { + if (setfib(rdomain) == -1) + err(1, "setfib"); + } + ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) err(1, NULL); @@ -930,6 +953,7 @@ help(void) \t-t Answer TELNET negotiation\n\ \t-U Use UNIX domain socket\n\ \t-u UDP mode\n\ + \t-V fib Specify alternate routing table (FIB)\n\ \t-v Verbose\n\ \t-w secs\t Timeout for connects and final net reads\n\ \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ @@ -974,8 +998,8 @@ usage(int ret) "usage: nc [-46DdhklnorStUuvz] [-I length] [-i interval] [-O length]\n" #endif "\t [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]\n" - "\t [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [hostname]\n" - "\t [port]\n"); + "\t [-V fib] [-w timeout] [-X proxy_protocol]\n" + "\t [-x proxy_address[:port]] [hostname] [port]\n"); if (ret) exit(1); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 19:51:54 2010 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 75923106566B; Tue, 19 Jan 2010 19:51:54 +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 625138FC12; Tue, 19 Jan 2010 19:51:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JJpsPu090307; Tue, 19 Jan 2010 19:51:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JJpsse090299; Tue, 19 Jan 2010 19:51:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001191951.o0JJpsse090299@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 19 Jan 2010 19:51:54 +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: r202642 - in stable/7/sys: amd64/include arm/include i386/include ia64/include powerpc/include sparc64/include sun4v/include 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: Tue, 19 Jan 2010 19:51:54 -0000 Author: kib Date: Tue Jan 19 19:51:54 2010 New Revision: 202642 URL: http://svn.freebsd.org/changeset/base/202642 Log: MFC r197933: Define architectural load bases for PIE binaries. MFC r198203: Change the load base to below 2GB for sparc64/sun4v. Modified: stable/7/sys/amd64/include/elf.h stable/7/sys/arm/include/elf.h stable/7/sys/i386/include/elf.h stable/7/sys/ia64/include/elf.h stable/7/sys/powerpc/include/elf.h stable/7/sys/sparc64/include/elf.h stable/7/sys/sun4v/include/elf.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/include/elf.h ============================================================================== --- stable/7/sys/amd64/include/elf.h Tue Jan 19 19:38:03 2010 (r202641) +++ stable/7/sys/amd64/include/elf.h Tue Jan 19 19:51:54 2010 (r202642) @@ -106,4 +106,10 @@ __ElfType(Auxinfo); #define ELF_TARG_MACH EM_X86_64 #define ELF_TARG_VER 1 +#if __ELF_WORD_SIZE == 32 +#define ET_DYN_LOAD_ADDR 0x01001000 +#else +#define ET_DYN_LOAD_ADDR 0x01021000 +#endif + #endif /* !_MACHINE_ELF_H_ */ Modified: stable/7/sys/arm/include/elf.h ============================================================================== --- stable/7/sys/arm/include/elf.h Tue Jan 19 19:38:03 2010 (r202641) +++ stable/7/sys/arm/include/elf.h Tue Jan 19 19:51:54 2010 (r202642) @@ -97,4 +97,7 @@ __ElfType(Auxinfo); * value. */ #define MAGIC_TRAMP_NUMBER 0x5c000003 + +#define ET_DYN_LOAD_ADDR 0x12000 + #endif /* !_MACHINE_ELF_H_ */ Modified: stable/7/sys/i386/include/elf.h ============================================================================== --- stable/7/sys/i386/include/elf.h Tue Jan 19 19:38:03 2010 (r202641) +++ stable/7/sys/i386/include/elf.h Tue Jan 19 19:51:54 2010 (r202642) @@ -105,4 +105,6 @@ __ElfType(Auxinfo); #define ELF_TARG_MACH EM_386 #define ELF_TARG_VER 1 +#define ET_DYN_LOAD_ADDR 0x01001000 + #endif /* !_MACHINE_ELF_H_ */ Modified: stable/7/sys/ia64/include/elf.h ============================================================================== --- stable/7/sys/ia64/include/elf.h Tue Jan 19 19:38:03 2010 (r202641) +++ stable/7/sys/ia64/include/elf.h Tue Jan 19 19:51:54 2010 (r202642) @@ -141,4 +141,6 @@ __ElfType(Auxinfo); #define DT_IA_64_PLT_RESERVE 0x70000000 +#define ET_DYN_LOAD_ADDR 0x2500000000000000 + #endif /* !_MACHINE_ELF_H_ */ Modified: stable/7/sys/powerpc/include/elf.h ============================================================================== --- stable/7/sys/powerpc/include/elf.h Tue Jan 19 19:38:03 2010 (r202641) +++ stable/7/sys/powerpc/include/elf.h Tue Jan 19 19:51:54 2010 (r202642) @@ -96,4 +96,6 @@ __ElfType(Auxinfo); #define ELF_TARG_MACH EM_PPC #define ELF_TARG_VER 1 +#define ET_DYN_LOAD_ADDR 0x01010000 + #endif /* !_MACHINE_ELF_H_ */ Modified: stable/7/sys/sparc64/include/elf.h ============================================================================== --- stable/7/sys/sparc64/include/elf.h Tue Jan 19 19:38:03 2010 (r202641) +++ stable/7/sys/sparc64/include/elf.h Tue Jan 19 19:51:54 2010 (r202642) @@ -97,4 +97,6 @@ __ElfType(Auxinfo); #define ELF_TARG_MACH ELF_ARCH #define ELF_TARG_VER 1 +#define ET_DYN_LOAD_ADDR 0x100000 + #endif /* !_MACHINE_ELF_H_ */ Modified: stable/7/sys/sun4v/include/elf.h ============================================================================== --- stable/7/sys/sun4v/include/elf.h Tue Jan 19 19:38:03 2010 (r202641) +++ stable/7/sys/sun4v/include/elf.h Tue Jan 19 19:51:54 2010 (r202642) @@ -97,4 +97,6 @@ __ElfType(Auxinfo); #define ELF_TARG_MACH ELF_ARCH #define ELF_TARG_VER 1 +#define ET_DYN_LOAD_ADDR 0x100000 + #endif /* !_MACHINE_ELF_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 19:53:06 2010 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 19ABF106568D; Tue, 19 Jan 2010 19:53:06 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08C368FC14; Tue, 19 Jan 2010 19:53:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JJr5YH090622; Tue, 19 Jan 2010 19:53:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JJr5Ko090620; Tue, 19 Jan 2010 19:53:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001191953.o0JJr5Ko090620@svn.freebsd.org> From: Ed Schouten Date: Tue, 19 Jan 2010 19:53: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: r202643 - head/usr.bin/last 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: Tue, 19 Jan 2010 19:53:06 -0000 Author: ed Date: Tue Jan 19 19:53:05 2010 New Revision: 202643 URL: http://svn.freebsd.org/changeset/base/202643 Log: Make last(1) display the full log file. I must have misread when I ported the original last(1) source code. Instead of only processing the last 1024 entries, it reads them in in chucks of 1024 entries at a time. Unfortunately we cannot walk through the log file in reverse order, which means we have to allocate a piece of memory to hold all the entries. Call realloc() for each 128 entries we read. Reported by: Andrzej Tobola Modified: head/usr.bin/last/last.c Modified: head/usr.bin/last/last.c ============================================================================== --- head/usr.bin/last/last.c Tue Jan 19 19:51:54 2010 (r202642) +++ head/usr.bin/last/last.c Tue Jan 19 19:53:05 2010 (r202643) @@ -196,8 +196,6 @@ main(int argc, char *argv[]) exit(0); } -#define MAXUTXENTRIES 1024 - /* * wtmp -- * read through the wtmp file @@ -205,9 +203,9 @@ main(int argc, char *argv[]) void wtmp(void) { - struct utmpx buf[MAXUTXENTRIES]; + struct utmpx *buf = NULL; struct utmpx *ut; - static unsigned int first = 0, amount = 0; + static unsigned int amount = 0; time_t t; char ct[80]; struct tm *tm; @@ -219,11 +217,12 @@ wtmp(void) if (setutxdb(UTXDB_LOG, file) != 0) err(1, "%s", file); while ((ut = getutxent()) != NULL) { - memcpy(&buf[(first + amount) % MAXUTXENTRIES], ut, sizeof *ut); - if (amount == MAXUTXENTRIES) - first++; - else - amount++; + if (amount % 128 == 0) { + buf = realloc(buf, (amount + 128) * sizeof *ut); + if (buf == NULL) + err(1, "realloc"); + } + memcpy(&buf[amount++], ut, sizeof *ut); if (t > ut->ut_tv.tv_sec) t = ut->ut_tv.tv_sec; } @@ -231,7 +230,7 @@ wtmp(void) /* Display them in reverse order. */ while (amount > 0) - doentry(&buf[(first + amount--) % MAXUTXENTRIES]); + doentry(&buf[--amount]); tm = localtime(&t); (void) strftime(ct, sizeof(ct), "\nwtmp begins %+\n", tm); From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 19:54:19 2010 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 50FA41065670; Tue, 19 Jan 2010 19:54:19 +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 3F5268FC19; Tue, 19 Jan 2010 19:54:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JJsJkZ090917; Tue, 19 Jan 2010 19:54:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JJsJQA090915; Tue, 19 Jan 2010 19:54:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001191954.o0JJsJQA090915@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 19 Jan 2010 19:54:19 +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: r202644 - stable/7/sys/kern 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: Tue, 19 Jan 2010 19:54:19 -0000 Author: kib Date: Tue Jan 19 19:54:18 2010 New Revision: 202644 URL: http://svn.freebsd.org/changeset/base/202644 Log: MFC r197932: Do not map segments of zero length. Tested by: Mykola Dzham Modified: stable/7/sys/kern/imgact_elf.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/imgact_elf.c ============================================================================== --- stable/7/sys/kern/imgact_elf.c Tue Jan 19 19:53:05 2010 (r202643) +++ stable/7/sys/kern/imgact_elf.c Tue Jan 19 19:54:18 2010 (r202644) @@ -639,7 +639,8 @@ __elfN(load_file)(struct proc *p, const } for (i = 0, numsegs = 0; i < hdr->e_phnum; i++) { - if (phdr[i].p_type == PT_LOAD) { /* Loadable segment */ + if (phdr[i].p_type == PT_LOAD && phdr[i].p_memsz != 0) { + /* Loadable segment */ prot = 0; if (phdr[i].p_flags & PF_X) prot |= VM_PROT_EXECUTE; @@ -769,6 +770,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i for (i = 0; i < hdr->e_phnum; i++) { switch (phdr[i].p_type) { case PT_LOAD: /* Loadable segment */ + if (phdr[i].p_memsz == 0) + break; prot = 0; if (phdr[i].p_flags & PF_X) prot |= VM_PROT_EXECUTE; From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 19:56:50 2010 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 90C00106566C; Tue, 19 Jan 2010 19:56:50 +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 75F468FC15; Tue, 19 Jan 2010 19:56:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JJuo7M091502; Tue, 19 Jan 2010 19:56:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JJuoZr091500; Tue, 19 Jan 2010 19:56:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001191956.o0JJuoZr091500@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 19 Jan 2010 19:56:50 +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: r202645 - stable/7/sys/kern 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: Tue, 19 Jan 2010 19:56:50 -0000 Author: kib Date: Tue Jan 19 19:56:50 2010 New Revision: 202645 URL: http://svn.freebsd.org/changeset/base/202645 Log: MFC r197934: Map PIE binaries at non-zero base address. Tested by: Mykola Dzham Modified: stable/7/sys/kern/imgact_elf.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/imgact_elf.c ============================================================================== --- stable/7/sys/kern/imgact_elf.c Tue Jan 19 19:54:18 2010 (r202644) +++ stable/7/sys/kern/imgact_elf.c Tue Jan 19 19:56:50 2010 (r202645) @@ -692,7 +692,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i u_long text_size = 0, data_size = 0, total_size = 0; u_long text_addr = 0, data_addr = 0; u_long seg_size, seg_addr; - u_long addr, entry = 0, proghdr = 0; + u_long addr, et_dyn_addr, entry = 0, proghdr = 0; int32_t osrel = 0; int error = 0, i; const char *interp = NULL, *newinterp = NULL; @@ -741,9 +741,12 @@ __CONCAT(exec_, __elfN(imgact))(struct i hdr->e_ident[EI_OSABI]); return (ENOEXEC); } - if (hdr->e_type == ET_DYN && - (brand_info->flags & BI_CAN_EXEC_DYN) == 0) - return (ENOEXEC); + if (hdr->e_type == ET_DYN) { + if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) + return (ENOEXEC); + et_dyn_addr = ET_DYN_LOAD_ADDR; + } else + et_dyn_addr = 0; sv = brand_info->sysvec; if (interp != NULL && brand_info->interp_newpath != NULL) newinterp = brand_info->interp_newpath; @@ -791,7 +794,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i if ((error = __elfN(load_section)(vmspace, imgp->object, phdr[i].p_offset, - (caddr_t)(uintptr_t)phdr[i].p_vaddr, + (caddr_t)(uintptr_t)phdr[i].p_vaddr + et_dyn_addr, phdr[i].p_memsz, phdr[i].p_filesz, prot, sv->sv_pagesize)) != 0) return (error); @@ -805,11 +808,12 @@ __CONCAT(exec_, __elfN(imgact))(struct i if (phdr[i].p_offset == 0 && hdr->e_phoff + hdr->e_phnum * hdr->e_phentsize <= phdr[i].p_filesz) - proghdr = phdr[i].p_vaddr + hdr->e_phoff; + proghdr = phdr[i].p_vaddr + hdr->e_phoff + + et_dyn_addr; - seg_addr = trunc_page(phdr[i].p_vaddr); + seg_addr = trunc_page(phdr[i].p_vaddr + et_dyn_addr); seg_size = round_page(phdr[i].p_memsz + - phdr[i].p_vaddr - seg_addr); + phdr[i].p_vaddr + et_dyn_addr - seg_addr); /* * Is this .text or .data? We can't use @@ -831,7 +835,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i phdr[i].p_memsz)) { text_size = seg_size; text_addr = seg_addr; - entry = (u_long)hdr->e_entry; + entry = (u_long)hdr->e_entry + et_dyn_addr; } else { data_size = seg_size; data_addr = seg_addr; @@ -839,7 +843,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i total_size += seg_size; break; case PT_PHDR: /* Program header table info */ - proghdr = phdr[i].p_vaddr; + proghdr = phdr[i].p_vaddr + et_dyn_addr; break; default: break; From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 19:59:04 2010 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 3768E1065670; Tue, 19 Jan 2010 19:59:04 +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 0C8898FC0C; Tue, 19 Jan 2010 19:59:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JJx3H9092036; Tue, 19 Jan 2010 19:59:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JJx3mw092034; Tue, 19 Jan 2010 19:59:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001191959.o0JJx3mw092034@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 19 Jan 2010 19:59:03 +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: r202646 - stable/7/sys/kern 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: Tue, 19 Jan 2010 19:59:04 -0000 Author: kib Date: Tue Jan 19 19:59:03 2010 New Revision: 202646 URL: http://svn.freebsd.org/changeset/base/202646 Log: MFC r198202: If ET_DYN binary has non-zero base address for some reason, honour it and do not relocate the binary to ET_DYN_LOAD_ADDR. Communicate the relocation bias of the mapping for interpeter-less ET_DYN binary. Tested by: Mykola Dzham Modified: stable/7/sys/kern/imgact_elf.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/imgact_elf.c ============================================================================== --- stable/7/sys/kern/imgact_elf.c Tue Jan 19 19:56:50 2010 (r202645) +++ stable/7/sys/kern/imgact_elf.c Tue Jan 19 19:59:03 2010 (r202646) @@ -692,9 +692,9 @@ __CONCAT(exec_, __elfN(imgact))(struct i u_long text_size = 0, data_size = 0, total_size = 0; u_long text_addr = 0, data_addr = 0; u_long seg_size, seg_addr; - u_long addr, et_dyn_addr, entry = 0, proghdr = 0; + u_long addr, baddr, et_dyn_addr, entry = 0, proghdr = 0; int32_t osrel = 0; - int error = 0, i; + int error = 0, i, n; const char *interp = NULL, *newinterp = NULL; Elf_Brandinfo *brand_info; char *path; @@ -724,14 +724,22 @@ __CONCAT(exec_, __elfN(imgact))(struct i phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); if (!aligned(phdr, Elf_Addr)) return (ENOEXEC); + n = 0; + baddr = 0; for (i = 0; i < hdr->e_phnum; i++) { + if (phdr[i].p_type == PT_LOAD) { + if (n == 0) + baddr = phdr[i].p_vaddr; + n++; + continue; + } if (phdr[i].p_type == PT_INTERP) { /* Path to interpreter */ if (phdr[i].p_filesz > MAXPATHLEN || phdr[i].p_offset + phdr[i].p_filesz > PAGE_SIZE) return (ENOEXEC); interp = imgp->image_header + phdr[i].p_offset; - break; + continue; } } @@ -744,7 +752,14 @@ __CONCAT(exec_, __elfN(imgact))(struct i if (hdr->e_type == ET_DYN) { if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) return (ENOEXEC); - et_dyn_addr = ET_DYN_LOAD_ADDR; + /* + * Honour the base load address from the dso if it is + * non-zero for some reason. + */ + if (baddr == 0) + et_dyn_addr = ET_DYN_LOAD_ADDR; + else + et_dyn_addr = 0; } else et_dyn_addr = 0; sv = brand_info->sysvec; @@ -915,7 +930,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i return (error); } } else - addr = 0; + addr = et_dyn_addr; /* * Construct auxargs table (used by the fixup routine) From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 20:05:20 2010 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 B9A47106566B; Tue, 19 Jan 2010 20:05:20 +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 8E9368FC17; Tue, 19 Jan 2010 20:05:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JK5KBT093549; Tue, 19 Jan 2010 20:05:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JK5KUJ093547; Tue, 19 Jan 2010 20:05:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001192005.o0JK5KUJ093547@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 19 Jan 2010 20:05:20 +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: r202647 - stable/7/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: Tue, 19 Jan 2010 20:05:20 -0000 Author: kib Date: Tue Jan 19 20:05:20 2010 New Revision: 202647 URL: http://svn.freebsd.org/changeset/base/202647 Log: MFC r197931: Calculate relocation base for the main object, and apply the relocation adjustment for all virtual addresses encoded into the ELF structures of it. Tested by: Mykola Dzham Modified: stable/7/libexec/rtld-elf/rtld.c Directory Properties: stable/7/libexec/rtld-elf/ (props changed) Modified: stable/7/libexec/rtld-elf/rtld.c ============================================================================== --- stable/7/libexec/rtld-elf/rtld.c Tue Jan 19 19:59:03 2010 (r202646) +++ stable/7/libexec/rtld-elf/rtld.c Tue Jan 19 20:05:20 2010 (r202647) @@ -474,6 +474,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ /* Initialize a fake symbol for resolving undefined weak references. */ sym_zero.st_info = ELF_ST_INFO(STB_GLOBAL, STT_NOTYPE); sym_zero.st_shndx = SHN_UNDEF; + sym_zero.st_value = -(uintptr_t)obj_main->relocbase; if (!libmap_disable) libmap_disable = (bool)lm_init(libmap_override); @@ -961,26 +962,26 @@ digest_phdr(const Elf_Phdr *phdr, int ph obj = obj_new(); for (ph = phdr; ph < phlimit; ph++) { - switch (ph->p_type) { + if (ph->p_type != PT_PHDR) + continue; - case PT_PHDR: - if ((const Elf_Phdr *)ph->p_vaddr != phdr) { - _rtld_error("%s: invalid PT_PHDR", path); - return NULL; - } - obj->phdr = (const Elf_Phdr *) ph->p_vaddr; - obj->phsize = ph->p_memsz; - break; + obj->phdr = phdr; + obj->phsize = ph->p_memsz; + obj->relocbase = (caddr_t)phdr - ph->p_vaddr; + break; + } + + for (ph = phdr; ph < phlimit; ph++) { + switch (ph->p_type) { case PT_INTERP: - obj->interp = (const char *) ph->p_vaddr; + obj->interp = (const char *)(ph->p_vaddr + obj->relocbase); break; case PT_LOAD: if (nsegs == 0) { /* First load segment */ obj->vaddrbase = trunc_page(ph->p_vaddr); - obj->mapbase = (caddr_t) obj->vaddrbase; - obj->relocbase = obj->mapbase - obj->vaddrbase; + obj->mapbase = obj->vaddrbase + obj->relocbase; obj->textsize = round_page(ph->p_vaddr + ph->p_memsz) - obj->vaddrbase; } else { /* Last load segment */ @@ -991,7 +992,7 @@ digest_phdr(const Elf_Phdr *phdr, int ph break; case PT_DYNAMIC: - obj->dynamic = (const Elf_Dyn *) ph->p_vaddr; + obj->dynamic = (const Elf_Dyn *)(ph->p_vaddr + obj->relocbase); break; case PT_TLS: @@ -999,7 +1000,7 @@ digest_phdr(const Elf_Phdr *phdr, int ph obj->tlssize = ph->p_memsz; obj->tlsalign = ph->p_align; obj->tlsinitsize = ph->p_filesz; - obj->tlsinit = (void*) ph->p_vaddr; + obj->tlsinit = (void*)(ph->p_vaddr + obj->relocbase); break; } } From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 20:19:52 2010 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 792CD106566C; Tue, 19 Jan 2010 20:19:52 +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 642E38FC15; Tue, 19 Jan 2010 20:19:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JKJqEF096803; Tue, 19 Jan 2010 20:19:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JKJq2Y096793; Tue, 19 Jan 2010 20:19:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001192019.o0JKJq2Y096793@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 19 Jan 2010 20:19:52 +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: r202648 - in stable/7: contrib/gcc/config lib/csu/amd64 lib/csu/arm lib/csu/i386-elf lib/csu/ia64 lib/csu/powerpc lib/csu/sparc64 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: Tue, 19 Jan 2010 20:19:52 -0000 Author: kib Date: Tue Jan 19 20:19:52 2010 New Revision: 202648 URL: http://svn.freebsd.org/changeset/base/202648 Log: MFC r200038: Properly support -fPIE by linking PIE binaries with specially-built Scrt1.o instead of crt1.o. Separate i386-elf crt1.c into the pure assembler part and C code. Tested by: Mykola Dzham Added: stable/7/lib/csu/i386-elf/crt1_c.c - copied unchanged from r200038, head/lib/csu/i386-elf/crt1_c.c stable/7/lib/csu/i386-elf/crt1_s.S - copied unchanged from r200038, head/lib/csu/i386-elf/crt1_s.S Deleted: stable/7/lib/csu/i386-elf/crt1.c Modified: stable/7/contrib/gcc/config/freebsd-spec.h stable/7/lib/csu/amd64/Makefile stable/7/lib/csu/arm/Makefile stable/7/lib/csu/i386-elf/Makefile stable/7/lib/csu/ia64/Makefile stable/7/lib/csu/powerpc/Makefile stable/7/lib/csu/sparc64/Makefile Directory Properties: stable/7/contrib/gcc/ (props changed) stable/7/lib/csu/ (props changed) Modified: stable/7/contrib/gcc/config/freebsd-spec.h ============================================================================== --- stable/7/contrib/gcc/config/freebsd-spec.h Tue Jan 19 20:05:20 2010 (r202647) +++ stable/7/contrib/gcc/config/freebsd-spec.h Tue Jan 19 20:19:52 2010 (r202648) @@ -102,9 +102,10 @@ Boston, MA 02110-1301, USA. */ %{p:gcrt1.o%s} \ %{!p: \ %{profile:gcrt1.o%s} \ - %{!profile:crt1.o%s}}}} \ + %{!profile: \ + %{pie: Scrt1.o%s;:crt1.o%s}}}}} \ crti.o%s \ - %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}" + %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" /* Provide an ENDFILE_SPEC appropriate for FreeBSD/i386. Here we tack on our own magical crtend.o file (see crtstuff.c) which provides part of @@ -112,8 +113,7 @@ Boston, MA 02110-1301, USA. */ entering `main', followed by the normal "finalizer" file, `crtn.o'. */ #define FBSD_ENDFILE_SPEC "\ - %{!shared:crtend.o%s} \ - %{shared:crtendS.o%s} \ + %{shared|pie:crtendS.o%s;:crtend.o%s} \ crtn.o%s " /* Provide a LIB_SPEC appropriate for FreeBSD as configured and as Modified: stable/7/lib/csu/amd64/Makefile ============================================================================== --- stable/7/lib/csu/amd64/Makefile Tue Jan 19 20:05:20 2010 (r202647) +++ stable/7/lib/csu/amd64/Makefile Tue Jan 19 20:19:52 2010 (r202648) @@ -4,7 +4,7 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= gcrt1.o +OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include CFLAGS+= -fno-omit-frame-pointer @@ -16,6 +16,9 @@ CLEANFILES= ${OBJS} gcrt1.o: crt1.c ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.CURDIR}/crt1.c +Scrt1.o: crt1.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.CURDIR}/crt1.c + realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${OBJS} ${DESTDIR}${LIBDIR} Modified: stable/7/lib/csu/arm/Makefile ============================================================================== --- stable/7/lib/csu/arm/Makefile Tue Jan 19 20:05:20 2010 (r202647) +++ stable/7/lib/csu/arm/Makefile Tue Jan 19 20:19:52 2010 (r202648) @@ -4,7 +4,7 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= gcrt1.o +OBJS+= Scrt1.o gcrt1.o CFLAGS+= -Wall -Wno-unused \ -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include @@ -16,6 +16,9 @@ CLEANFILES= ${OBJS} gcrt1.o: crt1.c ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.ALLSRC} +Scrt1.o: crt1.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.ALLSRC} + realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${OBJS} ${DESTDIR}${LIBDIR} Modified: stable/7/lib/csu/i386-elf/Makefile ============================================================================== --- stable/7/lib/csu/i386-elf/Makefile Tue Jan 19 20:05:20 2010 (r202647) +++ stable/7/lib/csu/i386-elf/Makefile Tue Jan 19 20:19:52 2010 (r202648) @@ -2,8 +2,8 @@ .PATH: ${.CURDIR}/../common -SRCS= crt1.c crti.S crtn.S -FILES= ${SRCS:N*.h:R:S/$/.o/g} gcrt1.o +SRCS= crti.S crtn.S +FILES= ${SRCS:N*.h:R:S/$/.o/g} gcrt1.o crt1.o Scrt1.o FILESOWN= ${LIBOWN} FILESGRP= ${LIBGRP} FILESMODE= ${LIBMODE} @@ -11,9 +11,23 @@ FILESDIR= ${LIBDIR} WARNS?= 6 CFLAGS+= -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include -CLEANFILES= ${FILES} +CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o -gcrt1.o: crt1.c - ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.CURDIR}/crt1.c +gcrt1_c.o: crt1_c.c + ${CC} ${CFLAGS} -DGCRT -c -o gcrt1_c.o ${.CURDIR}/crt1_c.c + +gcrt1.o: gcrt1_c.o crt1_s.o + ${LD} ${LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o + +crt1.o: crt1_c.o crt1_s.o + ${LD} ${LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o + objcopy --localize-symbol _start1 crt1.o + +Scrt1_c.o: crt1_c.c + ${CC} ${CFLAGS} -DGCRT -fPIC -DPIC -c -o Scrt1_c.o ${.CURDIR}/crt1_c.c + +Scrt1.o: Scrt1_c.o crt1_s.o + ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o + objcopy --localize-symbol _start1 Scrt1.o .include Copied: stable/7/lib/csu/i386-elf/crt1_c.c (from r200038, head/lib/csu/i386-elf/crt1_c.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/csu/i386-elf/crt1_c.c Tue Jan 19 20:19:52 2010 (r202648, copy of r200038, head/lib/csu/i386-elf/crt1_c.c) @@ -0,0 +1,95 @@ +/* LINTLIBRARY */ +/*- + * Copyright 1996-1998 John D. Polstra. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef lint +#ifndef __GNUC__ +#error "GCC is needed to compile this file" +#endif +#endif /* lint */ + +#include + +#include "libc_private.h" +#include "crtbrand.c" + +extern int _DYNAMIC; +#pragma weak _DYNAMIC + +typedef void (*fptr)(void); + +extern void _fini(void); +extern void _init(void); +extern int main(int, char **, char **); +extern void _start(char *, ...); + +#ifdef GCRT +extern void _mcleanup(void); +extern void monstartup(void *, void *); +extern int eprol; +extern int etext; +#endif + +char **environ; +const char *__progname = ""; + +void _start1(fptr, int, char *[]) __dead2; + +/* The entry function, C part. */ +void +_start1(fptr cleanup, int argc, char *argv[]) +{ + char **env; + const char *s; + + env = argv + argc + 1; + environ = env; + if (argc > 0 && argv[0] != NULL) { + __progname = argv[0]; + for (s = __progname; *s != '\0'; s++) + if (*s == '/') + __progname = s + 1; + } + + if (&_DYNAMIC != NULL) + atexit(cleanup); + else + _init_tls(); + +#ifdef GCRT + atexit(_mcleanup); +#endif + atexit(_fini); +#ifdef GCRT + monstartup(&eprol, &etext); +__asm__("eprol:"); +#endif + _init(); + exit( main(argc, argv, env) ); +} + +__asm(".hidden _start1"); Copied: stable/7/lib/csu/i386-elf/crt1_s.S (from r200038, head/lib/csu/i386-elf/crt1_s.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/csu/i386-elf/crt1_s.S Tue Jan 19 20:19:52 2010 (r202648, copy of r200038, head/lib/csu/i386-elf/crt1_s.S) @@ -0,0 +1,44 @@ +/*- + * Copyright 2009 Konstantin Belousov. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + + + .text + .align 4 + .globl _start + .type _start, @function +_start: xorl %ebp,%ebp + pushl %ebp + movl %esp,%ebp + andl $0xfffffff0,%esp # align stack + leal 8(%ebp),%eax + pushl %eax # argv + pushl 4(%ebp) # argc + pushl %edx # rtld cleanup + call _start1 + .size _start, . - _start + + .ident "$FreeBSD$" Modified: stable/7/lib/csu/ia64/Makefile ============================================================================== --- stable/7/lib/csu/ia64/Makefile Tue Jan 19 20:05:20 2010 (r202647) +++ stable/7/lib/csu/ia64/Makefile Tue Jan 19 20:19:52 2010 (r202648) @@ -4,7 +4,7 @@ SRCS= crt1.S crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= gcrt1.o +OBJS+= Scrt1.o gcrt1.o CFLAGS+= -Wall -Wno-unused \ -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include @@ -16,6 +16,9 @@ CLEANFILES= ${OBJS} gcrt1.o: crt1.S ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.ALLSRC} +Scrt1.o: crt1.S + ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.ALLSRC} + realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${OBJS} ${DESTDIR}${LIBDIR} Modified: stable/7/lib/csu/powerpc/Makefile ============================================================================== --- stable/7/lib/csu/powerpc/Makefile Tue Jan 19 20:05:20 2010 (r202647) +++ stable/7/lib/csu/powerpc/Makefile Tue Jan 19 20:19:52 2010 (r202648) @@ -4,7 +4,7 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= gcrt1.o +OBJS+= Scrt1.o gcrt1.o CFLAGS+= -Wall -Wno-unused \ -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include @@ -16,6 +16,9 @@ CLEANFILES= ${OBJS} gcrt1.o: crt1.c ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.ALLSRC} +Scrt1.o: crt1.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.ALLSRC} + realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${OBJS} ${DESTDIR}${LIBDIR} Modified: stable/7/lib/csu/sparc64/Makefile ============================================================================== --- stable/7/lib/csu/sparc64/Makefile Tue Jan 19 20:05:20 2010 (r202647) +++ stable/7/lib/csu/sparc64/Makefile Tue Jan 19 20:19:52 2010 (r202648) @@ -4,7 +4,7 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= gcrt1.o +OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common -I${.CURDIR}/../../libc/include all: ${OBJS} @@ -14,6 +14,9 @@ CLEANFILES= ${OBJS} gcrt1.o: crt1.c ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.ALLSRC} +Scrt1.o: crt1.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.ALLSRC} + realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${OBJS} ${DESTDIR}${LIBDIR} From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 20:35:44 2010 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 6B527106566B; Tue, 19 Jan 2010 20:35:44 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5D48FC15; Tue, 19 Jan 2010 20:35:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JKZiYK000509; Tue, 19 Jan 2010 20:35:44 GMT (envelope-from fanf@svn.freebsd.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JKZi31000507; Tue, 19 Jan 2010 20:35:44 GMT (envelope-from fanf@svn.freebsd.org) Message-Id: <201001192035.o0JKZi31000507@svn.freebsd.org> From: Tony Finch Date: Tue, 19 Jan 2010 20:35: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: r202649 - head/usr.bin/unifdef 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: Tue, 19 Jan 2010 20:35:44 -0000 Author: fanf Date: Tue Jan 19 20:35:44 2010 New Revision: 202649 URL: http://svn.freebsd.org/changeset/base/202649 Log: Fix portability to 64 bit platforms. printf("%.*s",i,s) expects an int not a ptrdiff_t Thanks to bf1783 (at) googlemail.com for the bug report. Modified: head/usr.bin/unifdef/unifdef.c Modified: head/usr.bin/unifdef/unifdef.c ============================================================================== --- head/usr.bin/unifdef/unifdef.c Tue Jan 19 20:19:52 2010 (r202648) +++ head/usr.bin/unifdef/unifdef.c Tue Jan 19 20:35:44 2010 (r202649) @@ -334,7 +334,7 @@ main(int argc, char *argv[]) if (dirsep != NULL) snprintf(tempname, sizeof(tempname), "%.*s/" TEMPLATE, - dirsep - ofilename, ofilename); + (int)(dirsep - ofilename), ofilename); else strlcpy(tempname, TEMPLATE, sizeof(tempname)); ofd = mkstemp(tempname); From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 20:36:15 2010 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 908CB106566C; Tue, 19 Jan 2010 20:36:15 +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 5C2BC8FC13; Tue, 19 Jan 2010 20:36:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JKaFpn000650; Tue, 19 Jan 2010 20:36:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JKaFmQ000648; Tue, 19 Jan 2010 20:36:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001192036.o0JKaFmQ000648@svn.freebsd.org> From: John Baldwin Date: Tue, 19 Jan 2010 20:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202650 - head/share/man/man9 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: Tue, 19 Jan 2010 20:36:15 -0000 Author: jhb Date: Tue Jan 19 20:36:15 2010 New Revision: 202650 URL: http://svn.freebsd.org/changeset/base/202650 Log: Sort NDHASGIANT.9 link properly. Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Jan 19 20:35:44 2010 (r202649) +++ head/share/man/man9/Makefile Tue Jan 19 20:36:15 2010 (r202650) @@ -903,8 +903,8 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 mtx_unlock_spin.9 \ mutex.9 mtx_unlock_spin_flags.9 MLINKS+=namei.9 NDFREE.9 \ - namei.9 NDINIT.9 \ - namei.9 NDHASGIANT.9 + namei.9 NDHASGIANT.9 \ + namei.9 NDINIT.9 MLINKS+=pbuf.9 getpbuf.9 \ pbuf.9 relpbuf.9 \ pbuf.9 trypbuf.9 From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 20:48:23 2010 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 831741065672; Tue, 19 Jan 2010 20:48: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 7144C8FC2A; Tue, 19 Jan 2010 20:48:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JKmNko003452; Tue, 19 Jan 2010 20:48:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JKmNbY003449; Tue, 19 Jan 2010 20:48:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001192048.o0JKmNbY003449@svn.freebsd.org> From: John Baldwin Date: Tue, 19 Jan 2010 20:48:23 +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: r202652 - stable/8/share/man/man9 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: Tue, 19 Jan 2010 20:48:23 -0000 Author: jhb Date: Tue Jan 19 20:48:23 2010 New Revision: 202652 URL: http://svn.freebsd.org/changeset/base/202652 Log: MFC 202284,202650: - Update required headers for namei() to add and remove . - Add RETURN VALUES and ERROR sections for namei()'s error return values. - Add a missing link to NDHASGIANT.9. Modified: stable/8/share/man/man9/Makefile stable/8/share/man/man9/namei.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Tue Jan 19 20:44:37 2010 (r202651) +++ stable/8/share/man/man9/Makefile Tue Jan 19 20:48:23 2010 (r202652) @@ -898,6 +898,7 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 mtx_unlock_spin.9 \ mutex.9 mtx_unlock_spin_flags.9 MLINKS+=namei.9 NDFREE.9 \ + namei.9 NDHASGIANT.9 \ namei.9 NDINIT.9 MLINKS+=pbuf.9 getpbuf.9 \ pbuf.9 relpbuf.9 \ Modified: stable/8/share/man/man9/namei.9 ============================================================================== --- stable/8/share/man/man9/namei.9 Tue Jan 19 20:44:37 2010 (r202651) +++ stable/8/share/man/man9/namei.9 Tue Jan 19 20:48:23 2010 (r202652) @@ -44,7 +44,7 @@ .Nd pathname translation and lookup operations .Sh SYNOPSIS .In sys/param.h -.In sys/proc.h +.In sys/fcntl.h .In sys/namei.h .Ft int .Fn namei "struct nameidata *ndp" @@ -315,6 +315,34 @@ flag can be passed to the .Fn NDFREE function. .El +.Sh RETURN VALUES +If successful, +.Fn namei +will return 0, otherwise it will return an error. +.Sh ERRORS +Errors which +.Fn namei +may return: +.Bl -tag -width Er +.It Bq Er ENOTDIR +A component of the specified pathname is not a directory when a directory is +expected. +.It Bq Er ENAMETOOLONG +A component of a pathname exceeded 255 characters, +or an entire pathname exceeded 1023 characters. +.It Bq Er ENOENT +A component of the specified pathname does not exist, +or the pathname is an empty string. +.It Bq Er ACCES +An attempt is made to access a file in a way forbidden by its file access +permissions. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the pathname. +.It Bq Er EISDIR +An attempt is made to open a directory with write mode specified. +.It Bq Er EROFS +An attempt is made to modify a file or directory on a read-only file system. +.El .Sh FILES .Bl -tag .It Pa src/sys/kern/vfs_lookup.c From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 20:48:57 2010 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 B48AC1065692; Tue, 19 Jan 2010 20:48:57 +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 8979D8FC29; Tue, 19 Jan 2010 20:48:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JKmvHZ003618; Tue, 19 Jan 2010 20:48:57 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JKmvmK003615; Tue, 19 Jan 2010 20:48:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001192048.o0JKmvmK003615@svn.freebsd.org> From: John Baldwin Date: Tue, 19 Jan 2010 20:48:57 +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: r202653 - stable/7/share/man/man9 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: Tue, 19 Jan 2010 20:48:57 -0000 Author: jhb Date: Tue Jan 19 20:48:57 2010 New Revision: 202653 URL: http://svn.freebsd.org/changeset/base/202653 Log: MFC 202284,202650: - Update required headers for namei() to remove . - Add RETURN VALUES and ERROR sections for namei()'s error return values. - Add a missing link to NDHASGIANT.9. Modified: stable/7/share/man/man9/Makefile stable/7/share/man/man9/namei.9 Directory Properties: stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man9/Makefile ============================================================================== --- stable/7/share/man/man9/Makefile Tue Jan 19 20:48:23 2010 (r202652) +++ stable/7/share/man/man9/Makefile Tue Jan 19 20:48:57 2010 (r202653) @@ -852,6 +852,7 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 mtx_unlock_spin.9 \ mutex.9 mtx_unlock_spin_flags.9 MLINKS+=namei.9 NDFREE.9 \ + namei.9 NDHASGIANT.9 \ namei.9 NDINIT.9 MLINKS+=pbuf.9 getpbuf.9 \ pbuf.9 relpbuf.9 \ Modified: stable/7/share/man/man9/namei.9 ============================================================================== --- stable/7/share/man/man9/namei.9 Tue Jan 19 20:48:23 2010 (r202652) +++ stable/7/share/man/man9/namei.9 Tue Jan 19 20:48:57 2010 (r202653) @@ -44,7 +44,7 @@ .Nd pathname translation and lookup operations .Sh SYNOPSIS .In sys/param.h -.In sys/proc.h +.\".In sys/fcntl.h .In sys/namei.h .Ft int .Fn namei "struct nameidata *ndp" @@ -315,6 +315,34 @@ flag can be passed to the .Fn NDFREE function. .El +.Sh RETURN VALUES +If successful, +.Fn namei +will return 0, otherwise it will return an error. +.Sh ERRORS +Errors which +.Fn namei +may return: +.Bl -tag -width Er +.It Bq Er ENOTDIR +A component of the specified pathname is not a directory when a directory is +expected. +.It Bq Er ENAMETOOLONG +A component of a pathname exceeded 255 characters, +or an entire pathname exceeded 1023 characters. +.It Bq Er ENOENT +A component of the specified pathname does not exist, +or the pathname is an empty string. +.It Bq Er ACCES +An attempt is made to access a file in a way forbidden by its file access +permissions. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the pathname. +.It Bq Er EISDIR +An attempt is made to open a directory with write mode specified. +.It Bq Er EROFS +An attempt is made to modify a file or directory on a read-only file system. +.El .Sh FILES .Bl -tag .It Pa src/sys/kern/vfs_lookup.c From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 20:55:57 2010 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 BAFA2106566C; Tue, 19 Jan 2010 20:55:57 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8F828FC19; Tue, 19 Jan 2010 20:55:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JKtven005201; Tue, 19 Jan 2010 20:55:57 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JKtvTC005199; Tue, 19 Jan 2010 20:55:57 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201001192055.o0JKtvTC005199@svn.freebsd.org> From: Fabien Thomas Date: Tue, 19 Jan 2010 20:55:57 +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: r202654 - stable/8/lib/libpmc 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: Tue, 19 Jan 2010 20:55:57 -0000 Author: fabient Date: Tue Jan 19 20:55:57 2010 New Revision: 202654 URL: http://svn.freebsd.org/changeset/base/202654 Log: MFC 202157: Bug fix: add a missing initializer. Modified: stable/8/lib/libpmc/libpmc.c Directory Properties: stable/8/lib/libpmc/ (props changed) Modified: stable/8/lib/libpmc/libpmc.c ============================================================================== --- stable/8/lib/libpmc/libpmc.c Tue Jan 19 20:48:57 2010 (r202653) +++ stable/8/lib/libpmc/libpmc.c Tue Jan 19 20:55:57 2010 (r202654) @@ -2507,6 +2507,7 @@ pmc_init(void) break; case PMC_CPU_INTEL_CORE: PMC_MDEP_INIT(core); + pmc_class_table[n] = &core_class_table_descr; break; case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 20:56:57 2010 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 91AF310656A5; Tue, 19 Jan 2010 20:56:57 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 802298FC22; Tue, 19 Jan 2010 20:56:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JKuvgx005475; Tue, 19 Jan 2010 20:56:57 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JKuvG2005473; Tue, 19 Jan 2010 20:56:57 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201001192056.o0JKuvG2005473@svn.freebsd.org> From: Fabien Thomas Date: Tue, 19 Jan 2010 20:56:57 +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: r202655 - stable/7/lib/libpmc 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: Tue, 19 Jan 2010 20:56:57 -0000 Author: fabient Date: Tue Jan 19 20:56:57 2010 New Revision: 202655 URL: http://svn.freebsd.org/changeset/base/202655 Log: MFC 202157: Bug fix: add a missing initializer. Modified: stable/7/lib/libpmc/libpmc.c Directory Properties: stable/7/lib/libpmc/ (props changed) Modified: stable/7/lib/libpmc/libpmc.c ============================================================================== --- stable/7/lib/libpmc/libpmc.c Tue Jan 19 20:55:57 2010 (r202654) +++ stable/7/lib/libpmc/libpmc.c Tue Jan 19 20:56:57 2010 (r202655) @@ -2507,6 +2507,7 @@ pmc_init(void) break; case PMC_CPU_INTEL_CORE: PMC_MDEP_INIT(core); + pmc_class_table[n] = &core_class_table_descr; break; case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 22:03:45 2010 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 D4E6C106570A; Tue, 19 Jan 2010 22:03:45 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2EF18FC28; Tue, 19 Jan 2010 22:03:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JM3jJt020254; Tue, 19 Jan 2010 22:03:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JM3jQo020252; Tue, 19 Jan 2010 22:03:45 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001192203.o0JM3jQo020252@svn.freebsd.org> From: Marius Strobl Date: Tue, 19 Jan 2010 22:03:45 +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: r202656 - stable/7/release/doc/en_US.ISO8859-1/hardware 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: Tue, 19 Jan 2010 22:03:45 -0000 Author: marius Date: Tue Jan 19 22:03:45 2010 New Revision: 202656 URL: http://svn.freebsd.org/changeset/base/202656 Log: MFC: r197368 - Update the list of known-working machines based on feedback for 7.2. - Update the V440 entry regarding added support for the on-board NICs in 7.3 and 8.0. Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: stable/7/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 20:56:57 2010 (r202655) +++ stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 22:03:45 2010 (r202656) @@ -464,15 +464,24 @@ &sun.blade; 2000 + &sun.blade; 2500 + + + &sun.fire; 280R &sun.fire; V210 - &sun.fire; V440 (except for the on-board NICs) + &sun.fire; V250 + &sun.fire; V440 (support for the on-board NICs first + appeared in 7.3-RELEASE and 8.0-RELEASE) + + + &sun.fire; V880 From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 22:09:43 2010 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 532AD1065672; Tue, 19 Jan 2010 22:09:43 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 413BA8FC16; Tue, 19 Jan 2010 22:09:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JM9hki021590; Tue, 19 Jan 2010 22:09:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JM9gW5021587; Tue, 19 Jan 2010 22:09:42 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001192209.o0JM9gW5021587@svn.freebsd.org> From: Marius Strobl Date: Tue, 19 Jan 2010 22:09:42 +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: r202657 - stable/8/release/doc/en_US.ISO8859-1/hardware 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: Tue, 19 Jan 2010 22:09:43 -0000 Author: marius Date: Tue Jan 19 22:09:41 2010 New Revision: 202657 URL: http://svn.freebsd.org/changeset/base/202657 Log: MFC: r202453 Update the sparc64 hardware list regarding machines that will be supported by 7.3-RELEASE. Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 22:03:45 2010 (r202656) +++ stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 22:09:41 2010 (r202657) @@ -515,6 +515,10 @@ + &sun.fire; V215 (support first appeared in 7.3-RELEASE) + + + &sun.fire; V250 @@ -524,6 +528,11 @@ + &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for + which support first appeared in 7.3-RELEASE) + + + &sun.fire; V880 @@ -543,6 +552,10 @@ &sun.fire; V240 + + + &sun.fire; V245 (support first appeared in 7.3-RELEASE) + From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 22:09:45 2010 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 6E4A21065692; Tue, 19 Jan 2010 22:09:45 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C3798FC0C; Tue, 19 Jan 2010 22:09:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JM9jcE021655; Tue, 19 Jan 2010 22:09:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JM9jOE021653; Tue, 19 Jan 2010 22:09:45 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001192209.o0JM9jOE021653@svn.freebsd.org> From: Marius Strobl Date: Tue, 19 Jan 2010 22:09:45 +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: r202658 - stable/7/release/doc/en_US.ISO8859-1/hardware 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: Tue, 19 Jan 2010 22:09:45 -0000 Author: marius Date: Tue Jan 19 22:09:45 2010 New Revision: 202658 URL: http://svn.freebsd.org/changeset/base/202658 Log: MFC: r202453 Update the sparc64 hardware list regarding machines that will be supported by 7.3-RELEASE. Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: stable/7/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 22:09:41 2010 (r202657) +++ stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 22:09:45 2010 (r202658) @@ -466,7 +466,6 @@ &sun.blade; 2500 - &sun.fire; 280R @@ -474,13 +473,19 @@ &sun.fire; V210 + &sun.fire; V215 (support first appeared in 7.3-RELEASE) + + &sun.fire; V250 &sun.fire; V440 (support for the on-board NICs first appeared in 7.3-RELEASE and 8.0-RELEASE) - + + &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for + which support first appeared in 7.3-RELEASE) + &sun.fire; V880 @@ -499,6 +504,9 @@ &sun.fire; V240 + + &sun.fire; V245 (support first appeared in 7.3-RELEASE) + From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 22:44:30 2010 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 1044A106566C; Tue, 19 Jan 2010 22:44:30 +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 F2D348FC15; Tue, 19 Jan 2010 22:44:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JMiTXc029298; Tue, 19 Jan 2010 22:44:29 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JMiTFl029296; Tue, 19 Jan 2010 22:44:29 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001192244.o0JMiTFl029296@svn.freebsd.org> From: Christian Brueffer Date: Tue, 19 Jan 2010 22:44:29 +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: r202659 - head/release/doc/en_US.ISO8859-1/hardware 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: Tue, 19 Jan 2010 22:44:30 -0000 Author: brueffer Date: Tue Jan 19 22:44:29 2010 New Revision: 202659 URL: http://svn.freebsd.org/changeset/base/202659 Log: We don't support isdn devices anymore (since May 2008). PR: 142970 Submitted by: Matthias Meyser MFC after: 1 week Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 22:09:45 2010 (r202658) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 22:44:29 2010 (r202659) @@ -979,138 +979,6 @@ &hwlist.cm; - - ISDN Interfaces - - [&arch.i386;] AcerISDN P10 ISA PnP (experimental) - - [&arch.i386;] Asuscom ISDNlink 128K ISA - - [&arch.i386;] ASUSCOM P-IN100-ST-D (and other Winbond - W6692-based cards) - - [&arch.i386;] AVM - - - - A1 - - - - B1 ISA (tested with V2.0) - - - - B1 PCI (tested with V4.0) - - - - Fritz!Card classic - - - - Fritz!Card PnP - - - - Fritz!Card PCI - - - - Fritz!Card PCI, Version 2 - - - - T1 - - - - [&arch.i386;] Creatix - - - - ISDN-S0 - - - - ISDN-S0 P&P - - - - [&arch.i386;] Compaq Microcom 610 ISDN (Compaq series - PSB2222I) ISA PnP - - [&arch.i386;] Dr. Neuhaus Niccy Go@ and compatibles - - [&arch.i386;] Dynalink IS64PPH and IS64PPH+ - - [&arch.i386;] Eicon Diehl DIVA 2.0 and 2.02 - - [&arch.i386;] ELSA - - - - ELSA PCC-16 - - - - QuickStep 1000pro ISA - - - - MicroLink ISDN/PCI - - - - QuickStep 1000pro PCI - - - - [&arch.i386;] ITK ix1 Micro ( < V.3, non-PnP version - ) - - [&arch.i386;] Sedlbauer Win Speed - - [&arch.i386;] Siemens I-Surf 2.0 - - [&arch.i386;] TELEINT ISDN SPEED No.1 - (experimental) - - [&arch.i386;] Teles - - - - S0/8 - - - - S0/16 - - - - S0/16.3 - - - - S0/16.3 PnP - - - - 16.3c ISA PnP (experimental) - - - - Teles PCI-TJ - - - - [&arch.i386;] Traverse Technologies NETjet-S PCI - - [&arch.i386;] USRobotics Sportster ISDN TA intern - - [&arch.i386;] Winbond W6692 based PCI cards - - Serial Interfaces From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 23:07:12 2010 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 604D91065679; Tue, 19 Jan 2010 23:07:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FCBC8FC13; Tue, 19 Jan 2010 23:07:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JN7Ce3034321; Tue, 19 Jan 2010 23:07:12 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JN7CKu034318; Tue, 19 Jan 2010 23:07:12 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001192307.o0JN7CKu034318@svn.freebsd.org> From: Ed Schouten Date: Tue, 19 Jan 2010 23:07: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: r202661 - head/lib/libc/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: Tue, 19 Jan 2010 23:07:12 -0000 Author: ed Date: Tue Jan 19 23:07:12 2010 New Revision: 202661 URL: http://svn.freebsd.org/changeset/base/202661 Log: Revert r202447 by re-exposing the old uname(3) function. It makes hardly any sense to expose a symbol which should only be provided for binary compatibility, but it seems we don't have a lot of choice here. There are many autoconf scripts out there that try to create a binary that links against the old symbol to see whether uname(3) is present. These scripts fail to detect uname(3) now. It should be noted that the behaviour we implement is not against the standards: | The following shall be declared as a function and may also be defined | as a macro: | | int uname(struct utsname *); Modified: head/lib/libc/gen/Symbol.map head/lib/libc/gen/uname.c Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Tue Jan 19 23:03:08 2010 (r202660) +++ head/lib/libc/gen/Symbol.map Tue Jan 19 23:07:12 2010 (r202661) @@ -296,6 +296,7 @@ FBSD_1.0 { tcflow; ualarm; ulimit; + uname; unvis; strunvis; strunvisx; Modified: head/lib/libc/gen/uname.c ============================================================================== --- head/lib/libc/gen/uname.c Tue Jan 19 23:03:08 2010 (r202660) +++ head/lib/libc/gen/uname.c Tue Jan 19 23:07:12 2010 (r202661) @@ -33,15 +33,15 @@ static char sccsid[] = "From: @(#)uname. #include __FBSDID("$FreeBSD$"); +#define uname wrapped_uname #include #include #include #include +#undef uname int -__uname(struct utsname *name) +uname(struct utsname *name) { return __xuname(32, name); } - -__sym_compat(uname, __uname, FBSD_1.0); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 00:17:41 2010 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 7BF85106568F; Wed, 20 Jan 2010 00:17:41 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (lefty.soaustin.net [66.135.55.46]) by mx1.freebsd.org (Postfix) with ESMTP id 5B1618FC1B; Wed, 20 Jan 2010 00:17:41 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id B8FA98C092; Tue, 19 Jan 2010 18:17:40 -0600 (CST) Date: Tue, 19 Jan 2010 18:17:40 -0600 From: Mark Linimon To: Ed Schouten Message-ID: <20100120001740.GB27564@lonesome.com> References: <201001192307.o0JN7CKu034318@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001192307.o0JN7CKu034318@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202661 - head/lib/libc/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: Wed, 20 Jan 2010 00:17:41 -0000 Thank you. mcl From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 00:23:26 2010 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 403621065676; Wed, 20 Jan 2010 00:23:26 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id F24318FC14; Wed, 20 Jan 2010 00:23:25 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o0K0NKo4032268; Tue, 19 Jan 2010 19:23:20 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o0K0NJjd032267; Tue, 19 Jan 2010 19:23:19 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Tue, 19 Jan 2010 19:23:19 -0500 From: David Schultz To: Ed Schouten Message-ID: <20100120002319.GA31669@zim.MIT.EDU> Mail-Followup-To: Ed Schouten , Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> <20100119163709.GW64905@hoeg.nl> <4B55E577.10105@freebsd.org> <20100119170400.GY64905@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100119170400.GY64905@hoeg.nl> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Andriy Gapon Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Wed, 20 Jan 2010 00:23:26 -0000 __gnu89_inline was the only way to write a program with non-static inline functions that would compile and link both with older versions of gcc, and with newer versions of gcc in C99 mode. This is because gcc in 8.x (as well as Clang and gcc 4.3+ from ports) use C99 inline semantics in the c99 and gnu99 modes, whereas gcc in 7.x and earlier use the incompatible GNU semantics regardless of what mode you asked for. A small number of ports might use it, but more likely they just use --std=gnu89 or --std=gnu99 depending on which standard they were written to. I'm not sure whether __gnu89_inline ought to be removed from cdefs.h just yet, but if nobody uses it or cares about it, then I'm happy to burn this bridge. From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 00:43:15 2010 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 D1D06106568B; Wed, 20 Jan 2010 00:43:15 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A71DF8FC18; Wed, 20 Jan 2010 00:43:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K0hFZL055348; Wed, 20 Jan 2010 00:43:15 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K0hFvk055345; Wed, 20 Jan 2010 00:43:15 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200043.o0K0hFvk055345@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 00:43:15 +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: r202662 - stable/8/usr.sbin/burncd 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: Wed, 20 Jan 2010 00:43:15 -0000 Author: delphij Date: Wed Jan 20 00:43:15 2010 New Revision: 202662 URL: http://svn.freebsd.org/changeset/base/202662 Log: MFC r200795: Add support of using environment variable BURNCD_SPEED to specify recodring speed. PR: bin/140530 Submitted by: Alexander Best Modified: stable/8/usr.sbin/burncd/burncd.8 stable/8/usr.sbin/burncd/burncd.c Directory Properties: stable/8/usr.sbin/burncd/ (props changed) Modified: stable/8/usr.sbin/burncd/burncd.8 ============================================================================== --- stable/8/usr.sbin/burncd/burncd.8 Tue Jan 19 23:07:12 2010 (r202661) +++ stable/8/usr.sbin/burncd/burncd.8 Wed Jan 20 00:43:15 2010 (r202662) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2005 +.Dd December 21, 2009 .Os .Dt BURNCD 8 .Sh NAME @@ -158,7 +158,11 @@ refers to stdin, and can only be used on .Sh ENVIRONMENT The following environment variables affect the execution of .Nm : -.Bl -tag -width ".Ev CDROM" +.Bl -tag -width ".Ev BURNCD_SPEED" +.It Ev BURNCD_SPEED +The write speed to use if one is not specified with the +.Fl s +flag. .It Ev CDROM The CD device to use if one is not specified with the .Fl f Modified: stable/8/usr.sbin/burncd/burncd.c ============================================================================== --- stable/8/usr.sbin/burncd/burncd.c Tue Jan 19 23:07:12 2010 (r202661) +++ stable/8/usr.sbin/burncd/burncd.c Wed Jan 20 00:43:15 2010 (r202662) @@ -80,11 +80,13 @@ main(int argc, char **argv) int dao = 0, eject = 0, fixate = 0, list = 0, multi = 0, preemp = 0; int nogap = 0, speed = 4 * 177, test_write = 0, force = 0; int block_size = 0, block_type = 0, cdopen = 0, dvdrw = 0; - const char *dev; + const char *dev, *env_speed; if ((dev = getenv("CDROM")) == NULL) dev = "/dev/acd0"; + env_speed = getenv("BURNCD_SPEED"); + while ((ch = getopt(argc, argv, "def:Flmnpqs:tv")) != -1) { switch (ch) { case 'd': @@ -124,12 +126,7 @@ main(int argc, char **argv) break; case 's': - if (strcasecmp("max", optarg) == 0) - speed = CDR_MAX_SPEED; - else - speed = atoi(optarg) * 177; - if (speed <= 0) - errx(EX_USAGE, "Invalid speed: %s", optarg); + env_speed = optarg; break; case 't': @@ -147,6 +144,15 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (env_speed == NULL) + ; + else if (strcasecmp("max", env_speed) == 0) + speed = CDR_MAX_SPEED; + else + speed = atoi(env_speed) * 177; + if (speed <= 0) + errx(EX_USAGE, "Invalid speed: %s", optarg); + if (argc == 0) usage(); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 00:46:56 2010 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 05F7C1065676; Wed, 20 Jan 2010 00:46:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF11E8FC15; Wed, 20 Jan 2010 00:46:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K0ktVl056203; Wed, 20 Jan 2010 00:46:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K0ktng056200; Wed, 20 Jan 2010 00:46:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200046.o0K0ktng056200@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 00:46:55 +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: r202663 - stable/7/usr.sbin/burncd 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: Wed, 20 Jan 2010 00:46:56 -0000 Author: delphij Date: Wed Jan 20 00:46:55 2010 New Revision: 202663 URL: http://svn.freebsd.org/changeset/base/202663 Log: MFC r200795: Add support of using environment variable BURNCD_SPEED to specify recodring speed. PR: bin/140530 Submitted by: Alexander Best Modified: stable/7/usr.sbin/burncd/burncd.8 stable/7/usr.sbin/burncd/burncd.c Directory Properties: stable/7/usr.sbin/burncd/ (props changed) Modified: stable/7/usr.sbin/burncd/burncd.8 ============================================================================== --- stable/7/usr.sbin/burncd/burncd.8 Wed Jan 20 00:43:15 2010 (r202662) +++ stable/7/usr.sbin/burncd/burncd.8 Wed Jan 20 00:46:55 2010 (r202663) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2005 +.Dd December 21, 2009 .Os .Dt BURNCD 8 .Sh NAME @@ -158,7 +158,11 @@ refers to stdin, and can only be used on .Sh ENVIRONMENT The following environment variables affect the execution of .Nm : -.Bl -tag -width ".Ev CDROM" +.Bl -tag -width ".Ev BURNCD_SPEED" +.It Ev BURNCD_SPEED +The write speed to use if one is not specified with the +.Fl s +flag. .It Ev CDROM The CD device to use if one is not specified with the .Fl f Modified: stable/7/usr.sbin/burncd/burncd.c ============================================================================== --- stable/7/usr.sbin/burncd/burncd.c Wed Jan 20 00:43:15 2010 (r202662) +++ stable/7/usr.sbin/burncd/burncd.c Wed Jan 20 00:46:55 2010 (r202663) @@ -80,11 +80,13 @@ main(int argc, char **argv) int dao = 0, eject = 0, fixate = 0, list = 0, multi = 0, preemp = 0; int nogap = 0, speed = 4 * 177, test_write = 0, force = 0; int block_size = 0, block_type = 0, cdopen = 0, dvdrw = 0; - const char *dev; + const char *dev, *env_speed; if ((dev = getenv("CDROM")) == NULL) dev = "/dev/acd0"; + env_speed = getenv("BURNCD_SPEED"); + while ((ch = getopt(argc, argv, "def:Flmnpqs:tv")) != -1) { switch (ch) { case 'd': @@ -124,12 +126,7 @@ main(int argc, char **argv) break; case 's': - if (strcasecmp("max", optarg) == 0) - speed = CDR_MAX_SPEED; - else - speed = atoi(optarg) * 177; - if (speed <= 0) - errx(EX_USAGE, "Invalid speed: %s", optarg); + env_speed = optarg; break; case 't': @@ -147,6 +144,15 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (env_speed == NULL) + ; + else if (strcasecmp("max", env_speed) == 0) + speed = CDR_MAX_SPEED; + else + speed = atoi(env_speed) * 177; + if (speed <= 0) + errx(EX_USAGE, "Invalid speed: %s", optarg); + if (argc == 0) usage(); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 00:52:24 2010 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 A566C1065670; Wed, 20 Jan 2010 00:52:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 943418FC18; Wed, 20 Jan 2010 00:52:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K0qO2L057470; Wed, 20 Jan 2010 00:52:24 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K0qOis057468; Wed, 20 Jan 2010 00:52:24 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200052.o0K0qOis057468@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 00:52:24 +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: r202664 - stable/8/lib/libc/stdio 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: Wed, 20 Jan 2010 00:52:24 -0000 Author: delphij Date: Wed Jan 20 00:52:24 2010 New Revision: 202664 URL: http://svn.freebsd.org/changeset/base/202664 Log: MFC r200799: K&R -> ANSI prototype. Modified: stable/8/lib/libc/stdio/vsscanf.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/stdio/vsscanf.c ============================================================================== --- stable/8/lib/libc/stdio/vsscanf.c Wed Jan 20 00:46:55 2010 (r202663) +++ stable/8/lib/libc/stdio/vsscanf.c Wed Jan 20 00:52:24 2010 (r202664) @@ -45,20 +45,15 @@ eofread(void *, char *, int); /* ARGSUSED */ static int -eofread(cookie, buf, len) - void *cookie; - char *buf; - int len; +eofread(void *cookie, char *buf, int len) { return (0); } int -vsscanf(str, fmt, ap) - const char * __restrict str; - const char * __restrict fmt; - __va_list ap; +vsscanf(const char * __restrict str, const char * __restrict fmt, + __va_list ap) { FILE f; From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 00:53:04 2010 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 F3494106568B; Wed, 20 Jan 2010 00:53:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E258E8FC0C; Wed, 20 Jan 2010 00:53:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K0r34S057650; Wed, 20 Jan 2010 00:53:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K0r30I057648; Wed, 20 Jan 2010 00:53:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200053.o0K0r30I057648@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 00:53: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: r202665 - stable/8/lib/libc/stdio 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: Wed, 20 Jan 2010 00:53:04 -0000 Author: delphij Date: Wed Jan 20 00:53:03 2010 New Revision: 202665 URL: http://svn.freebsd.org/changeset/base/202665 Log: MFC r200800: Use vsscanf instead of rolling our own. PR: bin/140530 Submitted by: Jeremy Huddleston Modified: stable/8/lib/libc/stdio/sscanf.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/stdio/sscanf.c ============================================================================== --- stable/8/lib/libc/stdio/sscanf.c Wed Jan 20 00:52:24 2010 (r202664) +++ stable/8/lib/libc/stdio/sscanf.c Wed Jan 20 00:53:03 2010 (r202665) @@ -41,37 +41,14 @@ __FBSDID("$FreeBSD$"); #include #include "local.h" -static int eofread(void *, char *, int); - -/* ARGSUSED */ -static int -eofread(cookie, buf, len) - void *cookie; - char *buf; - int len; -{ - - return (0); -} - int sscanf(const char * __restrict str, char const * __restrict fmt, ...) { int ret; va_list ap; - FILE f; - f._file = -1; - f._flags = __SRD; - f._bf._base = f._p = (unsigned char *)str; - f._bf._size = f._r = strlen(str); - f._read = eofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); va_start(ap, fmt); - ret = __svfscanf(&f, fmt, ap); + ret = vsscanf(str, fmt, ap); va_end(ap); return (ret); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 00:53:45 2010 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 042AB1065692; Wed, 20 Jan 2010 00:53:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E78AB8FC1A; Wed, 20 Jan 2010 00:53:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K0riFf057828; Wed, 20 Jan 2010 00:53:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K0riEs057826; Wed, 20 Jan 2010 00:53:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200053.o0K0riEs057826@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 00:53:44 +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: r202666 - stable/8/lib/libc/stdio 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: Wed, 20 Jan 2010 00:53:45 -0000 Author: delphij Date: Wed Jan 20 00:53:44 2010 New Revision: 202666 URL: http://svn.freebsd.org/changeset/base/202666 Log: MFC r200802: Use vsprintf instead of rolling our own. PR: bin/140496 Submitted by: Jeremy Huddleston Modified: stable/8/lib/libc/stdio/sprintf.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/stdio/sprintf.c ============================================================================== --- stable/8/lib/libc/stdio/sprintf.c Wed Jan 20 00:53:03 2010 (r202665) +++ stable/8/lib/libc/stdio/sprintf.c Wed Jan 20 00:53:44 2010 (r202666) @@ -46,17 +46,9 @@ sprintf(char * __restrict str, char cons { int ret; va_list ap; - FILE f; - f._file = -1; - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *)str; - f._bf._size = f._w = INT_MAX; - f._orientation = 0; - memset(&f._mbstate, 0, sizeof(mbstate_t)); va_start(ap, fmt); - ret = __vfprintf(&f, fmt, ap); + ret = vsprintf(str, fmt, ap); va_end(ap); - *f._p = 0; return (ret); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 00:54:51 2010 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 A88F81065679; Wed, 20 Jan 2010 00:54:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97B7C8FC19; Wed, 20 Jan 2010 00:54:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K0sppc058139; Wed, 20 Jan 2010 00:54:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K0sp4L058137; Wed, 20 Jan 2010 00:54:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200054.o0K0sp4L058137@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 00:54:51 +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: r202667 - stable/7/lib/libc/stdio 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: Wed, 20 Jan 2010 00:54:51 -0000 Author: delphij Date: Wed Jan 20 00:54:51 2010 New Revision: 202667 URL: http://svn.freebsd.org/changeset/base/202667 Log: MFC r200799: K&R -> ANSI prototype. Modified: stable/7/lib/libc/stdio/vsscanf.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/stdio/vsscanf.c ============================================================================== --- stable/7/lib/libc/stdio/vsscanf.c Wed Jan 20 00:53:44 2010 (r202666) +++ stable/7/lib/libc/stdio/vsscanf.c Wed Jan 20 00:54:51 2010 (r202667) @@ -45,20 +45,15 @@ eofread(void *, char *, int); /* ARGSUSED */ static int -eofread(cookie, buf, len) - void *cookie; - char *buf; - int len; +eofread(void *cookie, char *buf, int len) { return (0); } int -vsscanf(str, fmt, ap) - const char * __restrict str; - const char * __restrict fmt; - __va_list ap; +vsscanf(const char * __restrict str, const char * __restrict fmt, + __va_list ap) { FILE f; struct __sFILEX ext; From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 01:07:39 2010 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 1DEA91065679; Wed, 20 Jan 2010 01:07:39 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D4388FC16; Wed, 20 Jan 2010 01:07:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K17clu061028; Wed, 20 Jan 2010 01:07:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K17cGj061025; Wed, 20 Jan 2010 01:07:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200107.o0K17cGj061025@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 01:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202668 - head/usr.sbin/newsyslog 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: Wed, 20 Jan 2010 01:07:39 -0000 Author: delphij Date: Wed Jan 20 01:07:38 2010 New Revision: 202668 URL: http://svn.freebsd.org/changeset/base/202668 Log: Add a new option, -P, which reverts newsyslog(8) to the old behavior, which stops to proceed further, as it is possible that processes which fails to create PID file get screwed by rotation. Requested by: stas MFC after: 2 weeks X-MFC with: r200806 Modified: head/usr.sbin/newsyslog/newsyslog.8 head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.8 Wed Jan 20 00:54:51 2010 (r202667) +++ head/usr.sbin/newsyslog/newsyslog.8 Wed Jan 20 01:07:38 2010 (r202668) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 24, 2005 +.Dd January 19, 2010 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -25,7 +25,7 @@ .Nd maintain system log files to manageable sizes .Sh SYNOPSIS .Nm -.Op Fl CFNnrsv +.Op Fl CFNPnrsv .Op Fl R Ar tagname .Op Fl a Ar directory .Op Fl d Ar directory @@ -169,6 +169,10 @@ This option is intended to be used with or .Fl CC options when creating log files is the only objective. +.It Fl P +Prevent further action if we should send signal but the +.Dq pidfile +is empty or does not exist. .It Fl R Ar tagname Specify that .Nm Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Wed Jan 20 00:54:51 2010 (r202667) +++ head/usr.sbin/newsyslog/newsyslog.c Wed Jan 20 01:07:38 2010 (r202668) @@ -167,6 +167,7 @@ int needroot = 1; /* Root privs are nec int noaction = 0; /* Don't do anything, just show it */ int norotate = 0; /* Don't rotate */ int nosignal; /* Do not send any signals */ +int enforcepid = 0; /* If PID file does not exist or empty, do nothing */ int force = 0; /* Force the trim no matter what */ int rotatereq = 0; /* -R = Always rotate the file(s) as given */ /* on the command (this also requires */ @@ -580,7 +581,7 @@ parse_args(int argc, char **argv) *p = '\0'; /* Parse command line options. */ - while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNR:")) != -1) + while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNPR:")) != -1) switch (ch) { case 'a': archtodir++; @@ -624,6 +625,9 @@ parse_args(int argc, char **argv) case 'N': norotate++; break; + case 'P': + enforcepid++; + break; case 'R': rotatereq++; requestor = strdup(optarg); @@ -1779,7 +1783,7 @@ set_swpid(struct sigwork_entry *swork, c f = fopen(ent->pid_file, "r"); if (f == NULL) { - if (errno == ENOENT) { + if (errno == ENOENT && enforcepid == 0) { /* * Warn if the PID file doesn't exist, but do * not consider it an error. Most likely it @@ -1801,7 +1805,7 @@ set_swpid(struct sigwork_entry *swork, c * has terminated, so it should be safe to rotate any * log files that the process would have been using. */ - if (feof(f)) { + if (feof(f) && enforcepid == 0) { swork->sw_pidok = 1; warnx("pid file is empty: %s", ent->pid_file); } else From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 01:13:52 2010 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 94B2A106568B; Wed, 20 Jan 2010 01:13:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82D108FC13; Wed, 20 Jan 2010 01:13:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K1DqGa062436; Wed, 20 Jan 2010 01:13:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K1DqXF062433; Wed, 20 Jan 2010 01:13:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200113.o0K1DqXF062433@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 01:13:52 +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: r202669 - in stable/8/sys: boot/zfs cddl/boot/zfs 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: Wed, 20 Jan 2010 01:13:52 -0000 Author: delphij Date: Wed Jan 20 01:13:52 2010 New Revision: 202669 URL: http://svn.freebsd.org/changeset/base/202669 Log: MFC r201689: Instead of assuming all vdevs are healthy, check the newest vdev label for each vdev's status. Booting from a degraded vdev should now be more robust. Submitted by: Matt Reimer Sponsored by: VPOP Technologies, Inc. Modified: stable/8/sys/boot/zfs/zfsimpl.c stable/8/sys/cddl/boot/zfs/zfsimpl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Wed Jan 20 01:07:38 2010 (r202668) +++ stable/8/sys/boot/zfs/zfsimpl.c Wed Jan 20 01:13:52 2010 (r202669) @@ -404,7 +404,7 @@ vdev_create(uint64_t guid, vdev_read_t * } static int -vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t **vdevp) +vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t **vdevp, int is_newer) { int rc; uint64_t guid, id, ashift, nparity; @@ -412,7 +412,8 @@ vdev_init_from_nvlist(const unsigned cha const char *path; vdev_t *vdev, *kid; const unsigned char *kids; - int nkids, i; + int nkids, i, is_new; + uint64_t is_offline, is_faulted, is_degraded, is_removed; if (nvlist_find(nvlist, ZPOOL_CONFIG_GUID, DATA_TYPE_UINT64, 0, &guid) @@ -424,17 +425,6 @@ vdev_init_from_nvlist(const unsigned cha return (ENOENT); } - /* - * Assume that if we've seen this vdev tree before, this one - * will be identical. - */ - vdev = vdev_find(guid); - if (vdev) { - if (vdevp) - *vdevp = vdev; - return (0); - } - if (strcmp(type, VDEV_TYPE_MIRROR) && strcmp(type, VDEV_TYPE_DISK) && strcmp(type, VDEV_TYPE_RAIDZ)) { @@ -442,6 +432,21 @@ vdev_init_from_nvlist(const unsigned cha return (EIO); } + is_offline = is_removed = is_faulted = is_degraded = 0; + + nvlist_find(nvlist, ZPOOL_CONFIG_OFFLINE, DATA_TYPE_UINT64, 0, + &is_offline); + nvlist_find(nvlist, ZPOOL_CONFIG_REMOVED, DATA_TYPE_UINT64, 0, + &is_removed); + nvlist_find(nvlist, ZPOOL_CONFIG_FAULTED, DATA_TYPE_UINT64, 0, + &is_faulted); + nvlist_find(nvlist, ZPOOL_CONFIG_DEGRADED, DATA_TYPE_UINT64, 0, + &is_degraded); + + vdev = vdev_find(guid); + if (!vdev) { + is_new = 1; + if (!strcmp(type, VDEV_TYPE_MIRROR)) vdev = vdev_create(guid, vdev_mirror_read); else if (!strcmp(type, VDEV_TYPE_RAIDZ)) @@ -480,6 +485,39 @@ vdev_init_from_nvlist(const unsigned cha vdev->v_name = strdup(type); } } + + if (is_offline) + vdev->v_state = VDEV_STATE_OFFLINE; + else if (is_removed) + vdev->v_state = VDEV_STATE_REMOVED; + else if (is_faulted) + vdev->v_state = VDEV_STATE_FAULTED; + else if (is_degraded) + vdev->v_state = VDEV_STATE_DEGRADED; + else + vdev->v_state = VDEV_STATE_HEALTHY; + } else { + is_new = 0; + + if (is_newer) { + /* + * We've already seen this vdev, but from an older + * vdev label, so let's refresh its state from the + * newer label. + */ + if (is_offline) + vdev->v_state = VDEV_STATE_OFFLINE; + else if (is_removed) + vdev->v_state = VDEV_STATE_REMOVED; + else if (is_faulted) + vdev->v_state = VDEV_STATE_FAULTED; + else if (is_degraded) + vdev->v_state = VDEV_STATE_DEGRADED; + else + vdev->v_state = VDEV_STATE_HEALTHY; + } + } + rc = nvlist_find(nvlist, ZPOOL_CONFIG_CHILDREN, DATA_TYPE_NVLIST_ARRAY, &nkids, &kids); /* @@ -488,10 +526,12 @@ vdev_init_from_nvlist(const unsigned cha if (rc == 0) { vdev->v_nchildren = nkids; for (i = 0; i < nkids; i++) { - rc = vdev_init_from_nvlist(kids, &kid); + rc = vdev_init_from_nvlist(kids, &kid, is_newer); if (rc) return (rc); - STAILQ_INSERT_TAIL(&vdev->v_children, kid, v_childlink); + if (is_new) + STAILQ_INSERT_TAIL(&vdev->v_children, kid, + v_childlink); kids = nvlist_next(kids); } } else { @@ -593,7 +633,9 @@ state_name(vdev_state_t state) "UNKNOWN", "CLOSED", "OFFLINE", + "REMOVED", "CANT_OPEN", + "FAULTED", "DEGRADED", "ONLINE" }; @@ -711,7 +753,7 @@ vdev_probe(vdev_phys_read_t *read, void uint64_t pool_txg, pool_guid; const char *pool_name; const unsigned char *vdevs; - int i, rc; + int i, rc, is_newer; char upbuf[1024]; const struct uberblock *up; @@ -793,12 +835,15 @@ vdev_probe(vdev_phys_read_t *read, void spa = spa_create(pool_guid); spa->spa_name = strdup(pool_name); } - if (pool_txg > spa->spa_txg) + if (pool_txg > spa->spa_txg) { spa->spa_txg = pool_txg; + is_newer = 1; + } else + is_newer = 0; /* * Get the vdev tree and create our in-core copy of it. - * If we already have a healthy vdev with this guid, this must + * If we already have a vdev with this guid, this must * be some kind of alias (overlapping slices, dangerously dedicated * disks etc). */ @@ -808,16 +853,16 @@ vdev_probe(vdev_phys_read_t *read, void return (EIO); } vdev = vdev_find(guid); - if (vdev && vdev->v_state == VDEV_STATE_HEALTHY) { + if (vdev && vdev->v_phys_read) /* Has this vdev already been inited? */ return (EIO); - } if (nvlist_find(nvlist, ZPOOL_CONFIG_VDEV_TREE, DATA_TYPE_NVLIST, 0, &vdevs)) { return (EIO); } - rc = vdev_init_from_nvlist(vdevs, &top_vdev); + + rc = vdev_init_from_nvlist(vdevs, &top_vdev, is_newer); if (rc) return (rc); @@ -838,7 +883,6 @@ vdev_probe(vdev_phys_read_t *read, void if (vdev) { vdev->v_phys_read = read; vdev->v_read_priv = read_priv; - vdev->v_state = VDEV_STATE_HEALTHY; } else { printf("ZFS: inconsistent nvlist contents\n"); return (EIO); Modified: stable/8/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/8/sys/cddl/boot/zfs/zfsimpl.h Wed Jan 20 01:07:38 2010 (r202668) +++ stable/8/sys/cddl/boot/zfs/zfsimpl.h Wed Jan 20 01:13:52 2010 (r202669) @@ -548,7 +548,6 @@ typedef enum { #define ZPOOL_CONFIG_DTL "DTL" #define ZPOOL_CONFIG_STATS "stats" #define ZPOOL_CONFIG_WHOLE_DISK "whole_disk" -#define ZPOOL_CONFIG_OFFLINE "offline" #define ZPOOL_CONFIG_ERRCOUNT "error_count" #define ZPOOL_CONFIG_NOT_PRESENT "not_present" #define ZPOOL_CONFIG_SPARES "spares" @@ -558,6 +557,16 @@ typedef enum { #define ZPOOL_CONFIG_HOSTNAME "hostname" #define ZPOOL_CONFIG_TIMESTAMP "timestamp" /* not stored on disk */ +/* + * The persistent vdev state is stored as separate values rather than a single + * 'vdev_state' entry. This is because a device can be in multiple states, such + * as offline and degraded. + */ +#define ZPOOL_CONFIG_OFFLINE "offline" +#define ZPOOL_CONFIG_FAULTED "faulted" +#define ZPOOL_CONFIG_DEGRADED "degraded" +#define ZPOOL_CONFIG_REMOVED "removed" + #define VDEV_TYPE_ROOT "root" #define VDEV_TYPE_MIRROR "mirror" #define VDEV_TYPE_REPLACING "replacing" @@ -590,7 +599,9 @@ typedef enum vdev_state { VDEV_STATE_UNKNOWN = 0, /* Uninitialized vdev */ VDEV_STATE_CLOSED, /* Not currently open */ VDEV_STATE_OFFLINE, /* Not allowed to open */ + VDEV_STATE_REMOVED, /* Explicitly removed from system */ VDEV_STATE_CANT_OPEN, /* Tried to open, but failed */ + VDEV_STATE_FAULTED, /* External request to fault device */ VDEV_STATE_DEGRADED, /* Replicated vdev with unhealthy kids */ VDEV_STATE_HEALTHY /* Presumed good */ } vdev_state_t; From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 01:14:54 2010 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 961D4106568D; Wed, 20 Jan 2010 01:14:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD288FC1B; Wed, 20 Jan 2010 01:14:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K1EsCN062713; Wed, 20 Jan 2010 01:14:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K1EshI062711; Wed, 20 Jan 2010 01:14:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200114.o0K1EshI062711@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 01:14:54 +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: r202670 - stable/8/sys/boot/zfs 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: Wed, 20 Jan 2010 01:14:54 -0000 Author: delphij Date: Wed Jan 20 01:14:54 2010 New Revision: 202670 URL: http://svn.freebsd.org/changeset/base/202670 Log: MFC r201690: Space cleanup for revision 202669 committed separately for easier review. This commit is purely space changes. Submitted by: Matt Reimer Sponsored by: VPOP Technologies, Inc. Modified: stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Wed Jan 20 01:13:52 2010 (r202669) +++ stable/8/sys/boot/zfs/zfsimpl.c Wed Jan 20 01:14:54 2010 (r202670) @@ -447,44 +447,44 @@ vdev_init_from_nvlist(const unsigned cha if (!vdev) { is_new = 1; - if (!strcmp(type, VDEV_TYPE_MIRROR)) - vdev = vdev_create(guid, vdev_mirror_read); - else if (!strcmp(type, VDEV_TYPE_RAIDZ)) - vdev = vdev_create(guid, vdev_raidz_read); - else - vdev = vdev_create(guid, vdev_disk_read); + if (!strcmp(type, VDEV_TYPE_MIRROR)) + vdev = vdev_create(guid, vdev_mirror_read); + else if (!strcmp(type, VDEV_TYPE_RAIDZ)) + vdev = vdev_create(guid, vdev_raidz_read); + else + vdev = vdev_create(guid, vdev_disk_read); - vdev->v_id = id; - if (nvlist_find(nvlist, ZPOOL_CONFIG_ASHIFT, - DATA_TYPE_UINT64, 0, &ashift) == 0) - vdev->v_ashift = ashift; - else - vdev->v_ashift = 0; - if (nvlist_find(nvlist, ZPOOL_CONFIG_NPARITY, - DATA_TYPE_UINT64, 0, &nparity) == 0) - vdev->v_nparity = nparity; - else - vdev->v_nparity = 0; - if (nvlist_find(nvlist, ZPOOL_CONFIG_PATH, - DATA_TYPE_STRING, 0, &path) == 0) { - if (strlen(path) > 5 - && path[0] == '/' - && path[1] == 'd' - && path[2] == 'e' - && path[3] == 'v' - && path[4] == '/') - path += 5; - vdev->v_name = strdup(path); - } else { - if (!strcmp(type, "raidz")) { - if (vdev->v_nparity == 1) - vdev->v_name = "raidz1"; - else - vdev->v_name = "raidz2"; + vdev->v_id = id; + if (nvlist_find(nvlist, ZPOOL_CONFIG_ASHIFT, + DATA_TYPE_UINT64, 0, &ashift) == 0) + vdev->v_ashift = ashift; + else + vdev->v_ashift = 0; + if (nvlist_find(nvlist, ZPOOL_CONFIG_NPARITY, + DATA_TYPE_UINT64, 0, &nparity) == 0) + vdev->v_nparity = nparity; + else + vdev->v_nparity = 0; + if (nvlist_find(nvlist, ZPOOL_CONFIG_PATH, + DATA_TYPE_STRING, 0, &path) == 0) { + if (strlen(path) > 5 + && path[0] == '/' + && path[1] == 'd' + && path[2] == 'e' + && path[3] == 'v' + && path[4] == '/') + path += 5; + vdev->v_name = strdup(path); } else { - vdev->v_name = strdup(type); + if (!strcmp(type, "raidz")) { + if (vdev->v_nparity == 1) + vdev->v_name = "raidz1"; + else + vdev->v_name = "raidz2"; + } else { + vdev->v_name = strdup(type); + } } - } if (is_offline) vdev->v_state = VDEV_STATE_OFFLINE; From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 03:40:44 2010 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 09EA31065679; Wed, 20 Jan 2010 03:40:44 +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 ECF5C8FC12; Wed, 20 Jan 2010 03:40:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K3ehcK095009; Wed, 20 Jan 2010 03:40:43 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K3ehsG095007; Wed, 20 Jan 2010 03:40:43 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001200340.o0K3ehsG095007@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 20 Jan 2010 03:40: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: r202671 - head/sys/dev/cxgb 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: Wed, 20 Jan 2010 03:40:44 -0000 Author: np Date: Wed Jan 20 03:40:43 2010 New Revision: 202671 URL: http://svn.freebsd.org/changeset/base/202671 Log: Fix for a cxgb(4) panic. cxgb_ioctl can be called by the IP and IPv6 layers with non-sleepable locks held. Don't (potentially) sleep in those situations. Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Wed Jan 20 01:14:54 2010 (r202670) +++ head/sys/dev/cxgb/cxgb_adapter.h Wed Jan 20 03:40:43 2010 (r202671) @@ -136,7 +136,6 @@ enum { }; #define IS_DOOMED(p) (p->flags & DOOMED) #define SET_DOOMED(p) do {p->flags |= DOOMED;} while (0) -#define DOOMED(p) (p->flags & DOOMED) #define IS_BUSY(sc) (sc->flags & CXGB_BUSY) #define SET_BUSY(sc) do {sc->flags |= CXGB_BUSY;} while (0) #define CLR_BUSY(sc) do {sc->flags &= ~CXGB_BUSY;} while (0) Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Jan 20 01:14:54 2010 (r202670) +++ head/sys/dev/cxgb/cxgb_main.c Wed Jan 20 03:40:43 2010 (r202671) @@ -84,11 +84,9 @@ __FBSDID("$FreeBSD$"); static int cxgb_setup_interrupts(adapter_t *); static void cxgb_teardown_interrupts(adapter_t *); -static int cxgb_begin_op(struct port_info *, const char *); -static int cxgb_begin_detach(struct port_info *); -static int cxgb_end_op(struct port_info *); static void cxgb_init(void *); -static int cxgb_init_synchronized(struct port_info *); +static int cxgb_init_locked(struct port_info *); +static int cxgb_uninit_locked(struct port_info *); static int cxgb_uninit_synchronized(struct port_info *); static int cxgb_ioctl(struct ifnet *, unsigned long, caddr_t); static int cxgb_media_change(struct ifnet *); @@ -1109,7 +1107,14 @@ cxgb_port_detach(device_t dev) p = device_get_softc(dev); sc = p->adapter; - cxgb_begin_detach(p); + /* Tell cxgb_ioctl and if_init that the port is going away */ + ADAPTER_LOCK(sc); + SET_DOOMED(p); + wakeup(&sc->flags); + while (IS_BUSY(sc)) + mtx_sleep(&sc->flags, &sc->lock, 0, "cxgbdtch", 0); + SET_BUSY(sc); + ADAPTER_UNLOCK(sc); if (p->port_cdev != NULL) destroy_dev(p->port_cdev); @@ -1129,7 +1134,10 @@ cxgb_port_detach(device_t dev) if_free(p->ifp); p->ifp = NULL; - cxgb_end_op(p); + ADAPTER_LOCK(sc); + CLR_BUSY(sc); + wakeup_one(&sc->flags); + ADAPTER_UNLOCK(sc); return (0); } @@ -1684,12 +1692,13 @@ cxgb_up(struct adapter *sc) { int err = 0; - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); KASSERT(sc->open_device_map == 0, ("%s: device(s) already open (%x)", __func__, sc->open_device_map)); if ((sc->flags & FULL_INIT_DONE) == 0) { + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + if ((sc->flags & FW_UPTODATE) == 0) if ((err = upgrade_fw(sc))) goto out; @@ -1751,8 +1760,6 @@ out: static void cxgb_down(struct adapter *sc) { - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); - t3_sge_stop(sc); t3_intr_disable(sc); } @@ -1763,8 +1770,6 @@ offload_open(struct port_info *pi) struct adapter *sc = pi->adapter; struct t3cdev *tdev = &sc->tdev; - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); - setbit(&sc->open_device_map, OFFLOAD_DEVMAP_BIT); t3_tp_set_offload_mode(sc, 1); @@ -1799,120 +1804,55 @@ offload_close(struct t3cdev *tdev) } /* - * Begin a synchronized operation. If this call succeeds, it is guaranteed that - * no one will remove the port or its ifp from underneath the caller. Caller is - * also granted exclusive access to open_device_map. - * - * operation here means init, uninit, detach, and ioctl service. - * - * May fail. - * EINTR (ctrl-c pressed during ifconfig for example). - * ENXIO (port is about to detach - due to kldunload for example). + * if_init for cxgb ports. */ -int -cxgb_begin_op(struct port_info *p, const char *wmsg) +static void +cxgb_init(void *arg) { - int rc = 0; + struct port_info *p = arg; struct adapter *sc = p->adapter; ADAPTER_LOCK(sc); + cxgb_init_locked(p); /* releases adapter lock */ + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); +} + +static int +cxgb_init_locked(struct port_info *p) +{ + struct adapter *sc = p->adapter; + struct ifnet *ifp = p->ifp; + struct cmac *mac = &p->mac; + int i, rc = 0, may_sleep = 0; + + ADAPTER_LOCK_ASSERT_OWNED(sc); while (!IS_DOOMED(p) && IS_BUSY(sc)) { - if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, wmsg, 0)) { + if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, "cxgbinit", 0)) { rc = EINTR; goto done; } } - - if (IS_DOOMED(p)) + if (IS_DOOMED(p)) { rc = ENXIO; - else if (!IS_BUSY(sc)) - SET_BUSY(sc); - else { - KASSERT(0, ("%s: port %d, p->flags = %x , sc->flags = %x", - __func__, p->port_id, p->flags, sc->flags)); - rc = EDOOFUS; + goto done; } - -done: - ADAPTER_UNLOCK(sc); - return (rc); -} - -/* - * End a synchronized operation. Read comment block above cxgb_begin_op. - */ -int -cxgb_end_op(struct port_info *p) -{ - struct adapter *sc = p->adapter; - - ADAPTER_LOCK(sc); - KASSERT(IS_BUSY(sc), ("%s: not busy.", __func__)); - CLR_BUSY(sc); - wakeup_one(&sc->flags); - ADAPTER_UNLOCK(sc); - - return (0); -} - -/* - * Prepare for port detachment. Detach is a special kind of synchronized - * operation. Also read comment before cxgb_begin_op. - */ -static int -cxgb_begin_detach(struct port_info *p) -{ - struct adapter *sc = p->adapter; + KASSERT(!IS_BUSY(sc), ("%s: controller busy.", __func__)); /* - * Inform those waiting for this port that it is going to be destroyed - * and they should not continue further. (They'll return with ENXIO). + * The code that runs during one-time adapter initialization can sleep + * so it's important not to hold any locks across it. */ - ADAPTER_LOCK(sc); - SET_DOOMED(p); - wakeup(&sc->flags); - ADAPTER_UNLOCK(sc); + may_sleep = sc->flags & FULL_INIT_DONE ? 0 : 1; - /* - * Wait for in-progress operations. - */ - ADAPTER_LOCK(sc); - while (IS_BUSY(sc)) { - mtx_sleep(&sc->flags, &sc->lock, 0, "cxgbdtch", 0); + if (may_sleep) { + SET_BUSY(sc); + ADAPTER_UNLOCK(sc); } - SET_BUSY(sc); - ADAPTER_UNLOCK(sc); - - return (0); -} - -/* - * if_init for cxgb ports. - */ -static void -cxgb_init(void *arg) -{ - struct port_info *p = arg; - - if (cxgb_begin_op(p, "cxgbinit")) - return; - - cxgb_init_synchronized(p); - cxgb_end_op(p); -} - -static int -cxgb_init_synchronized(struct port_info *p) -{ - struct adapter *sc = p->adapter; - struct ifnet *ifp = p->ifp; - struct cmac *mac = &p->mac; - int i, rc; if (sc->open_device_map == 0) { if ((rc = cxgb_up(sc)) != 0) - return (rc); + goto done; if (is_offload(sc) && !ofld_disable && offload_open(p)) log(LOG_WARNING, @@ -1920,6 +1860,11 @@ cxgb_init_synchronized(struct port_info } PORT_LOCK(p); + if (isset(&sc->open_device_map, p->port_id) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) { + PORT_UNLOCK(p); + goto done; + } t3_port_intr_enable(sc, p->port_id); if (!mac->multiport) t3_mac_init(mac); @@ -1943,7 +1888,48 @@ cxgb_init_synchronized(struct port_info /* all ok */ setbit(&sc->open_device_map, p->port_id); - return (0); +done: + if (may_sleep) { + ADAPTER_LOCK(sc); + KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); + CLR_BUSY(sc); + wakeup_one(&sc->flags); + } + ADAPTER_UNLOCK(sc); + return (rc); +} + +static int +cxgb_uninit_locked(struct port_info *p) +{ + struct adapter *sc = p->adapter; + int rc; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + while (!IS_DOOMED(p) && IS_BUSY(sc)) { + if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, "cxgbunin", 0)) { + rc = EINTR; + goto done; + } + } + if (IS_DOOMED(p)) { + rc = ENXIO; + goto done; + } + KASSERT(!IS_BUSY(sc), ("%s: controller busy.", __func__)); + SET_BUSY(sc); + ADAPTER_UNLOCK(sc); + + rc = cxgb_uninit_synchronized(p); + + ADAPTER_LOCK(sc); + KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); + CLR_BUSY(sc); + wakeup_one(&sc->flags); +done: + ADAPTER_UNLOCK(sc); + return (rc); } /* @@ -1956,6 +1942,11 @@ cxgb_uninit_synchronized(struct port_inf struct ifnet *ifp = pi->ifp; /* + * taskqueue_drain may cause a deadlock if the adapter lock is held. + */ + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + + /* * Clear this port's bit from the open device map, and then drain all * the tasks that can access/manipulate this port's port_info or ifp. * We disable this port's interrupts here and so the the slow/ext @@ -2032,19 +2023,21 @@ static int cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) { struct port_info *p = ifp->if_softc; + struct adapter *sc = p->adapter; struct ifreq *ifr = (struct ifreq *)data; - int flags, error = 0, mtu, handle_unsynchronized = 0; + int flags, error = 0, mtu; uint32_t mask; - if ((error = cxgb_begin_op(p, "cxgbioct")) != 0) - return (error); - - /* - * Only commands that should be handled within begin-op/end-op are - * serviced in this switch statement. See handle_unsynchronized. - */ switch (command) { case SIOCSIFMTU: + ADAPTER_LOCK(sc); + error = IS_DOOMED(p) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0); + if (error) { +fail: + ADAPTER_UNLOCK(sc); + return (error); + } + mtu = ifr->ifr_mtu; if ((mtu < ETHERMIN) || (mtu > ETHERMTU_JUMBO)) { error = EINVAL; @@ -2054,35 +2047,57 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l cxgb_update_mac_settings(p); PORT_UNLOCK(p); } - + ADAPTER_UNLOCK(sc); break; case SIOCSIFFLAGS: + ADAPTER_LOCK(sc); + if (IS_DOOMED(p)) { + error = ENXIO; + goto fail; + } if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { flags = p->if_flags; if (((ifp->if_flags ^ flags) & IFF_PROMISC) || ((ifp->if_flags ^ flags) & IFF_ALLMULTI)) { + if (IS_BUSY(sc)) { + error = EBUSY; + goto fail; + } PORT_LOCK(p); cxgb_update_mac_settings(p); PORT_UNLOCK(p); } + ADAPTER_UNLOCK(sc); } else - error = cxgb_init_synchronized(p); + error = cxgb_init_locked(p); p->if_flags = ifp->if_flags; } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) - error = cxgb_uninit_synchronized(p); - + error = cxgb_uninit_locked(p); + + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); break; case SIOCADDMULTI: case SIOCDELMULTI: + ADAPTER_LOCK(sc); + error = IS_DOOMED(p) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0); + if (error) + goto fail; + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { PORT_LOCK(p); cxgb_update_mac_settings(p); PORT_UNLOCK(p); } + ADAPTER_UNLOCK(sc); break; case SIOCSIFCAP: + ADAPTER_LOCK(sc); + error = IS_DOOMED(p) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0); + if (error) + goto fail; + mask = ifr->ifr_reqcap ^ ifp->if_capenable; if (mask & IFCAP_TXCSUM) { if (IFCAP_TXCSUM & ifp->if_capenable) { @@ -2132,34 +2147,20 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l PORT_UNLOCK(p); } } - if (mask & IFCAP_VLAN_HWCSUM) { + if (mask & IFCAP_VLAN_HWCSUM) ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; - } #ifdef VLAN_CAPABILITIES VLAN_CAPABILITIES(ifp); #endif + ADAPTER_UNLOCK(sc); break; - default: - handle_unsynchronized = 1; + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + error = ifmedia_ioctl(ifp, ifr, &p->media, command); break; - } - - /* - * We don't want to call anything outside the driver while inside a - * begin-op/end-op block. If it calls us back (eg. ether_ioctl may - * call cxgb_init) we may deadlock if the state is already marked busy. - * - * XXX: this probably opens a small race window with kldunload... - */ - cxgb_end_op(p); - - /* The IS_DOOMED check is racy, we're clutching at straws here */ - if (handle_unsynchronized && !IS_DOOMED(p)) { - if (command == SIOCSIFMEDIA || command == SIOCGIFMEDIA) - error = ifmedia_ioctl(ifp, ifr, &p->media, command); - else - error = ether_ioctl(ifp, command, data); + default: + error = ether_ioctl(ifp, command, data); } return (error); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 05:27:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 9F9F5106566C; Wed, 20 Jan 2010 05:27:42 +0000 (UTC) Date: Wed, 20 Jan 2010 05:27:42 +0000 From: Alexey Dokuchaev To: Xin LI Message-ID: <20100120052742.GA80949@FreeBSD.org> References: <201001200043.o0K0hFvk055345@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201001200043.o0K0hFvk055345@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r202662 - stable/8/usr.sbin/burncd 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: Wed, 20 Jan 2010 05:27:42 -0000 On Wed, Jan 20, 2010 at 12:43:15AM +0000, Xin LI wrote: > @@ -147,6 +144,15 @@ main(int argc, char **argv) > argc -= optind; > argv += optind; > > + if (env_speed == NULL) > + ; > + else if (strcasecmp("max", env_speed) == 0) > + speed = CDR_MAX_SPEED; > + else > + speed = atoi(env_speed) * 177; > + if (speed <= 0) > + errx(EX_USAGE, "Invalid speed: %s", optarg); ^^^^^^ This does not seem correct: ------------------------'''''' $ burncd -s foo -f bar burncd: Invalid speed: bar ./danfe From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 05:45:56 2010 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 32472106566B; Wed, 20 Jan 2010 05:45:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id A20718FC14; Wed, 20 Jan 2010 05:45:55 +0000 (UTC) Received: from c220-239-227-214.carlnfd1.nsw.optusnet.com.au (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0K5jpMu000503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2010 16:45:52 +1100 Date: Wed, 20 Jan 2010 16:45:51 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Ed Schouten In-Reply-To: <201001192307.o0JN7CKu034318@svn.freebsd.org> Message-ID: <20100120163243.A68431@delplex.bde.org> References: <201001192307.o0JN7CKu034318@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202661 - head/lib/libc/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: Wed, 20 Jan 2010 05:45:56 -0000 On Tue, 19 Jan 2010, Ed Schouten wrote: > Author: ed > Date: Tue Jan 19 23:07:12 2010 > New Revision: 202661 > URL: http://svn.freebsd.org/changeset/base/202661 > > Log: > Revert r202447 by re-exposing the old uname(3) function. > > It makes hardly any sense to expose a symbol which should only be > provided for binary compatibility, but it seems we don't have a lot of > choice here. There are many autoconf scripts out there that try to > create a binary that links against the old symbol to see whether > uname(3) is present. These scripts fail to detect uname(3) now. > > It should be noted that the behaviour we implement is not against the > standards: Of course it is against standards. This is implicit for most functions, and the part of the standard that you quoted says it explicitly for uname(): > | The following shall be declared as a function and may also be defined ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ > | as a macro: > | > | int uname(struct utsname *); Examples of use of the function when it is also defined as a macro: /* Avoid any macro definition of the function when calling it. */ (uname)(namep); /* Take the address of uname in an obfuscated way. */ foo(uname); /* Take the address of uname in an unobfuscated way. */ foo(&uname); /* Try to debug uname. */ (gdb) b uname Function "uname" not defined... (gdb) #^#^^^@* someone defined uname as a macro :-(. #undef uname /* Now uname is not defined as a macro, though it may have been. */ uname(namep); Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 07:04:11 2010 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 2B77B106566B; Wed, 20 Jan 2010 07:04:11 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id C30B88FC08; Wed, 20 Jan 2010 07:04:10 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DA91D1CE54; Wed, 20 Jan 2010 08:04:09 +0100 (CET) Date: Wed, 20 Jan 2010 08:04:09 +0100 From: Ed Schouten To: Bruce Evans Message-ID: <20100120070409.GJ64905@hoeg.nl> References: <201001192307.o0JN7CKu034318@svn.freebsd.org> <20100120163243.A68431@delplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ab67L9H6qvgO+k5w" Content-Disposition: inline In-Reply-To: <20100120163243.A68431@delplex.bde.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: r202661 - head/lib/libc/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: Wed, 20 Jan 2010 07:04:11 -0000 --ab67L9H6qvgO+k5w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Bruce Evans wrote: > Of course it is against standards. This is implicit for most functions, > and the part of the standard that you quoted says it explicitly for > uname(): >=20 > > | The following shall be declared as a function and may also be defined > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ > > | as a macro: > > | > > | int uname(struct utsname *); >=20 > Examples of use of the function when it is also defined as a macro: >=20 > It turned out I slightly misinterpreted the sentence. It should declared as a function *and* may also be defined as a macro. When I read this at first, I interpreted the word "and" as an "or", which in my mind makes sense when you try to keep things simple. But yes, if uname wouldn't be provided as a real function, there are many constructs that could of course break. The most confusing part about this, is that the uname function we provide in libc doesn't match the one in , which uses 128 bytes instead of 32. Fortunately it's not possible to #undef the inline function, but it still sounds quite scary to me. --=20 Ed Schouten WWW: http://80386.nl/ --ab67L9H6qvgO+k5w Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktWqukACgkQ52SDGA2eCwVPhgCcCNfSxAbD8K/4tEGKtFMOnqss AhEAn2WYvmLQLnzyJQGgZcR9JRBuQ37Q =oFLc -----END PGP SIGNATURE----- --ab67L9H6qvgO+k5w-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 07:08:46 2010 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 91B351065670; Wed, 20 Jan 2010 07:08:46 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5F08FC13; Wed, 20 Jan 2010 07:08:45 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0K78hX9046016; Wed, 20 Jan 2010 10:08:43 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263971324; bh=EGShhDyr6nFFK38DjVFXSG35ZXPPbgxErZ8/s+KKRU4=; l=1340; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=GHfd2kb61ORTP1p2Q/kCwOrHfrUq0yWM+Y1lG3DG5OR2KcEafQqnAmv01qquUF359 xg9BNlHAx3w7rCbnnnMNJrMQSx8NkftSdW/AbiauPAAHIkEJpbUEaTYkONc0quxleC ORmwEbApi1E45Qbnp4sFJbHDNxc6QHkHPe5RoJnI= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0K78h43046015; Wed, 20 Jan 2010 10:08:43 +0300 (MSK) (envelope-from ache) Date: Wed, 20 Jan 2010 10:08:43 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100120070843.GA45937@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100120012639.B67517@delplex.bde.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: r202572 - head/lib/libc/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: Wed, 20 Jan 2010 07:08:46 -0000 On Wed, Jan 20, 2010 at 01:42:08AM +1100, Bruce Evans wrote: > The comment was correct. It says that POSIX requires strcoll() for > alphasort(), not for opendir(). Since opendir() is not alphasort(), > and it wants plain ASCII sorting to support union file systems, it > intentionally doesn't use either alphasort() or strcoll(). Yes, the comment _alone_ was correct, but its place - isn't. Along with function name containing _alphasort part it makes impression that opendir() uses this type of sort too. BTW, we already have the same correct comment but in the proper place in the scandir.c > Was correct, but it could have been clearer by saying ", so opendir() > uses this comparison function instead of alphasort()". "So", what? The two mentioned things are unrelated and can't be concatenated by "so". > I forget what the old name was. Having alphasort in the name here was > wrong 3 layers deep, since this is not alphasort(), and alphasort() is not > an alpha sorting function -- it is a lexicographically-on-the-whole- > character-set comparison function. Yes. > Correct modulo the name. What name you suggest, opendir_compar()? > New bug in a comment in scandir(): now has an extra blank line, due to > partial removal. Ok, will remove it a bit later. -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 07:27:57 2010 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 4FDAE106566B; Wed, 20 Jan 2010 07:27:57 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3ECD88FC13; Wed, 20 Jan 2010 07:27:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K7RvVf045241; Wed, 20 Jan 2010 07:27:57 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K7Rvrf045239; Wed, 20 Jan 2010 07:27:57 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001200727.o0K7Rvrf045239@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 20 Jan 2010 07:27:57 +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: r202677 - head/lib/libc/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: Wed, 20 Jan 2010 07:27:57 -0000 Author: ache Date: Wed Jan 20 07:27:56 2010 New Revision: 202677 URL: http://svn.freebsd.org/changeset/base/202677 Log: Style: remove extra empty line in the comment. Pointed by: bde Modified: head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Wed Jan 20 06:30:40 2010 (r202676) +++ head/lib/libc/gen/scandir.c Wed Jan 20 07:27:56 2010 (r202677) @@ -126,7 +126,6 @@ fail: /* * Alphabetic order comparison routine for those who want it. - * * POSIX 2008 requires the alphasort() to use strcoll(). */ int From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 07:28:15 2010 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 2550D1065740; Wed, 20 Jan 2010 07:28:15 +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 146748FC19; Wed, 20 Jan 2010 07:28:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K7SEFs045349; Wed, 20 Jan 2010 07:28:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K7SE4S045347; Wed, 20 Jan 2010 07:28:14 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001200728.o0K7SE4S045347@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 20 Jan 2010 07:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202678 - head/sys/dev/cxgb 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: Wed, 20 Jan 2010 07:28:15 -0000 Author: np Date: Wed Jan 20 07:28:14 2010 New Revision: 202678 URL: http://svn.freebsd.org/changeset/base/202678 Log: Complain if freelist queue sizes are significantly less than desired. MFC after: 1 day Modified: head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Jan 20 07:27:56 2010 (r202677) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Jan 20 07:28:14 2010 (r202678) @@ -541,8 +541,12 @@ t3_sge_prep(adapter_t *adap, struct sge_ jumbo_q_size = min(nmbjumbo4/(3*nqsets), JUMBO_Q_SIZE); #endif while (!powerof2(jumbo_q_size)) - jumbo_q_size--; - + jumbo_q_size--; + + if (fl_q_size < (FL_Q_SIZE / 4) || jumbo_q_size < (JUMBO_Q_SIZE / 2)) + device_printf(adap->dev, + "Insufficient clusters and/or jumbo buffers.\n"); + /* XXX Does ETHER_ALIGN need to be accounted for here? */ p->max_pkt_size = adap->sge.qs[0].fl[1].buf_size - sizeof(struct cpl_rx_data); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 07:36:30 2010 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 41590106566B; Wed, 20 Jan 2010 07:36:30 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3090F8FC12; Wed, 20 Jan 2010 07:36:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K7aUsX047249; Wed, 20 Jan 2010 07:36:30 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K7aUag047247; Wed, 20 Jan 2010 07:36:30 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001200736.o0K7aUag047247@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 20 Jan 2010 07:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202679 - head/lib/libc/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: Wed, 20 Jan 2010 07:36:30 -0000 Author: ache Date: Wed Jan 20 07:36:29 2010 New Revision: 202679 URL: http://svn.freebsd.org/changeset/base/202679 Log: Style: rename internal function to opendir_compar() Pointed by: bde Modified: head/lib/libc/gen/opendir.c Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Wed Jan 20 07:28:14 2010 (r202678) +++ head/lib/libc/gen/opendir.c Wed Jan 20 07:36:29 2010 (r202679) @@ -93,7 +93,7 @@ __opendir2(const char *name, int flags) } static int -opendir_sort(const void *p1, const void *p2) +opendir_compar(const void *p1, const void *p2) { return (strcmp((*(const struct dirent **)p1)->d_name, @@ -249,7 +249,7 @@ __opendir_common(int fd, const char *nam * This sort must be stable. */ mergesort(dpv, n, sizeof(*dpv), - opendir_sort); + opendir_compar); dpv[n] = NULL; xp = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 07:41:00 2010 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 8C0A71065670; Wed, 20 Jan 2010 07:41:00 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 5237D8FC13; Wed, 20 Jan 2010 07:41:00 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C0CF61CE23; Wed, 20 Jan 2010 08:40:59 +0100 (CET) Date: Wed, 20 Jan 2010 08:40:59 +0100 From: Ed Schouten To: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100120074059.GM64905@hoeg.nl> References: <20100120002319.GA31669@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DeYurzQ2E3CmYRTV" Content-Disposition: inline In-Reply-To: <20100120002319.GA31669@zim.MIT.EDU> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys 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: Wed, 20 Jan 2010 07:41:00 -0000 --DeYurzQ2E3CmYRTV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * David Schultz wrote: > A small number of ports might use it, but more likely they just use > --std=3Dgnu89 or --std=3Dgnu99 depending on which standard they were > written to. I'm not sure whether __gnu89_inline ought to be removed > from cdefs.h just yet, but if nobody uses it or cares about it, then > I'm happy to burn this bridge. I guess it's very unlikely that this may cause any serious breakage. __gnu89_inline has only been part of one release, namely 8.0. --=20 Ed Schouten WWW: http://80386.nl/ --DeYurzQ2E3CmYRTV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktWs4sACgkQ52SDGA2eCwWAlACdFpmxGZegIrJfZB0dwg8io8kp UtMAn3Jm1cR/B2ffo+ZpdS99DvbbRWtF =rdTT -----END PGP SIGNATURE----- --DeYurzQ2E3CmYRTV-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 08:43:34 2010 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 E7F1D106568D; Wed, 20 Jan 2010 08:43:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 80DAD8FC24; Wed, 20 Jan 2010 08:43:34 +0000 (UTC) Received: from besplex.bde.org (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0K8hTmQ021109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2010 19:43:32 +1100 Date: Wed, 20 Jan 2010 19:43:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov In-Reply-To: <20100120070843.GA45937@nagual.pp.ru> Message-ID: <20100120191752.Q2120@besplex.bde.org> References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r202572 - head/lib/libc/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: Wed, 20 Jan 2010 08:43:35 -0000 On Wed, 20 Jan 2010, Andrey Chernov wrote: > On Wed, Jan 20, 2010 at 01:42:08AM +1100, Bruce Evans wrote: >> The comment was correct. It says that POSIX requires strcoll() for >> alphasort(), not for opendir(). Since opendir() is not alphasort(), >> and it wants plain ASCII sorting to support union file systems, it >> intentionally doesn't use either alphasort() or strcoll(). > > Yes, the comment _alone_ was correct, but its place - isn't. Along with > function name containing _alphasort part it makes impression that > opendir() uses this type of sort too. No, it is a comment about opendir()'s comparison function. It has nothing to do with scandir(), and the only thing that it has to do with alphasort() is that it must be different for the reasons described. > BTW, we already have the same correct comment but in the proper place in > the scandir.c That one is quite different. It describes why alphasort() (now) uses strcoll(). It is because POSIX says so. This comment is relatively useless. It obviously uses strcoll(), and it is a POSIX interface so this would be surprising only if it conflicted with POSIX. The comment is there mainly for historical reasons, and history belongs in the man page more than here. BTW, I don't remember any man page updates for this. The man page still only says that alphasort() can be used to give alphabetical sorting in scandir(). >> Was correct, but it could have been clearer by saying ", so opendir() >> uses this comparison function instead of alphasort()". > > "So", what? The two mentioned things are unrelated and can't be > concatenated by "so". They are related. >> I forget what the old name was. Having alphasort in the name here was >> wrong 3 layers deep, since this is not alphasort(), and alphasort() is not >> an alpha sorting function -- it is a lexicographically-on-the-whole- >> character-set comparison function. > > Yes. > >> Correct modulo the name. > > What name you suggest, opendir_compar()? OK. >> New bug in a comment in scandir(): now has an extra blank line, due to >> partial removal. > > Ok, will remove it a bit later. I can't see this now (some illusion from my mailer or $TERMCAP misformatting the patch?), but now I see an extra "the" in it: "requires the alphasort() to use strcoll()" should be either "requires that alphasort() uses strcoll()" (preferred) or "requires alphasort() to use strcoll()" (probably intended, but not too passive). I thought that you removed this line completely. The previous line is even less useful. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 09:29:07 2010 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 97983106566B; Wed, 20 Jan 2010 09:29:07 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87AC38FC13; Wed, 20 Jan 2010 09:29:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K9T7WJ072169; Wed, 20 Jan 2010 09:29:07 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K9T7m0072167; Wed, 20 Jan 2010 09:29:07 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201001200929.o0K9T7m0072167@svn.freebsd.org> From: Hiroki Sato Date: Wed, 20 Jan 2010 09:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202686 - head/usr.sbin/ypserv 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: Wed, 20 Jan 2010 09:29:07 -0000 Author: hrs Date: Wed Jan 20 09:29:07 2010 New Revision: 202686 URL: http://svn.freebsd.org/changeset/base/202686 Log: Try a privileged port for binding whenever possible because the ypbind daemon requires the ypserv daemon is running on a privileged port. Reported by: Andrzej Tobola Modified: head/usr.sbin/ypserv/yp_main.c Modified: head/usr.sbin/ypserv/yp_main.c ============================================================================== --- head/usr.sbin/ypserv/yp_main.c Wed Jan 20 09:26:28 2010 (r202685) +++ head/usr.sbin/ypserv/yp_main.c Wed Jan 20 09:29:07 2010 (r202686) @@ -303,13 +303,18 @@ create_service(const int sock, const str freeaddrinfo(res0); return -1; } - if (bind(s, res->ai_addr, - res->ai_addrlen) == -1) { - _msgout("cannot bind %s socket: %s", - nconf->nc_netid, strerror(errno)); - freeaddrinfo(res0); - close(sock); - return -1; + if (bindresvport_sa(s, res->ai_addr) == -1) { + if ((errno != EPERM) || + (bind(s, res->ai_addr, + res->ai_addrlen) == -1)) { + _msgout("cannot bind " + "%s socket: %s", + nconf->nc_netid, + strerror(errno)); + freeaddrinfo(res0); + close(sock); + return -1; + } } if (nconf->nc_semantics != NC_TPI_CLTS) listen(s, SOMAXCONN); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 09:46:33 2010 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 9F23F106566C; Wed, 20 Jan 2010 09:46:33 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id F12948FC15; Wed, 20 Jan 2010 09:46:32 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0K9kU34053414; Wed, 20 Jan 2010 12:46:30 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263980790; bh=TO51WibxmPIRQFA0xFt8/aR7ntoxCYpjy2hTdDmvzhY=; l=1947; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=dMq3VGFBtJxA5AvEWvFvR2Mo8DJ+bLHa4XTdcH9puLWeLPfJ7XxYuI3rrctzBhIt7 Kr3pMGg74hVrZtykZkSi88BQfjVpqBAwVsMdp1KEt2g9TnJvEcm8Ed9D66TitL0I3Z daPPAx+lAztKdzgXvObnMyz53alXI23os/Imtbb0= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0K9kTMH053413; Wed, 20 Jan 2010 12:46:30 +0300 (MSK) (envelope-from ache) Date: Wed, 20 Jan 2010 12:46:28 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100120094627.GA53020@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100120191752.Q2120@besplex.bde.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: r202572 - head/lib/libc/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: Wed, 20 Jan 2010 09:46:33 -0000 On Wed, Jan 20, 2010 at 07:43:29PM +1100, Bruce Evans wrote: > No, it is a comment about opendir()'s comparison function. It has nothing > to do with scandir(), and the only thing that it has to do with alphasort() > is that it must be different for the reasons described. Then the comment was plain wrong (not misplaced), so removing it becomes right again because the comment states: "opendir()'s comparison function" according to POSIX 2008 and XSI 7 should use strcoll(). But there is nothing said about opendir() & strcoll() relation in the mentioned standards. The only word I found is that opendir() returns "ordered" sequence, but nowhere mentioned ordered by what criteria, so perhaps they mean "stable": "The type DIR, which is defined in the header, represents a directory stream, which is an ordered sequence of all the directory entries in a particular directory." > page more than here. BTW, I don't remember any man page updates for > this. The man page still only says that alphasort() can be used to > give alphabetical sorting in scandir(). Alphabetically already means sorted according to collate, otherwhise it is called binary. Perhaps manpage should refer strcoll() directly. > I can't see this now (some illusion from my mailer or $TERMCAP > misformatting the patch?), but now I see an extra "the" in it: > > "requires the alphasort() to use strcoll()" > > should be either > > "requires that alphasort() uses strcoll()" > > (preferred) or > > "requires alphasort() to use strcoll()" > > (probably intended, but not too passive). I thought that you removed > this line completely. The previous line is even less useful. I don't add extra "the" there) What do you want, clarify please: 1) Remove whole comment. 2) Remove only first line and correct second to "that". 3) Just correct second to "that". -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 10:33:13 2010 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 BCFF91065693; Wed, 20 Jan 2010 10:33:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 5529E8FC08; Wed, 20 Jan 2010 10:33:12 +0000 (UTC) Received: from besplex.bde.org (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0KAX8im020073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2010 21:33:10 +1100 Date: Wed, 20 Jan 2010 21:33:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov In-Reply-To: <20100120094627.GA53020@nagual.pp.ru> Message-ID: <20100120211722.S2451@besplex.bde.org> References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r202572 - head/lib/libc/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: Wed, 20 Jan 2010 10:33:13 -0000 On Wed, 20 Jan 2010, Andrey Chernov wrote: > On Wed, Jan 20, 2010 at 07:43:29PM +1100, Bruce Evans wrote: >> No, it is a comment about opendir()'s comparison function. It has nothing >> to do with scandir(), and the only thing that it has to do with alphasort() >> is that it must be different for the reasons described. > > Then the comment was plain wrong (not misplaced), so removing it becomes > right again because the comment states: "opendir()'s comparison function" > according to POSIX 2008 and XSI 7 should use strcoll(). No. It never mentioned opendir() or even scandir(). It only mentioned the relevant things. Here it is: 1.25 (delphij 16-Apr-08): /* 1.27 (kib 05-Jan-10): * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for 1.27 (kib 05-Jan-10): * directory entries ordering. Use local copy that uses strcmp(). 1.27 (kib 05-Jan-10): */ > But there is > nothing said about opendir() & strcoll() relation in the mentioned > standards. The only word I found is that opendir() returns "ordered" > sequence, but nowhere mentioned ordered by what criteria, so perhaps they > mean "stable": As I said before, sorting in opendir() has nothing to do with POSIX! It is an implementation detail for union file systems/mounts. >> page more than here. BTW, I don't remember any man page updates for >> this. The man page still only says that alphasort() can be used to >> give alphabetical sorting in scandir(). > > Alphabetically already means sorted according to collate, otherwhise it is > called binary. Perhaps manpage should refer strcoll() directly. Yes it should, like POSIX does. It should also give the FreeBSD extension of POSIX. POSIX says: "If the strcoll() function fails, then the return value of alphasort() is unspecified.", but this makes alphasort() unusable since a qsort() comparison function must return a specified value. > >> I can't see this now (some illusion from my mailer or $TERMCAP >> misformatting the patch?), but now I see an extra "the" in it: >> >> "requires the alphasort() to use strcoll()" >> >> should be either >> >> "requires that alphasort() uses strcoll()" >> >> (preferred) or >> >> "requires alphasort() to use strcoll()" >> >> (probably intended, but not too passive). I thought that you removed >> this line completely. The previous line is even less useful. > > I don't add extra "the" there) What do you want, clarify please: > 1) Remove whole comment. > 2) Remove only first line and correct second to "that". > 3) Just correct second to "that". Correct the second line to "that ... uses". Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 11:55:14 2010 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 C70561065672; Wed, 20 Jan 2010 11:55:14 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5EBB8FC0C; Wed, 20 Jan 2010 11:55:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KBtEel092860; Wed, 20 Jan 2010 11:55:14 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KBtEIw092858; Wed, 20 Jan 2010 11:55:14 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001201155.o0KBtEIw092858@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 20 Jan 2010 11:55: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: r202691 - head/lib/libc/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: Wed, 20 Jan 2010 11:55:14 -0000 Author: ache Date: Wed Jan 20 11:55:14 2010 New Revision: 202691 URL: http://svn.freebsd.org/changeset/base/202691 Log: For alphasort() add reference to strcoll(3) Modified: head/lib/libc/gen/scandir.3 Modified: head/lib/libc/gen/scandir.3 ============================================================================== --- head/lib/libc/gen/scandir.3 Wed Jan 20 10:21:04 2010 (r202690) +++ head/lib/libc/gen/scandir.3 Wed Jan 20 11:55:14 2010 (r202691) @@ -81,7 +81,8 @@ The function is a routine which can be used for the .Fa compar -argument to sort the array alphabetically. +argument to sort the array alphabetically using +.Xr strcoll 3 . .Pp The memory allocated for the array can be deallocated with .Xr free 3 , @@ -94,7 +95,8 @@ cannot allocate enough memory to hold al .Xr directory 3 , .Xr malloc 3 , .Xr qsort 3 , -.Xr dir 5 +.Xr dir 5 , +.Xr strcoll 3 .Sh HISTORY The .Fn scandir From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 11:58:04 2010 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 B38FC106568B; Wed, 20 Jan 2010 11:58:04 +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 A35618FC0C; Wed, 20 Jan 2010 11:58:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KBw4qF093526; Wed, 20 Jan 2010 11:58:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KBw4oW093523; Wed, 20 Jan 2010 11:58:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001201158.o0KBw4oW093523@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 20 Jan 2010 11:58:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202692 - in head/sys: kern sys 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: Wed, 20 Jan 2010 11:58:04 -0000 Author: kib Date: Wed Jan 20 11:58:04 2010 New Revision: 202692 URL: http://svn.freebsd.org/changeset/base/202692 Log: When traced process is about to receive the signal, the process is stopped and debugger may modify or drop the signal. After the changes to keep process-targeted signals on the process sigqueue, another thread may note the old signal on the queue and act before the thread removes changed or dropped signal from the process queue. Since process is traced, it usually gets stopped. Or, if the same signal is delivered while process was stopped, the thread may erronously remove it, intending to remove the original signal. Remove the signal from the queue before notifying the debugger. Restore the siginfo to the head of sigqueue when signal is allowed to be delivered to the debugee, using newly introduced KSI_HEAD ksiginfo_t flag. This preserves required order of delivery. Always restore the unchanged signal on the curthread sigqueue, not to the process queue, since the thread is about to get it anyway, because sigmask cannot be changed. Handle failure of reinserting the siginfo into the queue by falling back to sq_kill method, calling sigqueue_add with NULL ksi. If debugger changed the signal to be delivered, use sigqueue_add() with NULL ksi instead of only setting sq_signals bit. Reported by: Gardner Bell Analyzed and first version of fix by: Tijl Coosemans PR: 142757 Reviewed by: davidxu MFC after: 2 weeks Modified: head/sys/kern/kern_sig.c head/sys/sys/signalvar.h Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Jan 20 11:55:14 2010 (r202691) +++ head/sys/kern/kern_sig.c Wed Jan 20 11:58:04 2010 (r202692) @@ -357,7 +357,10 @@ sigqueue_add(sigqueue_t *sq, int signo, /* directly insert the ksi, don't copy it */ if (si->ksi_flags & KSI_INS) { - TAILQ_INSERT_TAIL(&sq->sq_list, si, ksi_link); + if (si->ksi_flags & KSI_HEAD) + TAILQ_INSERT_HEAD(&sq->sq_list, si, ksi_link); + else + TAILQ_INSERT_TAIL(&sq->sq_list, si, ksi_link); si->ksi_sigq = sq; goto out_set_bit; } @@ -378,7 +381,10 @@ sigqueue_add(sigqueue_t *sq, int signo, p->p_pendingcnt++; ksiginfo_copy(si, ksi); ksi->ksi_signo = signo; - TAILQ_INSERT_TAIL(&sq->sq_list, ksi, ksi_link); + if (si->ksi_flags & KSI_HEAD) + TAILQ_INSERT_HEAD(&sq->sq_list, ksi, ksi_link); + else + TAILQ_INSERT_TAIL(&sq->sq_list, ksi, ksi_link); ksi->ksi_sigq = sq; } @@ -2492,6 +2498,7 @@ issignal(struct thread *td, int stop_all struct sigacts *ps; struct sigqueue *queue; sigset_t sigpending; + ksiginfo_t ksi; int sig, prop, newsig; p = td->td_proc; @@ -2529,24 +2536,22 @@ issignal(struct thread *td, int stop_all if (p->p_flag & P_TRACED && (p->p_flag & P_PPWAIT) == 0) { /* * If traced, always stop. + * Remove old signal from queue before the stop. + * XXX shrug off debugger, it causes siginfo to + * be thrown away. */ + queue = &td->td_sigqueue; + ksi.ksi_signo = 0; + if (sigqueue_get(queue, sig, &ksi) == 0) { + queue = &p->p_sigqueue; + sigqueue_get(queue, sig, &ksi); + } + mtx_unlock(&ps->ps_mtx); newsig = ptracestop(td, sig); mtx_lock(&ps->ps_mtx); if (sig != newsig) { - ksiginfo_t ksi; - - queue = &td->td_sigqueue; - /* - * clear old signal. - * XXX shrug off debugger, it causes siginfo to - * be thrown away. - */ - if (sigqueue_get(queue, sig, &ksi) == 0) { - queue = &p->p_sigqueue; - sigqueue_get(queue, sig, &ksi); - } /* * If parent wants us to take the signal, @@ -2561,10 +2566,20 @@ issignal(struct thread *td, int stop_all * Put the new signal into td_sigqueue. If the * signal is being masked, look for other signals. */ - SIGADDSET(queue->sq_signals, sig); + sigqueue_add(queue, sig, NULL); if (SIGISMEMBER(td->td_sigmask, sig)) continue; signotify(td); + } else { + if (ksi.ksi_signo != 0) { + ksi.ksi_flags |= KSI_HEAD; + if (sigqueue_add(&td->td_sigqueue, sig, + &ksi) != 0) + ksi.ksi_signo = 0; + } + if (ksi.ksi_signo == 0) + sigqueue_add(&td->td_sigqueue, sig, + NULL); } /* Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Wed Jan 20 11:55:14 2010 (r202691) +++ head/sys/sys/signalvar.h Wed Jan 20 11:58:04 2010 (r202692) @@ -234,6 +234,7 @@ typedef struct ksiginfo { #define KSI_EXT 0x02 /* Externally managed ksi. */ #define KSI_INS 0x04 /* Directly insert ksi, not the copy */ #define KSI_SIGQ 0x08 /* Generated by sigqueue, might ret EGAIN. */ +#define KSI_HEAD 0x10 /* Insert into head, not tail. */ #define KSI_COPYMASK (KSI_TRAP|KSI_SIGQ) #define KSI_ONQ(ksi) ((ksi)->ksi_sigq != NULL) From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 11:59:47 2010 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 0818F106568F; Wed, 20 Jan 2010 11:59:47 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECD8E8FC15; Wed, 20 Jan 2010 11:59:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KBxkHF093922; Wed, 20 Jan 2010 11:59:46 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KBxk6v093920; Wed, 20 Jan 2010 11:59:46 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001201159.o0KBxk6v093920@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 20 Jan 2010 11:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202693 - head/lib/libc/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: Wed, 20 Jan 2010 11:59:47 -0000 Author: ache Date: Wed Jan 20 11:59:46 2010 New Revision: 202693 URL: http://svn.freebsd.org/changeset/base/202693 Log: Style: reword comment. Submitted by: bde Modified: head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Wed Jan 20 11:58:04 2010 (r202692) +++ head/lib/libc/gen/scandir.c Wed Jan 20 11:59:46 2010 (r202693) @@ -126,7 +126,7 @@ fail: /* * Alphabetic order comparison routine for those who want it. - * POSIX 2008 requires the alphasort() to use strcoll(). + * POSIX 2008 requires that alphasort() uses strcoll(). */ int alphasort(const struct dirent **d1, const struct dirent **d2) From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 12:18:33 2010 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 0EF8C106566B; Wed, 20 Jan 2010 12:18:33 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 7A4988FC28; Wed, 20 Jan 2010 12:18:32 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0KCITru055680; Wed, 20 Jan 2010 15:18:29 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263989909; bh=soIkJbpzY+jfEwe5JnvRhgatMNy/dFCo9f/MQbGLbiw=; l=1297; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=uKAeSA3LHQx5O9edRVciXFIzdmgZqRjHQisa371pea0XmjGlcJMjyvctOfmfhHGeI KAd7Dl/6JJU/sHzn+iythbtdgySdrsGU38QI+q7pLCUD4x1IW4cG5PKZBYA3xERySh xso+l7NgGUAg+Ql+DxGV++bYOiloQ4St1GuQH5LQ= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0KCISaE055679; Wed, 20 Jan 2010 15:18:28 +0300 (MSK) (envelope-from ache) Date: Wed, 20 Jan 2010 15:18:28 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100120121827.GA55236@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> <20100120211722.S2451@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100120211722.S2451@besplex.bde.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: r202572 - head/lib/libc/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: Wed, 20 Jan 2010 12:18:33 -0000 On Wed, Jan 20, 2010 at 09:33:08PM +1100, Bruce Evans wrote: > > But there is > > nothing said about opendir() & strcoll() relation in the mentioned > > standards. The only word I found is that opendir() returns "ordered" > > sequence, but nowhere mentioned ordered by what criteria, so perhaps they > > mean "stable": > > As I said before, sorting in opendir() has nothing to do with POSIX! It > is an implementation detail for union file systems/mounts. Moreover, even sorting itself is not required here. We sort just to remove dups. > It should also give the FreeBSD > extension of POSIX. POSIX says: "If the strcoll() function fails, > then the return value of alphasort() is unspecified.", but this makes > alphasort() unusable since a qsort() comparison function must return > a specified value. To be used in practice, strcoll() should never fails, doing fallback to strcmp() instead, not only in that, but in lots of other cases too (it may set errno like EILSEQ, but not fails). The next important thing is to return 0 only for true binary equals, additionaly ranking (f.e. by strcmp()) anything inside classes of equality to stabilize result. I hope our strcoll() will be kept in that state after implementing UCA too. -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 13:31:12 2010 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 A4EF71065670; Wed, 20 Jan 2010 13:31:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94F4F8FC0A; Wed, 20 Jan 2010 13:31:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KDVCgL014069; Wed, 20 Jan 2010 13:31:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KDVCM1014061; Wed, 20 Jan 2010 13:31:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001201331.o0KDVCM1014061@svn.freebsd.org> From: Alexander Motin Date: Wed, 20 Jan 2010 13:31: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: r202694 - head/sbin/camcontrol 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: Wed, 20 Jan 2010 13:31:12 -0000 Author: mav Date: Wed Jan 20 13:31:12 2010 New Revision: 202694 URL: http://svn.freebsd.org/changeset/base/202694 Log: - Add -v argument to `camcontrol identify` command. It makes camcontrol print full identify data block. - Improve identify result view and add TRIM support. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Wed Jan 20 11:59:46 2010 (r202693) +++ head/sbin/camcontrol/camcontrol.8 Wed Jan 20 13:31:12 2010 (r202694) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2009 +.Dd January 20, 2010 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -62,6 +62,7 @@ .Ic identify .Op device id .Op generic args +.Op Fl v .Nm .Ic reportluns .Op device id Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Wed Jan 20 11:59:46 2010 (r202693) +++ head/sbin/camcontrol/camcontrol.c Wed Jan 20 13:31:12 2010 (r202694) @@ -1166,8 +1166,6 @@ atacapprint(struct ata_params *parm) } printf("\n"); - printf("overlap%ssupported\n", - parm->capabilities1 & ATA_SUPPORT_OVERLAP ? " " : " not "); if (parm->media_rotation_rate == 1) { printf("media RPM non-rotating\n"); } else if (parm->media_rotation_rate >= 0x0401 && @@ -1187,20 +1185,26 @@ atacapprint(struct ata_params *parm) printf("flush cache %s %s\n", parm->support.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no", parm->enabled.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no"); + printf("overlap %s\n", + parm->capabilities1 & ATA_SUPPORT_OVERLAP ? "yes" : "no"); + printf("Tagged Command Queuing (TCQ) %s %s", + parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", + parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no"); + if (parm->support.command2 & ATA_SUPPORT_QUEUED) { + printf(" %d tags\n", + ATA_QUEUE_LEN(parm->queue) + 1); + } else + printf("\n"); if (parm->satacapabilities && parm->satacapabilities != 0xffff) { - printf("Native Command Queuing (NCQ) %s " - " %d/0x%02X\n", + printf("Native Command Queuing (NCQ) %s ", parm->satacapabilities & ATA_SUPPORT_NCQ ? - "yes" : "no", - (parm->satacapabilities & ATA_SUPPORT_NCQ) ? - ATA_QUEUE_LEN(parm->queue) : 0, - (parm->satacapabilities & ATA_SUPPORT_NCQ) ? - ATA_QUEUE_LEN(parm->queue) : 0); + "yes" : "no"); + if (parm->satacapabilities & ATA_SUPPORT_NCQ) { + printf(" %d tags\n", + ATA_QUEUE_LEN(parm->queue) + 1); + } else + printf("\n"); } - printf("Tagged Command Queuing (TCQ) %s %s %d/0x%02X\n", - parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", - parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", - ATA_QUEUE_LEN(parm->queue), ATA_QUEUE_LEN(parm->queue)); printf("SMART %s %s\n", parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no", parm->enabled.command1 & ATA_SUPPORT_SMART ? "yes" : "no"); @@ -1241,6 +1245,8 @@ atacapprint(struct ata_params *parm) printf("free-fall %s %s\n", parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no", parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no"); + printf("data set management (TRIM) %s\n", + parm->support_dsm & ATA_SUPPORT_DSM_TRIM ? "yes" : "no"); } @@ -1327,8 +1333,18 @@ ataidentify(struct cam_device *device, i for (i = 0; i < sizeof(struct ata_params) / 2; i++) ptr[i] = le16toh(ptr[i]); + if (arglist & CAM_ARG_VERBOSE) { + fprintf(stdout, "%s%d: Raw identify data:\n", + device->device_name, device->dev_unit_num); + for (i = 0; i < sizeof(struct ata_params) / 2; i++) { + if ((i % 8) == 0) + fprintf(stdout, " %3d: ", i); + fprintf(stdout, "%04x ", (uint16_t)ptr[i]); + if ((i % 8) == 7) + fprintf(stdout, "\n"); + } + } ident_buf = (struct ata_params *)ptr; - if (strncmp(ident_buf->model, "FX", 2) && strncmp(ident_buf->model, "NEC", 3) && strncmp(ident_buf->model, "Pioneer", 7) && @@ -2286,6 +2302,7 @@ scsicmd(struct cam_device *device, int a error = 1; goto scsicmd_bailout; } + bzero(data_ptr, data_bytes); /* * If the user supplied "-" instead of a format, he * wants the data to be read from stdin. @@ -4305,7 +4322,7 @@ usage(int verbose) " camcontrol periphlist [dev_id][-n dev_name] [-u unit]\n" " camcontrol tur [dev_id][generic args]\n" " camcontrol inquiry [dev_id][generic args] [-D] [-S] [-R]\n" -" camcontrol identify [dev_id][generic args]\n" +" camcontrol identify [dev_id][generic args] [-v]\n" " camcontrol reportluns [dev_id][generic args] [-c] [-l] [-r report]\n" " camcontrol readcap [dev_id][generic args] [-b] [-h] [-H] [-N]\n" " [-q] [-s]\n" From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 14:17:42 2010 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 5021F106566C; Wed, 20 Jan 2010 14:17:42 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 403158FC08; Wed, 20 Jan 2010 14:17:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KEHgwv025187; Wed, 20 Jan 2010 14:17:42 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KEHgLM025185; Wed, 20 Jan 2010 14:17:42 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001201417.o0KEHgLM025185@svn.freebsd.org> From: Neel Natu Date: Wed, 20 Jan 2010 14:17: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: r202697 - head/sys/mips/mips 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: Wed, 20 Jan 2010 14:17:42 -0000 Author: neel Date: Wed Jan 20 14:17:41 2010 New Revision: 202697 URL: http://svn.freebsd.org/changeset/base/202697 Log: Make sure that interrupts are enabled when thread0 is running. Approved by: imp (mentor) Modified: head/sys/mips/mips/machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Wed Jan 20 13:50:30 2010 (r202696) +++ head/sys/mips/mips/machdep.c Wed Jan 20 14:17:41 2010 (r202697) @@ -351,7 +351,9 @@ mips_vector_init(void) * Mask all interrupts. Each interrupt will be enabled * when handler is installed for it */ - set_intr_mask (ALL_INT_MASK); + set_intr_mask(ALL_INT_MASK); + enableintr(); + /* Clear BEV in SR so we start handling our own exceptions */ mips_cp0_status_write(mips_cp0_status_read() & ~SR_BOOT_EXC_VEC); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 14:21:28 2010 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 A50061065694; Wed, 20 Jan 2010 14:21:28 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B67E8FC15; Wed, 20 Jan 2010 14:21:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KELSg9026265; Wed, 20 Jan 2010 14:21:28 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KELSeN026261; Wed, 20 Jan 2010 14:21:28 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001201421.o0KELSeN026261@svn.freebsd.org> From: Neel Natu Date: Wed, 20 Jan 2010 14:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202698 - in head/sys/mips: include mips 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: Wed, 20 Jan 2010 14:21:28 -0000 Author: neel Date: Wed Jan 20 14:21:28 2010 New Revision: 202698 URL: http://svn.freebsd.org/changeset/base/202698 Log: Get rid of unused function MipsTLBInvalidException(). Approved by: imp (mentor) Modified: head/sys/mips/include/trap.h head/sys/mips/mips/db_trace.c head/sys/mips/mips/exception.S Modified: head/sys/mips/include/trap.h ============================================================================== --- head/sys/mips/include/trap.h Wed Jan 20 14:17:41 2010 (r202697) +++ head/sys/mips/include/trap.h Wed Jan 20 14:21:28 2010 (r202698) @@ -112,7 +112,6 @@ void MipsFPTrap(u_int, u_int, u_int); void MipsKernGenException(void); void MipsKernIntr(void); void MipsKernTLBInvalidException(void); -void MipsTLBInvalidException(void); void MipsTLBMissException(void); void MipsUserGenException(void); void MipsUserIntr(void); Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Wed Jan 20 14:17:41 2010 (r202697) +++ head/sys/mips/mips/db_trace.c Wed Jan 20 14:21:28 2010 (r202698) @@ -162,11 +162,8 @@ loop: subr = (uintptr_t)MipsUserGenException; else if (pcBetween(MipsKernIntr, MipsUserIntr)) subr = (uintptr_t)MipsKernIntr; - else if (pcBetween(MipsUserIntr, MipsTLBInvalidException)) + else if (pcBetween(MipsUserIntr, MipsKernTLBInvalidException)) subr = (uintptr_t)MipsUserIntr; - else if (pcBetween(MipsTLBInvalidException, - MipsKernTLBInvalidException)) - subr = (uintptr_t)MipsTLBInvalidException; else if (pcBetween(MipsKernTLBInvalidException, MipsUserTLBInvalidException)) subr = (uintptr_t)MipsKernTLBInvalidException; Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Wed Jan 20 14:17:41 2010 (r202697) +++ head/sys/mips/mips/exception.S Wed Jan 20 14:21:28 2010 (r202698) @@ -830,35 +830,6 @@ NNON_LEAF(MipsUserIntr, STAND_FRAME_SIZE .set at END(MipsUserIntr) -/*---------------------------------------------------------------------------- - * - * MipsTLBInvalidException -- - * - * Handle a TLB invalid exception. - * The BaddVAddr, Context, and EntryHi registers contain the failed - * virtual address. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------------- - */ -NLEAF(MipsTLBInvalidException) - .set noat - mfc0 k0, COP_0_STATUS_REG - nop - and k0, k0, SR_KSU_USER - bne k0, zero, _C_LABEL(MipsUserTLBInvalidException) - nop - .set at -END(MipsTLBInvalidException) -/* - * Fall through ... - */ - NLEAF(MipsKernTLBInvalidException) .set noat mfc0 k0, COP_0_BAD_VADDR # get the fault address From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 14:29:55 2010 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 88F3F1065676; Wed, 20 Jan 2010 14:29:55 +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 791588FC1A; Wed, 20 Jan 2010 14:29:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KETtNZ028635; Wed, 20 Jan 2010 14:29:55 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KETtBD028633; Wed, 20 Jan 2010 14:29:55 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001201429.o0KETtBD028633@svn.freebsd.org> From: Rui Paulo Date: Wed, 20 Jan 2010 14:29:55 +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: r202699 - head/sys/dev/ata 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: Wed, 20 Jan 2010 14:29:55 -0000 Author: rpaulo Date: Wed Jan 20 14:29:55 2010 New Revision: 202699 URL: http://svn.freebsd.org/changeset/base/202699 Log: Make ata_getrev() an optional method by implementing ata_null_getrev(). This fixes a bogus '???' boot message on Cambria boards with a CompactFlash card. Reviewed by: mav Modified: head/sys/dev/ata/ata_if.m Modified: head/sys/dev/ata/ata_if.m ============================================================================== --- head/sys/dev/ata/ata_if.m Wed Jan 20 14:21:28 2010 (r202698) +++ head/sys/dev/ata/ata_if.m Wed Jan 20 14:29:55 2010 (r202699) @@ -71,10 +71,17 @@ METHOD int setmode { int mode; } DEFAULT ata_null_setmode; +CODE { + static int ata_null_getrev(device_t dev, int target) + { + return (0); + } +}; + METHOD int getrev { device_t dev; int target; -}; +} DEFAULT ata_null_getrev; METHOD void reset { device_t channel; From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 14:48:42 2010 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 82253106566B; Wed, 20 Jan 2010 14:48:42 +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 708F18FC15; Wed, 20 Jan 2010 14:48:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KEmg3a033129; Wed, 20 Jan 2010 14:48:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KEmgWr033127; Wed, 20 Jan 2010 14:48:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001201448.o0KEmgWr033127@svn.freebsd.org> From: John Baldwin Date: Wed, 20 Jan 2010 14:48:42 +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: r202700 - stable/8/share/man/man9 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: Wed, 20 Jan 2010 14:48:42 -0000 Author: jhb Date: Wed Jan 20 14:48:42 2010 New Revision: 202700 URL: http://svn.freebsd.org/changeset/base/202700 Log: MFC 202285: - Note that if_xname, if_dname, and if_dunit are usually initialized via if_initname(). - Document if_drv_flags and replace references to IFF_(RUNNING|OACTIVE) with references to IFF_DRV_(RUNNING|OACTIVE). - Complete truncated sentence in the description of if_transmit by copying from the description in if_qflush. - Add missing line breaks for translators. Modified: stable/8/share/man/man9/ifnet.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/ifnet.9 ============================================================================== --- stable/8/share/man/man9/ifnet.9 Wed Jan 20 14:29:55 2010 (r202699) +++ stable/8/share/man/man9/ifnet.9 Wed Jan 20 14:48:42 2010 (r202700) @@ -237,11 +237,15 @@ The name of the interface, .Dq Li fxp0 or .Dq Li lo0 ) . -(Initialized by driver.) +(Initialized by driver +(usually via +.Fn if_initname ) . ) .It Va if_dname .Pq Vt "const char *" The name of the driver. -(Initialized by driver.) +(Initialized by driver +(usually via +.Fn if_initname ) . ) .It Va if_dunit .Pq Vt int A unique number assigned to each interface managed by a particular @@ -249,7 +253,9 @@ driver. Drivers may choose to set this to .Dv IF_DUNIT_NONE if a unit number is not associated with the device. -(Initialized by driver.) +(Initialized by driver +(usually via +.Fn if_initname ) . ) .It Va if_addrhead .Pq Vt "struct ifaddrhead" The head of the @@ -289,7 +295,11 @@ decremented by generic watchdog code.) .It Va if_flags .Pq Vt int Flags describing operational parameters of this interface (see below). -(Manipulated by both driver and generic code.) +(Manipulated by generic code.) +.It Va if_drv_flags +.Pq Vt int +Flags describing operational status of this interface (see below). +(Manipulated by driver.) .It Va if_capabilities .Pq Vt int Flags describing the capabilities the interface supports (see below). @@ -356,18 +366,26 @@ Output a packet on interface or queue it on the output queue if the interface is already active. .It Fn if_transmit Transmit a packet on an interface or queue it if the interface is -in use. This function will return +in use. +This function will return .Dv ENOBUFS -if the devices software and hardware queues are both full. This -function must be installed after +if the devices software and hardware queues are both full. +This function must be installed after +.Fn if_attach +to override the default implementation. +This function is exposed in order to allow drivers to manage their own queues +and to reduce the latency caused by a frequently gratuitous enqueue / dequeue +pair to ifq. +The suggested internal software queueing mechanism is buf_ring. .It Fn if_qflush Free mbufs in internally managed queues when the interface is marked down. This function must be installed after .Fn if_attach -to override the default implementation. This function is exposed in order -to allow drivers to manage their own queues and to reduce the latency -caused by a frequently gratuitous enqueue / dequeue pair to ifq. The -suggested internal software queueing mechanism is buf_ring. +to override the default implementation. +This function is exposed in order to allow drivers to manage their own queues +and to reduce the latency caused by a frequently gratuitous enqueue / dequeue +pair to ifq. +The suggested internal software queueing mechanism is buf_ring. .It Fn if_start Start queued output on an interface. This function is exposed in @@ -376,10 +394,10 @@ order to provide for some interface clas among all drivers. .Fn if_start may only be called when the -.Dv IFF_OACTIVE +.Dv IFF_DRV_OACTIVE flag is not set. (Thus, -.Dv IFF_OACTIVE +.Dv IFF_DRV_OACTIVE does not literally mean that output is active, but rather that the device's internal output queue is full.) Please note that this function will soon be deprecated. @@ -418,7 +436,7 @@ Initialize and bring up the hardware, e.g., reset the chip and the watchdog timer and enable the receiver unit. Should mark the interface running, but not active -.Dv ( IFF_RUNNING , ~IIF_OACTIVE ) . +.Dv ( IFF_DRV_RUNNING , ~IIF_DRV_OACTIVE ) . .It Fn if_resolvemulti Check the requested multicast group membership, .Fa addr , @@ -437,6 +455,12 @@ Flags of the former kind are marked .Aq S in this table; the latter are marked .Aq D . +Flags which begin with +.Dq IFF_DRV_ +are stored in +.Va if_drv_flags ; +all other flags are stored in +.Va if_flags . .Pp The macro .Dv IFF_CANTCHANGE @@ -466,7 +490,7 @@ The interface is a loopback device. The interface is point-to-point; .Dq broadcast address is actually the address of the other end. -.It Dv IFF_RUNNING +.It Dv IFF_DRV_RUNNING .Aq D* The interface has been configured and dynamic resources were successfully allocated. @@ -485,7 +509,7 @@ This interface is in the permanently pro .It Dv IFF_ALLMULTI .Aq D* This interface is in all-multicasts mode (used by multicast routers). -.It Dv IFF_OACTIVE +.It Dv IFF_DRV_OACTIVE .Aq D* The interface's hardware output queue (if any) is full; output packets are to be queued. From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 14:48:58 2010 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 751631065782; Wed, 20 Jan 2010 14:48:58 +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 63DBE8FC16; Wed, 20 Jan 2010 14:48:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KEmw6L033229; Wed, 20 Jan 2010 14:48:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KEmwGI033227; Wed, 20 Jan 2010 14:48:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001201448.o0KEmwGI033227@svn.freebsd.org> From: John Baldwin Date: Wed, 20 Jan 2010 14:48:58 +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: r202701 - stable/7/share/man/man9 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: Wed, 20 Jan 2010 14:48:58 -0000 Author: jhb Date: Wed Jan 20 14:48:58 2010 New Revision: 202701 URL: http://svn.freebsd.org/changeset/base/202701 Log: MFC 202285: - Note that if_xname, if_dname, and if_dunit are usually initialized via if_initname(). - Document if_drv_flags and replace references to IFF_(RUNNING|OACTIVE) with references to IFF_DRV_(RUNNING|OACTIVE). Modified: stable/7/share/man/man9/ifnet.9 Directory Properties: stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man9/ifnet.9 ============================================================================== --- stable/7/share/man/man9/ifnet.9 Wed Jan 20 14:48:42 2010 (r202700) +++ stable/7/share/man/man9/ifnet.9 Wed Jan 20 14:48:58 2010 (r202701) @@ -233,11 +233,15 @@ The name of the interface, .Dq Li fxp0 or .Dq Li lo0 ) . -(Initialized by driver.) +(Initialized by driver +(usually via +.Fn if_initname ) . ) .It Va if_dname .Pq Vt "const char *" The name of the driver. -(Initialized by driver.) +(Initialized by driver +(usually via +.Fn if_initname ) . ) .It Va if_dunit .Pq Vt int A unique number assigned to each interface managed by a particular @@ -245,7 +249,9 @@ driver. Drivers may choose to set this to .Dv IF_DUNIT_NONE if a unit number is not associated with the device. -(Initialized by driver.) +(Initialized by driver +(usually via +.Fn if_initname ) . ) .It Va if_addrhead .Pq Vt "struct ifaddrhead" The head of the @@ -285,7 +291,11 @@ decremented by generic watchdog code.) .It Va if_flags .Pq Vt int Flags describing operational parameters of this interface (see below). -(Manipulated by both driver and generic code.) +(Manipulated by generic code.) +.It Va if_drv_flags +.Pq Vt int +Flags describing operational status of this interface (see below). +(Manipulated by driver.) .It Va if_capabilities .Pq Vt int Flags describing the capabilities the interface supports (see below). @@ -358,10 +368,10 @@ order to provide for some interface clas among all drivers. .Fn if_start may only be called when the -.Dv IFF_OACTIVE +.Dv IFF_DRV_OACTIVE flag is not set. (Thus, -.Dv IFF_OACTIVE +.Dv IFF_DRV_OACTIVE does not literally mean that output is active, but rather that the device's internal output queue is full.) .It Fn if_done @@ -399,7 +409,7 @@ Initialize and bring up the hardware, e.g., reset the chip and the watchdog timer and enable the receiver unit. Should mark the interface running, but not active -.Dv ( IFF_RUNNING , ~IIF_OACTIVE ) . +.Dv ( IFF_DRV_RUNNING , ~IIF_DRV_OACTIVE ) . .It Fn if_resolvemulti Check the requested multicast group membership, .Fa addr , @@ -418,6 +428,12 @@ Flags of the former kind are marked .Aq S in this table; the latter are marked .Aq D . +Flags which begin with +.Dq IFF_DRV_ +are stored in +.Va if_drv_flags ; +all other flags are stored in +.Va if_flags . .Pp The macro .Dv IFF_CANTCHANGE @@ -447,7 +463,7 @@ The interface is a loopback device. The interface is point-to-point; .Dq broadcast address is actually the address of the other end. -.It Dv IFF_RUNNING +.It Dv IFF_DRV_RUNNING .Aq D* The interface has been configured and dynamic resources were successfully allocated. @@ -466,7 +482,7 @@ This interface is in the permanently pro .It Dv IFF_ALLMULTI .Aq D* This interface is in all-multicasts mode (used by multicast routers). -.It Dv IFF_OACTIVE +.It Dv IFF_DRV_OACTIVE .Aq D* The interface's hardware output queue (if any) is full; output packets are to be queued. From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 15:13:39 2010 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 1A08F106566B; Wed, 20 Jan 2010 15:13:39 +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 08B2B8FC0A; Wed, 20 Jan 2010 15:13:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KFDc27038720; Wed, 20 Jan 2010 15:13:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KFDcEg038718; Wed, 20 Jan 2010 15:13:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001201513.o0KFDcEg038718@svn.freebsd.org> From: John Baldwin Date: Wed, 20 Jan 2010 15:13:38 +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: r202702 - stable/8/contrib/gcc/config/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: Wed, 20 Jan 2010 15:13:39 -0000 Author: jhb Date: Wed Jan 20 15:13:38 2010 New Revision: 202702 URL: http://svn.freebsd.org/changeset/base/202702 Log: MFC 198344: Change gcc to assume a default machine architecture of 486 instead of 386 on "i386". Doing it in the compiler is deemed to be less fragile then attempting to provide a default -march setting via bsd.cpu.mk. FreeBSD itself has not supported plain 386 CPUs since 5.x. Modified: stable/8/contrib/gcc/config/i386/i386.c Directory Properties: stable/8/contrib/gcc/ (props changed) Modified: stable/8/contrib/gcc/config/i386/i386.c ============================================================================== --- stable/8/contrib/gcc/config/i386/i386.c Wed Jan 20 14:48:58 2010 (r202701) +++ stable/8/contrib/gcc/config/i386/i386.c Wed Jan 20 15:13:38 2010 (r202702) @@ -1614,7 +1614,7 @@ override_options (void) "-mtune=generic instead as appropriate."); if (!ix86_arch_string) - ix86_arch_string = TARGET_64BIT ? "x86-64" : "i386"; + ix86_arch_string = TARGET_64BIT ? "x86-64" : "i486"; if (!strcmp (ix86_arch_string, "generic")) error ("generic CPU can be used only for -mtune= switch"); if (!strncmp (ix86_arch_string, "generic", 7)) From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 15:14:20 2010 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 D2188106568B; Wed, 20 Jan 2010 15:14:20 +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 C0F688FC15; Wed, 20 Jan 2010 15:14:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KFEKso038902; Wed, 20 Jan 2010 15:14:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KFEKWP038900; Wed, 20 Jan 2010 15:14:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001201514.o0KFEKWP038900@svn.freebsd.org> From: John Baldwin Date: Wed, 20 Jan 2010 15:14:20 +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: r202703 - stable/7/contrib/gcc/config/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: Wed, 20 Jan 2010 15:14:20 -0000 Author: jhb Date: Wed Jan 20 15:14:20 2010 New Revision: 202703 URL: http://svn.freebsd.org/changeset/base/202703 Log: MFC 198344: Change gcc to assume a default machine architecture of 486 instead of 386 on "i386". Doing it in the compiler is deemed to be less fragile then attempting to provide a default -march setting via bsd.cpu.mk. FreeBSD itself has not supported plain 386 CPUs since 5.x. Modified: stable/7/contrib/gcc/config/i386/i386.c Directory Properties: stable/7/contrib/gcc/ (props changed) Modified: stable/7/contrib/gcc/config/i386/i386.c ============================================================================== --- stable/7/contrib/gcc/config/i386/i386.c Wed Jan 20 15:13:38 2010 (r202702) +++ stable/7/contrib/gcc/config/i386/i386.c Wed Jan 20 15:14:20 2010 (r202703) @@ -1614,7 +1614,7 @@ override_options (void) "-mtune=generic instead as appropriate."); if (!ix86_arch_string) - ix86_arch_string = TARGET_64BIT ? "x86-64" : "i386"; + ix86_arch_string = TARGET_64BIT ? "x86-64" : "i486"; if (!strcmp (ix86_arch_string, "generic")) error ("generic CPU can be used only for -mtune= switch"); if (!strncmp (ix86_arch_string, "generic", 7)) From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 15:22:35 2010 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 58989106568B; Wed, 20 Jan 2010 15:22:35 +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 42D918FC0A; Wed, 20 Jan 2010 15:22:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KFMZNl040774; Wed, 20 Jan 2010 15:22:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KFMZgf040769; Wed, 20 Jan 2010 15:22:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001201522.o0KFMZgf040769@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 20 Jan 2010 15:22: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: r202704 - in stable/8/sys: conf contrib/dev/iwn dev/iwn modules/iwnfw modules/iwnfw/iwn1000 modules/iwnfw/iwn4965 modules/iwnfw/iwn5000 modules/iwnfw/iwn5150 modules/iwnfw/iwn6000 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: Wed, 20 Jan 2010 15:22:35 -0000 Author: kib Date: Wed Jan 20 15:22:34 2010 New Revision: 202704 URL: http://svn.freebsd.org/changeset/base/202704 Log: MFC r198429, r198439, r198468, r201209, r201822, r201882: Syncronize iwn(4) driver in stable/8 with HEAD. Approved by: rpaulo Added: stable/8/sys/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu - copied unchanged from r201209, head/sys/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu stable/8/sys/contrib/dev/iwn/iwlwifi-4965-228.57.2.23.fw.uu - copied, changed from r198429, head/sys/contrib/dev/iwn/iwlwifi-4965-228.57.2.23.fw.uu stable/8/sys/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu - copied unchanged from r201209, head/sys/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu stable/8/sys/contrib/dev/iwn/iwlwifi-5000-5.4.A.11.fw.uu - copied, changed from r198429, head/sys/contrib/dev/iwn/iwlwifi-5000-5.4.A.11.fw.uu stable/8/sys/contrib/dev/iwn/iwlwifi-5000-8.24.2.12.fw.uu - copied unchanged from r201209, head/sys/contrib/dev/iwn/iwlwifi-5000-8.24.2.12.fw.uu stable/8/sys/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu - copied unchanged from r198429, head/sys/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu stable/8/sys/contrib/dev/iwn/iwlwifi-6000-9.176.4.1.fw.uu - copied unchanged from r201209, head/sys/contrib/dev/iwn/iwlwifi-6000-9.176.4.1.fw.uu stable/8/sys/modules/iwnfw/Makefile.inc - copied unchanged from r198439, head/sys/modules/iwnfw/Makefile.inc stable/8/sys/modules/iwnfw/iwn1000/ - copied from r201209, head/sys/modules/iwnfw/iwn1000/ stable/8/sys/modules/iwnfw/iwn4965/ - copied from r198439, head/sys/modules/iwnfw/iwn4965/ stable/8/sys/modules/iwnfw/iwn5000/ - copied from r198439, head/sys/modules/iwnfw/iwn5000/ stable/8/sys/modules/iwnfw/iwn5150/ - copied from r198439, head/sys/modules/iwnfw/iwn5150/ stable/8/sys/modules/iwnfw/iwn6000/ - copied from r201209, head/sys/modules/iwnfw/iwn6000/ Deleted: stable/8/sys/contrib/dev/iwn/iwlwifi-4965-4.44.17.fw.uu Modified: stable/8/sys/conf/files stable/8/sys/contrib/dev/iwn/LICENSE stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/iwn/if_iwnreg.h stable/8/sys/dev/iwn/if_iwnvar.h stable/8/sys/modules/iwnfw/Makefile stable/8/sys/modules/iwnfw/iwn4965/Makefile stable/8/sys/modules/iwnfw/iwn5000/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Wed Jan 20 15:14:20 2010 (r202703) +++ stable/8/sys/conf/files Wed Jan 20 15:22:34 2010 (r202704) @@ -1079,20 +1079,76 @@ iwi_monitor.fw optional iwimonitorfw | no-obj no-implicit-rule \ clean "iwi_monitor.fw" dev/iwn/if_iwn.c optional iwn -iwnfw.c optional iwnfw \ - compile-with "${AWK} -f $S/tools/fw_stub.awk iwn.fw:iwnfw:44417 -lintel_iwn -miwn -c${.TARGET}" \ +iwn1000fw.c optional iwn1000fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw -miwn1000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ - clean "iwnfw.c" -iwnfw.fwo optional iwnfw \ - dependency "iwn.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn.fw" \ + clean "iwn1000fw.c" +iwn1000fw.fwo optional iwn1000fw | iwnfw \ + dependency "iwn1000.fw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn1000.fw" \ no-implicit-rule \ - clean "iwnfw.fwo" -iwn.fw optional iwnfw \ + clean "iwn1000fw.fwo" +iwn1000.fw optional iwn1000fw | iwnfw \ dependency ".PHONY" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-4965-4.44.17.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu" \ no-obj no-implicit-rule \ - clean "iwn.fw" + clean "iwn1000.fw" +iwn4965fw.c optional iwn4965fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn4965.fw:iwn4965fw -miwn4965fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn4965fw.c" +iwn4965fw.fwo optional iwn4965fw | iwnfw \ + dependency "iwn4965.fw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn4965.fw" \ + no-implicit-rule \ + clean "iwn4965fw.fwo" +iwn4965.fw optional iwn4965fw | iwnfw \ + dependency ".PHONY" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ + no-obj no-implicit-rule \ + clean "iwn4965.fw" +iwn5000fw.c optional iwn5000fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5000.fw:iwn5000fw -miwn5000fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn5000fw.c" +iwn5000fw.fwo optional iwn5000fw | iwnfw \ + dependency "iwn5000.fw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn5000.fw" \ + no-implicit-rule \ + clean "iwn5000fw.fwo" +iwn5000.fw optional iwn5000fw | iwnfw \ + dependency ".PHONY" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-5000-8.24.2.12.fw.uu" \ + no-obj no-implicit-rule \ + clean "iwn5000.fw" +iwn5150fw.c optional iwn5150fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5150.fw:iwn5150fw -miwn5150fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn5150fw.c" +iwn5150fw.fwo optional iwn5150fw | iwnfw \ + dependency "iwn5150.fw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn5150.fw" \ + no-implicit-rule \ + clean "iwn5150fw.fwo" +iwn5150.fw optional iwn5150fw | iwnfw \ + dependency ".PHONY" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu" \ + no-obj no-implicit-rule \ + clean "iwn5150.fw" +iwn6000fw.c optional iwn6000fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000.fw:iwn6000fw -miwn6000fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn6000fw.c" +iwn6000fw.fwo optional iwn6000fw | iwnfw \ + dependency "iwn6000.fw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6000.fw" \ + no-implicit-rule \ + clean "iwn6000fw.fwo" +iwn6000.fw optional iwn6000fw | iwnfw \ + dependency ".PHONY" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.176.4.1.fw.uu" \ + no-obj no-implicit-rule \ + clean "iwn6000.fw" dev/ixgb/if_ixgb.c optional ixgb dev/ixgb/ixgb_ee.c optional ixgb dev/ixgb/ixgb_hw.c optional ixgb Modified: stable/8/sys/contrib/dev/iwn/LICENSE ============================================================================== --- stable/8/sys/contrib/dev/iwn/LICENSE Wed Jan 20 15:14:20 2010 (r202703) +++ stable/8/sys/contrib/dev/iwn/LICENSE Wed Jan 20 15:22:34 2010 (r202704) @@ -1,39 +1,39 @@ -Copyright (c) 2006, Intel Corporation. -All rights reserved. - -Redistribution. Redistribution and use in binary form, without -modification, are permitted provided that the following conditions are -met: - -* Redistributions must reproduce the above copyright notice and the - following disclaimer in the documentation and/or other materials - provided with the distribution. -* Neither the name of Intel Corporation nor the names of its suppliers - may be used to endorse or promote products derived from this software - without specific prior written permission. -* No reverse engineering, decompilation, or disassembly of this software - is permitted. - -Limited patent license. Intel Corporation grants a world-wide, -royalty-free, non-exclusive license under patents it now or hereafter -owns or controls to make, have made, use, import, offer to sell and -sell ("Utilize") this software, but solely to the extent that any -such patent is necessary to Utilize the software alone, or in -combination with an operating system licensed under an approved Open -Source license as listed by the Open Source Initiative at -http://opensource.org/licenses. The patent license shall not apply to -any other combinations which include this software. No hardware per -se is licensed hereunder. - -DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. +Copyright (c) 2006-2009, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. Copied: stable/8/sys/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu (from r201209, head/sys/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu Wed Jan 20 15:22:34 2010 (r202704, copy of r201209, head/sys/contrib/dev/iwn/iwlwifi-1000-128.50.3.1.fw.uu) @@ -0,0 +1,5920 @@ +Copyright (c) 2006-2009, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. +begin-base64 644 iwlwifi-1000-128.50.3.1.fw.uu +AQMygLA0AABE4wEAAMAAAHC5AQAAwAAAAAAAACAggA8AAEAAaSAAAGkgQABpIAAAaSBAACAggA8A +AOgAaSAAAGkgQABpIAAAaSBAACAggA8AAIgFaSAAAGkgQABpIAAASiAAAEohAABKIgAASiMAAEok +AABKJQAASiYAAEonAABKIAAQSiEAEEoiABBKIwAQSiQAEEolABBKJgAQSicAEEogACBKIQAgSiIA +IEojACBKJAAgSiUAIEomACBKJwAgSiAAMEohADAKJIA/gAAAwEEsnDBALJwwQiQcNAoigD+AAERZ +CiMANwYPAABKJgBwaSBAAEomAHBKJgBwSiYAcEomAHAAFgBwgAB0BEB4ICBAhwAAAAAAAAAAAAAK +yM9xoADIHw4ZGIALyA8ZGIAMyBAZGIANEgI2AMhEeBEZGIAOyC0ZGIDgfuHE/BzIvvwcSL7hwOHB +4cLhw/wcCLH8HEix/ByIsfwcyLH8HAiy/BxIsvwciLL8HMiy/BwIv2okgBDhxGokwBDhxPHAz3Cg +ANAbFIDPcYAAcAQEIICPz1EE4QChCvIvKQEAz3CAAGAJ8CBAAEB42v/RwMHEayTAEMHEaySAEMHE +n3QEFAs0BBQKNAQUCTQEFAg0BBQHNAQUBjQEFAU0BBQENMHDwcLBwcHAwcRFLH4QCiZAfsHEaySA +FMHEICBAhwrIh7gKGhgwC8ibuAsaGDAMyAwaGDANyIe4DRoYMA7IhSDDDw4aGDDgfuB48cAKyJW4 +ChoYMAvIm7gLGhgwDciKuI24kLgNGhgwz3CAAIgKGIiB4Av0DcjPcQAAbAqsuA0aGDCuDSAAD9jR +wOB+4HjPcIAARJsAgIYg/oEI9A3IBSCADwAAANQNGhgwRPHgePHAz3EDAEANz3CgAKggLaDPcoAA +sAQgggFpAKLeDCABSNjPcIAAxAglgCOBIIHHcQAAiBOGDMAH0fHgeM9wgADECBUEwAfgePHA4gtA +AYDgz3aAAHAEBvKB4Ab0AdgD8ADYC66A4QbygeEG9AHYA/AA2AqugOIG8oHiBvQB2APwANgMrgDY +z3WgAMgfGB0YkAuOgOCKIRAADvIIjoDgDPLPcAMAQA1FHRgQMKUC2BgdGJAD8DGlCo6A4BryCY6A +4Bbyz3ABAETjIB0YkM9wgAAoACEdGJDPcIAAbAQiHRiQGBUAlkUgAAMYHRiQDI6A4AfyGBUAloUg +AQQYHRiQgOMY8gDYlLjPdoAApAQApnHYBrg6D+AA/Nkghs9wAABMHCoP4ACfuRgVAJaFuBgdGJBl +A0ABz3Gqqru7z3CfALj/NqA2oDagNqDPcaAAyDsOgYi4DqFpIEAA/vHgePHApcFBwELBDBwAMRAc +QDHPcYAAfFo0GcAPMBkADywZwA4oGYAOJBlADs9wgAB8WiAYQAvPcIAAfFocGAALz3CAAHxaGBjA +Cs9wgAB8WhQYgArPcIAAfFoQGMAIz3CAAHxaDBiACM9wgAB8WggYQAjPcYAAAFqAGQAIfBnAB3gZ +gAd0GUAHcBkAB2wZAAdoGYAGZBlABmAZAAZcGcAFWBmABVQZQAVQGQAFTBnABEgZgAREGUAEQBkA +BO+hzqGtoYyhLBnAAigZgAIkGUACIBkAAhwZwAEYGYABFBlAARAZAAFjoWogAAPYGQAAaiDAAtQZ +AABqIIAC0BkAAGogQAHIGQAAaiAAAcQZAABqIMAAwBkAAGoggAC8GQAAaiBAALgZAABqIAAAtBkA +AGoggAHMGQAA0NifuM9xnwC4/x2hz3CAAAAAxIBTJcQ1UybFNde6AebTvsSgUyPABAUmjh/Q/gAA +1qEFIIAPsP4AABahGIFTJ841AN2UuBihQMMBwALByXMMFAYwSgpgARAUBzDPcKAAtA+8oE4LQAGG +DeAAqXAI2ADZSg3gAJm5FvHgePHA8ghgAXvYyglgAdfZz3GAAHxaNBnADzAZAA8sGcAOKBmADiQZ +QA7PcIAAfFogGEALz3CAAHxaHBgAC89wgAB8WhgYwArPcIAAfFoUGIAKz3CAAHxaEBjACM9wgAB8 +WgwYgAjPcIAAfFoIGEAIz3GAAABagBkACHwZwAd4GYAHdBlAB3AZAAdsGQAHaBmABmQZQAZgGQAG +XBnABVgZgAVUGUAFUBkABUwZwARIGYAERBlABEAZAATvoc6hraGMoSwZwAIoGYACJBlAAiAZAAIc +GcABGBmAARQZQAEQGQABY6FqIAAD2BkAAGogwALUGQAAaiCAAtAZAABqIEAByBkAAGogAAHEGQAA +aiDAAMAZAABqIIAAvBkAAGogQAC4GQAAaiAAALQZAABqIIABzBkAAOt2z3WgAMgfGRURls9wAABE +HN4IIAEKIMAvWnDPcIAAZBYjgM9znwC4/893gAAAAASHgOEB4NO4JPIZFQKWUSLAgB7yXYNA3p++ +3aMEpwUggA/Q/gAAFqNYG4AHIRUAliIVAJYEIYEP/wD8/wCBFqMI2BkdGJBWo12jhQcAAdDZn7k9 +owSnBSCAD9D+AAAWo89wgACkBACACyCAhAjyWBuABCIJwAEM2CnwjCEBoCLyQiFBII/hQAANADMm +QXCAAABAQCcAcjR4AHhKIUAgDdgV8EohgCAE2BHwE9hKIQAhDfBKIQAiFNgJ8EohACQV2AXwFtgD +8A/Yz3OAACgPcIMKcclyCiRABBkE7/8KJYAE4HixAs//8cDGDwABfgsAANYMAAKE/p4IAAAKIcAP +63IG2IojygJKJAAA5QPv/wolAAGA4fHAA/Kg4Iv2CiHAD+tyBdjs20okQADFA+//uHPPcoAAYAkV +eiCi0cDgfgDZnrkZec9ygABYCQGCJXjgfwGiANmeuRl5z3KAAFgJAYImeOB/AaIA2Z65GXnPcIAA +WAkBgCR4QiAAgOB/yiBiAOB4z3CAAFgJAYDgfy8oAQDgePHAhgjP/+B44HjgeOB4aSCAAW8hPwBp +IAAA9/HxwADYjbjKCeACCBoYMBDMhiD/igjyz3CAAAUFAIiA4GQOwgK08eB48cCKDsACz3GAACgL +8CEAAEB4z3CgANAbgNpQoM9wgAAAAACAUSAAggDZBvLPcJ8AuP89oJjx4HjxwKYNAAHPcYAAAAAA +gVEgwIAb8gGBUSDAgEDYzyDiB8oggQ8AANAAzyDhB89ynwC4/x2iBIEB4NO4BKEFIIAP0P4AABai +z3CAAHAEAIAA3892gACICgQgkA8PAADgCIbruAHdBfQ6CoAJgOAM9M9xoAC0R0sZ2IN3GViDANie +uFQZGIAvKAEETiBBBFUWgBCA4BkaWDAP8s9woAAUBCqgCYC44Ef3z3CgAIggNXigoDfwz3CAAAwF +4KAA2JG4z3GgAMgfExkYgM9wgADoAhB4z3agALRHSR4YkM9xgADcd89wgAAQBSCgbydDEFQe2JN+ +COACCBpYM6YJgAmA4BH0ANiRuM9xoADIHxMZGIDPcIAAGAQQeEkeGJBUHtiT7QQAAeB48cDhxc9x +gADcCIARAADPdaAAyB8vKgEAz3ADAEANRR0YEPAhgABAeIDYFR0YkNEEAAHgePHACiHAD+tyBdiK +I4QBSiQAAHkB7/8KJQAB4HjxwM9wgABwBACABCCADw8AAOAvKAEAmgtgDU4gQAQKJQCAyiHCD8oi +wgfKIGIByiOCDwAAzgE4AeL/yiRiAH/YCrjPcaAA0BsToX/YEKFtBc//4HjxwOHFz3WAAAAAAIXv +uBryAYXvuEDYzyDiB8oggQ8AANAAzyDhB89xnwC4/x2hBIUB4NO4BKUFIIAP0P4AABahGgtgDQTY +CiUAgMohwg/KIsIHyiBiAcojgg8AAN0BvADi/8okYgAAhe+4B/IA2c9wnwC4/z2g5QMAAeB48cDe +DwANgNnPcKAA0BswoNkEz/9KJEB1ANmoIMADz3CAAOAJNnhhgECAz3CAANwIAeFVeGCg4H7gfuB4 +USFAx/HAHfLPcIAAvAUAgIPgyiHCD8oiwgfKIGIByiOCDwAABwLKJMIAOADi/8olIgCWCUAIC8i9 +uAsaGDAA2Z25z3CgANAbMaBlBM//4HjxwIHgzCCigAX0z3KAAIgKBPDPcoAA7J3PcYAA3FqB4Mwg +4oAp9GiCYKFpgmGhfIpoqX2KaakqEoMAaqkrEoMAa6ksEoMAbKl0knapbZJnsXeSaLFogsC7dKlo +ggQjgw8ABgAAgOMB28B7cqmEEgIAVBmYABzwYIFoomGBaaJoiXyqaYl9qmqJKhrCAGuJKxrCAGyJ +LBrCAHaJdLJnkW2yaJF3slQRAwaEGsAAguAG9HoO4ABAIQAG0cDgfs9wgADsnSCAz3KgAIAlJqIi +kCeiIoAqoiaQK6LPcYAARJsggVEhQIAggAn0KKIikCmiIoAxoiaQMqIggDWiIpA2oo0HgA3gePHA +1gkAAc9wgAC4ggDdtKjPcIAARJsAgFEgQIAT8gjfqXaA5swmopDMJiKRzCZikVwIYgPKIIIDYb+A +5wHmM/cc8EokgH3PcYAACG6oIEABBBlQA+B4ANlKJAByz3KAAAhcqCAAAxYiQAB2kM9wgAB4bjR4 +AeFgsM92gADsnc93gAB8fEAmABIkb4YI4AAG2slwQCeBEnoI4AAG2kAmABJAJwEUagjgAAbaGI6E +4An0KBaAEB4IoA4ohuYLQA0JhlEgQIFED8IHz3CAAESbAIBRIECAyA9BA89xAAD//89wgAAYeSyg +K6AEGlgzs/9RAQAB4HjxwOIIIAEA2oQoCwoAIYN/gABYoFmjz3aAABBAtGi6ZlKCAoYAIYF/gADo +n893gAAsXF6jYYbYGcAAZYbcGQAABobgGcAA5BkAABYngBAWJoEQCOAE4R4PoAQI2t1lFIUWfhZ/ +QCcAEiRuCg+gBAja2QAAAfHAANji/6II4AQA2M9wgAA0Bd4N4AQE2cIJAAVGCwAEAdgA2XIIoAyA +2qIIQAm+CUANHg7ABx4OgAiyDwAIANjeD6ANCHECCcANEgqACkIOgAj9Bc//4HjxwOHFAN3PcIAA +SAWgoM9wgACcgqywMgkgCKlw1guP/1INIAqpcB4MQAWmC0ADfgxgCqlwVgxAClUAAAHxwN4PwACC +4KPBBvTPdYAAiAoI8IQoCwoAIY1/gADsnYLgBvTPdoAAdIgJ8M9xgACwoIQoCwoAIU4OLZU8eihw +hiHxD0e5wrqGIP4DJHpEuFBxyiHCD8oiwgfKIGIByiOCDwAAHQTKJCIAqASi/8olAgFIhTu6UyIC +gECuTZXAukGuDPJ3lYYj/wlDu2eud5WGI/4HRbtoroDiEvLPcoAAGCQVIgMAAIs1egKuAYsDrgKL +BK4DiwWuA4oL8AHZKa4C2AKuI64A2ASuA9gFrgaui3DJcZYNoAQM2gDAAcGGDKAKAsKLcMlxgg2g +BAzaAMABwfIMoAoCws9xgACwBgChDZVEuOC4ANkvpQXyiiEIAC+l4bgD8ou5L6VRIICABPKNuS+l +JQfgAKPA4HjxwK4O4ACYcIQoCwoAIYB/gADsnSiAViAGBVEhwIBWIMUFCPKKIggAz3GAAPQEQKFK +JAByANmoIMAPz3WAABBB/IguZeR+LyqBA04igwfPcoAANEFvYgAmQwDgq1QQjwDkfi8ugRNOJo8X +7mLIq8iAUSbAkA7yXYiG4dMipgAvKoEATiKNB89ygAA8QapiEfDPdoAAJEEuZs5lvIjEfWwQjgDE +fS8tQRNOJY4XymJQqwHhSiQAcgDaqCBBANyIz3WAABxBT2XPc4AANEHkfi8pgQNOIY8H72MAJoEA +/KlUEI8A5H4vLoETTiaPF+5jJBmCA8iAUSbAkA7yfYiA4tMjoQAvK8EATiONB89zgAA8QatjEvCA +4gTyyWoD8Eh2zmW8iMR9bBCOAMR9Ly1BE04ljhfLYywZwgAB4kokAHEA2qggAAXPcYAAGEF9iElh +ACWMAAHiZHkvKUEATiGDB89xgAA8QWlhIKySCSAHiHCpBcAA4HjxwDoNwACC4AX0z3GAAIgKB/CE +KAsKACGBf4AA7J2pgViJQS3DEMC7F7vHcwAAgBzkvc8jIgbgvU7ezyOiAMomgh8AAE4BhuLPJmES +5b0s9M9ygADcWhYShQDPcoAA+KBCkrByz3eAAOydwxcEFgz0whcCFlMiBQDPcoAA3FpUirByC/JB +LEIBUSIAgAXySYdRIkCBCfRRJECBBvRJh1EiQIED8oG7z3KAAOCgTIqH4s8j4QBRJQCSzyOiBYLg +iBnAAIwZgAMG9M9wgACICgjwhCgLCgAhgH+AAOydaRCCAE4QDQEOIoEPAAA6AQm5Qn0lfTqQQnkS +uSV9O5BCeRe5JX0EJb6fAPAAAMohwg/KIsIHyiBiAcojgg8AAG8AzyPiAsokwgBMAaL/yiVCA3UE +4ACQGEAD4HjxwAIMwACC4Ah1BvTPdoAAiAoI8IQtCxoAIY5/gADsnQHZaB5CEADfgB7AE0zYTh4E +EAXYEKYK2Bu2ENgathTYTB4EEC3YUB4EECbYUh4EEEokAHLpcqgggA3PcIAAYEH0IIMAz3CAACx6 +VHhgsM9wgABwQfQggwDPcIAAPHpUeGCwz3CAAIBB9CCDAM9wgABMelR4YLDPcIAAkEH0IIMAz3CA +AFx6VHhgsM9wgACgQfQggwDPcIAAbHpUeAHiYLAIhuW4BfIE2mIeghAD8GIewhPkuAryCdlqHkQQ +LtpdtgLaaR6CEArwFNpqHoQQMtpdtmkeQhAU2VmOUSAAgFlhMHlqHkQQGuE8tgryCthkHgQQBthm +HgQQB9gI8BDYZB4EEGYexBMF2BCmqXC//lyOVB6CEGweghDmusoggQDKIYEACvJQIsMBb3gIcVQe +whBsHsIQ5boI8ihzhiMDAG95VB7CEOS6BfKluGweAhBRIsCABfKkuVQeQhCC5RfyqXD1/s9wgAC8 +oIQtCxowIEAOUSBAgPHYwCgiAcoggQ8AAJMAwCghAZweABAY2I24F6YIhs9xgADsneO4BvK6EYEA +ibkE8KERgQA2ps9xoACsLzmBMLlTIQGAz3KAAIAEVR5CEBPyz3EAAMQJIrJKJAByANmoIIACgNvP +coAA1Hs0emCyAeEU8IDZIrKT2QS5z3KAANR7ILIhsiKyiiMXB2OyJLJlsmayiiEEACeyBCC+jwAG +AAAL8ja4wLgbeAHgbh4EEALYgB4AEAPwbh7EEwDYHKYdpqlwHf8ohgHaQSkABTW5UiAAAFIhAQDA +uMC5ug1v/0hz9QHAAM9wgACICgiAz3GkABxAwLgTeMG4EqHgfvHA4cXPcYAAiAp3kc9ygAC0BuC7 +V9gAogPyX9gAouK7A/KFuACiUSNAgATyh7gAos9ygAB0iKCKANqA5coggQDPc6UA6A8Go89zoACk +MAGDgOXPIOIA0CDhAAGjz3CgAOwnS6BQgc9woADIHEig2gzgCg+BdQHAAPHA+gjgAAfaz3agAMgf +SB6YkM91gACICoAVABDPcasAoP9MHhiQANgZoVqhGKGKIAQAD6ZqFQARz3eAAKQysB4AELQeABAf +2Ai4DqYIhVEgAIAA2Iu4I/IQpiCP4Llk2MogIQBRIUCABqcJ8gzYfh4YkAGHA6cChwXwANh+HhiQ +A6cEpwmFUSBAgSwJgg3PcaAApDABgYS4EfARpgDYfh4YkAoIoA0IcQDYA6cEpwanz3GgAKQwAYGk +uAGhAd+t/3YLgAqx/89wAABVVVoeGJBZHtiTbhUBEc9wpgDoByagBguAAhYLYAoNlc9wgADwYweI +gODsCQICiBUAEM9xoADEJw8ZGICMFQIQz3CgADAQRKDPcIAAMHMQeI8ZGIDPcIAA3HMQepYgAgAQ +uEV4kBkYgIogBACSGRiAkBUAEEAZAIDPcIAAyBhTGRiADxEAhp+4DxkYgA/YEBkAgFUVgBCA4Mog +gg8AALwPyiCBDwAAvB8cGRiACIX9uA3yMg1gDQDYOg1gDQHYz3CmAPTP8qAD8CINQA3NB4AA4Hjx +wFoPgAAKJgCQz3CAAOydGnEF9MMQAQYC8CmAJblRIQCAJ/LPcoAA3FrPcYAA+KAikXaKMHMI9MIQ +AQZUisC5UHEL8sMQAQZRIUCBBfIpgFEhQIEN9AohwA/rcgXYgtuLu0okAAAxBG//CiUAAYQuCxov +d891gACICvhgqXHODWAAKNrPcYAAdIgAJ4AfgACwoAYOYAAM2s9woAC0DwDf/KBIhVMiAAAmDuAJ +NJVu/4Dm8A2hCsogYQADyFEggIAE8noLAAMM8ADZnrnPcKAA/EQhoM9woAC0D/ygTCAAoNAOYg3K +IGIA1QaAAPHAag6AAAomAJAB2BHyA8hRIICADPQKIcAP63IF2IojhwtKJAAAhQNv/7hzANiELgsa +z3WAAOydACVPHoQoCwpAJQEZMCFADkmHJbglulMgEQBTIhAA6XBaDGAADdlGDiAOyXDph4DmJb/A +vwX0A9jK/Av9A/DWDEANgOca8kwgAKDKIcIPyiLCB8ojgg8AABACyiBiAcf1jgvABvYPoAAB2Ewh +AKCkC+EHyiAhABfw4g+gAADYgOYD9FP9C/CKDEANz3CAAESbAIBRIECAiAxCDUwhAKCIDYH/yXBl +/t4NIAHJcEwhAKAE2AMaGDA09M9xgADcWs9wgAD4oAKQVokQcgj0whUAFjSJwLgwcBLywxUAFlEg +QIEM8gmFUSBAgQjyz3CAAESbAIBRIECAFPTJcOlxeP9/2RG5z3CgALAfNKBqDoAGDcgFIIAPAQAA +/A0aGDDPcIAARJsAgFEgQIAg8s9xgADcWs9wgAD4oAKQVokQcgf0whUAFjSJwLgwcAnywxUAFlEg +QIEJhdEgYoEI9BiNz3GAAIgKGKkJhQmhAd0uCuAJqXDPcIAAlQbWCOAJoKiB5gv0z3CAAOCgDIiH +4AX0gOf0C0INxgtADdIKwAamCkAAYg2gAQDY7QSAAPHAANiH/wYIT/+uCsANZQKP/+B48cB6DIAA +geDPdoAA7J0IdQP06YYD8MMWDxYlv4QtCxoAJlAeJBAAIMC/USBAgcohwQ/KIsEHyiBhAcojgQ8A +AJECyiQhAHABYf/KJQEBz3CAANwKgOUBiMxxM/RAgc9xgADcWkChABYDQIDgYaEAFoNAaKkAFoNA +aakAFgBBA/IPtgAWgEAEIoIPAAYAAAqpABaAQIDiC6kAFoBAAdoMqQAWgEAAFgBBwHoHsQAWAEEI +sQAWAEBSqQTYO/w48CCBz3KAAOShwh5YEAAWAUCA4MMeWBAAFoFADBpCgAAWgUANGkKAzHAI8iCQ +z3CAALygO7AD8ACQABaAQM9xgADooRoaAoAAFoBAGxoCgAAWgEAcGgKAABaAQAAWAEEGGQSAABYA +QRoZBIAAFgBAr3jU/ZYLIAGpcM9xgADcWlaJgOfPcIAA+KACkB/0EHIH9MIWABY0icC4MHAR8sMW +ABZRIECBDfIJhlEgQIEJ8s9wgABEmwCAUSBAgAf0JBABIKlwJbnAuef+FgpADfoIQABRA4AA4Hjx +wADYmv8KCcANwQCP/+B48cAA2c9woAC0Dzygz3CgAOwnK6DPcIAAnIghoCKgkg6gCihwz3GAAPBj +IJH/2ILhyiCiD//az3GrAKD/WaEYoQLYnghgAAMaGDBxAI//4HiEKAsKACGAf4AA6J/cEAIAz3GA +ANhc2BADAGAZgIDgEAIA5BAAAFwZwIBsGYCA4H9wGQCA8cBOCqAAEtmpwQh2agpgAItwSiQAcQDa +qCCAAhYkgDAoiIHhw/ZhuSioAeIBwgLBhC4LGgAhgH+AAOif2BiAAAXC3BhAAAbBtG7gGIAAx3WA +ABBASBUREOQYQADPcIAALFwKIEAuFiBABAjgg8F6CGAECNr0hc9wgAAsXIfB9ngI4GYIYAQI2gDA +ACCNL4AA7J1RIACAtB0YEAXyuR3YEwPwuR1YFM9wgADInVSINohEKj4LACGAf4AAJJw1eAaIEHYM +D+H/yiCBA7QVABZRIECA8djAKCIByiCBDwAAkwDAKCEBdg8gAJwdABDBAaAAqcDgeADYhvHxwKXB +i3CaDyAABdkAwuC6E/LPcIAAiAoYiIHgDfQA2Jq4z3GgAMgfD6EBwKQZAADD2Bq4DqFRIoCAFvIF +EgI2ANlKJABy4HioIIADuHGDcSiJESJAgAAiQDFcGEIACfJAJUEA/g4AAKXA0cDgfgohwA/rcgXY +iiOOCx0GL/9KJEAA4HjxwM9wgACICgmAUSBAgcohwg/KIsIHyiBiAcojgg8AAKEGyiRiAOwFIv/K +JcIAmgoACtoJoAcB2M9wgADgoAyIh+Aj9M9wgADUoAmAUSBAgRvyz3CAAHCcCpDPcYAA6IIlgQq4 +MHDKIcIPyiLCB8ogYgHKI4IPAACrBsokIgCUBSL/yiXCADIMD/+uDaAJANiWCoAJSg4AACEGT//x +wALYDv3Q/RUGT//xwDIIgAAA3s91oAC0D9ylkg+gCWh3+P9eD2AK6XADyFEggIAE8uoMwAIJ8ADZ +nrnPcKAA/EQhoNylYQCAAOB4hCgLCs9xgADQoDAhQg7PcIAACFxWeHaQz3GAANxaxBncABeQz3OA +ANhcxRkcAM9wgAAsXFZ4DIiQGwKAANjgf8cZHADxwEIPT/9+DgANkg9P/4EFT//gePHAng9gAETa +z3WAABBAxG3PcYAAMFy+DiAAqXBKJIBwANmoIAAIFGnYYHGAhCkLCgAhgn+AAFigACGAf4AA6J9+ +ogDbeaJhhUKFAeHYGMAAZYXcGIAARoXgGMAA5BiAAKkHQADPcIAA3FpVAiAAiiEFBeB48cAiD2AA +ANqhwUDCABaOQAAWjUAAFoNAABaQQIDlHfKpd89xgACAiCOJhif8F0W/w73meeC5yiJCA2DC4bnK +IkIDyiIhAAEcgjBRIYCAyiUhEAIcQjOA4CT0z3CAANxatoj0iLFzzCbBkxHyCiHAD+tyQCsEBBC+ +BdiKI9sOBSREA90DL/8FJsUTAMVAIA4Gz3eAAOydVBhYA4QfQBMh8M9wgAD4oAKQEHMK9M93gADs +ncIXABbAuBB2DfIKIcAP63IF2IojHAGYc5UDL/9KJQAAAMXPdoAAkJzbH1gTQCBBIEkhAQY0eX4M +IADJcEIgwCVIIAAAgOAA28v3ANoAFgFAAeKD4r33AeMQc7j3ViYAGVYMIAAG2c9wgABEmwCAUSBA +gBryz3GAANxaz3CAAPigApBWiRByB/TCFwAWNInAuBBxCvLDFwAWUSBAgQbyCYdRIECBCfQeCmAA +yXDPcIAABAuioMYLAAAdBmAAocAA2Ejx8cChwYtw7gsgAAHZABQFMEwlAIDKIcEPyiLBB8ogYQHK +I4EPAABJB8ACIf/KJGEAz3CAAICIggsgAAMYQgGhwNHA4H7xwM9xgAAoDxCh4HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB40cDgfuB44cXhxkApDQIlfUAtAxSI +4qV7CHWQ91MlfpAG8gEdUhBhuvvxQSqOAMG6QiZOkAQd0BD99YDiCvIvJIlw4HioIIABAR1SEOB4 +wcbgf8HF4HgocgDZ1vHgePHA4cUIdc9wgADcCgGIgOAU8gjwnggP/1IP7/+KINICz3CgANQLGIAA +2UIgAAiA4MogTAAQdTD3FQVAAPHA4cWhwQh1z3CgAKwvGYAEIIAPcAAAANdwIAAAAAHYwHgvJgfw +ANrKIIEAH/IPzAAcRDBPIMEDAeAQeI+4AhxEMA8aHDBAJQAS3/8H5QQljR8AAPz/BSWNH4CuAADs +cKCgAMHscCCgAdipBGAAocAiuQbw7HJgogTgYbmB4WCAOvcA2c9woADUC22gz3CgAEQdNaDgfuB4 +8cAGDEAACHYodShwSHHX/4HgyiCBA8QP4f/KIUEDVQRAAOB4z3PQuv7Kz3KfALj/fqIaojuiz3Cg +ADguBYAEIIAPwAAAANdwwAAAAPXzadgYuBmi4H7gePHAqgtAAAh3z3GAALwECIkA3YDgqcFAxTv0 +Ad7Iqc9xgAAAZs9woADMKy2gANiPuA8aHDAdGkIzUg9gCotwz3ABADKAQcCKIEwAQsBDxc9wgACw +TgCIZMYC3hEcAjAAwBIcgjMg2UfFExwCMM9wgABUEEXAz3CAAMAPRsBIx4HAAdrK/wjYAdnR/wMa +mDOFA2AAqcAD2s9xoAAUBEWhz3GgANQLDaHgfvHABgtgAADbA93PcqAA1AuxonCiz3aArhgA7HLA +ogLaHBqCMAcSDjbscsCiDxICNwHiDxqcMOxyAKIBEgI27HBAoOxwIKAB2M92oADIHxOmOIbscCCg +GYbl/89woAAUBHQe2JCmoM9xoADIOw6BiLgOoQEDQADgePHAANgEEoEw4P8EEoUwCiHAD+tyB9iK +I5EBqQfv/kokAADgeADaA/AB4kEogQAwcrz34H7PcYAAKA9AGcAHz3GgAMgfXIGduJ64TRkYgOB4 +4HjgeOB44HjgeOB44HgcgeB+4HgD2s9xoAAUBEWhz3GgAPwLDKngfgPaz3GgABQERaHPcaAACAwA +seB+A8zXcAAAAEDKIYsPgK4EAMohig8ArgQA7HAgoM9woAAUBAPZJaAByM9xoADUCwDaDaHPcKAA +RB1VoOB+gOFU8kAhwgPDuY/hnAAtACS6MyZBcIAAeEBAJ4NyNHsAewAWAUAEGFAAABYBQAQYUAAA +FgFABBhQAAAWAUAEGFAAABYBQAQYUAAAFgFABBhQAAAWAUAEGFAAABYBQAQYUAAAFgFABBhQAAAW +AUAEGFAAABYBQAQYUAAAFgFABBhQAAAWAUAEGFAAABYBQAQYUAAAFgFABBhQAAAWAUBCIkKABBhQ +AL/14H7geIDi4cUi8mNqwbqD4jwALQAiuzMmgnCAAIhAQCeNclR9AH0EEAIEBBmQAAQQAgQEGZAA +BBACBAQZkABCI0OABBACBAQZkADv9eB/wcWA4uHFU/JAIsMDw7qP4p4ALQAkuzMmgnCAAIxAQCcN +clR9AH0BEIIEARmSAAEQggQBGZIAARCCBAEZkgABEIIEARmSAAEQggQBGZIAARCCBAEZkgABEIIE +ARmSAAEQggQBGZIAARCCBAEZkgABEIIEARmSAAEQggQBGZIAARCCBAEZkgABEIIEARmSAAEQggQB +GZIAARCCBAEZkgBCI0OAARCCBAEZkgC+9arx8cAiCEAAKHZGIc0AHWUiuZP/wb6B5g7yguYI8oPm +DfQAFoBAAR0SEAAWgEABHRIQABaAQACtWQBAAOB4gOHKJE1w4HjoIK0BABYBQQIYVADgfuB48cDO +DyAAUyFCAE4iDQEgEgI2z3agABQEyYYA28J6UHHKIcYPyiLGB8ogZgHKI4YPAAAZAsokZgDIBOb+ +yiXGAIDhyiRNcMoizQDoIG0CTmDPcaAAOAQB4sipgeUN8oLlB/KD5Q30z3CgADgEaKjPcKAAOARo +qM9woAA4BGiovQcAAOB4z3OfALj/GqM+o8K6BSKCDwBsAABZo+B+z3KgADguRYIEIoIPwAAAANdy +wAAAAADbC/LPcp8AuP8aojuiadgYuBmiAdgC8Ghw4H7geM9y0Lr+ys9xnwC4/16hGqHPcKAAOC4F +gAQggA/AAAAA13DAAAAA9vNq2Bi4GaEcgeB+4HjxwMYOAADPcIAA8GMAkIbgAN4a9AXYCbgaGhgw +GxoYMBwaGDAdGhgwCdgIuB4aGDAfGhgwiiAQACAaGDCKIAgAIRoYMADdCNjPdwAABB2YcBUiQDMa +EAEGANjPcqAAFASqosiiJ6IEoj5miOFoucohDgDpcJ3+QiRAAIDgIOcB5Sf3rQYAAOB4QSmBgAry +LyRJcOB4qCCAAQQQAgTscUCh4H7gePHAJg4AAAh1KHZAIQACUP4HbgQggA8AAPz/BSCAD4CuAADs +cQChAcjscQChIr4G8OxxAKEE5WG+geYAhTr3tP5RBgAAB9nPcqAA1AcaGliAgOAO8hkSAYYJIEMA +DxIBhgIgwIB5YQ8aWID29eB+4HihwfHAz3OADggA7HJgouxyAKIocKL+0cDgf6HA8cB+CUAKoglA +ClsAz//gePHA4cXPcIAA8GMmiIDhRPIniIDhQPKgkEptiOIJ9zMmgnCAAJxAQCeBclR5AHkA2SXw +JJCA4Qf0JZCB4cwhooAD8gDZAvAB2QLdGfAkkAXdgeEB2cB5E/AkkATdg+EB2cB5DfAkkAbdguEB +2cB5B/AkkArdhOEB2cB5geEM8ggQBQEKIcAP63IQ2IojDg8xAu/+mHVpBQAAocHxwOoMAADPcoAA +aQhAioDiRMCR8oDhDPQKIcAP63IF2IojDwNKJEAA/QHv/rhzYIGA4wTyQYGA4gn0z3KAANRbcIJg +oVGCQaEkxoDmyiHBD8oiwQfKI4EPAADWA8ogYQHj84DiyiHBD8oiwQfKI4EPAADXA8ogYQHX8+m4 +F/IEIIAPAQAAwC64z3KAAAhBCGJJIIAAYbgCuBR4x3CAAHR7aqAhgSugR/DouBvyoObKJYITyiUh +EAQggg8BAADAz3eAALhAzmcEIIAPBgAAADG4LroeZs9wgAAIQUhgwngS8FMgwgBdes91gAD0Q01l +BCCADwEAAMAuuM9ygAAIQQhiYbgWfRJtFHjHcIAAfHpgoCGBmOUhoIoh/w8ioI33CiHAD+tyBdiK +I88OiiSDD/UA7/64dQjcHwQAAOHF4cbPcYAAaQggiYDhJvIA20okAHbPcoAAfHqoIIADMms0eSVg +PmKgpj1goYUZYaGmIoEB4yKmSBABBkgaWABJEAEGSRpYAEsQAQZLGlgATBAABkwaGAB1Bo//8cBa +CyAAuHECuc9ygAAoXTR5MCJEAFEkQIOiwQXyz3KAAHShBPDPcoAAjJ5AIgMGQCIBB1EkQILKIcIP +yiLCB8ojgg8AACgERADi/sogYgHPdoAA8F9ALY0BpmbovkDGIMUF8sK9qmEO8FEmQJII8kQlARxE +uSpjiboG8FMlwRA8eSpiz3GAAPBeFiFBASKJDrlFeSCgMQMgAKLA8cCyCgAAOnAacUh3aHAmCWAG +CtmhaCpw6v7keAQnARQwcBTyINvPdqAAyB9wpgrYQx4YEADYjbgL/nGmYb2MJf+fK/YA2APwAdjJ +AgAA4HjxwGYKAAAacADdNNjZ/lAgQQQ02J79NNjW/k8gAQWVuTTYm/2pdwTwqXcIdQPYCrgQdV4A +BgAybQQhgQ8AAPz/LNiT/SzYAdnPcwAAiBMoctj/gOAd8izYxv5BKA4ENNjE/vW4FfT0uAfyNNjB +/k8gAQU02Ib9gOYN8qlwgCAQANdwAAAADMIgYQAQds7zANgG8IDl/fMAGMQjAdgtAgAA8cDGCQAA +CHfPcIAAvAQBgCh1geChwRpyUvSA4wzyi3DQ/4DgANhh8gAUADEB4B9n8H8G8Md3AAAADPB/MNil +/ghxhiEGADDYaf002KH+UCBBBDTYZv002J7+TyABBZW5NNhj/el2DfD0uAjyNNiZ/k8gAQU02F79 +Ah0UEQHmACcAFBB2YAAGADJuBCGBDwAA/P8s2Fb9LNgB2c9zAACIEyhynP+A4AryLNiK/kEoBAQ0 +2Ij+9bja8wDYF/CA4w/0licCEPB/C/DPcKAAYB3ysBSQAefwfwIdFBBCIFAgjCD/r/T1AdhFASAA +ocDxwKHBAdsw2Hf+wriE4Az3MyYAcIAAqEBAJwFyFHkAeWhwA/AA2IDgDfQKIcAP63IF2IojFwBK +JAAA3QWv/golAAHPc4AAvAQ02Gf+8LgB2MogIQABo4txiiDEAwHaSHOt/4DgyiHBD8oiwQfKI4EP +AACfBQXY4fMgwAAcBDCE4Mohyw/KIssHyiOLDwAAowWmB+v/yiBrAYbgAdnCIUoAz3CAAM4GIKih +wNHA4H7gePwciLb8HEi2/BwItvwcyLX8HIi1/BxItfwcCLX8HMi0/ByItPwcSLT8HAi0/BzIs/wc +iLP8HEiz4H7geATcON018OB4BNw03TPw4HgE3DDdMfDgeATcLN0v8OB4BNwo3S3w4HgE3CTdK/Dg +eATcIN0p8OB4BNwc3Sfw4HgE3BjdJfDgeATcFN0j8OB4BNwQ3SHw4HgE3AzdH/DgeATcCN0c8OB4 +BNwE3RnwNBQaMDAUGTAsFBgwKBQXMCQUFjAgFBUwHBQUMBgUEzAUFBIwEBQRMAwUEDACxwHGsCRN +M7AkHzPgfvHASg/P/89zgABUEEODAN/PdaAALCCwhdJq1H5+ZqWmBKYB4owiAoAmpkOjhfcCg+Oj +AeACo30Hz//geADYz3GgAMgfGKEZoQHYDqHgfuB48cD6Du//OXEZcshx6HIB3c92oADIH7OmBd/P +dYAAwA/gpQGlBMBIpQmlFYYnpQqlGIYYHUARC6UZhhQdABEMpaAWABBkpQ2lpBYAEAwdABIOpagW +ABAIHUASD6XPcAEAMoAQpZ4Pr/8k2AQggA8AAAD4EaWOD6//ANgSpVMnwHUTpQHIVB0AFxalEhYA +llAdABcXpRMWAJbPcoAAwA8YpRQWAJZKJEB5GaUVFgCWANkapSQWAJYbpRYWAJYcpc9wgAAoDxCA +HaXPcIAAwA94GIAKz3CAAMAPfBjACs9wgAA8EAQYAAuEGkALz3CgAMgcCICIGgAAqCCAAvAiQwDP +cJ8AuP8B4XagWQbP/+B+4HjgfuB44H7geOB+4HgA2Za5z3CgAKwvPKDgfuB48cChwYtwCgyv/wHZ +QNjmD6//QMC+C4//ocDRwOB+4HjxwAohwA/rcgXYMNuKJMMP1QKv/rhz4HjgfuB44H7geOB+4Hjg +fuB44H8B2OB+4HjgfuB44H8B2PHAag3P/6/BCHcA3s9woABkLvAg0gMZEhA2GRrYM/XYBbh6Ca// +6XEZyM91oADUBxodGJAPFRGWGRUAloDgLPLA5kX3GRUOlvzxABYAQAAWBUAAHEAxIMCc4D/0gcBa +C6//DtkjwGG4Y8AMwIDgDvLPcZ8AuP8aoS3AG6EDwB6hz3AAbAQAGaEPHViUTg7ABQ8VEZbPcKAA +wC9REACGCyCAhMz1z3AAAGQe1g2P/xEgwIPE8xkVAJaA4MD1GRoYNPXYBbjWCK//CnEZyBodGJD1 +BO//r8AKIcAP63IF2IojWgPNAa/+iiQIAOB48cCOCo//lQGP/uB4gQKP//HAfgzv/wDZSiQAcuB4 +qCCAAgAWAkAVIkAwGhiYAAHhABYNQAAWDkCODY//z3CgABQErKDPcKAA1AvcoEIKj/+pBM//4cXh +xiSIz3KAALBApojCuS5iANkPIYEDgOXPc4AA/G52EwIGBfQmenYbmAAc8EV5dhtYACWIFSONA3kd +WBAmiEWIWWF8HVgQIICMIRCARfeKIRAAIKAjuXcbWAAAgCq4eBsYAADZz3CgAPA2LKB5EwEGJaB8 +EwEGJqB6EwEGJ6B9EwEGKKB7EwEGKaB+EwEGKqB3EwEGK6B4EwEGLaB2EwEGJKDBxuB/wcXgePHA +4cWiwYt1qXDCCa//AtmpcNH/egmP/+kD7/+iwOB4gODxwAf0z3CAANRwgg5v/yTZ0cDgfuB48cBS +C+//mHCQ4Mohxg/KIsYHyiBmAcojhg8AAFUDbACm/solJgQA2kokAHTPd4AAyASoIAAPQCyDAVV7 +QCyNAMdzgADwXyCDz3CAAChdtH3duaBgIKPxuNEhIoII8qCLz3aAALhArWaB5Qv2z3WAAPBeFiUN +EaCNUSUAkAPynrkS8C24wLgVJwAQA4BSIU0CCyBAgwnyz3CAAIgKCID+uO/zn7kgowHiEQPP//HA +lgrP/wAWEUEAFgBBz3GAAChdQCmAIBR4AWGiwUEpQANTIBIATCEApMohxg/KIsYHyiOGDwAAGwWu +ASYAyiBmAVEhQILKIcIPyiLCB8ojgg8AABwFBdjH9M9wgADwXhYgQAQacIIIr/8C2c9wgABwXxYg +QARyCK//AtlAKZMhACOAL4AA8F9eCK//ENmLcFYIr/8B2QAjgC+AAPBf2gygCRDZARCAIJDgyiHK +D8oiygfKIGoByiOKDwAAPwXKJGoAHAdq/solSgRKJAB0ANioIEELFSMBIM9ygADwXzAiRQAEJYOP +AAAAAQQcQDFL8iHGz3GAALhABCWNDwYAAABBLU8UymGg5lln0SXhgg/ygOME8oHiDfYEJYQPAAAA +JAwkgI8AAAAkA/QA2ynwguc994LnBfSA4/nzguL39YDjA/LM5jP2gOMF8oHiw/aA5e31z3OAAPBj +ZpNwcif2USXAgg7yz3OAAAyehCoLKjAjQg4EIr6PAAYAANnzAdtvewPwAdkocwQlgg8BAADALrrP +dYAA/ENKZVBxAdnCIU0AgOPMISKAEvIB4AIQgCDPcYAACEEIYYHgHfIKIcAP63IF2IojlQUR8M9z +gAAMnoQqCyowI0QOCiHAD+tyBdgBBm/+iiPVBEokQAD1BW/+SiUAAAMQgCAIYYLgyiHCD8oiwgfK +I4IPAABYBQXY7fUqcFH/z3CAAHBfFiBABECQz3EAABgVCSJBAIIOb/8gsMEA7/+iwPHAz3CAAMgE +igiv/wLZag5P/wsFz//geOHFMmg0ec9ygAAoXSFiz3KAAAyeLbnAuYQpCwowIkEOUSEAgM9xgACA +iEGBxSKCDwAACgLFImEDSiQAdADbqCDAAjZodXkAIY0PgADwX0ClAeMO2c9zgADwXhYjAgAgqgDd +oaoB2SKqA9kjqkokAHGpcqggwAF5YhZ5pKkB4uB/wcXgeE0Dz/9JA8//8cAAFgBAgeDPcYAAZBYA +oQ30ABYAQAy4BCCADwEAAPABoQAWAEACoRHwguAAFgBAC/RGIMIAQ6EAFgBAz3CgANAbXqAD8AAW +AEADzNdwAAAAQMohiw+ArggAyiGKDwCuCADscCCgAcjscQChTgxv/wHYANnPcKAARB01oPsDz//x +wOHFABYBQKHBQMEBFIAwUSAAgAXyz3KAAMB5BPDPcoAA2HkgomCKAdkI8AAWAEAVIkwAAKQB4X14 +EHH491EjAIAI8gAWAEEVIkwAAKQB4YXhAN0H9xUiTAAB4YXhoKT7989xgK4IAOxwIKAByOxxAKG6 +DG//AorPcKAARB21oEUHr/+hwOB48cDhxQAWA0DPcYAAAABgoQAWAkAA3UGhABYAQP+7AqEAFgBA +A6GkoRDy/7pA2M8g4gfKIIEPAADQAM8g4QfPcZ8AuP8doQbwz3CfALj/vaDPcYCuCADscCCgAcjs +cQChUgtv/wHYz3CgAEQdtaDRBo//4HjxwOHFz3WAAMgEBG0qDm//CNkBhc9xoAC4HgKhAoUDoTYM +T/+lBo//8cDhxaHBAN1AxQAWAUAAFgBAgeEN8s9xgK4MAOxwIKAByOxxAKHscKCgqXAT8N4J4AmL +cAHaz3GArhAA7HAgoAHI7HEAoexwQKAAwexwIKBIcMYKT//PcKAARB21oIDx8cDCDY//CiYAkM93 +oAAUBDpxOfIvKIEDTiCNBxkaWDNAJQAUSiAAIA8gECD12AW4vglv/6lxGcjPcqAAwC8Kp89xoABk +LvAhAQAJh4DgD/RREgCGCyBAgAn0z3AAALAecg5P/wsgAIQE9HIPoAUqcBIM4AGpcADYDyBAAwYm +DpDK9QfYugigBBkaGDAZyAqnkQWP//HA4cUBEg02ABYAQQAWAUHFuIK51v8mC2//ARpYM5EFj//g +ePHABg2v/4DYz3agAMAvpRYSlhQWEZYA3aUeWJPPcqAAZC4UHliTLysBAE4jgQfwIkMAZX0A2w8j +QwAGIMCA9fVPJcAWpB4YkKQWAJb/uP7zoxYAlgQggA8AAAAPjCAQgPjz89gFuIDZzghv/5+5GRIQ +NvXYBbjCCG//B9kH2M93oAAUBAqnGRoYMATwA9gFpwmHgOAb8oDg+vNBKIGACvIvJElw4HioIIAB +ABYBQOB4UyBAgAnyLyQJcOB4qCBAAQAWgEDgeAmH5/H12AW4aghv/wpxKB8AFIDlGRoYNBLyLyhB +A04gggcVJoEQFhEAhioZGIAA2A8ggAAGJQ2Q8vWA2c9woADQGzCgpR6YlBQeWJRRBI//4HjxwO4L +r/8X2bfBSiFAIADfKgpv/4twDBSQMM91gAA0BUwgAKTKIcYPyiLGB8ogZgHKI4YPAACnA8okRgT0 +AGb+yiUGBCDAUSAAgFz0EsDtuAXyz3WAADgFKndAKI4g1H7HdoAAKF0AhlEgQILKIcEPyiLBB8og +YQHKI4EPAAC1A8okYQCsAGH+yiUBBAHAAsEKcmoMYANmboDgMPL/2AeuSiQAcQDYqCCAAwllACCC +D4AAqFwWIgIEJKoJZQHgIKoNFIAwRSDAAA0cAjCKIP8PU8AAhqm4AKYBFIAwz3GAAKgECK4CFIAw +9XkJrgCBDyAABAChAd8D8ALfCnCp/g/wQCiOINR+x3aAAChdAIZRIECCyidBFMonIhKB5xgCAgAQ +FAIxE8FIcIYg8w9CKBICAIYSwyZ4ZHkleACmANnPc4AACF4WIwME9bggoyGjBfQA2Yu5IaP2uAXy +AYOFIAEOAaPruoohwy8D9B4UkTANFIEw5bkE8lgUADEFtuC5rPIAhu24BPLPdYAAOAXjujz067gV +8v/YB65KJABxANioIIADCmUAIIMPgACoXBYjAwREqwplAeBAq1zwTCIAoY72CiHAD+tyBdiKI9AG +SiRAAGEHL/4KJYAE7roHjjIlghQAIoMvgACoXBYjAwQI8kSrBNoAKoIERXgHrj/wQKsPIIAEZvBM +IQCkkPaMIcOvHPIKIcAP63IF2IojUAxKJEAAEQcv/golQATSCKADi3AQFAIx7roF8gIUgDAJrgTw +ARSAMAiuAIbruBvyDRSBMADaSiQAcUeuqCCAAwAigA+AAKhcFiAABAQYQgQAGEIEAeIBFIAwCK4C +FIAwCa4s8EwiAKHKIcoPyiLKB8ojig8AAFEEPAfq/8ogagENFIEw7roHjgAigi+AAKhcFiICBAry +BBpCBATaACqCBEZ4B67d8QAaQgQA2g8iggRGeAeuARSAMAiu4bkF8lAUADECtlEhAIEH8iPAzgqg +A1UUgTANFIAwUSDAgB7yNcFWFAIxCnAmC6ADEsO4cIwgAoDKIcEPyiLBB8ogYQHKI4EPAACcBBAG +If7KJGEAUSXAgconIhEKcF79z3GArggA7HAgoAHI7HEAoaINL//pcADZz3CgAEQdNaD1AK//t8Dg +ePHAmgiP/6TBAd2BwNIOL/+pcQDeTfCCwMYOL/8C2QLAi3ImCGADA8GkeC8lB5BA8gDAANnPcoAA +KF0PIQEAArgUeABiz3KAAEgFYIIyfy24UyAQAAQnwJAAogf0gOOQDmIHyiAiCCDA7gmgAxDZAMIA +2DJqNHkAIYMPgAAoXYohCAACsyCjz3GAAKgEFSEBBGCBZH/goc9xgAAIXlZ5AKEBoc9xgADoXVR5 +ALEB5iHAEHZmB8X/z3GArggA7HAgoAHI7HEAobYNL/+pcDEAr/+kwOB48cAKDwADyg0P/2sEj//g +ePHA4cXPcYAADJ7PcoAAqATwIg0AhCgLCjAhQQ4EIYIPgAAAAEQhAwIvuga7BCGBDwABAABFe0Ep +QgMsuWV6JXrPcYAAyAQVeQOBEHIN8oDlQ6EL8i8pQQNOIYAHECUNEAL9gOX49c0HT//gePHAosGL +cC4PL/8I2QDAgODPcYAAmAQAoQfyBhQAMQOxBBQAMQKxLg0P/6LA0cDgfvHApMGLcP4OL/8Q2c9x +gK4IAOxwIKAByOxxAKEAwFEgAIADwAb0AsGGDeADANoF8B4PoAQBwdYLD/8A2c9woABEHTWgpMDR +wOB+4Hgw2c9woABQDCKgwdnPcKAABCUgoOB+4HjxwL4OT//PcAAARBy2Dy//AN5x2K4PL/8GuM9w +AABMHKIPL/8I3c9wAADIG5YPD//PcAAAzBuODw//z3AAAAgcgg8P/89wAAAEHHoPD//PcKAA1As4 +gByAz3CfALj/WBgACAAmgB8AAMAbWg8v/wTmYb2A5Tf3AN4F3QAmgB8AAAAcQg8v/wTmYb2A5Tf3 +nQZP/+B4z3GgANAPGREAhhwRAIbPcKAAyB8VEAKGHoDPcKAAxCcZEAKGnBECABUQAoYtEAKGLhAC +hi8QAoYwEAKGgBECAIQRAgChEAKGkBECAKIQAIaUEQAAmBEAAIwRAACIEQAAGIHPcZ8AuP9YGQAI +z3GfALj/WBlACM9woADQDzuAOYDPcaYA1AQXEACGLBEAgDARAIA4EQCAz3GgAIgkAIEBgQKBA4EE +gQWBBoEHgWDx4HjxwOHFz3WAAPhwqXCqCy//A9kBhc9xoACAJQyhAoUNoQCNUSAAgADYjrgE8g+h +A/AQoUoLD/+5BU//4HjxwDYNT//PdYAA3AQAhc92gAAwc+SQ6XGyCeAChiH8A1EgwIAacAXyH4aA +uB+mIIUAkThgAKVUFoAQgOAV9OlwagygBYYg/AOA4AzyUSAAoAvyz3CAAIgKCYBRIECABfQfhoK4 +H6Y1BU//4HjxwM4MT/+iwc9wgAAwcz6ABCGBD///D9AEJYBfAADwLyV4z3WAADBzfgygBR6lgODK +AiEAmB0AEM9xgAAAAACB67ga8gGB67hA2M8g4gfKIIEPAADQAM8g4QfPcp8AuP8dogSBAeDTuASh +BSCAD9D+AAAWolElwNEG8s9wgADcCgKIBvADhfYNIAMkhT6FRCECDKDilB0CEAT0gNiUHQIQUSDA +gUAoAgYV9FEigNOCuhnyRCI+0wz0z3CAADBzAYBRIACABPJyDYAFHfBuDoAFGfCzuT6lUSKA08Ui +gg8AAAAHz3GAALxzKIlFIgAGhiH9D1IhwQFFuSV4z3GgAIgkEKGKIdYAz3CgAIAlL6DPcaAAxCdB +EQCGUSLA088g4gLQIOECQRkYgM91gAAwcwCVBCCADwAAzIDXcAAAyIAJ9AuFUSAAgAXydgzAAlHw +HoXzuFQVghBD8k3YCbgaGRiAgOIH8gHaz3CgANQLUqAE2BAZGIAF8O4N7/6KIEUCUSCAxAX0USEA +xvfzz3WAADBzz3agAMQnLhYBlhaFInhkuBB4hh0EEM9xgACICgoKIAYvkRoWAJYEIIAP////ABoe +GJARFgCW67gT8gDYi7gTHhiQGtgZHhiQC/CA4gbyAdrPcKAA1AtSoATYEBkYgB6FUSCAgY7yFJVR +IECBivTPcKAALCAPgIDghPQQ2EHAz3CAAESbAIBRIECABvJRJUDTAdgD9ADYQMALhc9xgACAmotz +BCCAD8AAAADCgTa4ESYAkIHCQCEECy/y4ZXHgXC/9CQAAAgmzhMQdk4ADACUFYAQUSDAgSH0z3ag +ACwgD4aA4Bv0xoYclRB2yffPcIAA5HvCgAWBEHYP9IDjA/IC2ACjA4GA4oO4A6EF8gCCprgAogHC +DfADgeO4AcIJ8gDenr7Pc6AA/ETBo6O4A6ELhQShA4UFoVQVgBCA4AbyAMCC4M8iYgED9Ie6QcJV +JUAaz3OAALAyvgtgAQDBH4WUuB+lHoWQuB6lDPDPcYAAfGQNgQHgDaEQ2c9woACQIz2gJQJv/6LA +4HjPcKQAkEFNgM9xgAAYfUKxGoBRIEDGA7EEIIAP/wAAADC4BLHPcIAAGH0A2gjyz3GAADBzMYFR +IYCCBfJCsEOwRLDgf1Ww4HjxwG4JT//PcIAAMHMOkM9ygAAYfQCyz3CmAOj/C4DPdaQAtEUDogwV +A5YNFQGWz3CAADBzRBCOAC8mxwD/2BC4yXSEJAOcBCMHAAT04L4t9DIVAJZTII8A/2cBsv/Y9H8I +uO9/ZHhALwQSACQFAAAmxgMFJYUBQC8AFgQjgw8A/wAAQC8GFBtjACeHAf/YBSXFAQi4BSNDAQQh +BQD5YQAlAAEFeeWyb3gEI4MP/wAAACi7ZXgveQOyJLIEFQCWArLPcIAAMHMRgFEgAIIM8s9wgAC4 +QMhggeDG9s9wpgDo/w2ABPAA2AaiBaIA2EokgHAG2Y25qCAAAynbErvwI00AQCIDCxV7AeGgowHg +yQBP//HATghP/89xoADIH0ARAAbPcqAA0A8ZEgCGz3OgAMQnTxMPhtiBz3CAAICayKAPzBB3z3aA +ADBzAN0G8h+GUSCAgAXySiFAIATwDxrcMzp1UhMThhUTD4Yb2BYbGIDjvwb0USNAoMoiQiMH9B2G +SiJAIIS4HabkvwXyVBaAEIDgA/IadQbwHYZKIEAghbgdpkwiAKDMICGgVfLPcJ8AuP9YGAAIUILP +coAA3ApPilagANrPcKAA/ESeukGgpaAehrC4HqaoFgAQZOAeoRDYDqEB2BUZGIA2De/+CdhRIEDH +CfTPcYAAKA8LgQHgagrgAQuh0g2AAUwgAKAM8s9xgAD4ZAWBAeCSDqABBaH/AQAATCIAoM9xgAAw +c1LyHYFRJ8CQhLgdoc9xgAD4ZAXyAoEB4AKhBPABgQHgAaH2CcABPvBCEwCGBCC+jwDAAAA48gG2 +HobzuDDySgsABgCWhiD8AIwgAoAs9J4JAAaA4Cj0C/CA5QX0z3CgACwgsIB2Ce/+iiCEC1EgAMT1 +9YDlDvLPcKAALCAQgM9ygAAoDy+CongwcML3D6ID2c9woADUCzGgBvAAlv4KIAc0ls91gAAwc1QV +gBCA4CHyz3KgAPwlNILPc4AA+GQGg4DhOGAGowbyAd7PcYAAqQjAqVOCJ4OA4FlhJ6M+hdEh4oEZ +8gHZz3CAAHAFIKAT8FEjAKAT8s9wgACpCAHZIKjPcoAA+GQDggHgA6IehVEgwIEC9C7w6PEA3Qvw +gOUF9M9woAAsILCAsgjv/ooghAtRIADE9fWA5Q7yz3CgACwgEIDPcoAAKA8vgqJ4EHFC9w+iA9nP +cKAA1AsxoM9xgAD4ZASBz3WAADBzAeAEoR6F8LgK8pUVgBCkFQEQqXLaCGACAdsE8KILgAIfhVEg +AIAH8s9wgADweTYMQATPdoAASIEZhoDgBfI+CYADANgZps4MgAHPcIAAiAoIgOu4DPJMIQCgCvQE +/89wgAAYfTTZdgnv/sTaHoXwuNwJggPPcIAAgJoAgIDgHAviC8ogYgCdBQ//4HjxwD4ND//PcYAA +3HPPcIAA3AQgoADZz3CAAKxzKaDPcIAAgJokoCWgz3AAAP8/z3GgAAwkAaEb2AShUSAAxM91gAAw +cw/yHYWEuB2lz3CAALQEIIAFgQHgWgugAQWhWwIAAEQVgBDxhcK4BCePHwAAAAhUFYIQ+3+A4s92 +oADEJwDZFfLg2r8emJCU2pUdghAE289ygABEBWCiAto8HoCQz3KAAOR7IaIH8EDZvx5YkNTZlR1C +EAAgkQ+AAOydvBGBIAAgkg+AAIihCBKAIAUh0wNOC+ABBSDQA4Dg2gEBAAHYEB4YkMQRgCDPcYAA +LHrleBulbBWAEMO4HHj0IQAAZB3AFF4dBBAQEoAg5XgcpXAVgBDDuBx49CEAAGgdABTPcYAATHpg +HQQQZBWAEMO4HHj0IQIAih2EEM9ygABcevQiAACOHQQQaBWAEMO4HHj0IQEA9CIAAIwdRBCQHQQQ +EMyGIP+FJAzBAc9wgACICgiA67gkCsL/G/DPcYAA8HsAgWOBQ6FmeAChBIEMFQGQEngleAwdAJAA +2I+4Ex0YkIogvw8IHQCQGtgZHRiQQg+AAc92gAAwcx2GUSDAgX30z3WgAMQnERUQllEgwKMA2tX1 +USBAohv0USCAoy70USAAoFn0USDAoGnyCNgTHRiQCgnAAYDgX/QC2DwdAJAjhs9wgADkeyGg0/GD +/aAWABCRFQGWAeDDuTBwoB4AEMn1iiIIABMdmJCRFQCWw7gQcb/zEh2YkL3xOhUAllEggIAc8s9x +gADwewCB4LgW9IC4AKGKIP8AAdoEoUOhOhUAloYg/wEDuAGhDBUAkEYgAA8MHQCQCB2AkADYjrgT +HRiQUSUA0JXzBNnPcKAAkCM9oI/xfP0C2DwdAJAjhs9wgADkeyGgHobzuIPzEx0YlJH+A/ATHRiU +4QIP/1QWgBCA4Aj0QhUAlgQgvo8AwAAABfRRIACiEPK/FQCWpbi/HRiQiiAEABMdGJBCCMALVBaA +EIDgX/VRIICgDfQKIcAP63IF2IojjAKKJIMPfQev/QolAATPcIAAgJoqgM9woAAERCagxfHhxc91 +gAAYfQelKKV0tUmlAdgVteB/wcVKJEBzANmoIIACANrPcIAAGH01eECgAeHgfuB48cD2CQ//Fgkv +/wDdz3CAAAAAoKDPcqAAyDs9gqKggOGhoKOgA/QA2QrwJIDXcWWHIUP79YohhAAgoCGggOGkoA3y +0Nmfuc9wnwC4/z2ggtgUos9wAIARFA6if9jPd6AAyB8ZHxiQAdgIcQhyrg2v/Qhzz3CAABQA13CA +ABQADPIKIcAP63IF2GDbiiSDD6EGr/24c892oADQD7WmIglABsILz/5A2c9wnwC4/zKghgrP/oDZ +z3CgABQELKAdHliQSgsgBgPeHgiABV4KIAYA2BILgAjPdaAArC8YhZq4GKUR8OB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB4Yb6MJv+f7fUYhbO4urgYpQfYSB8YkKoJj/4WDEAImgtACCYJ +QAkahcC4geAB2MB4LyYH8AbyYgjgCAHeBvAD3hiFmrgYpRYJj/7qD4ACxgpAA89wgAA0BTYO4AIE +2QIKAAO+DEADyghAB24OgAYKDQALLg6AC1oPgAumDs/9iiDGDc9xgACICg2xA9htGQIAG9nPcIAA +XCNSCyACMKiGCY//Dg6AC2YKD/8+DwAMJgyADAYJgAmWDK/+yXChAA//4HjgfuB44H7geOB+4Hjg +fuB44H7geOB+4HjxwAohwA/rcgXYWtuKJIMPQQWv/bhz4HjxwP4Pz/4acCh3z3WAAIgKFJXPdoAA +AGQQuCILYAcApoDgyiciEM9xgK7kAexwIKDscQAZAAQIhVEgAIAE8gCGgbgAps9wgACsBgCIgOAF +9ACGg7gAps9woAAsIBCAgOcA2m0eGBAe8gCGYhYPFslzYxYEFoC4AKZIcQfw7HUApQQbkAAB4ffh +AIO6989xoADUCw2hQKNiHtgTYx4YERDwyXNIdQXw7HEAoQTjAeX35QCDu/fPcaAA1AsNoaUH7/7U +HoAQ8cDhxaHBCHXSCO/9FNjPcIAA4AQAgIDgD/Sd2AAcBDAPzAIcBDAB4BB4j7gPGhwwAMCpccL/ +vgwABX0H7/6hwADY4PHxwOHFABYNQAHIUyUBELv/USVAkM9xgADgBAHYyiAhAFEH7/4AoeB48cDh +xc9xpwAUSADbaKFHgc9wgAAEcV6gUIHPdacANERfoGehz3LzD//8UKF2oaDZmrn1HVgQz3GlAAgM +CBEFAEwlAIDKIcIPyiLCB8ogYgHKI4IPAAAGA7ADov3KJCIAz3WkALg9mxUCFlqgphUCFlugkhUC +FlygoxUCFl2gUNpCoZsd2BD/2aYdWBCSHVgQox1YEM9ypADs/89xAAD//2eiJqIB2c91oADIHDGl +iiHEAM9yoADsJyaiKoJkGEQAz3AoAAIBBqJxpYEGz/7gePHA4cUIcgHdgOHKIcEPyiLBB8ogYQHK +I4EPAADEAMokIQAYA6H9yiUBAYDiRPZTeool/x+A4UT2M3mzfRQhgABaDCAFO3mseDEG7/4vcOB4 +8cCiDc/+OnBacXpyGnMA2s9xqwCg/1mhB9gaoVihIN/PdaAAyB/wpQHeQx2YEwDYLguv/o248aXP +cKcAmEfaoOIN4Age2M9xpwAUSB2BvoEAGwAgABhAI/e4xSCCDwD/AADTIOEF973FJYIfAP8AANMl +4RWKIRAAzv8IdqlwiiEQAMz/ABmAI3EF7/4AGgAg8cAiDe/+ANnPdaAAtA98hTylz3KAAARxZBIA +Ac92oADsJxC4hSCEAAamHoLPd6cAFEgHpx+CEKfPcKUACAwioPqCz3CkALg9mxjYA/uCphjYA/yC +khjYA12CoxiYAM9wpADs/yagiiCKAAamfKVaDqAAAdgVBc/+8cCGDM/+z3CAAPBjB4iA4GgEIQCq +wc9wqwCg/2QQFgDPcKsAoP9oEBcAz3CrAKD/YBAYAAfeaf8A2c9wqwCg/zmg2qA4oO4PIAgB2ADY +z3GnABRIDKENoQ6hD6HPcAAAASrPdaAA7CcGpc9wpQDoD8egz3egAMgfINgQpwXYQx8YEADY0gmv +/o24INgRpwHZz3CgALQPPKDPcAAAAi8Gpc9wAADCMAalz3AAAEJIBqXPcAAAAkoGpc9wAAACYgal +z3AAAMJjBqVKJAAgz3CAAPBjJJAFkEQpvgcYYBV4FSQBJSdwGWHHcYAAdBYDEZIABBGVAAERkAAC +EZMAAIkQuAUggA8AAEItBqUAiRC4BSCADwAAgkYGpQCJELgFIIAPAABCYAalINgQpwXYQx8YEADY +Jgmv/o24INgRpwDYEPDPcIAAeG8WIEAERBiAAUGGSBhAAVegOKBAIUAgOnDPcIAA8GMGkDJwegIO +AM9xpwAUSFwZQARAKAAkTyBBAIe5ibkmpQhxhSGLACalhSCMAAalTCEAoBTyTCFAoBzyTCGAoCb0 +QCoAJAUggQ8AAIJgJqUFIIAPAABCYhnwQCoAJAUggQ8AAIItJqUFIIAPAABCLw3wQCoAJAUggQ8A +AMJGJqUFIIAPAACCSAalINgQpwXYQx8YEADYXgiv/o24INgRp4twgcGIwonDPP8IwUApQCEAII4P +gAD8bgnAIKYBpgDAGKYBwBmmQCsAJIUgigAGpSDYEKcF2EMfGBAA2BoIr/6NuCDYEaeCwIPBiMKJ +wyr/CMBMIQCgAqYJwAOmAsAapgPAG6YU8kwhQKAc8kwhgKAm9EAtACQFIIEPAACCYCalBSCADwAA +QmIZ8EAtACQFIIEPAACCLSalBSCADwAAQi8N8EAtACQFIIEPAADCRialBSCADwAAgkgGpSDYEKcF +2EMfGBAA2I4Pb/6NuCDYEaeEwIXBiMKJwwj/CMAGpgnAB6YEwB6mBcAfpiDYEKcF2EMfGBAA2F4P +b/6NuCDYEadAKAAkhSCKAAalhsCHwYjCicP5/gjABsMEpgnAfKYFpgfAAMEdpgLAAiBCAATBW2MC +I0WAOvIieEx4L3Cocdr+AsFALI4g1H4VJk4UAnnHdoAABHEBwAPCIaYHwwIiAQAFwDtjAiMFgCry +Anosei9wqHHN/gPCBMMCIgEAAsAnpgIjBoA0HoARIfIFwAIghYCwBeL/TB5AEQohwA/rcgXYiiOF +DAjwCiHAD+tyBdiKI8UJLQZv/Yokgw8KIcAP63IF2IojxQr28QohwA/rcgXYiiPFC4okgw8JBm/9 +CiWAAUAkVCBMJICg5ATF/wDYz3GgALQPHKHk/spwz3GrAKD/GaFoGcAFYBkABkokAHEA2KggAA0I +cYAhgg0weQa5gbmXuSalCHGAIUIPMHkGuYG5l7kmpQhxgCHEBjB5BrmBuZe5JqUIcYAhhAgweQa5 +gbmXuSalCHGAIYYAMHkGuYG5l7kmpQhxgCFGAjB5BrmBuZe5JqUB4FEA7/6qwOB48cAaCO/+mHCh +wc9ygADkBCCKz3OAAARxAYKAEwMAkHHMIMGA6vJwcAbyz3CAAAByOYggqkokwHBKIAAQqCDAAs9w +gAAYcjIgAAKQcAPyQCBIEEwgwJCkAQYAz3CAAAByGYiQcAb0BCEBAS8lRwAG8AcgAAEvJQcAYaIA +289woAC0D3AQEgB8oAAaAgEU8EAggCEQeAa4gbhAKQEkJXgGpkAjgREweQa5gblAKgAUJXgGpgHj +z3CAAPBjBpAQczIBBgAA2Q8hwQALIUCBAdjKJwIADfQLIQCB7fPPcIAAAHIZiJBw5/MKJwACgOMR +8oHjZ/KC4wb0iiCGIIohRgIM8AohwA/rcgXYiiPODGTwttq92RpyeXHPdqAA7CdKIQAgSiQAcQoi +QBQqdagggQIAIEEjVGtALwABFHgaYrV6x3KAAHxxBpIweUApiQFPIUEQHH8Qv+V5JqbAuLh4BSBA +BC8hCCAAI08TB5Lwfwa/TydGEBx5QCkTBAUjgSEmpsC4uHgFIIECLyJIEEUhwBAGpgqGi3EAsQaS +LyYBAAAUADHQcBT0RSfPEOamCoYAsQeSABQBMRx4MHAU9AHlafGKIsQGiiGECKfxCiHAD+tyBdiK +I88BSiQAAIkDb/0KJQABCiHAD+tyBdiKI08C9PHPcaAAtA9wGYAEeQav/qHA4HgA2c9wgAAAcjio +Oajgfzqo8cDyDY/+rcHPcIAAiAoIgM91gAB0FsC4QMDPcIAA8GMkkAWQRCm+BwDBGGAVeCdwNXk4 +YBllI4lBwRllJIm4YAKIQsFDwM9wgAAEcWYQAQHPcIAAqAZAkFBxSiAAICj0z3GAAFwjDYmGIP8B +e2jPcIAAAHLYiAIjg4POiS+JyiNiAIYm/xH7btmIGoiGIf8BQ7kOJs6TyiZiEA4gQIDbfsogYgDF +ewK4ZXgD8AfYgOCEAyEARMDPcKAAtEdHEACGgOB0AwEAz3GAAFwjDYnPc4AAAHKGIP8BQ7gYqw6J +hiD/AUO4GasPiQDZnrmGIP8BQ7gaq89wgAAEcWYYhADPcKAAtEdTGFiAkP3PcIAA8GMlkESQz3eg +AOwnAMA5YTV5RCq+BxV4J3EZYShlELgFIIAPAABCLQanKGUQuAUggA8AAIJGBqcoZRC4BSCADwAA +QmAGp89wpwAUSAyAz3EPAAD8z3WAAARxRcAAwAK4FHgeZQAlBRAaZRtlACUEEB1lCYXBhhwVBQAF +xWiDgOVCggwUBAAb8gq+JH6odcm9xX3PdqcAFEitpgq6RHnJu2V5z3KnABRILqJALIECBCGBDw8A +APzJuCV4GvBALY0CJH3JvsV9z3anABRIraYKu2R5ybpFec9ypwAUSC6iCrgEIIAPDwAA/Ihxybkl +eM9xpwAUSA+hSiEAIAPYRsAKIwAkBMARIECE6AEBAM9xgAAAcgAhQAQYiCJxR8HPcaAAtEdgGRiA +ELibuM9xgAB0iCCJn7iA4QHZwHkPuSV4z3GgALRHXxkYgAbwVg4v/oogiADPcKAAtEdxEACGBCCA +Dw4AAAAxuIHg8vMA3gPwAebPcIAA8GMGkBB2dAEGAAfAGIgRIICD9PMBwQLAgOYCIFkAAMACuBQg +GADPcKcAFEjXoArygeaf8oLmCvSKIIYAiiFGAgTwtti92RpwenFKIgAhSnUVbkjAYb0DwRVtJXgQ +eBC4hSCKAAanACUAFBB4BriBuJe4BqcAJcAUEHgGuIG4l7gGp0AggCEQeAa4gbgGp0AjgCEQeAa4 +gbgGp4nAisGLwozDUf0FwIDgEvKKwUCBicAAgInBQKGKwQChi8AggIzAQICLwECgjMAgoAjACcG2 +eAAglg+AAPxuCsDwHkAg9B4AIAghgA///wH/LyRAJgQsPiAVIJUzACWAL4AABHEtgC9wJf0OIJcP +AAAAAQrAiCB8AAQoPgUAJYAvgAAEcTOAL3Ad/Q4ggg8AAAABCSeBLwAA/wEJIoAPAAD/AUghAQBI +IAAAVB5YIFUeGCBUbkApAyF0e3pitXrHcoAAfHFCIlIgTCIAoCay7gbt/weyRvGKIMQGiiGECGjx +BsBhuIDgQCFRIAwG7f9GwFYIwAQ6/Qbwmgwv/oogiADPcKAAtEdxEACGBCCADw4AAAAxuIHg8vP9 +Aa/+rcDgePHAocGLcL4Jb/4E2QDAUSAAgCQNgv8AwFEgQICoC8L/AMBRIICA4A0CCQDAUSDAgEQL +AgkAwFEgAIEECMIERgtgAAHYz3GAruAB7HAgoAHI7HEAoc9ygAD8bookgX0A2aggwAHwIkMA7HBg +oAHhXg4v/gDYocDRwOB+4HjxwGIJj/7PcKUA6A8HgM9ypAAMQlMgBIBEII0ARCADAQKCz3YPAAD8 +CHHJucR444IquNh3xH9BL4US5IJTJkYC6XLJuuR+Kr4G8p7hhPeMIU+IxPcA2QPwAdlMJACABPKe +4ET3ANgG8IwgT4g89wHYgOUbeCV4BfJMJoCHQ/cA2QXwjCZPiD33AdmA5QK5BXkE8kwlgIdE9wDY +BvCMJU+IPPcB2IDjA7gFeQTynuJE9wDYBvCMIk+IPPcB2IDjBLgFeQTynuZE9wDYBvCMJk+YPPcB +2AW4JXhCIACA7QCv/sogYgDxwIIIj/7G/4DgCfTPcIAAgAUAgIXgrgAFAM9yoACsLxqCwLiB4AHY +wHgvJgfwAN1J8s9wgAD8cSiAz3aAAJyIAeFghiiggOMjhjV4BfIpgAHhKaAE8DeAAeE3oBiCmrgY +on3+GIKzuLq4GKK2DwAIoab6CmAAoqYF8JoKL/6KIIgAz3CgAHhFAIAEIIAPDgAAADG4geDz889x +gACICkiBNJFTIgAAqg/v/QHbFg+AB4DgCfKa/4DgBfJOCW/9D9gE8FoJb/0P2CUAj/7xwKHBAdhA +wM9wgADQFgqAUSAAgMogAgfKIoIPAABnAJALIv7KISIBocDRwOB+4HihwfHAfg9P/qPBCHZHwM91 +gADQFhuFOoX8hSR4BH8HJ4+TQcdH8gQUATGA4RnyHBQAMQsgQIAN8s9wgABoBWCAz3EAAGBiDNhg +ewPaCfCA4Af0z3CAAGwFIIBgeQzYBhQBMYDhGfIeFAAxCyBAgA3yz3CAAGgFYIDPcQAAYGIN2GB7 +BNoJ8IDgB/TPcIAAbAUggGB5DdgLJ4CTBvJuCG/9BdgI8IDmBvR2CG/9BdjJ/9ylCNw3B2/+o8Dg +ePHAvg5P/gh3BYFAgQDdIN7IuBC4yLoFIJAAAYEmgci4yLkQuQUhEQAA2A8gQAMLIACgDfLwJ0ET +gOEJ8gQgQARCIACAYHnKIGIAYb6A5gHlLPfNBk/+4HjxwG4OT/7PdYAA0BYlhUCFyLnIukApAwQF +I4OARoUhhci6ELrIuQUiRgBHhSKFyLoQusi5BSJFAEiFI4XIusi5ELoFIkQAI/IvKcEA4IBOIY4H +ANoPIoIDUn4EIoEBxH8lf+Cg+oXEf+V5OqU5hQQiDwEEIkIBxHnleTmlOIXEeQQjg4NFeTil4PVN +Bk/+4HjxwNYNT/6iwc9ygADQFhqCO4IEeRyCVSJDBwQgUIBKIQAgJfJMIQCoRvcRIECkwCFhIPrz +8CNABFwaQASA4MohwQ/KIsEHyiBhAcojgQ8AADACyiQBBMACIf3KJUEEQHgA2A8gQAQGIBAgCnB8 +/8kFb/6iwPHAYg1P/qfBOnEackDAANhhwAHYBRwCMAYcAjCLcI4PoAiCwQXBCnAjIEAEBsIEwIDg +DfQKIcAP63IF2IojhAaKJMMPXQIv/bhzQHh1BW/+p8DgePHAEg1P/hpwKHVId2h2OGNuCC/+ZtmB +4An0CnC+Di/+qXHpcMoIL/7JcU0FT/7gePHA4cWjwQHYQMDPdYAA0BapcLoML/5c2TqFG4UkeDyF +BHmBwEHBlf8BwRuFJHhBwFUlQB+pcXv/z3CAAEgYQCUBG3j/i3CCDi/+BNkBwEb/AIWA4AX0BYWA +4NwMwf8BBW/+o8DxwIYMb/4A2s9zgADQFjuDuoMA3g8mDhCkeQQmQBBCIACAyiBiAC8mB/AB3cog +gQAG8hyDJHjFeDL/qXC1BE/+4H8A2PHAOgxP/s9wgADYBQCAgOBMCcIGz3eAAAAAAIdRIMCASiAA +IBryAYdRIMCAQNjPIOIHyiCBDwAA0ADPIOEHz3GfALj/HaEEhwHg07gEpwUggA/Q/gAAFqEQzOC4 +AN498s9xoADIH7ARAgDPc4AAiApqEwABY7gIIgAAHqEQ2A6hAdrPcIAA3HcVGZiAAhoYMM9wgACc +eAYaGDAIg+u4CfLPcKAAtEdLGJiDdxiYgMIMAATPcIAABAUAiIDgiAoCCAQgj08wAAAAz3CgACwg +z3WgAMgfI/DtuMolgR+gAMgfyiCBD6AALCAY8rYNAAHPcIAAiAoIgOu4B/IA2Z65z3CgAPxEIqAQ +zM91oADIH++4z3CgACwgJvQKd89xgAAoD8OhxaEDgI0CIAAHoRHMUyBAgBLyBsgCEgE2AhoYMAYa +WDAuDAAEz3CAAAQFAIiA4PQJAgjPdaAAyB9ZAiAAAN4E2AgaGDAfhYDgiiAMAMoggg8AAAACDqUD +2BW4Eh0YkM9wgADYBQCAgODwD4IGAIcEIL6PAADfeBoDAQDPcJ8AuP/doA8DAAAIyM9xnwC4/xah +z3CfALj/WBgACB6FUSBAxS3yz3WAACgPA4UB4NIMIAEDpc9wgACICgiA67gI8gDYnrjPcaAA/EQC +oc9wgAAwcx2AhiC+jwTyBYUB4AWlz3CAAAAAAIDruAfyANnPcJ8AuP89oEogQCAQzOS4iPXmuJH1 +hiD/hSzyUSMAwJTzUSBAxZD1EMzPdYAA+GRRIMCAN/KA2BAaHDARzOu4CPIYhQHgGKVKIAAgBfAQ +hQHgEKXPcIAAXCMSiFEgAIB0CyIAyiBiAIDnBPIXhQHgF6UQzOe4AN5U8hHMBCCEDwAAABgMJICP +AAAACB303gugAgpwUSAAgBXyCNibuA7wiiAEABAaHDAPhYDnAeAPpeLzFoUB4Bal3vEIGhgwb/AE +2PzxwgqAABHMUSDAgB3yz3GgACwgBYEmgQrgMHAx9wISATYC2BAaHDBQ2HoNIACYEQEAbgoABM9w +gAAEBQCIgOA0CAIIS/ACyKAQAADwuMlwGfIeCIAAANiWuBXw6LgW8jYJoACKIAQAWgqgAMl1Asig +EAAA8LipcAXy9g9AAADYlbiaCoAAvfHpuM9yoADIHwfy3g9gAAHYANiQuPPx7rgK8lEjAMAI8oog +BAAOogTYCBoYMBESATfvuRHyQBICBs9wgACocw2QEHKJ96+5ERpcMM9wgACAmsCgz3WgAMgfCMgE +IL6PA4DoQ/AFwv9RIEDF6AXC/z+FoBUAEAkhAADk4NP2z3CAADBcAIBRIECAC/LepRDfXg1gBOlw +gOAF9AHYHqXupYogCACgHYATDqUfhajgSPeA4AT0iiAEAA6l3gzABy/YlbgSHRiQz3ABAMD8FR0Y +kJoPQACKCyADB9jPcIAA2AUAgIDgQA2CBs9wgAAoD0SAI4AIIkEAJKBFgCaACCGBACagPIVngEiA +YnkIIkEAKKDPcIAAAAAAgAQgvo8AAN94BvLPcJ8AuP/doM9wgACICgiA67gV8s9wgAD0AxB4z3Gg +ALRHSRkYgM9wAEQUAEsZGIBMGZiDA9h3GRiA7QcP/uB4z3CAAAUFQIjgugjyz3GgAKwvGYGKuBmh +USJAgAfyz3GgAKwvGYGOuBmh4H7hxQfZGRpYMM9woADUBxoYWIAOEA2Gz3GAAAAAQIFRIgCCCRpY +MxvyQYFRIgCCQNvPI+IHyiOBDwAA0ADPI+EHz3KfALj/faJkgQHj07tkoQUjgw/Q/gAAdqLPcaAA +SCy+oR8QAIYBGhgwBMqc4Mwggo8AAJEABvIAFgBAABYAQAPMz3GfALj/GKEEyuB/wcXxwOHFz3GA +AIgKSIFRIgCALPLPcqAAyBxIgoYg/wFDuM9ygAAIQQpiANuA4sohwQ/KIsEHyiBhAcojgQ8AAFoA +yiTBALwD4fzKJSEAgeLPcKoADFC+gcf3gL2+oQHZJaAE8KC9vqFloNkGD/7xwFYOD/4acM93gABc +IxCPhiD/AUIo0QDPdqAAtEcqdQXw0gjv/YogiABxFgCWBCCADw4AAAAxuIHg9fNDFgCWRiAADUMe +GJBXFgCWvLi/uFceGJBfFgCWv7hfHhiQANieuFMeGJAQj2AeGJDK/89wgADwYweIgOAU8hCPhiD/ +AbYNb/9DuM93gAAIBRSPEHUI8s9wgAA4JBaAQHgUH0IUQxYAlkwgwKBFIAANQx4YkIAADQAKcDMm +AHCAAIxEQCeBchR5AHkQvZu9z3CAAHSIAIifvYDgAdjAeA+4pXhfHhiQIPDPcIAAdIgAiBC9gOAB +2MB4D7iYuJ+4pXhFIMABXx4YkA7wEL3PcIAAdIgAiJ+9gOAB2MB4D7ileF8eGJAIyITgwA7h/Mog +4QOJBQ/+CiHAD+tyBdiKIw8ISiQAAFUC7/wKJQAB8cAWDS/+AdnPcIAAiAoIgMC4G3gA3s91oAC0 +R0sdmJN3HViQz3GgAIRE2KEC2XcdWJAA2Z65Ux1YkFQdWJDPcYAAQAFHHViQjrjPcYAAKABFIAYN +SB1YkM9wgACICkkdmJMakAK4bLhEHRiQHNhFHRiQz3CAAKQyAYhGHRiQz3CAAFwjEIhy/0okwHDP +cYAABHzJcqgggAPPcIAAgIhWeGGA82r1fz9nAoBipwHiA6fPd4AACAUAh4DgBPJkHRiQQx2YkQHY +ff/PcIAAiAoogOu5EfLPcIAA9AMQeEkdGJDPcABEFABLHRiQTB2YkwPYBPBLHZiTAdh3HRiQUSEA +gECHDvJTIkEAErlEIgADDrgleIYi/wMKukV4EvBIcIYg8w8KuAQigQ8AAAAMBrkleAQigQ8AAAAw +ArkleM9xgAA0Mj0EL/4CoaHB8cCyCw/+WnDPcIAAgIhAgKTBSHCGIP4DJLgOuAZ5wrpAKoADJXhO +wAQggw8BAADALrtAKw0GnL3PcYAAiAoogZ+9z3KAAAgFUSEAgM9xgACIGXZ5BvLQgcSiMYEF8MCB +IYHEoiOiAhICNieKUSHAgAv0z3GAAMgEIIGGIX8PPXkPuSV9USKAocokISIK8gvZBCC+jwAAABjK +IeIDmnFRIgChzyXiFgX0USIAos8lYhfpuDHyBCCBDwEAAMAuuc92gAAIQSlmSSGBAGG50mnUfsd2 +gAB0eygWERAsFhUQz3eAAIgKYhePEC7GCLsY4QQggA8AAAAQxH+GJ/8eCb/le2V+BSCTA569L3m5 +GkIAiif/H17w6Lgl8kPAI8Gg4cojQgDKIyEAz3aAALhAKWYEII8PBgAAADG/BCCEDwEAAMAAJ0UQ +z3GAAAhBQSyEAzIhAQECIUEBFiNFAC7BKWYV8FMgwQDPc4AA9EM9eSljBCCDDwEAAMAuu892gAAI +QWtmYbsWIcUAAdlMJQCGjPcKIcAP63IF2IojxglpB6/8iiSDD0AtgwB0e8dzgAB8egATEQAEExUA +BCCAD+8AAN3ig2G5JrgleFIg0wO5GkIBz3agALRHOBQQMAbwhgyv/YogiABxFgCWBCCADw4AAAAx +uIHg9POMJ/+fz3GnAIhJC/LPcIAA0BYagFEgAIIF8u+hAdgC8ADYDqEqcDILYAgKcYog/w9vHhiQ +ax4YkAPYD7jPd6AAyB8THxiQWR5YlVoeWJRbHtiUWB4YlVEigKJKIAAgBvLPcIAAiApqEBAB+73K +ISEADfJGCQAFPocCcQK5brlIIQEAKHDJuAV9anCGIOMPjCAcgNAl4RPPJeITVx5Yk89wgADwYwSQ +geAO9IQWApZQIgADBCKCDwAAAAytuAK6RXgE8IQWAJYWHhiQjCHPj8ohxg/KIsYHyiBmAcojhg8A +ABcByiTGACgGpvzKJSYACNwjAS/+pMChwfHAxggP/hpwz3CAAICIYICkwWhwhiD+AyS4DrgGecK7 +DrsFI00ATsUEJYEfAQAAwC65geIB2sB6BrpWIkIIQCkPBpy/z3CAAIgKCICfv89zgAAIBVEgAIDP +cIAAiBk2eAby0IDEoxGABfDAgAGAxKPpvQOjNPIEJYAfAQAAwC64z3OAAAhBCGNJIIAAYbgCuBR4 +ACCDD4AAdHsoExEALBMVAM92gACICi7DYhaOEAi5TyISAYog/w9kfoYm/x4JvsV5ZXkEJYMfAAAA +EAUjVACev08i0iF6cGHwUSBAos8iYgHPIiEB6L1aciHyQ8UjwKDgyiECAMohIQDPcoAAuEAIYgQl +jh8GAAAAMb4EJYMfAQAAwNhgLrvPdoAACEFrZgJ7FiHFAC7ACGIV8FMlwBDPcYAA9EMdeAhhBCWB +HwEAAMAuuc9ygAAIQSliYbkWIEUAAdhMJQCGjPcKIcAP63IF2IojSgSxBK/8iiSDD0AtgQA0ecdx +gAB8egAREQAEERUAYbgIERMABCWBH+8AAN0muSV4UiDUA892oAC0RwXw1gmv/YogiABxFgCWBCCA +Dw4AAAAxuIHg9fOMI/+vz3GnAIhJDfLPcIAA0BYagFEgAIIF8jwZwAQB2ALwANgOoSpwfghgCKlx +iiD/D28eGJBrHhiQA9kPuc9woADIHxMYWIBZHliVWh5YlFseGJVYHpiUUSCAogDdB/LPcIAAiApq +EA0B+7/KICEAD/KWDsAEz3CgAMgfHoC4YAK4brhIIAAACHHJuSV/inGGIeMPjCEcgNAn4RPPJ+IT +Vx7Yk89xgADwYySRgeEO9IQWApZQIgEDBCKCDwAAAAytuQK6RXkE8IQWAZYWHliQjCDPj8ohxg/K +IsYHyiBmAcojhg8AABcByiTGAHADpvzKJSYASQXP//HADg7v/QO5+nDPcIAAiAofgDV5ACGND4AA +BHyA4DpzpvIJhUV4unAJpRAVFBAUFRAQ5oUcFRYQIBUTEM92oAC0RwAVEhAG8HoIr/2KIIgAcRYA +lgQggA8OAAAAMbiB4PTzjCf/n89xpwCISQvyz3CAANAWGoBRIACCBfLvoQHYAvAA2A6hCnAmDyAI +SnGKIP8Pbx4YkGseGJAD2A+4z3egAMgfEx8YkFkeGJVaHhiUWx6YlVgeWJVRI8CmyiEhAA3yTg3A +BB6HArhCIIEDSCEBAChyyboFI5MgynCGIOMPjCAcgAT0UCPAIwTwTyPAI1ceGJDPcIAA8GMEkIHg +DvSEFgKWUCIAAwQigg8AAAAMrbgCukV4BPCEFgCWFh4YkIwhz4/KIcYPyiLGB8ogZgHKI4YPAAAX +AcokxgAoAqb8yiUmAAARASB+FwCW4LnPIOIA0CDhAH4fGJAvIUMAABlAIADZz3CAAIgKP6AghekE +7/0AH0Ag4HjxwLYM7/0A24DhpcEK8kiBBCKCDwAAADBCIgOAyiNiAAO4FXgAIIIPgAAEfMCC6L5A +xhLyIMDPdYAAuEAyJQYQAIoNZQQmgB8GAAAAMbgAIEUDBfAB2NhwuHCuvq++sL5AxoDjzCEigI30 +z3CAAICIz3OAADBzlhOBAAOICyEAgDfySBODAADZAN9TI00ADyFBA0QjDQNCvYYj/wMPJ08TvGsE +Jw+QANsEeQ8jQwNkeMonARCA4cohwQNMJUCAFPJMJYCAE/JMJcCARPIKIcAP63IF2IojDAZKJAAA +EQGv/AolAAEOuSV+N/DlefzxIYLPc4AAKF2yabR9o2NRI0CCCvIvKAEATiCBBwDYjrg4eAV+I/BM +JUCADvJMJYCAEvJMJcCAFvIKIcAP63IF2IojzAvU8c9wgADwXjZ4AogH8M9wgADwXjZ4A4gOuAV+ +BfCOvo++kL4EJoAfAQAAwC64z3GAAPxDCGGwcFYAJgBAxgohwA/rcgXYiiPMDXEAr/yYdqiBDZEE +JY0fAAAAMCy9hiB/DGG9HHhAJYETESBAgw8mThBAxg30CiHAD+tyBdiKIw0AiiTDDzUAr/y4dc9z +gACAiACDi3GggYYg/gMkuA64Bn2goQCDwrgOuAV9oKEAwM9zgACICgQgjQ8BAADALr1ALQEWTyEE +ByiDTyTEB892gAAIBVEhAIDPcYAAiBm2eQby8IHkpjGBBfDggSGB5KbpuCOmL/Inggi9pXknogQg +gA8BAADALrjPcYAACEEIYUkggABhuAK4FHjHcIAAdHvKgCuAYhOPACDABCcFEM93gABocxEXhhBP +JIQHBCZPAQm/5X2leIonBhaKJf8fUvDouB3yRMAkxqDmyiWCE8olIRDPd4AAuEDOZwQgjw8GAAAA +Mb8EIIEPAQAAwP5mLrnPd4AACEEpZ8J5EvBTIMEAPXnPdYAA9EMtZQQggQ8BAADALrnPdoAACEEp +ZmG5Nn2Y5Yz3CiHAD+tyBdiKI40OiiSDD/kGb/y4dQK9tH3HdYAAfHrAhSGFBCCAD+8AAN2ihUIm +TwAmuOV4UiDAA4onBBIkosWipqIgGgAB6aIHogHYH6PpAe/9pcAA2JC4z3GgAMgfFRkYgM9wgAAw +XEaQW3pPIgMAWhEChjgQgABkelhg2BkAAOB+4HjhxQDbz3KAAAhuFCINAGC1aLUaYiAawgC4HcQQ +z3GAADBcFnkikSgawgDIHcQQcB1EEAHZgBpCAM9xgACgbhV5YKHgf8HF4HjxwOHFCHUZEgE2z3CA +AAhuNHgRiIDgEvICyAGA7bgO8s9wgACAWfAgQADPcYAAgAQUeQCREOAAsaINwAMZyN//AsgB2aAY +QADKCuADqXDPcIAAAAAAgFEgQIES8s9xqqq7u89wnwC4/zagNqA2oDagz3GgAMg7DoGIuA6h/QDP +/fHAggjv/UokAHLPcqAAiCAA3qggQQGH5kDyAILPcYAAMFzPc4AA6ILWeaiJZ4O7Y4Dgz3WAAAhu +1H0j9AAmgB+AAHhu8IiC5wr0cBUPEft/I5GAvyR/cB3EEwfwgecF9CKRcB1EEADZMKjPcKAAyBz6 +gHAVARHkeYgdRBAF8IgVAREwcMP3eGEE8IgdBBB4YIkgzw8EGhAAAeYA2c9wgADogkkA7/0noPHA +2g+P/VEgwIHPcIAACG4CEgI2z3OAABR6GRIBNs92gAAoDzR4MYgQEIQAEfIB4Sh1MhKFAAeTAhsC +AQazGYYB4Bmmz3BBAIMAI6sQ8EAkTQAxEoUAoqu4EAABI6sGsxqGAeAaps9wIQCCALB1xffRB6/9 +BKMZyM91gAAobghlAeAEqwGCUSAAgbCKQfIvJEgAz3eAAEQyJ4cZyIDh0ooPeATyBYcl8PJtz3GA +AChd9H/hYfa5SSDAAAjyz3GAAPBetnkhiQPwANnHcIAA8F62eASICCYOEAgmQRCAcUkhwQMWbTV4 +z3GAAPBfAGHPcYAACF62ec91gACICr2FIYGleQQhgQ8AAAAIJngC8AOCAqOYEoAAKIsQcQfyANgE +q2DYGLim8QDYnbik8eHF4cbPcKAAFAQD2SOgGcjPcoAAFHphks9xgAAIbsSKFCENAGi1ACCDD4AA +KG4w4cCrYoIVeQaSYKECEgM2uB0EEASCoBMBAIYhww8leKAbAADBxuB/wcUZEgI2BCC+j2AAAADP +c4AACG5Ue8dygAB4bghxBvICyByQUSCAggryBCGBD2EAAADXcQEAAAAG9ADYALMB2B7wEMxRIMCB +AhIBNg3yMhGBAAGLMHAE9ADYAavy8QHgAasL8DERgQAAizBwBfQA2ACr5vEB4ACrAtjgfxCq8cDa +Da/9BNkIdRkSDjYG2BkaGDDPd6AAFAQKp89wgACQRPINT/0AheoNb/0E2QGF4g1v/TjZIoWA4Qby +AYUAkBBxzPcKIcAP63IF2HXbSiRAAMECb/y4c7oNb/0DhQGFQoUgkAWFrg1v/UJ5yqfVBa/9GRqY +M+B4z3GAACAF4H8DoeB48cBWDY/9CiYAkMohwQ/KIsEHyiOBDwAArQAF2CPyAYaA4MohwQ/KIsEH +yiOBDwAArgDKIGEBF/IwiM9ygAAoXQK5NHknYqKALb8BhYDgwL8E8gCFgOAM9AohwA/rcgXYtdtK +JEAAKQJv/LhzUSCAwQX0XgvABoDgB/IAhYDZKKABhUB4KPABhiCQIMgQccohzQ/KIs0HyiONDwAA +wgAF2CH3yXC2/wGF0//PcIAA0KCELwsaiiEQADAgQA4YeQDIJngAGhgwz3CAAIBZ5qCaDC/96XDp +BI/9z3GAACAFI4HgfyCg8cDhxQISATaigYoh/w8AGlgwIIWWC2/9JNoBhYDg4iACAMkEj/3gePHA +Sgyv/QbYGRIPNhkaGDDPdqAAFAQKpgmGgOAA3RPyjg2AAwmGgOAN8iQWBRAKIcAP63IF2IojRANJ +AW/8SiRAAIog/w/qpgAaGDDPcaAA0BsQgc9ygAAIboa4EKETgZC4E6EdioDgGRrYMwzyz3CAAIBZ +BoDPcYAAgAQUeQCREOAAsaayrrImGkIDJQSv/cQaRAPxwOHFCHXPcIAAgFlGgM9wgACMnoQqCwoA +IEIOz3CAANxaAIBRIMCAocEU8hZpz3OAAPBfAGNRIECCDPTPcIAA8F42eFuKAoiJug64RXgG8BII +r/2LcADAAKXVA6/9ocDPcoAA3ApUillhMHlBaVBwxPYieBB4A/AC2M9xoADIHx6hENgOoQHYFRkY +gOB+4HjxwCYLj/0A3891oADQD/WlA94S8OB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +Yb6MJv+f7vUD2Bqlz3CAANwK76gB2BWlQQOP/fHA1gqv/QXYAN0LuKlx3f/PcYAAMHMege64WvId +gVEgAIBW8o4OD/wA2Zy5z3CgANAbMKAB2c9wpACYQDygBCC+zzAAAAAB5colIhBRIwDAJ/RRIEDF +BfJRIYDDIvJRIMDFDvJRIYDDCvLPcKoAAAQBgIYgPwuD4BTyzv8g3892oADIH/CmAdhDHhgQANj2 +Dy/9jbjxpoTlpgfF/wLwxf9RIADHANkP8gDaz3CgANAbnLpQoM9wgAC0BECAEIIB4BCiz3CkAJhA +PKA28OYND/xRIEDFMPRRIADFAeXKJSIQUSMAwM92oADIHyDfDfTwpgHYQx4YEADYig8v/Y248aaE +5Vr35vHPdaAA0A8A2BWl8KYB2EMeGBAA2GoPL/2NuPGmA9gapc9xgADcCgDYD6kB2BWlCQKP/fHA +ngmP/QDfz3agANAP9aYD3RLw4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HhhvYwl/5/u +9QPYGqbPcIAA3ArvqAHYFabPcYAAMHMdgYC4HaGc/4INwAGpAY/94HjxwOHFz3KgANAPsILPcIAA +3AoviDB1ANsF9APZOqJvqALw3/+NAY/9ANvPcqAAxCeKIBgIPBrAgM9xoADIHw6hgBEAAFEgQIDP +cIAA5HsN8kISAoYEIr6PAMAAAAXyQYCA4gPyQqCAGcAA4H9hoOB4EMwEIL6PAAAoQEXy47gh8hES +AjeA2M9xgAD4ZOu6EBocMAbyGIEB4BihBfAQgQHgEKFRIsCAB/QA2c9woAAsIC+gEcxGIIAC4H8R +GhwwUSBAgRfyiiAEABAaHDDPcYAA+GQPgQHgD6ERzADZRiCAAhEaHDDPcKAALCAvoOB+BNgQGhww +z3GAACgPHYEB4OB/HaHgfvHAMgiP/QDdINjPdoAAXHlAJhAVAgigBACmz3CgAMgfAdkzoFiAeYDP +d6AAMBA1gPgQAADhh893oAAMJAIiAoACeeeHQaYjps9ygACICgMjQwPPcYAAMHNipkwZRAMUklAZ +RAPoggm2vbZTJwAQCLbPcqUACAxggk4ZRANTI0UBUyNCAEgZQgGD4sohwQ/KIsEHyiOBDwAAVg3K +JIEPAAD+AMwEIfzKIGEBBCOCDwAAAOAtupYZggA+ge65ZaYM8gS6gbpFeAi2B9gH8BUgDCCgpAPw +BNgB4Ijguvfrv0gNQv6pd1EggMW68oDnuPTPcIAAMHM+gAQhgQ8AAABABCGATwAAAEAQcQHfyici +EMolYhDPcYAA3AoPiQHgD3gPqc9xoAC0DzeBMHAA3gj0z3CgAKggBoCMIIOOzPcA31f/z3CAALQE +IIAB3QiBAeAIoYDnhvLPcYAAXHkFgc9ypACQQXWCBCCADwAAAOBBKEQDFoJRJACAuHAIoc9wgAAw +c2ehBfJMGMQACPBMGIQDBCODD///AABnoVEkQIAF8jC7ThjEAAXwThiEA3B7Z6FRJICABfJQGEQB +CPBQGIQDBCWDD///AABooU2CRqEEIoIPAAAA/im6UhiEAB6A7rgj8s9wqgAABASACaHPcIAAwHlA +iIDiQCAEATLygOJaAC4AAhCFAPQkgwMV2BO48CDDAM9wgACYedV4AeZQdmCgtPcb8M9wgADYeUCI +gOJAIAQBFvKA4gIQhQDP9/QkgwMp2BK48CDDAM9wgACYedV4AeZQdmCgs/dBqQIZQgGA5xL0BCC+ +z2AAAAAM9M9wgAC0BCCAAd0BgWG4AaEHgQHgB6FRIwDADvIB3QT/z3CAALQEIIAA3wGBYbgBoQeB +AeAHoSoIL/3y2AQgvs+AAQAAzCcikMwlIZAY889woAAwEAOAgOAA2Qryz3CAALQEQIAB3Sh3DIIB +4AyigOUV8gLZz3CgAMgcKqAi/89wgAAwc0DZPaAQzIYg+Y8F9ADYj7gQGhwwlQVv/elw4cUw2wDd +z3CgAMgcaaAD2s9xoADMFyEZmIBOoaegaqDgf8HF8cAODU/9z3GAACgPDoEB4A6hz3GgAMQnGREA +hoDgAN0E8gLYEBkYgM92oADUC7emBP/PcYAAMHMdgYe4HaHo/xCGgOAl8gzwgOUG9M9woAAsILCA +Sg/v/IoghAtRIADE9PWA5Q3yz3CgACwgEIDPcoAAKA8vgqJ4MHDD9w+iA9nPcKAA1AsxoLn+8QRP +/QohwA/rcgXYz3MAAJwJSiQAAKEBL/wKJQABUSEAxvHAHfTPcKAADCQHgIDgF/LPcIAArHMLgM9x +oADIH2TgHqEQ2A6hAdgVGRiA3gkv/QPYUSMAwCAPwv/RwOB+4HjxwB4MT/3PdoAAMHM9hi8mSPAr +9OC4C/SCuT2mz3GAALQEQIEjggHhI6JRIECAHYYK9IS4HabPcIAAtAQggASBAeAEoc9woAAMJAOA +USDAgB2GC/KEuB2mz3CAALQEIIAFgQHgBaE9hi8mSPAA3Q70CiHAD+tyBdj024u7iiSDD9UAL/xK +JQAAz3egANAPERcAloDgePLguQnyz3CAALQEIIACgQHgAqEJ8FEhAIEV8sP/HYZRIMCBZPTPcKAA +xCcZEACGgOAH8gLZz3CgAJAjPaBs/hrwuv8dhlEgwIFS9FmHBvAAEQBQAeWvfUEqgAAQdbr3ANkG +8AARgFAB4S95UyJAABBxuvcA3QzwgOUG9M9woAAsILCAmg3v/IoghAtRIADE9PWA5QDbDvLPcKAA +LCAQgM9ygAAoDy+CongwcML3D6ID2c9woADUCzGggv7PcIAAMHMegPO4CvLPcIAA3IJrqM9wgACc +gmywz3AAAP8/z3GgAAwkAaEb2AShXf8FA0/9CiHAD+tyz3MAADgJBdh28fHA4cVQ3QDaz3OgAMgf +r6NeowIgQgBeowHaFRuYgEDaTqMEIL7PAAIAEAwPgf/VAk/94HjxwFYKT/3PcIAAMHMxgFEhQIIR +8s9xgADcCi6JRBCCAER5USGAgEjayiKBDwAAkAAC8A7aANvPcaAAqCAngagQDQBZYbFxwiVFEMol +5hKweArZrP1O/s9wgADAGwCQz3agAMQnUSAAgQTyjCUDkgT3AN8V8M9woAC0D3ygz3CrAKD/eqCm +DWAHANgZFgCWgOAE8gLYEB4YkAHfGRYAloDgP/RRIQDGPfTPcIAAMHMRgFEgAIIF8g/MYbgPGhww +AN4L8IDmBfTPcKAALCDQgB4M7/yKIIQLUSAAxPX1gObPcYAAKA8K8s9woAAsIBCAT4HCeFBwwvcP +oQPaz3CgANQLUaATgWq9AeAToRSBuGAUofIO7/wB2OYKL/8B2Of9oQFv/elw8cAyCW/9wNjPcoAA +XHmhihwaAjDSbUTmz3GgANQLGIEA20IgAAiA4MogzAAQdtz3z3GfALj/GIGQuBihGIGwuBihz3CA +ALQEIIAFgQHgBaHPcYAAMHMdgYS4HaEA2C7/ANgx8APmBCaOHwAA/P+XvuxwwKAHyOx2AKYPzEok +wHMB4BB4j7gQfg8aHDDPcKAAiCTeoADYqCAAAvAiDwDsduCmAeCA5QDay/fPcIAAmHnwII4A7HDA +oAHisXK3922hAdjZAE/94HjxwOHFz3GAADBzdoHB2BwaAjAM489woADUCxiAANpCIAAIgODKIIwA +jOBZ989ynwC4/xiCkLgYohiCsLgYos9wgAC0BECABYIB4AWiHYGEuB2hANj+/gDYI/DPcoAAiAoY +igHdhuDCJUETGCNAAwPgBCCADwAA/P+XuJ24n7jscwCjB8jscwCjGIo2gYbgAdjCIAEAGCEBAOxw +IKAB2EUAT/3gePHA4cXPcoAAMHMWgpjgz3GAAAR8BfJUEoAAgOAE8hmCuoIE8BuCvIJRgs9z/v// +P2R4pHsEIoIPAAAAEEV4AKEA2AGhZXpKoQ7aS6HPcYAA7J3CCk//z3CAAESbAIBRIECACPLPcYAA +1KCqCm//AdjNBw/98cBWDy/9G9jPcaAADCSjgQShAN4L8IDmBfTPcKAALCDQgMYJ7/yKIIQLUSAA +xPX1gOYO8s9woAAsIBCAz3KAACgPL4LCeDBwwvcPogPZz3CgANQLMaCN/eS9z3agAMQnEvLPcIAA +tAQggBGBAeARoVH9GRYAloDgBPIC2BAeGJBp/iPwUhYAllMgQQCD4dEl4ZAE8qj+GfDPcIAAqQgB +2SCoz3CAALQEQIAGggHgBqLPcIAAMHMegFEgwIEF8s9wgABwBSCg/QYP/eB48cCKDi/9ANrPcAAA +/z/PdaAAxCcTHRiQG9gWHRiQAdgQHRiQz3aAADBzEYbqDKABNoaoHgAQfP4dhue4A/IA2B/wLRUB +llaGMHIH8oC4HaYA2Ib+9fEEJYFfAADwLx6GJXgephEVAJbguAbyz3AAAHCgB/DpuAfyz3AAAFSe +eQYP/VEgwIAb8gjYEx0YkOn+gODX9QLYPB0AkCEVAZbPcIAA5HshoBEVAJZRIICAB/Rd/h2GUSDA +gcP1ERUFllElgIAM9AohwA/rcgXYiiMFD+0C7/uKJIMPBNgTHRiQlv+v8eB48cCWDQ/9z3GAAAAA +AIFRIACAG/IBgVEgAIBA2M8g4gfKIIEPAADQAM8g4QfPcp8AuP8dogSBAeDTuAShBSCAD9D+AAAW +ogDZz3KAADBzPaI+olQaQgA/ooDYlBoCAIAaQACoGkAAz3CAAEiBOaDPcIAA8HsgoM9wgACAmiKg +z3CgAAQlNKAD/VEhgMPPdoAAMHPPcoAAAGTPcYAAtATPdYAAiAoV8gDYjrgeplUiQAUAoRuVBtoc +th2Vkh4EEIoghA4ets9woADIHEmgC/AEagChGpUcthyVkh4EEE4VABEetkCBAIIB4ACiIIEBgQHg +AaH62ADZVvwd/YDgAAcBAM9woAAMJM9xAAD/PyGgz3OgANAPERMAhoDgDfIKIcAP63IF2IojDQqK +JIMPrQHv+7hzAdgRGxiAaBWBEByWAiBEAB6G7rgvJAgB2vIA2EAeBBDPcaoAAAQIEQUAz3ClAAgM +AIAEJYIPAAAA/yi6BCCADwAAAOAbeIm6BXoIhQQgvo8ABgAAUaYD8oy6UabPd4AAXHlNpzAfQBEA +gUQWghCU4gqnGfIG9oriGfQjuA7wt+IO8u7iE/RFKP4CQSnAcFElwIHCIGIAANoL8EUo/gJBKQBx ++vEiuPjxANgB2hamIYEctyun5LnKImIA4bnKImEAuHGGJf4PQS0FARAXBhFJHkIRBSZBAY7gKLdd +ppj313AAADAJFPdVFYEQgOEM8hkTAYZCIQEISCEBAFYgTwLxcYb3gBMBADBwBPKAul2mUSIAgJ4C +AgCIcADZM/5iFYMQRBaBEEQhBQwEI0IARCIAAUItBQGgcFMgRADPcIAApJ4yIAABibgbpmwWjRBJ +FoEQBCXAEIYl/xNEvSR4uGDPdYAAsEH0JQAQz3eAAIyhXh4EEDInABGJuBymcBaAEAR7hiD/A0S4 +JHt4YPQlABBEeWAeBBARhqBxz3KAANBB9CJDABmmz3KAAOBB9CJBAIoexBAapowexBCOHkQQkB5E +EADYcwQgAEoeAhDPcKYACAQBgAQggA8wAAAANLhRIEDGQB4EEEAWAREM9M9woACoIAiAGWEweSYP +b/+IcATwiHD6/QQggE+AAQAA13AAAQAAANkW9AHYSh4CEJYWgBDPcoAAXHlAHkQQSR5CEAS4NqYp +ok8gQQIIkiV4CLK/8EkeQhDPcKYAjAM9gFEgwMcEIYIPOAAAAEEqwASWHgIQBCGADwAAAPAsuCW6 +RXgRps92gAAwcwXyEYaMuBGmUyHNAkQWhBC2plEkAIDRIeKHANgD9AHYz3KAAFx5lhaDECmiKJIE +u2V5KLJxhryyUyTBADx5z3eAAJSeL2cdpvumbBaPEMO/LyXBA893gAAsevQnTxFtol4exBPPd4AA +fKEvZ3mm/KZwFo8Qw78vJcEDz3eAACx69CdPEXqmYB7EE893gABMevQnRRDPd4AAXHr0J0EQih5E +EYweRBGOHkQQkB5EEM9xpgCMAz2BBCGPDwEAAAAwv0oewhMpokoWgRCA4QDbEvJMJECDBPKAuB2m +USAAgAbyL/CuC6/8iiBQBFEgAMb68yvwjuVAAAUAz3KAAIgKnBIBADB1GPdVEoEAgOHPcqAA0A8M +8hkSAYZCIQEIgOHKIcwAViVDEjBzBveAEgEAMHUE8oC4HaZRIACABfIA2Cj9dQIAAM92gAAwc0oW +gBCA4HICAQDPcaYA1AQsEQCANBERgDgRD4DLERIGKnHGuelyhiL9Dwa6RXkqcoYi/Q8EukV5BCCC +DwIAAAAnukV5RCcCHA26RXnpcoYi8w8EIIAPOAAAAA66RXkluCV4RCeBEBS5JXiIuEQnARJBKcGA +UiBABRGmVB5CEMohgg8AAP//yiGBDwAAEB8acTaGP7YEIYEv/wMA/yi5NqaiDmABANryv6geABA7 +8kQWgxAxhqDj0SHhgjXyBCGNjwAAAAEH8s9ygAC4QGpigeIJ9gQhgg8AAAAk13IAAAAkIfIEIYQP +BgAAAEEsQgSC4jIADQCC4gr0gOUV8s9ygAC4QGpiguIP9IDlBPLM4wv2VoYScsoijg8BAIgNzCCO +gM3313ABAIgNx/fPcYAAKA8VgQHgFaEB3SDwgOXPcIAAuEBqYAbygeLE9kwkAIAV9M9wgADwYwaQ +EHIP9uu5C/LPcIAAiAoIgAQgvo8ABgAAA/IA3QLwAt1UFoEQz3CAAFx5KBhABAe5SJCIuUV5KLA2 +hjAYgAQ8sDGG66AEJ48fCAACANd3CAAAAC2g2AyhCcogQQMWhoDgvaYF9LoMgAlU8M93gACYBACH +gOAf8lQWgBCA4BvyEYYA2Y25Zg1gASDaI5cCIE0AEYY2hlYNYAEg2hB1CHJK90AtARTPcAAAeB7W +Cq/8RXm9hs9wgADcCgGIgOAO8s9woADQDxkQAIZCIAAISCAAADaGSOEQcQr3z3CgANAPgBAAADaG +EHEE8oC9vaZTJX6QFPJRJQCQz3GAAPhkBvIAgQHgmwXv/wChCYEB4Amh/vzPcKAA1AtO8PYIz/36 +8ULYz3WgAMQnvx0YkBaGjuAN9BHMUyBAgAnyz3CAAIgKCYBRIECAEPI5/YDg5PNp/YDg4PMQzIYg +/4UF8gLIAYD9uALyjf3c/QomAJAo9ADdDPCA5Qb0z3CgACwgsIByCK/8iiCEC1EgAMT09YDlDfLP +cKAALCAQgM9ygAAoDy+CongwcMP3D6ID2c9woADUCzGgANkwoPUFz/wxFQCWdgqABkB+qPHxwOHF +CHXPcIAArHMLgM9xoADIH2TgHqEQ2A6hAdgVGRiABfAGCK/8ZdgBhYDgBfRRIwDA+PMBhcG4g+AP +9M9wgACpCAHZIKjPcIAAtAQggAaBAeAGoQDYFvABhVEgAIAH9M9xgAAwcx2BgrgdoQGFUSBAgAf0 +z3GAADBzHYGEuB2hAdiJBc/88cDPcIAA2HkqCK/8GNnPcIAAwHkeCK/8GNnTAI//4HihwfHAxgzv +/JhxOnDPcYAAAAAAgRpyUSDAgaHBuHMb8gGBUSDAgUDYzyDiB8oggQ8AANAAzyDhB89ynwC4/x2i +BIEB4NO4BKEFIIAP0P4AABaiz3GAAAiDJoEA2IHhAdnAeUwhAKBAKRMDKfIqcIYg/ACMIAKFz3GA +ADBzEPTPcIAARAUAgFEggIAG8iDejhEPAQnwmN6KEQ8BBfBeEQ8BDt7PdYAA8HsAheC4wCYiEdB6 +8H9KJkAgCfDPdYAA8HsApdpwCHYIdwhyz3GAAICaIIGD4Qj0z3GAAICaI4FRIcCAC/RKIgAgCiWA +JAongCQKJIAkePDPcYAAgJrAEQIAOBKBADcSjwA0EoMACLklfzkSgQAIuxC5JX86EoEAGLklfzMS +gQAQ5/B/ZXk1EoMAELtleTYSgwDPcqAA/EQYu2V5QCEUAV2CANlRIoCBzCUigAnyLyIIBVpx2nG6 +cfpxQvBPI9MjiHHGuVEkwILPcoAAKEP0IkEABPJcaTR6UHkiuUNpz3EAAPz/RHnPcoAAvHNIis9z +gAAoXQK6VHpCYwTn8rrwfwXyO3kE5/B/QCTCIc9zAAD8/0R7CCHCAAIi1wBRIACAwCYhEWduBCOD +DwAA/P8IIcAAAiDVABpiUHqKIgIgAhAAIUAnARUQcUf24nhIIAAAEHgC8ADYQMAvIIgEiHHpcyIN +oAFKJAAACiAAsMolIhDKICIAwvRMIgCgGPLPcKAA9AfNoM9wgACAmsAQAQBbiRqJCLpFeAS1XYkc +iQi6RXgFtQCFgbgApQTwANgCpUwmAKCU8gCFUSAAgDryz3CAAGhzTIjPcIAAuEAyIIQAH9lMJACA +ANrb989wAwAUAFZ4z3OjALD/UOBgYM92AwAYAFZ+UOZjZi8oAQAB4i8rwQACezBzyiHFAJByp/dA +LEABQiAACBlhz3CAACxEKGAhhU8j0yMJuAV5AoUleAKlBSNAJA1xALENcQDAjCECpQCxDBABIA1w +IKAQEAEhDXAgsBTyjCEDoRvyjCEDpSHyCiHAD+tyBdjPcwAACAyKJIMPEQdv+7hzz3CAALQEIIAP +gQHgD6F2CiABCnAQ8M9wgAC0BCCADoEB4A6hCPDPcIAAtAQggA2BAeANoQCFgOAG8iKFDXAgoADY +AKVMIgCgz3GgAPQHANgS8gehAdgLoQPYCKFMGUAFAdgD8ADYinHqcgpzMg9gCQAUBDDPcqAA9AcA +2SSiAd2A4AHYHg9gCcB4AMDPcaAAyB/4EQIA+GBCeEggAABfgRB4UHBIAAUADBACIM9wgADke0Kg +oNgPoQDYH6HPcoAA3ArPcIAAMHNVihyQQngAwkwgALBYYB+hAtgVGRiABvJRIEDGINgD8oDYDqGM +IQOlBvTPcIAAMHMckAnwjCEDoQj0z3CAAKhzDZBCDm//ANn6Dw//EMyGIPmPC/SMIQOhANjPIKED +yiAiARAaHDDPcIAAAAAAgFEgwIEH8s9xnwC4/wDYHaHPcYAA8HsA2AChqXAI3J8A7/yhwOB48cBy +CO/8ANkIdQGAwbiD4MogQSDKIEEABfKpcLH+SiBAIIHgEfIQhVEggIFH8hCFz3aAADBzUSDAgRzy +z3CAANwKAoga8AHbAN878ADfVSZAGulxz3OAALAy8gnv/pDaQCUAEpweABAA2AW1BNsp8AWFJoWu +CYAAUSDAgZQeAhAH8h2Glbgdph6Gl7geph+GBCC+jxBwAADKJyIQ6PWcuB+mz3CAAESbAIBRIECA +0PMQhe24zPMB38vxAN/pc89ygAAwc1QSjgDPcaAA9CaA5s9wgADkexH0z3aAAI5z9CbOE1yS2mLP +doAA3ArVjsJ6ELqAugLwAtpDoSWFTCAAoCGgDvTPcIAAqQgB2SCoz3CAALQEIIAGgQHgBqGSDg// +tQev/Ghw4HjxwEoPr/yQ2aLBCHVBwSGFwbmD4QDYyiABIAbyqXBn/kogQCDPcaAALCAmgYHgAN8w +eRzyEIVRIICBM/LPdoAAMHMclhBxyfYlhc9wgADkewKAEHGs9BCFUSDAgQjyz3CAANwKAogI8AHY +Q/AFhSaFigiAAD+GBCG+jxBwAACUHgIQD/TPcYAARJsggVEhQIBI8jCF7blG8gHfQMdE8ADfJPCL +cYDhBPIC22ChI4CA4oO5I6AE8iCCprkgoiwWAQAkoAwWAQAloADBVSZAGs9zgAC0Mk4I7/4Bwh+G +nrgfpkAlABKcHgAQng0P/wDYz3aAADBzVBaCEIDiz3GgAPQmXvTPcoAAjnP0IsMDXJZ6Ys9zgADc +CnWLYnoQuoC6UfBAxwDfUSDAgdD1bYUFhc9wgACAmoHCBCODD8AAAAAigDa7ESHAgEAlBhJAIAQL +IvIllRwQBwBCIQUE9CTDAAgnQQFwcdb2z3GgACwgL4GA4RD0z3GgACwgZoE8lnBxJgfG/89xgADk +e2KBJYAwc4vzI4BRIcCAlPMA2s9xoAD8RJ66QaEjgKO5I6CK8c9wgAC0BCCAC4EB4Auhc/EC2kOh +RYVMIACgz3GAAOR7QaEO9M9xgACpCAHaQKnPcYAAtARAgSaCAeEmosUFr/yiwOB48cBeDY/8CHUR +zFMgQIAK8gYSATYA2JgRAQBmDK/+CHIBhcG4g+DKJyEQyiPBAwbyqXDm/QhzAd+B48omYRA08hCF +USCAgQX0AN7JcS3wEMxRIMCAIfIRzFMgQIAS9BnIAdoAIIEPgACIbs9wgABcIxKIQKlRIACAiA5i +/sogggAQ2BAaHDDPcYAA+GQSgQHgEqEI29rxz3GAAHxkC4EA3gHgC6EB2QLYz3KgAPQmA6JDhYDn +z3CAAOR7QaAN9M9wgACpCAHaQKjPcIAAtARAgAaCAeAGooDhCfIA2J64z3GgAPxEAaEA2AWhrgsP +/9kEr/wFJsAQ4HjxwGoMj/wIdgGAwbiD4ADdyiBBAwTyyXCu/QHdgeAA2SjyEIZRIICBJPIQzM9y +gAAAZFEgQIEZ8kDYEBocMFASAAYB4FAaGAAZyM9ygAAIbhR6IKoCEgE2ANiYEQEAKguv/ghyBvCk +EgAAAeCkGgAAAtnPcKAA9CYjoCOGgOXPcIAA5HshoA70z3CAAKkIAdkgqM9wgAC0BCCABoEB4Aah +/goP/zEEr/wA2OB48cDPcoAAMHNUEoEAgOEU9DySz3KAANwKVIpCeRC5RSFDAc9xoAD0JmOhANrP +cYAA5HtBoXz9geDKIGEABPK2Cg//ANhTBw//QSkCAcO6z3OAAORDS2NEkAQigg8AAACA13IAAACA +AdrAelV7QZAE4lBzDPKMIQKEj/TPcoAAMHNWgowiAoaJ9IwhAowd8g32jCECgD3yjCEChF3yjCEC +iHv0pQLP/4whA4QR8gX2jCEDgHP0UPGMIQOIzCGCjwAA8ABr9J7xqQPP/89ygAAAACCCUSEAgRvy +IYJRIQCBQNnPIeIHyiGBDwAA0ADPIeEHz3OfALj/PaMkggHh07kkogUhgQ/Q/gAANqNVBc//z3OA +AAAAIINRIQCBG/Ihg1EhAIFA2c8h4gfKIYEPAADQAM8h4QfPcp8AuP89oiSDAeHTuSSjBSGBD9D+ +AAA2okEFgADPcoAAAAAgglEhAIEb8iGCUSEAgUDZzyHiB8ohgQ8AANAAzyHhB89znwC4/z2jJIIB +4dO5JKIFIYEP0P4AADajeQeAABDY4H7gePHAIgqP/M91gAAwcx+FBCC+jwBwAABK8i8pAQDPcIAA +7AT0IEAApBUBEADenBUCEIK4yXM//YDgOPIfhf64MPLPdYAAXCMQjS6NEHEs8hKNUSDAgCj0MK1q +C2/+A9hRIADDGvQA2Z65z3CgAPxEIaAwjYYh/wFDuRC5TyHCBs9xgAB0iCCJn7qA4QHZwHkPuUV5 +LaASjYS4Eq0G8M9wgACQgsCo7g3AAOUBj/zxwOHFDg0v/wDdz3GAADBzHYFRIMCBYPTPcKAABCWi +gAQljR//AF9vUyWAEIfgR/RRIoDTQ/Iegfq4QfQEIL6PAB4AAA7yB/DPcAAA+Qm6Cw/8USKAwPr1 +USIAwM8lYhHPcYAAMHMegfm4zyUiEs8lIhPPJeISzyWiEyH0+7gS8oi9ib2NvU8lwBK9gY64BCWN +HwIAAABSJU0UKr0FfQ/w/LjFJYIfAAAABc8l4hLPJaITxSWBHwAAAAfPcIAAvHMIiMS4GLhRIIDE +BX1QDiL8yiAiCBUBr/ypcOB48cAPEgE3AeEweY+5DxpcMM9xoADQDw4ZGIAgEQGGz3GAAIgKKIHr +uQ3yUSAAgQv0+g4P/c9wgAAYfTTZWgwv/MTaMwQP/+B48cBKCK/8iiEIAM9woAAMJCGgz3aAANxz +5JbpcKIPoAKGIPwDGnDJcOlxhiH8Ayz/CHeA/0QnfpQA3Q/yUScAkQfyz3GAADBzHYGAuB2hAYbi +Cw//cfBMIACgFvKg/89xgAAwcz2BUSHAgWf00/8j8IDlBvTPcKAALCCwgGYKL/yKIIQLUSAAxPT1 +gOUN8s9woAAsIBCAz3KAACgPL4KieDBww/cPogPZz3CgANQLMaAA3VEnwJAH8s9wgADweRoOgAHP +dqAAxCcRFgCWUSCAgBn0HgsP/89wgAAwcx2AUSDAgSv0ERYFllElgIAL9AohwA/rcgXYiiOID40E +L/uKJIMPBNgTHhiQG9gWHhiQz3aAAEiBGYaA4ATy1grAALmmz3CAAAAAAIBRIACBBfLPcJ8AuP+9 +oHkHT/zgePHAFg9v/E3Yz3KgAMQnLRIOhgm4GhoYgM9wgACEcyCIgOGhwQbyAdvPcaAA1AtyoQTZ +EBpYgE1xhiHzD4whDIAB2cB5OWE0eQCIHuGA4MolQRAE8kAhDQMifgfwz3AAAPEPRgkP/FEggMQF +9FEhAMb2889xoADQDxAZWIMlEQCGYMAlEQCGD3kBHAIwABQAMYwg2IHMIIKPAAAHCMogIgAH9Ijh +AdjAeDIMIAkubs9yoADEJxoSAYYEIYEP////ABoaWIAREgGG67kJ8gDZi7kTGliAGtkZGliAqQZv +/KHA8cAuDk/8z3WAADBzz3CgAAwkPIBWhaHBAiJAAGS4EHiGHQQQEHLKIc4PyiLOB8ogbgHKI44P +AAD7BMokLgAsAy77yiUOAQLIAYD9uAnyLyCHCowgAoYF9B6FnrgepQDZz3CgAAwkPBAQAM9woADU +CxiAQiAACIDgyiBMAPzgWvfPcZ8AuP8YgZC4GKEYgbC4GKHPcIAAtAQggAWBAeAFoR2FhLgdpXIJ +L/8A2NkDAABaDYACgOAKAiEAmB0AEM9xgAAAAACB67gZ8gGB67hA2M8g4gfKIIEPAADQAM8g4QfP +cp8AuP8dogSBAeDTuAShBSCAD9D+AAAWolElwNHPdoAAiAoE8lYWgBAG8AOF0g4gACSFPoWUHQIQ +RCEADKDgB/RRJcDSBfSA2JQdAhCUFYAQUSDAgQTyl7k+pVEhgIEp8hSVUSBAgSX0YguABYDgIfTP +cKAALCAPgIDgBfICyAGA/bgX8h6FkLgepc9wgABEmwCAUSBAgAXyUSVA0wHZAvQA2Ytwz3OAALAy +eg5v/pDaz3CAADBzlBCBAEApAgaGIf0PUiHBAUW5RXnPcqAAiCQwommG47tegATy6boE8gDZA/AB +2VEjAIHRImKCANjKIGIA97oleA94FvRRIoDTEvKA4BD0hiL/3Az0z3CAADBzAYBRIACABPKiDYAC +BPCeDoACz3WAADBzHoXzuB7yBNnPcKAAkCM9oAbwqg7v+4ogFgNRIIDEBPRRIQDG+PPPdYAAMHOG +FQARz3GAAIgK2gogAy+RFvAAlQQggA8AAMyA13AAAMiAB/QLhVEgAIAD8jD/BvAE2c9woACQIz2g +AtjPd6AAxCc8HwCQlBWAEM9xgADke1EgwIEEGQAEBfIdhZW4HaWL/gh2HYVRIMCB5AECAFMmQBCD +4Af0FRcAllEgwIBa8mIP7/7JcOTwz3GAAHxkDYEA3QHgDaEL8IDlBfTPcKAALCCwgO4N7/uKIIQL +USAAxPX1gOUO8s9woAAsIBCAz3KAACgPL4KieDBwwvcPogPZz3CgANQLMaAQ2M91oADEJxAdGJAC +2DwdAJDPcYAA5HuuDu/+BBkABM9wgAAwcx2AUSDAgab0ERUFllElgIAL9AohwA/rcgXYiiNWDxkA +L/uKJIMPBNgTHRiQG9gWHRiQkPAQzFEgwIA+hQvyBCGADwBAQADXcABAQAAD9Ji5PqXwuQryAMHU +2Klytg1v/wHbgOAMD4IAz3CAAKkIAd/gqM9wgAC0BCCABoEB4AahHoXzuLwOAgMehfC4qAnB/h6F +USDAgQfyAdnPcIAAcAUgoM9xoADIHADYB6Ew2AqhyXBu/gLIAYD9uBbyHoX4uBLyENgQGhwwz3CA +APB5ugiAARnIACCBD4AAiG4eheCpuLgepQCVhiD8AIwgAoAo9LYMAAOA4CT0AN0M8IDlBvTPcKAA +LCCwgIoM7/uKIIQLUSAAxPT1gOUN8s9woAAsIBCAz3KAACgPL4KieBBxQ/cPogPZz3CgANQLMaDP +cYAAMHMegfO4BvQAkQoOIAQ0kQ0Cb/yhwOB4z3KAANwKVIpZYTB5QWlQcMT2IngQeAPwAtjPcaAA +yB8foYogGAgOoQLYFRkYgOB+4HjgeAokgPAFIEQA4CDBB0Qk/oBBKsQAhAACAC8kAvFCIQEBQiAD +AeggogQEEQQCBBEFAgQRBgIEEQcCBBsIAQQbSAEEG4gBBBvIASwAJQBEIj6BPAAiAEQi/IBAIcEA +4CDBB0AjwwCoIIABARGEAgEbCgEgIMAHBBEEAgQRBQIEGwgB1Afh/wQbSAFEIvyABBEEAskH7/8E +GwgBQiFBAEIgQwCoIIABARGEAgEbCgEgIMAH8cDGCG/8ANjPdYAATH1KJAB0gN6oIAAFCHEB4E8g +wgEWJUMQR6uKIggAArk0ecdxgAAoXUChANpCscapwNh/HQIQz3WAADAFwK3PcIAAzH2A2UYL7/so +csGtz3CAANwK0QBv/MKo4HiiwfHAVghv/JhyRcFBKAECQSgDBAd5J3vGu8dzgADMfSCL57kS9BQU +DjHPcoAATH0WIk0A4IXxcAT04pXRdwjyJ43nuWdt8/MA2CDwxo2A5gb0gN/PcIAAMAXhqM9wgADc +CuKI8XYE9IDewqjGjTZ6AByAAweNh7kAq89wgAAwBWCIIKgB2GeqDNw7AE/84HjxwMIPD/zPcYAA +lEQhgaPBQsHPcYAAqAQVIREAABENIIDlLyhBA04gjgdM8vJu9H/Hd4AAKF0Gj89xgABMfRZ5AIEi +kY7mCBxEMMogYQAF8otyAsHH/4DgLfIA2M9xgABIBUCBDyCAAy8gCiAEIICgAKEH9IDipA0iBMog +IgjPeAIJYAAQ2QDYiiEIAAARAiACtyCnz3GAAAhe1nkAoQGhz3GAAOhdBCICBAAZgCDUeQCxECWN +ky8oQQNOII4HuPVhBy/8o8DgeKLB8cD+Dg/8RcHPdYAAiAoihTBwCPQmlRQUDjEwdgT0Vh2CEIDi +DPTPdYAAMAXBjYDmANnKIEEAI/IhrY7iBPQB2B/wQSgNAgd9QSgBBKd5z3aAADAFoI5TJUURTCUA +hMa5i/YKIcAP63IF2KPbzQPv+ookgw9RJYCRBPIA2Frxz3WAAEx9FiVNEeeNAKUUFAAx4K5GrQK1 +x3GAAMx9AIkHrQAZQgEAG0IBzPGiwUHBQSgCAgd6QSgBBEd5z3KAAMx9xrkqYue6EPQEFAMxz3GA +AEx9VnlAgVBwBfRCkXByBvJHiee69fOA2APwBongf6LA4HjxwBIOL/y4cEokQACQ4Mohyg/KIsoH +yiOKDwAA8wAoA+r6yiBqAUAtgAAUeAAggw+AAChdxouMJgKQANgN8s9wgABMfRYgjQOghaChJos2 +eAKQALKIcCkGD/zgePHAng0v/AHZpcEacAoigC+AADQF3gvv+4twTCBAoAAUhTABFJEwBvQKIoAv +gAA4BUwlAIDE9kwlAIHL9gohwA/rcgXYnNulAu/6SiRAAEwlAIAoAQ4AqHAAFo5AABaUQEwkAKR6 +cIX2jCTDryj0ABYAQQAWj0AAFoBAABYAQUwkAKR+AAoAgOcl8s9wgAA0BQKAQCzNILV9EOC4YFYL +7/sE2c9wgAA0BQKATCFAoB1lzCdhkxX0ANiMuBTwCiHAD+tyBdin20okQAAhAu/6CiUABQohwA/r +cgXYsNv18QDYALXPcIAANAUCgEAswSA1eTJgOGAFIkIEQLAE3QbwgcAE3fIK7/upcQAijCMAHAIV +z3CAAKgE8CACBB7fgOIvKYEAAidAECXyMmjPc4AAL100eStjESOAgwjyACaBH4AAqFwWeQAZAgUA +LYETCyHAgAjyACaBH4AAqFwWeQQZAgUQIgKALymBAAInQBDe9UIjQCCA4OQGzf8+Cs/7dQQv/KXA +4HgA2D7x8cDhxa3Bi3WpcGIK7/sN2QDAHXhTIAEARCk+DalwACGBf4AAiF7yCu/7DdoCCs/7cQQv +/K3A4HjxwOHFINvPcaAAyBxpoQAWAEDPcqAAEBQMogAWBUAB3UwlAIDKIcEPyiLBB8ogYQHKI4EP +AAAJAfAA4frKJEEDGBpAAWgZQAED2A+iuaFqoaYJz/sVBA/88cCaCw/8pBABAPm5osFw9CDZz3Og +AMgcKaOkEAEAUSHAgS7yMYjPdaAAEBQjucC5A7kF4QPaT6VGhUHCjeEQ3som4hEGFA8xjCfDnwj0 +BBQPMfF2zCfqkAHeQ/YA3oDm6vXFgEV+x6WxiIYl/B8YvaV6z3WgAMwXWqAX8EWAz3GgABAUR6Gk +EAEAUSGAggnyMYjXuoYh/A8YuUV5OqDPdaAAzBcN2QHaA+ENHZiQDh1YkCaAGR1YkCeAGh1YkCiA +Gx1YkAPZFB1YkHAQAQEQHViQcBABAc91oAD0BwThJ6VHo6QQAQCZuaQYQAAVAy/8osDgePHAkgtg +BRDYb9kHuc9yoADwFzGiz3EAAPD/OKISDUAF0cDgfgDagOHKJE1w4HjoIO0B/9lcYCCsAeLgfvHA ++v/w//DxD3tIuA94z3KAAABG9CIAAEAoAQJIuAV59CLAADB54H8neOB48cA+Cg/8pcEIdgKLKHWY +cGTAAIsAEgYBERwCMHlwAhIHAQQSCAEQFAAx5JIGEgUBACDJAwCRLyFIEgcgQAIQeOf/ACCKAQGV +LyKIEgcggAIQeOP/ACDGAQKVLyaIAQcggAEQeN7/ACAHAgOVLyfIAQcgwAEQeNr/ACUFAASVLyVI +AQcgQAEQeNX/H2cFlfB/53gQeNL/JpUhcBB4B3k8eg+5JXpQegAigQIweQAcRDBHlSd6XHkPukV5 +MHkAIYIBUHpceQIchDAPukV5MHkAIcIBUHpceQQchDAPukV5MHkAIUIBUHpceQYchDAPukV5MHk/ +Z/B//HkIHMQzD7/leTB5OGBpcca5hbkIuQUhwQIgthB4IJUKHAQwJ3gceAi4BSAAAQG2AMABpgHA +AqYCwAOmdQEv/KXA4H7gePHA4cUIdT6Iz3CAADQFQoBAJQAUA7k1eVlh1g+v+wraqXD3/1UBD/zx +wNoIL/yYcKXBKHe4cwDeBCOAD/8AAAAYugV6b3kIuf/YCLhkeCi4BXlFeQjd9CSAAyd4RMAQFAAx +kP8SFAIxYb1AKAEEBXlHeUTBEBQCMRQkgDOA5UCwAeYr91MlwgVApwAUDQEH2QbwEH0UJ0wQALRh +uRQkQDC7e0+9AJCle4HhcHt4YDP3BCCADwAAAP8QuAV6QKed8fHAQggv/CDZANrPdaAAyBwppc9x +oACUE1uhz3OAADQFYoPzaM92gAAwcwyG9X9TIMQF8GP7Y1MgjwCD56TBi3Ea9B6Gm7gepjQWgBDi +i/FwCvQocEAjAQREa0AmAxxq/w3aKvAdhpG4krgdps9woADMFyvwhecO9EEqAlJAIwAEwbqIc7n/ +HoacuB6mDdoU8Cy4UyACAB6GA7qZuB6m5IMF4gUnABEAoQWDAaEGgwKhB4MDoQPiz3CgAMwXz3Gg *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 15:24:25 2010 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 2D9A71065697; Wed, 20 Jan 2010 15:24:25 +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 12FF48FC1B; Wed, 20 Jan 2010 15:24:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KFOOvn041217; Wed, 20 Jan 2010 15:24:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KFOOw4041214; Wed, 20 Jan 2010 15:24:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001201524.o0KFOOw4041214@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 20 Jan 2010 15:24:24 +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: r202705 - stable/8/share/man/man4 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: Wed, 20 Jan 2010 15:24:25 -0000 Author: kib Date: Wed Jan 20 15:24:24 2010 New Revision: 202705 URL: http://svn.freebsd.org/changeset/base/202705 Log: MFC r198470, r198521: Syncronize iwn(4) manpages with HEAD. Modified: stable/8/share/man/man4/iwn.4 stable/8/share/man/man4/iwnfw.4 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) Modified: stable/8/share/man/man4/iwn.4 ============================================================================== --- stable/8/share/man/man4/iwn.4 Wed Jan 20 15:22:34 2010 (r202704) +++ stable/8/share/man/man4/iwn.4 Wed Jan 20 15:24:24 2010 (r202705) @@ -25,36 +25,53 @@ .\" .\" $FreeBSD$ .\" -.Dd April 13, 2008 +.Dd October 25, 2009 .Os .Dt IWN 4 .Sh NAME .Nm iwn -.Nd "Intel Wireless WiFi Link 4965AGN IEEE 802.11n driver" +.Nd "Intel Wireless WiFi Link 4965/5000 IEEE 802.11n driver" .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iwn" -.Cd "device iwnfw" .Cd "device pci" .Cd "device wlan" .Cd "device firmware" .Ed .Pp +You also need to select a firmware for your device. +Choose one from: +.Bd -ragged -offset indent +.Cd "device iwn4965fw" +.Cd "device iwn5000fw" +.Cd "device iwn5100fw" +.Ed +.Pp +Or you can use +.Bd -ragged -offset indent +.Cd "device iwnfw" +.Ed +.Pp +to include them all. +.Pp Alternatively, to load the driver as a -module at boot time, place the following line in +module at boot time, place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent if_iwn_load="YES" +iwn4965fw_load="YES" +iwn5000fw_load="YES" +iwn5100fw_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for .Tn Intel -Wireless WiFi Link 4965AGN PCI-Express network adapters. +Wireless WiFi Link 4965 and 5000 series of PCI-Express network adapters. .Nm supports .Cm station , Modified: stable/8/share/man/man4/iwnfw.4 ============================================================================== --- stable/8/share/man/man4/iwnfw.4 Wed Jan 20 15:22:34 2010 (r202704) +++ stable/8/share/man/man4/iwnfw.4 Wed Jan 20 15:24:24 2010 (r202705) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2009 +.Dd October 25, 2009 .Dt IWNFW 4 .Os .Sh NAME @@ -36,15 +36,26 @@ kernel configuration file: .Cd "device iwnfw" .Ed .Pp +This will include three firmware images inside the kernel. +If you want to pick only the firmware image for your network adapter choose one +of the following: +.Bd -ragged -offset indent +.Cd "device iwn4965fw" +.Cd "device iwn5000fw" +.Cd "device iwn5100fw" +.Ed +.Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent -iwnfw_load="YES" +iwn4965fw_load="YES" +iwn5000fw_load="YES" +iwn5100fw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Intel Wireless WiFi Link 4965AGN IEEE 802.11n adapters. +Intel Wireless WiFi Link 4965 and 5000 series of IEEE 802.11n adapters. It may be statically linked into the kernel, or loaded as a module. .Sh SEE ALSO From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 16:28:40 2010 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 1C69E106566B; Wed, 20 Jan 2010 16:28:40 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A4D68FC0C; Wed, 20 Jan 2010 16:28:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KGSdvY055444; Wed, 20 Jan 2010 16:28:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KGSdVB055442; Wed, 20 Jan 2010 16:28:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201001201628.o0KGSdVB055442@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 20 Jan 2010 16:28:39 +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: r202706 - stable/8/sys/powerpc/include 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: Wed, 20 Jan 2010 16:28:40 -0000 Author: nwhitehorn Date: Wed Jan 20 16:28:39 2010 New Revision: 202706 URL: http://svn.freebsd.org/changeset/base/202706 Log: MFC r200018: Bump limits on PowerPC. This allows large executables like parts of LLVM to function. Reviewed by: grehan Obtained from: NetBSD Modified: stable/8/sys/powerpc/include/vmparam.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/include/vmparam.h ============================================================================== --- stable/8/sys/powerpc/include/vmparam.h Wed Jan 20 15:24:24 2010 (r202705) +++ stable/8/sys/powerpc/include/vmparam.h Wed Jan 20 16:28:39 2010 (r202706) @@ -38,23 +38,23 @@ #define USRSTACK VM_MAXUSER_ADDRESS #ifndef MAXTSIZ -#define MAXTSIZ (16*1024*1024) /* max text size */ +#define MAXTSIZ (64*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ -#define DFLDSIZ (32*1024*1024) /* default data size */ +#define DFLDSIZ (128*1024*1024) /* default data size */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (512*1024*1024) /* max data size */ +#define MAXDSIZ (1*1024*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ -#define DFLSSIZ (1*1024*1024) /* default stack size */ +#define DFLSSIZ (8*1024*1024) /* default stack size */ #endif #ifndef MAXSSIZ -#define MAXSSIZ (32*1024*1024) /* max stack size */ +#define MAXSSIZ (64*1024*1024) /* max stack size */ #endif /* From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 16:50:14 2010 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 AB81C1065679; Wed, 20 Jan 2010 16:50:14 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A8C78FC1B; Wed, 20 Jan 2010 16:50:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KGoEtS060230; Wed, 20 Jan 2010 16:50:14 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KGoE1N060228; Wed, 20 Jan 2010 16:50:14 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201001201650.o0KGoE1N060228@svn.freebsd.org> From: Hiroki Sato Date: Wed, 20 Jan 2010 16:50: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: r202707 - head/usr.sbin/ypserv 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: Wed, 20 Jan 2010 16:50:14 -0000 Author: hrs Date: Wed Jan 20 16:50:13 2010 New Revision: 202707 URL: http://svn.freebsd.org/changeset/base/202707 Log: Simply ignore unsupported protocols listed in /etc/netconfig and abort only if no transport is available. This fixes (INET && !INET6) and (!INET && INET6) case, for example. Modified: head/usr.sbin/ypserv/yp_main.c Modified: head/usr.sbin/ypserv/yp_main.c ============================================================================== --- head/usr.sbin/ypserv/yp_main.c Wed Jan 20 16:28:39 2010 (r202706) +++ head/usr.sbin/ypserv/yp_main.c Wed Jan 20 16:50:13 2010 (r202707) @@ -450,6 +450,7 @@ main(int argc, char *argv[]) { int ch; int error; + int ntrans; void *nc_handle; struct netconfig *nconf; @@ -527,12 +528,13 @@ main(int argc, char *argv[]) /* * Create RPC service for each transport. */ + ntrans = 0; while((nconf = getnetconfig(nc_handle))) { if ((nconf->nc_flag & NC_VISIBLE)) { if (__rpc_nconf2sockinfo(nconf, &si) == 0) { - _msgout("cannot get information for %s", - nconf->nc_netid); - exit(1); + _msgout("cannot get information for %s. " + "Ignored.", nconf->nc_netid); + continue; } if (_rpcpmstart) { if (si.si_socktype != _rpcfdtype || @@ -545,12 +547,16 @@ main(int argc, char *argv[]) endnetconfig(nc_handle); exit(1); } + ntrans++; } } endnetconfig(nc_handle); while(!(SLIST_EMPTY(&ble_head))) SLIST_REMOVE_HEAD(&ble_head, ble_next); - + if (ntrans == 0) { + _msgout("no transport is available. Aborted."); + exit(1); + } if (_rpcpmstart) { (void) signal(SIGALRM, (SIG_PF) closedown); (void) alarm(_RPCSVC_CLOSEDOWN/2); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 16:56:21 2010 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 37C611065695; Wed, 20 Jan 2010 16:56:21 +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 0D7D08FC1F; Wed, 20 Jan 2010 16:56:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KGuKDi061600; Wed, 20 Jan 2010 16:56:20 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KGuKKG061597; Wed, 20 Jan 2010 16:56:20 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001201656.o0KGuKKG061597@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 20 Jan 2010 16:56: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: r202708 - head/sys/fs/tmpfs 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: Wed, 20 Jan 2010 16:56:21 -0000 Author: jh Date: Wed Jan 20 16:56:20 2010 New Revision: 202708 URL: http://svn.freebsd.org/changeset/base/202708 Log: - Change the type of nodes_max to u_int and use "%u" format string to convert its value. [1] - Set default tm_nodes_max to min(pages + 3, UINT32_MAX). It's more reasonable than the old four nodes per page (with page size 4096) because non-empty regular files always use at least one page. This fixes possible overflow in the calculation. [2] - Don't allow more than tm_nodes_max nodes allocated in tmpfs_alloc_node(). PR: kern/138367 Suggested by: bde [1], Gleb Kurtsou [2] Approved by: trasz (mentor) Modified: head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Wed Jan 20 16:50:13 2010 (r202707) +++ head/sys/fs/tmpfs/tmpfs_subr.c Wed Jan 20 16:56:20 2010 (r202708) @@ -93,7 +93,7 @@ tmpfs_alloc_node(struct tmpfs_mount *tmp MPASS(IFF(type == VLNK, target != NULL)); MPASS(IFF(type == VBLK || type == VCHR, rdev != VNOVAL)); - if (tmp->tm_nodes_inuse > tmp->tm_nodes_max) + if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max) return (ENOSPC); nnode = (struct tmpfs_node *)uma_zalloc_arg( Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 20 16:50:13 2010 (r202707) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 20 16:56:20 2010 (r202708) @@ -182,10 +182,10 @@ tmpfs_mount(struct mount *mp) struct tmpfs_mount *tmp; struct tmpfs_node *root; size_t pages, mem_size; - ino_t nodes; + uint32_t nodes; int error; /* Size counters. */ - ino_t nodes_max; + u_int nodes_max; u_quad_t size_max; /* Root node attributes. */ @@ -223,7 +223,7 @@ tmpfs_mount(struct mount *mp) if (mp->mnt_cred->cr_ruid != 0 || vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) != 1) root_mode = va.va_mode; - if (vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) != 1) + if (vfs_scanopt(mp->mnt_optnew, "inodes", "%u", &nodes_max) != 1) nodes_max = 0; if (vfs_scanopt(mp->mnt_optnew, "size", "%qu", &size_max) != 1) size_max = 0; @@ -245,9 +245,12 @@ tmpfs_mount(struct mount *mp) pages = howmany(size_max, PAGE_SIZE); MPASS(pages > 0); - if (nodes_max <= 3) - nodes = 3 + pages * PAGE_SIZE / 1024; - else + if (nodes_max <= 3) { + if (pages > UINT32_MAX - 3) + nodes = UINT32_MAX; + else + nodes = pages + 3; + } else nodes = nodes_max; MPASS(nodes >= 3); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 17:34:59 2010 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 76CA21065676; Wed, 20 Jan 2010 17:34:59 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9248FC1E; Wed, 20 Jan 2010 17:34:58 +0000 (UTC) Received: by ewy3 with SMTP id 3so1814843ewy.13 for ; Wed, 20 Jan 2010 09:34:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=wb9Lsmktah9/oDCXTxHnRJALbqHx6fLU56hFjhexu9Q=; b=frDtmMyCablpcSyf2ljbgY5LJmMf4fvnAIkYs4lh92Klj5Swy17Cqah1bO1IhVhV1K ipXq3R0ptN9Es/HMwdsW6FL249VP0U0dkmU0aOvUc2UeAl95OacSBU8LJlv31XVmSBvI Hf8+HuGR5QSAK6NCQ76+blmRxNy4a44wzOzjk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=IhAadjFezX75fOIHCQN9pqNMBjZ7ZKLgKuqq9mQQeD1g6E6kAVyuQLrN5GrFxv5S4X BpBQLvfq+0v9QCIGpCHkBu88pdE5aIwpa/ZzVpiqJET38+AhIetXKl4247MBWx3+NmRI 0RQXqWxli1dkAhVIkCaXWDiC8qswe7Dl88/gs= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.162.142 with SMTP id y14mr85592wek.192.1264008897205; Wed, 20 Jan 2010 09:34:57 -0800 (PST) In-Reply-To: <201001201656.o0KGuKKG061597@svn.freebsd.org> References: <201001201656.o0KGuKKG061597@svn.freebsd.org> From: Ivan Voras Date: Wed, 20 Jan 2010 18:34:37 +0100 X-Google-Sender-Auth: d194db9473a8eb03 Message-ID: <9bbcef731001200934n67f7c009sb39a6fe238ac4a8@mail.gmail.com> To: Jaakko Heinonen Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202708 - head/sys/fs/tmpfs 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: Wed, 20 Jan 2010 17:34:59 -0000 2010/1/20 Jaakko Heinonen : > Author: jh > Date: Wed Jan 20 16:56:20 2010 > New Revision: 202708 > URL: http://svn.freebsd.org/changeset/base/202708 > Modified: > =C2=A0head/sys/fs/tmpfs/tmpfs_subr.c > =C2=A0head/sys/fs/tmpfs/tmpfs_vfsops.c Any chance of downgrading the "considered highly experimental" status message of tmpfs to something less scary? Like "will probably not set your hamster on fire"? :) I admit I haven't used it for any really demanding work but it looks ok enough for /tmp on some busy systems. From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 17:51:09 2010 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 39028106568B; Wed, 20 Jan 2010 17:51:09 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smtp-out2.tiscali.nl (smtp-out2.tiscali.nl [195.241.79.177]) by mx1.freebsd.org (Postfix) with ESMTP id E35F48FC1A; Wed, 20 Jan 2010 17:51:08 +0000 (UTC) Received: from [212.123.145.58] (helo=sjakie.klop.ws) by smtp-out2.tiscali.nl with esmtp (Exim) (envelope-from ) id 1NXehv-00069i-N2; Wed, 20 Jan 2010 18:51:07 +0100 Received: from 212-123-145-58.ip.telfort.nl (localhost [127.0.0.1]) by sjakie.klop.ws (Postfix) with ESMTP id 10093C62B; Wed, 20 Jan 2010 18:50:59 +0100 (CET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Ivan Voras" , "Jaakko Heinonen" References: <201001201656.o0KGuKKG061597@svn.freebsd.org> <9bbcef731001200934n67f7c009sb39a6fe238ac4a8@mail.gmail.com> Date: Wed, 20 Jan 2010 18:50:58 +0100 MIME-Version: 1.0 From: "Ronald Klop" Message-ID: In-Reply-To: <9bbcef731001200934n67f7c009sb39a6fe238ac4a8@mail.gmail.com> User-Agent: Opera Mail/10.10 (FreeBSD) Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202708 - head/sys/fs/tmpfs 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: Wed, 20 Jan 2010 17:51:09 -0000 On Wed, 20 Jan 2010 18:34:37 +0100, Ivan Voras wrote= : > 2010/1/20 Jaakko Heinonen : >> Author: jh >> Date: Wed Jan 20 16:56:20 2010 >> New Revision: 202708 >> URL: http://svn.freebsd.org/changeset/base/202708 > >> Modified: >> head/sys/fs/tmpfs/tmpfs_subr.c >> head/sys/fs/tmpfs/tmpfs_vfsops.c > > Any chance of downgrading the "considered highly experimental" status > message of tmpfs to something less scary? Like "will probably not set > your hamster on fire"? :) > > I admit I haven't used it for any really demanding work but it looks > ok enough for /tmp on some busy systems. And since this list is shrinking. http://www.freebsd.org/cgi/query-pr-summary.cgi?category=3D&severity=3D&p= riority=3D&class=3D&state=3D&sort=3Dnone&text=3Dtmpfs&responsible=3D&mult= itext=3D&originator=3D&release=3D Ronald. From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 18:22:56 2010 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 9E82C106568F; Wed, 20 Jan 2010 18:22:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D43B8FC0C; Wed, 20 Jan 2010 18:22:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KIMubx080686; Wed, 20 Jan 2010 18:22:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KIMufx080684; Wed, 20 Jan 2010 18:22:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001201822.o0KIMufx080684@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 18:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202709 - head/usr.sbin/burncd 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: Wed, 20 Jan 2010 18:22:56 -0000 Author: delphij Date: Wed Jan 20 18:22:56 2010 New Revision: 202709 URL: http://svn.freebsd.org/changeset/base/202709 Log: Give the right value when complaining it being wrong. Reported by: danfe MFC after: 3 days Modified: head/usr.sbin/burncd/burncd.c Modified: head/usr.sbin/burncd/burncd.c ============================================================================== --- head/usr.sbin/burncd/burncd.c Wed Jan 20 16:56:20 2010 (r202708) +++ head/usr.sbin/burncd/burncd.c Wed Jan 20 18:22:56 2010 (r202709) @@ -151,7 +151,7 @@ main(int argc, char **argv) else speed = atoi(env_speed) * 177; if (speed <= 0) - errx(EX_USAGE, "Invalid speed: %s", optarg); + errx(EX_USAGE, "Invalid speed: %s", env_speed); if (argc == 0) usage(); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 18:50:50 2010 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 4F4C6106566C; Wed, 20 Jan 2010 18:50: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 3B8918FC0C; Wed, 20 Jan 2010 18:50:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KIoo2L087026; Wed, 20 Jan 2010 18:50:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KIood2087024; Wed, 20 Jan 2010 18:50:50 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001201850.o0KIood2087024@svn.freebsd.org> From: Michael Tuexen Date: Wed, 20 Jan 2010 18:50:50 +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: r202711 - stable/7/sys/netinet 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: Wed, 20 Jan 2010 18:50:50 -0000 Author: tuexen Date: Wed Jan 20 18:50:49 2010 New Revision: 202711 URL: http://svn.freebsd.org/changeset/base/202711 Log: MFC 199372 Do not start the iterator when there are no associations. This fixes a bug found by Irene Ruengeler. Modified: stable/7/sys/netinet/sctp_asconf.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/sctp_asconf.c ============================================================================== --- stable/7/sys/netinet/sctp_asconf.c Wed Jan 20 18:28:24 2010 (r202710) +++ stable/7/sys/netinet/sctp_asconf.c Wed Jan 20 18:50:49 2010 (r202711) @@ -3180,24 +3180,6 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * ifa = NULL; } if (ifa != NULL) { - /* add this address */ - struct sctp_asconf_iterator *asc; - struct sctp_laddr *wi; - - SCTP_MALLOC(asc, struct sctp_asconf_iterator *, - sizeof(struct sctp_asconf_iterator), - SCTP_M_ASC_IT); - if (asc == NULL) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM); - return (ENOMEM); - } - wi = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_laddr), - struct sctp_laddr); - if (wi == NULL) { - SCTP_FREE(asc, SCTP_M_ASC_IT); - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM); - return (ENOMEM); - } if (type == SCTP_ADD_IP_ADDRESS) { sctp_add_local_addr_ep(inp, ifa, type); } else if (type == SCTP_DEL_IP_ADDRESS) { @@ -3205,8 +3187,6 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * if (inp->laddr_count < 2) { /* can't delete the last local address */ - SCTP_FREE(asc, SCTP_M_ASC_IT); - SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_laddr), wi); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, EINVAL); return (EINVAL); } @@ -3218,27 +3198,49 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * } } } - LIST_INIT(&asc->list_of_work); - asc->cnt = 1; - SCTP_INCR_LADDR_COUNT(); - wi->ifa = ifa; - wi->action = type; - atomic_add_int(&ifa->refcount, 1); - LIST_INSERT_HEAD(&asc->list_of_work, wi, sctp_nxt_addr); - (void)sctp_initiate_iterator(sctp_asconf_iterator_ep, - sctp_asconf_iterator_stcb, - sctp_asconf_iterator_ep_end, - SCTP_PCB_ANY_FLAGS, - SCTP_PCB_ANY_FEATURES, - SCTP_ASOC_ANY_STATE, - (void *)asc, 0, - sctp_asconf_iterator_end, inp, 0); + if (!LIST_EMPTY(&inp->sctp_asoc_list)) { + /* + * There is no need to start the iterator if the inp + * has no associations. + */ + struct sctp_asconf_iterator *asc; + struct sctp_laddr *wi; + + SCTP_MALLOC(asc, struct sctp_asconf_iterator *, + sizeof(struct sctp_asconf_iterator), + SCTP_M_ASC_IT); + if (asc == NULL) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM); + return (ENOMEM); + } + wi = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_laddr), struct sctp_laddr); + if (wi == NULL) { + SCTP_FREE(asc, SCTP_M_ASC_IT); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, ENOMEM); + return (ENOMEM); + } + LIST_INIT(&asc->list_of_work); + asc->cnt = 1; + SCTP_INCR_LADDR_COUNT(); + wi->ifa = ifa; + wi->action = type; + atomic_add_int(&ifa->refcount, 1); + LIST_INSERT_HEAD(&asc->list_of_work, wi, sctp_nxt_addr); + (void)sctp_initiate_iterator(sctp_asconf_iterator_ep, + sctp_asconf_iterator_stcb, + sctp_asconf_iterator_ep_end, + SCTP_PCB_ANY_FLAGS, + SCTP_PCB_ANY_FEATURES, + SCTP_ASOC_ANY_STATE, + (void *)asc, 0, + sctp_asconf_iterator_end, inp, 0); + } + return (0); } else { /* invalid address! */ SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_ASCONF, EADDRNOTAVAIL); return (EADDRNOTAVAIL); } - return (0); } void From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 18:55:41 2010 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 2C007106566C; Wed, 20 Jan 2010 18:55:41 +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 19D998FC14; Wed, 20 Jan 2010 18:55:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KIteZx088123; Wed, 20 Jan 2010 18:55:40 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KIteSZ088118; Wed, 20 Jan 2010 18:55:40 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001201855.o0KIteSZ088118@svn.freebsd.org> From: Michael Tuexen Date: Wed, 20 Jan 2010 18:55:40 +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: r202712 - stable/7/sys/netinet 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: Wed, 20 Jan 2010 18:55:41 -0000 Author: tuexen Date: Wed Jan 20 18:55:40 2010 New Revision: 202712 URL: http://svn.freebsd.org/changeset/base/202712 Log: MFC 199437 Use always LIST_EMPTY instead of sometime SCTP_LIST_EMPTY, which is defined as LIST_EMPTY. Modified: stable/7/sys/netinet/sctp_auth.c stable/7/sys/netinet/sctp_os_bsd.h stable/7/sys/netinet/sctp_pcb.c stable/7/sys/netinet/sctp_usrreq.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/sctp_auth.c ============================================================================== --- stable/7/sys/netinet/sctp_auth.c Wed Jan 20 18:50:49 2010 (r202711) +++ stable/7/sys/netinet/sctp_auth.c Wed Jan 20 18:55:40 2010 (r202712) @@ -573,7 +573,7 @@ sctp_insert_sharedkey(struct sctp_keyhea return (EINVAL); /* insert into an empty list? */ - if (SCTP_LIST_EMPTY(shared_keys)) { + if (LIST_EMPTY(shared_keys)) { LIST_INSERT_HEAD(shared_keys, new_skey, next); return (0); } Modified: stable/7/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/7/sys/netinet/sctp_os_bsd.h Wed Jan 20 18:50:49 2010 (r202711) +++ stable/7/sys/netinet/sctp_os_bsd.h Wed Jan 20 18:55:40 2010 (r202712) @@ -168,7 +168,6 @@ MALLOC_DECLARE(SCTP_M_SOCKOPT); * */ #define USER_ADDR_NULL (NULL) /* FIX ME: temp */ -#define SCTP_LIST_EMPTY(list) LIST_EMPTY(list) #if defined(SCTP_DEBUG) #define SCTPDBG(level, params...) \ Modified: stable/7/sys/netinet/sctp_pcb.c ============================================================================== --- stable/7/sys/netinet/sctp_pcb.c Wed Jan 20 18:50:49 2010 (r202711) +++ stable/7/sys/netinet/sctp_pcb.c Wed Jan 20 18:55:40 2010 (r202712) @@ -452,7 +452,7 @@ sctp_remove_ifa_from_ifn(struct sctp_ifa sctp_ifap->ifn_p->num_v4--; ifn_index = sctp_ifap->ifn_p->ifn_index; - if (SCTP_LIST_EMPTY(&sctp_ifap->ifn_p->ifalist)) { + if (LIST_EMPTY(&sctp_ifap->ifn_p->ifalist)) { /* remove the ifn, possibly freeing it */ sctp_delete_ifn(sctp_ifap->ifn_p, SCTP_ADDR_LOCKED); } else { @@ -4252,7 +4252,7 @@ sctp_delete_from_timewait(uint32_t tag, int i; chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { for (i = 0; i < SCTP_NUMBER_IN_VTAG_BLOCK; i++) { if ((twait_block->vtag_block[i].v_tag == tag) && @@ -4282,7 +4282,7 @@ sctp_is_in_timewait(uint32_t tag, uint16 SCTP_INP_INFO_WLOCK(); chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { for (i = 0; i < SCTP_NUMBER_IN_VTAG_BLOCK; i++) { if ((twait_block->vtag_block[i].v_tag == tag) && @@ -4312,7 +4312,7 @@ sctp_add_vtag_to_timewait(uint32_t tag, (void)SCTP_GETTIME_TIMEVAL(&now); chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; set = 0; - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { /* Block(s) present, lets find space, and expire on the fly */ LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { for (i = 0; i < SCTP_NUMBER_IN_VTAG_BLOCK; i++) { @@ -4935,7 +4935,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, sctp_free_remote_addr(net); } - while (!SCTP_LIST_EMPTY(&asoc->sctp_restricted_addrs)) { + while (!LIST_EMPTY(&asoc->sctp_restricted_addrs)) { /* sa_ignore FREED_MEMORY */ laddr = LIST_FIRST(&asoc->sctp_restricted_addrs); sctp_remove_laddr(laddr); @@ -5581,7 +5581,7 @@ sctp_pcb_finish(void) */ for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { chain = &SCTP_BASE_INFO(vtag_timewait)[i]; - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { prev_twait_block = NULL; LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { if (prev_twait_block) { @@ -6340,7 +6340,7 @@ skip_vtag_check: chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))]; /* Now what about timed wait ? */ - if (!SCTP_LIST_EMPTY(chain)) { + if (!LIST_EMPTY(chain)) { /* * Block(s) are present, lets see if we have this tag in the * list Modified: stable/7/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/7/sys/netinet/sctp_usrreq.c Wed Jan 20 18:50:49 2010 (r202711) +++ stable/7/sys/netinet/sctp_usrreq.c Wed Jan 20 18:55:40 2010 (r202712) @@ -752,7 +752,7 @@ sctp_disconnect(struct socket *so) SCTP_INP_RLOCK(inp); if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { - if (SCTP_LIST_EMPTY(&inp->sctp_asoc_list)) { + if (LIST_EMPTY(&inp->sctp_asoc_list)) { /* No connection */ SCTP_INP_RUNLOCK(inp); return (0); From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 18:58:23 2010 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 ACF9C106566C; Wed, 20 Jan 2010 18:58:23 +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 9B5678FC12; Wed, 20 Jan 2010 18:58:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KIwNjo088754; Wed, 20 Jan 2010 18:58:23 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KIwNKu088752; Wed, 20 Jan 2010 18:58:23 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001201858.o0KIwNKu088752@svn.freebsd.org> From: Michael Tuexen Date: Wed, 20 Jan 2010 18:58:23 +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: r202713 - stable/7/sys/netinet 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: Wed, 20 Jan 2010 18:58:23 -0000 Author: tuexen Date: Wed Jan 20 18:58:23 2010 New Revision: 202713 URL: http://svn.freebsd.org/changeset/base/202713 Log: MFC 201523 Correct usage of parenthesis. Modified: stable/7/sys/netinet/sctp_pcb.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/sctp_pcb.c ============================================================================== --- stable/7/sys/netinet/sctp_pcb.c Wed Jan 20 18:55:40 2010 (r202712) +++ stable/7/sys/netinet/sctp_pcb.c Wed Jan 20 18:58:23 2010 (r202713) @@ -5510,7 +5510,7 @@ sctp_pcb_init() /* Init the TIMEWAIT list */ for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { - LIST_INIT(&SCTP_BASE_INFO(vtag_timewait[i])); + LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } #if defined(SCTP_USE_THREAD_BASED_ITERATOR) @@ -6338,7 +6338,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp } skip_vtag_check: - chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))]; + chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; /* Now what about timed wait ? */ if (!LIST_EMPTY(chain)) { /* From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 19:11:31 2010 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 5EC57106566C; Wed, 20 Jan 2010 19:11:31 +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 4D12F8FC19; Wed, 20 Jan 2010 19:11:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KJBVXv091789; Wed, 20 Jan 2010 19:11:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KJBVPX091787; Wed, 20 Jan 2010 19:11:31 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001201911.o0KJBVPX091787@svn.freebsd.org> From: Michael Tuexen Date: Wed, 20 Jan 2010 19:11:31 +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: r202714 - stable/7/sys/netinet 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: Wed, 20 Jan 2010 19:11:31 -0000 Author: tuexen Date: Wed Jan 20 19:11:31 2010 New Revision: 202714 URL: http://svn.freebsd.org/changeset/base/202714 Log: MFC 199369 Do not hold the lock longer than necessary. Modified: stable/7/sys/netinet/sctputil.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/sctputil.c ============================================================================== --- stable/7/sys/netinet/sctputil.c Wed Jan 20 18:58:23 2010 (r202713) +++ stable/7/sys/netinet/sctputil.c Wed Jan 20 19:11:31 2010 (r202714) @@ -6074,11 +6074,11 @@ sctp_dynamic_set_primary(struct sockaddr * newest first :-0 */ LIST_INSERT_HEAD(&SCTP_BASE_INFO(addr_wq), wi, sctp_nxt_addr); + SCTP_IPI_ITERATOR_WQ_UNLOCK(); sctp_timer_start(SCTP_TIMER_TYPE_ADDR_WQ, (struct sctp_inpcb *)NULL, (struct sctp_tcb *)NULL, (struct sctp_nets *)NULL); - SCTP_IPI_ITERATOR_WQ_UNLOCK(); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 19:14:34 2010 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 BD9771065670; Wed, 20 Jan 2010 19:14:34 +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 ABF5F8FC18; Wed, 20 Jan 2010 19:14:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KJEYdl092500; Wed, 20 Jan 2010 19:14:34 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KJEYYM092498; Wed, 20 Jan 2010 19:14:34 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001201914.o0KJEYYM092498@svn.freebsd.org> From: Michael Tuexen Date: Wed, 20 Jan 2010 19:14:34 +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: r202715 - stable/7/sys/netinet 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: Wed, 20 Jan 2010 19:14:34 -0000 Author: tuexen Date: Wed Jan 20 19:14:34 2010 New Revision: 202715 URL: http://svn.freebsd.org/changeset/base/202715 Log: MFC 199866 Use the default stack size for the iterator thread. This fixes a crash reported by Irene Ruengeler. Modified: stable/7/sys/netinet/sctp_constants.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/sctp_constants.h ============================================================================== --- stable/7/sys/netinet/sctp_constants.h Wed Jan 20 19:11:31 2010 (r202714) +++ stable/7/sys/netinet/sctp_constants.h Wed Jan 20 19:14:34 2010 (r202715) @@ -83,7 +83,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_USE_THREAD_BASED_ITERATOR 1 #define SCTP_KTRHEAD_NAME "sctp_iterator" -#define SCTP_KTHREAD_PAGES 2 +#define SCTP_KTHREAD_PAGES 0 /* If you support Multi-VRF how big to From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 19:20:32 2010 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 2A5A3106568D; Wed, 20 Jan 2010 19:20:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 191EC8FC1E; Wed, 20 Jan 2010 19:20:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KJKVI9093888; Wed, 20 Jan 2010 19:20:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KJKVno093886; Wed, 20 Jan 2010 19:20:31 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001201920.o0KJKVno093886@svn.freebsd.org> From: Michael Tuexen Date: Wed, 20 Jan 2010 19:20:31 +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: r202716 - stable/7/sys/netinet 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: Wed, 20 Jan 2010 19:20:32 -0000 Author: tuexen Date: Wed Jan 20 19:20:31 2010 New Revision: 202716 URL: http://svn.freebsd.org/changeset/base/202716 Log: MFC 197868 Use correct arguments when calling SCTP_RTALLOC(). Modified: stable/7/sys/netinet/sctp_output.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/sctp_output.c ============================================================================== --- stable/7/sys/netinet/sctp_output.c Wed Jan 20 19:14:34 2010 (r202715) +++ stable/7/sys/netinet/sctp_output.c Wed Jan 20 19:20:31 2010 (r202716) @@ -5397,7 +5397,7 @@ sctp_lowlevel_chunk_output(struct sctp_i sctp_free_ifa(_lsrc); } else { ip->ip_src = over_addr->sin.sin_addr; - SCTP_RTALLOC((&ro->ro_rt), vrf_id); + SCTP_RTALLOC(ro, vrf_id); } } if (port) { @@ -5729,7 +5729,7 @@ sctp_lowlevel_chunk_output(struct sctp_i sctp_free_ifa(_lsrc); } else { lsa6->sin6_addr = over_addr->sin6.sin6_addr; - SCTP_RTALLOC((&ro->ro_rt), vrf_id); + SCTP_RTALLOC(ro, vrf_id); } (void)sa6_recoverscope(sin6); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 20:33:10 2010 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 DCE1D1065672; Wed, 20 Jan 2010 20:33:10 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB5608FC1A; Wed, 20 Jan 2010 20:33:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KKXAhl010284; Wed, 20 Jan 2010 20:33:10 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KKXAHc010281; Wed, 20 Jan 2010 20:33:10 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201001202033.o0KKXAHc010281@svn.freebsd.org> From: David Christensen Date: Wed, 20 Jan 2010 20:33: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: r202717 - head/sys/dev/bce 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: Wed, 20 Jan 2010 20:33:11 -0000 Author: davidch Date: Wed Jan 20 20:33:10 2010 New Revision: 202717 URL: http://svn.freebsd.org/changeset/base/202717 Log: - Added a workaround for NC-SI management firmware that would allow frames to be accepted while the driver is resetting the hardware. This failure is generally observed when broadcast frames are received during driver load and will generate "Unable to write CTX memory" errors. - Small changes to driver flags display. Modified: head/sys/dev/bce/if_bce.c head/sys/dev/bce/if_bcereg.h Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Wed Jan 20 19:20:31 2010 (r202716) +++ head/sys/dev/bce/if_bce.c Wed Jan 20 20:33:10 2010 (r202717) @@ -371,6 +371,9 @@ static void bce_release_resources (struc static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); +static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_start_rxp_cpu (struct bce_softc *); static void bce_init_rxp_cpu (struct bce_softc *); static void bce_init_txp_cpu (struct bce_softc *); static void bce_init_tpat_cpu (struct bce_softc *); @@ -603,9 +606,10 @@ bce_print_adapter_info(struct bce_softc printf("B/C (%s); Flags (", sc->bce_bc_ver); #ifdef BCE_JUMBO_HDRSPLIT - printf("SPLT "); + printf("SPLT"); i++; #endif + if (sc->bce_flags & BCE_USING_MSI_FLAG) { if (i > 0) printf("|"); printf("MSI"); i++; @@ -613,7 +617,7 @@ bce_print_adapter_info(struct bce_softc if (sc->bce_flags & BCE_USING_MSIX_FLAG) { if (i > 0) printf("|"); - printf("MSI-X "); i++; + printf("MSI-X"); i++; } if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { @@ -2976,6 +2980,7 @@ bce_dma_map_addr(void *arg, bus_dma_segm /* |PG Buffers | none | none | none | none | */ /* |TX Buffers | none | none | none | none | */ /* |Chain Pages(1) | 4KiB | 4KiB | 4KiB | 4KiB | */ +/* |Context Memory | | | | | */ /* +-----------------+----------+----------+----------+----------+ */ /* */ /* (1) Must align with CPU page size (BCM_PAGE_SZIE). */ @@ -3665,15 +3670,10 @@ bce_load_cpu_fw(struct bce_softc *sc, st struct fw_info *fw) { u32 offset; - u32 val; DBENTER(BCE_VERBOSE_RESET); - /* Halt the CPU. */ - val = REG_RD_IND(sc, cpu_reg->mode); - val |= cpu_reg->mode_value_halt; - REG_WR_IND(sc, cpu_reg->mode, val); - REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear); + bce_halt_cpu(sc, cpu_reg); /* Load the Text area. */ offset = cpu_reg->spad_base + (fw->text_addr - cpu_reg->mips_view_base); @@ -3726,9 +3726,28 @@ bce_load_cpu_fw(struct bce_softc *sc, st } } - /* Clear the pre-fetch instruction. */ - REG_WR_IND(sc, cpu_reg->inst, 0); - REG_WR_IND(sc, cpu_reg->pc, fw->start_addr); + /* Clear the pre-fetch instruction and set the FW start address. */ + REG_WR_IND(sc, cpu_reg->inst, 0); + REG_WR_IND(sc, cpu_reg->pc, fw->start_addr); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ +/* Starts the RISC processor. */ +/* */ +/* Assumes the CPU starting address has already been set. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_start_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg) +{ + u32 val; + + DBENTER(BCE_VERBOSE_RESET); /* Start the CPU. */ val = REG_RD_IND(sc, cpu_reg->mode); @@ -3741,6 +3760,62 @@ bce_load_cpu_fw(struct bce_softc *sc, st /****************************************************************************/ +/* Halts the RISC processor. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_halt_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg) +{ + u32 val; + + DBENTER(BCE_VERBOSE_RESET); + + /* Halt the CPU. */ + val = REG_RD_IND(sc, cpu_reg->mode); + val |= cpu_reg->mode_value_halt; + REG_WR_IND(sc, cpu_reg->mode, val); + REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ +/* Initialize the RX CPU. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_start_rxp_cpu(struct bce_softc *sc) +{ + struct cpu_reg cpu_reg; + + DBENTER(BCE_VERBOSE_RESET); + + cpu_reg.mode = BCE_RXP_CPU_MODE; + cpu_reg.mode_value_halt = BCE_RXP_CPU_MODE_SOFT_HALT; + cpu_reg.mode_value_sstep = BCE_RXP_CPU_MODE_STEP_ENA; + cpu_reg.state = BCE_RXP_CPU_STATE; + cpu_reg.state_value_clear = 0xffffff; + cpu_reg.gpr0 = BCE_RXP_CPU_REG_FILE; + cpu_reg.evmask = BCE_RXP_CPU_EVENT_MASK; + cpu_reg.pc = BCE_RXP_CPU_PROGRAM_COUNTER; + cpu_reg.inst = BCE_RXP_CPU_INSTRUCTION; + cpu_reg.bp = BCE_RXP_CPU_HW_BREAKPOINT; + cpu_reg.spad_base = BCE_RXP_SCRATCH; + cpu_reg.mips_view_base = 0x8000000; + + DBPRINT(sc, BCE_INFO_RESET, "Starting RX firmware.\n"); + bce_start_cpu(sc, &cpu_reg); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ /* Initialize the RX CPU. */ /* */ /* Returns: */ @@ -3833,6 +3908,8 @@ bce_init_rxp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading RX firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + /* Delay RXP start until initialization is complete. */ + DBEXIT(BCE_VERBOSE_RESET); } @@ -3929,6 +4006,7 @@ bce_init_txp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading TX firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4026,6 +4104,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading TPAT firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4123,6 +4202,7 @@ bce_init_cp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading CP firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4220,6 +4300,7 @@ bce_init_com_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading COM firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4665,6 +4746,12 @@ bce_chipinit(struct bce_softc *sc) /* Initialize the on-boards CPUs */ bce_init_cpus(sc); + /* Enable management frames (NC-SI) to flow to the MCP. */ + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + val = REG_RD(sc, BCE_RPM_MGMT_PKT_CTRL) | BCE_RPM_MGMT_PKT_CTRL_MGMT_EN; + REG_WR(sc, BCE_RPM_MGMT_PKT_CTRL, val); + } + /* Prepare NVRAM for access. */ if (bce_init_nvram(sc)) { rc = ENODEV; @@ -4845,6 +4932,15 @@ bce_blockinit(struct bce_softc *sc) /* Enable link state change interrupt generation. */ REG_WR(sc, BCE_HC_ATTN_BITS_ENABLE, STATUS_ATTN_BITS_LINK_STATE); + /* Enable the RXP. */ + bce_start_rxp_cpu(sc); + + /* Disable management frames (NC-SI) from flowing to the MCP. */ + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + val = REG_RD(sc, BCE_RPM_MGMT_PKT_CTRL) & ~BCE_RPM_MGMT_PKT_CTRL_MGMT_EN; + REG_WR(sc, BCE_RPM_MGMT_PKT_CTRL, val); + } + /* Enable all remaining blocks in the MAC. */ if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) @@ -5851,22 +5947,29 @@ bce_rx_intr(struct bce_softc *sc) DBRUN(sc->debug_rx_mbuf_alloc--); sc->free_rx_bd++; - /* - * Frames received on the NetXteme II are prepended with an - * l2_fhdr structure which provides status information about - * the received frame (including VLAN tags and checksum info). - * The frames are also automatically adjusted to align the IP - * header (i.e. two null bytes are inserted before the Ethernet - * header). As a result the data DMA'd by the controller into - * the mbuf is as follows: - * - * +---------+-----+---------------------+-----+ - * | l2_fhdr | pad | packet data | FCS | - * +---------+-----+---------------------+-----+ - * - * The l2_fhdr needs to be checked and skipped and the FCS needs - * to be stripped before sending the packet up the stack. - */ + if(m0 == NULL) { + DBPRINT(sc, BCE_EXTREME_RECV, "%s(): Oops! Empty mbuf pointer " + "found in sc->rx_mbuf_ptr[0x%04X]!\n", + __FUNCTION__, sw_rx_cons_idx); + goto bce_rx_int_next_rx; + } + + /* + * Frames received on the NetXteme II are prepended with an + * l2_fhdr structure which provides status information about + * the received frame (including VLAN tags and checksum info). + * The frames are also automatically adjusted to align the IP + * header (i.e. two null bytes are inserted before the Ethernet + * header). As a result the data DMA'd by the controller into + * the mbuf is as follows: + * + * +---------+-----+---------------------+-----+ + * | l2_fhdr | pad | packet data | FCS | + * +---------+-----+---------------------+-----+ + * + * The l2_fhdr needs to be checked and skipped and the FCS needs + * to be stripped before sending the packet up the stack. + */ l2fhdr = mtod(m0, struct l2_fhdr *); /* Get the packet data + FCS length and the status. */ @@ -6387,6 +6490,7 @@ bce_init_locked(struct bce_softc *sc) bce_ifmedia_upd_locked(ifp); + /* Let the OS know the driver is up and running. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -10038,9 +10142,9 @@ bce_dump_bc_state(struct bce_softc *sc) BCE_PRINTF("0x%08X - (0x%06X) state\n", val, BCE_BC_STATE); - val = bce_shmem_rd(sc, BCE_BC_CONDITION); + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); BCE_PRINTF("0x%08X - (0x%06X) condition\n", - val, BCE_BC_CONDITION); + val, BCE_BC_STATE_CONDITION); val = bce_shmem_rd(sc, BCE_BC_STATE_DEBUG_CMD); BCE_PRINTF("0x%08X - (0x%06X) debug_cmd\n", Modified: head/sys/dev/bce/if_bcereg.h ============================================================================== --- head/sys/dev/bce/if_bcereg.h Wed Jan 20 19:20:31 2010 (r202716) +++ head/sys/dev/bce/if_bcereg.h Wed Jan 20 20:33:10 2010 (r202717) @@ -3715,6 +3715,10 @@ struct l2_fhdr { #define BCE_RPM_CONFIG_SORT_VECT_VAL (0xfL<<4) #define BCE_RPM_CONFIG_IGNORE_VLAN (1L<<31) +#define BCE_RPM_MGMT_PKT_CTRL 0x0000180c +#define BCE_RPM_MGMT_PKT_CTRL_MGMT_DISCARD_EN (1L<<30) +#define BCE_RPM_MGMT_PKT_CTRL_MGMT_EN (1L<<31) + #define BCE_RPM_VLAN_MATCH0 0x00001810 #define BCE_RPM_VLAN_MATCH0_RPM_VLAN_MTCH0_VALUE (0xfffL<<0) From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 21:12:30 2010 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 672801065695; Wed, 20 Jan 2010 21:12:30 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 577868FC08; Wed, 20 Jan 2010 21:12:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KLCUHD019225; Wed, 20 Jan 2010 21:12:30 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KLCUQp019223; Wed, 20 Jan 2010 21:12:30 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001202112.o0KLCUQp019223@svn.freebsd.org> From: Ed Schouten Date: Wed, 20 Jan 2010 21:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202718 - head/usr.bin/getent 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: Wed, 20 Jan 2010 21:12:30 -0000 Author: ed Date: Wed Jan 20 21:12:30 2010 New Revision: 202718 URL: http://svn.freebsd.org/changeset/base/202718 Log: Also print UNIX timestamps in getent utmpx output. Modified: head/usr.bin/getent/getent.c Modified: head/usr.bin/getent/getent.c ============================================================================== --- head/usr.bin/getent/getent.c Wed Jan 20 20:33:10 2010 (r202717) +++ head/usr.bin/getent/getent.c Wed Jan 20 21:12:30 2010 (r202718) @@ -55,8 +55,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include +#include #include #include #include @@ -583,7 +584,9 @@ utmpxprint(const struct utmpx *ut) if (ut->ut_type == EMPTY) return; - printf("[%.24s] ", ctime(&ut->ut_tv.tv_sec)); + printf("[%jd.%06u -- %.24s] ", + (intmax_t)ut->ut_tv.tv_sec, (unsigned int)ut->ut_tv.tv_usec, + ctime(&ut->ut_tv.tv_sec)); switch (ut->ut_type) { case BOOT_TIME: From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 21:30:52 2010 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 E3EF31065693; Wed, 20 Jan 2010 21:30:52 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0D2C8FC15; Wed, 20 Jan 2010 21:30:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KLUqRA023417; Wed, 20 Jan 2010 21:30:52 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KLUqxq023409; Wed, 20 Jan 2010 21:30:52 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201001202130.o0KLUqxq023409@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 20 Jan 2010 21:30: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: r202719 - in head: . gnu/usr.bin usr.bin usr.bin/bc usr.bin/bc/USD.doc usr.bin/dc usr.bin/dc/USD.doc 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: Wed, 20 Jan 2010 21:30:53 -0000 Author: gabor (doc,ports committer) Date: Wed Jan 20 21:30:52 2010 New Revision: 202719 URL: http://svn.freebsd.org/changeset/base/202719 Log: Replace GNU bc/dc with BSDL versions ported from OpenBSD. They have a good compatibility level with the GNU counterparts and have shown to be mature enough. For now, the GNU versions aren't removed from the tree, just detached from the build. Sponsored by: Google Summer of Code 2008 Portbuild run by: erwin Approved by: delphij Added: head/usr.bin/bc/ head/usr.bin/bc/Makefile (contents, props changed) head/usr.bin/bc/USD.doc/ head/usr.bin/bc/USD.doc/Makefile (contents, props changed) head/usr.bin/bc/USD.doc/bc (contents, props changed) head/usr.bin/bc/bc.1 (contents, props changed) head/usr.bin/bc/bc.library (contents, props changed) head/usr.bin/bc/bc.y (contents, props changed) head/usr.bin/bc/extern.h (contents, props changed) head/usr.bin/bc/pathnames.h (contents, props changed) head/usr.bin/bc/scan.l (contents, props changed) head/usr.bin/dc/ head/usr.bin/dc/Makefile (contents, props changed) head/usr.bin/dc/USD.doc/ head/usr.bin/dc/USD.doc/Makefile (contents, props changed) head/usr.bin/dc/USD.doc/dc (contents, props changed) head/usr.bin/dc/bcode.c (contents, props changed) head/usr.bin/dc/bcode.h (contents, props changed) head/usr.bin/dc/dc.1 (contents, props changed) head/usr.bin/dc/dc.c (contents, props changed) head/usr.bin/dc/extern.h (contents, props changed) head/usr.bin/dc/inout.c (contents, props changed) head/usr.bin/dc/mem.c (contents, props changed) head/usr.bin/dc/stack.c (contents, props changed) Modified: head/ObsoleteFiles.inc head/gnu/usr.bin/Makefile head/usr.bin/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jan 20 21:12:30 2010 (r202718) +++ head/ObsoleteFiles.inc Wed Jan 20 21:30:52 2010 (r202719) @@ -14,6 +14,13 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100120: replacing GNU bc/dc with BSDL versions +OLD_FILES+=usr/share/examples/bc/ckbook.b +OLD_FILES+=usr/share/examples/bc/pi.b +OLD_FILES+=usr/share/examples/bc/primes.b +OLD_FILES+=usr/share/examples/bc/twins.b +OLD_FILES+=usr/share/info/dc.info.gz +OLD_DIRS+=usr/share/examples/bc # 20100114: removal of ttyslot(3) OLD_FILES+=usr/share/man/man3/ttyslot.3.gz # 20100113: remove utmp.h, replace it by utmpx.h Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Wed Jan 20 21:12:30 2010 (r202718) +++ head/gnu/usr.bin/Makefile Wed Jan 20 21:30:52 2010 (r202719) @@ -2,12 +2,10 @@ .include -SUBDIR= bc \ - ${_binutils} \ +SUBDIR= ${_binutils} \ ${_cc} \ ${_cpio} \ ${_cvs} \ - dc \ dialog \ diff \ diff3 \ Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Wed Jan 20 21:12:30 2010 (r202718) +++ head/usr.bin/Makefile Wed Jan 20 21:30:52 2010 (r202719) @@ -18,6 +18,7 @@ SUBDIR= alias \ awk \ banner \ basename \ + bc \ ${_biff} \ ${_bluetooth} \ brandelf \ @@ -49,6 +50,7 @@ SUBDIR= alias \ ${_csup} \ ${_ctags} \ cut \ + dc \ ${_dig} \ dirname \ du \ Added: head/usr.bin/bc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bc/Makefile Wed Jan 20 21:30:52 2010 (r202719) @@ -0,0 +1,17 @@ +# $FreeBSD$ +# $OpenBSD: Makefile,v 1.4 2006/06/30 19:02:28 otto Exp $ + +PROG= bc +SRCS= bc.y scan.l +CFLAGS+= -I. -I${.CURDIR} +WARNS?= 6 +#SUBDIR+= USD.doc + +FILES+= bc.library +FILESDIR= ${SHAREDIR}/misc + +#beforeinstall: +# install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/bc.library \ +# ${DESTDIR}/usr/share/misc + +.include Added: head/usr.bin/bc/USD.doc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bc/USD.doc/Makefile Wed Jan 20 21:30:52 2010 (r202719) @@ -0,0 +1,13 @@ +# $FreeBSD$ +# $OpenBSD: Makefile,v 1.3 2004/02/01 15:18:01 jmc Exp $ + +DOC= bc +DIR= usd/06.bc +SRCS= bc +MACROS= -ms +BINDIR= /usr/share/doc/papers + +paper.txt: ${SRCS} + ${ROFF} -Tascii ${SRCS} > ${.TARGET} + +.include Added: head/usr.bin/bc/USD.doc/bc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bc/USD.doc/bc Wed Jan 20 21:30:52 2010 (r202719) @@ -0,0 +1,1241 @@ +.\" $FreeBSD$ +.\" $OpenBSD: bc,v 1.9 2004/07/09 10:23:05 jmc Exp $ +.\" +.\" Copyright (C) Caldera International Inc. 2001-2002. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code and documentation must retain the above +.\" copyright notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed or owned by Caldera +.\" International, Inc. +.\" 4. Neither the name of Caldera International, Inc. nor the names of other +.\" contributors may be used to endorse or promote products derived from +.\" this software without specific prior written permission. +.\" +.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +.\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, +.\" INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" @(#)bc 6.2 (Berkeley) 4/17/91 +.\" +.if n \{\ +.po 5n +.ll 70n +.\} +.EH 'USD:6-%''BC \- An Arbitrary Precision Desk-Calculator Language' +.OH 'BC \- An Arbitrary Precision Desk-Calculator Language''USD:6-%' +.\".RP +.TL +BC \- An Arbitrary Precision Desk-Calculator Language +.AU +Lorinda Cherry +.AU +Robert Morris +.AI +.\" .MH +.AB +BC is a language and a compiler for doing arbitrary precision arithmetic +on the PDP-11 under the +.UX +time-sharing +system. The output of the compiler is interpreted and executed by +a collection of routines which can input, output, and do +arithmetic on indefinitely large integers and on scaled fixed-point +numbers. +.PP +These routines are themselves based on a dynamic storage allocator. +Overflow does not occur until all available core storage +is exhausted. +.PP +The language has a complete control structure as well as immediate-mode +operation. Functions can be defined and saved for later execution. +.PP +Two five hundred-digit numbers can be multiplied to give a +thousand digit result in about ten seconds. +.PP +A small collection of library functions is also available, +including sin, cos, arctan, log, exponential, and Bessel functions of +integer order. +.PP +Some of the uses of this compiler are +.IP \- +to do computation with large integers, +.IP \- +to do computation accurate to many decimal places, +.IP \- +conversion of numbers from one base to another base. +.AE +.PP +.SH +Introduction +.PP +BC is a language and a compiler for doing arbitrary precision +arithmetic on the +.UX +time-sharing system [1]. +The compiler was written to make conveniently available a +collection of routines (called DC [5]) which are capable of doing +arithmetic on integers of arbitrary size. The compiler +is by no means intended to provide a complete programming +language. +It is a minimal language facility. +.PP +There is a scaling provision that permits the +use of decimal point notation. +Provision is made for input and output in bases other than +decimal. Numbers can be converted from decimal to octal by +simply setting the output base to equal 8. +.PP +The actual limit on the number of digits that can +be handled depends on the amount of storage available on the machine. +Manipulation of numbers with many hundreds of digits +is possible even on the smallest versions of +.UX . +.PP +The syntax of BC has been deliberately selected to agree +substantially with the C language [2]. Those who +are familiar with C will find few surprises in this language. +.SH +Simple Computations with Integers +.PP +The simplest kind of statement is an arithmetic expression +on a line by itself. +For instance, if you type in the line: +.DS +.ft B +142857 + 285714 +.ft P +.DE +the program responds immediately with the line +.DS +.ft B +428571 +.ft P +.DE +The operators \-, *, /, %, and ^ can also be used; they +indicate subtraction, multiplication, division, remaindering, and +exponentiation, respectively. Division of integers produces an +integer result truncated toward zero. +Division by zero produces an error +comment. +.PP +Any term in an expression may be prefixed by a minus sign to +indicate that it is to be negated (the `unary' minus sign). +The expression +.DS +.ft B +7+\-3 +.ft P +.DE +is interpreted to mean that \-3 is to be added to 7. +.PP +More complex expressions with several operators and with +parentheses are interpreted just as in +Fortran, with ^ having the greatest binding +power, then * and % and /, and finally + and \-. +Contents of parentheses are evaluated before material +outside the parentheses. +Exponentiations are +performed from right to left and the other operators +from left to right. +The two expressions +.DS +.ft B +a^b^c and a^(b^c) +.ft P +.DE +are equivalent, as are the two expressions +.DS +.ft B +a*b*c and (a*b)*c +.ft P +.DE +BC shares with Fortran and C the undesirable convention that +.DS +\fBa/b*c\fP is equivalent to \fB(a/b)*c\fP +.ft P +.DE +.PP +Internal storage registers to hold numbers have single lower-case +letter names. The value of an expression can be assigned to +a register in the usual way. The statement +.DS +.ft B +x = x + 3 +.ft P +.DE +has the effect of increasing by three the value of the contents of the +register named x. +When, as in this case, the outermost operator is an =, the +assignment is performed but the result is not printed. +Only 26 of these named storage registers are available. +.PP +There is a built-in square root function whose +result is truncated to an integer (but see scaling below). +The lines +.DS +.ft B +x = sqrt(191) +x +.ft P +.DE +produce the printed result +.DS +.ft B +13 +.ft P +.DE +.SH +Bases +.PP +There are special internal quantities, called `ibase' and `obase'. +The contents of `ibase', initially set to 10, +determines the base used for interpreting numbers read in. +For example, the lines +.DS +.ft B +ibase = 8 +11 +.ft P +.DE +will produce the output line +.DS +.ft B +9 +.ft P +.DE +and you are all set up to do octal to decimal conversions. +Beware, however of trying to change the input base back +to decimal by typing +.DS +.ft B +ibase = 10 +.ft P +.DE +Because the number 10 is interpreted as octal, this statement will +have no effect. +For those who deal in hexadecimal notation, +the characters A\-F are permitted in numbers +(no matter what base is in effect) +and are +interpreted as digits having values 10\-15 respectively. +The statement +.DS +.ft B +ibase = A +.ft P +.DE +will change you back to decimal input base no matter what the +current input base is. +Negative and large positive input bases are +permitted but useless. +No mechanism has been provided for the input of arbitrary +numbers in bases less than 1 and greater than 16. +.PP +The contents of `obase', initially set to 10, are used as the base for output +numbers. The lines +.DS +.ft B +obase = 16 +1000 +.ft P +.DE +will produce the output line +.DS +.ft B +3E8 +.ft P +.DE +which is to be interpreted as a 3-digit hexadecimal number. +Very large output bases are permitted, and they are sometimes useful. +For example, large numbers can be output in groups of five digits +by setting `obase' to 100000. +Strange (i.e. 1, 0, or negative) output bases are +handled appropriately. +.PP +Very large numbers are split across lines with 70 characters per line. +Lines which are continued end with \\. +Decimal output conversion is practically instantaneous, but output +of very large numbers (i.e., more than 100 digits) with other bases +is rather slow. +Non-decimal output conversion of +a one hundred digit number takes about +three seconds. +.PP +It is best to remember that `ibase' and `obase' have no effect +whatever on the course of internal computation or +on the evaluation of expressions, but only affect input and +output conversion, respectively. +.SH +Scaling +.PP +A third special internal quantity called `scale' is +used to determine the scale of calculated +quantities. +Numbers may have +up to a specific number of decimal digits after the decimal point. +This fractional part is retained in further computations. +We refer to the number of digits after the decimal point of +a number as its scale. +The current implementation allows scales to be as large as can be +represented by a 32-bit unsigned number minus one. +This is a non-portable extension. +The original implementation allowed for a maximum scale of 99. +.PP +When two scaled numbers are combined by +means of one of the arithmetic operations, the result +has a scale determined by the following rules. For +addition and subtraction, the scale of the result is the larger +of the scales of the two operands. In this case, +there is never any truncation of the result. +For multiplications, the scale of the result is never +less than the maximum of the two scales of the operands, +never more than the sum of the scales of the operands +and, subject to those two restrictions, +the scale of the result is set equal to the contents of the internal +quantity `scale'. +The scale of a quotient is the contents of the internal +quantity `scale'. The scale of a remainder is +the sum of the scales of the quotient and the divisor. +The result of an exponentiation is scaled as if +the implied multiplications were performed. +An exponent must be an integer. +The scale of a square root is set to the maximum of the scale +of the argument and the contents of `scale'. +.PP +All of the internal operations are actually carried out in terms +of integers, with digits being discarded when necessary. +In every case where digits are discarded, truncation and +not rounding is performed. +.PP +The contents of +`scale' must be no greater than +4294967294 and no less than 0. It is initially set to 0. +.PP +The internal quantities `scale', `ibase', and `obase' can be +used in expressions just like other variables. +The line +.DS +.ft B +scale = scale + 1 +.ft P +.DE +increases the value of `scale' by one, and the line +.DS +.ft B +scale +.ft P +.DE +causes the current value of `scale' to be printed. +.PP +The value of `scale' retains its meaning as a +number of decimal digits to be retained in internal +computation even when `ibase' or `obase' are not equal to 10. +The internal computations (which are still conducted in decimal, +regardless of the bases) are performed to the specified number +of decimal digits, never hexadecimal or octal or any +other kind of digits. +.SH +Functions +.PP +The name of a function is a single lower-case letter. +Function names are permitted to collide with simple +variable names. +Twenty-six different defined functions are permitted +in addition to the twenty-six variable names. +The line +.DS +.ft B + define a(x){ +.ft P +.DE +begins the definition of a function with one argument. +This line must be followed by one or more statements, +which make up the body of the function, ending +with a right brace }. +Return of control from a function occurs when a return +statement is executed or when the end of the function is reached. +The return statement can take either +of the two forms +.DS +.ft B +return +return(x) +.ft P +.DE +In the first case, the value of the function is 0, and in +the second, the value of the expression in parentheses. +.PP +Variables used in the function can be declared as automatic +by a statement of the form +.DS +.ft B +auto x,y,z +.ft P +.DE +There can be only one `auto' statement in a function and it must +be the first statement in the definition. +These automatic variables are allocated space and initialized +to zero on entry to the function and thrown away on return. The +values of any variables with the same names outside the function +are not disturbed. +Functions may be called recursively and the automatic variables +at each level of call are protected. +The parameters named in a function definition are treated in +the same way as the automatic variables of that function +with the single exception that they are given a value +on entry to the function. +An example of a function definition is +.DS +.ft B + define a(x,y){ + auto z + z = x*y + return(z) + } +.ft P +.DE +The value of this function, when called, will be the +product of its +two arguments. +.PP +A function is called by the appearance of its name +followed by a string of arguments enclosed in +parentheses and separated by commas. +The result +is unpredictable if the wrong number of arguments is used. +.PP +Functions with no arguments are defined and called using +parentheses with nothing between them: b(). +.PP +If the function +.ft I +a +.ft +above has been defined, then the line +.DS +.ft B +a(7,3.14) +.ft P +.DE +would cause the result 21.98 to be printed and the line +.DS +.ft B +x = a(a(3,4),5) +.ft P +.DE +would cause the value of x to become 60. +.SH +Subscripted Variables +.PP +A single lower-case letter variable name +followed by an expression in brackets is called a subscripted +variable (an array element). +The variable name is called the array name and the expression +in brackets is called the subscript. +Only one-dimensional arrays are +permitted. The names of arrays are permitted to +collide with the names of simple variables and function names. +Any fractional +part of a subscript is discarded before use. +Subscripts must be greater than or equal to zero and +less than or equal to 2047. +.PP +Subscripted variables may be freely used in expressions, in +function calls, and in return statements. +.PP +An array name may be used as an argument to a function, +or may be declared as automatic in +a function definition by the use of empty brackets: +.DS +.ft B +f(a[\|]) +define f(a[\|]) +auto a[\|] +.ft P +.DE +When an array name is so used, the whole contents of the array +are copied for the use of the function, and thrown away on exit +from the function. +Array names which refer to whole arrays cannot be used +in any other contexts. +.SH +Control Statements +.PP +The `if', the `while', and the `for' statements +may be used to alter the flow within programs or to cause iteration. +The range of each of them is a statement or +a compound statement consisting of a collection of +statements enclosed in braces. +They are written in the following way +.DS +.ft B +if(relation) statement +if(relation) statement else statement +while(relation) statement +for(expression1; relation; expression2) statement +.ft P +.DE +or +.DS +.ft B +if(relation) {statements} +if(relation) {statements} else {statements} +while(relation) {statements} +for(expression1; relation; expression2) {statements} +.ft P +.DE +.PP +A relation in one of the control statements is an expression of the form +.DS +.ft B +x>y +.ft P +.DE +where two expressions are related by one of the six relational +operators `<', `>', `<=', `>=', `==', or `!='. +The relation `==' +stands for `equal to' and `!=' stands for `not equal to'. +The meaning of the remaining relational operators is +clear. +.PP +BEWARE of using `=' instead of `==' in a relational. Unfortunately, +both of them are legal, so you will not get a diagnostic +message, but `=' really will not do a comparison. +.PP +The `if' statement causes execution of its range +if and only if the relation is true. +Then control passes to the next statement in sequence. +If an `else' branch is present, the statements in this branch are +executed if the relation is false. +The `else' keyword is a non-portable extension. +.PP +The `while' statement causes execution of its range +repeatedly as long as the relation +is true. The relation is tested before each execution +of its range and if the relation +is false, control passes to the next statement beyond the range +of the while. +.PP +The `for' statement begins +by executing `expression1'. Then the relation is tested +and, if true, the statements in the range of the `for' are executed. +Then `expression2' is executed. The relation is tested, and so on. +The typical use of the `for' statement is for a controlled iteration, +as in the statement +.DS +.ft B +for(i=1; i<=10; i=i+1) i +.ft P +.DE +which will print the integers from 1 to 10. +Here are some examples of the use of the control statements. +.DS +.ft B +define f(n){ +auto i, x +x=1 +for(i=1; i<=n; i=i+1) x=x*i +return(x) +} +.ft P +.DE +The line +.DS +.ft B + f(a) +.ft P +.DE +will print +.ft I +a +.ft +factorial if +.ft I +a +.ft +is a positive integer. +Here is the definition of a function which will +compute values of the binomial coefficient +(m and n are assumed to be positive integers). +.DS +.ft B +define b(n,m){ +auto x, j +x=1 +for(j=1; j<=m; j=j+1) x=x*(n\-j+1)/j +return(x) +} +.ft P +.DE +The following function computes values of the exponential function +by summing the appropriate series +without regard for possible truncation errors: +.DS +.ft B +scale = 20 +define e(x){ + auto a, b, c, d, n + a = 1 + b = 1 + c = 1 + d = 0 + n = 1 + while(1==1){ + a = a*x + b = b*n + c = c + a/b + n = n + 1 + if(c==d) return(c) + d = c + } +} +.ft P +.DE +.SH +Some Details +.PP +There are some language features that every user should know +about even if he will not use them. +.PP +Normally statements are typed one to a line. It is also permissible +to type several statements on a line separated by semicolons. +.PP +If an assignment statement is parenthesized, it then has +a value and it can be used anywhere that an expression can. +For example, the line +.DS +.ft B +(x=y+17) +.ft P +.DE +not only makes the indicated assignment, but also prints the +resulting value. +.PP +Here is an example of a use of the value of an +assignment statement even when it is not parenthesized. +.DS +.ft B +x = a[i=i+1] +.ft P +.DE +causes a value to be assigned to x and also increments i +before it is used as a subscript. +.PP +The following constructs work in BC in exactly the same manner +as they do in the C language. Consult the appendix or the +C manuals [2] for their exact workings. +.DS +.ft B +.ta 2i +x=y=z is the same as x=(y=z) +x += y x = x+y +x \-= y x = x\-y +x *= y x = x*y +x /= y x = x/y +x %= y x = x%y +x ^= y x = x^y +x++ (x=x+1)\-1 +x\-\- (x=x\-1)+1 +++x x = x+1 +\-\-x x = x\-1 +.ft P +.DE +Even if you don't intend to use the constructs, +if you type one inadvertently, something correct but unexpected +may happen. +.SH +Three Important Things +.PP +1. To exit a BC program, type `quit'. +.PP +2. There is a comment convention identical to that of C and +of PL/I. Comments begin with `/*' and end with `*/'. +As a non-portable extension, comments may also start with a `#' and end with +a newline. +The newline is not part of the comment. +.PP +3. There is a library of math functions which may be obtained by +typing at command level +.DS +.ft B +bc \-l +.ft P +.DE +This command will load a set of library functions +which, at the time of writing, consists of sine (named `s'), +cosine (`c'), arctangent (`a'), natural logarithm (`l'), +exponential (`e') and Bessel functions of integer order (`j(n,x)'). Doubtless more functions will be added +in time. +The library sets the scale to 20. You can reset it to something +else if you like. +The design of these mathematical library routines +is discussed elsewhere [3]. +.PP +If you type +.DS +.ft B +bc file ... +.ft P +.DE +BC will read and execute the named file or files before accepting +commands from the keyboard. In this way, you may load your +favorite programs and function definitions. +.SH +Acknowledgement +.PP +The compiler is written in YACC [4]; its original +version was written by S. C. Johnson. +.SH +References +.IP [1] +K. Thompson and D. M. Ritchie, +.ft I +UNIX Programmer's Manual, +.ft +Bell Laboratories, +1978. +.IP [2] +B. W. Kernighan and +D. M. Ritchie, +.ft I +The C Programming Language, +.ft +Prentice-Hall, 1978. +.IP [3] +R. Morris, +.ft I +A Library of Reference Standard Mathematical Subroutines, +.ft +Bell Laboratories internal memorandum, 1975. +.IP [4] +S. C. Johnson, +.ft I +YACC \(em Yet Another Compiler-Compiler. +.ft +Bell Laboratories Computing Science Technical Report #32, 1978. +.IP [5] +R. Morris and L. L. Cherry, +.ft I +DC \- An Interactive Desk Calculator. +.ft +.LP +.bp +.ft B +.DS C +Appendix +.DE +.ft +.NH +Notation +.PP +In the following pages syntactic categories are in \fIitalics\fP; +literals are in \fBbold\fP; material in brackets [\|] is optional. +.NH +Tokens +.PP +Tokens consist of keywords, identifiers, constants, operators, +and separators. +Token separators may be blanks, tabs or comments. +Newline characters or semicolons separate statements. +.NH 2 +Comments +.PP +Comments are introduced by the characters /* and terminated by +*/. +As a non-portable extension, comments may also start with a # and +end with a newline. +The newline is not part of the comment. +.NH 2 +Identifiers +.PP +There are three kinds of identifiers \- ordinary identifiers, array identifiers +and function identifiers. +All three types consist of single lower-case letters. +Array identifiers are followed by square brackets, possibly +enclosing an expression describing a subscript. +Arrays are singly dimensioned and may contain up to 2048 +elements. +Indexing begins at zero so an array may be indexed from 0 to 2047. +Subscripts are truncated to integers. +Function identifiers are followed by parentheses, possibly enclosing arguments. +The three types of identifiers do not conflict; +a program can have a variable named \fBx\fP, +an array named \fBx\fP and a function named \fBx\fP, all of which are separate and +distinct. +.NH 2 +Keywords +.PP +The following are reserved keywords: +.ft B +.ta .5i 1.0i +.nf + ibase if + obase break + scale define + sqrt auto + length return + while quit + for continue + else last + print +.fi +.ft +.NH 2 +Constants +.PP +Constants consist of arbitrarily long numbers +with an optional decimal point. +The hexadecimal digits \fBA\fP\-\fBF\fP are also recognized as digits with +values 10\-15, respectively. +.NH 1 +Expressions +.PP +The value of an expression is printed unless the main +operator is an assignment. +The value printed is assigned to the special variable \fBlast\fP. +A single dot may be used as a synonym for \fBlast\fP. +This is a non-portable extension. +Precedence is the same as the order +of presentation here, with highest appearing first. +Left or right associativity, where applicable, is +discussed with each operator. +.bp +.NH 2 +Primitive expressions +.NH 3 +Named expressions +.PP +Named expressions are +places where values are stored. +Simply stated, +named expressions are legal on the left +side of an assignment. +The value of a named expression is the value stored in the place named. +.NH 4 +\fIidentifiers\fR +.PP +Simple identifiers are named expressions. +They have an initial value of zero. +.NH 4 +\fIarray-name\fP\|[\|\fIexpression\fP\|] +.PP +Array elements are named expressions. +They have an initial value of zero. +.NH 4 +\fBscale\fR, \fBibase\fR and \fBobase\fR +.PP +The internal registers +\fBscale\fP, \fBibase\fP and \fBobase\fP are all named expressions. +\fBscale\fP is the number of digits after the decimal point to be +retained in arithmetic operations. +\fBscale\fR has an initial value of zero. +\fBibase\fP and \fBobase\fP are the input and output number +radix respectively. +Both \fBibase\fR and \fBobase\fR have initial values of 10. +.NH 3 +Function calls +.NH 4 +\fIfunction-name\fB\|(\fR[\fIexpression\fR\|[\fB,\|\fIexpression\|\fR.\|.\|.\|]\|]\fB) +.PP +A function call consists of a function name followed by parentheses +containing a comma-separated list of +expressions, which are the function arguments. +A whole array passed as an argument is specified by the +array name followed by empty square brackets. +All function arguments are passed by +value. +As a result, changes made to the formal parameters have +no effect on the actual arguments. +If the function terminates by executing a return +statement, the value of the function is +the value of the expression in the parentheses of the return +statement or is zero if no expression is provided +or if there is no return statement. +.NH 4 +sqrt\|(\|\fIexpression\fP\|) +.PP +The result is the square root of the expression. +The result is truncated in the least significant decimal place. +The scale of the result is +the scale of the expression or the +value of +.ft B +scale, +.ft +whichever is larger. +.NH 4 +length\|(\|\fIexpression\fP\|) +.PP +The result is the total number of significant decimal digits in the expression. +The scale of the result is zero. +.NH 4 +scale\|(\|\fIexpression\fP\|) +.PP +The result is the scale of the expression. +The scale of the result is zero. +.NH 3 +Constants +.PP +Constants are primitive expressions. +.NH 3 +Parentheses +.PP +An expression surrounded by parentheses is +a primitive expression. +The parentheses are used to alter the +normal precedence. +.NH 2 +Unary operators +.PP +The unary operators +bind right to left. +.NH 3 +\-\|\fIexpression\fP *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 22:26:37 2010 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 042CC106566C; Wed, 20 Jan 2010 22:26:37 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E904C8FC1D; Wed, 20 Jan 2010 22:26:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KMQaU0036006; Wed, 20 Jan 2010 22:26:36 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KMQas9036004; Wed, 20 Jan 2010 22:26:36 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201001202226.o0KMQas9036004@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 20 Jan 2010 22:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202721 - head/lib/libc/sys 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: Wed, 20 Jan 2010 22:26:37 -0000 Author: pjd Date: Wed Jan 20 22:26:36 2010 New Revision: 202721 URL: http://svn.freebsd.org/changeset/base/202721 Log: The waitpid(2) function needs neither sys/time.h nor sys/resource.h. Modified: head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Wed Jan 20 22:18:57 2010 (r202720) +++ head/lib/libc/sys/wait.2 Wed Jan 20 22:26:36 2010 (r202721) @@ -44,10 +44,10 @@ .In sys/wait.h .Ft pid_t .Fn wait "int *status" -.In sys/time.h -.In sys/resource.h .Ft pid_t .Fn waitpid "pid_t wpid" "int *status" "int options" +.In sys/time.h +.In sys/resource.h .Ft pid_t .Fn wait3 "int *status" "int options" "struct rusage *rusage" .Ft pid_t From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 22:36:24 2010 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 497D51065670; Wed, 20 Jan 2010 22:36:24 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 113298FC1F; Wed, 20 Jan 2010 22:36:24 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 567491CE54; Wed, 20 Jan 2010 23:36:23 +0100 (CET) Date: Wed, 20 Jan 2010 23:36:23 +0100 From: Ed Schouten To: Gabor Kovesdan Message-ID: <20100120223623.GI77705@hoeg.nl> References: <201001202130.o0KLUqxq023409@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="boAH8PqvUi1v1f55" Content-Disposition: inline In-Reply-To: <201001202130.o0KLUqxq023409@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: r202719 - in head: . gnu/usr.bin usr.bin usr.bin/bc usr.bin/bc/USD.doc usr.bin/dc usr.bin/dc/USD.doc 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: Wed, 20 Jan 2010 22:36:24 -0000 --boAH8PqvUi1v1f55 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Gabor, First of all, very nice job! * Gabor Kovesdan wrote: > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/ObsoleteFiles.inc Wed Jan 20 21:12:30 2010 (r202718) > +++ head/ObsoleteFiles.inc Wed Jan 20 21:30:52 2010 (r202719) > @@ -14,6 +14,13 @@ > # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS l= ast. > # > =20 > +# 20100120: replacing GNU bc/dc with BSDL versions > +OLD_FILES+=3Dusr/share/examples/bc/ckbook.b > +OLD_FILES+=3Dusr/share/examples/bc/pi.b > +OLD_FILES+=3Dusr/share/examples/bc/primes.b > +OLD_FILES+=3Dusr/share/examples/bc/twins.b > +OLD_FILES+=3Dusr/share/info/dc.info.gz > +OLD_DIRS+=3Dusr/share/examples/bc > # 20100114: removal of ttyslot(3) > OLD_FILES+=3Dusr/share/man/man3/ttyslot.3.gz > # 20100113: remove utmp.h, replace it by utmpx.h Not that I care about these example files, but why have they been removed? Are they GPL licensed as well? --=20 Ed Schouten WWW: http://80386.nl/ --boAH8PqvUi1v1f55 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktXhWcACgkQ52SDGA2eCwVrQQCcDLrjpOxa51lV21a8eVeG/cdR Lr4Ani2KKk2WBANBTV8T9iPFS202IndV =KhfD -----END PGP SIGNATURE----- --boAH8PqvUi1v1f55-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 22:39:37 2010 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 E44D61065670; Wed, 20 Jan 2010 22:39:37 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 997B78FC1B; Wed, 20 Jan 2010 22:39:37 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 9C18A14DA30E; Wed, 20 Jan 2010 23:39:36 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fDoZvgezuN22; Wed, 20 Jan 2010 23:39:27 +0100 (CET) Received: from [192.168.1.105] (catv-89-132-179-104.catv.broadband.hu [89.132.179.104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 29EDB14DA2FD; Wed, 20 Jan 2010 23:39:27 +0100 (CET) Message-ID: <4B57861D.6040507@FreeBSD.org> Date: Wed, 20 Jan 2010 23:39:25 +0100 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; es-ES; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Ed Schouten References: <201001202130.o0KLUqxq023409@svn.freebsd.org> <20100120223623.GI77705@hoeg.nl> In-Reply-To: <20100120223623.GI77705@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202719 - in head: . gnu/usr.bin usr.bin usr.bin/bc usr.bin/bc/USD.doc usr.bin/dc usr.bin/dc/USD.doc 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: Wed, 20 Jan 2010 22:39:38 -0000 El 2010. 01. 20. 23:36, Ed Schouten escribió: >> >> +# 20100120: replacing GNU bc/dc with BSDL versions >> +OLD_FILES+=usr/share/examples/bc/ckbook.b >> +OLD_FILES+=usr/share/examples/bc/pi.b >> +OLD_FILES+=usr/share/examples/bc/primes.b >> +OLD_FILES+=usr/share/examples/bc/twins.b >> +OLD_FILES+=usr/share/info/dc.info.gz >> +OLD_DIRS+=usr/share/examples/bc >> # 20100114: removal of ttyslot(3) >> OLD_FILES+=usr/share/man/man3/ttyslot.3.gz >> # 20100113: remove utmp.h, replace it by utmpx.h >> > Not that I care about these example files, but why have they been > removed? Are they GPL licensed as well? > Most probably, yes. They are part of the GNU bc distribution and there is no implicit license information inside the files or the Examples directory, which imo means the same license apply to these files. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 22:46:00 2010 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 252A1106566B; Wed, 20 Jan 2010 22:46:00 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 161D98FC0C; Wed, 20 Jan 2010 22:46:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KMjxrn040395; Wed, 20 Jan 2010 22:45:59 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KMjx68040393; Wed, 20 Jan 2010 22:45:59 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201001202245.o0KMjx68040393@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 20 Jan 2010 22:45:59 +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: r202722 - head/sys/sys 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: Wed, 20 Jan 2010 22:46:00 -0000 Author: gabor (doc,ports committer) Date: Wed Jan 20 22:45:59 2010 New Revision: 202722 URL: http://svn.freebsd.org/changeset/base/202722 Log: - Bump __FreeBSD_version for BSDL bc/dc import to deprecate GNU bc/dc Approved by: delphij Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Jan 20 22:26:36 2010 (r202721) +++ head/sys/sys/param.h Wed Jan 20 22:45:59 2010 (r202722) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900007 /* Master, propagated to newvers */ +#define __FreeBSD_version 900008 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 00:15:59 2010 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 D0507106568F; Thu, 21 Jan 2010 00:15:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C01C38FC14; Thu, 21 Jan 2010 00:15:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0FxBl060333; Thu, 21 Jan 2010 00:15:59 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0Fxm2060330; Thu, 21 Jan 2010 00:15:59 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201001210015.o0L0Fxm2060330@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Thu, 21 Jan 2010 00:15:59 +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: r202723 - head/sys/mips/atheros 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: Thu, 21 Jan 2010 00:15:59 -0000 Author: gonzo Date: Thu Jan 21 00:15:59 2010 New Revision: 202723 URL: http://svn.freebsd.org/changeset/base/202723 Log: - Remove unnecessary register writes in activate_device and deactivate_device - Save state before attaching driver and restore it when detaching - Clear CLK bit after last bit of byte has been sent over the bus providing falling edge for last byte in transfer - Fix several places where CS0 was always assumed - Add $FreeBSD$ to ar71xxreg.h Modified: head/sys/mips/atheros/ar71xx_spi.c head/sys/mips/atheros/ar71xxreg.h Modified: head/sys/mips/atheros/ar71xx_spi.c ============================================================================== --- head/sys/mips/atheros/ar71xx_spi.c Wed Jan 20 22:45:59 2010 (r202722) +++ head/sys/mips/atheros/ar71xx_spi.c Thu Jan 21 00:15:59 2010 (r202723) @@ -77,7 +77,7 @@ __FBSDID("$FreeBSD$"); struct ar71xx_spi_softc { device_t sc_dev; struct resource *sc_mem_res; - uint32_t sc_reg_ioctrl; + uint32_t sc_reg_ctrl; }; static int @@ -102,12 +102,11 @@ ar71xx_spi_attach(device_t dev) return (ENXIO); } - sc->sc_reg_ioctrl = SPI_READ(sc, AR71XX_SPI_IO_CTRL); - SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, SPI_IO_CTRL_CS0 | SPI_IO_CTRL_CS1 | - SPI_IO_CTRL_CS2); - SPI_WRITE(sc, AR71XX_SPI_CTRL, sc->sc_reg_ioctrl); - SPI_WRITE(sc, AR71XX_SPI_FS, 0); + SPI_WRITE(sc, AR71XX_SPI_FS, 1); + sc->sc_reg_ctrl = SPI_READ(sc, AR71XX_SPI_CTRL); + SPI_WRITE(sc, AR71XX_SPI_CTRL, 0x43); + SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, SPI_IO_CTRL_CSMASK); device_add_child(dev, "spibus", 0); return (bus_generic_attach(dev)); @@ -116,14 +115,12 @@ ar71xx_spi_attach(device_t dev) static void ar71xx_spi_chip_activate(struct ar71xx_spi_softc *sc, int cs) { - uint32_t ioctrl = SPI_IO_CTRL_CS0 |SPI_IO_CTRL_CS1 | SPI_IO_CTRL_CS2; + uint32_t ioctrl = SPI_IO_CTRL_CSMASK; /* * Put respective CSx to low */ ioctrl &= ~(SPI_IO_CTRL_CS0 << cs); - SPI_WRITE(sc, AR71XX_SPI_FS, 1); - SPI_WRITE(sc, AR71XX_SPI_CTRL, 0x43); SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, ioctrl); } @@ -133,18 +130,19 @@ ar71xx_spi_chip_deactivate(struct ar71xx /* * Put all CSx to high */ - SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, SPI_IO_CTRL_CS0 | SPI_IO_CTRL_CS1 | - SPI_IO_CTRL_CS2); - SPI_WRITE(sc, AR71XX_SPI_CTRL, sc->sc_reg_ioctrl); - SPI_WRITE(sc, AR71XX_SPI_FS, 0); + SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, SPI_IO_CTRL_CSMASK); } static uint8_t -ar71xx_spi_txrx(struct ar71xx_spi_softc *sc, uint8_t data) +ar71xx_spi_txrx(struct ar71xx_spi_softc *sc, int cs, uint8_t data) { int bit; /* CS0 */ - uint32_t ioctrl = SPI_IO_CTRL_CS1 | SPI_IO_CTRL_CS2; + uint32_t ioctrl = SPI_IO_CTRL_CSMASK; + /* + * low-level for selected CS + */ + ioctrl &= ~(SPI_IO_CTRL_CS0 << cs); uint32_t iod, rds; for (bit = 7; bit >=0; bit--) { @@ -156,6 +154,10 @@ ar71xx_spi_txrx(struct ar71xx_spi_softc SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, iod | SPI_IO_CTRL_CLK); } + /* + * Provide falling edge for connected device by clear clock bit. + */ + SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, iod); rds = SPI_READ(sc, AR71XX_SPI_RDS); return (rds & 0xff); @@ -184,7 +186,7 @@ ar71xx_spi_transfer(device_t dev, device buf_out = (uint8_t *)cmd->tx_cmd; buf_in = (uint8_t *)cmd->rx_cmd; for (i = 0; i < cmd->tx_cmd_sz; i++) - buf_in[i] = ar71xx_spi_txrx(sc, buf_out[i]); + buf_in[i] = ar71xx_spi_txrx(sc, devi->cs, buf_out[i]); /* * Receive/transmit data (depends on command) @@ -192,7 +194,7 @@ ar71xx_spi_transfer(device_t dev, device buf_out = (uint8_t *)cmd->tx_data; buf_in = (uint8_t *)cmd->rx_data; for (i = 0; i < cmd->tx_data_sz; i++) - buf_in[i] = ar71xx_spi_txrx(sc, buf_out[i]); + buf_in[i] = ar71xx_spi_txrx(sc, devi->cs, buf_out[i]); ar71xx_spi_chip_deactivate(sc, devi->cs); @@ -202,8 +204,15 @@ ar71xx_spi_transfer(device_t dev, device static int ar71xx_spi_detach(device_t dev) { + struct ar71xx_spi_softc *sc = device_get_softc(dev); - return (EBUSY); /* XXX */ + SPI_WRITE(sc, AR71XX_SPI_CTRL, sc->sc_reg_ctrl); + SPI_WRITE(sc, AR71XX_SPI_FS, 0); + + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + + return (0); } static device_method_t ar71xx_spi_methods[] = { Modified: head/sys/mips/atheros/ar71xxreg.h ============================================================================== --- head/sys/mips/atheros/ar71xxreg.h Wed Jan 20 22:45:59 2010 (r202722) +++ head/sys/mips/atheros/ar71xxreg.h Thu Jan 21 00:15:59 2010 (r202723) @@ -23,6 +23,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +/* $FreeBSD$ */ + #ifndef _AR71XX_REG_H_ #define _AR71XX_REG_H_ @@ -422,6 +425,7 @@ #define SPI_IO_CTRL_CS2 (1 << 18) #define SPI_IO_CTRL_CS1 (1 << 17) #define SPI_IO_CTRL_CS0 (1 << 16) +#define SPI_IO_CTRL_CSMASK (7 << 16) #define SPI_IO_CTRL_CLK (1 << 8) #define SPI_IO_CTRL_DO 1 #define AR71XX_SPI_RDS 0x0C From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 00:37:15 2010 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 5AC0B106566C; Thu, 21 Jan 2010 00:37:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A75F8FC12; Thu, 21 Jan 2010 00:37:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0bFlF065000; Thu, 21 Jan 2010 00:37:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0bFc7064997; Thu, 21 Jan 2010 00:37:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001210037.o0L0bFc7064997@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 21 Jan 2010 00:37:15 +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: r202724 - stable/8/sys/dev/mii 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: Thu, 21 Jan 2010 00:37:15 -0000 Author: yongari Date: Thu Jan 21 00:37:14 2010 New Revision: 202724 URL: http://svn.freebsd.org/changeset/base/202724 Log: MFC r202269: Add BCM5754 PHY id that is found on Dell Studio XPS 16. Modified: stable/8/sys/dev/mii/brgphy.c stable/8/sys/dev/mii/miidevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/brgphy.c ============================================================================== --- stable/8/sys/dev/mii/brgphy.c Thu Jan 21 00:15:59 2010 (r202723) +++ stable/8/sys/dev/mii/brgphy.c Thu Jan 21 00:37:14 2010 (r202724) @@ -133,6 +133,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5708S), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709CAX), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5722), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), MII_PHY_DESC(BROADCOM2, BCM5906), Modified: stable/8/sys/dev/mii/miidevs ============================================================================== --- stable/8/sys/dev/mii/miidevs Thu Jan 21 00:15:59 2010 (r202723) +++ stable/8/sys/dev/mii/miidevs Thu Jan 21 00:37:14 2010 (r202724) @@ -153,6 +153,7 @@ model xxBROADCOM_ALT1 BCM5787 0x000e BCM model xxBROADCOM_ALT1 BCM5708S 0x0015 BCM5708S 1000/2500BaseSX PHY model xxBROADCOM_ALT1 BCM5709CAX 0x002c BCM5709C(AX) 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5722 0x002d BCM5722 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5784 0x003a BCM5784 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 00:39:46 2010 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 5657D1065672; Thu, 21 Jan 2010 00:39:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 461948FC18; Thu, 21 Jan 2010 00:39:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0dkM2065603; Thu, 21 Jan 2010 00:39:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0dkl3065600; Thu, 21 Jan 2010 00:39:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001210039.o0L0dkl3065600@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 21 Jan 2010 00:39:46 +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: r202725 - stable/7/sys/dev/mii 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: Thu, 21 Jan 2010 00:39:46 -0000 Author: yongari Date: Thu Jan 21 00:39:45 2010 New Revision: 202725 URL: http://svn.freebsd.org/changeset/base/202725 Log: MFC r202269: Add BCM5754 PHY id that is found on Dell Studio XPS 16. Modified: stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/miidevs Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Thu Jan 21 00:37:14 2010 (r202724) +++ stable/7/sys/dev/mii/brgphy.c Thu Jan 21 00:39:45 2010 (r202725) @@ -133,6 +133,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5708S), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709CAX), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5722), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), MII_PHY_DESC(BROADCOM2, BCM5906), Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Thu Jan 21 00:37:14 2010 (r202724) +++ stable/7/sys/dev/mii/miidevs Thu Jan 21 00:39:45 2010 (r202725) @@ -148,6 +148,7 @@ model xxBROADCOM_ALT1 BCM5787 0x000e BCM model xxBROADCOM_ALT1 BCM5708S 0x0015 BCM5708S 1000/2500BaseSX PHY model xxBROADCOM_ALT1 BCM5709CAX 0x002c BCM5709C(AX) 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5722 0x002d BCM5722 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5784 0x003a BCM5784 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 00:45:13 2010 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 167EA1065679; Thu, 21 Jan 2010 00:45:13 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05F3F8FC1A; Thu, 21 Jan 2010 00:45:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0jCRP066845; Thu, 21 Jan 2010 00:45:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0jCF3066842; Thu, 21 Jan 2010 00:45:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001210045.o0L0jCF3066842@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 21 Jan 2010 00:45:12 +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: r202726 - stable/8/sys/dev/bge 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: Thu, 21 Jan 2010 00:45:13 -0000 Author: yongari Date: Thu Jan 21 00:45:12 2010 New Revision: 202726 URL: http://svn.freebsd.org/changeset/base/202726 Log: MFC r202293: For controllers that has dual mode PHY(copper or fiber) interfaces over GMII, make sure to enable GMII. With this change brgphy(4) is used to handle the dual mode PHY. Since we still don't have a sane way to pass PHY specific information to mii(4) layer special handling is needed in brgphy(4) to determine which mode of PHY was configured in parent interface. This change make BCM5715S work. Tested by: olli Obtained from: OpenBSD PR: kern/122551 Modified: stable/8/sys/dev/bge/if_bge.c stable/8/sys/dev/bge/if_bgereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Thu Jan 21 00:39:45 2010 (r202725) +++ stable/8/sys/dev/bge/if_bge.c Thu Jan 21 00:45:12 2010 (r202726) @@ -901,7 +901,8 @@ bge_miibus_statchg(device_t dev) mii = device_get_softc(sc->bge_miibus); BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_PORTMODE); - if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || + IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_GMII); else BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_MII); @@ -1782,13 +1783,20 @@ bge_blockinit(struct bge_softc *sc) if (!(BGE_IS_5705_PLUS(sc))) CSR_WRITE_4(sc, BGE_RXLS_MODE, BGE_RXLSMODE_ENABLE); + val = BGE_MACMODE_TXDMA_ENB | BGE_MACMODE_RXDMA_ENB | + BGE_MACMODE_RX_STATS_CLEAR | BGE_MACMODE_TX_STATS_CLEAR | + BGE_MACMODE_RX_STATS_ENB | BGE_MACMODE_TX_STATS_ENB | + BGE_MACMODE_FRMHDR_DMA_ENB; + + if (sc->bge_flags & BGE_FLAG_TBI) + val |= BGE_PORTMODE_TBI; + else if (sc->bge_flags & BGE_FLAG_MII_SERDES) + val |= BGE_PORTMODE_GMII; + else + val |= BGE_PORTMODE_MII; + /* Turn on DMA, clear stats */ - CSR_WRITE_4(sc, BGE_MAC_MODE, BGE_MACMODE_TXDMA_ENB | - BGE_MACMODE_RXDMA_ENB | BGE_MACMODE_RX_STATS_CLEAR | - BGE_MACMODE_TX_STATS_CLEAR | BGE_MACMODE_RX_STATS_ENB | - BGE_MACMODE_TX_STATS_ENB | BGE_MACMODE_FRMHDR_DMA_ENB | - ((sc->bge_flags & BGE_FLAG_TBI) ? - BGE_PORTMODE_TBI : BGE_PORTMODE_MII)); + CSR_WRITE_4(sc, BGE_MAC_MODE, val); /* Set misc. local control, enable interrupts on attentions */ CSR_WRITE_4(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN); @@ -2849,12 +2857,14 @@ bge_attach(device_t dev) hwcfg = ntohl(hwcfg); } - if ((hwcfg & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) - sc->bge_flags |= BGE_FLAG_TBI; - /* The SysKonnect SK-9D41 is a 1000baseSX card. */ - if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == SK_SUBSYSID_9D41) - sc->bge_flags |= BGE_FLAG_TBI; + if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == + SK_SUBSYSID_9D41 || (hwcfg & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) { + if (BGE_IS_5714_FAMILY(sc)) + sc->bge_flags |= BGE_FLAG_MII_SERDES; + else + sc->bge_flags |= BGE_FLAG_TBI; + } if (sc->bge_flags & BGE_FLAG_TBI) { ifmedia_init(&sc->bge_ifmedia, IFM_IMASK, bge_ifmedia_upd, Modified: stable/8/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/8/sys/dev/bge/if_bgereg.h Thu Jan 21 00:39:45 2010 (r202725) +++ stable/8/sys/dev/bge/if_bgereg.h Thu Jan 21 00:45:12 2010 (r202726) @@ -2602,6 +2602,7 @@ struct bge_softc { #define BGE_FLAG_JUMBO 0x00000002 #define BGE_FLAG_WIRESPEED 0x00000004 #define BGE_FLAG_EADDR 0x00000008 +#define BGE_FLAG_MII_SERDES 0x00000010 #define BGE_FLAG_MSI 0x00000100 #define BGE_FLAG_PCIX 0x00000200 #define BGE_FLAG_PCIE 0x00000400 From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 00:46:55 2010 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 118C2106566B; Thu, 21 Jan 2010 00:46:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 012618FC0C; Thu, 21 Jan 2010 00:46:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0ksqR067287; Thu, 21 Jan 2010 00:46:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0ksJp067284; Thu, 21 Jan 2010 00:46:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001210046.o0L0ksJp067284@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 21 Jan 2010 00:46:54 +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: r202727 - stable/7/sys/dev/bge 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: Thu, 21 Jan 2010 00:46:55 -0000 Author: yongari Date: Thu Jan 21 00:46:54 2010 New Revision: 202727 URL: http://svn.freebsd.org/changeset/base/202727 Log: MFC r202293: For controllers that has dual mode PHY(copper or fiber) interfaces over GMII, make sure to enable GMII. With this change brgphy(4) is used to handle the dual mode PHY. Since we still don't have a sane way to pass PHY specific information to mii(4) layer special handling is needed in brgphy(4) to determine which mode of PHY was configured in parent interface. This change make BCM5715S work. Tested by: olli Obtained from: OpenBSD PR: kern/122551 Modified: stable/7/sys/dev/bge/if_bge.c stable/7/sys/dev/bge/if_bgereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bge/if_bge.c ============================================================================== --- stable/7/sys/dev/bge/if_bge.c Thu Jan 21 00:45:12 2010 (r202726) +++ stable/7/sys/dev/bge/if_bge.c Thu Jan 21 00:46:54 2010 (r202727) @@ -901,7 +901,8 @@ bge_miibus_statchg(device_t dev) mii = device_get_softc(sc->bge_miibus); BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_PORTMODE); - if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || + IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_GMII); else BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_MII); @@ -1782,13 +1783,20 @@ bge_blockinit(struct bge_softc *sc) if (!(BGE_IS_5705_PLUS(sc))) CSR_WRITE_4(sc, BGE_RXLS_MODE, BGE_RXLSMODE_ENABLE); + val = BGE_MACMODE_TXDMA_ENB | BGE_MACMODE_RXDMA_ENB | + BGE_MACMODE_RX_STATS_CLEAR | BGE_MACMODE_TX_STATS_CLEAR | + BGE_MACMODE_RX_STATS_ENB | BGE_MACMODE_TX_STATS_ENB | + BGE_MACMODE_FRMHDR_DMA_ENB; + + if (sc->bge_flags & BGE_FLAG_TBI) + val |= BGE_PORTMODE_TBI; + else if (sc->bge_flags & BGE_FLAG_MII_SERDES) + val |= BGE_PORTMODE_GMII; + else + val |= BGE_PORTMODE_MII; + /* Turn on DMA, clear stats */ - CSR_WRITE_4(sc, BGE_MAC_MODE, BGE_MACMODE_TXDMA_ENB | - BGE_MACMODE_RXDMA_ENB | BGE_MACMODE_RX_STATS_CLEAR | - BGE_MACMODE_TX_STATS_CLEAR | BGE_MACMODE_RX_STATS_ENB | - BGE_MACMODE_TX_STATS_ENB | BGE_MACMODE_FRMHDR_DMA_ENB | - ((sc->bge_flags & BGE_FLAG_TBI) ? - BGE_PORTMODE_TBI : BGE_PORTMODE_MII)); + CSR_WRITE_4(sc, BGE_MAC_MODE, val); /* Set misc. local control, enable interrupts on attentions */ CSR_WRITE_4(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN); @@ -2849,12 +2857,14 @@ bge_attach(device_t dev) hwcfg = ntohl(hwcfg); } - if ((hwcfg & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) - sc->bge_flags |= BGE_FLAG_TBI; - /* The SysKonnect SK-9D41 is a 1000baseSX card. */ - if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == SK_SUBSYSID_9D41) - sc->bge_flags |= BGE_FLAG_TBI; + if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == + SK_SUBSYSID_9D41 || (hwcfg & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) { + if (BGE_IS_5714_FAMILY(sc)) + sc->bge_flags |= BGE_FLAG_MII_SERDES; + else + sc->bge_flags |= BGE_FLAG_TBI; + } if (sc->bge_flags & BGE_FLAG_TBI) { ifmedia_init(&sc->bge_ifmedia, IFM_IMASK, bge_ifmedia_upd, Modified: stable/7/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/7/sys/dev/bge/if_bgereg.h Thu Jan 21 00:45:12 2010 (r202726) +++ stable/7/sys/dev/bge/if_bgereg.h Thu Jan 21 00:46:54 2010 (r202727) @@ -2602,6 +2602,7 @@ struct bge_softc { #define BGE_FLAG_JUMBO 0x00000002 #define BGE_FLAG_WIRESPEED 0x00000004 #define BGE_FLAG_EADDR 0x00000008 +#define BGE_FLAG_MII_SERDES 0x00000010 #define BGE_FLAG_MSI 0x00000100 #define BGE_FLAG_PCIX 0x00000200 #define BGE_FLAG_PCIE 0x00000400 From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 00:49:15 2010 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 258E71065709; Thu, 21 Jan 2010 00:49:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 159018FC1F; Thu, 21 Jan 2010 00:49:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0nE6p067894; Thu, 21 Jan 2010 00:49:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0nE1l067892; Thu, 21 Jan 2010 00:49:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001210049.o0L0nE1l067892@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 21 Jan 2010 00:49:14 +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: r202728 - stable/8/sys/dev/mii 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: Thu, 21 Jan 2010 00:49:15 -0000 Author: yongari Date: Thu Jan 21 00:49:14 2010 New Revision: 202728 URL: http://svn.freebsd.org/changeset/base/202728 Log: MFC r202294: Add check for fiber mode for BCM5714 PHY. This PHY supports both copper and fiber interfaces over GMII so an explicit check is necessary to know whether it was configured for fiber interface. This change make BCM5715S work. Tested by: olli PR: kern/122551 Modified: stable/8/sys/dev/mii/brgphy.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/brgphy.c ============================================================================== --- stable/8/sys/dev/mii/brgphy.c Thu Jan 21 00:46:54 2010 (r202727) +++ stable/8/sys/dev/mii/brgphy.c Thu Jan 21 00:49:14 2010 (r202728) @@ -197,6 +197,7 @@ brgphy_attach(device_t dev) case MII_OUI_xxBROADCOM: switch (bsc->mii_model) { case MII_MODEL_xxBROADCOM_BCM5706: + case MII_MODEL_xxBROADCOM_BCM5714: /* * The 5464 PHY used in the 5706 supports both copper * and fiber interfaces over GMII. Need to check the From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 00:50:46 2010 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 EFE21106568F; Thu, 21 Jan 2010 00:50:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFCB98FC1D; Thu, 21 Jan 2010 00:50:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0oktQ068271; Thu, 21 Jan 2010 00:50:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0okHi068269; Thu, 21 Jan 2010 00:50:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001210050.o0L0okHi068269@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 21 Jan 2010 00:50:46 +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: r202729 - stable/7/sys/dev/mii 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: Thu, 21 Jan 2010 00:50:47 -0000 Author: yongari Date: Thu Jan 21 00:50:46 2010 New Revision: 202729 URL: http://svn.freebsd.org/changeset/base/202729 Log: MFC r202294: Add check for fiber mode for BCM5714 PHY. This PHY supports both copper and fiber interfaces over GMII so an explicit check is necessary to know whether it was configured for fiber interface. This change make BCM5715S work. Tested by: olli PR: kern/122551 Modified: stable/7/sys/dev/mii/brgphy.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Thu Jan 21 00:49:14 2010 (r202728) +++ stable/7/sys/dev/mii/brgphy.c Thu Jan 21 00:50:46 2010 (r202729) @@ -197,6 +197,7 @@ brgphy_attach(device_t dev) case MII_OUI_xxBROADCOM: switch (bsc->mii_model) { case MII_MODEL_xxBROADCOM_BCM5706: + case MII_MODEL_xxBROADCOM_BCM5714: /* * The 5464 PHY used in the 5706 supports both copper * and fiber interfaces over GMII. Need to check the From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 00:53:00 2010 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 A6B97106566C; Thu, 21 Jan 2010 00:53:00 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 909518FC16; Thu, 21 Jan 2010 00:53:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0r01s068806; Thu, 21 Jan 2010 00:53:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0r0Cn068804; Thu, 21 Jan 2010 00:53:00 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001210053.o0L0r0Cn068804@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 21 Jan 2010 00:53:00 +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: r202730 - stable/8/sys/dev/bge 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: Thu, 21 Jan 2010 00:53:00 -0000 Author: yongari Date: Thu Jan 21 00:53:00 2010 New Revision: 202730 URL: http://svn.freebsd.org/changeset/base/202730 Log: MFC r202406: Don't free mbuf chains when bge(4) fails to collapse the mbuf chains. This part of code is to enhance performance so failing the collapsing should not free TX frames. Otherwise bge(4) will unnecessarily drop frames which in turn can freeze the network connection. Reported by: Igor Sysoev (is <> rambler-co dot ru) Tested by: Igor Sysoev (is <> rambler-co dot ru) Modified: stable/8/sys/dev/bge/if_bge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Thu Jan 21 00:50:46 2010 (r202729) +++ stable/8/sys/dev/bge/if_bge.c Thu Jan 21 00:53:00 2010 (r202730) @@ -3948,11 +3948,8 @@ bge_encap(struct bge_softc *sc, struct m m = m_defrag(m, M_DONTWAIT); else m = m_collapse(m, M_DONTWAIT, sc->bge_forced_collapse); - if (m == NULL) { - m_freem(*m_head); - *m_head = NULL; - return (ENOBUFS); - } + if (m == NULL) + m = *m_head; *m_head = m; } From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 00:54:22 2010 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 634501065696; Thu, 21 Jan 2010 00:54:22 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 531A58FC0A; Thu, 21 Jan 2010 00:54:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0sMAR069147; Thu, 21 Jan 2010 00:54:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0sMcM069145; Thu, 21 Jan 2010 00:54:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001210054.o0L0sMcM069145@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 21 Jan 2010 00:54:22 +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: r202731 - stable/7/sys/dev/bge 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: Thu, 21 Jan 2010 00:54:22 -0000 Author: yongari Date: Thu Jan 21 00:54:22 2010 New Revision: 202731 URL: http://svn.freebsd.org/changeset/base/202731 Log: MFC r202406: Don't free mbuf chains when bge(4) fails to collapse the mbuf chains. This part of code is to enhance performance so failing the collapsing should not free TX frames. Otherwise bge(4) will unnecessarily drop frames which in turn can freeze the network connection. Reported by: Igor Sysoev (is <> rambler-co dot ru) Tested by: Igor Sysoev (is <> rambler-co dot ru) Modified: stable/7/sys/dev/bge/if_bge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bge/if_bge.c ============================================================================== --- stable/7/sys/dev/bge/if_bge.c Thu Jan 21 00:53:00 2010 (r202730) +++ stable/7/sys/dev/bge/if_bge.c Thu Jan 21 00:54:22 2010 (r202731) @@ -3944,11 +3944,8 @@ bge_encap(struct bge_softc *sc, struct m m = m_defrag(m, M_DONTWAIT); else m = m_collapse(m, M_DONTWAIT, sc->bge_forced_collapse); - if (m == NULL) { - m_freem(*m_head); - *m_head = NULL; - return (ENOBUFS); - } + if (m == NULL) + m = *m_head; *m_head = m; } From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 01:30:56 2010 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 3201A106566B; Thu, 21 Jan 2010 01:30:56 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f0f:20:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id EFE338FC08; Thu, 21 Jan 2010 01:30:55 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f0f:20:1::5]) by mail.farley.org (8.14.4/8.14.4) with ESMTP id o0L1UtqH076241; Wed, 20 Jan 2010 19:30:55 -0600 (CST) (envelope-from scf@FreeBSD.org) Date: Wed, 20 Jan 2010 19:30:55 -0600 (CST) From: "Sean C. Farley" To: Pyun YongHyeon In-Reply-To: <201001210037.o0L0bFc7064997@svn.freebsd.org> Message-ID: References: <201001210037.o0L0bFc7064997@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.farley.org Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r202724 - stable/8/sys/dev/mii 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: Thu, 21 Jan 2010 01:30:56 -0000 On Thu, 21 Jan 2010, Pyun YongHyeon wrote: > Author: yongari > Date: Thu Jan 21 00:37:14 2010 > New Revision: 202724 > URL: http://svn.freebsd.org/changeset/base/202724 > > Log: > MFC r202269: > Add BCM5754 PHY id that is found on Dell Studio XPS 16. Thank you! Sean -- scf@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 01:43:23 2010 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 D1F12106566B; Thu, 21 Jan 2010 01:43:23 +0000 (UTC) (envelope-from wkoszek@freebsd.czest.pl) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by mx1.freebsd.org (Postfix) with ESMTP id 4639F8FC1A; Thu, 21 Jan 2010 01:43:22 +0000 (UTC) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by freebsd.czest.pl (8.14.2/8.14.2) with ESMTP id o0L1ttbK083629; Thu, 21 Jan 2010 02:55:55 +0100 (CET) (envelope-from wkoszek@freebsd.czest.pl) Received: (from wkoszek@localhost) by freebsd.czest.pl (8.14.2/8.14.2/Submit) id o0L1ttMV083628; Thu, 21 Jan 2010 02:55:55 +0100 (CET) (envelope-from wkoszek) Date: Thu, 21 Jan 2010 02:55:55 +0100 From: "Wojciech A. Koszek" To: Alexander Leidinger Message-ID: <20100121015554.GI1990@FreeBSD.org> Mail-Followup-To: Alexander Leidinger , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001182246.o0IMk6dw000346@svn.freebsd.org> <20100119091500.17856jhlpl7mjsow@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <20100119091500.17856jhlpl7mjsow@webmail.leidinger.net> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-3.0 (freebsd.czest.pl [212.87.224.105]); Thu, 21 Jan 2010 02:55:55 +0100 (CET) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202598 - head/sys/compat/linux 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: Thu, 21 Jan 2010 01:43:23 -0000 On Tue, Jan 19, 2010 at 09:15:00AM +0100, Alexander Leidinger wrote: > Quoting "Wojciech A. Koszek" (from Mon, 18 Jan 2010 > 22:46:06 +0000 (UTC)): > >> Author: wkoszek >> Date: Mon Jan 18 22:46:06 2010 >> New Revision: 202598 >> URL: http://svn.freebsd.org/changeset/base/202598 >> >> Log: >> Let us to use our libusb(3) in Linuxolator. >> >> With this change, Linux binaries can work with our libusb(3) when >> it's compiled against our header files on GNU/Linux system -- this >> solves the problem with differences between /dev layouts. >> >> With ported libusb(3), I am able to use my USB JTAG cable with Linux >> binaries that support it. > > The commit log is IMHO omitting the info if you checked (or not) that there > is no linux ioctl in this range. It would also be nice if the comment in > linux_ioctl.h tells to check that there is no clash with a linux ioctl when > the min/max is changed. Sorry for delay. I have tested it against ioctl() calls submitted by ported libusb(3). Apparently, all ioctl() requests in my execution path didn't hit our emulator, thus I was getting warnings about unsupported ioctl(). Thus, I reserved a range for them. However, it looks like conflict exists with Linux *SND* stuff. I believe the easiest solution would be based on picking "untypable" values for commands: #define BSDEMUL_USB_REQUEST _IOWR(3, 1, struct usb_ctl_request) And putting them into linux_ioctl.h just like any other ioctl(). Simple mapping would be provided for those calls to our native USB stack. grep(1) says 3 or 4 passed as a ioctl() should be fine, since none of those seem to be used in Linux. I could bring the same macros to ported libusb(3) easily, so that we'd be using something that Linuxolator can finally understand in a unique way. Does is sound like an acceptable solution? -- Wojciech A. Koszek wkoszek@FreeBSD.org http://FreeBSD.czest.pl/~wkoszek/ From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 02:21:32 2010 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 38322106566C; Thu, 21 Jan 2010 02:21:32 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27E8F8FC16; Thu, 21 Jan 2010 02:21:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L2LW1l088541; Thu, 21 Jan 2010 02:21:32 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L2LWHE088539; Thu, 21 Jan 2010 02:21:32 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001210221.o0L2LWHE088539@svn.freebsd.org> From: Neel Natu Date: Thu, 21 Jan 2010 02:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202732 - head/sys/mips/mips 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: Thu, 21 Jan 2010 02:21:32 -0000 Author: neel Date: Thu Jan 21 02:21:31 2010 New Revision: 202732 URL: http://svn.freebsd.org/changeset/base/202732 Log: Get rid of redundant setting of interrupt enable bit when restoring the status register from the PCB. Remove a couple of misleading comments while I am here. The comments are misleading because they imply that interrupts will be enabled after the status register is restored from the PCB. This is not the case because the processor is at the exception level (SR_EXL is set). Approved by: imp (mentor) Modified: head/sys/mips/mips/exception.S Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Thu Jan 21 00:54:22 2010 (r202731) +++ head/sys/mips/mips/exception.S Thu Jan 21 02:21:31 2010 (r202732) @@ -581,16 +581,10 @@ NNON_LEAF(MipsUserGenException, STAND_FR #ifdef TARGET_OCTEON and k0, k0, ~(MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) #endif - or k0, k0, (MIPS_SR_INT_IE) .set noat RESTORE_U_PCB_REG(AT, AST, k1) -/* - * The restoration of the user SR must be done only after - * k1 is no longer needed. Otherwise, k1 will get clobbered after - * interrupts are enabled. - */ - mtc0 k0, COP_0_STATUS_REG # still exeption level + mtc0 k0, COP_0_STATUS_REG # still exception level ITLBNOPFIX sync eret @@ -814,15 +808,9 @@ NNON_LEAF(MipsUserIntr, STAND_FRAME_SIZE #ifdef TARGET_OCTEON and k0, k0, ~(MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) #endif - or k0, k0, (MIPS_SR_INT_IE|SR_EXL) .set noat RESTORE_U_PCB_REG(AT, AST, k1) -/* - * The restoration of the user SR must be done only after - * k1 is no longer needed. Otherwise, k1 will get clobbered after - * interrupts are enabled. - */ mtc0 k0, COP_0_STATUS_REG # SR with EXL set. ITLBNOPFIX sync From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 03:06:53 2010 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 07E0C106566C; Thu, 21 Jan 2010 03:06:53 +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 E9AFE8FC0C; Thu, 21 Jan 2010 03:06:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L36q41098717; Thu, 21 Jan 2010 03:06:52 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L36qNH098712; Thu, 21 Jan 2010 03:06:52 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001210306.o0L36qNH098712@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 21 Jan 2010 03:06:52 +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: r202733 - in stable/8/sys/dev/cxgb: . 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: Thu, 21 Jan 2010 03:06:53 -0000 Author: np Date: Thu Jan 21 03:06:52 2010 New Revision: 202733 URL: http://svn.freebsd.org/changeset/base/202733 Log: MFC r201907,202671,202678 r201907: Extra parantheses to keep certain compilers happy. r202671: Fix for a cxgb(4) panic. cxgb_ioctl can be called by the IP and IPv6 layers with non-sleepable locks held. Don't (potentially) sleep in those situations. r202678: Complain if freelist queue sizes are significantly less than desired. Modified: stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c stable/8/sys/dev/cxgb/cxgb_adapter.h stable/8/sys/dev/cxgb/cxgb_main.c stable/8/sys/dev/cxgb/cxgb_sge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c Thu Jan 21 02:21:31 2010 (r202732) +++ stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c Thu Jan 21 03:06:52 2010 (r202733) @@ -4443,7 +4443,7 @@ int __devinit t3_prep_adapter(adapter_t adapter->params.info = ai; adapter->params.nports = ai->nports0 + ai->nports1; - adapter->params.chan_map = !!ai->nports0 | (!!ai->nports1 << 1); + adapter->params.chan_map = (!!ai->nports0) | (!!ai->nports1 << 1); adapter->params.rev = t3_read_reg(adapter, A_PL_REV); /* Modified: stable/8/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_adapter.h Thu Jan 21 02:21:31 2010 (r202732) +++ stable/8/sys/dev/cxgb/cxgb_adapter.h Thu Jan 21 03:06:52 2010 (r202733) @@ -136,7 +136,6 @@ enum { }; #define IS_DOOMED(p) (p->flags & DOOMED) #define SET_DOOMED(p) do {p->flags |= DOOMED;} while (0) -#define DOOMED(p) (p->flags & DOOMED) #define IS_BUSY(sc) (sc->flags & CXGB_BUSY) #define SET_BUSY(sc) do {sc->flags |= CXGB_BUSY;} while (0) #define CLR_BUSY(sc) do {sc->flags &= ~CXGB_BUSY;} while (0) Modified: stable/8/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_main.c Thu Jan 21 02:21:31 2010 (r202732) +++ stable/8/sys/dev/cxgb/cxgb_main.c Thu Jan 21 03:06:52 2010 (r202733) @@ -84,11 +84,9 @@ __FBSDID("$FreeBSD$"); static int cxgb_setup_interrupts(adapter_t *); static void cxgb_teardown_interrupts(adapter_t *); -static int cxgb_begin_op(struct port_info *, const char *); -static int cxgb_begin_detach(struct port_info *); -static int cxgb_end_op(struct port_info *); static void cxgb_init(void *); -static int cxgb_init_synchronized(struct port_info *); +static int cxgb_init_locked(struct port_info *); +static int cxgb_uninit_locked(struct port_info *); static int cxgb_uninit_synchronized(struct port_info *); static int cxgb_ioctl(struct ifnet *, unsigned long, caddr_t); static int cxgb_media_change(struct ifnet *); @@ -1113,7 +1111,14 @@ cxgb_port_detach(device_t dev) p = device_get_softc(dev); sc = p->adapter; - cxgb_begin_detach(p); + /* Tell cxgb_ioctl and if_init that the port is going away */ + ADAPTER_LOCK(sc); + SET_DOOMED(p); + wakeup(&sc->flags); + while (IS_BUSY(sc)) + mtx_sleep(&sc->flags, &sc->lock, 0, "cxgbdtch", 0); + SET_BUSY(sc); + ADAPTER_UNLOCK(sc); if (p->port_cdev != NULL) destroy_dev(p->port_cdev); @@ -1133,7 +1138,10 @@ cxgb_port_detach(device_t dev) if_free(p->ifp); p->ifp = NULL; - cxgb_end_op(p); + ADAPTER_LOCK(sc); + CLR_BUSY(sc); + wakeup_one(&sc->flags); + ADAPTER_UNLOCK(sc); return (0); } @@ -1688,12 +1696,13 @@ cxgb_up(struct adapter *sc) { int err = 0; - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); KASSERT(sc->open_device_map == 0, ("%s: device(s) already open (%x)", __func__, sc->open_device_map)); if ((sc->flags & FULL_INIT_DONE) == 0) { + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + if ((sc->flags & FW_UPTODATE) == 0) if ((err = upgrade_fw(sc))) goto out; @@ -1755,8 +1764,6 @@ out: static void cxgb_down(struct adapter *sc) { - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); - t3_sge_stop(sc); t3_intr_disable(sc); } @@ -1767,8 +1774,6 @@ offload_open(struct port_info *pi) struct adapter *sc = pi->adapter; struct t3cdev *tdev = &sc->tdev; - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); - setbit(&sc->open_device_map, OFFLOAD_DEVMAP_BIT); t3_tp_set_offload_mode(sc, 1); @@ -1803,120 +1808,55 @@ offload_close(struct t3cdev *tdev) } /* - * Begin a synchronized operation. If this call succeeds, it is guaranteed that - * no one will remove the port or its ifp from underneath the caller. Caller is - * also granted exclusive access to open_device_map. - * - * operation here means init, uninit, detach, and ioctl service. - * - * May fail. - * EINTR (ctrl-c pressed during ifconfig for example). - * ENXIO (port is about to detach - due to kldunload for example). + * if_init for cxgb ports. */ -int -cxgb_begin_op(struct port_info *p, const char *wmsg) +static void +cxgb_init(void *arg) { - int rc = 0; + struct port_info *p = arg; struct adapter *sc = p->adapter; ADAPTER_LOCK(sc); + cxgb_init_locked(p); /* releases adapter lock */ + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); +} + +static int +cxgb_init_locked(struct port_info *p) +{ + struct adapter *sc = p->adapter; + struct ifnet *ifp = p->ifp; + struct cmac *mac = &p->mac; + int i, rc = 0, may_sleep = 0; + + ADAPTER_LOCK_ASSERT_OWNED(sc); while (!IS_DOOMED(p) && IS_BUSY(sc)) { - if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, wmsg, 0)) { + if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, "cxgbinit", 0)) { rc = EINTR; goto done; } } - - if (IS_DOOMED(p)) + if (IS_DOOMED(p)) { rc = ENXIO; - else if (!IS_BUSY(sc)) - SET_BUSY(sc); - else { - KASSERT(0, ("%s: port %d, p->flags = %x , sc->flags = %x", - __func__, p->port_id, p->flags, sc->flags)); - rc = EDOOFUS; + goto done; } - -done: - ADAPTER_UNLOCK(sc); - return (rc); -} - -/* - * End a synchronized operation. Read comment block above cxgb_begin_op. - */ -int -cxgb_end_op(struct port_info *p) -{ - struct adapter *sc = p->adapter; - - ADAPTER_LOCK(sc); - KASSERT(IS_BUSY(sc), ("%s: not busy.", __func__)); - CLR_BUSY(sc); - wakeup_one(&sc->flags); - ADAPTER_UNLOCK(sc); - - return (0); -} - -/* - * Prepare for port detachment. Detach is a special kind of synchronized - * operation. Also read comment before cxgb_begin_op. - */ -static int -cxgb_begin_detach(struct port_info *p) -{ - struct adapter *sc = p->adapter; + KASSERT(!IS_BUSY(sc), ("%s: controller busy.", __func__)); /* - * Inform those waiting for this port that it is going to be destroyed - * and they should not continue further. (They'll return with ENXIO). + * The code that runs during one-time adapter initialization can sleep + * so it's important not to hold any locks across it. */ - ADAPTER_LOCK(sc); - SET_DOOMED(p); - wakeup(&sc->flags); - ADAPTER_UNLOCK(sc); + may_sleep = sc->flags & FULL_INIT_DONE ? 0 : 1; - /* - * Wait for in-progress operations. - */ - ADAPTER_LOCK(sc); - while (IS_BUSY(sc)) { - mtx_sleep(&sc->flags, &sc->lock, 0, "cxgbdtch", 0); + if (may_sleep) { + SET_BUSY(sc); + ADAPTER_UNLOCK(sc); } - SET_BUSY(sc); - ADAPTER_UNLOCK(sc); - - return (0); -} - -/* - * if_init for cxgb ports. - */ -static void -cxgb_init(void *arg) -{ - struct port_info *p = arg; - - if (cxgb_begin_op(p, "cxgbinit")) - return; - - cxgb_init_synchronized(p); - cxgb_end_op(p); -} - -static int -cxgb_init_synchronized(struct port_info *p) -{ - struct adapter *sc = p->adapter; - struct ifnet *ifp = p->ifp; - struct cmac *mac = &p->mac; - int i, rc; if (sc->open_device_map == 0) { if ((rc = cxgb_up(sc)) != 0) - return (rc); + goto done; if (is_offload(sc) && !ofld_disable && offload_open(p)) log(LOG_WARNING, @@ -1924,6 +1864,11 @@ cxgb_init_synchronized(struct port_info } PORT_LOCK(p); + if (isset(&sc->open_device_map, p->port_id) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) { + PORT_UNLOCK(p); + goto done; + } t3_port_intr_enable(sc, p->port_id); if (!mac->multiport) t3_mac_init(mac); @@ -1947,7 +1892,48 @@ cxgb_init_synchronized(struct port_info /* all ok */ setbit(&sc->open_device_map, p->port_id); - return (0); +done: + if (may_sleep) { + ADAPTER_LOCK(sc); + KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); + CLR_BUSY(sc); + wakeup_one(&sc->flags); + } + ADAPTER_UNLOCK(sc); + return (rc); +} + +static int +cxgb_uninit_locked(struct port_info *p) +{ + struct adapter *sc = p->adapter; + int rc; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + while (!IS_DOOMED(p) && IS_BUSY(sc)) { + if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, "cxgbunin", 0)) { + rc = EINTR; + goto done; + } + } + if (IS_DOOMED(p)) { + rc = ENXIO; + goto done; + } + KASSERT(!IS_BUSY(sc), ("%s: controller busy.", __func__)); + SET_BUSY(sc); + ADAPTER_UNLOCK(sc); + + rc = cxgb_uninit_synchronized(p); + + ADAPTER_LOCK(sc); + KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); + CLR_BUSY(sc); + wakeup_one(&sc->flags); +done: + ADAPTER_UNLOCK(sc); + return (rc); } /* @@ -1960,6 +1946,11 @@ cxgb_uninit_synchronized(struct port_inf struct ifnet *ifp = pi->ifp; /* + * taskqueue_drain may cause a deadlock if the adapter lock is held. + */ + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + + /* * Clear this port's bit from the open device map, and then drain all * the tasks that can access/manipulate this port's port_info or ifp. * We disable this port's interrupts here and so the the slow/ext @@ -2036,19 +2027,21 @@ static int cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) { struct port_info *p = ifp->if_softc; + struct adapter *sc = p->adapter; struct ifreq *ifr = (struct ifreq *)data; - int flags, error = 0, mtu, handle_unsynchronized = 0; + int flags, error = 0, mtu; uint32_t mask; - if ((error = cxgb_begin_op(p, "cxgbioct")) != 0) - return (error); - - /* - * Only commands that should be handled within begin-op/end-op are - * serviced in this switch statement. See handle_unsynchronized. - */ switch (command) { case SIOCSIFMTU: + ADAPTER_LOCK(sc); + error = IS_DOOMED(p) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0); + if (error) { +fail: + ADAPTER_UNLOCK(sc); + return (error); + } + mtu = ifr->ifr_mtu; if ((mtu < ETHERMIN) || (mtu > ETHERMTU_JUMBO)) { error = EINVAL; @@ -2058,35 +2051,57 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l cxgb_update_mac_settings(p); PORT_UNLOCK(p); } - + ADAPTER_UNLOCK(sc); break; case SIOCSIFFLAGS: + ADAPTER_LOCK(sc); + if (IS_DOOMED(p)) { + error = ENXIO; + goto fail; + } if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { flags = p->if_flags; if (((ifp->if_flags ^ flags) & IFF_PROMISC) || ((ifp->if_flags ^ flags) & IFF_ALLMULTI)) { + if (IS_BUSY(sc)) { + error = EBUSY; + goto fail; + } PORT_LOCK(p); cxgb_update_mac_settings(p); PORT_UNLOCK(p); } + ADAPTER_UNLOCK(sc); } else - error = cxgb_init_synchronized(p); + error = cxgb_init_locked(p); p->if_flags = ifp->if_flags; } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) - error = cxgb_uninit_synchronized(p); - + error = cxgb_uninit_locked(p); + + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); break; case SIOCADDMULTI: case SIOCDELMULTI: + ADAPTER_LOCK(sc); + error = IS_DOOMED(p) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0); + if (error) + goto fail; + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { PORT_LOCK(p); cxgb_update_mac_settings(p); PORT_UNLOCK(p); } + ADAPTER_UNLOCK(sc); break; case SIOCSIFCAP: + ADAPTER_LOCK(sc); + error = IS_DOOMED(p) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0); + if (error) + goto fail; + mask = ifr->ifr_reqcap ^ ifp->if_capenable; if (mask & IFCAP_TXCSUM) { if (IFCAP_TXCSUM & ifp->if_capenable) { @@ -2136,34 +2151,20 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l PORT_UNLOCK(p); } } - if (mask & IFCAP_VLAN_HWCSUM) { + if (mask & IFCAP_VLAN_HWCSUM) ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; - } #ifdef VLAN_CAPABILITIES VLAN_CAPABILITIES(ifp); #endif + ADAPTER_UNLOCK(sc); break; - default: - handle_unsynchronized = 1; + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + error = ifmedia_ioctl(ifp, ifr, &p->media, command); break; - } - - /* - * We don't want to call anything outside the driver while inside a - * begin-op/end-op block. If it calls us back (eg. ether_ioctl may - * call cxgb_init) we may deadlock if the state is already marked busy. - * - * XXX: this probably opens a small race window with kldunload... - */ - cxgb_end_op(p); - - /* The IS_DOOMED check is racy, we're clutching at straws here */ - if (handle_unsynchronized && !IS_DOOMED(p)) { - if (command == SIOCSIFMEDIA || command == SIOCGIFMEDIA) - error = ifmedia_ioctl(ifp, ifr, &p->media, command); - else - error = ether_ioctl(ifp, command, data); + default: + error = ether_ioctl(ifp, command, data); } return (error); Modified: stable/8/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_sge.c Thu Jan 21 02:21:31 2010 (r202732) +++ stable/8/sys/dev/cxgb/cxgb_sge.c Thu Jan 21 03:06:52 2010 (r202733) @@ -541,8 +541,12 @@ t3_sge_prep(adapter_t *adap, struct sge_ jumbo_q_size = min(nmbjumbo4/(3*nqsets), JUMBO_Q_SIZE); #endif while (!powerof2(jumbo_q_size)) - jumbo_q_size--; - + jumbo_q_size--; + + if (fl_q_size < (FL_Q_SIZE / 4) || jumbo_q_size < (JUMBO_Q_SIZE / 2)) + device_printf(adap->dev, + "Insufficient clusters and/or jumbo buffers.\n"); + /* XXX Does ETHER_ALIGN need to be accounted for here? */ p->max_pkt_size = adap->sge.qs[0].fl[1].buf_size - sizeof(struct cpl_rx_data); From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 03:49:18 2010 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 622C8106566C; Thu, 21 Jan 2010 03:49:18 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 515AA8FC14; Thu, 21 Jan 2010 03:49:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L3nI1p008349; Thu, 21 Jan 2010 03:49:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L3nIBc008347; Thu, 21 Jan 2010 03:49:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201001210349.o0L3nIBc008347@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 21 Jan 2010 03:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202734 - head/usr.sbin/extattr 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: Thu, 21 Jan 2010 03:49:18 -0000 Author: nwhitehorn Date: Thu Jan 21 03:49:18 2010 New Revision: 202734 URL: http://svn.freebsd.org/changeset/base/202734 Log: Fix a bug when printing attributes from multiple files: buflen could be longer than the length of the current attribute if the buffer were reused and previously longer, so bits of the previous, longer attribute would be written. Fix this by using the actual attribute length. Modified: head/usr.sbin/extattr/rmextattr.c Modified: head/usr.sbin/extattr/rmextattr.c ============================================================================== --- head/usr.sbin/extattr/rmextattr.c Thu Jan 21 03:06:52 2010 (r202733) +++ head/usr.sbin/extattr/rmextattr.c Thu Jan 21 03:49:18 2010 (r202734) @@ -269,7 +269,7 @@ main(int argc, char *argv[]) printf("\n"); continue; } else { - fwrite(buf, buflen, 1, stdout); + fwrite(buf, error, 1, stdout); printf("\n"); continue; } From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 04:17:08 2010 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 0FE7B1065672; Thu, 21 Jan 2010 04:17:08 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail1.asahi-net.or.jp (mail1.asahi-net.or.jp [202.224.39.197]) by mx1.freebsd.org (Postfix) with ESMTP id CD6BF8FC28; Thu, 21 Jan 2010 04:17:07 +0000 (UTC) Received: from pavillion-dv6425us.home (pool-96-242-173-67.nwrknj.fios.verizon.net [96.242.173.67]) by mail1.asahi-net.or.jp (Postfix) with ESMTP id E506568950; Thu, 21 Jan 2010 13:17:03 +0900 (JST) Date: Wed, 20 Jan 2010 23:17:12 -0500 From: Yoshihiro Ota To: "Ronald Klop" Message-Id: <20100120231712.91132fd0.ota@j.email.ne.jp> In-Reply-To: References: <201001201656.o0KGuKKG061597@svn.freebsd.org> <9bbcef731001200934n67f7c009sb39a6fe238ac4a8@mail.gmail.com> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Jaakko Heinonen , src-committers@freebsd.org, svn-src-all@freebsd.org, ota@j.email.ne.jp, Ivan Voras , svn-src-head@freebsd.org Subject: Re: svn commit: r202708 - head/sys/fs/tmpfs 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: Thu, 21 Jan 2010 04:17:08 -0000 On Wed, 20 Jan 2010 18:50:58 +0100 "Ronald Klop" wrote: > On Wed, 20 Jan 2010 18:34:37 +0100, Ivan Voras wrote: > > > 2010/1/20 Jaakko Heinonen : > >> Author: jh > >> Date: Wed Jan 20 16:56:20 2010 > >> New Revision: 202708 > >> URL: http://svn.freebsd.org/changeset/base/202708 > > > >> Modified: > >> head/sys/fs/tmpfs/tmpfs_subr.c > >> head/sys/fs/tmpfs/tmpfs_vfsops.c > > > > Any chance of downgrading the "considered highly experimental" status > > message of tmpfs to something less scary? Like "will probably not set > > your hamster on fire"? :) > > > > I admit I haven't used it for any really demanding work but it looks > > ok enough for /tmp on some busy systems. > > And since this list is shrinking. > http://www.freebsd.org/cgi/query-pr-summary.cgi?category=&severity=&priority=&class=&state=&sort=none&text=tmpfs&responsible=&multitext=&originator=&release= > > Ronald. I've been using it for all ports build since tmpfs appeared on FreeBSD. Most of times, it is okay although I had to fix a couple of bumps. There seems to be some corner cases as I see PRs come in. Speaking of bugs, tmpfs may have problems if you do "mv a a" where both source and target are the same; file may disappear due to some bug with rename.2. I tested with Linux and Solaris and "mv" prevented problems with some of these archs. But I forgot most of results and didn't have time since then. Hiro From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 05:26:00 2010 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 ED5171065670; Thu, 21 Jan 2010 05:26:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 7F1688FC16; Thu, 21 Jan 2010 05:25:59 +0000 (UTC) Received: from besplex.bde.org (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0L5PrvH031647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Jan 2010 16:25:55 +1100 Date: Thu, 21 Jan 2010 16:25:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov In-Reply-To: <20100120121827.GA55236@nagual.pp.ru> Message-ID: <20100121155841.H1512@besplex.bde.org> References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> <20100120211722.S2451@besplex.bde.org> <20100120121827.GA55236@nagual.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r202572 - head/lib/libc/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: Thu, 21 Jan 2010 05:26:01 -0000 On Wed, 20 Jan 2010, Andrey Chernov wrote: > On Wed, Jan 20, 2010 at 09:33:08PM +1100, Bruce Evans wrote: >>> But there is >>> nothing said about opendir() & strcoll() relation in the mentioned >>> standards. The only word I found is that opendir() returns "ordered" >>> sequence, but nowhere mentioned ordered by what criteria, so perhaps they >>> mean "stable": >> >> As I said before, sorting in opendir() has nothing to do with POSIX! It >> is an implementation detail for union file systems/mounts. > > Moreover, even sorting itself is not required here. We sort just to remove > dups. Interesting. Why does it require a stable sort then? It only removes duplicates by name. At least with strcmp() in the compare function, such dups will remain together although they may be moved. The stable sort would be needed if it must keep the original first of duplicates by name, but it doesn't say that. BTW, the statfs() to determine if this sort is necessary is a large pessimization for nfs file systems. Nfs caches most things but not statfs(). Thus a readdir() over nfs does an expensive statfs() every time although the directory contents will normally be cached after the first time. I think the sorting belongs in file systems, not in readdir() where it affects file systems that don't need it. >> It should also give the FreeBSD >> extension of POSIX. POSIX says: "If the strcoll() function fails, >> then the return value of alphasort() is unspecified.", but this makes >> alphasort() unusable since a qsort() comparison function must return >> a specified value. > > To be used in practice, strcoll() should never fails, doing fallback to > strcmp() instead, not only in that, but in lots of other cases too (it may > set errno like EILSEQ, but not fails). The next important thing is to > return 0 only for true binary equals, additionaly ranking (f.e. by > strcmp()) anything inside classes of equality to stabilize result. > > I hope our strcoll() will be kept in that state after implementing > UCA too. What is UCA? Failing is a POSIX bug -- C99 doesn't allow it to fail. I think it should at least be specified to return nonzero (unequal) on failure. This is like comparisons of NaNs returning unequal even for comparisons of identical NaNs. Can it return equal for non-binary-equal strings? I think it can -- the locale might have different encodings for strings that are considered identical. Then duplicates should be according to strcoll() and file systems would have a hard time managing such duplicates when they are created in a locale where they are non-duplicates. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 09:11:51 2010 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 2307B1065670; Thu, 21 Jan 2010 09:11:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12C208FC1F; Thu, 21 Jan 2010 09:11:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L9Boqk079402; Thu, 21 Jan 2010 09:11:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L9BoPX079400; Thu, 21 Jan 2010 09:11:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001210911.o0L9BoPX079400@svn.freebsd.org> From: Alexander Motin Date: Thu, 21 Jan 2010 09:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202736 - head/sys/dev/sound/pci/hda 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: Thu, 21 Jan 2010 09:11:51 -0000 Author: mav Date: Thu Jan 21 09:11:50 2010 New Revision: 202736 URL: http://svn.freebsd.org/changeset/base/202736 Log: Print playback channels paths in order of their sequence numbers, not nids. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Thu Jan 21 08:53:01 2010 (r202735) +++ head/sys/dev/sound/pci/hda/hdac.c Thu Jan 21 09:11:50 2010 (r202736) @@ -7091,19 +7091,19 @@ hdac_dump_dac(struct hdac_pcm_devinfo *p { struct hdac_devinfo *devinfo = pdevinfo->devinfo; struct hdac_softc *sc = devinfo->codec->sc; + struct hdac_audio_as *as; struct hdac_widget *w; int i, printed = 0; if (pdevinfo->play < 0) return; - for (i = devinfo->startnode; i < devinfo->endnode; i++) { - w = hdac_widget_get(devinfo, i); - if (w == NULL || w->enable == 0) + as = &devinfo->function.audio.as[sc->chans[pdevinfo->play].as]; + for (i = 0; i < 16; i++) { + if (as->pins[i] <= 0) continue; - if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) - continue; - if (w->bindas != sc->chans[pdevinfo->play].as) + w = hdac_widget_get(devinfo, as->pins[i]); + if (w == NULL || w->enable == 0) continue; if (printed == 0) { printed = 1; @@ -7111,7 +7111,7 @@ hdac_dump_dac(struct hdac_pcm_devinfo *p device_printf(pdevinfo->dev, "Playback:\n"); } device_printf(pdevinfo->dev, "\n"); - hdac_dump_dst_nid(pdevinfo, i, 0); + hdac_dump_dst_nid(pdevinfo, as->pins[i], 0); } } From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 10:12:23 2010 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 69C951065670; Thu, 21 Jan 2010 10:12:22 +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 236748FC20; Thu, 21 Jan 2010 10:12:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LACMr0092850; Thu, 21 Jan 2010 10:12:22 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LACMDt092848; Thu, 21 Jan 2010 10:12:22 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001211012.o0LACMDt092848@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 21 Jan 2010 10:12:22 +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: r202739 - stable/8/sys/netinet 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: Thu, 21 Jan 2010 10:12:23 -0000 Author: np Date: Thu Jan 21 10:12:21 2010 New Revision: 202739 URL: http://svn.freebsd.org/changeset/base/202739 Log: MFC r201416: Avoid NULL dereference in arpresolve. Requested by: kib@ Modified: stable/8/sys/netinet/if_ether.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/if_ether.c ============================================================================== --- stable/8/sys/netinet/if_ether.c Thu Jan 21 10:09:19 2010 (r202738) +++ stable/8/sys/netinet/if_ether.c Thu Jan 21 10:12:21 2010 (r202739) @@ -366,8 +366,8 @@ retry: if (la->la_asked < V_arp_maxtries) error = EWOULDBLOCK; /* First request. */ else - error = - (rt0->rt_flags & RTF_GATEWAY) ? EHOSTUNREACH : EHOSTDOWN; + error = rt0 != NULL && (rt0->rt_flags & RTF_GATEWAY) ? + EHOSTUNREACH : EHOSTDOWN; if (renew) { LLE_ADDREF(la); From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 10:16:22 2010 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 13C18106568B; Thu, 21 Jan 2010 10:16:22 +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 ECE798FC20; Thu, 21 Jan 2010 10:16:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LAGL3m093857; Thu, 21 Jan 2010 10:16:21 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LAGLRk093854; Thu, 21 Jan 2010 10:16:21 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001211016.o0LAGLRk093854@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 21 Jan 2010 10:16:21 +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: r202740 - stable/8/usr.bin/whois 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: Thu, 21 Jan 2010 10:16:22 -0000 Author: edwin Date: Thu Jan 21 10:16:21 2010 New Revision: 202740 URL: http://svn.freebsd.org/changeset/base/202740 Log: MFC of 202280, 202281 - Remove -d option, whois.nic.mil doesn't exist anymore. - Make whois capable of searching for IPv6 addresses just like it can do for IPv4 addresses without having to explicetly specify that the ARIN server should be used to get the initial information. PR: bin/142507, bin/128725 Submitted by: Dan Mahoney , "Matt D. Harris" Modified: stable/8/usr.bin/whois/whois.1 stable/8/usr.bin/whois/whois.c Directory Properties: stable/8/usr.bin/whois/ (props changed) Modified: stable/8/usr.bin/whois/whois.1 ============================================================================== --- stable/8/usr.bin/whois/whois.1 Thu Jan 21 10:12:21 2010 (r202739) +++ stable/8/usr.bin/whois/whois.1 Thu Jan 21 10:16:21 2010 (r202740) @@ -40,7 +40,7 @@ .Nd "Internet domain name and network number directory service" .Sh SYNOPSIS .Nm -.Op Fl aAbdfgiIklmQrR +.Op Fl aAbfgiIklmQrR .Op Fl c Ar country-code | Fl h Ar host .Op Fl p Ar port .Ar name ... @@ -82,11 +82,6 @@ This is the equivalent of using the .Fl h option with an argument of .Qq Ar country-code Ns Li .whois-servers.net . -.It Fl d -Use the US Department of Defense -database. -It contains points of contact for subdomains of -.Pa .MIL . .It Fl f Use the African Network Information Centre .Pq Tn AfriNIC Modified: stable/8/usr.bin/whois/whois.c ============================================================================== --- stable/8/usr.bin/whois/whois.c Thu Jan 21 10:12:21 2010 (r202739) +++ stable/8/usr.bin/whois/whois.c Thu Jan 21 10:16:21 2010 (r202740) @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #define ABUSEHOST "whois.abuse.net" #define NICHOST "whois.crsnic.net" #define INICHOST "whois.networksolutions.com" -#define DNICHOST "whois.nic.mil" #define GNICHOST "whois.nic.gov" #define ANICHOST "whois.arin.net" #define LNICHOST "whois.lacnic.net" @@ -109,7 +108,7 @@ main(int argc, char *argv[]) country = host = qnichost = NULL; flags = use_qnichost = 0; - while ((ch = getopt(argc, argv, "aAbc:dfgh:iIklmp:QrR6")) != -1) { + while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:QrR6")) != -1) { switch (ch) { case 'a': host = ANICHOST; @@ -123,9 +122,6 @@ main(int argc, char *argv[]) case 'c': country = optarg; break; - case 'd': - host = DNICHOST; - break; case 'f': host = FNICHOST; break; @@ -219,6 +215,10 @@ choose_server(char *domain) { char *pos, *retval; + if (strchr(domain, ':')) { + s_asprintf(&retval, "%s", ANICHOST); + return (retval); + } for (pos = strchr(domain, '\0'); pos > domain && *--pos == '.';) *pos = '\0'; if (*domain == '\0') @@ -364,7 +364,7 @@ static void usage(void) { fprintf(stderr, - "usage: whois [-aAbdfgiIklmQrR6] [-c country-code | -h hostname] " + "usage: whois [-aAbfgiIklmQrR6] [-c country-code | -h hostname] " "[-p port] name ...\n"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 10:16:33 2010 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 4A2871065672; Thu, 21 Jan 2010 10:16:33 +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 3883A8FC19; Thu, 21 Jan 2010 10:16:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LAGXmY093927; Thu, 21 Jan 2010 10:16:33 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LAGXtZ093924; Thu, 21 Jan 2010 10:16:33 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001211016.o0LAGXtZ093924@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 21 Jan 2010 10:16:33 +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: r202741 - stable/7/usr.bin/whois 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: Thu, 21 Jan 2010 10:16:33 -0000 Author: edwin Date: Thu Jan 21 10:16:32 2010 New Revision: 202741 URL: http://svn.freebsd.org/changeset/base/202741 Log: MFC of 202280, 202281 - Remove -d option, whois.nic.mil doesn't exist anymore. - Make whois capable of searching for IPv6 addresses just like it can do for IPv4 addresses without having to explicetly specify that the ARIN server should be used to get the initial information. PR: bin/142507, bin/128725 Submitted by: Dan Mahoney , "Matt D. Harris" domain && *--pos == '.';) *pos = '\0'; if (*domain == '\0') @@ -364,7 +364,7 @@ static void usage(void) { fprintf(stderr, - "usage: whois [-aAbdfgiIklmQrR6] [-c country-code | -h hostname] " + "usage: whois [-aAbfgiIklmQrR6] [-c country-code | -h hostname] " "[-p port] name ...\n"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 10:16:49 2010 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 6B6C510656B3; Thu, 21 Jan 2010 10:16:49 +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 4FCD18FC24; Thu, 21 Jan 2010 10:16:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LAGnco094031; Thu, 21 Jan 2010 10:16:49 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LAGn5Y094028; Thu, 21 Jan 2010 10:16:49 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001211016.o0LAGn5Y094028@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 21 Jan 2010 10:16:49 +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: r202742 - stable/6/usr.bin/whois 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: Thu, 21 Jan 2010 10:16:49 -0000 Author: edwin Date: Thu Jan 21 10:16:49 2010 New Revision: 202742 URL: http://svn.freebsd.org/changeset/base/202742 Log: MFC of 202280, 202281 - Remove -d option, whois.nic.mil doesn't exist anymore. - Make whois capable of searching for IPv6 addresses just like it can do for IPv4 addresses without having to explicetly specify that the ARIN server should be used to get the initial information. PR: bin/142507, bin/128725 Submitted by: Dan Mahoney , "Matt D. Harris" domain && *--pos == '.';) *pos = '\0'; if (*domain == '\0') @@ -362,7 +362,7 @@ static void usage(void) { fprintf(stderr, - "usage: whois [-aAbdfgiIklmQrR6] [-c country-code | -h hostname] " + "usage: whois [-aAbfgiIklmQrR6] [-c country-code | -h hostname] " "[-p port] name ...\n"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 11:36:40 2010 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 BEE6F106566C; Thu, 21 Jan 2010 11:36:40 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE77C8FC17; Thu, 21 Jan 2010 11:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LBaeED014337; Thu, 21 Jan 2010 11:36:40 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LBaeYK014335; Thu, 21 Jan 2010 11:36:40 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201001211136.o0LBaeYK014335@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 21 Jan 2010 11:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202743 - head/lib/libc/nls 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: Thu, 21 Jan 2010 11:36:40 -0000 Author: gabor (doc,ports committer) Date: Thu Jan 21 11:36:40 2010 New Revision: 202743 URL: http://svn.freebsd.org/changeset/base/202743 Log: - Update Galician catalog Modified: head/lib/libc/nls/gl_ES.ISO8859-1.msg Modified: head/lib/libc/nls/gl_ES.ISO8859-1.msg ============================================================================== --- head/lib/libc/nls/gl_ES.ISO8859-1.msg Thu Jan 21 10:16:49 2010 (r202742) +++ head/lib/libc/nls/gl_ES.ISO8859-1.msg Thu Jan 21 11:36:40 2010 (r202743) @@ -181,6 +181,16 @@ $ ENOATTR 87 Atributo non encontrado $ EDOOFUS 88 Erro de programación +$ EBADMSG +89 Mensaxe inválido +$ EMULTIHOP +90 Intento de Multihop +$ ENOLINK +91 Enlace fortaleceuse +$ EPROTO +92 Erro de protocolo +$ ENOTCAPABLE +93 Habilidades non suficientes $ $ strsignal() support catalog $ @@ -247,3 +257,39 @@ $ SIGUSR1 30 Sinal definida polo usuario no. 1 $ SIGUSR2 31 Sinal definida polo usuario no. 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsoleto) +1 Tipo de dirección non soportado +$ EAI_AGAIN +2 Erro temporal na resolución de nomes +$ EAI_BADFLAGS +3 Valor inválido de ai_flags +$ EAI_FAIL +4 Erro non recuperable na resolución de nomes +$ EAI_FAMILY +5 ai_family non soportado +$ EAI_MEMORY +6 Erro na asignación de memoria +$ 7 (obsoleto) +7 Non hai dirección asociada co nome de máquina +$ EAI_NONAME +8 Non se dispón nome de máquina, nin nome de servizo +$ EAI_SERVICE +9 Nome de servizo non soportado en ai_socktype +$ EAI_SOCKTYPE +10 ai_socktype non soportado +$ EAI_SYSTEM +11 Erro de sistema devolto en errno +$ EAI_BADHINTS +12 Valor inválido de hints +$ EAI_PROTOCOL +13 Protocolo resolto descoñecido +$ EAI_OVERFLOW +14 Búfer de argumentos excedido +$ 0 +32766 Éxito +$ NL_MSGMAX +32767 Erro descoñecido From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 11:57:23 2010 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 513F6106566B; Thu, 21 Jan 2010 11:57:23 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 9FC368FC1B; Thu, 21 Jan 2010 11:57:22 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0LBvJw5061408; Thu, 21 Jan 2010 14:57:19 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1264075040; bh=waffBYRmaanPl0IoSAgvVqtSUCo366sLS5hHZvKupM0=; l=1192; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=TNGEkaNECB9Chm8c8v9m4qXh9RjtDg1zhPIV7LBEFf78KeNJeDGxKCqQOu9s1c/nv nAztyInSZRaE7/q/ERBpwZV/MGQPsGTa5K8Nky4krJwrWIrVSCWmuK13ztQD1vdr7P vf8BrteleOgTO49jb1kQai5UM0W0pG1TGowwFeRE= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0LBvJ4N061407; Thu, 21 Jan 2010 14:57:19 +0300 (MSK) (envelope-from ache) Date: Thu, 21 Jan 2010 14:57:19 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100121115719.GA61292@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> <20100120211722.S2451@besplex.bde.org> <20100120121827.GA55236@nagual.pp.ru> <20100121155841.H1512@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100121155841.H1512@besplex.bde.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: r202572 - head/lib/libc/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: Thu, 21 Jan 2010 11:57:23 -0000 On Thu, Jan 21, 2010 at 04:25:53PM +1100, Bruce Evans wrote: > > To be used in practice, strcoll() should never fails, doing fallback to > > strcmp() instead, not only in that, but in lots of other cases too (it may > > set errno like EILSEQ, but not fails). The next important thing is to > > return 0 only for true binary equals, additionaly ranking (f.e. by > > strcmp()) anything inside classes of equality to stabilize result. > > > > I hope our strcoll() will be kept in that state after implementing > > UCA too. > > What is UCA? http://unicode.org/reports/tr10/ > Can it return equal for non-binary-equal strings? I think it can -- the > locale might have different encodings for strings that are considered > identical. Then duplicates should be according to strcoll() and file > systems would have a hard time managing such duplicates when they are > created in a locale where they are non-duplicates. It can, but it isn't convenient. It depends of how equality classes are treated. If strings belongs to such class, they have the same weight comparing with other strings, but additional ranking inside class is possible. -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 12:01:07 2010 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 860D61065696; Thu, 21 Jan 2010 12:01:07 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 360798FC2D; Thu, 21 Jan 2010 12:01:06 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 1F06F14DA318; Thu, 21 Jan 2010 13:01:06 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TxMdjtXAn90H; Thu, 21 Jan 2010 13:00:56 +0100 (CET) Received: from [192.168.1.105] (catv-89-132-179-104.catv.broadband.hu [89.132.179.104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 2293F14DA311; Thu, 21 Jan 2010 13:00:56 +0100 (CET) Message-ID: <4B5841F7.4090408@FreeBSD.org> Date: Thu, 21 Jan 2010 13:00:55 +0100 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; es-ES; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> <20100120211722.S2451@besplex.bde.org> <20100120121827.GA55236@nagual.pp.ru> <20100121155841.H1512@besplex.bde.org> <20100121115719.GA61292@nagual.pp.ru> In-Reply-To: <20100121115719.GA61292@nagual.pp.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Unicode collation [Was: Re: svn commit: r202572 - head/lib/libc/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: Thu, 21 Jan 2010 12:01:07 -0000 El 2010. 01. 21. 12:57, Andrey Chernov escribió: > On Thu, Jan 21, 2010 at 04:25:53PM +1100, Bruce Evans wrote: > >>> To be used in practice, strcoll() should never fails, doing fallback to >>> strcmp() instead, not only in that, but in lots of other cases too (it may >>> set errno like EILSEQ, but not fails). The next important thing is to >>> return 0 only for true binary equals, additionaly ranking (f.e. by >>> strcmp()) anything inside classes of equality to stabilize result. >>> >>> I hope our strcoll() will be kept in that state after implementing >>> UCA too. >>> >> What is UCA? >> > http://unicode.org/reports/tr10/ > IIRC, there was a SoC student working on collation. Do we know something about him and the status of that project? Cheers, -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 12:18:29 2010 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 877AF1065676; Thu, 21 Jan 2010 12:18:29 +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 7453B8FC1D; Thu, 21 Jan 2010 12:18:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LCIT7O023774; Thu, 21 Jan 2010 12:18:29 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LCIT0I023771; Thu, 21 Jan 2010 12:18:29 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001211218.o0LCIT0I023771@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 21 Jan 2010 12:18:29 +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: r202745 - in stable/7/sys: conf dev/cxgb dev/cxgb/common modules/cxgb/cxgb 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: Thu, 21 Jan 2010 12:18:29 -0000 Author: np Date: Thu Jan 21 12:18:29 2010 New Revision: 202745 URL: http://svn.freebsd.org/changeset/base/202745 Log: MFC r194917,r194918,r197043,r197791,r199239,r199240,r200003,r201907,r202671,r202678: r194917: About to add 10Gbase-T to known media types, this is just a whitespace cleanup before that commit. No functional impact. r194918: Add 10Gbase-T to known ethernet media types Some parts of r194521 (convert the port and adapter locks from sx_locks to regular mutexes). r197043: There is no need to log anything for a ctrlq stall or restart. These are normal events. r197791: cxgb(4) updates, including: - support for the new Gen-2, BT, and LP-CR cards. - T3 firmware 7.7.0 - shared "common code" updates. r199239: The 10GBASE-T card should use an IPG of 1. Also enable the check for low power startup on this card. r199240: Don't disable the XGMAC's tx on ifconfig down. It is unnecessary and can cause false backpressure in the chip. Fix a us/ms mixup while here. r200003: T3 firmware 7.8.0 for cxgb(4) r201907: Extra parantheses to keep certain compilers happy. r202671: Fix for a cxgb(4) panic. cxgb_ioctl can be called by the IP and IPv6 layers with non-sleepable locks held. Don't (potentially) sleep in those situations. r202678: Complain if freelist queue sizes are significantly less than desired. Added: stable/7/sys/dev/cxgb/common/cxgb_aq100x.c - copied, changed from r197791, head/sys/dev/cxgb/common/cxgb_aq100x.c Modified: stable/7/sys/conf/files stable/7/sys/dev/cxgb/common/cxgb_ael1002.c stable/7/sys/dev/cxgb/common/cxgb_common.h stable/7/sys/dev/cxgb/common/cxgb_mv88e1xxx.c stable/7/sys/dev/cxgb/common/cxgb_regs.h stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c stable/7/sys/dev/cxgb/common/cxgb_tn1010.c stable/7/sys/dev/cxgb/common/cxgb_vsc8211.c stable/7/sys/dev/cxgb/common/cxgb_xgmac.c stable/7/sys/dev/cxgb/cxgb_adapter.h stable/7/sys/dev/cxgb/cxgb_main.c stable/7/sys/dev/cxgb/cxgb_osdep.h stable/7/sys/dev/cxgb/cxgb_sge.c stable/7/sys/dev/cxgb/cxgb_t3fw.h stable/7/sys/modules/cxgb/cxgb/Makefile stable/7/sys/net/if_media.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Thu Jan 21 11:41:29 2010 (r202744) +++ stable/7/sys/conf/files Thu Jan 21 12:18:29 2010 (r202745) @@ -689,6 +689,7 @@ dev/cxgb/common/cxgb_mc5.c optional cxgb dev/cxgb/common/cxgb_vsc7323.c optional cxgb pci dev/cxgb/common/cxgb_vsc8211.c optional cxgb pci dev/cxgb/common/cxgb_ael1002.c optional cxgb pci +dev/cxgb/common/cxgb_aq100x.c optional cxgb pci dev/cxgb/common/cxgb_mv88e1xxx.c optional cxgb pci dev/cxgb/common/cxgb_xgmac.c optional cxgb pci dev/cxgb/common/cxgb_t3_hw.c optional cxgb pci Modified: stable/7/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Thu Jan 21 11:41:29 2010 (r202744) +++ stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Thu Jan 21 12:18:29 2010 (r202745) @@ -49,16 +49,30 @@ enum { enum { AEL100X_TX_DISABLE = 9, AEL100X_TX_CONFIG1 = 0xc002, + AEL1002_PWR_DOWN_HI = 0xc011, AEL1002_PWR_DOWN_LO = 0xc012, AEL1002_XFI_EQL = 0xc015, AEL1002_LB_EN = 0xc017, + AEL_OPT_SETTINGS = 0xc017, AEL_I2C_CTRL = 0xc30a, AEL_I2C_DATA = 0xc30b, AEL_I2C_STAT = 0xc30c, + AEL2005_GPIO_CTRL = 0xc214, AEL2005_GPIO_STAT = 0xc215, + + AEL2020_GPIO_INTR = 0xc103, + AEL2020_GPIO_CTRL = 0xc108, + AEL2020_GPIO_STAT = 0xc10c, + AEL2020_GPIO_CFG = 0xc110, + + AEL2020_GPIO_SDA = 0, + AEL2020_GPIO_MODDET = 1, + AEL2020_GPIO_0 = 3, + AEL2020_GPIO_1 = 2, + AEL2020_GPIO_LSTAT = AEL2020_GPIO_1, }; enum { edc_none, edc_sr, edc_twinax }; @@ -85,7 +99,7 @@ struct reg_val { unsigned short set_bits; }; -static int get_module_type(struct cphy *phy); +static int ael2xxx_get_module_type(struct cphy *phy, int delay_ms); static int set_phy_regs(struct cphy *phy, const struct reg_val *rv) { @@ -112,6 +126,9 @@ static void ael100x_txon(struct cphy *ph msleep(30); } +/* + * Read an 8-bit word from a device attached to the PHY's i2c bus. + */ static int ael_i2c_rd(struct cphy *phy, int dev_addr, int word_addr) { int i, err; @@ -135,11 +152,14 @@ static int ael_i2c_rd(struct cphy *phy, return data >> 8; } } - CH_WARN(phy->adapter, "PHY %u I2C read of addr %u timed out\n", - phy->addr, word_addr); + CH_WARN(phy->adapter, "PHY %u i2c read of dev.addr %x.%x timed out\n", + phy->addr, dev_addr, word_addr); return -ETIMEDOUT; } +/* + * Write an 8-bit word to a device attached to the PHY's i2c bus. + */ static int ael_i2c_wr(struct cphy *phy, int dev_addr, int word_addr, int data) { int i, err; @@ -162,8 +182,8 @@ static int ael_i2c_wr(struct cphy *phy, if ((stat & 3) == 1) return 0; } - CH_WARN(phy->adapter, "PHY %u I2C Write of addr %u timed out\n", - phy->addr, word_addr); + CH_WARN(phy->adapter, "PHY %u i2c Write of dev.addr %x.%x = %#x timed out\n", + phy->addr, dev_addr, word_addr, data); return -ETIMEDOUT; } @@ -234,9 +254,9 @@ static int ael1002_get_module_type(struc if (delay_ms) msleep(delay_ms); - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0); + v = ael2xxx_get_module_type(phy, delay_ms); - return v == -ETIMEDOUT ? phy_modtype_none : get_module_type(phy); + return (v == -ETIMEDOUT ? phy_modtype_none : v); } static int ael1002_reset(struct cphy *phy, int wait) @@ -316,12 +336,13 @@ static struct cphy_ops ael1002_ops = { }; #endif -int t3_ael1002_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, +int t3_ael1002_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) { int err; + struct cphy *phy = &pinfo->phy; - cphy_init(phy, adapter, phy_addr, &ael1002_ops, mdio_ops, + cphy_init(phy, pinfo->adapter, pinfo, phy_addr, &ael1002_ops, mdio_ops, SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE, "10GBASE-R"); ael100x_txon(phy); @@ -370,12 +391,6 @@ static int ael1006_reset(struct cphy *ph } -static int ael1006_power_down(struct cphy *phy, int enable) -{ - return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, - BMCR_PDOWN, enable ? BMCR_PDOWN : 0); -} - #ifdef C99_NOT_SUPPORTED static struct cphy_ops ael1006_ops = { ael1006_reset, @@ -389,7 +404,7 @@ static struct cphy_ops ael1006_ops = { NULL, NULL, get_link_status_r, - ael1006_power_down, + ael1002_power_down, }; #else static struct cphy_ops ael1006_ops = { @@ -399,20 +414,97 @@ static struct cphy_ops ael1006_ops = { .intr_clear = t3_phy_lasi_intr_clear, .intr_handler = t3_phy_lasi_intr_handler, .get_link_status = get_link_status_r, - .power_down = ael1006_power_down, + .power_down = ael1002_power_down, }; #endif -int t3_ael1006_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, +int t3_ael1006_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) { - cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops, + struct cphy *phy = &pinfo->phy; + + cphy_init(phy, pinfo->adapter, pinfo, phy_addr, &ael1006_ops, mdio_ops, SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE, "10GBASE-SR"); + phy->modtype = phy_modtype_sr; ael100x_txon(phy); return 0; } +/* + * Decode our module type. + */ +static int ael2xxx_get_module_type(struct cphy *phy, int delay_ms) +{ + int v; + + if (delay_ms) + msleep(delay_ms); + + v = get_phytrans_type(phy); + if (v == phy_transtype_sfp) { + /* SFP: see SFF-8472 for below */ + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 3); + if (v < 0) + return v; + + if (v == 0x1) + return phy_modtype_twinax; + if (v == 0x10) + return phy_modtype_sr; + if (v == 0x20) + return phy_modtype_lr; + if (v == 0x40) + return phy_modtype_lrm; + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 6); + if (v < 0) + return v; + if (v != 4) + return phy_modtype_unknown; + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 10); + if (v < 0) + return v; + + if (v & 0x80) { + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0x12); + if (v < 0) + return v; + return v > 10 ? phy_modtype_twinax_long : + phy_modtype_twinax; + } + } else if (v == phy_transtype_xfp) { + /* XFP: See INF-8077i for details. */ + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 127); + if (v < 0) + return v; + + if (v != 1) { + /* XXX: set page select to table 1 yourself */ + return phy_modtype_unknown; + } + + v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 131); + if (v < 0) + return v; + v &= 0xf0; + if (v == 0x10) + return phy_modtype_lrm; + if (v == 0x40) + return phy_modtype_lr; + if (v == 0x80) + return phy_modtype_sr; + } + + return phy_modtype_unknown; +} + +/* + * Code to support the Aeluros/NetLogic 2005 10Gb PHY. + */ static int ael2005_setup_sr_edc(struct cphy *phy) { static struct reg_val regs[] = { @@ -1107,72 +1199,21 @@ static int ael2005_setup_twinax_edc(stru return err; } -static int get_module_type(struct cphy *phy) +static int ael2005_get_module_type(struct cphy *phy, int delay_ms) { int v; + unsigned int stat; - v = get_phytrans_type(phy); - if (v == phy_transtype_sfp) { - /* SFP: see SFF-8472 for below */ - - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 3); - if (v < 0) - return v; - - if (v == 0x1) - return phy_modtype_twinax; - if (v == 0x10) - return phy_modtype_sr; - if (v == 0x20) - return phy_modtype_lr; - if (v == 0x40) - return phy_modtype_lrm; - - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 6); - if (v < 0) - return v; - if (v != 4) - return phy_modtype_unknown; - - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 10); - if (v < 0) - return v; - - if (v & 0x80) { - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0x12); - if (v < 0) - return v; - return v > 10 ? phy_modtype_twinax_long : - phy_modtype_twinax; - } - } else if (v == phy_transtype_xfp) { - /* XFP: See INF-8077i for details. */ - - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 127); - if (v < 0) - return v; - - if (v != 1) { - /* XXX: set page select to table 1 yourself */ - return phy_modtype_unknown; - } + v = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, &stat); + if (v) + return v; - v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 131); - if (v < 0) - return v; - v &= 0xf0; - if (v == 0x10) - return phy_modtype_lrm; - if (v == 0x40) - return phy_modtype_lr; - if (v == 0x80) - return phy_modtype_sr; - } + if (stat & (1 << 8)) /* module absent */ + return phy_modtype_none; - return phy_modtype_unknown; + return ael2xxx_get_module_type(phy, delay_ms); } - static int ael2005_intr_enable(struct cphy *phy) { int err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, 0x200); @@ -1191,24 +1232,6 @@ static int ael2005_intr_clear(struct cph return err ? err : t3_phy_lasi_intr_clear(phy); } -static int ael2005_get_module_type(struct cphy *phy, int delay_ms) -{ - int v; - unsigned int stat; - - v = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, &stat); - if (v) - return v; - - if (stat & (1 << 8)) /* module absent */ - return phy_modtype_none; - - if (delay_ms) - msleep(delay_ms); - - return get_module_type(phy); -} - static int ael2005_reset(struct cphy *phy, int wait) { static struct reg_val regs0[] = { @@ -1227,7 +1250,8 @@ static int ael2005_reset(struct cphy *ph { 0, 0, 0, 0 } }; - int err, lasi_ctrl; + int err; + unsigned int lasi_ctrl; err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, &lasi_ctrl); if (err) @@ -1315,8 +1339,8 @@ static int ael2005_intr_handler(struct c return ret; } -#ifdef C99_NOT_SUPPORTED static struct cphy_ops ael2005_ops = { +#ifdef C99_NOT_SUPPORTED ael2005_reset, ael2005_intr_enable, ael2005_intr_disable, @@ -1329,9 +1353,7 @@ static struct cphy_ops ael2005_ops = { NULL, get_link_status_r, ael1002_power_down, -}; #else -static struct cphy_ops ael2005_ops = { .reset = ael2005_reset, .intr_enable = ael2005_intr_enable, .intr_disable = ael2005_intr_disable, @@ -1339,14 +1361,16 @@ static struct cphy_ops ael2005_ops = { .intr_handler = ael2005_intr_handler, .get_link_status = get_link_status_r, .power_down = ael1002_power_down, -}; #endif +}; -int t3_ael2005_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, +int t3_ael2005_phy_prep(pinfo_t *pinfo, int phy_addr, const struct mdio_ops *mdio_ops) { int err; - cphy_init(phy, adapter, phy_addr, &ael2005_ops, mdio_ops, + struct cphy *phy = &pinfo->phy; + + cphy_init(phy, pinfo->adapter, pinfo, phy_addr, &ael2005_ops, mdio_ops, SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE | SUPPORTED_IRQ, "10GBASE-R"); msleep(125); @@ -1361,6 +1385,713 @@ int t3_ael2005_phy_prep(struct cphy *phy } /* + * Setup EDC and other parameters for operation with an optical module. + */ +static int ael2020_setup_sr_edc(struct cphy *phy) +{ + static struct reg_val regs[] = { + { MDIO_DEV_PMA_PMD, 0xcc01, 0xffff, 0x488a }, + + { MDIO_DEV_PMA_PMD, 0xcb1b, 0xffff, 0x0200 }, + { MDIO_DEV_PMA_PMD, 0xcb1c, 0xffff, 0x00f0 }, + { MDIO_DEV_PMA_PMD, 0xcc06, 0xffff, 0x00e0 }, + + /* end */ + { 0, 0, 0, 0 } + }; + int err; + + err = set_phy_regs(phy, regs); + msleep(50); + if (err) + return err; + + phy->priv = edc_sr; + return 0; +} + +/* + * Setup EDC and other parameters for operation with an TWINAX module. + */ +static int ael2020_setup_twinax_edc(struct cphy *phy, int modtype) +{ + static struct reg_val uCclock40MHz[] = { + { MDIO_DEV_PMA_PMD, 0xff28, 0xffff, 0x4001 }, + { MDIO_DEV_PMA_PMD, 0xff2a, 0xffff, 0x0002 }, + { 0, 0, 0, 0 } + }; + + static struct reg_val uCclockActivate[] = { + { MDIO_DEV_PMA_PMD, 0xd000, 0xffff, 0x5200 }, + { 0, 0, 0, 0 } + }; + + static struct reg_val uCactivate[] = { + { MDIO_DEV_PMA_PMD, 0xd080, 0xffff, 0x0100 }, + { MDIO_DEV_PMA_PMD, 0xd092, 0xffff, 0x0000 }, + { 0, 0, 0, 0 } + }; + + static u16 twinax_edc[] = { + 0xd800, 0x4009, + 0xd801, 0x2fff, + 0xd802, 0x300f, + 0xd803, 0x40aa, + 0xd804, 0x401c, + 0xd805, 0x401e, + 0xd806, 0x2ff4, + 0xd807, 0x3dc4, + 0xd808, 0x2035, + 0xd809, 0x3035, + 0xd80a, 0x6524, + 0xd80b, 0x2cb2, + 0xd80c, 0x3012, + 0xd80d, 0x1002, + 0xd80e, 0x26e2, + 0xd80f, 0x3022, + 0xd810, 0x1002, + 0xd811, 0x27d2, + 0xd812, 0x3022, + 0xd813, 0x1002, + 0xd814, 0x2822, + 0xd815, 0x3012, + 0xd816, 0x1002, + 0xd817, 0x2492, + 0xd818, 0x3022, + 0xd819, 0x1002, + 0xd81a, 0x2772, + 0xd81b, 0x3012, + 0xd81c, 0x1002, + 0xd81d, 0x23d2, + 0xd81e, 0x3022, + 0xd81f, 0x1002, + 0xd820, 0x22cd, + 0xd821, 0x301d, + 0xd822, 0x27f2, + 0xd823, 0x3022, + 0xd824, 0x1002, + 0xd825, 0x5553, + 0xd826, 0x0307, + 0xd827, 0x2522, + 0xd828, 0x3022, + 0xd829, 0x1002, + 0xd82a, 0x2142, + 0xd82b, 0x3012, + 0xd82c, 0x1002, + 0xd82d, 0x4016, + 0xd82e, 0x5e63, + 0xd82f, 0x0344, + 0xd830, 0x2142, + 0xd831, 0x3012, + 0xd832, 0x1002, + 0xd833, 0x400e, + 0xd834, 0x2522, + 0xd835, 0x3022, + 0xd836, 0x1002, + 0xd837, 0x2b52, + 0xd838, 0x3012, + 0xd839, 0x1002, + 0xd83a, 0x2742, + 0xd83b, 0x3022, + 0xd83c, 0x1002, + 0xd83d, 0x25e2, + 0xd83e, 0x3022, + 0xd83f, 0x1002, + 0xd840, 0x2fa4, + 0xd841, 0x3dc4, + 0xd842, 0x6624, + 0xd843, 0x414b, + 0xd844, 0x56b3, + 0xd845, 0x03c6, + 0xd846, 0x866b, + 0xd847, 0x400c, + 0xd848, 0x2712, + 0xd849, 0x3012, + 0xd84a, 0x1002, + 0xd84b, 0x2c4b, + 0xd84c, 0x309b, + 0xd84d, 0x56b3, + 0xd84e, 0x03c3, + 0xd84f, 0x866b, + 0xd850, 0x400c, + 0xd851, 0x2272, + 0xd852, 0x3022, + 0xd853, 0x1002, + 0xd854, 0x2742, + 0xd855, 0x3022, + 0xd856, 0x1002, + 0xd857, 0x25e2, + 0xd858, 0x3022, + 0xd859, 0x1002, + 0xd85a, 0x2fb4, + 0xd85b, 0x3dc4, + 0xd85c, 0x6624, + 0xd85d, 0x56b3, + 0xd85e, 0x03c3, + 0xd85f, 0x866b, + 0xd860, 0x401c, + 0xd861, 0x2c45, + 0xd862, 0x3095, + 0xd863, 0x5b53, + 0xd864, 0x2372, + 0xd865, 0x3012, + 0xd866, 0x13c2, + 0xd867, 0x5cc3, + 0xd868, 0x2712, + 0xd869, 0x3012, + 0xd86a, 0x1312, + 0xd86b, 0x2b52, + 0xd86c, 0x3012, + 0xd86d, 0x1002, + 0xd86e, 0x2742, + 0xd86f, 0x3022, + 0xd870, 0x1002, + 0xd871, 0x2582, + 0xd872, 0x3022, + 0xd873, 0x1002, + 0xd874, 0x2142, + 0xd875, 0x3012, + 0xd876, 0x1002, + 0xd877, 0x628f, + 0xd878, 0x2985, + 0xd879, 0x33a5, + 0xd87a, 0x25e2, + 0xd87b, 0x3022, + 0xd87c, 0x1002, + 0xd87d, 0x5653, + 0xd87e, 0x03d2, + 0xd87f, 0x401e, + 0xd880, 0x6f72, + 0xd881, 0x1002, + 0xd882, 0x628f, + 0xd883, 0x2304, + 0xd884, 0x3c84, + 0xd885, 0x6436, + 0xd886, 0xdff4, + 0xd887, 0x6436, + 0xd888, 0x2ff5, + 0xd889, 0x3005, + 0xd88a, 0x8656, + 0xd88b, 0xdfba, + 0xd88c, 0x56a3, + 0xd88d, 0xd05a, + 0xd88e, 0x2972, + 0xd88f, 0x3012, + 0xd890, 0x1392, + 0xd891, 0xd05a, + 0xd892, 0x56a3, + 0xd893, 0xdfba, + 0xd894, 0x0383, + 0xd895, 0x6f72, + 0xd896, 0x1002, + 0xd897, 0x2b45, + 0xd898, 0x3005, + 0xd899, 0x4178, + 0xd89a, 0x5653, + 0xd89b, 0x0384, + 0xd89c, 0x2a62, + 0xd89d, 0x3012, + 0xd89e, 0x1002, + 0xd89f, 0x2f05, + 0xd8a0, 0x3005, + 0xd8a1, 0x41c8, + 0xd8a2, 0x5653, + 0xd8a3, 0x0382, + 0xd8a4, 0x0002, + 0xd8a5, 0x4218, + 0xd8a6, 0x2474, + 0xd8a7, 0x3c84, + 0xd8a8, 0x6437, + 0xd8a9, 0xdff4, + 0xd8aa, 0x6437, + 0xd8ab, 0x2ff5, + 0xd8ac, 0x3c05, + 0xd8ad, 0x8757, + 0xd8ae, 0xb888, + 0xd8af, 0x9787, + 0xd8b0, 0xdff4, + 0xd8b1, 0x6724, + 0xd8b2, 0x866a, + 0xd8b3, 0x6f72, + 0xd8b4, 0x1002, + 0xd8b5, 0x2641, + 0xd8b6, 0x3021, + 0xd8b7, 0x1001, + 0xd8b8, 0xc620, + 0xd8b9, 0x0000, + 0xd8ba, 0xc621, + 0xd8bb, 0x0000, + 0xd8bc, 0xc622, + 0xd8bd, 0x00ce, + 0xd8be, 0xc623, + 0xd8bf, 0x007f, + 0xd8c0, 0xc624, + 0xd8c1, 0x0032, + 0xd8c2, 0xc625, + 0xd8c3, 0x0000, + 0xd8c4, 0xc627, + 0xd8c5, 0x0000, + 0xd8c6, 0xc628, + 0xd8c7, 0x0000, + 0xd8c8, 0xc62c, + 0xd8c9, 0x0000, + 0xd8ca, 0x0000, + 0xd8cb, 0x2641, + 0xd8cc, 0x3021, + 0xd8cd, 0x1001, + 0xd8ce, 0xc502, + 0xd8cf, 0x53ac, + 0xd8d0, 0xc503, + 0xd8d1, 0x2cd3, + 0xd8d2, 0xc600, + 0xd8d3, 0x2a6e, + 0xd8d4, 0xc601, + 0xd8d5, 0x2a2c, + 0xd8d6, 0xc605, + 0xd8d7, 0x5557, + 0xd8d8, 0xc60c, + 0xd8d9, 0x5400, + 0xd8da, 0xc710, + 0xd8db, 0x0700, + 0xd8dc, 0xc711, + 0xd8dd, 0x0f06, + 0xd8de, 0xc718, + 0xd8df, 0x0700, + 0xd8e0, 0xc719, + 0xd8e1, 0x0f06, + 0xd8e2, 0xc720, + 0xd8e3, 0x4700, + 0xd8e4, 0xc721, + 0xd8e5, 0x0f06, + 0xd8e6, 0xc728, + 0xd8e7, 0x0700, + 0xd8e8, 0xc729, + 0xd8e9, 0x1207, + 0xd8ea, 0xc801, + 0xd8eb, 0x7f50, + 0xd8ec, 0xc802, + 0xd8ed, 0x7760, + 0xd8ee, 0xc803, + 0xd8ef, 0x7fce, + 0xd8f0, 0xc804, + 0xd8f1, 0x520e, + 0xd8f2, 0xc805, + 0xd8f3, 0x5c11, + 0xd8f4, 0xc806, + 0xd8f5, 0x3c51, + 0xd8f6, 0xc807, + 0xd8f7, 0x4061, + 0xd8f8, 0xc808, + 0xd8f9, 0x49c1, + 0xd8fa, 0xc809, + 0xd8fb, 0x3840, + 0xd8fc, 0xc80a, + 0xd8fd, 0x0000, + 0xd8fe, 0xc821, + 0xd8ff, 0x0002, + 0xd900, 0xc822, + 0xd901, 0x0046, + 0xd902, 0xc844, + 0xd903, 0x182f, + 0xd904, 0xc013, + 0xd905, 0xf341, + 0xd906, 0xc084, + 0xd907, 0x0030, + 0xd908, 0xc904, + 0xd909, 0x1401, + 0xd90a, 0xcb0c, + 0xd90b, 0x0004, + 0xd90c, 0xcb0e, + 0xd90d, 0xa00a, + 0xd90e, 0xcb0f, + 0xd90f, 0xc0c0, + 0xd910, 0xcb10, + 0xd911, 0xc0c0, + 0xd912, 0xcb11, + 0xd913, 0x00a0, + 0xd914, 0xcb12, + 0xd915, 0x0007, + 0xd916, 0xc241, + 0xd917, 0xa000, + 0xd918, 0xc243, + 0xd919, 0x7fe0, + 0xd91a, 0xc604, + 0xd91b, 0x000e, + 0xd91c, 0xc609, + 0xd91d, 0x00f5, + 0xd91e, 0xc611, + 0xd91f, 0x000e, + 0xd920, 0xc660, + 0xd921, 0x9600, + 0xd922, 0xc687, + 0xd923, 0x0004, + 0xd924, 0xc60a, + 0xd925, 0x04f5, + 0xd926, 0x0000, + 0xd927, 0x2641, + 0xd928, 0x3021, + 0xd929, 0x1001, + 0xd92a, 0xc620, + 0xd92b, 0x14e5, + 0xd92c, 0xc621, + 0xd92d, 0xc53d, + 0xd92e, 0xc622, + 0xd92f, 0x3cbe, + 0xd930, 0xc623, + 0xd931, 0x4452, + 0xd932, 0xc624, + 0xd933, 0xc5c5, + 0xd934, 0xc625, + 0xd935, 0xe01e, + 0xd936, 0xc627, + 0xd937, 0x0000, + 0xd938, 0xc628, + 0xd939, 0x0000, + 0xd93a, 0xc62c, + 0xd93b, 0x0000, + 0xd93c, 0x0000, + 0xd93d, 0x2b84, + 0xd93e, 0x3c74, + 0xd93f, 0x6435, + 0xd940, 0xdff4, + 0xd941, 0x6435, + 0xd942, 0x2806, + 0xd943, 0x3006, + 0xd944, 0x8565, + 0xd945, 0x2b24, + 0xd946, 0x3c24, + 0xd947, 0x6436, + 0xd948, 0x1002, + 0xd949, 0x2b24, + 0xd94a, 0x3c24, + 0xd94b, 0x6436, + 0xd94c, 0x4045, + 0xd94d, 0x8656, + 0xd94e, 0x5663, + 0xd94f, 0x0302, + 0xd950, 0x401e, + 0xd951, 0x1002, + 0xd952, 0x2807, + 0xd953, 0x31a7, + 0xd954, 0x20c4, + 0xd955, 0x3c24, + 0xd956, 0x6724, + 0xd957, 0x1002, + 0xd958, 0x2807, + 0xd959, 0x3187, + 0xd95a, 0x20c4, + 0xd95b, 0x3c24, + 0xd95c, 0x6724, + 0xd95d, 0x1002, + 0xd95e, 0x24f4, + 0xd95f, 0x3c64, + 0xd960, 0x6436, + 0xd961, 0xdff4, + 0xd962, 0x6436, + 0xd963, 0x1002, + 0xd964, 0x2006, + 0xd965, 0x3d76, + 0xd966, 0xc161, + 0xd967, 0x6134, + 0xd968, 0x6135, + 0xd969, 0x5443, + 0xd96a, 0x0303, + 0xd96b, 0x6524, + 0xd96c, 0x00fb, + 0xd96d, 0x1002, + 0xd96e, 0x20d4, + 0xd96f, 0x3c24, + 0xd970, 0x2025, + 0xd971, 0x3005, + 0xd972, 0x6524, + 0xd973, 0x1002, + 0xd974, 0xd019, + 0xd975, 0x2104, + 0xd976, 0x3c24, + 0xd977, 0x2105, + 0xd978, 0x3805, + 0xd979, 0x6524, + 0xd97a, 0xdff4, + 0xd97b, 0x4005, + 0xd97c, 0x6524, + 0xd97d, 0x2e8d, + 0xd97e, 0x303d, + 0xd97f, 0x2408, + 0xd980, 0x35d8, + 0xd981, 0x5dd3, + 0xd982, 0x0307, + 0xd983, 0x8887, + 0xd984, 0x63a7, + 0xd985, 0x8887, + 0xd986, 0x63a7, + 0xd987, 0xdffd, + 0xd988, 0x00f9, + 0xd989, 0x1002, + 0xd98a, 0x0000, + }; + int i, err; + + /* set uC clock and activate it */ + err = set_phy_regs(phy, uCclock40MHz); + msleep(500); + if (err) + return err; + err = set_phy_regs(phy, uCclockActivate); + msleep(500); + if (err) + return err; + + for (i = 0; i < ARRAY_SIZE(twinax_edc) && !err; i += 2) + err = mdio_write(phy, MDIO_DEV_PMA_PMD, twinax_edc[i], + twinax_edc[i + 1]); + /* activate uC */ + err = set_phy_regs(phy, uCactivate); + if (!err) + phy->priv = edc_twinax; + return err; +} + +/* + * Return Module Type. + */ +static int ael2020_get_module_type(struct cphy *phy, int delay_ms) +{ + int v; + unsigned int stat; + + v = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2020_GPIO_STAT, &stat); + if (v) + return v; + + if (stat & (0x1 << (AEL2020_GPIO_MODDET*4))) { + /* module absent */ + return phy_modtype_none; + } + + return ael2xxx_get_module_type(phy, delay_ms); +} + +/* + * Enable PHY interrupts. We enable "Module Detection" interrupts (on any + * state transition) and then generic Link Alarm Status Interrupt (LASI). + */ +static int ael2020_intr_enable(struct cphy *phy) +{ + struct reg_val regs[] = { + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CFG+AEL2020_GPIO_LSTAT, + 0xffff, 0x4 }, + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CTRL, + 0xffff, 0x8 << (AEL2020_GPIO_LSTAT*4) }, + + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CTRL, + 0xffff, 0x2 << (AEL2020_GPIO_MODDET*4) }, + + /* end */ + { 0, 0, 0, 0 } + }; + int err; + + err = set_phy_regs(phy, regs); + if (err) + return err; + + phy->caps |= POLL_LINK_1ST_TIME; + + /* enable standard Link Alarm Status Interrupts */ + err = t3_phy_lasi_intr_enable(phy); + if (err) + return err; + + return 0; +} + +/* + * Disable PHY interrupts. The mirror of the above ... + */ +static int ael2020_intr_disable(struct cphy *phy) +{ + struct reg_val regs[] = { + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CTRL, + 0xffff, 0xb << (AEL2020_GPIO_LSTAT*4) }, + + { MDIO_DEV_PMA_PMD, AEL2020_GPIO_CTRL, + 0xffff, 0x1 << (AEL2020_GPIO_MODDET*4) }, + + /* end */ + { 0, 0, 0, 0 } + }; + int err; + + err = set_phy_regs(phy, regs); + if (err) + return err; + + /* disable standard Link Alarm Status Interrupts */ + return t3_phy_lasi_intr_disable(phy); +} + +/* + * Clear PHY interrupt state. + */ +static int ael2020_intr_clear(struct cphy *phy) +{ + unsigned int stat; + int err = mdio_read(phy, MDIO_DEV_PMA_PMD, AEL2020_GPIO_INTR, &stat); + return err ? err : t3_phy_lasi_intr_clear(phy); +} + +/* + * Common register settings for the AEL2020 when it comes out of reset. + */ +static struct reg_val ael2020_reset_regs[] = { + { MDIO_DEV_PMA_PMD, 0xc003, 0xffff, 0x3101 }, + + { MDIO_DEV_PMA_PMD, 0xcd40, 0xffff, 0x0001 }, + + { MDIO_DEV_PMA_PMD, 0xff02, 0xffff, 0x0023 }, + { MDIO_DEV_PMA_PMD, 0xff03, 0xffff, 0x0000 }, + { MDIO_DEV_PMA_PMD, 0xff04, 0xffff, 0x0000 }, + + /* end */ + { 0, 0, 0, 0 } +}; + +/* + * Reset the PHY and put it into a canonical operating state. + */ +static int ael2020_reset(struct cphy *phy, int wait) +{ + int err; + unsigned int lasi_ctrl; + + /* grab current interrupt state */ + err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, &lasi_ctrl); + if (err) + return err; + + err = t3_phy_reset(phy, MDIO_DEV_PMA_PMD, 125); + if (err) + return err; + msleep(100); + + /* basic initialization for all module types */ + phy->priv = edc_none; + err = set_phy_regs(phy, ael2020_reset_regs); + if (err) + return err; + + /* determine module type and perform appropriate initialization */ + err = ael2020_get_module_type(phy, 0); + if (err < 0) + return err; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 13:15:14 2010 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 CD087106566C; Thu, 21 Jan 2010 13:15:14 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC6DA8FC18; Thu, 21 Jan 2010 13:15:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LDFEA2036687; Thu, 21 Jan 2010 13:15:14 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LDFEbg036685; Thu, 21 Jan 2010 13:15:14 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001211315.o0LDFEbg036685@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 21 Jan 2010 13:15:14 +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: r202747 - stable/8/share/mk 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: Thu, 21 Jan 2010 13:15:14 -0000 Author: ru Date: Thu Jan 21 13:15:14 2010 New Revision: 202747 URL: http://svn.freebsd.org/changeset/base/202747 Log: MFC r202578 and r202579: If CTAGS is not set or set to something other than "ctags" or "gtags", "cleandepend" was not removing the .depend file; fixed. [1] Allow the CTAGS to be set to something other than "gtags" or "ctags", but assume it supports a ctags(1)-compatible syntax. [2] PR: 126747 [1], 46676 [2] Modified: stable/8/share/mk/bsd.dep.mk Directory Properties: stable/8/share/mk/ (props changed) Modified: stable/8/share/mk/bsd.dep.mk ============================================================================== --- stable/8/share/mk/bsd.dep.mk Thu Jan 21 13:00:28 2010 (r202746) +++ stable/8/share/mk/bsd.dep.mk Thu Jan 21 13:15:14 2010 (r202747) @@ -58,14 +58,14 @@ DEPENDFILE?= .depend # Keep `tags' here, before SRCS are mangled below for `depend'. .if !target(tags) && defined(SRCS) && !defined(NO_TAGS) tags: ${SRCS} -.if ${CTAGS:T} == "ctags" - @${CTAGS} ${CTAGSFLAGS} -f /dev/stdout \ - ${.ALLSRC:N*.h} | sed "s;${.CURDIR}/;;" > ${.TARGET} -.elif ${CTAGS:T} == "gtags" +.if ${CTAGS:T} == "gtags" @cd ${.CURDIR} && ${CTAGS} ${GTAGSFLAGS} ${.OBJDIR} .if defined(HTML) @cd ${.CURDIR} && htags ${HTAGSFLAGS} -d ${.OBJDIR} ${.OBJDIR} .endif +.else + @${CTAGS} ${CTAGSFLAGS} -f /dev/stdout \ + ${.ALLSRC:N*.h} | sed "s;${.CURDIR}/;;" > ${.TARGET} .endif .endif @@ -175,13 +175,13 @@ afterdepend: .if !target(cleandepend) cleandepend: .if defined(SRCS) -.if ${CTAGS:T} == "ctags" - rm -f ${DEPENDFILE} tags -.elif ${CTAGS:T} == "gtags" +.if ${CTAGS:T} == "gtags" rm -f ${DEPENDFILE} GPATH GRTAGS GSYMS GTAGS .if defined(HTML) rm -rf HTML .endif +.else + rm -f ${DEPENDFILE} tags .endif .endif .endif From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 14:33:18 2010 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 BEF00106566B; Thu, 21 Jan 2010 14:33:18 +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 AC5778FC14; Thu, 21 Jan 2010 14:33:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LEXI3p054469; Thu, 21 Jan 2010 14:33:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LEXIFC054459; Thu, 21 Jan 2010 14:33:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001211433.o0LEXIFC054459@svn.freebsd.org> From: John Baldwin Date: Thu, 21 Jan 2010 14:33:18 +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: r202750 - in stable/7/sys: cddl/contrib/opensolaris/uts/common/fs/zfs dev/md fs/cd9660 fs/udf kern sys ufs/ffs 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: Thu, 21 Jan 2010 14:33:18 -0000 Author: jhb Date: Thu Jan 21 14:33:18 2010 New Revision: 202750 URL: http://svn.freebsd.org/changeset/base/202750 Log: MFC 189696,189697: Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a filesystem supports additional operations using shared vnode locks. Currently this is used to enable shared locks for open() and close() of read-only file descriptors. - When an ISOPEN namei() request is performed with LOCKSHARED, use a shared vnode lock for the leaf vnode only if the mount point has the extended shared flag set. - Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but not O_CREAT. - Use a shared vnode lock around VOP_CLOSE() if the file was opened with O_RDONLY and the mountpoint has the extended shared flag set. - Adjust md(4) to upgrade the vnode lock on the vnode it gets back from vn_open() since it now may only have a shared vnode lock. - Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since FIFO's require exclusive vnode locks for their open() and close() routines. (My recent MPSAFE patches for UDF and cd9660 already included this change.) - Enable extended shared operations on UFS, cd9660, and UDF. Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c stable/7/sys/dev/md/md.c stable/7/sys/fs/cd9660/cd9660_vfsops.c stable/7/sys/fs/udf/udf_vfsops.c stable/7/sys/kern/vfs_lookup.c stable/7/sys/kern/vfs_vnops.c stable/7/sys/kern/vnode_if.src stable/7/sys/sys/mount.h stable/7/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Jan 21 13:31:41 2010 (r202749) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Jan 21 14:33:18 2010 (r202750) @@ -1520,6 +1520,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, vnode.v_type = VDIR; vnode.v_data = rootzp; rootzp->z_vnode = &vnode; + VN_LOCK_ASHARE(vp); bzero(&zfsvfs, sizeof (zfsvfs_t)); Modified: stable/7/sys/dev/md/md.c ============================================================================== --- stable/7/sys/dev/md/md.c Thu Jan 21 13:31:41 2010 (r202749) +++ stable/7/sys/dev/md/md.c Thu Jan 21 14:33:18 2010 (r202750) @@ -918,12 +918,20 @@ mdcreate_vnode(struct md_s *sc, struct m return (error); vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); - if (nd.ni_vp->v_type != VREG || - (error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred, td))) { - VOP_UNLOCK(nd.ni_vp, 0, td); - (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); - return (error ? error : EINVAL); + if (nd.ni_vp->v_type != VREG) { + error = EINVAL; + goto bad; + } + error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred, td); + if (error != 0) + goto bad; + if (VOP_ISLOCKED(nd.ni_vp, td) != LK_EXCLUSIVE) { + vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY, td); + if (nd.ni_vp->v_iflag & VI_DOOMED) { + /* Forced unmount. */ + error = EBADF; + goto bad; + } } nd.ni_vp->v_vflag |= VV_MD; VOP_UNLOCK(nd.ni_vp, 0, td); @@ -942,13 +950,15 @@ mdcreate_vnode(struct md_s *sc, struct m sc->vnode = NULL; vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY, td); nd.ni_vp->v_vflag &= ~VV_MD; - VOP_UNLOCK(nd.ni_vp, 0, td); - (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); - return (error); + goto bad; } VFS_UNLOCK_GIANT(vfslocked); return (0); +bad: + VOP_UNLOCK(nd.ni_vp, 0, td); + (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); + VFS_UNLOCK_GIANT(vfslocked); + return (error); } static int Modified: stable/7/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- stable/7/sys/fs/cd9660/cd9660_vfsops.c Thu Jan 21 13:31:41 2010 (r202749) +++ stable/7/sys/fs/cd9660/cd9660_vfsops.c Thu Jan 21 14:33:18 2010 (r202750) @@ -373,7 +373,8 @@ iso_mountfs(devvp, mp, td) mp->mnt_maxsymlinklen = 0; MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED; + mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | + MNTK_EXTENDED_SHARED; MNT_IUNLOCK(mp); isomp->im_mountp = mp; isomp->im_dev = dev; Modified: stable/7/sys/fs/udf/udf_vfsops.c ============================================================================== --- stable/7/sys/fs/udf/udf_vfsops.c Thu Jan 21 13:31:41 2010 (r202749) +++ stable/7/sys/fs/udf/udf_vfsops.c Thu Jan 21 14:33:18 2010 (r202750) @@ -353,7 +353,8 @@ udf_mountfs(struct vnode *devvp, struct mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED; + mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | + MNTK_EXTENDED_SHARED; MNT_IUNLOCK(mp); udfmp->im_mountp = mp; udfmp->im_dev = dev; Modified: stable/7/sys/kern/vfs_lookup.c ============================================================================== --- stable/7/sys/kern/vfs_lookup.c Thu Jan 21 13:31:41 2010 (r202749) +++ stable/7/sys/kern/vfs_lookup.c Thu Jan 21 14:33:18 2010 (r202750) @@ -322,6 +322,41 @@ compute_cn_lkflags(struct mount *mp, int return lkflags; } +static __inline int +needs_exclusive_leaf(struct mount *mp, int flags) +{ + + /* + * Intermediate nodes can use shared locks, we only need to + * force an exclusive lock for leaf nodes. + */ + if ((flags & (ISLASTCN | LOCKLEAF)) != (ISLASTCN | LOCKLEAF)) + return (0); + + /* Always use exclusive locks if LOCKSHARED isn't set. */ + if (!(flags & LOCKSHARED)) + return (1); + + /* + * For lookups during open(), if the mount point supports + * extended shared operations, then use a shared lock for the + * leaf node, otherwise use an exclusive lock. + */ + if (flags & ISOPEN) { + if (mp != NULL && + (mp->mnt_kern_flag & MNTK_EXTENDED_SHARED)) + return (0); + else + return (1); + } + + /* + * Lookup requests outside of open() that specify LOCKSHARED + * only need a shared lock on the leaf vnode. + */ + return (0); +} + /* * Search a pathname. * This is a very central and rather complicated routine. @@ -580,8 +615,7 @@ unionlookup: * If we're looking up the last component and we need an exclusive * lock, adjust our lkflags. */ - if ((cnp->cn_flags & (ISLASTCN|LOCKSHARED|LOCKLEAF)) == - (ISLASTCN|LOCKLEAF)) + if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags)) cnp->cn_lkflags = LK_EXCLUSIVE; #ifdef NAMEI_DIAGNOSTIC vprint("lookup in", dp); @@ -778,8 +812,8 @@ success: * Because of lookup_shared we may have the vnode shared locked, but * the caller may want it to be exclusively locked. */ - if ((cnp->cn_flags & (ISLASTCN | LOCKSHARED | LOCKLEAF)) == - (ISLASTCN | LOCKLEAF) && VOP_ISLOCKED(dp, td) != LK_EXCLUSIVE) { + if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags) && + VOP_ISLOCKED(dp, td) != LK_EXCLUSIVE) { vn_lock(dp, LK_UPGRADE | LK_RETRY, td); if (dp->v_iflag & VI_DOOMED) { error = ENOENT; Modified: stable/7/sys/kern/vfs_vnops.c ============================================================================== --- stable/7/sys/kern/vfs_vnops.c Thu Jan 21 13:31:41 2010 (r202749) +++ stable/7/sys/kern/vfs_vnops.c Thu Jan 21 14:33:18 2010 (r202750) @@ -185,6 +185,8 @@ restart: ndp->ni_cnd.cn_flags = ISOPEN | ((fmode & O_NOFOLLOW) ? NOFOLLOW : FOLLOW) | LOCKLEAF | MPSAFE | AUDITVNODE1; + if (!(fmode & FWRITE)) + ndp->ni_cnd.cn_flags |= LOCKSHARED; if ((error = namei(ndp)) != 0) return (error); if (!mpsafe) @@ -235,7 +237,7 @@ restart: if (fmode & FWRITE) vp->v_writecount++; *flagp = fmode; - ASSERT_VOP_ELOCKED(vp, "vn_open_cred"); + ASSERT_VOP_LOCKED(vp, "vn_open_cred"); if (!mpsafe) VFS_UNLOCK_GIANT(vfslocked); return (0); @@ -280,12 +282,18 @@ vn_close(vp, flags, file_cred, td) struct thread *td; { struct mount *mp; - int error; + int error, lock_flags; + + if (!(flags & FWRITE) && vp->v_mount != NULL && + vp->v_mount->mnt_kern_flag & MNTK_EXTENDED_SHARED) + lock_flags = LK_SHARED; + else + lock_flags = LK_EXCLUSIVE; VFS_ASSERT_GIANT(vp->v_mount); vn_start_write(vp, &mp, V_WAIT); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + vn_lock(vp, lock_flags | LK_RETRY, td); if (flags & FWRITE) { VNASSERT(vp->v_writecount > 0, vp, ("vn_close: negative writecount")); Modified: stable/7/sys/kern/vnode_if.src ============================================================================== --- stable/7/sys/kern/vnode_if.src Thu Jan 21 13:31:41 2010 (r202749) +++ stable/7/sys/kern/vnode_if.src Thu Jan 21 14:33:18 2010 (r202750) @@ -134,7 +134,7 @@ vop_open { }; -%% close vp E E E +%% close vp L L L vop_close { IN struct vnode *vp; Modified: stable/7/sys/sys/mount.h ============================================================================== --- stable/7/sys/sys/mount.h Thu Jan 21 13:31:41 2010 (r202749) +++ stable/7/sys/sys/mount.h Thu Jan 21 14:33:18 2010 (r202750) @@ -328,6 +328,7 @@ void __mnt_vnode_markerfree(str #define MNTK_SOFTDEP 0x00000004 /* async disabled by softdep */ #define MNTK_NOINSMNTQ 0x00000008 /* insmntque is not allowed */ #define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */ +#define MNTK_EXTENDED_SHARED 0x00000040 /* Allow shared locking for more ops */ #define MNTK_SHARED_WRITES 0x00000080 /* Allow shared locking for writes */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ @@ -335,8 +336,8 @@ void __mnt_vnode_markerfree(str #define MNTK_SUSPEND2 0x04000000 /* block secondary writes */ #define MNTK_SUSPENDED 0x10000000 /* write operations are suspended */ #define MNTK_MPSAFE 0x20000000 /* Filesystem is MPSAFE. */ -#define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ #define MNTK_LOOKUP_SHARED 0x40000000 /* FS supports shared lock lookups */ +#define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ /* * Sysctl CTL_VFS definitions. Modified: stable/7/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/7/sys/ufs/ffs/ffs_vfsops.c Thu Jan 21 13:31:41 2010 (r202749) +++ stable/7/sys/ufs/ffs/ffs_vfsops.c Thu Jan 21 14:33:18 2010 (r202750) @@ -883,7 +883,8 @@ ffs_mountfs(devvp, mp, td) * Initialize filesystem stat information in mount struct. */ MNT_ILOCK(mp); - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED; + mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | + MNTK_EXTENDED_SHARED; MNT_IUNLOCK(mp); #ifdef UFS_EXTATTR #ifdef UFS_EXTATTR_AUTOSTART @@ -1440,10 +1441,9 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags return (error); } /* - * FFS supports recursive and shared locking. + * FFS supports recursive locking. */ - vp->v_vnlock->lk_flags |= LK_CANRECURSE; - vp->v_vnlock->lk_flags &= ~LK_NOSHARE; + VN_LOCK_AREC(vp); vp->v_data = ip; vp->v_bufobj.bo_bsize = fs->fs_bsize; ip->i_vnode = vp; @@ -1518,6 +1518,10 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags /* * Finish inode initialization. */ + if (vp->v_type != VFIFO) { + /* FFS supports shared locking for all files except fifos. */ + VN_LOCK_ASHARE(vp); + } /* * Set up a generation number for this inode if it does not From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 15:01:09 2010 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 86EA5106568F; Thu, 21 Jan 2010 15:01:09 +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 776608FC0C; Thu, 21 Jan 2010 15:01:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LF19Oa060863; Thu, 21 Jan 2010 15:01:09 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LF195l060862; Thu, 21 Jan 2010 15:01:09 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201001211501.o0LF195l060862@svn.freebsd.org> From: Ed Maste Date: Thu, 21 Jan 2010 15:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202751 - head/lib/libtacplus 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: Thu, 21 Jan 2010 15:01:09 -0000 Author: emaste Date: Thu Jan 21 15:01:09 2010 New Revision: 202751 URL: http://svn.freebsd.org/changeset/base/202751 Log: Correct comment typo. Modified: head/lib/libtacplus/taclib.c Modified: head/lib/libtacplus/taclib.c ============================================================================== --- head/lib/libtacplus/taclib.c Thu Jan 21 14:33:18 2010 (r202750) +++ head/lib/libtacplus/taclib.c Thu Jan 21 15:01:09 2010 (r202751) @@ -1329,7 +1329,7 @@ tac_get_av_value(struct tac_handle *h, c * Note that for empty string attribute values a * 0-length string is returned in order to distinguish * against unset values. - * dump_str() will handle srvr.len == 0 correctly. + * dup_str() will handle srvr.len == 0 correctly. */ if (found_seperator == 1) { srvr.len = end - ch; From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 15:10:20 2010 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 B5369106568F; Thu, 21 Jan 2010 15:10:20 +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 A4D048FC0A; Thu, 21 Jan 2010 15:10:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LFAKmg062965; Thu, 21 Jan 2010 15:10:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LFAK2d062963; Thu, 21 Jan 2010 15:10:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001211510.o0LFAK2d062963@svn.freebsd.org> From: John Baldwin Date: Thu, 21 Jan 2010 15:10:20 +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: r202752 - stable/8/sys/amd64/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: Thu, 21 Jan 2010 15:10:20 -0000 Author: jhb Date: Thu Jan 21 15:10:20 2010 New Revision: 202752 URL: http://svn.freebsd.org/changeset/base/202752 Log: MFC 202286: Update the ident for the XENHVM kernel config to match the filename. Modified: stable/8/sys/amd64/conf/XENHVM Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/conf/XENHVM ============================================================================== --- stable/8/sys/amd64/conf/XENHVM Thu Jan 21 15:01:09 2010 (r202751) +++ stable/8/sys/amd64/conf/XENHVM Thu Jan 21 15:10:20 2010 (r202752) @@ -19,7 +19,7 @@ # $FreeBSD$ cpu HAMMER -ident GENERIC +ident XENHVM # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 16:31:45 2010 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 6846E106566B; Thu, 21 Jan 2010 16:31:45 +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 572658FC16; Thu, 21 Jan 2010 16:31:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LGVjPs081538; Thu, 21 Jan 2010 16:31:45 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LGVjYe081536; Thu, 21 Jan 2010 16:31:45 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001211631.o0LGVjYe081536@svn.freebsd.org> From: Christian Brueffer Date: Thu, 21 Jan 2010 16:31:45 +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: r202753 - stable/8/sys/modules 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: Thu, 21 Jan 2010 16:31:45 -0000 Author: brueffer Date: Thu Jan 21 16:31:45 2010 New Revision: 202753 URL: http://svn.freebsd.org/changeset/base/202753 Log: MFC: r202290 Build iwi(4) and iwifw(4) modules on amd64 as well. Modified: stable/8/sys/modules/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Thu Jan 21 15:10:20 2010 (r202752) +++ stable/8/sys/modules/Makefile Thu Jan 21 16:31:45 2010 (r202753) @@ -508,6 +508,8 @@ _ipmi= ipmi _ips= ips _ipw= ipw _ipwfw= ipwfw +_iwi= iwi +_iwifw= iwifw _iwn= iwn _iwnfw= iwnfw _ixgb= ixgb From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 16:41:14 2010 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 014321065672; Thu, 21 Jan 2010 16:41:14 +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 E427B8FC17; Thu, 21 Jan 2010 16:41:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LGfDq1083708; Thu, 21 Jan 2010 16:41:13 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LGfDGk083706; Thu, 21 Jan 2010 16:41:13 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001211641.o0LGfDGk083706@svn.freebsd.org> From: Christian Brueffer Date: Thu, 21 Jan 2010 16:41:13 +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: r202754 - stable/7/sys/modules 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: Thu, 21 Jan 2010 16:41:14 -0000 Author: brueffer Date: Thu Jan 21 16:41:13 2010 New Revision: 202754 URL: http://svn.freebsd.org/changeset/base/202754 Log: MFC: r202290 Build iwi(4) and iwifw(4) modules on amd64 as well. Modified: stable/7/sys/modules/Makefile Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Thu Jan 21 16:31:45 2010 (r202753) +++ stable/7/sys/modules/Makefile Thu Jan 21 16:41:13 2010 (r202754) @@ -553,6 +553,8 @@ _ipmi= ipmi _ips= ips _ipw= ipw _ipwfw= ipwfw +_iwi= iwi +_iwifw= iwifw _ixgb= ixgb _lindev= lindev _linprocfs= linprocfs From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 16:56:28 2010 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 86712106566C; Thu, 21 Jan 2010 16:56:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F88D8FC1A; Thu, 21 Jan 2010 16:56:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LGuSR1087260; Thu, 21 Jan 2010 16:56:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LGuScr087251; Thu, 21 Jan 2010 16:56:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001211656.o0LGuScr087251@svn.freebsd.org> From: Ed Schouten Date: Thu, 21 Jan 2010 16:56: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: r202755 - in head: . lib release/i386 release/pc98 release/picobsd/bridge release/picobsd/qemu rescue/rescue 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: Thu, 21 Jan 2010 16:56:28 -0000 Author: ed Date: Thu Jan 21 16:56:27 2010 New Revision: 202755 URL: http://svn.freebsd.org/changeset/base/202755 Log: Remove libulog from the bootstrap again. libulog now only provides functions that are used by various packages from the ports tree, namely the libutempter ones. There is no reason to link it into the crunch/fixit binaries anymore. Modified: head/Makefile.inc1 head/lib/Makefile head/release/i386/fixit_crunch.conf head/release/pc98/fixit-small_crunch.conf head/release/pc98/fixit_crunch.conf head/release/picobsd/bridge/crunch.conf head/release/picobsd/qemu/crunch.conf head/rescue/rescue/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jan 21 16:41:13 2010 (r202754) +++ head/Makefile.inc1 Thu Jan 21 16:56:27 2010 (r202755) @@ -1114,7 +1114,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libkiconv lib/libkvm lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ - lib/libradius lib/libsbuf lib/libtacplus lib/libulog \ + lib/libradius lib/libsbuf lib/libtacplus \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ ${_secure_lib_libssl} lib/libdwarf lib/libproc Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu Jan 21 16:41:13 2010 (r202754) +++ head/lib/Makefile Thu Jan 21 16:56:27 2010 (r202755) @@ -21,7 +21,6 @@ # librpcsvc must be built before libpam. # libsbuf must be built before libcam. # libtacplus must be built before libpam. -# libulog must be built before libpam. # libutil must be built before libpam. # libypclnt must be built before libpam. # libgssapi must be built before librpcsec_gss @@ -31,7 +30,7 @@ SUBDIR= ${_csu} libc libbsm libauditd libcom_err libcrypt libelf libkvm msun \ libmd \ ncurses ${_libnetgraph} libradius librpcsvc libsbuf \ - libtacplus libulog libutil ${_libypclnt} libalias libarchive \ + libtacplus libutil ${_libypclnt} libalias libarchive \ ${_libatm} libbegemot ${_libbluetooth} ${_libbsnmp} libbz2 \ libcalendar libcam libcompat libdevinfo libdevstat libdisk \ libdwarf libedit libexpat libfetch libftpio libgeom ${_libgpib} \ @@ -39,9 +38,9 @@ SUBDIR= ${_csu} libc libbsm libauditd li ${_libipx} libjail libkiconv libmagic libmemstat ${_libmilter} \ ${_libmp} ${_libncp} ${_libngatm} libopie libpam libpcap \ ${_libpmc} libproc librt ${_libsdp} ${_libsm} ${_libsmb} \ - ${_libsmdb} \ - ${_libsmutil} libstand ${_libtelnet} ${_libthr} libthread_db libufs \ - libugidfw ${_libusbhid} ${_libusb} ${_libvgl} libwrap liby libz \ + ${_libsmdb} ${_libsmutil} libstand \ + ${_libtelnet} ${_libthr} libthread_db libufs libugidfw libulog \ + ${_libusbhid} ${_libusb} ${_libvgl} libwrap liby libz \ ${_bind} .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) Modified: head/release/i386/fixit_crunch.conf ============================================================================== --- head/release/i386/fixit_crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/i386/fixit_crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -46,4 +46,4 @@ progs chown progs chroot ln chown chgrp -libs -ledit -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lulog -lutil +libs -ledit -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lutil Modified: head/release/pc98/fixit-small_crunch.conf ============================================================================== --- head/release/pc98/fixit-small_crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/pc98/fixit-small_crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -40,4 +40,4 @@ srcdirs /usr/src/usr.sbin progs chown ln chown chgrp -libs -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lulog -lutil +libs -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lutil Modified: head/release/pc98/fixit_crunch.conf ============================================================================== --- head/release/pc98/fixit_crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/pc98/fixit_crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -44,4 +44,4 @@ srcdirs /usr/src/usr.sbin progs chown ln chown chgrp -libs -ledit -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lulog -lutil +libs -ledit -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lutil Modified: head/release/picobsd/bridge/crunch.conf ============================================================================== --- head/release/picobsd/bridge/crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/picobsd/bridge/crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -181,4 +181,3 @@ libs_so -lz libs_so -lbsdxml libs_so -lsbuf libs_so -ljail # used by ifconfig -libs_so -lulog # used by ifconfig Modified: head/release/picobsd/qemu/crunch.conf ============================================================================== --- head/release/picobsd/qemu/crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/picobsd/qemu/crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -189,4 +189,3 @@ libs_so -lz libs_so -lbsdxml libs_so -lsbuf libs_so -ljail # used by ifconfig -libs_so -lulog Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Thu Jan 21 16:41:13 2010 (r202754) +++ head/rescue/rescue/Makefile Thu Jan 21 16:56:27 2010 (r202755) @@ -72,7 +72,7 @@ CRUNCH_SRCDIRS+= bin CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \ ed expr getfacl hostname kenv kill ln ls mkdir mv \ pkill ps pwd realpath rm rmdir setfacl sh stty sync test -CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lulog -lutil +CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil # Additional options for specific programs CRUNCH_ALIAS_test= [ From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 17:25:13 2010 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 726B71065676; Thu, 21 Jan 2010 17:25:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DBF28FC19; Thu, 21 Jan 2010 17:25:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHPDIb093819; Thu, 21 Jan 2010 17:25:13 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHPDGG093800; Thu, 21 Jan 2010 17:25:13 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001211725.o0LHPDGG093800@svn.freebsd.org> From: Ed Schouten Date: Thu, 21 Jan 2010 17:25: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: r202756 - in head: bin/date lib/libpam/modules/pam_lastlog libexec/comsat libexec/ftpd sbin/init sbin/reboot share/man/man3 share/man/man7 share/security usr.bin/at usr.bin/finger usr.b... 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: Thu, 21 Jan 2010 17:25:13 -0000 Author: ed Date: Thu Jan 21 17:25:12 2010 New Revision: 202756 URL: http://svn.freebsd.org/changeset/base/202756 Log: Remove stale references to utmp(5) and its corresponding filenames. I removed utmp and its manpage, but not other manpages referring to it. Modified: head/bin/date/date.1 head/lib/libpam/modules/pam_lastlog/pam_lastlog.8 head/libexec/comsat/comsat.8 head/libexec/ftpd/ftpd.8 head/sbin/init/init.8 head/sbin/reboot/reboot.8 head/share/man/man3/sysexits.3 head/share/man/man7/hier.7 head/share/security/lomac-policy.contexts head/usr.bin/at/at.man head/usr.bin/finger/finger.1 head/usr.bin/last/last.1 head/usr.bin/ncplist/ncplist.1 head/usr.bin/talk/talk.1 head/usr.bin/users/users.1 head/usr.bin/w/w.1 head/usr.bin/who/who.1 head/usr.sbin/ac/ac.8 head/usr.sbin/lastlogin/lastlogin.8 head/usr.sbin/rwhod/rwhod.8 Modified: head/bin/date/date.1 ============================================================================== --- head/bin/date/date.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/bin/date/date.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -299,7 +299,7 @@ for more information. .El .Sh FILES .Bl -tag -width /var/log/messages -compact -.It Pa /var/log/wtmp +.It Pa /var/log/utx.log record of date resets and time changes .It Pa /var/log/messages record of the user setting the time @@ -406,9 +406,9 @@ fails. .Sh SEE ALSO .Xr locale 1 , .Xr gettimeofday 2 , +.Xr getutxent 3 , .Xr strftime 3 , .Xr strptime 3 , -.Xr utmp 5 , .Xr timed 8 .Rs .%T "TSP: The Time Synchronization Protocol for UNIX 4.3BSD" Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.8 ============================================================================== --- head/lib/libpam/modules/pam_lastlog/pam_lastlog.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/lib/libpam/modules/pam_lastlog/pam_lastlog.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -65,12 +65,7 @@ and terminate sessions. The .Fn pam_sm_open_session -function records the session in the -.Xr utmp 5 , -.Xr wtmp 5 -and -.Xr lastlog 5 -databases. +function records the session in the user accounting database. The .Fn pam_sm_close_session function does nothing. @@ -90,10 +85,10 @@ Ignore I/O failures. .Sh SEE ALSO .Xr last 1 , .Xr w 1 , +.Xr getutxent 3 , .Xr login 3 , .Xr logout 3 , .Xr pam.conf 5 , -.Xr utmp 5 , .Xr lastlogin 8 , .Xr pam 8 .Sh AUTHORS Modified: head/libexec/comsat/comsat.8 ============================================================================== --- head/libexec/comsat/comsat.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/libexec/comsat/comsat.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -91,7 +91,7 @@ If omitted, standard mailbox assumed. .Sh FILES .Bl -tag -width ".Pa /var/mail/user" -compact -.It Pa /var/run/utmp +.It Pa /var/run/utx.active to find out who is logged on and on what terminals .It Pa /var/mail/user standard mailbox Modified: head/libexec/ftpd/ftpd.8 ============================================================================== --- head/libexec/ftpd/ftpd.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/libexec/ftpd/ftpd.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -219,8 +219,7 @@ This option may be overridden by A synonym for .Fl d . .It Fl W -Do not log FTP sessions to -.Pa /var/log/wtmp . +Do not log FTP sessions to the user accounting database. .El .Pp The file Modified: head/sbin/init/init.8 ============================================================================== --- head/sbin/init/init.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/sbin/init/init.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -148,12 +148,9 @@ dies, either because the user logged out or an abnormal termination occurred (a signal), the .Nm -utility wakes up, deletes the user -from the -.Xr utmp 5 -file of current users and records the logout in the -.Xr wtmp 5 -file. +utility wakes up and records the logout in the the user accounting +database (see +.Xr getutxent 3 ). The cycle is then restarted by .Nm @@ -207,13 +204,6 @@ If a line is commented out or deleted fr .Xr ttys 5 , .Nm will not do anything at all to that line. -However, it will complain that the relationship between lines -in the -.Xr ttys 5 -file and records in the -.Xr utmp 5 -file is out of sync, -so this practice is not recommended. .Pp The .Nm @@ -316,9 +306,9 @@ system console device .It Pa /dev/tty* terminal ports found in .Xr ttys 5 -.It Pa /var/run/utmp +.It Pa /var/run/utx.active record of current users on the system -.It Pa /var/log/wtmp +.It Pa /var/log/utx.log record of all logins and logouts .It Pa /etc/ttys the terminal initialization information file Modified: head/sbin/reboot/reboot.8 ============================================================================== --- head/sbin/reboot/reboot.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/sbin/reboot/reboot.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -61,9 +61,8 @@ a (and subsequently a .Dv SIGKILL ) and, respectively, halt or restart the system. -The action is logged, including entering a shutdown record into the -.Xr wtmp 5 -file. +The action is logged, including entering a shutdown record into the user +accounting database. .Pp The options are as follows: .Bl -tag -width indent Modified: head/share/man/man3/sysexits.3 ============================================================================== --- head/share/man/man3/sysexits.3 Thu Jan 21 16:56:27 2010 (r202755) +++ head/share/man/man3/sysexits.3 Thu Jan 21 17:25:12 2010 (r202756) @@ -97,7 +97,7 @@ does not exist in the passwd file. .It Sy EX_OSFILE Pq 72 Some system file (e.g., .Pa /etc/passwd , -.Pa /var/run/utmp , +.Pa /var/run/utx.active , etc.) does not exist, cannot be opened, or has some sort of error (e.g., syntax error). .It Sy EX_CANTCREAT Pq 73 Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Thu Jan 21 16:56:27 2010 (r202755) +++ head/share/man/man7/hier.7 Thu Jan 21 17:25:12 2010 (r202756) @@ -735,10 +735,14 @@ kerberos server databases; see miscellaneous system log files .Pp .Bl -tag -width Fl -compact -.It Pa wtmp +.It Pa utx.lastlogin +last login log; +see +.Xr getutxent 3 +.It Pa utx.log login/logout log; see -.Xr wtmp 5 +.Xr getutxent 3 .El .Pp .It Pa mail/ @@ -769,10 +773,10 @@ writable by the .Dq network group for command connection sockets; see .Xr ppp 8 -.It Pa utmp +.It Pa utx.active database of current users; see -.Xr utmp 5 +.Xr getutxent 5 .El .Pp .It Pa rwho/ Modified: head/share/security/lomac-policy.contexts ============================================================================== --- head/share/security/lomac-policy.contexts Thu Jan 21 16:56:27 2010 (r202755) +++ head/share/security/lomac-policy.contexts Thu Jan 21 17:25:12 2010 (r202756) @@ -25,5 +25,5 @@ (/mnt)?/cdrom(/.*)? lomac/high (/usr)?/home/(ftp|samba)(/.*)? lomac/high /var/log/sendmail\.st lomac/low -/var/run/utmp lomac/equal -/var/log/(lastlog|wtmp) lomac/equal +/var/run/utx.active lomac/equal +/var/log/utx.(lastlogin|log) lomac/equal Modified: head/usr.bin/at/at.man ============================================================================== --- head/usr.bin/at/at.man Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/at/at.man Thu Jan 21 17:25:12 2010 (r202756) @@ -313,7 +313,7 @@ letter pair is not specified, the value directory containing job files .It Pa _ATSPOOL_DIR directory containing output spool files -.It Pa /var/run/utmp +.It Pa /var/run/utx.active login records .It Pa _PERM_PATH/at.allow allow permission control @@ -338,7 +338,7 @@ with minor enhancements by .An Joe Halpin Aq joe.halpin@attbi.com . .Sh BUGS If the file -.Pa /var/run/utmp +.Pa /var/run/utx.active is not available or corrupted, or if the user is not logged on at the time .Nm Modified: head/usr.bin/finger/finger.1 ============================================================================== --- head/usr.bin/finger/finger.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/finger/finger.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -100,8 +100,7 @@ of the remote host when used in conjunct .Fl h option. .It Fl k -Disable all use of -.Xr utmp 5 . +Disable all use of the user accounting database. .It Fl l Produce a multi-line format displaying all of the information described for the @@ -221,10 +220,10 @@ This variable may be set with favored op .Nm . .El .Sh FILES -.Bl -tag -width /var/log/lastlog -compact +.Bl -tag -width /var/log/utx.lastlogin -compact .It Pa /etc/finger.conf alias definition data base -.It Pa /var/log/lastlog +.It Pa /var/log/utx.lastlogin last login data base .El .Sh SEE ALSO Modified: head/usr.bin/last/last.1 ============================================================================== --- head/usr.bin/last/last.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/last/last.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -83,7 +83,7 @@ be reported. This may be used with the .Fl f option to derive the results from stored -.Pa wtmp +.Pa utx.log files. When this argument is provided, all other options except for .Fl f @@ -141,7 +141,7 @@ letter pair is not specified, the value Read the file .Ar file instead of the default, -.Pa /var/log/wtmp . +.Pa /var/log/utx.log . .It Fl h Ar host .Ar Host names may be names or internet numbers. @@ -196,13 +196,13 @@ If interrupted with a quit signal indicates how far the search has progressed and then continues. .Sh FILES -.Bl -tag -width /var/log/wtmp -compact -.It Pa /var/log/wtmp +.Bl -tag -width /var/log/utx.log -compact +.It Pa /var/log/utx.log login data base .El .Sh SEE ALSO .Xr lastcomm 1 , -.Xr utmp 5 , +.Xr getutxent 3 , .Xr ac 8 .Sh HISTORY A @@ -212,7 +212,7 @@ utility appeared in .Sh BUGS If a login shell should terminate abnormally for some reason, it is likely that a logout record will not be written to the -.Pa wtmp +.Pa utx.log file. In this case, .Nm Modified: head/usr.bin/ncplist/ncplist.1 ============================================================================== --- head/usr.bin/ncplist/ncplist.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/ncplist/ncplist.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -69,7 +69,7 @@ Displays mounted volumes on a given .Sh IMPLEMENTATION NOTES This utility is provided mostly for educational purposes. .Sh FILES -.Bl -tag -width /var/log/wtmp -compact +.Bl -tag -width /var/log/utx.log -compact .It Pa ~/.nwfsrc keeps description for each connection. See Modified: head/usr.bin/talk/talk.1 ============================================================================== --- head/usr.bin/talk/talk.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/talk/talk.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -116,10 +116,10 @@ Permission to talk may be denied or gran command. At the outset talking is allowed. .Sh FILES -.Bl -tag -width /var/run/utmp -compact +.Bl -tag -width /var/run/utx.active -compact .It Pa /etc/hosts to find the recipient's machine -.It Pa /var/run/utmp +.It Pa /var/run/utx.active to find the recipient's tty .El .Sh SEE ALSO Modified: head/usr.bin/users/users.1 ============================================================================== --- head/usr.bin/users/users.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/users/users.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -46,14 +46,14 @@ The utility lists the login names of the users currently on the system, in sorted order, space separated, on a single line. .Sh FILES -.Bl -tag -width /var/run/utmp -.It Pa /var/run/utmp +.Bl -tag -width /var/run/utx.active +.It Pa /var/run/utx.active .El .Sh SEE ALSO .Xr finger 1 , .Xr last 1 , .Xr who 1 , -.Xr utmp 5 +.Xr getutxent 3 .Sh HISTORY The .Nm Modified: head/usr.bin/w/w.1 ============================================================================== --- head/usr.bin/w/w.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/w/w.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -87,8 +87,8 @@ If one or more .Ar user names are specified, the output is restricted to those users. .Sh FILES -.Bl -tag -width ".Pa /var/run/utmp" -compact -.It Pa /var/run/utmp +.Bl -tag -width ".Pa /var/run/utx.active" -compact +.It Pa /var/run/utx.active list of users on the system .El .Sh COMPATIBILITY Modified: head/usr.bin/who/who.1 ============================================================================== --- head/usr.bin/who/who.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/who/who.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -90,36 +90,36 @@ Equivalent to By default, .Nm gathers information from the file -.Pa /var/run/utmp . +.Pa /var/run/utx.active . An alternate .Ar file may be specified which is usually -.Pa /var/log/wtmp +.Pa /var/log/utx.log (or -.Pa /var/log/wtmp.[0-6] +.Pa /var/log/utx.log.[0-6] depending on site policy as -.Pa wtmp +.Pa utx.log can grow quite large and daily versions may or may not be kept around after compression by .Xr ac 8 ) . The -.Pa wtmp +.Pa utx.log file contains a record of every login, logout, crash, shutdown and date change since -.Pa wtmp +.Pa utx.log was last truncated or created. .Pp If -.Pa /var/log/wtmp +.Pa /var/log/utx.log is being used as the file, the user name may be empty or one of the special characters '|', '}' and '~'. Logouts produce an output line without any user name. For more information on the special characters, see -.Xr utmp 5 . +.Xr getutxent 3 . .Sh ENVIRONMENT The .Ev COLUMNS , LANG , LC_ALL @@ -130,10 +130,10 @@ environment variables affect the executi as described in .Xr environ 7 . .Sh FILES -.Bl -tag -width /var/log/wtmp.[0-6] -compact -.It Pa /var/run/utmp -.It Pa /var/log/wtmp -.It Pa /var/log/wtmp.[0-6] +.Bl -tag -width /var/log/utx.log.[0-6] -compact +.It Pa /var/run/utx.active +.It Pa /var/log/utx.log +.It Pa /var/log/utx.log.[0-6] .El .Sh EXIT STATUS .Ex -std @@ -141,7 +141,7 @@ as described in .Xr last 1 , .Xr users 1 , .Xr w 1 , -.Xr utmp 5 +.Xr getutxent 3 .Sh STANDARDS The .Nm Modified: head/usr.sbin/ac/ac.8 ============================================================================== --- head/usr.sbin/ac/ac.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.sbin/ac/ac.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -45,7 +45,7 @@ .Op Ar users ... .Sh DESCRIPTION If the file -.Pa /var/log/wtmp +.Pa /var/log/utx.log exists, a record of individual login and logout times are written to it by .Xr login 1 @@ -86,7 +86,7 @@ flags may be specified. Read connect time data from .Ar wtmp instead of the default file, -.Pa /var/log/wtmp . +.Pa /var/log/utx.log . .It Ar users ... Display totals for the given individuals only. .El @@ -95,20 +95,20 @@ If no arguments are given, .Nm displays the total connect time for all accounts with login sessions recorded in -.Pa wtmp . +.Pa utx.log . .Pp The default -.Pa wtmp +.Pa utx.log file will increase without bound unless it is truncated. It is normally truncated by the daily scripts run by .Xr cron 8 , which rename and rotate the -.Pa wtmp +.Pa utx.log files, keeping a week's worth of data on hand. No login or connect time accounting is performed if -.Pa /var/log/wtmp +.Pa /var/log/utx.log does not exist. .Pp For example, @@ -122,15 +122,15 @@ allows times recorded in to be charged out at a different rate than .Pa other . .Sh FILES -.Bl -tag -width /var/log/wtmp -compact -.It Pa /var/log/wtmp +.Bl -tag -width /var/log/utx.log -compact +.It Pa /var/log/utx.log connect time accounting file .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr login 1 , -.Xr utmp 5 , +.Xr getutxent 3 , .Xr init 8 , .Xr sa 8 .\" .Sh NOTES Modified: head/usr.sbin/lastlogin/lastlogin.8 ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.sbin/lastlogin/lastlogin.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -64,13 +64,13 @@ utility differs from in that it only prints information regarding the very last login session. The last login database is never turned over or deleted in standard usage. .Sh FILES -.Bl -tag -width /var/log/lastlog -compact -.It Pa /var/log/lastlog +.Bl -tag -width /var/log/utx.lastlogin -compact +.It Pa /var/log/utx.lastlogin last login database .El .Sh SEE ALSO .Xr last 1 , -.Xr lastlog 5 , +.Xr getutxent 3 , .Xr ac 8 .Sh AUTHORS .An John M. Vinopal Modified: head/usr.sbin/rwhod/rwhod.8 ============================================================================== --- head/usr.sbin/rwhod/rwhod.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.sbin/rwhod/rwhod.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -188,9 +188,8 @@ system call, with any trailing domain na The array at the end of the message contains information about the users logged in to the sending machine. This information -includes the contents of the -.Xr utmp 5 -entry for each non-idle terminal line and a value indicating the +includes the contents of the entry from the user accounting database +for each non-idle terminal line and a value indicating the time in seconds since a character was last received on the terminal line. .Pp Messages received by the From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 17:26:12 2010 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 21736106566B; Thu, 21 Jan 2010 17:26:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10E868FC08; Thu, 21 Jan 2010 17:26:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHQBXJ094090; Thu, 21 Jan 2010 17:26:11 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHQBGT094088; Thu, 21 Jan 2010 17:26:11 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001211726.o0LHQBGT094088@svn.freebsd.org> From: Ed Schouten Date: Thu, 21 Jan 2010 17:26: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: r202757 - head/share/man/man7 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: Thu, 21 Jan 2010 17:26:12 -0000 Author: ed Date: Thu Jan 21 17:26:11 2010 New Revision: 202757 URL: http://svn.freebsd.org/changeset/base/202757 Log: Correct a minor mistake in my previous commit. getutxent is in category 3, not 5. Modified: head/share/man/man7/hier.7 Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Thu Jan 21 17:25:12 2010 (r202756) +++ head/share/man/man7/hier.7 Thu Jan 21 17:26:11 2010 (r202757) @@ -776,7 +776,7 @@ group for command connection sockets; se .It Pa utx.active database of current users; see -.Xr getutxent 5 +.Xr getutxent 3 .El .Pp .It Pa rwho/ From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 17:37:25 2010 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 926161065679; Thu, 21 Jan 2010 17:37:25 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 806F28FC1D; Thu, 21 Jan 2010 17:37:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHbPT5096764; Thu, 21 Jan 2010 17:37:25 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHbPl4096746; Thu, 21 Jan 2010 17:37:25 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001211737.o0LHbPl4096746@svn.freebsd.org> From: Marius Strobl Date: Thu, 21 Jan 2010 17:37:25 +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: r202759 - stable/8/sys/sparc64/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: Thu, 21 Jan 2010 17:37:25 -0000 Author: marius Date: Thu Jan 21 17:37:25 2010 New Revision: 202759 URL: http://svn.freebsd.org/changeset/base/202759 Log: MFC: r202587 Add epic(4) also here. Modified: stable/8/sys/sparc64/conf/NOTES Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/conf/NOTES ============================================================================== --- stable/8/sys/sparc64/conf/NOTES Thu Jan 21 17:34:01 2010 (r202758) +++ stable/8/sys/sparc64/conf/NOTES Thu Jan 21 17:37:25 2010 (r202759) @@ -43,6 +43,7 @@ device mc146818 # Motorola MC146818 and # device auxio # auxiliary I/O device +device epic # Sun Fire V215/V245 LEDs device creator # Creator, Creator3D and Elite3D framebuffers device machfb # ATI Mach64 framebuffers From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 17:37:26 2010 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 D3DE7106566B; Thu, 21 Jan 2010 17:37:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C27168FC1E; Thu, 21 Jan 2010 17:37:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHbQZ6096801; Thu, 21 Jan 2010 17:37:26 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHbQKv096799; Thu, 21 Jan 2010 17:37:26 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001211737.o0LHbQKv096799@svn.freebsd.org> From: Marius Strobl Date: Thu, 21 Jan 2010 17:37:26 +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: r202760 - stable/7/sys/sparc64/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: Thu, 21 Jan 2010 17:37:26 -0000 Author: marius Date: Thu Jan 21 17:37:26 2010 New Revision: 202760 URL: http://svn.freebsd.org/changeset/base/202760 Log: MFC: r202587 Add epic(4) also here. Modified: stable/7/sys/sparc64/conf/NOTES Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/conf/NOTES ============================================================================== --- stable/7/sys/sparc64/conf/NOTES Thu Jan 21 17:37:25 2010 (r202759) +++ stable/7/sys/sparc64/conf/NOTES Thu Jan 21 17:37:26 2010 (r202760) @@ -45,6 +45,7 @@ device mc146818 # Motorola MC146818 and device auxio # auxiliary I/O device device clkbrd # Clock Board (blinkenlight on Sun Exx00) +device epic # Sun Fire V215/V245 LEDs device creator # Creator, Creator3D and Elite3D framebuffers device machfb # ATI Mach64 framebuffers From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 17:46:14 2010 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 A09261065672; Thu, 21 Jan 2010 17:46:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F9308FC0A; Thu, 21 Jan 2010 17:46:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHkEIm098805; Thu, 21 Jan 2010 17:46:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHkEEv098802; Thu, 21 Jan 2010 17:46:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001211746.o0LHkEEv098802@svn.freebsd.org> From: Xin LI Date: Thu, 21 Jan 2010 17:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202761 - in head/usr.bin: bc dc 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: Thu, 21 Jan 2010 17:46:14 -0000 Author: delphij Date: Thu Jan 21 17:46:14 2010 New Revision: 202761 URL: http://svn.freebsd.org/changeset/base/202761 Log: Makefile cleanups: o Enable building of USD o Remove commented out targets o Remove WARNS?=6 lines since it's the default Reviewed by: gabor Modified: head/usr.bin/bc/Makefile head/usr.bin/dc/Makefile Modified: head/usr.bin/bc/Makefile ============================================================================== --- head/usr.bin/bc/Makefile Thu Jan 21 17:37:26 2010 (r202760) +++ head/usr.bin/bc/Makefile Thu Jan 21 17:46:14 2010 (r202761) @@ -4,14 +4,9 @@ PROG= bc SRCS= bc.y scan.l CFLAGS+= -I. -I${.CURDIR} -WARNS?= 6 -#SUBDIR+= USD.doc +SUBDIR+= USD.doc FILES+= bc.library FILESDIR= ${SHAREDIR}/misc -#beforeinstall: -# install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/bc.library \ -# ${DESTDIR}/usr/share/misc - .include Modified: head/usr.bin/dc/Makefile ============================================================================== --- head/usr.bin/dc/Makefile Thu Jan 21 17:37:26 2010 (r202760) +++ head/usr.bin/dc/Makefile Thu Jan 21 17:46:14 2010 (r202761) @@ -6,8 +6,6 @@ SRCS= dc.c bcode.c inout.c mem.c stack.c LDADD= -lcrypto DPADD= ${LIBCRYPTO} -#SUBDIR+= USD.doc - -WARNS?= 6 +SUBDIR+= USD.doc .include From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 17:54:31 2010 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 48BB910656A6; Thu, 21 Jan 2010 17:54: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 2340F8FC22; Thu, 21 Jan 2010 17:54:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHsUKF000864; Thu, 21 Jan 2010 17:54:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHsT5g000844; Thu, 21 Jan 2010 17:54:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001211754.o0LHsT5g000844@svn.freebsd.org> From: John Baldwin Date: Thu, 21 Jan 2010 17:54:29 +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: r202762 - in stable/8: share/man/man9 sys/amd64/amd64 sys/amd64/include sys/i386/i386 sys/i386/include sys/kern sys/sparc64/include sys/sparc64/pci sys/sparc64/sparc64 sys/sys 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: Thu, 21 Jan 2010 17:54:31 -0000 Author: jhb Date: Thu Jan 21 17:54:29 2010 New Revision: 202762 URL: http://svn.freebsd.org/changeset/base/202762 Log: MFC 198134,198149,198170,198171,198391,200948: Add a facility for associating optional descriptions with active interrupt handlers. This is primarily intended as a way to allow devices that use multiple interrupts (e.g. MSI) to meaningfully distinguish the various interrupt handlers. - Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate a description with an active interrupt handler setup by BUS_SETUP_INTR. It has a default method (bus_generic_describe_intr()) which simply passes the request up to the parent device. - Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports printf(9) style formatting using var args. - Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of an interrupt handler and copy the name passed to intr_event_add_handler() into that buffer instead of just saving the pointer to the name. - Add a new intr_event_describe_handler() which appends a description string to an interrupt handler's name. - Implement support for interrupt descriptions on amd64, i386, and sparc64 by having the nexus(4) driver supply a custom bus_describe_intr method that invokes a new intr_describe() MD routine which in turn looks up the associated interrupt event and invokes intr_event_describe_handler(). Added: stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 - copied, changed from r198134, head/share/man/man9/BUS_DESCRIBE_INTR.9 Modified: stable/8/share/man/man9/Makefile stable/8/sys/amd64/amd64/intr_machdep.c stable/8/sys/amd64/amd64/nexus.c stable/8/sys/amd64/include/intr_machdep.h stable/8/sys/i386/i386/intr_machdep.c stable/8/sys/i386/i386/nexus.c stable/8/sys/i386/include/intr_machdep.h stable/8/sys/kern/bus_if.m stable/8/sys/kern/kern_intr.c stable/8/sys/kern/subr_bus.c stable/8/sys/sparc64/include/intr_machdep.h stable/8/sys/sparc64/pci/psycho.c stable/8/sys/sparc64/pci/schizo.c stable/8/sys/sparc64/sparc64/intr_machdep.c stable/8/sys/sparc64/sparc64/nexus.c stable/8/sys/sys/bus.h stable/8/sys/sys/interrupt.h Directory Properties: stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Copied and modified: stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 (from r198134, head/share/man/man9/BUS_DESCRIBE_INTR.9) ============================================================================== --- head/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Oct 15 14:54:35 2009 (r198134, copy source) +++ stable/8/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Jan 21 17:54:29 2010 (r202762) @@ -88,10 +88,10 @@ the interrupt handler name. Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO .Xr BUS_SETUP_INTR 9 , -.Xr device 9 , -.Xr printf 9 , .Xr systat 1 , -.Xr vmstat 8 +.Xr vmstat 8 , +.Xr device 9 , +.Xr printf 9 .Sh HISTORY The .Fn BUS_DESCRIBE_INTR Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/share/man/man9/Makefile Thu Jan 21 17:54:29 2010 (r202762) @@ -26,6 +26,7 @@ MAN= accept_filter.9 \ BUS_BIND_INTR.9 \ bus_child_present.9 \ BUS_CONFIG_INTR.9 \ + BUS_DESCRIBE_INTR.9 \ bus_dma.9 \ bus_generic_attach.9 \ bus_generic_detach.9 \ @@ -404,6 +405,7 @@ MLINKS+=buf.9 bp.9 MLINKS+=bus_activate_resource.9 bus_deactivate_resource.9 MLINKS+=bus_alloc_resource.9 bus_alloc_resource_any.9 MLINKS+=BUS_BIND_INTR.9 bus_bind_intr.9 +MLINKS+=BUS_DESCRIBE_INTR.9 bus_describe_intr.9 MLINKS+=bus_dma.9 busdma.9 \ bus_dma.9 bus_dmamap_create.9 \ bus_dma.9 bus_dmamap_destroy.9 \ Modified: stable/8/sys/amd64/amd64/intr_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/intr_machdep.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/amd64/amd64/intr_machdep.c Thu Jan 21 17:54:29 2010 (r202762) @@ -400,6 +400,23 @@ atpic_reset(void) } #endif +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + #ifdef DDB /* * Dump data about interrupt handlers Modified: stable/8/sys/amd64/amd64/nexus.c ============================================================================== --- stable/8/sys/amd64/amd64/nexus.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/amd64/amd64/nexus.c Thu Jan 21 17:54:29 2010 (r202762) @@ -92,6 +92,9 @@ static int nexus_bind_intr(device_t, dev #endif static int nexus_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); +static int nexus_describe_intr(device_t dev, device_t child, + struct resource *irq, void *cookie, + const char *descr); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_deactivate_resource(device_t, device_t, int, int, @@ -135,6 +138,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_set_resource, nexus_set_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), @@ -479,6 +483,14 @@ nexus_config_intr(device_t dev, int irq, return (intr_config_intr(irq, trig, pol)); } +static int +nexus_describe_intr(device_t dev, device_t child, struct resource *irq, + void *cookie, const char *descr) +{ + + return (intr_describe(rman_get_start(irq), cookie, descr)); +} + static struct resource_list * nexus_get_reslist(device_t dev, device_t child) { Modified: stable/8/sys/amd64/include/intr_machdep.h ============================================================================== --- stable/8/sys/amd64/include/intr_machdep.h Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/amd64/include/intr_machdep.h Thu Jan 21 17:54:29 2010 (r202762) @@ -151,6 +151,7 @@ int intr_bind(u_int vector, u_char cpu); #endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); +int intr_describe(u_int vector, void *ih, const char *descr); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); u_int intr_next_cpu(void); struct intsrc *intr_lookup_source(int vector); Modified: stable/8/sys/i386/i386/intr_machdep.c ============================================================================== --- stable/8/sys/i386/i386/intr_machdep.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/i386/i386/intr_machdep.c Thu Jan 21 17:54:29 2010 (r202762) @@ -366,6 +366,23 @@ intr_init(void *dummy __unused) } SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + #ifdef DDB /* * Dump data about interrupt handlers Modified: stable/8/sys/i386/i386/nexus.c ============================================================================== --- stable/8/sys/i386/i386/nexus.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/i386/i386/nexus.c Thu Jan 21 17:54:29 2010 (r202762) @@ -96,6 +96,9 @@ static int nexus_bind_intr(device_t, dev #endif static int nexus_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); +static int nexus_describe_intr(device_t dev, device_t child, + struct resource *irq, void *cookie, + const char *descr); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_deactivate_resource(device_t, device_t, int, int, @@ -141,6 +144,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_set_resource, nexus_set_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), @@ -526,6 +530,14 @@ nexus_config_intr(device_t dev, int irq, return (intr_config_intr(irq, trig, pol)); } +static int +nexus_describe_intr(device_t dev, device_t child, struct resource *irq, + void *cookie, const char *descr) +{ + + return (intr_describe(rman_get_start(irq), cookie, descr)); +} + static struct resource_list * nexus_get_reslist(device_t dev, device_t child) { Modified: stable/8/sys/i386/include/intr_machdep.h ============================================================================== --- stable/8/sys/i386/include/intr_machdep.h Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/i386/include/intr_machdep.h Thu Jan 21 17:54:29 2010 (r202762) @@ -138,6 +138,7 @@ int intr_bind(u_int vector, u_char cpu); #endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); +int intr_describe(u_int vector, void *ih, const char *descr); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); u_int intr_next_cpu(void); struct intsrc *intr_lookup_source(int vector); Modified: stable/8/sys/kern/bus_if.m ============================================================================== --- stable/8/sys/kern/bus_if.m Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/kern/bus_if.m Thu Jan 21 17:54:29 2010 (r202762) @@ -509,7 +509,6 @@ METHOD int bind_intr { int _cpu; } DEFAULT bus_generic_bind_intr; - /** * @brief Allow (bus) drivers to specify the trigger mode and polarity * of the specified interrupt. @@ -527,6 +526,25 @@ METHOD int config_intr { } DEFAULT bus_generic_config_intr; /** + * @brief Allow drivers to associate a description with an active + * interrupt handler. + * + * @param _dev the parent device of @p _child + * @param _child the device which allocated the resource + * @param _irq the resource representing the interrupt + * @param _cookie the cookie value returned when the interrupt + * was originally registered + * @param _descr the description to associate with the interrupt + */ +METHOD int describe_intr { + device_t _dev; + device_t _child; + struct resource *_irq; + void *_cookie; + const char *_descr; +} DEFAULT bus_generic_describe_intr; + +/** * @brief Notify a (bus) driver about a child that the hints mechanism * believes it has discovered. * Modified: stable/8/sys/kern/kern_intr.c ============================================================================== --- stable/8/sys/kern/kern_intr.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/kern/kern_intr.c Thu Jan 21 17:54:29 2010 (r202762) @@ -524,7 +524,7 @@ intr_event_add_handler(struct intr_event ih->ih_filter = filter; ih->ih_handler = handler; ih->ih_argument = arg; - ih->ih_name = name; + strlcpy(ih->ih_name, name, sizeof(ih->ih_name)); ih->ih_event = ie; ih->ih_pri = pri; if (flags & INTR_EXCL) @@ -597,7 +597,7 @@ intr_event_add_handler(struct intr_event ih->ih_filter = filter; ih->ih_handler = handler; ih->ih_argument = arg; - ih->ih_name = name; + strlcpy(ih->ih_name, name, sizeof(ih->ih_name)); ih->ih_event = ie; ih->ih_pri = pri; if (flags & INTR_EXCL) @@ -665,6 +665,61 @@ intr_event_add_handler(struct intr_event #endif /* + * Append a description preceded by a ':' to the name of the specified + * interrupt handler. + */ +int +intr_event_describe_handler(struct intr_event *ie, void *cookie, + const char *descr) +{ + struct intr_handler *ih; + size_t space; + char *start; + + mtx_lock(&ie->ie_lock); +#ifdef INVARIANTS + TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { + if (ih == cookie) + break; + } + if (ih == NULL) { + mtx_unlock(&ie->ie_lock); + panic("handler %p not found in interrupt event %p", cookie, ie); + } +#endif + ih = cookie; + + /* + * Look for an existing description by checking for an + * existing ":". This assumes device names do not include + * colons. If one is found, prepare to insert the new + * description at that point. If one is not found, find the + * end of the name to use as the insertion point. + */ + start = index(ih->ih_name, ':'); + if (start == NULL) + start = index(ih->ih_name, 0); + + /* + * See if there is enough remaining room in the string for the + * description + ":". The "- 1" leaves room for the trailing + * '\0'. The "+ 1" accounts for the colon. + */ + space = sizeof(ih->ih_name) - (start - ih->ih_name) - 1; + if (strlen(descr) + 1 > space) { + mtx_unlock(&ie->ie_lock); + return (ENOSPC); + } + + /* Append a colon followed by the description. */ + *start = ':'; + strcpy(start + 1, descr); + intr_event_update(ie); + mtx_unlock(&ie->ie_lock); + return (0); +} + +/* * Return the ie_source field from the intr_event an intr_handler is * associated with. */ Modified: stable/8/sys/kern/subr_bus.c ============================================================================== --- stable/8/sys/kern/subr_bus.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/kern/subr_bus.c Thu Jan 21 17:54:29 2010 (r202762) @@ -3530,6 +3530,24 @@ bus_generic_config_intr(device_t dev, in } /** + * @brief Helper function for implementing BUS_DESCRIBE_INTR(). + * + * This simple implementation of BUS_DESCRIBE_INTR() simply calls the + * BUS_DESCRIBE_INTR() method of the parent of @p dev. + */ +int +bus_generic_describe_intr(device_t dev, device_t child, struct resource *irq, + void *cookie, const char *descr) +{ + + /* Propagate up the bus hierarchy until someone handles it. */ + if (dev->parent) + return (BUS_DESCRIBE_INTR(dev->parent, child, irq, cookie, + descr)); + return (EINVAL); +} + +/** * @brief Helper function for implementing BUS_GET_DMA_TAG(). * * This simple implementation of BUS_GET_DMA_TAG() simply calls the @@ -3834,6 +3852,28 @@ bus_bind_intr(device_t dev, struct resou } /** + * @brief Wrapper function for BUS_DESCRIBE_INTR(). + * + * This function first formats the requested description into a + * temporary buffer and then calls the BUS_DESCRIBE_INTR() method of + * the parent of @p dev. + */ +int +bus_describe_intr(device_t dev, struct resource *irq, void *cookie, + const char *fmt, ...) +{ + char descr[MAXCOMLEN]; + va_list ap; + + if (dev->parent == NULL) + return (EINVAL); + va_start(ap, fmt); + vsnprintf(descr, sizeof(descr), fmt, ap); + va_end(ap); + return (BUS_DESCRIBE_INTR(dev->parent, dev, irq, cookie, descr)); +} + +/** * @brief Wrapper function for BUS_SET_RESOURCE(). * * This function simply calls the BUS_SET_RESOURCE() method of the Modified: stable/8/sys/sparc64/include/intr_machdep.h ============================================================================== --- stable/8/sys/sparc64/include/intr_machdep.h Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/sparc64/include/intr_machdep.h Thu Jan 21 17:54:29 2010 (r202762) @@ -93,6 +93,7 @@ extern struct intr_vector intr_vectors[] void intr_add_cpu(u_int cpu); #endif int intr_bind(int vec, u_char cpu); +int intr_describe(int vec, void *ih, const char *descr); void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf, void *iva); void intr_init1(void); Modified: stable/8/sys/sparc64/pci/psycho.c ============================================================================== --- stable/8/sys/sparc64/pci/psycho.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/sparc64/pci/psycho.c Thu Jan 21 17:54:29 2010 (r202762) @@ -115,6 +115,7 @@ static bus_alloc_resource_t psycho_alloc static bus_activate_resource_t psycho_activate_resource; static bus_deactivate_resource_t psycho_deactivate_resource; static bus_release_resource_t psycho_release_resource; +static bus_describe_intr_t psycho_describe_intr; static bus_get_dma_tag_t psycho_get_dma_tag; static pcib_maxslots_t psycho_maxslots; static pcib_read_config_t psycho_read_config; @@ -139,6 +140,7 @@ static device_method_t psycho_methods[] DEVMETHOD(bus_activate_resource, psycho_activate_resource), DEVMETHOD(bus_deactivate_resource, psycho_deactivate_resource), DEVMETHOD(bus_release_resource, psycho_release_resource), + DEVMETHOD(bus_describe_intr, psycho_describe_intr), DEVMETHOD(bus_get_dma_tag, psycho_get_dma_tag), /* pcib interface */ @@ -1261,6 +1263,18 @@ psycho_teardown_intr(device_t dev, devic return (bus_generic_teardown_intr(dev, child, vec, cookie)); } +static int +psycho_describe_intr(device_t dev, device_t child, struct resource *vec, + void *cookie, const char *descr) +{ + struct psycho_softc *sc; + + sc = device_get_softc(dev); + if (sc->sc_mode == PSYCHO_MODE_SABRE) + cookie = ((struct psycho_dma_sync *)cookie)->pds_cookie; + return (bus_generic_describe_intr(dev, child, vec, cookie, descr)); +} + static struct resource * psycho_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/sparc64/pci/schizo.c Thu Jan 21 17:54:29 2010 (r202762) @@ -113,6 +113,7 @@ static bus_alloc_resource_t schizo_alloc static bus_activate_resource_t schizo_activate_resource; static bus_deactivate_resource_t schizo_deactivate_resource; static bus_release_resource_t schizo_release_resource; +static bus_describe_intr_t schizo_describe_intr; static bus_get_dma_tag_t schizo_get_dma_tag; static pcib_maxslots_t schizo_maxslots; static pcib_read_config_t schizo_read_config; @@ -137,6 +138,7 @@ static device_method_t schizo_methods[] DEVMETHOD(bus_activate_resource, schizo_activate_resource), DEVMETHOD(bus_deactivate_resource, schizo_deactivate_resource), DEVMETHOD(bus_release_resource, schizo_release_resource), + DEVMETHOD(bus_describe_intr, schizo_describe_intr), DEVMETHOD(bus_get_dma_tag, schizo_get_dma_tag), /* pcib interface */ @@ -1282,6 +1284,18 @@ schizo_teardown_intr(device_t dev, devic return (bus_generic_teardown_intr(dev, child, vec, cookie)); } +static int +schizo_describe_intr(device_t dev, device_t child, struct resource *vec, + void *cookie, const char *descr) +{ + struct schizo_softc *sc; + + sc = device_get_softc(dev); + if ((sc->sc_flags & SCHIZO_FLAGS_CDMA) != 0) + cookie = ((struct schizo_dma_sync *)cookie)->sds_cookie; + return (bus_generic_describe_intr(dev, child, vec, cookie, descr)); +} + static struct resource * schizo_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) Modified: stable/8/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/intr_machdep.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/sparc64/sparc64/intr_machdep.c Thu Jan 21 17:54:29 2010 (r202762) @@ -413,6 +413,31 @@ inthand_remove(int vec, void *cookie) return (error); } +/* Add a description to an active interrupt handler. */ +int +intr_describe(int vec, void *ih, const char *descr) +{ + struct intr_vector *iv; + int error; + + if (vec < 0 || vec >= IV_MAX) + return (EINVAL); + sx_xlock(&intr_table_lock); + iv = &intr_vectors[vec]; + if (iv == NULL) { + sx_xunlock(&intr_table_lock); + return (EINVAL); + } + error = intr_event_describe_handler(iv->iv_event, ih, descr); + if (error) { + sx_xunlock(&intr_table_lock); + return (error); + } + intrcnt_updatename(vec, iv->iv_event->ie_fullname, 0); + sx_xunlock(&intr_table_lock); + return (error); +} + #ifdef SMP /* * Support for balancing interrupt sources across CPUs. For now we just Modified: stable/8/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/8/sys/sparc64/sparc64/nexus.c Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/sparc64/sparc64/nexus.c Thu Jan 21 17:54:29 2010 (r202762) @@ -90,12 +90,13 @@ static bus_activate_resource_t nexus_act static bus_deactivate_resource_t nexus_deactivate_resource; static bus_release_resource_t nexus_release_resource; static bus_get_resource_list_t nexus_get_resource_list; +#ifdef SMP +static bus_bind_intr_t nexus_bind_intr; +#endif +static bus_describe_intr_t nexus_describe_intr; static bus_get_dma_tag_t nexus_get_dma_tag; static ofw_bus_get_devinfo_t nexus_get_devinfo; -#ifdef SMP -static int nexus_bind_intr(device_t, device_t, struct resource *, int); -#endif static int nexus_inlist(const char *, const char *const *); static struct nexus_devinfo * nexus_setup_dinfo(device_t, phandle_t); static void nexus_destroy_dinfo(struct nexus_devinfo *); @@ -128,6 +129,7 @@ static device_method_t nexus_methods[] = #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif + DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_get_dma_tag, nexus_get_dma_tag), /* ofw_bus interface */ @@ -329,6 +331,14 @@ nexus_bind_intr(device_t dev, device_t c } #endif +static int +nexus_describe_intr(device_t dev, device_t child, struct resource *r, + void *cookie, const char *descr) +{ + + return (intr_describe(rman_get_start(r), cookie, descr)); +} + static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) Modified: stable/8/sys/sys/bus.h ============================================================================== --- stable/8/sys/sys/bus.h Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/sys/bus.h Thu Jan 21 17:54:29 2010 (r202762) @@ -292,6 +292,9 @@ int bus_generic_bind_intr(device_t dev, int bus_generic_child_present(device_t dev, device_t child); int bus_generic_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); +int bus_generic_describe_intr(device_t dev, device_t child, + struct resource *irq, void *cookie, + const char *descr); int bus_generic_deactivate_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int bus_generic_detach(device_t dev); @@ -363,6 +366,8 @@ int bus_setup_intr(device_t dev, struct void *arg, void **cookiep); int bus_teardown_intr(device_t dev, struct resource *r, void *cookie); int bus_bind_intr(device_t dev, struct resource *r, int cpu); +int bus_describe_intr(device_t dev, struct resource *irq, void *cookie, + const char *fmt, ...); int bus_set_resource(device_t dev, int type, int rid, u_long start, u_long count); int bus_get_resource(device_t dev, int type, int rid, Modified: stable/8/sys/sys/interrupt.h ============================================================================== --- stable/8/sys/sys/interrupt.h Thu Jan 21 17:46:14 2010 (r202761) +++ stable/8/sys/sys/interrupt.h Thu Jan 21 17:54:29 2010 (r202762) @@ -47,7 +47,7 @@ struct intr_handler { driver_intr_t *ih_handler; /* Threaded handler function. */ void *ih_argument; /* Argument to pass to handlers. */ int ih_flags; - const char *ih_name; /* Name of handler. */ + char ih_name[MAXCOMLEN]; /* Name of handler. */ struct intr_event *ih_event; /* Event we are connected to. */ int ih_need; /* Needs service. */ TAILQ_ENTRY(intr_handler) ih_next; /* Next handler for this event. */ @@ -168,6 +168,8 @@ int intr_event_create(struct intr_event void (*post_ithread)(void *), void (*post_filter)(void *), int (*assign_cpu)(void *, u_char), const char *fmt, ...) __printflike(9, 10); +int intr_event_describe_handler(struct intr_event *ie, void *cookie, + const char *descr); int intr_event_destroy(struct intr_event *ie); void intr_event_execute_handlers(struct proc *p, struct intr_event *ie); int intr_event_handle(struct intr_event *ie, struct trapframe *frame); From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 17:55:48 2010 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 31AD91065672; Thu, 21 Jan 2010 17:55:48 +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 1C3E58FC08; Thu, 21 Jan 2010 17:55:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHtmWO001236; Thu, 21 Jan 2010 17:55:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHtl0m001217; Thu, 21 Jan 2010 17:55:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001211755.o0LHtl0m001217@svn.freebsd.org> From: John Baldwin Date: Thu, 21 Jan 2010 17:55:47 +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: r202763 - in stable/7: share/man/man9 sys/amd64/amd64 sys/amd64/include sys/i386/i386 sys/i386/include sys/kern sys/sparc64/include sys/sparc64/pci sys/sparc64/sparc64 sys/sys 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: Thu, 21 Jan 2010 17:55:48 -0000 Author: jhb Date: Thu Jan 21 17:55:47 2010 New Revision: 202763 URL: http://svn.freebsd.org/changeset/base/202763 Log: MFC 198134,198149,198170,198171,198391,200948: Add a facility for associating optional descriptions with active interrupt handlers. This is primarily intended as a way to allow devices that use multiple interrupts (e.g. MSI) to meaningfully distinguish the various interrupt handlers. - Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate a description with an active interrupt handler setup by BUS_SETUP_INTR. It has a default method (bus_generic_describe_intr()) which simply passes the request up to the parent device. - Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports printf(9) style formatting using var args. - Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of an interrupt handler and copy the name passed to intr_event_add_handler() into that buffer instead of just saving the pointer to the name. - Add a new intr_event_describe_handler() which appends a description string to an interrupt handler's name. - Implement support for interrupt descriptions on amd64, i386, and sparc64 by having the nexus(4) driver supply a custom bus_describe_intr method that invokes a new intr_describe() MD routine which in turn looks up the associated interrupt event and invokes intr_event_describe_handler(). Added: stable/7/share/man/man9/BUS_DESCRIBE_INTR.9 - copied, changed from r198134, head/share/man/man9/BUS_DESCRIBE_INTR.9 Modified: stable/7/share/man/man9/Makefile stable/7/sys/amd64/amd64/intr_machdep.c stable/7/sys/amd64/amd64/nexus.c stable/7/sys/amd64/include/intr_machdep.h stable/7/sys/i386/i386/intr_machdep.c stable/7/sys/i386/i386/nexus.c stable/7/sys/i386/include/intr_machdep.h stable/7/sys/kern/bus_if.m stable/7/sys/kern/kern_intr.c stable/7/sys/kern/subr_bus.c stable/7/sys/sparc64/include/intr_machdep.h stable/7/sys/sparc64/pci/psycho.c stable/7/sys/sparc64/pci/schizo.c stable/7/sys/sparc64/sparc64/intr_machdep.c stable/7/sys/sparc64/sparc64/nexus.c stable/7/sys/sys/bus.h stable/7/sys/sys/interrupt.h Directory Properties: stable/7/share/man/man9/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Copied and modified: stable/7/share/man/man9/BUS_DESCRIBE_INTR.9 (from r198134, head/share/man/man9/BUS_DESCRIBE_INTR.9) ============================================================================== --- head/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Oct 15 14:54:35 2009 (r198134, copy source) +++ stable/7/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Jan 21 17:55:47 2010 (r202763) @@ -88,10 +88,10 @@ the interrupt handler name. Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO .Xr BUS_SETUP_INTR 9 , -.Xr device 9 , -.Xr printf 9 , .Xr systat 1 , -.Xr vmstat 8 +.Xr vmstat 8 , +.Xr device 9 , +.Xr printf 9 .Sh HISTORY The .Fn BUS_DESCRIBE_INTR Modified: stable/7/share/man/man9/Makefile ============================================================================== --- stable/7/share/man/man9/Makefile Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/share/man/man9/Makefile Thu Jan 21 17:55:47 2010 (r202763) @@ -24,6 +24,7 @@ MAN= accept_filter.9 \ BUS_BIND_INTR.9 \ bus_child_present.9 \ BUS_CONFIG_INTR.9 \ + BUS_DESCRIBE_INTR.9 \ bus_dma.9 \ bus_generic_attach.9 \ bus_generic_detach.9 \ @@ -379,6 +380,7 @@ MLINKS+=buf.9 bp.9 MLINKS+=bus_activate_resource.9 bus_deactivate_resource.9 MLINKS+=bus_alloc_resource.9 bus_alloc_resource_any.9 MLINKS+=BUS_BIND_INTR.9 bus_bind_intr.9 +MLINKS+=BUS_DESCRIBE_INTR.9 bus_describe_intr.9 MLINKS+=bus_dma.9 busdma.9 \ bus_dma.9 bus_dmamap_create.9 \ bus_dma.9 bus_dmamap_destroy.9 \ Modified: stable/7/sys/amd64/amd64/intr_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/intr_machdep.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/amd64/amd64/intr_machdep.c Thu Jan 21 17:55:47 2010 (r202763) @@ -405,6 +405,23 @@ atpic_reset(void) } #endif +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + #ifdef DDB /* * Dump data about interrupt handlers Modified: stable/7/sys/amd64/amd64/nexus.c ============================================================================== --- stable/7/sys/amd64/amd64/nexus.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/amd64/amd64/nexus.c Thu Jan 21 17:55:47 2010 (r202763) @@ -94,6 +94,9 @@ static int nexus_bind_intr(device_t, dev #endif static int nexus_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); +static int nexus_describe_intr(device_t dev, device_t child, + struct resource *irq, void *cookie, + const char *descr); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_deactivate_resource(device_t, device_t, int, int, @@ -137,6 +140,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_set_resource, nexus_set_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), @@ -472,6 +476,14 @@ nexus_config_intr(device_t dev, int irq, return (intr_config_intr(irq, trig, pol)); } +static int +nexus_describe_intr(device_t dev, device_t child, struct resource *irq, + void *cookie, const char *descr) +{ + + return (intr_describe(rman_get_start(irq), cookie, descr)); +} + static struct resource_list * nexus_get_reslist(device_t dev, device_t child) { Modified: stable/7/sys/amd64/include/intr_machdep.h ============================================================================== --- stable/7/sys/amd64/include/intr_machdep.h Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/amd64/include/intr_machdep.h Thu Jan 21 17:55:47 2010 (r202763) @@ -151,6 +151,7 @@ int intr_bind(u_int vector, u_char cpu); #endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); +int intr_describe(u_int vector, void *ih, const char *descr); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); struct intsrc *intr_lookup_source(int vector); int intr_register_pic(struct pic *pic); Modified: stable/7/sys/i386/i386/intr_machdep.c ============================================================================== --- stable/7/sys/i386/i386/intr_machdep.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/i386/i386/intr_machdep.c Thu Jan 21 17:55:47 2010 (r202763) @@ -374,6 +374,23 @@ intr_init(void *dummy __unused) } SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + #ifdef DDB /* * Dump data about interrupt handlers Modified: stable/7/sys/i386/i386/nexus.c ============================================================================== --- stable/7/sys/i386/i386/nexus.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/i386/i386/nexus.c Thu Jan 21 17:55:47 2010 (r202763) @@ -98,6 +98,9 @@ static int nexus_bind_intr(device_t, dev #endif static int nexus_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); +static int nexus_describe_intr(device_t dev, device_t child, + struct resource *irq, void *cookie, + const char *descr); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_deactivate_resource(device_t, device_t, int, int, @@ -143,6 +146,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_set_resource, nexus_set_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), @@ -519,6 +523,14 @@ nexus_config_intr(device_t dev, int irq, return (intr_config_intr(irq, trig, pol)); } +static int +nexus_describe_intr(device_t dev, device_t child, struct resource *irq, + void *cookie, const char *descr) +{ + + return (intr_describe(rman_get_start(irq), cookie, descr)); +} + static struct resource_list * nexus_get_reslist(device_t dev, device_t child) { Modified: stable/7/sys/i386/include/intr_machdep.h ============================================================================== --- stable/7/sys/i386/include/intr_machdep.h Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/i386/include/intr_machdep.h Thu Jan 21 17:55:47 2010 (r202763) @@ -138,6 +138,7 @@ int intr_bind(u_int vector, u_char cpu); #endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); +int intr_describe(u_int vector, void *ih, const char *descr); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); struct intsrc *intr_lookup_source(int vector); int intr_register_pic(struct pic *pic); Modified: stable/7/sys/kern/bus_if.m ============================================================================== --- stable/7/sys/kern/bus_if.m Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/kern/bus_if.m Thu Jan 21 17:55:47 2010 (r202763) @@ -509,7 +509,6 @@ METHOD int bind_intr { int _cpu; } DEFAULT bus_generic_bind_intr; - /** * @brief Allow (bus) drivers to specify the trigger mode and polarity * of the specified interrupt. @@ -527,6 +526,25 @@ METHOD int config_intr { } DEFAULT bus_generic_config_intr; /** + * @brief Allow drivers to associate a description with an active + * interrupt handler. + * + * @param _dev the parent device of @p _child + * @param _child the device which allocated the resource + * @param _irq the resource representing the interrupt + * @param _cookie the cookie value returned when the interrupt + * was originally registered + * @param _descr the description to associate with the interrupt + */ +METHOD int describe_intr { + device_t _dev; + device_t _child; + struct resource *_irq; + void *_cookie; + const char *_descr; +} DEFAULT bus_generic_describe_intr; + +/** * @brief Notify a (bus) driver about a child that the hints mechanism * believes it has discovered. * Modified: stable/7/sys/kern/kern_intr.c ============================================================================== --- stable/7/sys/kern/kern_intr.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/kern/kern_intr.c Thu Jan 21 17:55:47 2010 (r202763) @@ -506,7 +506,7 @@ intr_event_add_handler(struct intr_event ih->ih_filter = filter; ih->ih_handler = handler; ih->ih_argument = arg; - ih->ih_name = name; + strlcpy(ih->ih_name, name, sizeof(ih->ih_name)); ih->ih_event = ie; ih->ih_pri = pri; if (flags & INTR_EXCL) @@ -579,7 +579,7 @@ intr_event_add_handler(struct intr_event ih->ih_filter = filter; ih->ih_handler = handler; ih->ih_argument = arg; - ih->ih_name = name; + strlcpy(ih->ih_name, name, sizeof(ih->ih_name)); ih->ih_event = ie; ih->ih_pri = pri; if (flags & INTR_EXCL) @@ -647,6 +647,61 @@ intr_event_add_handler(struct intr_event #endif /* + * Append a description preceded by a ':' to the name of the specified + * interrupt handler. + */ +int +intr_event_describe_handler(struct intr_event *ie, void *cookie, + const char *descr) +{ + struct intr_handler *ih; + size_t space; + char *start; + + mtx_lock(&ie->ie_lock); +#ifdef INVARIANTS + TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { + if (ih == cookie) + break; + } + if (ih == NULL) { + mtx_unlock(&ie->ie_lock); + panic("handler %p not found in interrupt event %p", cookie, ie); + } +#endif + ih = cookie; + + /* + * Look for an existing description by checking for an + * existing ":". This assumes device names do not include + * colons. If one is found, prepare to insert the new + * description at that point. If one is not found, find the + * end of the name to use as the insertion point. + */ + start = index(ih->ih_name, ':'); + if (start == NULL) + start = index(ih->ih_name, 0); + + /* + * See if there is enough remaining room in the string for the + * description + ":". The "- 1" leaves room for the trailing + * '\0'. The "+ 1" accounts for the colon. + */ + space = sizeof(ih->ih_name) - (start - ih->ih_name) - 1; + if (strlen(descr) + 1 > space) { + mtx_unlock(&ie->ie_lock); + return (ENOSPC); + } + + /* Append a colon followed by the description. */ + *start = ':'; + strcpy(start + 1, descr); + intr_event_update(ie); + mtx_unlock(&ie->ie_lock); + return (0); +} + +/* * Return the ie_source field from the intr_event an intr_handler is * associated with. */ Modified: stable/7/sys/kern/subr_bus.c ============================================================================== --- stable/7/sys/kern/subr_bus.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/kern/subr_bus.c Thu Jan 21 17:55:47 2010 (r202763) @@ -3264,6 +3264,24 @@ bus_generic_config_intr(device_t dev, in } /** + * @brief Helper function for implementing BUS_DESCRIBE_INTR(). + * + * This simple implementation of BUS_DESCRIBE_INTR() simply calls the + * BUS_DESCRIBE_INTR() method of the parent of @p dev. + */ +int +bus_generic_describe_intr(device_t dev, device_t child, struct resource *irq, + void *cookie, const char *descr) +{ + + /* Propagate up the bus hierarchy until someone handles it. */ + if (dev->parent) + return (BUS_DESCRIBE_INTR(dev->parent, child, irq, cookie, + descr)); + return (EINVAL); +} + +/** * @brief Helper function for implementing BUS_GET_DMA_TAG(). * * This simple implementation of BUS_GET_DMA_TAG() simply calls the @@ -3569,6 +3587,28 @@ bus_bind_intr(device_t dev, struct resou } /** + * @brief Wrapper function for BUS_DESCRIBE_INTR(). + * + * This function first formats the requested description into a + * temporary buffer and then calls the BUS_DESCRIBE_INTR() method of + * the parent of @p dev. + */ +int +bus_describe_intr(device_t dev, struct resource *irq, void *cookie, + const char *fmt, ...) +{ + char descr[MAXCOMLEN]; + va_list ap; + + if (dev->parent == NULL) + return (EINVAL); + va_start(ap, fmt); + vsnprintf(descr, sizeof(descr), fmt, ap); + va_end(ap); + return (BUS_DESCRIBE_INTR(dev->parent, dev, irq, cookie, descr)); +} + +/** * @brief Wrapper function for BUS_SET_RESOURCE(). * * This function simply calls the BUS_SET_RESOURCE() method of the Modified: stable/7/sys/sparc64/include/intr_machdep.h ============================================================================== --- stable/7/sys/sparc64/include/intr_machdep.h Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/sparc64/include/intr_machdep.h Thu Jan 21 17:55:47 2010 (r202763) @@ -93,6 +93,7 @@ extern struct intr_vector intr_vectors[] void intr_add_cpu(u_int cpu); #endif int intr_bind(int vec, u_char cpu); +int intr_describe(int vec, void *ih, const char *descr); void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf, void *iva); void intr_init1(void); Modified: stable/7/sys/sparc64/pci/psycho.c ============================================================================== --- stable/7/sys/sparc64/pci/psycho.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/sparc64/pci/psycho.c Thu Jan 21 17:55:47 2010 (r202763) @@ -116,6 +116,7 @@ static bus_alloc_resource_t psycho_alloc static bus_activate_resource_t psycho_activate_resource; static bus_deactivate_resource_t psycho_deactivate_resource; static bus_release_resource_t psycho_release_resource; +static bus_describe_intr_t psycho_describe_intr; static bus_get_dma_tag_t psycho_get_dma_tag; static pcib_maxslots_t psycho_maxslots; static pcib_read_config_t psycho_read_config; @@ -140,6 +141,7 @@ static device_method_t psycho_methods[] DEVMETHOD(bus_activate_resource, psycho_activate_resource), DEVMETHOD(bus_deactivate_resource, psycho_deactivate_resource), DEVMETHOD(bus_release_resource, psycho_release_resource), + DEVMETHOD(bus_describe_intr, psycho_describe_intr), DEVMETHOD(bus_get_dma_tag, psycho_get_dma_tag), /* pcib interface */ @@ -1262,6 +1264,18 @@ psycho_teardown_intr(device_t dev, devic return (bus_generic_teardown_intr(dev, child, vec, cookie)); } +static int +psycho_describe_intr(device_t dev, device_t child, struct resource *vec, + void *cookie, const char *descr) +{ + struct psycho_softc *sc; + + sc = device_get_softc(dev); + if (sc->sc_mode == PSYCHO_MODE_SABRE) + cookie = ((struct psycho_dma_sync *)cookie)->pds_cookie; + return (bus_generic_describe_intr(dev, child, vec, cookie, descr)); +} + static struct resource * psycho_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/sparc64/pci/schizo.c Thu Jan 21 17:55:47 2010 (r202763) @@ -114,6 +114,7 @@ static bus_alloc_resource_t schizo_alloc static bus_activate_resource_t schizo_activate_resource; static bus_deactivate_resource_t schizo_deactivate_resource; static bus_release_resource_t schizo_release_resource; +static bus_describe_intr_t schizo_describe_intr; static bus_get_dma_tag_t schizo_get_dma_tag; static pcib_maxslots_t schizo_maxslots; static pcib_read_config_t schizo_read_config; @@ -138,6 +139,7 @@ static device_method_t schizo_methods[] DEVMETHOD(bus_activate_resource, schizo_activate_resource), DEVMETHOD(bus_deactivate_resource, schizo_deactivate_resource), DEVMETHOD(bus_release_resource, schizo_release_resource), + DEVMETHOD(bus_describe_intr, schizo_describe_intr), DEVMETHOD(bus_get_dma_tag, schizo_get_dma_tag), /* pcib interface */ @@ -1283,6 +1285,18 @@ schizo_teardown_intr(device_t dev, devic return (bus_generic_teardown_intr(dev, child, vec, cookie)); } +static int +schizo_describe_intr(device_t dev, device_t child, struct resource *vec, + void *cookie, const char *descr) +{ + struct schizo_softc *sc; + + sc = device_get_softc(dev); + if ((sc->sc_flags & SCHIZO_FLAGS_CDMA) != 0) + cookie = ((struct schizo_dma_sync *)cookie)->sds_cookie; + return (bus_generic_describe_intr(dev, child, vec, cookie, descr)); +} + static struct resource * schizo_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) Modified: stable/7/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/intr_machdep.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/sparc64/sparc64/intr_machdep.c Thu Jan 21 17:55:47 2010 (r202763) @@ -414,6 +414,31 @@ inthand_remove(int vec, void *cookie) return (error); } +/* Add a description to an active interrupt handler. */ +int +intr_describe(int vec, void *ih, const char *descr) +{ + struct intr_vector *iv; + int error; + + if (vec < 0 || vec >= IV_MAX) + return (EINVAL); + sx_xlock(&intr_table_lock); + iv = &intr_vectors[vec]; + if (iv == NULL) { + sx_xunlock(&intr_table_lock); + return (EINVAL); + } + error = intr_event_describe_handler(iv->iv_event, ih, descr); + if (error) { + sx_xunlock(&intr_table_lock); + return (error); + } + intrcnt_updatename(vec, iv->iv_event->ie_fullname, 0); + sx_xunlock(&intr_table_lock); + return (error); +} + #ifdef SMP /* * Support for balancing interrupt sources across CPUs. For now we just Modified: stable/7/sys/sparc64/sparc64/nexus.c ============================================================================== --- stable/7/sys/sparc64/sparc64/nexus.c Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/sparc64/sparc64/nexus.c Thu Jan 21 17:55:47 2010 (r202763) @@ -90,12 +90,13 @@ static bus_activate_resource_t nexus_act static bus_deactivate_resource_t nexus_deactivate_resource; static bus_release_resource_t nexus_release_resource; static bus_get_resource_list_t nexus_get_resource_list; +#ifdef SMP +static bus_bind_intr_t nexus_bind_intr; +#endif +static bus_describe_intr_t nexus_describe_intr; static bus_get_dma_tag_t nexus_get_dma_tag; static ofw_bus_get_devinfo_t nexus_get_devinfo; -#ifdef SMP -static int nexus_bind_intr(device_t, device_t, struct resource *, int); -#endif static int nexus_inlist(const char *, const char *const *); static struct nexus_devinfo * nexus_setup_dinfo(device_t, phandle_t); static void nexus_destroy_dinfo(struct nexus_devinfo *); @@ -128,6 +129,7 @@ static device_method_t nexus_methods[] = #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif + DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_get_dma_tag, nexus_get_dma_tag), /* ofw_bus interface */ @@ -328,6 +330,14 @@ nexus_bind_intr(device_t dev, device_t c } #endif +static int +nexus_describe_intr(device_t dev, device_t child, struct resource *r, + void *cookie, const char *descr) +{ + + return (intr_describe(rman_get_start(r), cookie, descr)); +} + static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) Modified: stable/7/sys/sys/bus.h ============================================================================== --- stable/7/sys/sys/bus.h Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/sys/bus.h Thu Jan 21 17:55:47 2010 (r202763) @@ -291,6 +291,9 @@ int bus_generic_bind_intr(device_t dev, int bus_generic_child_present(device_t dev, device_t child); int bus_generic_config_intr(device_t, int, enum intr_trigger, enum intr_polarity); +int bus_generic_describe_intr(device_t dev, device_t child, + struct resource *irq, void *cookie, + const char *descr); int bus_generic_deactivate_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int bus_generic_detach(device_t dev); @@ -361,6 +364,8 @@ int bus_setup_intr(device_t dev, struct void *arg, void **cookiep); int bus_teardown_intr(device_t dev, struct resource *r, void *cookie); int bus_bind_intr(device_t dev, struct resource *r, int cpu); +int bus_describe_intr(device_t dev, struct resource *irq, void *cookie, + const char *fmt, ...); int bus_set_resource(device_t dev, int type, int rid, u_long start, u_long count); int bus_get_resource(device_t dev, int type, int rid, Modified: stable/7/sys/sys/interrupt.h ============================================================================== --- stable/7/sys/sys/interrupt.h Thu Jan 21 17:54:29 2010 (r202762) +++ stable/7/sys/sys/interrupt.h Thu Jan 21 17:55:47 2010 (r202763) @@ -47,7 +47,7 @@ struct intr_handler { driver_intr_t *ih_handler; /* Handler function. */ void *ih_argument; /* Argument to pass to handler. */ int ih_flags; - const char *ih_name; /* Name of handler. */ + char ih_name[MAXCOMLEN]; /* Name of handler. */ struct intr_event *ih_event; /* Event we are connected to. */ int ih_need; /* Needs service. */ TAILQ_ENTRY(intr_handler) ih_next; /* Next handler for this event. */ @@ -156,6 +156,8 @@ int intr_event_create(struct intr_event void (*post_ithread)(void *), void (*post_filter)(void *), int (*assign_cpu)(void *, u_char), const char *fmt, ...) __printflike(9, 10); +int intr_event_describe_handler(struct intr_event *ie, void *cookie, + const char *descr); int intr_event_destroy(struct intr_event *ie); int intr_event_handle(struct intr_event *ie, struct trapframe *frame); int intr_event_remove_handler(void *cookie); From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 19:11:19 2010 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 DC8F51065670; Thu, 21 Jan 2010 19:11:18 +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 C99FB8FC13; Thu, 21 Jan 2010 19:11:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LJBI6V018739; Thu, 21 Jan 2010 19:11:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LJBIN8018733; Thu, 21 Jan 2010 19:11:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001211911.o0LJBIN8018733@svn.freebsd.org> From: John Baldwin Date: Thu, 21 Jan 2010 19:11:18 +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: r202764 - in stable/8/sys: kern sys 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: Thu, 21 Jan 2010 19:11:19 -0000 Author: jhb Date: Thu Jan 21 19:11:18 2010 New Revision: 202764 URL: http://svn.freebsd.org/changeset/base/202764 Log: MFC 198411: - Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and td_name[] arrays are actually MAXCOMLEN + 1 in size and a few places that created shadow copies of these arrays were just using MAXCOMLEN. - Prefer using sizeof() of an array type to explicit constants for the array length in a few places. - Ensure that all of p_comm[] and td_name[] is always zero'd during execve() to guard against any possible information leaks. Previously trailing garbage in p_comm[] could be leaked to userland in ktrace record headers via td_name[]. Modified: stable/8/sys/kern/kern_exec.c stable/8/sys/kern/kern_ktrace.c stable/8/sys/kern/subr_bus.c stable/8/sys/kern/subr_taskqueue.c stable/8/sys/sys/interrupt.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_exec.c ============================================================================== --- stable/8/sys/kern/kern_exec.c Thu Jan 21 17:55:47 2010 (r202763) +++ stable/8/sys/kern/kern_exec.c Thu Jan 21 19:11:18 2010 (r202764) @@ -326,7 +326,7 @@ do_execve(td, args, mac_p) struct ucred *newcred = NULL, *oldcred; struct uidinfo *euip; register_t *stack_base; - int error, len = 0, i; + int error, i; struct image_params image_params, *imgp; struct vattr attr; int (*img_first)(struct image_params *); @@ -602,18 +602,12 @@ interpret: execsigs(p); /* name this process - nameiexec(p, ndp) */ - if (args->fname) { - len = min(nd.ni_cnd.cn_namelen,MAXCOMLEN); - bcopy(nd.ni_cnd.cn_nameptr, p->p_comm, len); - } else { - if (vn_commname(binvp, p->p_comm, MAXCOMLEN + 1) == 0) - len = MAXCOMLEN; - else { - len = sizeof(fexecv_proc_title); - bcopy(fexecv_proc_title, p->p_comm, len); - } - } - p->p_comm[len] = 0; + bzero(p->p_comm, sizeof(p->p_comm)); + if (args->fname) + bcopy(nd.ni_cnd.cn_nameptr, p->p_comm, + min(nd.ni_cnd.cn_namelen, MAXCOMLEN)); + else if (vn_commname(binvp, p->p_comm, sizeof(p->p_comm)) != 0) + bcopy(fexecv_proc_title, p->p_comm, sizeof(fexecv_proc_title)); bcopy(p->p_comm, td->td_name, sizeof(td->td_name)); /* Modified: stable/8/sys/kern/kern_ktrace.c ============================================================================== --- stable/8/sys/kern/kern_ktrace.c Thu Jan 21 17:55:47 2010 (r202763) +++ stable/8/sys/kern/kern_ktrace.c Thu Jan 21 19:11:18 2010 (r202764) @@ -256,6 +256,10 @@ ktrace_resize_pool(u_int newsize) return (ktr_requestpool); } +/* ktr_getrequest() assumes that ktr_comm[] is the same size as td_name[]. */ +CTASSERT(sizeof(((struct ktr_header *)NULL)->ktr_comm) == + (sizeof((struct thread *)NULL)->td_name)); + static struct ktr_request * ktr_getrequest(int type) { @@ -283,7 +287,8 @@ ktr_getrequest(int type) microtime(&req->ktr_header.ktr_time); req->ktr_header.ktr_pid = p->p_pid; req->ktr_header.ktr_tid = td->td_tid; - bcopy(td->td_name, req->ktr_header.ktr_comm, MAXCOMLEN + 1); + bcopy(td->td_name, req->ktr_header.ktr_comm, + sizeof(req->ktr_header.ktr_comm)); req->ktr_buffer = NULL; req->ktr_header.ktr_len = 0; } else { Modified: stable/8/sys/kern/subr_bus.c ============================================================================== --- stable/8/sys/kern/subr_bus.c Thu Jan 21 17:55:47 2010 (r202763) +++ stable/8/sys/kern/subr_bus.c Thu Jan 21 19:11:18 2010 (r202764) @@ -3862,8 +3862,8 @@ int bus_describe_intr(device_t dev, struct resource *irq, void *cookie, const char *fmt, ...) { - char descr[MAXCOMLEN]; va_list ap; + char descr[MAXCOMLEN + 1]; if (dev->parent == NULL) return (EINVAL); Modified: stable/8/sys/kern/subr_taskqueue.c ============================================================================== --- stable/8/sys/kern/subr_taskqueue.c Thu Jan 21 17:55:47 2010 (r202763) +++ stable/8/sys/kern/subr_taskqueue.c Thu Jan 21 19:11:18 2010 (r202764) @@ -301,7 +301,7 @@ taskqueue_start_threads(struct taskqueue struct thread *td; struct taskqueue *tq; int i, error; - char ktname[MAXCOMLEN]; + char ktname[MAXCOMLEN + 1]; if (count <= 0) return (EINVAL); @@ -309,7 +309,7 @@ taskqueue_start_threads(struct taskqueue tq = *tqp; va_start(ap, name); - vsnprintf(ktname, MAXCOMLEN, name, ap); + vsnprintf(ktname, sizeof(ktname), name, ap); va_end(ap); tq->tq_threads = malloc(sizeof(struct thread *) * count, M_TASKQUEUE, Modified: stable/8/sys/sys/interrupt.h ============================================================================== --- stable/8/sys/sys/interrupt.h Thu Jan 21 17:55:47 2010 (r202763) +++ stable/8/sys/sys/interrupt.h Thu Jan 21 19:11:18 2010 (r202764) @@ -47,7 +47,7 @@ struct intr_handler { driver_intr_t *ih_handler; /* Threaded handler function. */ void *ih_argument; /* Argument to pass to handlers. */ int ih_flags; - char ih_name[MAXCOMLEN]; /* Name of handler. */ + char ih_name[MAXCOMLEN + 1]; /* Name of handler. */ struct intr_event *ih_event; /* Event we are connected to. */ int ih_need; /* Needs service. */ TAILQ_ENTRY(intr_handler) ih_next; /* Next handler for this event. */ @@ -104,8 +104,8 @@ struct intr_handler { struct intr_event { TAILQ_ENTRY(intr_event) ie_list; TAILQ_HEAD(, intr_handler) ie_handlers; /* Interrupt handlers. */ - char ie_name[MAXCOMLEN]; /* Individual event name. */ - char ie_fullname[MAXCOMLEN]; + char ie_name[MAXCOMLEN + 1]; /* Individual event name. */ + char ie_fullname[MAXCOMLEN + 1]; struct mtx ie_lock; void *ie_source; /* Cookie used by MD code. */ struct intr_thread *ie_thread; /* Thread we are connected to. */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 19:17:43 2010 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 5225C106566C; Thu, 21 Jan 2010 19:17: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 3F0588FC18; Thu, 21 Jan 2010 19:17:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LJHh8x020314; Thu, 21 Jan 2010 19:17:43 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LJHhZH020308; Thu, 21 Jan 2010 19:17:43 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001211917.o0LJHhZH020308@svn.freebsd.org> From: John Baldwin Date: Thu, 21 Jan 2010 19:17:43 +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: r202765 - in stable/7/sys: kern sys 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: Thu, 21 Jan 2010 19:17:43 -0000 Author: jhb Date: Thu Jan 21 19:17:42 2010 New Revision: 202765 URL: http://svn.freebsd.org/changeset/base/202765 Log: MFC 198411: - Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and td_name[] arrays are actually MAXCOMLEN + 1 in size and a few places that created shadow copies of these arrays were just using MAXCOMLEN. - Prefer using sizeof() of an array type to explicit constants for the array length in a few places. - Ensure that all of p_comm[] is always zero'd during execve() to guard against any possible information leaks. Previously trailing garbage in p_comm[] could be leaked to userland in ktrace record headers. Modified: stable/7/sys/kern/kern_exec.c stable/7/sys/kern/kern_ktrace.c stable/7/sys/kern/subr_bus.c stable/7/sys/kern/subr_taskqueue.c stable/7/sys/sys/interrupt.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_exec.c ============================================================================== --- stable/7/sys/kern/kern_exec.c Thu Jan 21 19:11:18 2010 (r202764) +++ stable/7/sys/kern/kern_exec.c Thu Jan 21 19:17:42 2010 (r202765) @@ -559,9 +559,9 @@ interpret: execsigs(p); /* name this process - nameiexec(p, ndp) */ + bzero(p->p_comm, sizeof(p->p_comm)); len = min(ndp->ni_cnd.cn_namelen,MAXCOMLEN); bcopy(ndp->ni_cnd.cn_nameptr, p->p_comm, len); - p->p_comm[len] = 0; /* * mark as execed, wakeup the process that vforked (if any) and tell Modified: stable/7/sys/kern/kern_ktrace.c ============================================================================== --- stable/7/sys/kern/kern_ktrace.c Thu Jan 21 19:11:18 2010 (r202764) +++ stable/7/sys/kern/kern_ktrace.c Thu Jan 21 19:17:42 2010 (r202765) @@ -257,6 +257,10 @@ ktrace_resize_pool(u_int newsize) return (ktr_requestpool); } +/* ktr_getrequest() assumes that ktr_comm[] is the same size as p_comm[]. */ +CTASSERT(sizeof(((struct ktr_header *)NULL)->ktr_comm) == + (sizeof((struct proc *)NULL)->p_comm)); + static struct ktr_request * ktr_getrequest(int type) { @@ -284,7 +288,8 @@ ktr_getrequest(int type) microtime(&req->ktr_header.ktr_time); req->ktr_header.ktr_pid = p->p_pid; req->ktr_header.ktr_tid = td->td_tid; - bcopy(p->p_comm, req->ktr_header.ktr_comm, MAXCOMLEN + 1); + bcopy(p->p_comm, req->ktr_header.ktr_comm, + sizeof(req->ktr_header.ktr_comm)); req->ktr_buffer = NULL; req->ktr_header.ktr_len = 0; } else { Modified: stable/7/sys/kern/subr_bus.c ============================================================================== --- stable/7/sys/kern/subr_bus.c Thu Jan 21 19:11:18 2010 (r202764) +++ stable/7/sys/kern/subr_bus.c Thu Jan 21 19:17:42 2010 (r202765) @@ -3597,8 +3597,8 @@ int bus_describe_intr(device_t dev, struct resource *irq, void *cookie, const char *fmt, ...) { - char descr[MAXCOMLEN]; va_list ap; + char descr[MAXCOMLEN + 1]; if (dev->parent == NULL) return (EINVAL); Modified: stable/7/sys/kern/subr_taskqueue.c ============================================================================== --- stable/7/sys/kern/subr_taskqueue.c Thu Jan 21 19:11:18 2010 (r202764) +++ stable/7/sys/kern/subr_taskqueue.c Thu Jan 21 19:17:42 2010 (r202765) @@ -343,7 +343,7 @@ taskqueue_start_threads(struct taskqueue va_list ap; struct taskqueue *tq; struct thread *td; - char ktname[MAXCOMLEN]; + char ktname[MAXCOMLEN + 1]; int i, error; if (count <= 0) @@ -351,7 +351,7 @@ taskqueue_start_threads(struct taskqueue tq = *tqp; va_start(ap, name); - vsnprintf(ktname, MAXCOMLEN, name, ap); + vsnprintf(ktname, sizeof(ktname), name, ap); va_end(ap); tq->tq_pproc = malloc(sizeof(struct proc *) * count, M_TASKQUEUE, Modified: stable/7/sys/sys/interrupt.h ============================================================================== --- stable/7/sys/sys/interrupt.h Thu Jan 21 19:11:18 2010 (r202764) +++ stable/7/sys/sys/interrupt.h Thu Jan 21 19:17:42 2010 (r202765) @@ -47,7 +47,7 @@ struct intr_handler { driver_intr_t *ih_handler; /* Handler function. */ void *ih_argument; /* Argument to pass to handler. */ int ih_flags; - char ih_name[MAXCOMLEN]; /* Name of handler. */ + char ih_name[MAXCOMLEN + 1]; /* Name of handler. */ struct intr_event *ih_event; /* Event we are connected to. */ int ih_need; /* Needs service. */ TAILQ_ENTRY(intr_handler) ih_next; /* Next handler for this event. */ @@ -94,8 +94,8 @@ struct intr_handler { struct intr_event { TAILQ_ENTRY(intr_event) ie_list; TAILQ_HEAD(, intr_handler) ie_handlers; /* Interrupt handlers. */ - char ie_name[MAXCOMLEN]; /* Individual event name. */ - char ie_fullname[MAXCOMLEN]; + char ie_name[MAXCOMLEN + 1]; /* Individual event name. */ + char ie_fullname[MAXCOMLEN + 1]; struct mtx ie_lock; void *ie_source; /* Cookie used by MD code. */ struct intr_thread *ie_thread; /* Thread we are connected to. */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 20:17:15 2010 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 CC400106566C; Thu, 21 Jan 2010 20:17:15 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id A729F8FC19; Thu, 21 Jan 2010 20:17:14 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 9so110538eyd.9 for ; Thu, 21 Jan 2010 12:17:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=MUoSX0cFSF3DANhTZ9WMFP/C5L5uVErND0lW39L+4p4=; b=wJbE95fYCzFZR+1HjTRsSMWG7nSMBP3a8BnYk5ArPHh9aYuBQbxfQ8qATIKxVeMeMp wPUc1OxvzTagtkalr2ip2ZsXE9XuHbDYvvpv6FGKIyjUWvDCB+sMz5neJItnfpN+tp9S iZrDaI7JIdlbXPfj8lYeIG13WdrIet6sfsAUc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=FHfdJGBDazUiO6DUgG22pzFt07bODfz9T2qS96ThY6feMJzCxj2YBy8mabyJQkSwvy vk003gJvI/WAbnT5ty1RI20CTT2Cys6vCLvVXht9olQa74eQAJ8VTuX+81/XW2Hrq/gF IkYsY5sFv9J/nEFCyUexVJ/Wxo/bQJ4KvVV+s= Received: by 10.213.109.71 with SMTP id i7mr680938ebp.76.1264105033551; Thu, 21 Jan 2010 12:17:13 -0800 (PST) Received: from centel.dataix.local (ppp-22.1.dialinfree.com [209.172.22.1]) by mx.google.com with ESMTPS id 14sm1154246ewy.3.2010.01.21.12.17.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 21 Jan 2010 12:17:12 -0800 (PST) Sender: "J. Hellenthal" Date: Thu, 21 Jan 2010 15:16:52 -0500 From: jhell To: John Baldwin In-Reply-To: <201001211433.o0LEXIFC054459@svn.freebsd.org> Message-ID: References: <201001211433.o0LEXIFC054459@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r202750 - in stable/7/sys: cddl/contrib/opensolaris/uts/common/fs/zfs dev/md fs/cd9660 fs/udf kern sys ufs/ffs 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: Thu, 21 Jan 2010 20:17:15 -0000 Builds for stable/7 are broke by this commit with the folling error. cc -O2 -fno-strict-aliasing -pipe -DFREEBSD_NAMECACHE -DBUILDING_ZFS -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -I/usr/src/sys/modules/zfs/../../cddl/compat/opensolaris -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/zmod -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common -I/usr/src/sys/modules/zfs/../.. -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/common/zfs -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/common -I/usr/src/sys/modules/zfs/../../../include -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/SH4500/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -I/usr/obj/usr/src/sys/SH4500 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wno-unknown-pragmas -Wno-missing-prototypes -Wno-undef -Wno-strict-prototypes -Wno-cast-qual -Wno-parentheses -Wno-redundant-decls -Wno-missing-braces -Wno-uninitialized -Wno-unused -Wno-inline -Wno-switch -Wno-pointer-arith -c /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c: In function 'zfs_create_fs': /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c:1523: error: 'vp' undeclared (first use in this function) /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c:1523: error: (Each undeclared identifier is reported only once /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c:1523: error: for each function it appears in.) *** Error code 1 Stop in /usr/src/sys/modules/zfs. *** Error code 1 Stop in /usr/src/sys/modules. *** Error code 1 On Thu, 21 Jan 2010 09:33, jhb@ wrote: > Author: jhb > Date: Thu Jan 21 14:33:18 2010 > New Revision: 202750 > URL: http://svn.freebsd.org/changeset/base/202750 > > Log: > MFC 189696,189697: > Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a > filesystem supports additional operations using shared vnode locks. > Currently this is used to enable shared locks for open() and close() of > read-only file descriptors. > - When an ISOPEN namei() request is performed with LOCKSHARED, use a > shared vnode lock for the leaf vnode only if the mount point has the > extended shared flag set. > - Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but > not O_CREAT. > - Use a shared vnode lock around VOP_CLOSE() if the file was opened with > O_RDONLY and the mountpoint has the extended shared flag set. > - Adjust md(4) to upgrade the vnode lock on the vnode it gets back from > vn_open() since it now may only have a shared vnode lock. > - Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since > FIFO's require exclusive vnode locks for their open() and close() > routines. (My recent MPSAFE patches for UDF and cd9660 already included > this change.) > - Enable extended shared operations on UFS, cd9660, and UDF. > > Modified: > stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c > stable/7/sys/dev/md/md.c > stable/7/sys/fs/cd9660/cd9660_vfsops.c > stable/7/sys/fs/udf/udf_vfsops.c > stable/7/sys/kern/vfs_lookup.c > stable/7/sys/kern/vfs_vnops.c > stable/7/sys/kern/vnode_if.src > stable/7/sys/sys/mount.h > stable/7/sys/ufs/ffs/ffs_vfsops.c > Directory Properties: > stable/7/sys/ (props changed) > stable/7/sys/cddl/contrib/opensolaris/ (props changed) > stable/7/sys/contrib/dev/acpica/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > > Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c > ============================================================================== > --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Jan 21 13:31:41 2010 (r202749) > +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Jan 21 14:33:18 2010 (r202750) > @@ -1520,6 +1520,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, > vnode.v_type = VDIR; > vnode.v_data = rootzp; > rootzp->z_vnode = &vnode; > + VN_LOCK_ASHARE(vp); > > bzero(&zfsvfs, sizeof (zfsvfs_t)); > > > Modified: stable/7/sys/dev/md/md.c > ============================================================================== > --- stable/7/sys/dev/md/md.c Thu Jan 21 13:31:41 2010 (r202749) > +++ stable/7/sys/dev/md/md.c Thu Jan 21 14:33:18 2010 (r202750) > @@ -918,12 +918,20 @@ mdcreate_vnode(struct md_s *sc, struct m > return (error); > vfslocked = NDHASGIANT(&nd); > NDFREE(&nd, NDF_ONLY_PNBUF); > - if (nd.ni_vp->v_type != VREG || > - (error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred, td))) { > - VOP_UNLOCK(nd.ni_vp, 0, td); > - (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); > - VFS_UNLOCK_GIANT(vfslocked); > - return (error ? error : EINVAL); > + if (nd.ni_vp->v_type != VREG) { > + error = EINVAL; > + goto bad; > + } > + error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred, td); > + if (error != 0) > + goto bad; > + if (VOP_ISLOCKED(nd.ni_vp, td) != LK_EXCLUSIVE) { > + vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY, td); > + if (nd.ni_vp->v_iflag & VI_DOOMED) { > + /* Forced unmount. */ > + error = EBADF; > + goto bad; > + } > } > nd.ni_vp->v_vflag |= VV_MD; > VOP_UNLOCK(nd.ni_vp, 0, td); > @@ -942,13 +950,15 @@ mdcreate_vnode(struct md_s *sc, struct m > sc->vnode = NULL; > vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY, td); > nd.ni_vp->v_vflag &= ~VV_MD; > - VOP_UNLOCK(nd.ni_vp, 0, td); > - (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); > - VFS_UNLOCK_GIANT(vfslocked); > - return (error); > + goto bad; > } > VFS_UNLOCK_GIANT(vfslocked); > return (0); > +bad: > + VOP_UNLOCK(nd.ni_vp, 0, td); > + (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); > + VFS_UNLOCK_GIANT(vfslocked); > + return (error); > } > > static int > > Modified: stable/7/sys/fs/cd9660/cd9660_vfsops.c > ============================================================================== > --- stable/7/sys/fs/cd9660/cd9660_vfsops.c Thu Jan 21 13:31:41 2010 (r202749) > +++ stable/7/sys/fs/cd9660/cd9660_vfsops.c Thu Jan 21 14:33:18 2010 (r202750) > @@ -373,7 +373,8 @@ iso_mountfs(devvp, mp, td) > mp->mnt_maxsymlinklen = 0; > MNT_ILOCK(mp); > mp->mnt_flag |= MNT_LOCAL; > - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED; > + mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | > + MNTK_EXTENDED_SHARED; > MNT_IUNLOCK(mp); > isomp->im_mountp = mp; > isomp->im_dev = dev; > > Modified: stable/7/sys/fs/udf/udf_vfsops.c > ============================================================================== > --- stable/7/sys/fs/udf/udf_vfsops.c Thu Jan 21 13:31:41 2010 (r202749) > +++ stable/7/sys/fs/udf/udf_vfsops.c Thu Jan 21 14:33:18 2010 (r202750) > @@ -353,7 +353,8 @@ udf_mountfs(struct vnode *devvp, struct > mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; > MNT_ILOCK(mp); > mp->mnt_flag |= MNT_LOCAL; > - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED; > + mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | > + MNTK_EXTENDED_SHARED; > MNT_IUNLOCK(mp); > udfmp->im_mountp = mp; > udfmp->im_dev = dev; > > Modified: stable/7/sys/kern/vfs_lookup.c > ============================================================================== > --- stable/7/sys/kern/vfs_lookup.c Thu Jan 21 13:31:41 2010 (r202749) > +++ stable/7/sys/kern/vfs_lookup.c Thu Jan 21 14:33:18 2010 (r202750) > @@ -322,6 +322,41 @@ compute_cn_lkflags(struct mount *mp, int > return lkflags; > } > > +static __inline int > +needs_exclusive_leaf(struct mount *mp, int flags) > +{ > + > + /* > + * Intermediate nodes can use shared locks, we only need to > + * force an exclusive lock for leaf nodes. > + */ > + if ((flags & (ISLASTCN | LOCKLEAF)) != (ISLASTCN | LOCKLEAF)) > + return (0); > + > + /* Always use exclusive locks if LOCKSHARED isn't set. */ > + if (!(flags & LOCKSHARED)) > + return (1); > + > + /* > + * For lookups during open(), if the mount point supports > + * extended shared operations, then use a shared lock for the > + * leaf node, otherwise use an exclusive lock. > + */ > + if (flags & ISOPEN) { > + if (mp != NULL && > + (mp->mnt_kern_flag & MNTK_EXTENDED_SHARED)) > + return (0); > + else > + return (1); > + } > + > + /* > + * Lookup requests outside of open() that specify LOCKSHARED > + * only need a shared lock on the leaf vnode. > + */ > + return (0); > +} > + > /* > * Search a pathname. > * This is a very central and rather complicated routine. > @@ -580,8 +615,7 @@ unionlookup: > * If we're looking up the last component and we need an exclusive > * lock, adjust our lkflags. > */ > - if ((cnp->cn_flags & (ISLASTCN|LOCKSHARED|LOCKLEAF)) == > - (ISLASTCN|LOCKLEAF)) > + if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags)) > cnp->cn_lkflags = LK_EXCLUSIVE; > #ifdef NAMEI_DIAGNOSTIC > vprint("lookup in", dp); > @@ -778,8 +812,8 @@ success: > * Because of lookup_shared we may have the vnode shared locked, but > * the caller may want it to be exclusively locked. > */ > - if ((cnp->cn_flags & (ISLASTCN | LOCKSHARED | LOCKLEAF)) == > - (ISLASTCN | LOCKLEAF) && VOP_ISLOCKED(dp, td) != LK_EXCLUSIVE) { > + if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags) && > + VOP_ISLOCKED(dp, td) != LK_EXCLUSIVE) { > vn_lock(dp, LK_UPGRADE | LK_RETRY, td); > if (dp->v_iflag & VI_DOOMED) { > error = ENOENT; > > Modified: stable/7/sys/kern/vfs_vnops.c > ============================================================================== > --- stable/7/sys/kern/vfs_vnops.c Thu Jan 21 13:31:41 2010 (r202749) > +++ stable/7/sys/kern/vfs_vnops.c Thu Jan 21 14:33:18 2010 (r202750) > @@ -185,6 +185,8 @@ restart: > ndp->ni_cnd.cn_flags = ISOPEN | > ((fmode & O_NOFOLLOW) ? NOFOLLOW : FOLLOW) | > LOCKLEAF | MPSAFE | AUDITVNODE1; > + if (!(fmode & FWRITE)) > + ndp->ni_cnd.cn_flags |= LOCKSHARED; > if ((error = namei(ndp)) != 0) > return (error); > if (!mpsafe) > @@ -235,7 +237,7 @@ restart: > if (fmode & FWRITE) > vp->v_writecount++; > *flagp = fmode; > - ASSERT_VOP_ELOCKED(vp, "vn_open_cred"); > + ASSERT_VOP_LOCKED(vp, "vn_open_cred"); > if (!mpsafe) > VFS_UNLOCK_GIANT(vfslocked); > return (0); > @@ -280,12 +282,18 @@ vn_close(vp, flags, file_cred, td) > struct thread *td; > { > struct mount *mp; > - int error; > + int error, lock_flags; > + > + if (!(flags & FWRITE) && vp->v_mount != NULL && > + vp->v_mount->mnt_kern_flag & MNTK_EXTENDED_SHARED) > + lock_flags = LK_SHARED; > + else > + lock_flags = LK_EXCLUSIVE; > > VFS_ASSERT_GIANT(vp->v_mount); > > vn_start_write(vp, &mp, V_WAIT); > - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); > + vn_lock(vp, lock_flags | LK_RETRY, td); > if (flags & FWRITE) { > VNASSERT(vp->v_writecount > 0, vp, > ("vn_close: negative writecount")); > > Modified: stable/7/sys/kern/vnode_if.src > ============================================================================== > --- stable/7/sys/kern/vnode_if.src Thu Jan 21 13:31:41 2010 (r202749) > +++ stable/7/sys/kern/vnode_if.src Thu Jan 21 14:33:18 2010 (r202750) > @@ -134,7 +134,7 @@ vop_open { > }; > > > -%% close vp E E E > +%% close vp L L L > > vop_close { > IN struct vnode *vp; > > Modified: stable/7/sys/sys/mount.h > ============================================================================== > --- stable/7/sys/sys/mount.h Thu Jan 21 13:31:41 2010 (r202749) > +++ stable/7/sys/sys/mount.h Thu Jan 21 14:33:18 2010 (r202750) > @@ -328,6 +328,7 @@ void __mnt_vnode_markerfree(str > #define MNTK_SOFTDEP 0x00000004 /* async disabled by softdep */ > #define MNTK_NOINSMNTQ 0x00000008 /* insmntque is not allowed */ > #define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */ > +#define MNTK_EXTENDED_SHARED 0x00000040 /* Allow shared locking for more ops */ > #define MNTK_SHARED_WRITES 0x00000080 /* Allow shared locking for writes */ > #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ > #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ > @@ -335,8 +336,8 @@ void __mnt_vnode_markerfree(str > #define MNTK_SUSPEND2 0x04000000 /* block secondary writes */ > #define MNTK_SUSPENDED 0x10000000 /* write operations are suspended */ > #define MNTK_MPSAFE 0x20000000 /* Filesystem is MPSAFE. */ > -#define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ > #define MNTK_LOOKUP_SHARED 0x40000000 /* FS supports shared lock lookups */ > +#define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ > > /* > * Sysctl CTL_VFS definitions. > > Modified: stable/7/sys/ufs/ffs/ffs_vfsops.c > ============================================================================== > --- stable/7/sys/ufs/ffs/ffs_vfsops.c Thu Jan 21 13:31:41 2010 (r202749) > +++ stable/7/sys/ufs/ffs/ffs_vfsops.c Thu Jan 21 14:33:18 2010 (r202750) > @@ -883,7 +883,8 @@ ffs_mountfs(devvp, mp, td) > * Initialize filesystem stat information in mount struct. > */ > MNT_ILOCK(mp); > - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED; > + mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | > + MNTK_EXTENDED_SHARED; > MNT_IUNLOCK(mp); > #ifdef UFS_EXTATTR > #ifdef UFS_EXTATTR_AUTOSTART > @@ -1440,10 +1441,9 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags > return (error); > } > /* > - * FFS supports recursive and shared locking. > + * FFS supports recursive locking. > */ > - vp->v_vnlock->lk_flags |= LK_CANRECURSE; > - vp->v_vnlock->lk_flags &= ~LK_NOSHARE; > + VN_LOCK_AREC(vp); > vp->v_data = ip; > vp->v_bufobj.bo_bsize = fs->fs_bsize; > ip->i_vnode = vp; > @@ -1518,6 +1518,10 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags > /* > * Finish inode initialization. > */ > + if (vp->v_type != VFIFO) { > + /* FFS supports shared locking for all files except fifos. */ > + VN_LOCK_ASHARE(vp); > + } > > /* > * Set up a generation number for this inode if it does not > _______________________________________________ > svn-src-stable-7@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable-7 > To unsubscribe, send any mail to "svn-src-stable-7-unsubscribe@freebsd.org" > -- jhell From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 20:56:19 2010 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 D84751065694; Thu, 21 Jan 2010 20:56:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C26048FC1E; Thu, 21 Jan 2010 20:56:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LKuJPA042932; Thu, 21 Jan 2010 20:56:19 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LKuJSa042887; Thu, 21 Jan 2010 20:56:19 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201001212056.o0LKuJSa042887@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 21 Jan 2010 20:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202766 - in vendor-sys/acpica/dist: . common compiler debugger disassembler dispatcher events executer hardware include include/platform namespace os_specific/service_layers parser res... 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: Thu, 21 Jan 2010 20:56:20 -0000 Author: jkim Date: Thu Jan 21 20:56:18 2010 New Revision: 202766 URL: http://svn.freebsd.org/changeset/base/202766 Log: Import ACPICA 20100121. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/common/adfile.c vendor-sys/acpica/dist/common/adisasm.c vendor-sys/acpica/dist/common/adwalk.c vendor-sys/acpica/dist/common/dmextern.c vendor-sys/acpica/dist/common/dmrestag.c vendor-sys/acpica/dist/common/dmtable.c vendor-sys/acpica/dist/common/dmtbdump.c vendor-sys/acpica/dist/common/dmtbinfo.c vendor-sys/acpica/dist/common/getopt.c vendor-sys/acpica/dist/compiler/aslanalyze.c vendor-sys/acpica/dist/compiler/aslcodegen.c vendor-sys/acpica/dist/compiler/aslcompile.c vendor-sys/acpica/dist/compiler/aslcompiler.h vendor-sys/acpica/dist/compiler/aslcompiler.l vendor-sys/acpica/dist/compiler/aslcompiler.y vendor-sys/acpica/dist/compiler/asldefine.h vendor-sys/acpica/dist/compiler/aslerror.c vendor-sys/acpica/dist/compiler/aslfiles.c vendor-sys/acpica/dist/compiler/aslfold.c vendor-sys/acpica/dist/compiler/aslglobal.h vendor-sys/acpica/dist/compiler/asllength.c vendor-sys/acpica/dist/compiler/asllisting.c vendor-sys/acpica/dist/compiler/aslload.c vendor-sys/acpica/dist/compiler/asllookup.c vendor-sys/acpica/dist/compiler/aslmain.c vendor-sys/acpica/dist/compiler/aslmap.c vendor-sys/acpica/dist/compiler/aslopcodes.c vendor-sys/acpica/dist/compiler/asloperands.c vendor-sys/acpica/dist/compiler/aslopt.c vendor-sys/acpica/dist/compiler/aslresource.c vendor-sys/acpica/dist/compiler/aslrestype1.c vendor-sys/acpica/dist/compiler/aslrestype2.c vendor-sys/acpica/dist/compiler/aslstartup.c vendor-sys/acpica/dist/compiler/aslstubs.c vendor-sys/acpica/dist/compiler/asltransform.c vendor-sys/acpica/dist/compiler/asltree.c vendor-sys/acpica/dist/compiler/asltypes.h vendor-sys/acpica/dist/compiler/aslutils.c vendor-sys/acpica/dist/debugger/dbcmds.c vendor-sys/acpica/dist/debugger/dbdisply.c vendor-sys/acpica/dist/debugger/dbexec.c vendor-sys/acpica/dist/debugger/dbfileio.c vendor-sys/acpica/dist/debugger/dbhistry.c vendor-sys/acpica/dist/debugger/dbinput.c vendor-sys/acpica/dist/debugger/dbstats.c vendor-sys/acpica/dist/debugger/dbutils.c vendor-sys/acpica/dist/debugger/dbxface.c vendor-sys/acpica/dist/disassembler/dmbuffer.c vendor-sys/acpica/dist/disassembler/dmnames.c vendor-sys/acpica/dist/disassembler/dmobject.c vendor-sys/acpica/dist/disassembler/dmopcode.c vendor-sys/acpica/dist/disassembler/dmresrc.c vendor-sys/acpica/dist/disassembler/dmresrcl.c vendor-sys/acpica/dist/disassembler/dmresrcs.c vendor-sys/acpica/dist/disassembler/dmutils.c vendor-sys/acpica/dist/disassembler/dmwalk.c vendor-sys/acpica/dist/dispatcher/dsfield.c vendor-sys/acpica/dist/dispatcher/dsinit.c vendor-sys/acpica/dist/dispatcher/dsmethod.c vendor-sys/acpica/dist/dispatcher/dsmthdat.c vendor-sys/acpica/dist/dispatcher/dsobject.c vendor-sys/acpica/dist/dispatcher/dsopcode.c vendor-sys/acpica/dist/dispatcher/dsutils.c vendor-sys/acpica/dist/dispatcher/dswexec.c vendor-sys/acpica/dist/dispatcher/dswload.c vendor-sys/acpica/dist/dispatcher/dswscope.c vendor-sys/acpica/dist/dispatcher/dswstate.c vendor-sys/acpica/dist/events/evevent.c vendor-sys/acpica/dist/events/evgpe.c vendor-sys/acpica/dist/events/evgpeblk.c vendor-sys/acpica/dist/events/evmisc.c vendor-sys/acpica/dist/events/evregion.c vendor-sys/acpica/dist/events/evrgnini.c vendor-sys/acpica/dist/events/evsci.c vendor-sys/acpica/dist/events/evxface.c vendor-sys/acpica/dist/events/evxfevnt.c vendor-sys/acpica/dist/events/evxfregn.c vendor-sys/acpica/dist/executer/exconfig.c vendor-sys/acpica/dist/executer/exconvrt.c vendor-sys/acpica/dist/executer/excreate.c vendor-sys/acpica/dist/executer/exdump.c vendor-sys/acpica/dist/executer/exfield.c vendor-sys/acpica/dist/executer/exfldio.c vendor-sys/acpica/dist/executer/exmisc.c vendor-sys/acpica/dist/executer/exmutex.c vendor-sys/acpica/dist/executer/exnames.c vendor-sys/acpica/dist/executer/exoparg1.c vendor-sys/acpica/dist/executer/exoparg2.c vendor-sys/acpica/dist/executer/exoparg3.c vendor-sys/acpica/dist/executer/exoparg6.c vendor-sys/acpica/dist/executer/exprep.c vendor-sys/acpica/dist/executer/exregion.c vendor-sys/acpica/dist/executer/exresnte.c vendor-sys/acpica/dist/executer/exresolv.c vendor-sys/acpica/dist/executer/exresop.c vendor-sys/acpica/dist/executer/exstore.c vendor-sys/acpica/dist/executer/exstoren.c vendor-sys/acpica/dist/executer/exstorob.c vendor-sys/acpica/dist/executer/exsystem.c vendor-sys/acpica/dist/executer/exutils.c vendor-sys/acpica/dist/hardware/hwacpi.c vendor-sys/acpica/dist/hardware/hwgpe.c vendor-sys/acpica/dist/hardware/hwregs.c vendor-sys/acpica/dist/hardware/hwsleep.c vendor-sys/acpica/dist/hardware/hwtimer.c vendor-sys/acpica/dist/hardware/hwvalid.c vendor-sys/acpica/dist/hardware/hwxface.c vendor-sys/acpica/dist/include/acapps.h vendor-sys/acpica/dist/include/accommon.h vendor-sys/acpica/dist/include/acconfig.h vendor-sys/acpica/dist/include/acdebug.h vendor-sys/acpica/dist/include/acdisasm.h vendor-sys/acpica/dist/include/acdispat.h vendor-sys/acpica/dist/include/acevents.h vendor-sys/acpica/dist/include/acexcep.h vendor-sys/acpica/dist/include/acglobal.h vendor-sys/acpica/dist/include/achware.h vendor-sys/acpica/dist/include/acinterp.h vendor-sys/acpica/dist/include/aclocal.h vendor-sys/acpica/dist/include/acmacros.h vendor-sys/acpica/dist/include/acnames.h vendor-sys/acpica/dist/include/acnamesp.h vendor-sys/acpica/dist/include/acobject.h vendor-sys/acpica/dist/include/acopcode.h vendor-sys/acpica/dist/include/acoutput.h vendor-sys/acpica/dist/include/acparser.h vendor-sys/acpica/dist/include/acpi.h vendor-sys/acpica/dist/include/acpiosxf.h vendor-sys/acpica/dist/include/acpixf.h vendor-sys/acpica/dist/include/acpredef.h vendor-sys/acpica/dist/include/acresrc.h vendor-sys/acpica/dist/include/acrestyp.h vendor-sys/acpica/dist/include/acstruct.h vendor-sys/acpica/dist/include/actables.h vendor-sys/acpica/dist/include/actbl.h vendor-sys/acpica/dist/include/actbl1.h vendor-sys/acpica/dist/include/actbl2.h vendor-sys/acpica/dist/include/actypes.h vendor-sys/acpica/dist/include/acutils.h vendor-sys/acpica/dist/include/amlcode.h vendor-sys/acpica/dist/include/amlresrc.h vendor-sys/acpica/dist/include/platform/accygwin.h vendor-sys/acpica/dist/include/platform/acefi.h vendor-sys/acpica/dist/include/platform/acenv.h vendor-sys/acpica/dist/include/platform/acfreebsd.h vendor-sys/acpica/dist/include/platform/acgcc.h vendor-sys/acpica/dist/include/platform/acintel.h vendor-sys/acpica/dist/include/platform/aclinux.h vendor-sys/acpica/dist/include/platform/acmsvc.h vendor-sys/acpica/dist/include/platform/acnetbsd.h vendor-sys/acpica/dist/include/platform/acos2.h vendor-sys/acpica/dist/include/platform/acwin.h vendor-sys/acpica/dist/include/platform/acwin64.h vendor-sys/acpica/dist/namespace/nsaccess.c vendor-sys/acpica/dist/namespace/nsalloc.c vendor-sys/acpica/dist/namespace/nsdump.c vendor-sys/acpica/dist/namespace/nsdumpdv.c vendor-sys/acpica/dist/namespace/nseval.c vendor-sys/acpica/dist/namespace/nsinit.c vendor-sys/acpica/dist/namespace/nsload.c vendor-sys/acpica/dist/namespace/nsnames.c vendor-sys/acpica/dist/namespace/nsobject.c vendor-sys/acpica/dist/namespace/nsparse.c vendor-sys/acpica/dist/namespace/nspredef.c vendor-sys/acpica/dist/namespace/nsrepair.c vendor-sys/acpica/dist/namespace/nsrepair2.c vendor-sys/acpica/dist/namespace/nssearch.c vendor-sys/acpica/dist/namespace/nsutils.c vendor-sys/acpica/dist/namespace/nswalk.c vendor-sys/acpica/dist/namespace/nsxfeval.c vendor-sys/acpica/dist/namespace/nsxfname.c vendor-sys/acpica/dist/namespace/nsxfobj.c vendor-sys/acpica/dist/os_specific/service_layers/osunixdir.c vendor-sys/acpica/dist/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/os_specific/service_layers/oswindir.c vendor-sys/acpica/dist/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/osunixxf.c vendor-sys/acpica/dist/parser/psargs.c vendor-sys/acpica/dist/parser/psloop.c vendor-sys/acpica/dist/parser/psopcode.c vendor-sys/acpica/dist/parser/psparse.c vendor-sys/acpica/dist/parser/psscope.c vendor-sys/acpica/dist/parser/pstree.c vendor-sys/acpica/dist/parser/psutils.c vendor-sys/acpica/dist/parser/pswalk.c vendor-sys/acpica/dist/parser/psxface.c vendor-sys/acpica/dist/resources/rsaddr.c vendor-sys/acpica/dist/resources/rscalc.c vendor-sys/acpica/dist/resources/rscreate.c vendor-sys/acpica/dist/resources/rsdump.c vendor-sys/acpica/dist/resources/rsinfo.c vendor-sys/acpica/dist/resources/rsio.c vendor-sys/acpica/dist/resources/rsirq.c vendor-sys/acpica/dist/resources/rslist.c vendor-sys/acpica/dist/resources/rsmemory.c vendor-sys/acpica/dist/resources/rsmisc.c vendor-sys/acpica/dist/resources/rsutils.c vendor-sys/acpica/dist/resources/rsxface.c vendor-sys/acpica/dist/tables/tbfadt.c vendor-sys/acpica/dist/tables/tbfind.c vendor-sys/acpica/dist/tables/tbinstal.c vendor-sys/acpica/dist/tables/tbutils.c vendor-sys/acpica/dist/tables/tbxface.c vendor-sys/acpica/dist/tables/tbxfroot.c vendor-sys/acpica/dist/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/tools/acpiexec/aemain.c vendor-sys/acpica/dist/tools/acpiexec/aetables.c vendor-sys/acpica/dist/tools/acpiexec/osunixdir.c vendor-sys/acpica/dist/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/tools/acpisrc/ascase.c vendor-sys/acpica/dist/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/tools/acpisrc/asfile.c vendor-sys/acpica/dist/tools/acpisrc/asmain.c vendor-sys/acpica/dist/tools/acpisrc/asremove.c vendor-sys/acpica/dist/tools/acpisrc/astable.c vendor-sys/acpica/dist/tools/acpisrc/asutils.c vendor-sys/acpica/dist/tools/acpisrc/osunixdir.c vendor-sys/acpica/dist/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/tools/examples/examples.c vendor-sys/acpica/dist/utilities/utalloc.c vendor-sys/acpica/dist/utilities/utcache.c vendor-sys/acpica/dist/utilities/utclib.c vendor-sys/acpica/dist/utilities/utcopy.c vendor-sys/acpica/dist/utilities/utdebug.c vendor-sys/acpica/dist/utilities/utdelete.c vendor-sys/acpica/dist/utilities/uteval.c vendor-sys/acpica/dist/utilities/utglobal.c vendor-sys/acpica/dist/utilities/utids.c vendor-sys/acpica/dist/utilities/utinit.c vendor-sys/acpica/dist/utilities/utlock.c vendor-sys/acpica/dist/utilities/utmath.c vendor-sys/acpica/dist/utilities/utmisc.c vendor-sys/acpica/dist/utilities/utmutex.c vendor-sys/acpica/dist/utilities/utobject.c vendor-sys/acpica/dist/utilities/utresrc.c vendor-sys/acpica/dist/utilities/utstate.c vendor-sys/acpica/dist/utilities/uttrack.c vendor-sys/acpica/dist/utilities/utxface.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/changes.txt Thu Jan 21 20:56:18 2010 (r202766) @@ -1,7 +1,55 @@ ---------------------------------------- -14 December 2009. Summary of changes for version 20091214: +21 January 2010. Summary of changes for version 20100121: + +1) ACPI CA Core Subsystem: -This release is available at www.acpica.org/downloads +Added the 2010 copyright to all module headers and signons. This affects +virtually every file in the ACPICA core subsystem, the iASL compiler, the +tools/utilities, and the test suites. + +Implemented a change to the AcpiGetDevices interface to eliminate unnecessary +invocations of the _STA method. In the case where a specific _HID is +requested, do not run _STA until a _HID match is found. This eliminates +potentially dozens of _STA calls during a search for a particular device/HID, +which in turn can improve boot times. ACPICA BZ 828. Lin Ming. + +Implemented an additional repair for predefined method return values. Attempt +to repair unexpected NULL elements within returned Package objects. Create an +Integer of value zero, a NULL String, or a zero-length Buffer as appropriate. +ACPICA BZ 818. Lin Ming, Bob Moore. + +Removed the obsolete ACPI_INTEGER data type. This type was introduced as the +code was migrated from ACPI 1.0 (with 32-bit AML integers) to ACPI 2.0 (with +64-bit AML integers). It is now obsolete and this change removes it from the +ACPICA code base, replaced by UINT64. The original typedef has been retained +for now for compatibility with existing device driver code. ACPICA BZ 824. + +Removed the unused UINT32_STRUCT type, and the obsolete Integer64 field in +the parse tree object. + +Added additional warning options for the gcc-4 generation. Updated the source +accordingly. This includes some code restructuring to eliminate unreachable +code, elimination of some gotos, elimination of unused return values, some +additional casting, and removal of redundant declarations. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.0K Code, 18.0K Data, 105.0K Total + Debug Version: 163.4K Code, 50.8K Data, 214.2K Total + Current Release: + Non-Debug Version: 87.1K Code, 18.0K Data, 105.1K Total + Debug Version: 163.5K Code, 50.9K Data, 214.4K Total + +2) iASL Compiler/Disassembler and Tools: + +No functional changes for this release. + +---------------------------------------- +14 December 2009. Summary of changes for version 20091214: 1) ACPI CA Core Subsystem: @@ -68,8 +116,6 @@ depend on a specific initial value for a ---------------------------------------- 12 November 2009. Summary of changes for version 20091112: -This release is available at www.acpica.org/downloads - 1) ACPI CA Core Subsystem: Implemented a post-order callback to AcpiWalkNamespace. The existing @@ -141,8 +187,6 @@ level set very high. ---------------------------------------- 13 October 2009. Summary of changes for version 20091013: -This release is available at www.acpica.org/downloads - 1) ACPI CA Core Subsystem: Fixed a problem where an Operation Region _REG method could be executed more @@ -1037,9 +1081,6 @@ header. 29 July 2008. Summary of changes for version 20080729: -This release is available at http://acpica.org/downloads -Direct git access via http://www.acpica.org/repos/acpica.git - 1) ACPI CA Core Subsystem: Fix a possible deadlock in the GPE dispatch. Remove call to @@ -1129,9 +1170,6 @@ completion message. Previously, no messa ---------------------------------------- 01 July 2008. Summary of changes for version 20080701: -This release is available at http://acpica.org/downloads -Direct git access via http://www.acpica.org/repos/acpica.git - 0) Git source tree / acpica.org Fixed a problem where a git-clone from http would not transfer the entire Modified: vendor-sys/acpica/dist/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/common/adfile.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/common/adfile.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/common/adisasm.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/common/adisasm.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/common/adwalk.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/common/adwalk.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/common/dmextern.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/common/dmextern.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/common/dmrestag.c ============================================================================== --- vendor-sys/acpica/dist/common/dmrestag.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/common/dmrestag.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/common/dmtable.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/common/dmtable.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/common/dmtbdump.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/common/dmtbdump.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/common/dmtbinfo.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/common/dmtbinfo.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/common/getopt.c ============================================================================== --- vendor-sys/acpica/dist/common/getopt.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/common/getopt.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslanalyze.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslanalyze.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -667,8 +667,8 @@ AnCheckForReservedName ( { /* The next two characters must be hex digits */ - if ((isxdigit (Name[2])) && - (isxdigit (Name[3]))) + if ((isxdigit ((int) Name[2])) && + (isxdigit ((int) Name[3]))) { return (ACPI_EVENT_RESERVED_NAME); } @@ -1236,7 +1236,7 @@ AnMethodAnalysisWalkBegin ( */ for (i = 0; Next->Asl.Value.String[i]; i++) { - if (!isalnum (Next->Asl.Value.String[i])) + if (!isalnum ((int) Next->Asl.Value.String[i])) { AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING, Next, Next->Asl.Value.String); @@ -2157,7 +2157,7 @@ AnOtherSemanticAnalysisWalkBegin ( */ if (((ArgNode->Asl.ParseOpcode == PARSEOP_WORDCONST) || (ArgNode->Asl.ParseOpcode == PARSEOP_INTEGER)) && - (ArgNode->Asl.Value.Integer >= (ACPI_INTEGER) ACPI_WAIT_FOREVER)) + (ArgNode->Asl.Value.Integer >= (UINT64) ACPI_WAIT_FOREVER)) { break; } Modified: vendor-sys/acpica/dist/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcodegen.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslcodegen.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcompile.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslcompile.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcompiler.h Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslcompiler.h Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -511,7 +511,7 @@ TrCreateLeafNode ( ACPI_PARSE_OBJECT * TrCreateValuedLeafNode ( UINT32 ParseOpcode, - ACPI_INTEGER Value); + UINT64 Value); ACPI_PARSE_OBJECT * TrLinkChildren ( @@ -718,7 +718,7 @@ UtCheckIntegerRange ( UINT32 LowValue, UINT32 HighValue); -ACPI_INTEGER +UINT64 UtDoConstant ( char *String); Modified: vendor-sys/acpica/dist/compiler/aslcompiler.l ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcompiler.l Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslcompiler.l Thu Jan 21 20:56:18 2010 (r202766) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslcompiler.y ============================================================================== --- vendor-sys/acpica/dist/compiler/aslcompiler.y Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslcompiler.y Thu Jan 21 20:56:18 2010 (r202766) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -2388,7 +2388,7 @@ QWordConstExpr ConstExprTerm : PARSEOP_ZERO {$$ = TrCreateValuedLeafNode (PARSEOP_ZERO, 0);} | PARSEOP_ONE {$$ = TrCreateValuedLeafNode (PARSEOP_ONE, 1);} - | PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_INTEGER_MAX);} + | PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_UINT64_MAX);} ; /* OptionalCount must appear before ByteList or an incorrect reduction will result */ Modified: vendor-sys/acpica/dist/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/compiler/asldefine.h Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/asldefine.h Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -127,7 +127,7 @@ #define IntelAcpiCA "Intel ACPI Component Architecture" #define CompilerId "ASL Optimizing Compiler" #define DisassemblerId "AML Disassembler" -#define CompilerCopyright "Copyright (C) 2000 - 2009 Intel Corporation" +#define CompilerCopyright "Copyright (c) 2000 - 2010 Intel Corporation" #define CompilerCompliance "Supports ACPI Specification Revision 4.0" #define CompilerName "iasl" #define CompilerCreatorId "INTL" Modified: vendor-sys/acpica/dist/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslerror.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslerror.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -169,13 +169,7 @@ AeAddToErrorLog ( ASL_ERROR_MSG *Prev; - if (!Gbl_ErrorLog) - { - Gbl_ErrorLog = Enode; - return; - } - - /* List is sorted according to line number */ + /* If Gbl_ErrorLog is null, this is the first error node */ if (!Gbl_ErrorLog) { @@ -183,8 +177,10 @@ AeAddToErrorLog ( return; } - /* Walk error list until we find a line number greater than ours */ - + /* + * Walk error list until we find a line number greater than ours. + * List is sorted according to line number. + */ Prev = NULL; Next = Gbl_ErrorLog; Modified: vendor-sys/acpica/dist/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslfiles.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslfiles.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslfold.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslfold.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslfold.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/compiler/aslglobal.h Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslglobal.h Thu Jan 21 20:56:18 2010 (r202766) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -165,7 +165,6 @@ ASL_EXTERN char ASL_ ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_ErrorLog,NULL); ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_NextError,NULL); -extern UINT32 Gbl_ExceptionCount[]; /* Option flags */ @@ -278,5 +277,12 @@ ASL_EXTERN char MsgB ASL_EXTERN char StringBuffer[ASL_MSG_BUFFER_SIZE]; ASL_EXTERN char StringBuffer2[ASL_MSG_BUFFER_SIZE]; + +#ifdef _DECLARE_GLOBALS +UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS] = {0,0,0,0,0,0}; +#else +extern UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS]; +#endif + #endif /* __ASLGLOBAL_H */ Modified: vendor-sys/acpica/dist/compiler/asllength.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asllength.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/asllength.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/asllisting.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asllisting.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/asllisting.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslload.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslload.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -534,7 +534,7 @@ LdNamespace1Begin ( if (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC) { Status = LdLoadResourceElements (Op, WalkState); - goto Exit; + return_ACPI_STATUS (Status); } ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); @@ -578,7 +578,7 @@ LdNamespace1Begin ( AslCoreSubsystemError (Op, Status, "Failure from namespace lookup", FALSE); - goto Exit; + return_ACPI_STATUS (Status); } /* We found a node with this name, now check the type */ @@ -713,15 +713,14 @@ LdNamespace1Begin ( AslError (ASL_ERROR, ASL_MSG_NAME_EXISTS, Op, Op->Asl.ExternalName); - Status = AE_OK; - goto Exit; + return_ACPI_STATUS (AE_OK); } } else { AslCoreSubsystemError (Op, Status, "Failure from namespace lookup", FALSE); - goto Exit; + return_ACPI_STATUS (Status); } } @@ -759,8 +758,7 @@ FinishNode: Node->Value = (UINT32) Op->Asl.Extra; } -Exit: - return (Status); + return_ACPI_STATUS (Status); } Modified: vendor-sys/acpica/dist/compiler/asllookup.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asllookup.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/asllookup.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslmain.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslmain.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -165,9 +165,6 @@ static int AslDoResponseFile ( char *Filename); -extern int AcpiGbl_Opterr; -extern int AcpiGbl_Optind; - #define ASL_TOKEN_SEPARATORS " \t\n" #define ASL_SUPPORTED_OPTIONS "@:2b:cd^e:fgh^i^I:l^o:p:r:s:t:v:w:x:" Modified: vendor-sys/acpica/dist/compiler/aslmap.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslmap.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslmap.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslopcodes.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslopcodes.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslopcodes.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -328,7 +328,7 @@ OpcSetOptimalIntegerSize ( } break; - case ACPI_INTEGER_MAX: + case ACPI_UINT64_MAX: /* Check for table integer width (32 or 64) */ @@ -568,7 +568,7 @@ OpcDoEisaId ( if (i < 3) { - if (!isupper (InString[i])) + if (!isupper ((int) InString[i])) { Status = AE_BAD_PARAMETER; } @@ -576,7 +576,7 @@ OpcDoEisaId ( /* Last 4 characters must be hex digits */ - else if (!isxdigit (InString[i])) + else if (!isxdigit ((int) InString[i])) { Status = AE_BAD_PARAMETER; } @@ -666,7 +666,7 @@ OpcDoUuId ( } else { - if (!isxdigit (InString[i])) + if (!isxdigit ((int) InString[i])) { Status = AE_BAD_PARAMETER; } Modified: vendor-sys/acpica/dist/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asloperands.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/asloperands.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -604,7 +604,7 @@ OpnDoRegion ( } else { - Op->Asl.Value.Integer = ACPI_INTEGER_MAX; + Op->Asl.Value.Integer = ACPI_UINT64_MAX; } } @@ -1007,7 +1007,7 @@ OpnDoDefinitionBlock ( for (i = 0; i < 4; i++) { - if (!isalnum (Gbl_TableSignature[i])) + if (!isalnum ((int) Gbl_TableSignature[i])) { AslError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, Child, "Contains non-alphanumeric characters"); Modified: vendor-sys/acpica/dist/compiler/aslopt.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslopt.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslopt.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslresource.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslresource.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslresource.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -184,7 +184,7 @@ RsCreateBitField ( { Op->Asl.ExternalName = Name; - Op->Asl.Value.Integer = ((ACPI_INTEGER) ByteOffset * 8) + BitOffset; + Op->Asl.Value.Integer = ((UINT64) ByteOffset * 8) + BitOffset; Op->Asl.CompileFlags |= (NODE_IS_RESOURCE_FIELD | NODE_IS_BIT_OFFSET); } Modified: vendor-sys/acpica/dist/compiler/aslrestype1.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslrestype1.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslrestype1.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslrestype2.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslrestype2.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslrestype2.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslstartup.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslstartup.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslstartup.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/aslstubs.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslstubs.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslstubs.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/compiler/asltransform.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asltransform.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/asltransform.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -554,7 +554,7 @@ TrDoSwitch ( NewOp = NewOp2; NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp->Asl.Next = NewOp2; TrAmlInitLineNumbers (NewOp2, Predicate); @@ -612,7 +612,7 @@ TrDoSwitch ( * CaseOp->Child->Peer is the beginning of the case block */ NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp->Asl.Next = Predicate; TrAmlInitLineNumbers (NewOp, Predicate); @@ -761,7 +761,7 @@ TrDoSwitch ( /* Create the NameSeg child for the Name node */ NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESEG, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp2->Asl.CompileFlags |= NODE_IS_NAME_DECLARATION; NewOp->Asl.Child = NewOp2; @@ -771,22 +771,22 @@ TrDoSwitch ( { case ACPI_BTYPE_INTEGER: NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO, - (ACPI_INTEGER) 0); + (UINT64) 0); break; case ACPI_BTYPE_STRING: NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, - (ACPI_INTEGER) ACPI_TO_INTEGER ("")); + (UINT64) ACPI_TO_INTEGER ("")); break; case ACPI_BTYPE_BUFFER: (void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER, - (ACPI_INTEGER) 0)); + (UINT64) 0)); Next = NewOp2->Asl.Next; (void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO, - (ACPI_INTEGER) 1)); + (UINT64) 1)); (void) TrLinkPeerNode (Next->Asl.Child, - TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (ACPI_INTEGER) 0)); + TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0)); TrAmlSetSubtreeParent (Next->Asl.Child, Next); break; @@ -821,7 +821,7 @@ TrDoSwitch ( Predicate->Asl.Parent = StoreOp; NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp->Asl.Parent = StoreOp; Predicate->Asl.Next = NewOp; Modified: vendor-sys/acpica/dist/compiler/asltree.c ============================================================================== --- vendor-sys/acpica/dist/compiler/asltree.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/asltree.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -490,7 +490,7 @@ TrCreateLeafNode ( ACPI_PARSE_OBJECT * TrCreateValuedLeafNode ( UINT32 ParseOpcode, - ACPI_INTEGER Value) + UINT64 Value) { ACPI_PARSE_OBJECT *Op; Modified: vendor-sys/acpica/dist/compiler/asltypes.h ============================================================================== --- vendor-sys/acpica/dist/compiler/asltypes.h Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/asltypes.h Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -571,11 +571,6 @@ char *AslErrorLevel [ #define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings above */ -/* Exception counters */ - -UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS] = {0,0,0,0,0,0}; - -#endif - +#endif /* ASL_EXCEPTIONS */ #endif /* __ASLTYPES_H */ Modified: vendor-sys/acpica/dist/compiler/aslutils.c ============================================================================== --- vendor-sys/acpica/dist/compiler/aslutils.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/compiler/aslutils.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -142,7 +142,7 @@ static ACPI_STATUS UtStrtoul64 ( char *String, UINT32 Base, - ACPI_INTEGER *RetInteger); + UINT64 *RetInteger); static void UtPadNameWithUnderscores ( @@ -846,12 +846,12 @@ UtAttachNamepathToOwner ( * ******************************************************************************/ -ACPI_INTEGER +UINT64 UtDoConstant ( char *String) { ACPI_STATUS Status; - ACPI_INTEGER Converted; + UINT64 Converted; char ErrBuf[64]; @@ -888,11 +888,11 @@ static ACPI_STATUS UtStrtoul64 ( char *String, UINT32 Base, - ACPI_INTEGER *RetInteger) + UINT64 *RetInteger) { UINT32 Index; UINT32 Sign; - ACPI_INTEGER ReturnValue = 0; + UINT64 ReturnValue = 0; ACPI_STATUS Status = AE_OK; @@ -916,7 +916,7 @@ UtStrtoul64 ( /* Skip over any white space in the buffer: */ - while (isspace (*String) || *String == '\t') + while (isspace ((int) *String) || *String == '\t') { ++String; } @@ -948,7 +948,7 @@ UtStrtoul64 ( { if (*String == '0') { - if (tolower (*(++String)) == 'x') + if (tolower ((int) *(++String)) == 'x') { Base = 16; ++String; @@ -975,7 +975,7 @@ UtStrtoul64 ( if (Base == 16 && *String == '0' && - tolower (*(++String)) == 'x') + tolower ((int) *(++String)) == 'x') { String++; } @@ -984,14 +984,14 @@ UtStrtoul64 ( while (*String) { - if (isdigit (*String)) + if (isdigit ((int) *String)) { Index = ((UINT8) *String) - '0'; } else { - Index = (UINT8) toupper (*String); - if (isupper ((char) Index)) + Index = (UINT8) toupper ((int) *String); + if (isupper ((int) Index)) { Index = Index - 'A' + 10; } @@ -1008,8 +1008,8 @@ UtStrtoul64 ( /* Check to see if value is out of range: */ - if (ReturnValue > ((ACPI_INTEGER_MAX - (ACPI_INTEGER) Index) / - (ACPI_INTEGER) Base)) + if (ReturnValue > ((ACPI_UINT64_MAX - (UINT64) Index) / + (UINT64) Base)) { goto ErrorExit; } Modified: vendor-sys/acpica/dist/debugger/dbcmds.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbcmds.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/debugger/dbcmds.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/debugger/dbdisply.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbdisply.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/debugger/dbdisply.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/debugger/dbexec.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbexec.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/debugger/dbexec.c Thu Jan 21 20:56:18 2010 (r202766) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -243,7 +243,7 @@ AcpiDbExecuteMethod ( default: Params[i].Type = ACPI_TYPE_INTEGER; - Params[i].Integer.Value = i * (ACPI_INTEGER) 0x1000; + Params[i].Integer.Value = i * (UINT64) 0x1000; break; } } @@ -484,7 +484,7 @@ AcpiDbExecute ( * Allow any handlers in separate threads to complete. * (Such as Notify handlers invoked from AML executed above). */ - AcpiOsSleep ((ACPI_INTEGER) 10); + AcpiOsSleep ((UINT64) 10); #ifdef ACPI_DEBUG_OUTPUT Modified: vendor-sys/acpica/dist/debugger/dbfileio.c ============================================================================== --- vendor-sys/acpica/dist/debugger/dbfileio.c Thu Jan 21 19:17:42 2010 (r202765) +++ vendor-sys/acpica/dist/debugger/dbfileio.c Thu Jan 21 20:56:18 2010 (r202766) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -150,9 +150,6 @@ AcpiDbCheckTextModeCorruption ( UINT32 TableLength, UINT32 FileLength); -static ACPI_STATUS -AeLocalLoadTable ( - ACPI_TABLE_HEADER *TablePtr); #endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 20:57:25 2010 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 A0D0E10656A7; Thu, 21 Jan 2010 20:57:25 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E4838FC1E; Thu, 21 Jan 2010 20:57:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LKvP7w043261; Thu, 21 Jan 2010 20:57:25 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LKvPkD043256; Thu, 21 Jan 2010 20:57:25 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001212057.o0LKvPkD043256@svn.freebsd.org> From: Rick Macklem Date: Thu, 21 Jan 2010 20:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202767 - head/sys/nfsclient 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: Thu, 21 Jan 2010 20:57:25 -0000 Author: rmacklem Date: Thu Jan 21 20:57:25 2010 New Revision: 202767 URL: http://svn.freebsd.org/changeset/base/202767 Log: Add a timeout for the negative name cache entries in the NFS client. This avoids a bogus negative name cache entry from persisting forever when another client creates an entry with the same name within the same NFS server time of day clock tick. The mount option negnametimeo can be used to override the default timeout interval on a per-mount-point basis. Setting negnametimeo to 0 disables negative name caching for the mount point. I also fixed one obvious typo where args.timeo should be args.maxgrouplist. Submitted by: jhb (earlier version) Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/nfsclient/nfs_vfsops.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsclient/nfsmount.h head/sys/nfsclient/nfsnode.h Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Thu Jan 21 20:56:18 2010 (r202766) +++ head/sys/nfsclient/nfs_vfsops.c Thu Jan 21 20:57:25 2010 (r202767) @@ -114,7 +114,7 @@ static void nfs_decode_args(struct mount struct nfs_args *argp, const char *hostname); static int mountnfs(struct nfs_args *, struct mount *, struct sockaddr *, char *, struct vnode **, - struct ucred *cred); + struct ucred *cred, int); static vfs_mount_t nfs_mount; static vfs_cmount_t nfs_cmount; static vfs_unmount_t nfs_unmount; @@ -551,7 +551,7 @@ nfs_mountdiskless(char *path, nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK); if ((error = mountnfs(args, mp, nam, path, vpp, - td->td_ucred)) != 0) { + td->td_ucred, NFS_DEFAULT_NEGNAMETIMEO)) != 0) { printf("nfs_mountroot: mount %s on /: %d\n", path, error); return (error); } @@ -778,7 +778,7 @@ static const char *nfs_opts[] = { "from" "readdirsize", "soft", "hard", "mntudp", "tcp", "udp", "wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", - "maxgroups", "principal", + "maxgroups", "principal", "negnametimeo", NULL }; /* @@ -827,6 +827,7 @@ nfs_mount(struct mount *mp) size_t len; u_char nfh[NFSX_V3FHMAX]; char *opt; + int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO; has_nfs_args_opt = 0; has_addr_opt = 0; @@ -1029,7 +1030,7 @@ nfs_mount(struct mount *mp) } if (vfs_getopt(mp->mnt_optnew, "maxgroups", (void **)&opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.maxgrouplist); - if (ret != 1 || args.timeo <= 0) { + if (ret != 1 || args.maxgrouplist <= 0) { vfs_mount_error(mp, "illegal maxgroups: %s", opt); error = EINVAL; @@ -1037,6 +1038,16 @@ nfs_mount(struct mount *mp) } args.flags |= NFSMNT_MAXGRPS; } + if (vfs_getopt(mp->mnt_optnew, "negnametimeo", (void **)&opt, NULL) + == 0) { + ret = sscanf(opt, "%d", &negnametimeo); + if (ret != 1 || negnametimeo < 0) { + vfs_mount_error(mp, "illegal negnametimeo: %s", + opt); + error = EINVAL; + goto out; + } + } if (vfs_getopt(mp->mnt_optnew, "addr", (void **)&args.addr, &args.addrlen) == 0) { has_addr_opt = 1; @@ -1125,7 +1136,7 @@ nfs_mount(struct mount *mp) } } error = mountnfs(&args, mp, nam, args.hostname, &vp, - curthread->td_ucred); + curthread->td_ucred, negnametimeo); out: if (!error) { MNT_ILOCK(mp); @@ -1167,7 +1178,7 @@ nfs_cmount(struct mntarg *ma, void *data */ static int mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, - char *hst, struct vnode **vpp, struct ucred *cred) + char *hst, struct vnode **vpp, struct ucred *cred, int negnametimeo) { struct nfsmount *nmp; struct nfsnode *np; @@ -1217,6 +1228,7 @@ mountnfs(struct nfs_args *argp, struct m nmp->nm_numgrps = NFS_MAXGRPS; nmp->nm_readahead = NFS_DEFRAHEAD; nmp->nm_deadthresh = NFS_MAXDEADTHRESH; + nmp->nm_negnametimeo = negnametimeo; nmp->nm_tprintf_delay = nfs_tprintf_delay; if (nmp->nm_tprintf_delay < 0) nmp->nm_tprintf_delay = 0; Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Thu Jan 21 20:56:18 2010 (r202766) +++ head/sys/nfsclient/nfs_vnops.c Thu Jan 21 20:57:25 2010 (r202767) @@ -982,8 +982,13 @@ nfs_lookup(struct vop_lookup_args *ap) * modification time of the parent directory matches * our cached copy. Otherwise, we discard all of the * negative cache entries for this directory. + * negative cache entries for this directory. We also + * only trust -ve cache entries for less than + * nm_negative_namecache_timeout seconds. */ - if (VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && + if ((u_int)(ticks - np->n_dmtime_ticks) < + (nmp->nm_negnametimeo * hz) && + VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && vattr.va_mtime.tv_sec == np->n_dmtime) { nfsstats.lookupcache_hits++; return (ENOENT); @@ -1157,8 +1162,10 @@ nfsmout: */ mtx_lock(&np->n_mtx); if (np->n_dmtime <= dmtime) { - if (np->n_dmtime == 0) + if (np->n_dmtime == 0) { np->n_dmtime = dmtime; + np->n_dmtime_ticks = ticks; + } mtx_unlock(&np->n_mtx); cache_enter(dvp, NULL, cnp); } else Modified: head/sys/nfsclient/nfsmount.h ============================================================================== --- head/sys/nfsclient/nfsmount.h Thu Jan 21 20:56:18 2010 (r202766) +++ head/sys/nfsclient/nfsmount.h Thu Jan 21 20:57:25 2010 (r202767) @@ -85,6 +85,7 @@ struct nfsmount { struct rpc_timers nm_timers[NFS_MAX_TIMER]; /* RTT Timers for rpcs */ char nm_principal[MNAMELEN]; /* GSS-API principal of server */ gss_OID nm_mech_oid; /* OID of selected GSS-API mechanism */ + int nm_negnametimeo; /* timeout for -ve entries (sec) */ /* NFSv4 */ uint64_t nm_clientid; @@ -107,6 +108,10 @@ struct nfsmount { #define NFS_TPRINTF_DELAY 30 #endif +#ifndef NFS_DEFAULT_NEGNAMETIMEO +#define NFS_DEFAULT_NEGNAMETIMEO 60 +#endif + #define NFS_PCATCH (PCATCH | PBDRY) #endif Modified: head/sys/nfsclient/nfsnode.h ============================================================================== --- head/sys/nfsclient/nfsnode.h Thu Jan 21 20:56:18 2010 (r202766) +++ head/sys/nfsclient/nfsnode.h Thu Jan 21 20:57:25 2010 (r202767) @@ -114,6 +114,7 @@ struct nfsnode { struct timespec n_mtime; /* Prev modify time. */ time_t n_ctime; /* Prev create time. */ time_t n_dmtime; /* Prev dir modify time. */ + int n_dmtime_ticks; /* Tick of -ve cache entry */ time_t n_expiry; /* Lease expiry time */ nfsfh_t *n_fhp; /* NFS File Handle */ struct vnode *n_vnode; /* associated vnode */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 20:57:43 2010 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 A40F4106568B; Thu, 21 Jan 2010 20:57:43 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 791AD8FC24; Thu, 21 Jan 2010 20:57:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LKvhLY043367; Thu, 21 Jan 2010 20:57:43 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LKvhgI043366; Thu, 21 Jan 2010 20:57:43 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201001212057.o0LKvhgI043366@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 21 Jan 2010 20:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202768 - vendor-sys/acpica/20100121 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: Thu, 21 Jan 2010 20:57:43 -0000 Author: jkim Date: Thu Jan 21 20:57:43 2010 New Revision: 202768 URL: http://svn.freebsd.org/changeset/base/202768 Log: Tag ACPICA 20100121. Added: vendor-sys/acpica/20100121/ - copied from r202767, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 21:04:30 2010 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 015A51065676; Thu, 21 Jan 2010 21:04: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 E348A8FC22; Thu, 21 Jan 2010 21:04:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LL4TIA045046; Thu, 21 Jan 2010 21:04:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LL4Tfk045044; Thu, 21 Jan 2010 21:04:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001212104.o0LL4Tfk045044@svn.freebsd.org> From: John Baldwin Date: Thu, 21 Jan 2010 21:04:29 +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: r202769 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Thu, 21 Jan 2010 21:04:30 -0000 Author: jhb Date: Thu Jan 21 21:04:29 2010 New Revision: 202769 URL: http://svn.freebsd.org/changeset/base/202769 Log: Revert part of the previous change that partially reverted an earlier MFC of 199156. Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Jan 21 20:57:43 2010 (r202768) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Jan 21 21:04:29 2010 (r202769) @@ -1520,7 +1520,6 @@ zfs_create_fs(objset_t *os, cred_t *cr, vnode.v_type = VDIR; vnode.v_data = rootzp; rootzp->z_vnode = &vnode; - VN_LOCK_ASHARE(vp); bzero(&zfsvfs, sizeof (zfsvfs_t)); From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 21:12:37 2010 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 1D3D7106568B; Thu, 21 Jan 2010 21:12:37 +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 09F1F8FC16; Thu, 21 Jan 2010 21:12:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLCavc046985; Thu, 21 Jan 2010 21:12:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LLCaud046982; Thu, 21 Jan 2010 21:12:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001212112.o0LLCaud046982@svn.freebsd.org> From: Christian Brueffer Date: Thu, 21 Jan 2010 21:12:36 +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: r202770 - stable/7/share/man/man4 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: Thu, 21 Jan 2010 21:12:37 -0000 Author: brueffer Date: Thu Jan 21 21:12:36 2010 New Revision: 202770 URL: http://svn.freebsd.org/changeset/base/202770 Log: MFC: r189773 by rpaulo Rename the k8temp(4) man page to amdtemp(4) and update its contents for the new families. PR: 142925 Submitted by: Tsurutani Naoki Added: stable/7/share/man/man4/amdtemp.4 - copied unchanged from r189773, head/share/man/man4/amdtemp.4 Deleted: stable/7/share/man/man4/k8temp.4 Modified: stable/7/share/man/man4/Makefile Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Thu Jan 21 21:04:29 2010 (r202769) +++ stable/7/share/man/man4/Makefile Thu Jan 21 21:12:36 2010 (r202770) @@ -20,6 +20,7 @@ MAN= aac.4 \ ale.4 \ altq.4 \ amd.4 \ + ${_amdtemp.4} \ ${_amdsmb.4} \ amr.4 \ an.4 \ @@ -146,7 +147,6 @@ MAN= aac.4 \ ixgb.4 \ jme.4 \ joy.4 \ - ${_k8temp.4} \ kbdmux.4 \ keyboard.4 \ kld.4 \ @@ -561,6 +561,7 @@ MLINKS+=xl.4 if_xl.4 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" _acpi_dock.4= acpi_dock.4 _amdsmb.4= amdsmb.4 +_amdtemp.4= amdtemp.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _hptiop.4= hptiop.4 @@ -572,7 +573,6 @@ _if_nve.4= if_nve.4 _if_nxge.4= if_nxge.4 _if_wpi.4= if_wpi.4 _ipmi.4= ipmi.4 -_k8temp.4= k8temp.4 _lindev.4= lindev.4 _nfe.4= nfe.4 _nfsmb.4= nfsmb.4 Copied: stable/7/share/man/man4/amdtemp.4 (from r189773, head/share/man/man4/amdtemp.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man4/amdtemp.4 Thu Jan 21 21:12:36 2010 (r202770, copy of r189773, head/share/man/man4/amdtemp.4) @@ -0,0 +1,80 @@ +.\"- +.\" Copyright (c) 2008 Rui Paulo +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 8, 2008 +.Dt AMDTEMP 4 +.Os +.Sh NAME +.Nm amdtemp +.Nd device driver for AMD K8, K10 and K11 on-die digital thermal sensor +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device amdtemp" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +amdtemp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the on-die digital thermal sensor present +in AMD K8, K10 and K11 processors. +.Pp +For the K8 family, the +.Nm +driver reports each cores' temperature through a sysctl node in the +corresponding CPU devices's sysctl tree, named +.Va dev.amdtemp.%d.sensor{0,1}.core{0,1} . +The driver also creates +.Va dev.cpu.%d.temperature +displaying the maximum temperature of the two sensors +located in each CPU core. +.Pp +For the K10 and K11 families, the driver creates +.Va dev.cpu.%d.temperature +with the temperature of each core. +.Sh BUGS +AMD K9 is not supported because temperature reporting has been replaced +by Maltese. +.Sh SEE ALSO +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 7.1 . +.Sh AUTHORS +.An +.An Rui Paulo Aq rpaulo@FreeBSD.org +.An Norikatsu Shigemura Aq nork@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 21:14:29 2010 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 CCA941065696; Thu, 21 Jan 2010 21:14:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6A378FC14; Thu, 21 Jan 2010 21:14:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLETu0047473; Thu, 21 Jan 2010 21:14:29 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LLETxG047428; Thu, 21 Jan 2010 21:14:29 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201001212114.o0LLETxG047428@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 21 Jan 2010 21:14:29 +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: r202771 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/disassembler sys/contrib/d... 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: Thu, 21 Jan 2010 21:14:29 -0000 Author: jkim Date: Thu Jan 21 21:14:28 2010 New Revision: 202771 URL: http://svn.freebsd.org/changeset/base/202771 Log: Merge ACPICA 20100121. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/common/getopt.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcompiler.y head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslfold.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/asllength.c head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/asllookup.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslrestype2.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/debugger/dbcmds.c head/sys/contrib/dev/acpica/debugger/dbdisply.c head/sys/contrib/dev/acpica/debugger/dbexec.c head/sys/contrib/dev/acpica/debugger/dbfileio.c head/sys/contrib/dev/acpica/debugger/dbhistry.c head/sys/contrib/dev/acpica/debugger/dbinput.c head/sys/contrib/dev/acpica/debugger/dbstats.c head/sys/contrib/dev/acpica/debugger/dbutils.c head/sys/contrib/dev/acpica/debugger/dbxface.c head/sys/contrib/dev/acpica/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/disassembler/dmnames.c head/sys/contrib/dev/acpica/disassembler/dmobject.c head/sys/contrib/dev/acpica/disassembler/dmopcode.c head/sys/contrib/dev/acpica/disassembler/dmresrc.c head/sys/contrib/dev/acpica/disassembler/dmresrcl.c head/sys/contrib/dev/acpica/disassembler/dmresrcs.c head/sys/contrib/dev/acpica/disassembler/dmutils.c head/sys/contrib/dev/acpica/disassembler/dmwalk.c head/sys/contrib/dev/acpica/dispatcher/dsfield.c head/sys/contrib/dev/acpica/dispatcher/dsinit.c head/sys/contrib/dev/acpica/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c head/sys/contrib/dev/acpica/dispatcher/dsobject.c head/sys/contrib/dev/acpica/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/dispatcher/dsutils.c head/sys/contrib/dev/acpica/dispatcher/dswexec.c head/sys/contrib/dev/acpica/dispatcher/dswload.c head/sys/contrib/dev/acpica/dispatcher/dswscope.c head/sys/contrib/dev/acpica/dispatcher/dswstate.c head/sys/contrib/dev/acpica/events/evevent.c head/sys/contrib/dev/acpica/events/evgpe.c head/sys/contrib/dev/acpica/events/evgpeblk.c head/sys/contrib/dev/acpica/events/evmisc.c head/sys/contrib/dev/acpica/events/evregion.c head/sys/contrib/dev/acpica/events/evrgnini.c head/sys/contrib/dev/acpica/events/evsci.c head/sys/contrib/dev/acpica/events/evxface.c head/sys/contrib/dev/acpica/events/evxfevnt.c head/sys/contrib/dev/acpica/events/evxfregn.c head/sys/contrib/dev/acpica/executer/exconfig.c head/sys/contrib/dev/acpica/executer/exconvrt.c head/sys/contrib/dev/acpica/executer/excreate.c head/sys/contrib/dev/acpica/executer/exdump.c head/sys/contrib/dev/acpica/executer/exfield.c head/sys/contrib/dev/acpica/executer/exfldio.c head/sys/contrib/dev/acpica/executer/exmisc.c head/sys/contrib/dev/acpica/executer/exmutex.c head/sys/contrib/dev/acpica/executer/exnames.c head/sys/contrib/dev/acpica/executer/exoparg1.c head/sys/contrib/dev/acpica/executer/exoparg2.c head/sys/contrib/dev/acpica/executer/exoparg3.c head/sys/contrib/dev/acpica/executer/exoparg6.c head/sys/contrib/dev/acpica/executer/exprep.c head/sys/contrib/dev/acpica/executer/exregion.c head/sys/contrib/dev/acpica/executer/exresnte.c head/sys/contrib/dev/acpica/executer/exresolv.c head/sys/contrib/dev/acpica/executer/exresop.c head/sys/contrib/dev/acpica/executer/exstore.c head/sys/contrib/dev/acpica/executer/exstoren.c head/sys/contrib/dev/acpica/executer/exstorob.c head/sys/contrib/dev/acpica/executer/exsystem.c head/sys/contrib/dev/acpica/executer/exutils.c head/sys/contrib/dev/acpica/hardware/hwacpi.c head/sys/contrib/dev/acpica/hardware/hwgpe.c head/sys/contrib/dev/acpica/hardware/hwregs.c head/sys/contrib/dev/acpica/hardware/hwsleep.c head/sys/contrib/dev/acpica/hardware/hwtimer.c head/sys/contrib/dev/acpica/hardware/hwvalid.c head/sys/contrib/dev/acpica/hardware/hwxface.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/accommon.h head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acdispat.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/achware.h head/sys/contrib/dev/acpica/include/acinterp.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acnames.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acparser.h head/sys/contrib/dev/acpica/include/acpi.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/amlresrc.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/namespace/nsaccess.c head/sys/contrib/dev/acpica/namespace/nsalloc.c head/sys/contrib/dev/acpica/namespace/nsdump.c head/sys/contrib/dev/acpica/namespace/nsdumpdv.c head/sys/contrib/dev/acpica/namespace/nseval.c head/sys/contrib/dev/acpica/namespace/nsinit.c head/sys/contrib/dev/acpica/namespace/nsload.c head/sys/contrib/dev/acpica/namespace/nsnames.c head/sys/contrib/dev/acpica/namespace/nsobject.c head/sys/contrib/dev/acpica/namespace/nsparse.c head/sys/contrib/dev/acpica/namespace/nspredef.c head/sys/contrib/dev/acpica/namespace/nsrepair.c head/sys/contrib/dev/acpica/namespace/nsrepair2.c head/sys/contrib/dev/acpica/namespace/nssearch.c head/sys/contrib/dev/acpica/namespace/nsutils.c head/sys/contrib/dev/acpica/namespace/nswalk.c head/sys/contrib/dev/acpica/namespace/nsxfeval.c head/sys/contrib/dev/acpica/namespace/nsxfname.c head/sys/contrib/dev/acpica/namespace/nsxfobj.c head/sys/contrib/dev/acpica/osunixxf.c head/sys/contrib/dev/acpica/parser/psargs.c head/sys/contrib/dev/acpica/parser/psloop.c head/sys/contrib/dev/acpica/parser/psopcode.c head/sys/contrib/dev/acpica/parser/psparse.c head/sys/contrib/dev/acpica/parser/psscope.c head/sys/contrib/dev/acpica/parser/pstree.c head/sys/contrib/dev/acpica/parser/psutils.c head/sys/contrib/dev/acpica/parser/pswalk.c head/sys/contrib/dev/acpica/parser/psxface.c head/sys/contrib/dev/acpica/resources/rsaddr.c head/sys/contrib/dev/acpica/resources/rscalc.c head/sys/contrib/dev/acpica/resources/rscreate.c head/sys/contrib/dev/acpica/resources/rsdump.c head/sys/contrib/dev/acpica/resources/rsinfo.c head/sys/contrib/dev/acpica/resources/rsio.c head/sys/contrib/dev/acpica/resources/rsirq.c head/sys/contrib/dev/acpica/resources/rslist.c head/sys/contrib/dev/acpica/resources/rsmemory.c head/sys/contrib/dev/acpica/resources/rsmisc.c head/sys/contrib/dev/acpica/resources/rsutils.c head/sys/contrib/dev/acpica/resources/rsxface.c head/sys/contrib/dev/acpica/tables/tbfadt.c head/sys/contrib/dev/acpica/tables/tbfind.c head/sys/contrib/dev/acpica/tables/tbinstal.c head/sys/contrib/dev/acpica/tables/tbutils.c head/sys/contrib/dev/acpica/tables/tbxface.c head/sys/contrib/dev/acpica/tables/tbxfroot.c head/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h head/sys/contrib/dev/acpica/utilities/utalloc.c head/sys/contrib/dev/acpica/utilities/utcache.c head/sys/contrib/dev/acpica/utilities/utcopy.c head/sys/contrib/dev/acpica/utilities/utdebug.c head/sys/contrib/dev/acpica/utilities/utdelete.c head/sys/contrib/dev/acpica/utilities/uteval.c head/sys/contrib/dev/acpica/utilities/utglobal.c head/sys/contrib/dev/acpica/utilities/utids.c head/sys/contrib/dev/acpica/utilities/utinit.c head/sys/contrib/dev/acpica/utilities/utlock.c head/sys/contrib/dev/acpica/utilities/utmath.c head/sys/contrib/dev/acpica/utilities/utmisc.c head/sys/contrib/dev/acpica/utilities/utmutex.c head/sys/contrib/dev/acpica/utilities/utobject.c head/sys/contrib/dev/acpica/utilities/utresrc.c head/sys/contrib/dev/acpica/utilities/utstate.c head/sys/contrib/dev/acpica/utilities/uttrack.c head/sys/contrib/dev/acpica/utilities/utxface.c head/sys/dev/acpi_support/acpi_ibm.c head/sys/dev/acpi_support/acpi_panasonic.c head/sys/dev/acpi_support/acpi_wmi.c head/sys/dev/acpica/Osd/OsdHardware.c head/sys/dev/acpica/Osd/OsdSchedule.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/acpica/acpi_if.m head/sys/dev/acpica/acpi_package.c head/sys/dev/acpica/acpi_powerres.c head/sys/dev/acpica/acpi_smbat.c head/sys/dev/acpica/acpivar.h head/usr.sbin/acpi/acpidb/acpidb.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/changes.txt Thu Jan 21 21:14:28 2010 (r202771) @@ -1,7 +1,55 @@ ---------------------------------------- -14 December 2009. Summary of changes for version 20091214: +21 January 2010. Summary of changes for version 20100121: + +1) ACPI CA Core Subsystem: -This release is available at www.acpica.org/downloads +Added the 2010 copyright to all module headers and signons. This affects +virtually every file in the ACPICA core subsystem, the iASL compiler, the +tools/utilities, and the test suites. + +Implemented a change to the AcpiGetDevices interface to eliminate unnecessary +invocations of the _STA method. In the case where a specific _HID is +requested, do not run _STA until a _HID match is found. This eliminates +potentially dozens of _STA calls during a search for a particular device/HID, +which in turn can improve boot times. ACPICA BZ 828. Lin Ming. + +Implemented an additional repair for predefined method return values. Attempt +to repair unexpected NULL elements within returned Package objects. Create an +Integer of value zero, a NULL String, or a zero-length Buffer as appropriate. +ACPICA BZ 818. Lin Ming, Bob Moore. + +Removed the obsolete ACPI_INTEGER data type. This type was introduced as the +code was migrated from ACPI 1.0 (with 32-bit AML integers) to ACPI 2.0 (with +64-bit AML integers). It is now obsolete and this change removes it from the +ACPICA code base, replaced by UINT64. The original typedef has been retained +for now for compatibility with existing device driver code. ACPICA BZ 824. + +Removed the unused UINT32_STRUCT type, and the obsolete Integer64 field in +the parse tree object. + +Added additional warning options for the gcc-4 generation. Updated the source +accordingly. This includes some code restructuring to eliminate unreachable +code, elimination of some gotos, elimination of unused return values, some +additional casting, and removal of redundant declarations. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.0K Code, 18.0K Data, 105.0K Total + Debug Version: 163.4K Code, 50.8K Data, 214.2K Total + Current Release: + Non-Debug Version: 87.1K Code, 18.0K Data, 105.1K Total + Debug Version: 163.5K Code, 50.9K Data, 214.4K Total + +2) iASL Compiler/Disassembler and Tools: + +No functional changes for this release. + +---------------------------------------- +14 December 2009. Summary of changes for version 20091214: 1) ACPI CA Core Subsystem: @@ -68,8 +116,6 @@ depend on a specific initial value for a ---------------------------------------- 12 November 2009. Summary of changes for version 20091112: -This release is available at www.acpica.org/downloads - 1) ACPI CA Core Subsystem: Implemented a post-order callback to AcpiWalkNamespace. The existing @@ -141,8 +187,6 @@ level set very high. ---------------------------------------- 13 October 2009. Summary of changes for version 20091013: -This release is available at www.acpica.org/downloads - 1) ACPI CA Core Subsystem: Fixed a problem where an Operation Region _REG method could be executed more @@ -1037,9 +1081,6 @@ header. 29 July 2008. Summary of changes for version 20080729: -This release is available at http://acpica.org/downloads -Direct git access via http://www.acpica.org/repos/acpica.git - 1) ACPI CA Core Subsystem: Fix a possible deadlock in the GPE dispatch. Remove call to @@ -1129,9 +1170,6 @@ completion message. Previously, no messa ---------------------------------------- 01 July 2008. Summary of changes for version 20080701: -This release is available at http://acpica.org/downloads -Direct git access via http://www.acpica.org/repos/acpica.git - 0) Git source tree / acpica.org Fixed a problem where a git-clone from http would not transfer the entire Modified: head/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adfile.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/adfile.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/adwalk.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmextern.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmrestag.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmrestag.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/getopt.c ============================================================================== --- head/sys/contrib/dev/acpica/common/getopt.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/getopt.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -667,8 +667,8 @@ AnCheckForReservedName ( { /* The next two characters must be hex digits */ - if ((isxdigit (Name[2])) && - (isxdigit (Name[3]))) + if ((isxdigit ((int) Name[2])) && + (isxdigit ((int) Name[3]))) { return (ACPI_EVENT_RESERVED_NAME); } @@ -1236,7 +1236,7 @@ AnMethodAnalysisWalkBegin ( */ for (i = 0; Next->Asl.Value.String[i]; i++) { - if (!isalnum (Next->Asl.Value.String[i])) + if (!isalnum ((int) Next->Asl.Value.String[i])) { AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING, Next, Next->Asl.Value.String); @@ -2157,7 +2157,7 @@ AnOtherSemanticAnalysisWalkBegin ( */ if (((ArgNode->Asl.ParseOpcode == PARSEOP_WORDCONST) || (ArgNode->Asl.ParseOpcode == PARSEOP_INTEGER)) && - (ArgNode->Asl.Value.Integer >= (ACPI_INTEGER) ACPI_WAIT_FOREVER)) + (ArgNode->Asl.Value.Integer >= (UINT64) ACPI_WAIT_FOREVER)) { break; } Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -511,7 +511,7 @@ TrCreateLeafNode ( ACPI_PARSE_OBJECT * TrCreateValuedLeafNode ( UINT32 ParseOpcode, - ACPI_INTEGER Value); + UINT64 Value); ACPI_PARSE_OBJECT * TrLinkChildren ( @@ -718,7 +718,7 @@ UtCheckIntegerRange ( UINT32 LowValue, UINT32 HighValue); -ACPI_INTEGER +UINT64 UtDoConstant ( char *String); Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Thu Jan 21 21:14:28 2010 (r202771) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.y Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.y Thu Jan 21 21:14:28 2010 (r202771) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -2388,7 +2388,7 @@ QWordConstExpr ConstExprTerm : PARSEOP_ZERO {$$ = TrCreateValuedLeafNode (PARSEOP_ZERO, 0);} | PARSEOP_ONE {$$ = TrCreateValuedLeafNode (PARSEOP_ONE, 1);} - | PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_INTEGER_MAX);} + | PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_UINT64_MAX);} ; /* OptionalCount must appear before ByteList or an incorrect reduction will result */ Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -127,7 +127,7 @@ #define IntelAcpiCA "Intel ACPI Component Architecture" #define CompilerId "ASL Optimizing Compiler" #define DisassemblerId "AML Disassembler" -#define CompilerCopyright "Copyright (C) 2000 - 2009 Intel Corporation" +#define CompilerCopyright "Copyright (c) 2000 - 2010 Intel Corporation" #define CompilerCompliance "Supports ACPI Specification Revision 4.0" #define CompilerName "iasl" #define CompilerCreatorId "INTL" Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -169,13 +169,7 @@ AeAddToErrorLog ( ASL_ERROR_MSG *Prev; - if (!Gbl_ErrorLog) - { - Gbl_ErrorLog = Enode; - return; - } - - /* List is sorted according to line number */ + /* If Gbl_ErrorLog is null, this is the first error node */ if (!Gbl_ErrorLog) { @@ -183,8 +177,10 @@ AeAddToErrorLog ( return; } - /* Walk error list until we find a line number greater than ours */ - + /* + * Walk error list until we find a line number greater than ours. + * List is sorted according to line number. + */ Prev = NULL; Next = Gbl_ErrorLog; Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslfold.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfold.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslfold.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Jan 21 21:14:28 2010 (r202771) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -165,7 +165,6 @@ ASL_EXTERN char ASL_ ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_ErrorLog,NULL); ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_NextError,NULL); -extern UINT32 Gbl_ExceptionCount[]; /* Option flags */ @@ -278,5 +277,12 @@ ASL_EXTERN char MsgB ASL_EXTERN char StringBuffer[ASL_MSG_BUFFER_SIZE]; ASL_EXTERN char StringBuffer2[ASL_MSG_BUFFER_SIZE]; + +#ifdef _DECLARE_GLOBALS +UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS] = {0,0,0,0,0,0}; +#else +extern UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS]; +#endif + #endif /* __ASLGLOBAL_H */ Modified: head/sys/contrib/dev/acpica/compiler/asllength.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllength.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asllength.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllisting.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -534,7 +534,7 @@ LdNamespace1Begin ( if (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC) { Status = LdLoadResourceElements (Op, WalkState); - goto Exit; + return_ACPI_STATUS (Status); } ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); @@ -578,7 +578,7 @@ LdNamespace1Begin ( AslCoreSubsystemError (Op, Status, "Failure from namespace lookup", FALSE); - goto Exit; + return_ACPI_STATUS (Status); } /* We found a node with this name, now check the type */ @@ -713,15 +713,14 @@ LdNamespace1Begin ( AslError (ASL_ERROR, ASL_MSG_NAME_EXISTS, Op, Op->Asl.ExternalName); - Status = AE_OK; - goto Exit; + return_ACPI_STATUS (AE_OK); } } else { AslCoreSubsystemError (Op, Status, "Failure from namespace lookup", FALSE); - goto Exit; + return_ACPI_STATUS (Status); } } @@ -759,8 +758,7 @@ FinishNode: Node->Value = (UINT32) Op->Asl.Extra; } -Exit: - return (Status); + return_ACPI_STATUS (Status); } Modified: head/sys/contrib/dev/acpica/compiler/asllookup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllookup.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asllookup.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmain.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslmain.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -165,9 +165,6 @@ static int AslDoResponseFile ( char *Filename); -extern int AcpiGbl_Opterr; -extern int AcpiGbl_Optind; - #define ASL_TOKEN_SEPARATORS " \t\n" #define ASL_SUPPORTED_OPTIONS "@:2b:cd^e:fgh^i^I:l^o:p:r:s:t:v:w:x:" Modified: head/sys/contrib/dev/acpica/compiler/aslmap.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmap.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslmap.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslopcodes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopcodes.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslopcodes.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -328,7 +328,7 @@ OpcSetOptimalIntegerSize ( } break; - case ACPI_INTEGER_MAX: + case ACPI_UINT64_MAX: /* Check for table integer width (32 or 64) */ @@ -568,7 +568,7 @@ OpcDoEisaId ( if (i < 3) { - if (!isupper (InString[i])) + if (!isupper ((int) InString[i])) { Status = AE_BAD_PARAMETER; } @@ -576,7 +576,7 @@ OpcDoEisaId ( /* Last 4 characters must be hex digits */ - else if (!isxdigit (InString[i])) + else if (!isxdigit ((int) InString[i])) { Status = AE_BAD_PARAMETER; } @@ -666,7 +666,7 @@ OpcDoUuId ( } else { - if (!isxdigit (InString[i])) + if (!isxdigit ((int) InString[i])) { Status = AE_BAD_PARAMETER; } Modified: head/sys/contrib/dev/acpica/compiler/asloperands.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloperands.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asloperands.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -604,7 +604,7 @@ OpnDoRegion ( } else { - Op->Asl.Value.Integer = ACPI_INTEGER_MAX; + Op->Asl.Value.Integer = ACPI_UINT64_MAX; } } @@ -1007,7 +1007,7 @@ OpnDoDefinitionBlock ( for (i = 0; i < 4; i++) { - if (!isalnum (Gbl_TableSignature[i])) + if (!isalnum ((int) Gbl_TableSignature[i])) { AslError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, Child, "Contains non-alphanumeric characters"); Modified: head/sys/contrib/dev/acpica/compiler/aslopt.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopt.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslopt.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslresource.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslresource.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslresource.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -184,7 +184,7 @@ RsCreateBitField ( { Op->Asl.ExternalName = Name; - Op->Asl.Value.Integer = ((ACPI_INTEGER) ByteOffset * 8) + BitOffset; + Op->Asl.Value.Integer = ((UINT64) ByteOffset * 8) + BitOffset; Op->Asl.CompileFlags |= (NODE_IS_RESOURCE_FIELD | NODE_IS_BIT_OFFSET); } Modified: head/sys/contrib/dev/acpica/compiler/aslrestype1.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype1.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslrestype1.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslstartup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslstubs.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstubs.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslstubs.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asltransform.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltransform.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asltransform.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -554,7 +554,7 @@ TrDoSwitch ( NewOp = NewOp2; NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp->Asl.Next = NewOp2; TrAmlInitLineNumbers (NewOp2, Predicate); @@ -612,7 +612,7 @@ TrDoSwitch ( * CaseOp->Child->Peer is the beginning of the case block */ NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp->Asl.Next = Predicate; TrAmlInitLineNumbers (NewOp, Predicate); @@ -761,7 +761,7 @@ TrDoSwitch ( /* Create the NameSeg child for the Name node */ NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESEG, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp2->Asl.CompileFlags |= NODE_IS_NAME_DECLARATION; NewOp->Asl.Child = NewOp2; @@ -771,22 +771,22 @@ TrDoSwitch ( { case ACPI_BTYPE_INTEGER: NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO, - (ACPI_INTEGER) 0); + (UINT64) 0); break; case ACPI_BTYPE_STRING: NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, - (ACPI_INTEGER) ACPI_TO_INTEGER ("")); + (UINT64) ACPI_TO_INTEGER ("")); break; case ACPI_BTYPE_BUFFER: (void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER, - (ACPI_INTEGER) 0)); + (UINT64) 0)); Next = NewOp2->Asl.Next; (void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO, - (ACPI_INTEGER) 1)); + (UINT64) 1)); (void) TrLinkPeerNode (Next->Asl.Child, - TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (ACPI_INTEGER) 0)); + TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0)); TrAmlSetSubtreeParent (Next->Asl.Child, Next); break; @@ -821,7 +821,7 @@ TrDoSwitch ( Predicate->Asl.Parent = StoreOp; NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp->Asl.Parent = StoreOp; Predicate->Asl.Next = NewOp; Modified: head/sys/contrib/dev/acpica/compiler/asltree.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltree.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asltree.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -490,7 +490,7 @@ TrCreateLeafNode ( ACPI_PARSE_OBJECT * TrCreateValuedLeafNode ( UINT32 ParseOpcode, - ACPI_INTEGER Value) + UINT64 Value) { ACPI_PARSE_OBJECT *Op; Modified: head/sys/contrib/dev/acpica/compiler/asltypes.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltypes.h Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asltypes.h Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -571,11 +571,6 @@ char *AslErrorLevel [ #define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings above */ -/* Exception counters */ - -UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS] = {0,0,0,0,0,0}; - -#endif - +#endif /* ASL_EXCEPTIONS */ #endif /* __ASLTYPES_H */ Modified: head/sys/contrib/dev/acpica/compiler/aslutils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -142,7 +142,7 @@ static ACPI_STATUS UtStrtoul64 ( char *String, UINT32 Base, - ACPI_INTEGER *RetInteger); + UINT64 *RetInteger); static void UtPadNameWithUnderscores ( @@ -846,12 +846,12 @@ UtAttachNamepathToOwner ( * ******************************************************************************/ -ACPI_INTEGER +UINT64 UtDoConstant ( char *String) { ACPI_STATUS Status; - ACPI_INTEGER Converted; + UINT64 Converted; char ErrBuf[64]; @@ -888,11 +888,11 @@ static ACPI_STATUS UtStrtoul64 ( char *String, UINT32 Base, - ACPI_INTEGER *RetInteger) + UINT64 *RetInteger) { UINT32 Index; UINT32 Sign; - ACPI_INTEGER ReturnValue = 0; + UINT64 ReturnValue = 0; ACPI_STATUS Status = AE_OK; @@ -916,7 +916,7 @@ UtStrtoul64 ( /* Skip over any white space in the buffer: */ - while (isspace (*String) || *String == '\t') + while (isspace ((int) *String) || *String == '\t') { ++String; } @@ -948,7 +948,7 @@ UtStrtoul64 ( { if (*String == '0') { - if (tolower (*(++String)) == 'x') + if (tolower ((int) *(++String)) == 'x') { Base = 16; ++String; @@ -975,7 +975,7 @@ UtStrtoul64 ( if (Base == 16 && *String == '0' && - tolower (*(++String)) == 'x') + tolower ((int) *(++String)) == 'x') { String++; } @@ -984,14 +984,14 @@ UtStrtoul64 ( while (*String) { - if (isdigit (*String)) + if (isdigit ((int) *String)) { Index = ((UINT8) *String) - '0'; } else { - Index = (UINT8) toupper (*String); - if (isupper ((char) Index)) + Index = (UINT8) toupper ((int) *String); + if (isupper ((int) Index)) { Index = Index - 'A' + 10; } @@ -1008,8 +1008,8 @@ UtStrtoul64 ( /* Check to see if value is out of range: */ - if (ReturnValue > ((ACPI_INTEGER_MAX - (ACPI_INTEGER) Index) / - (ACPI_INTEGER) Base)) + if (ReturnValue > ((ACPI_UINT64_MAX - (UINT64) Index) / + (UINT64) Base)) { goto ErrorExit; } Modified: head/sys/contrib/dev/acpica/debugger/dbcmds.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbcmds.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/debugger/dbcmds.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/debugger/dbdisply.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbdisply.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/debugger/dbdisply.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/debugger/dbexec.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbexec.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/debugger/dbexec.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -243,7 +243,7 @@ AcpiDbExecuteMethod ( default: Params[i].Type = ACPI_TYPE_INTEGER; - Params[i].Integer.Value = i * (ACPI_INTEGER) 0x1000; + Params[i].Integer.Value = i * (UINT64) 0x1000; break; } } @@ -484,7 +484,7 @@ AcpiDbExecute ( * Allow any handlers in separate threads to complete. * (Such as Notify handlers invoked from AML executed above). */ - AcpiOsSleep ((ACPI_INTEGER) 10); + AcpiOsSleep ((UINT64) 10); #ifdef ACPI_DEBUG_OUTPUT Modified: head/sys/contrib/dev/acpica/debugger/dbfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbfileio.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/debugger/dbfileio.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -150,9 +150,6 @@ AcpiDbCheckTextModeCorruption ( UINT32 TableLength, UINT32 FileLength); -static ACPI_STATUS -AeLocalLoadTable ( - ACPI_TABLE_HEADER *TablePtr); #endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 21:21:03 2010 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 BEC921065697; Thu, 21 Jan 2010 21:21:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADD1C8FC17; Thu, 21 Jan 2010 21:21:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLL3gr049074; Thu, 21 Jan 2010 21:21:03 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LLL1Sk049073; Thu, 21 Jan 2010 21:21:01 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001212121.o0LLL1Sk049073@svn.freebsd.org> From: Rick Macklem Date: Thu, 21 Jan 2010 21:21: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: r202772 - head/sbin/mount_nfs 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: Thu, 21 Jan 2010 21:21:03 -0000 Author: rmacklem Date: Thu Jan 21 21:21:00 2010 New Revision: 202772 URL: http://svn.freebsd.org/changeset/base/202772 Log: Document the negnametimeo option for mount_nfs as implemented by r202767. This is a content change. MFC after: 2 weeks Modified: head/sbin/mount_nfs/mount_nfs.8 Modified: head/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- head/sbin/mount_nfs/mount_nfs.8 Thu Jan 21 21:14:28 2010 (r202771) +++ head/sbin/mount_nfs/mount_nfs.8 Thu Jan 21 21:21:00 2010 (r202772) @@ -151,6 +151,10 @@ Force the mount protocol to use UDP tran (Necessary for some old .Bx servers.) +.It Cm negnametimeo Ns = Ns Aq Ar value +Override the default of NFS_DEFAULT_NEGNAMETIMEO for the timeout (in seconds) +for negative name cache entries. If this is set to 0 it disables negative +name caching for the mount point. .It Cm nfsv2 Use the NFS Version 2 protocol (the default is to try version 3 first then version 2). From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 21:31:39 2010 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 9103F1065670; Thu, 21 Jan 2010 21:31:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F4588FC43; Thu, 21 Jan 2010 21:31:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLVdLF051537; Thu, 21 Jan 2010 21:31:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LLVd7L051536; Thu, 21 Jan 2010 21:31:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201001212131.o0LLVd7L051536@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 21 Jan 2010 21:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202773 - head/sys/contrib/dev/acpica/namespace 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: Thu, 21 Jan 2010 21:31:39 -0000 Author: jkim Date: Thu Jan 21 21:31:39 2010 New Revision: 202773 URL: http://svn.freebsd.org/changeset/base/202773 Log: Fix a new header inclusion. Modified: head/sys/contrib/dev/acpica/namespace/nsrepair.c Modified: head/sys/contrib/dev/acpica/namespace/nsrepair.c ============================================================================== --- head/sys/contrib/dev/acpica/namespace/nsrepair.c Thu Jan 21 21:21:00 2010 (r202772) +++ head/sys/contrib/dev/acpica/namespace/nsrepair.c Thu Jan 21 21:31:39 2010 (r202773) @@ -119,7 +119,7 @@ #include #include #include -#include "acpredef.h" +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME ("nsrepair") From owner-svn-src-all@FreeBSD.ORG Thu Jan 21 21:59:11 2010 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 506211065672; Thu, 21 Jan 2010 21:59:11 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4037D8FC16; Thu, 21 Jan 2010 21:59:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLxBAE057761; Thu, 21 Jan 2010 21:59:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LLxA1k057760; Thu, 21 Jan 2010 21:59:10 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001212159.o0LLxA1k057760@svn.freebsd.org> From: Rick Macklem Date: Thu, 21 Jan 2010 21:59: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: r202774 - head/sys/nfsclient 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: Thu, 21 Jan 2010 21:59:11 -0000 Author: rmacklem Date: Thu Jan 21 21:59:10 2010 New Revision: 202774 URL: http://svn.freebsd.org/changeset/base/202774 Log: Fix a typo in a comment introduced by r202767. MFC after: 2 weeks Modified: head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Thu Jan 21 21:31:39 2010 (r202773) +++ head/sys/nfsclient/nfs_vnops.c Thu Jan 21 21:59:10 2010 (r202774) @@ -981,7 +981,6 @@ nfs_lookup(struct vop_lookup_args *ap) * We only accept a negative hit in the cache if the * modification time of the parent directory matches * our cached copy. Otherwise, we discard all of the - * negative cache entries for this directory. * negative cache entries for this directory. We also * only trust -ve cache entries for less than * nm_negative_namecache_timeout seconds. From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 02:35:40 2010 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 E2340106566C; Fri, 22 Jan 2010 02:35:40 +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 D1E328FC12; Fri, 22 Jan 2010 02:35:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M2ZePj019963; Fri, 22 Jan 2010 02:35:40 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M2Ze6e019962; Fri, 22 Jan 2010 02:35:40 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001220235.o0M2Ze6e019962@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 22 Jan 2010 02:35:40 +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: r202775 - stable/7/sys/dev/cxgb 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: Fri, 22 Jan 2010 02:35:41 -0000 Author: np Date: Fri Jan 22 02:35:40 2010 New Revision: 202775 URL: http://svn.freebsd.org/changeset/base/202775 Log: Remove debug printf. Modified: stable/7/sys/dev/cxgb/cxgb_sge.c Modified: stable/7/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_sge.c Thu Jan 21 21:59:10 2010 (r202774) +++ stable/7/sys/dev/cxgb/cxgb_sge.c Fri Jan 22 02:35:40 2010 (r202775) @@ -1562,8 +1562,6 @@ addq_exit: mbufq_tail(&q->sendq, m); struct sge_qset *qs = txq_to_qset(q, qid); - printf("stopping q\n"); - setbit(&qs->txq_stopped, qid); smp_mb(); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 03:50:44 2010 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 50A4B1065670; Fri, 22 Jan 2010 03:50:44 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CA388FC18; Fri, 22 Jan 2010 03:50:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M3oiZl037268; Fri, 22 Jan 2010 03:50:44 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M3oiVe037256; Fri, 22 Jan 2010 03:50:44 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001220350.o0M3oiVe037256@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 22 Jan 2010 03:50:44 +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: r202776 - in stable/8/sys: amd64/amd64 amd64/include conf dev/io i386/i386 i386/include ia64/conf ia64/ia64 ia64/include 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: Fri, 22 Jan 2010 03:50:44 -0000 Author: marcel Date: Fri Jan 22 03:50:43 2010 New Revision: 202776 URL: http://svn.freebsd.org/changeset/base/202776 Log: MFC rev. 202097: Use io(4) for I/O port access on ia64, rather than through sysarch(2). Added: stable/8/sys/ia64/ia64/iodev_machdep.c - copied unchanged from r202097, head/sys/ia64/ia64/iodev_machdep.c stable/8/sys/ia64/include/iodev.h - copied unchanged from r202097, head/sys/ia64/include/iodev.h Modified: stable/8/sys/amd64/amd64/io.c stable/8/sys/amd64/include/iodev.h stable/8/sys/conf/files.ia64 stable/8/sys/dev/io/iodev.c stable/8/sys/i386/i386/io.c stable/8/sys/i386/include/iodev.h stable/8/sys/ia64/conf/DEFAULTS stable/8/sys/ia64/ia64/sys_machdep.c stable/8/sys/ia64/include/sysarch.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/io.c ============================================================================== --- stable/8/sys/amd64/amd64/io.c Fri Jan 22 02:35:40 2010 (r202775) +++ stable/8/sys/amd64/amd64/io.c Fri Jan 22 03:50:43 2010 (r202776) @@ -76,3 +76,12 @@ ioclose(struct cdev *dev __unused, int f return (0); } + +/* ARGSUSED */ +int +ioioctl(struct cdev *dev __unused, u_long cmd __unused, caddr_t data __unused, + int fflag __unused, struct thread *td __unused) +{ + + return (ENXIO); +} Modified: stable/8/sys/amd64/include/iodev.h ============================================================================== --- stable/8/sys/amd64/include/iodev.h Fri Jan 22 02:35:40 2010 (r202775) +++ stable/8/sys/amd64/include/iodev.h Fri Jan 22 03:50:43 2010 (r202776) @@ -28,3 +28,4 @@ d_open_t ioopen; d_close_t ioclose; +d_ioctl_t ioioctl; Modified: stable/8/sys/conf/files.ia64 ============================================================================== --- stable/8/sys/conf/files.ia64 Fri Jan 22 02:35:40 2010 (r202775) +++ stable/8/sys/conf/files.ia64 Fri Jan 22 03:50:43 2010 (r202776) @@ -56,6 +56,7 @@ dev/atkbdc/psm.c optional psm atkbdc dev/fb/fb.c optional fb | vga dev/fb/vga.c optional vga dev/hwpmc/hwpmc_ia64.c optional hwpmc +dev/io/iodev.c optional io dev/kbd/kbd.c optional atkbd | sc | ukbd | usb2_input_kbd dev/syscons/scterm-teken.c optional sc dev/syscons/scvgarndr.c optional sc vga @@ -89,6 +90,7 @@ ia64/ia64/gdb_machdep.c optional gdb ia64/ia64/highfp.c standard ia64/ia64/in_cksum.c optional inet ia64/ia64/interrupt.c standard +ia64/ia64/iodev_machdep.c optional io ia64/ia64/locore.S standard no-obj ia64/ia64/machdep.c standard ia64/ia64/mca.c standard Modified: stable/8/sys/dev/io/iodev.c ============================================================================== --- stable/8/sys/dev/io/iodev.c Fri Jan 22 02:35:40 2010 (r202775) +++ stable/8/sys/dev/io/iodev.c Fri Jan 22 03:50:43 2010 (r202776) @@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include @@ -54,6 +52,7 @@ static struct cdevsw io_cdevsw = { .d_version = D_VERSION, .d_open = ioopen, .d_close = ioclose, + .d_ioctl = ioioctl, .d_name = "io", }; Modified: stable/8/sys/i386/i386/io.c ============================================================================== --- stable/8/sys/i386/i386/io.c Fri Jan 22 02:35:40 2010 (r202775) +++ stable/8/sys/i386/i386/io.c Fri Jan 22 03:50:43 2010 (r202776) @@ -76,3 +76,12 @@ ioclose(struct cdev *dev __unused, int f return (0); } + +/* ARGSUSED */ +int +ioioctl(struct cdev *dev __unused, u_long cmd __unused, caddr_t data __unused, + int fflag __unused, struct thread *td __unused) +{ + + return (ENXIO); +} Modified: stable/8/sys/i386/include/iodev.h ============================================================================== --- stable/8/sys/i386/include/iodev.h Fri Jan 22 02:35:40 2010 (r202775) +++ stable/8/sys/i386/include/iodev.h Fri Jan 22 03:50:43 2010 (r202776) @@ -28,3 +28,4 @@ d_open_t ioopen; d_close_t ioclose; +d_ioctl_t ioioctl; Modified: stable/8/sys/ia64/conf/DEFAULTS ============================================================================== --- stable/8/sys/ia64/conf/DEFAULTS Fri Jan 22 02:35:40 2010 (r202775) +++ stable/8/sys/ia64/conf/DEFAULTS Fri Jan 22 03:50:43 2010 (r202776) @@ -9,6 +9,7 @@ machine ia64 device acpi # ACPI support # Pseudo devices. +device io # I/O & EFI runtime device device mem # Memory and kernel memory devices # UART chips on this platform Copied: stable/8/sys/ia64/ia64/iodev_machdep.c (from r202097, head/sys/ia64/ia64/iodev_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/ia64/ia64/iodev_machdep.c Fri Jan 22 03:50:43 2010 (r202776, copy of r202097, head/sys/ia64/ia64/iodev_machdep.c) @@ -0,0 +1,160 @@ +/*- + * Copyright (c) 2010 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static int iodev_pio_read(struct iodev_pio_req *req); +static int iodev_pio_write(struct iodev_pio_req *req); + +/* ARGSUSED */ +int +ioopen(struct cdev *dev __unused, int flags __unused, int fmt __unused, + struct thread *td) +{ + int error; + + error = priv_check(td, PRIV_IO); + if (error == 0) + error = securelevel_gt(td->td_ucred, 0); + + return (error); +} + +/* ARGSUSED */ +int +ioclose(struct cdev *dev __unused, int flags __unused, int fmt __unused, + struct thread *td __unused) +{ + + return (0); +} + +/* ARGSUSED */ +int +ioioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, + int fflag __unused, struct thread *td __unused) +{ + struct iodev_pio_req *pio_req; + int error; + + error = ENOIOCTL; + switch (cmd) { + case IODEV_PIO: + pio_req = (struct iodev_pio_req *)data; + switch (pio_req->access) { + case IODEV_PIO_READ: + error = iodev_pio_read(pio_req); + break; + case IODEV_PIO_WRITE: + error = iodev_pio_write(pio_req); + break; + default: + error = EINVAL; + break; + } + break; + } + + return (error); +} + +static int +iodev_pio_read(struct iodev_pio_req *req) +{ + + switch (req->width) { + case 1: + req->val = bus_space_read_io_1(req->port); + break; + case 2: + if (req->port & 1) { + req->val = bus_space_read_io_1(req->port); + req->val |= bus_space_read_io_1(req->port + 1) << 8; + } else + req->val = bus_space_read_io_2(req->port); + break; + case 4: + if (req->port & 1) { + req->val = bus_space_read_io_1(req->port); + req->val |= bus_space_read_io_2(req->port + 1) << 8; + req->val |= bus_space_read_io_1(req->port + 3) << 24; + } else if (req->port & 2) { + req->val = bus_space_read_io_2(req->port); + req->val |= bus_space_read_io_2(req->port + 2) << 16; + } else + req->val = bus_space_read_io_4(req->port); + break; + default: + return (EINVAL); + } + + return (0); +} + +static int +iodev_pio_write(struct iodev_pio_req *req) +{ + + switch (req->width) { + case 1: + bus_space_write_io_1(req->port, req->val); + break; + case 2: + if (req->port & 1) { + bus_space_write_io_1(req->port, req->val); + bus_space_write_io_1(req->port + 1, req->val >> 8); + } else + bus_space_write_io_2(req->port, req->val); + break; + case 4: + if (req->port & 1) { + bus_space_write_io_1(req->port, req->val); + bus_space_write_io_2(req->port + 1, req->val >> 8); + bus_space_write_io_1(req->port + 3, req->val >> 24); + } else if (req->port & 2) { + bus_space_write_io_2(req->port, req->val); + bus_space_write_io_2(req->port + 2, req->val >> 16); + } else + bus_space_write_io_4(req->port, req->val); + break; + default: + return (EINVAL); + } + + return (0); +} Modified: stable/8/sys/ia64/ia64/sys_machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/sys_machdep.c Fri Jan 22 02:35:40 2010 (r202775) +++ stable/8/sys/ia64/ia64/sys_machdep.c Fri Jan 22 03:50:43 2010 (r202776) @@ -49,72 +49,9 @@ struct sysarch_args { int sysarch(struct thread *td, struct sysarch_args *uap) { - struct ia64_iodesc iod; int error; - error = 0; switch(uap->op) { - case IA64_IORD: - copyin(uap->parms, &iod, sizeof(iod)); - switch (iod.width) { - case 1: - iod.val = inb(iod.port); - break; - case 2: - if (iod.port & 1) { - iod.val = inb(iod.port); - iod.val |= inb(iod.port + 1) << 8; - } else - iod.val = inw(iod.port); - break; - case 4: - if (iod.port & 3) { - if (iod.port & 1) { - iod.val = inb(iod.port); - iod.val |= inw(iod.port + 1) << 8; - iod.val |= inb(iod.port + 3) << 24; - } else { - iod.val = inw(iod.port); - iod.val |= inw(iod.port + 2) << 16; - } - } else - iod.val = inl(iod.port); - break; - default: - error = EINVAL; - } - copyout(&iod, uap->parms, sizeof(iod)); - break; - case IA64_IOWR: - copyin(uap->parms, &iod, sizeof(iod)); - switch (iod.width) { - case 1: - outb(iod.port, iod.val); - break; - case 2: - if (iod.port & 1) { - outb(iod.port, iod.val); - outb(iod.port + 1, iod.val >> 8); - } else - outw(iod.port, iod.val); - break; - case 4: - if (iod.port & 3) { - if (iod.port & 1) { - outb(iod.port, iod.val); - outw(iod.port + 1, iod.val >> 8); - outb(iod.port + 3, iod.val >> 24); - } else { - outw(iod.port, iod.val); - outw(iod.port + 2, iod.val >> 16); - } - } else - outl(iod.port, iod.val); - break; - default: - error = EINVAL; - } - break; default: error = EINVAL; break; Copied: stable/8/sys/ia64/include/iodev.h (from r202097, head/sys/ia64/include/iodev.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/ia64/include/iodev.h Fri Jan 22 03:50:43 2010 (r202776, copy of r202097, head/sys/ia64/include/iodev.h) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2010 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_IODEV_H_ +#define _MACHINE_IODEV_H_ + +struct iodev_pio_req { + u_int access; +#define IODEV_PIO_READ 0 +#define IODEV_PIO_WRITE 1 + u_int port; + u_int width; + u_int val; +}; + +#define IODEV_PIO _IOWR('I', 0, struct iodev_pio_req) + +#ifdef _KERNEL + +d_open_t ioopen; +d_close_t ioclose; +d_ioctl_t ioioctl; + +#endif + +#endif /* _MACHINE_IODEV_H_ */ Modified: stable/8/sys/ia64/include/sysarch.h ============================================================================== --- stable/8/sys/ia64/include/sysarch.h Fri Jan 22 02:35:40 2010 (r202775) +++ stable/8/sys/ia64/include/sysarch.h Fri Jan 22 03:50:43 2010 (r202776) @@ -32,15 +32,6 @@ #ifndef _MACHINE_SYSARCH_H_ #define _MACHINE_SYSARCH_H_ -#define IA64_IORD 0 -#define IA64_IOWR 1 - -struct ia64_iodesc { - int port; - int width; - unsigned long val; -}; - #ifndef _KERNEL #include From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 03:59:05 2010 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 658941065693; Fri, 22 Jan 2010 03:59:05 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53B428FC1B; Fri, 22 Jan 2010 03:59:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M3x5fS039201; Fri, 22 Jan 2010 03:59:05 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M3x5Y0039196; Fri, 22 Jan 2010 03:59:05 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001220359.o0M3x5Y0039196@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 22 Jan 2010 03:59: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: r202777 - in stable/8/sys/ia64: ia64 include 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: Fri, 22 Jan 2010 03:59:05 -0000 Author: marcel Date: Fri Jan 22 03:59:05 2010 New Revision: 202777 URL: http://svn.freebsd.org/changeset/base/202777 Log: MFC rev. 202271-202273: o Add wrappers for the RT Variable Services. o Add ioctl requests to /dev/io on ia64 for reading and writing EFI variables. Modified: stable/8/sys/ia64/ia64/efi.c stable/8/sys/ia64/ia64/iodev_machdep.c stable/8/sys/ia64/include/efi.h stable/8/sys/ia64/include/iodev.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/ia64/ia64/efi.c ============================================================================== --- stable/8/sys/ia64/ia64/efi.c Fri Jan 22 03:50:43 2010 (r202776) +++ stable/8/sys/ia64/ia64/efi.c Fri Jan 22 03:59:05 2010 (r202777) @@ -41,6 +41,45 @@ static struct efi_systbl *efi_systbl; static struct efi_cfgtbl *efi_cfgtbl; static struct efi_rt *efi_runtime; +static int efi_status2err[25] = { + 0, /* EFI_SUCCESS */ + ENOEXEC, /* EFI_LOAD_ERROR */ + EINVAL, /* EFI_INVALID_PARAMETER */ + ENOSYS, /* EFI_UNSUPPORTED */ + EMSGSIZE, /* EFI_BAD_BUFFER_SIZE */ + EOVERFLOW, /* EFI_BUFFER_TOO_SMALL */ + EBUSY, /* EFI_NOT_READY */ + EIO, /* EFI_DEVICE_ERROR */ + EROFS, /* EFI_WRITE_PROTECTED */ + EAGAIN, /* EFI_OUT_OF_RESOURCES */ + EIO, /* EFI_VOLUME_CORRUPTED */ + ENOSPC, /* EFI_VOLUME_FULL */ + ENXIO, /* EFI_NO_MEDIA */ + ESTALE, /* EFI_MEDIA_CHANGED */ + ENOENT, /* EFI_NOT_FOUND */ + EACCES, /* EFI_ACCESS_DENIED */ + ETIMEDOUT, /* EFI_NO_RESPONSE */ + EADDRNOTAVAIL, /* EFI_NO_MAPPING */ + ETIMEDOUT, /* EFI_TIMEOUT */ + EDOOFUS, /* EFI_NOT_STARTED */ + EALREADY, /* EFI_ALREADY_STARTED */ + ECANCELED, /* EFI_ABORTED */ + EPROTO, /* EFI_ICMP_ERROR */ + EPROTO, /* EFI_TFTP_ERROR */ + EPROTO /* EFI_PROTOCOL_ERROR */ +}; + +static int +efi_status_to_errno(efi_status status) +{ + u_long code; + int error; + + code = status & 0x3ffffffffffffffful; + error = (code < 25) ? efi_status2err[code] : EDOOFUS; + return (error); +} + void efi_boot_finish(void) { @@ -148,9 +187,38 @@ efi_reset_system(void) panic("%s: unable to reset the machine", __func__); } -efi_status +int efi_set_time(struct efi_tm *tm) { - return (efi_runtime->rt_settime(tm)); + return (efi_status_to_errno(efi_runtime->rt_settime(tm))); +} + +int +efi_var_get(efi_char *name, struct uuid *vendor, uint32_t *attrib, + size_t *datasize, void *data) +{ + efi_status status; + + status = efi_runtime->rt_getvar(name, vendor, attrib, datasize, data); + return (efi_status_to_errno(status)); +} + +int +efi_var_nextname(size_t *namesize, efi_char *name, struct uuid *vendor) +{ + efi_status status; + + status = efi_runtime->rt_scanvar(namesize, name, vendor); + return (efi_status_to_errno(status)); +} + +int +efi_var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, + size_t datasize, void *data) +{ + efi_status status; + + status = efi_runtime->rt_setvar(name, vendor, attrib, datasize, data); + return (efi_status_to_errno(status)); } Modified: stable/8/sys/ia64/ia64/iodev_machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/iodev_machdep.c Fri Jan 22 03:50:43 2010 (r202776) +++ stable/8/sys/ia64/ia64/iodev_machdep.c Fri Jan 22 03:59:05 2010 (r202777) @@ -31,16 +31,22 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include #include static int iodev_pio_read(struct iodev_pio_req *req); static int iodev_pio_write(struct iodev_pio_req *req); +static int iodev_efivar_getvar(struct iodev_efivar_req *req); +static int iodev_efivar_nextname(struct iodev_efivar_req *req); +static int iodev_efivar_setvar(struct iodev_efivar_req *req); + /* ARGSUSED */ int ioopen(struct cdev *dev __unused, int flags __unused, int fmt __unused, @@ -69,6 +75,7 @@ int ioioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, int fflag __unused, struct thread *td __unused) { + struct iodev_efivar_req *efivar_req; struct iodev_pio_req *pio_req; int error; @@ -88,6 +95,24 @@ ioioctl(struct cdev *dev __unused, u_lon break; } break; + case IODEV_EFIVAR: + efivar_req = (struct iodev_efivar_req *)data; + efivar_req->result = 0; /* So it's well-defined */ + switch (efivar_req->access) { + case IODEV_EFIVAR_GETVAR: + error = iodev_efivar_getvar(efivar_req); + break; + case IODEV_EFIVAR_NEXTNAME: + error = iodev_efivar_nextname(efivar_req); + break; + case IODEV_EFIVAR_SETVAR: + error = iodev_efivar_setvar(efivar_req); + break; + default: + error = EINVAL; + break; + } + break; } return (error); @@ -158,3 +183,118 @@ iodev_pio_write(struct iodev_pio_req *re return (0); } + +static int +iodev_efivar_getvar(struct iodev_efivar_req *req) +{ + void *data; + efi_char *name; + int error; + + if ((req->namesize & 1) != 0 || req->namesize < 4) + return (EINVAL); + if (req->datasize == 0) + return (EINVAL); + + /* + * Pre-zero the allocated memory and don't copy the last 2 bytes + * of the name. That should be the closing nul character (ucs-2) + * and if not, then we ensured a nul-terminating string. This is + * to protect the firmware and thus ourselves. + */ + name = malloc(req->namesize, M_TEMP, M_WAITOK | M_ZERO); + error = copyin(req->name, name, req->namesize - 2); + if (error) { + free(name, M_TEMP); + return (error); + } + + data = malloc(req->datasize, M_TEMP, M_WAITOK); + error = efi_var_get(name, &req->vendor, &req->attrib, &req->datasize, + data); + if (error == EOVERFLOW || error == ENOENT) { + req->result = error; + error = 0; + } + if (!error && !req->result) + error = copyout(data, req->data, req->datasize); + + free(data, M_TEMP); + free(name, M_TEMP); + return (error); +} + +static int +iodev_efivar_nextname(struct iodev_efivar_req *req) +{ + efi_char *name; + int error; + + /* Enforce a reasonable minimum size of the name buffer. */ + if (req->namesize < 4) + return (EINVAL); + + name = malloc(req->namesize, M_TEMP, M_WAITOK); + error = copyin(req->name, name, req->namesize); + if (error) { + free(name, M_TEMP); + return (error); + } + + error = efi_var_nextname(&req->namesize, name, &req->vendor); + if (error == EOVERFLOW || error == ENOENT) { + req->result = error; + error = 0; + } + if (!error && !req->result) + error = copyout(name, req->name, req->namesize); + + free(name, M_TEMP); + return (error); +} + +static int +iodev_efivar_setvar(struct iodev_efivar_req *req) +{ + void *data; + efi_char *name; + int error; + + if ((req->namesize & 1) != 0 || req->namesize < 4) + return (EINVAL); + + /* + * Pre-zero the allocated memory and don't copy the last 2 bytes + * of the name. That should be the closing nul character (ucs-2) + * and if not, then we ensured a nul-terminating string. This is + * to protect the firmware and thus ourselves. + */ + name = malloc(req->namesize, M_TEMP, M_WAITOK | M_ZERO); + error = copyin(req->name, name, req->namesize - 2); + if (error) { + free(name, M_TEMP); + return (error); + } + + if (req->datasize) { + data = malloc(req->datasize, M_TEMP, M_WAITOK); + error = copyin(req->data, data, req->datasize); + if (error) { + free(data, M_TEMP); + free(name, M_TEMP); + return (error); + } + } else + data = NULL; + + error = efi_var_set(name, &req->vendor, req->attrib, req->datasize, + data); + if (error == EAGAIN || error == ENOENT) { + req->result = error; + error = 0; + } + + free(data, M_TEMP); + free(name, M_TEMP); + return (error); +} Modified: stable/8/sys/ia64/include/efi.h ============================================================================== --- stable/8/sys/ia64/include/efi.h Fri Jan 22 03:50:43 2010 (r202776) +++ stable/8/sys/ia64/include/efi.h Fri Jan 22 03:59:05 2010 (r202777) @@ -158,6 +158,9 @@ void efi_get_time(struct efi_tm *); struct efi_md *efi_md_first(void); struct efi_md *efi_md_next(struct efi_md *); void efi_reset_system(void); -efi_status efi_set_time(struct efi_tm *); +int efi_set_time(struct efi_tm *); +int efi_var_get(efi_char *, struct uuid *, uint32_t *, size_t *, void *); +int efi_var_nextname(size_t *, efi_char *, struct uuid *); +int efi_var_set(efi_char *, struct uuid *, uint32_t, size_t, void *); #endif /* _MACHINE_EFI_H_ */ Modified: stable/8/sys/ia64/include/iodev.h ============================================================================== --- stable/8/sys/ia64/include/iodev.h Fri Jan 22 03:50:43 2010 (r202776) +++ stable/8/sys/ia64/include/iodev.h Fri Jan 22 03:59:05 2010 (r202777) @@ -29,6 +29,8 @@ #ifndef _MACHINE_IODEV_H_ #define _MACHINE_IODEV_H_ +#include + struct iodev_pio_req { u_int access; #define IODEV_PIO_READ 0 @@ -40,6 +42,22 @@ struct iodev_pio_req { #define IODEV_PIO _IOWR('I', 0, struct iodev_pio_req) +struct iodev_efivar_req { + u_int access; +#define IODEV_EFIVAR_GETVAR 0 +#define IODEV_EFIVAR_NEXTNAME 1 +#define IODEV_EFIVAR_SETVAR 2 + u_int result; /* errno value */ + size_t namesize; + u_short *name; /* UCS-2 */ + struct uuid vendor; + uint32_t attrib; + size_t datasize; + void *data; +}; + +#define IODEV_EFIVAR _IOWR('I', 1, struct iodev_efivar_req) + #ifdef _KERNEL d_open_t ioopen; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 04:53:09 2010 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 25AE3106566B; Fri, 22 Jan 2010 04:53:09 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1515B8FC15; Fri, 22 Jan 2010 04:53:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M4r8Sx051374; Fri, 22 Jan 2010 04:53:08 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M4r8pi051372; Fri, 22 Jan 2010 04:53:08 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001220453.o0M4r8pi051372@svn.freebsd.org> From: Ed Schouten Date: Fri, 22 Jan 2010 04:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202778 - head/lib/libc/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: Fri, 22 Jan 2010 04:53:09 -0000 Author: ed Date: Fri Jan 22 04:53:08 2010 New Revision: 202778 URL: http://svn.freebsd.org/changeset/base/202778 Log: Remove comments about breaking the specification. I've discussed this issue with the Austin Group and it will be fixed in future revisions of the specification. The issue was that ut_line fields weren't supposed to be valid for LOGIN_PROCESS entries, while getutxline() would try to match these records anyway. They also agreed on our way of implementing pututxline() without getutxid() (which other operating systems also do), but unfortunately they disagreed with our way of replacing DEAD_PROCESS entries, which is a pity. The current specification allows the utmpx database to become infinitely big over time. See also: http://austingroupbugs.net/view.php?id=213#c378 Modified: head/lib/libc/gen/utxdb.c Modified: head/lib/libc/gen/utxdb.c ============================================================================== --- head/lib/libc/gen/utxdb.c Fri Jan 22 03:59:05 2010 (r202777) +++ head/lib/libc/gen/utxdb.c Fri Jan 22 04:53:08 2010 (r202778) @@ -83,7 +83,6 @@ utx_to_futx(const struct utmpx *ut, stru case LOGIN_PROCESS: UTOF_ID(ut, fu); UTOF_STRING(ut, fu, user); - /* XXX: bug in the specification? Needed for getutxline(). */ UTOF_STRING(ut, fu, line); UTOF_PID(ut, fu); break; @@ -156,7 +155,6 @@ futx_to_utx(const struct futx *fu) case LOGIN_PROCESS: FTOU_ID(fu, ut); FTOU_STRING(fu, ut, user); - /* XXX: bug in the specification? Needed for getutxline(). */ FTOU_STRING(fu, ut, line); FTOU_PID(fu, ut); break; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 05:09:10 2010 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 C2945106566B; Fri, 22 Jan 2010 05:09:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B22A88FC0C; Fri, 22 Jan 2010 05:09:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M59APU054995; Fri, 22 Jan 2010 05:09:10 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M59ArC054993; Fri, 22 Jan 2010 05:09:10 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001220509.o0M59ArC054993@svn.freebsd.org> From: Ed Schouten Date: Fri, 22 Jan 2010 05:09: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: r202779 - head/lib/libc/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: Fri, 22 Jan 2010 05:09:10 -0000 Author: ed Date: Fri Jan 22 05:09:10 2010 New Revision: 202779 URL: http://svn.freebsd.org/changeset/base/202779 Log: Describe why pututxline() doesn't entirely conform to standards. Modified: head/lib/libc/gen/getutxent.3 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Fri Jan 22 04:53:08 2010 (r202778) +++ head/lib/libc/gen/getutxent.3 Fri Jan 22 05:09:10 2010 (r202779) @@ -414,14 +414,32 @@ The .Fn endutxent , .Fn getutxent , .Fn getutxid , -.Fn getutxline , -.Fn pututxline +.Fn getutxline and .Fn setutxent functions are expected to conform to .St -p1003.1-2008 . .Pp The +.Fn pututxline +function deviates from the standard by writing its records to multiple +database files, depending on its +.Fa ut_type . +This prevents the need for special utility functions to update the other +databases, such as the +.Fn updwtmpx +function which is often available in other implementations. +It also tries to replace +.Dv DEAD_PROCESS +entries in the active sessions database when storing +.Dv USER_PROCESS +entries and no entry with the same value for +.Fa ut_id +has been found. +The standard always requires a new entry to be allocated, which could +cause an unbounded growth to the database. +.Pp +The .Fn getutxuser and .Fn setutxdb From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 05:19:52 2010 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 F32A6106566C; Fri, 22 Jan 2010 05:19:51 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2A4E8FC18; Fri, 22 Jan 2010 05:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M5Jp64057410; Fri, 22 Jan 2010 05:19:51 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M5Jpvn057408; Fri, 22 Jan 2010 05:19:51 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001220519.o0M5Jpvn057408@svn.freebsd.org> From: Ed Schouten Date: Fri, 22 Jan 2010 05:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202780 - head/lib/libc/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: Fri, 22 Jan 2010 05:19:52 -0000 Author: ed Date: Fri Jan 22 05:19:51 2010 New Revision: 202780 URL: http://svn.freebsd.org/changeset/base/202780 Log: English nitpicking. Submitted by: jmallett Modified: head/lib/libc/gen/getutxent.3 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Fri Jan 22 05:09:10 2010 (r202779) +++ head/lib/libc/gen/getutxent.3 Fri Jan 22 05:19:51 2010 (r202780) @@ -437,7 +437,7 @@ entries and no entry with the same value .Fa ut_id has been found. The standard always requires a new entry to be allocated, which could -cause an unbounded growth to the database. +cause an unbounded growth of the database. .Pp The .Fn getutxuser From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 07:53:42 2010 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 33BDB106566B; Fri, 22 Jan 2010 07:53:42 +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 220508FC08; Fri, 22 Jan 2010 07:53:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M7rgbG094710; Fri, 22 Jan 2010 07:53:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M7rfX9094706; Fri, 22 Jan 2010 07:53:41 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001220753.o0M7rfX9094706@svn.freebsd.org> From: Michael Tuexen Date: Fri, 22 Jan 2010 07:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202782 - head/sys/netinet 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: Fri, 22 Jan 2010 07:53:42 -0000 Author: tuexen Date: Fri Jan 22 07:53:41 2010 New Revision: 202782 URL: http://svn.freebsd.org/changeset/base/202782 Log: Use [] instead of [0] for flexible arrays. Obtained from: Bruce Cran MFC after: 1 week Modified: head/sys/netinet/sctp_auth.h head/sys/netinet/sctp_header.h head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Fri Jan 22 07:22:46 2010 (r202781) +++ head/sys/netinet/sctp_auth.h Fri Jan 22 07:53:41 2010 (r202782) @@ -60,7 +60,7 @@ typedef union sctp_hash_context { typedef struct sctp_key { uint32_t keylen; - uint8_t key[0]; + uint8_t key[]; } sctp_key_t; typedef struct sctp_shared_key { @@ -83,7 +83,7 @@ typedef struct sctp_auth_chklist { typedef struct sctp_hmaclist { uint16_t max_algo; /* max algorithms allocated */ uint16_t num_algo; /* num algorithms used */ - uint16_t hmac[0]; + uint16_t hmac[]; } sctp_hmaclist_t; /* authentication info */ Modified: head/sys/netinet/sctp_header.h ============================================================================== --- head/sys/netinet/sctp_header.h Fri Jan 22 07:22:46 2010 (r202781) +++ head/sys/netinet/sctp_header.h Fri Jan 22 07:53:41 2010 (r202782) @@ -138,7 +138,7 @@ struct sctp_asconf_addrv4_param { /* an struct sctp_supported_chunk_types_param { struct sctp_paramhdr ph;/* type = 0x8008 len = x */ - uint8_t chunk_types[0]; + uint8_t chunk_types[]; } SCTP_PACKED; @@ -219,7 +219,7 @@ struct sctp_state_cookie { /* this is ou struct sctp_missing_nat_state { uint16_t cause; uint16_t length; - uint8_t data[0]; + uint8_t data[]; } SCTP_PACKED; @@ -451,7 +451,7 @@ struct sctp_pktdrop_chunk { uint32_t current_onq; uint16_t trunc_len; uint16_t reserved; - uint8_t data[0]; + uint8_t data[]; } SCTP_PACKED; /**********STREAM RESET STUFF ******************/ @@ -461,13 +461,13 @@ struct sctp_stream_reset_out_request { uint32_t request_seq; /* monotonically increasing seq no */ uint32_t response_seq; /* if a response, the resp seq no */ uint32_t send_reset_at_tsn; /* last TSN I assigned outbound */ - uint16_t list_of_streams[0]; /* if not all list of streams */ + uint16_t list_of_streams[]; /* if not all list of streams */ } SCTP_PACKED; struct sctp_stream_reset_in_request { struct sctp_paramhdr ph; uint32_t request_seq; - uint16_t list_of_streams[0]; /* if not all list of streams */ + uint16_t list_of_streams[]; /* if not all list of streams */ } SCTP_PACKED; @@ -545,24 +545,24 @@ struct sctp_stream_reset_resp_tsn { #define SCTP_RANDOM_MAX_SIZE 256 struct sctp_auth_random { struct sctp_paramhdr ph;/* type = 0x8002 */ - uint8_t random_data[0]; + uint8_t random_data[]; } SCTP_PACKED; struct sctp_auth_chunk_list { struct sctp_paramhdr ph;/* type = 0x8003 */ - uint8_t chunk_types[0]; + uint8_t chunk_types[]; } SCTP_PACKED; struct sctp_auth_hmac_algo { struct sctp_paramhdr ph;/* type = 0x8004 */ - uint16_t hmac_ids[0]; + uint16_t hmac_ids[]; } SCTP_PACKED; struct sctp_auth_chunk { struct sctp_chunkhdr ch; uint16_t shared_key_id; uint16_t hmac_id; - uint8_t hmac[0]; + uint8_t hmac[]; } SCTP_PACKED; struct sctp_auth_invalid_hmac { Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Fri Jan 22 07:22:46 2010 (r202781) +++ head/sys/netinet/sctp_uio.h Fri Jan 22 07:53:41 2010 (r202782) @@ -276,7 +276,7 @@ struct sctp_send_failed { uint32_t ssf_error; struct sctp_sndrcvinfo ssf_info; sctp_assoc_t ssf_assoc_id; - uint8_t ssf_data[0]; + uint8_t ssf_data[]; }; /* flag that indicates state of data */ @@ -370,7 +370,7 @@ struct sctp_stream_reset_event { uint16_t strreset_flags; uint32_t strreset_length; sctp_assoc_t strreset_assoc_id; - uint16_t strreset_list[0]; + uint16_t strreset_list[]; }; /* flags in strreset_flags field */ @@ -517,13 +517,13 @@ struct sctp_authchunk { struct sctp_authkey { sctp_assoc_t sca_assoc_id; uint16_t sca_keynumber; - uint8_t sca_key[0]; + uint8_t sca_key[]; }; /* SCTP_HMAC_IDENT */ struct sctp_hmacalgo { uint32_t shmac_number_of_idents; - uint16_t shmac_idents[0]; + uint16_t shmac_idents[]; }; /* AUTH hmac_id */ @@ -544,7 +544,7 @@ struct sctp_authkeyid { /* SCTP_PEER_AUTH_CHUNKS / SCTP_LOCAL_AUTH_CHUNKS */ struct sctp_authchunks { sctp_assoc_t gauth_assoc_id; - uint8_t gauth_chunks[0]; + uint8_t gauth_chunks[]; }; struct sctp_assoc_value { @@ -554,7 +554,7 @@ struct sctp_assoc_value { struct sctp_assoc_ids { uint32_t gaids_number_of_ids; - sctp_assoc_t gaids_assoc_id[0]; + sctp_assoc_t gaids_assoc_id[]; }; struct sctp_sack_info { @@ -603,7 +603,7 @@ struct sctp_stream_reset { sctp_assoc_t strrst_assoc_id; uint16_t strrst_flags; uint16_t strrst_num_streams; /* 0 == ALL */ - uint16_t strrst_list[0];/* list if strrst_num_streams is not 0 */ + uint16_t strrst_list[]; /* list if strrst_num_streams is not 0 */ }; @@ -756,7 +756,7 @@ struct sctp_cwnd_log_req { int32_t num_ret; /* Number returned */ int32_t start_at; /* start at this one */ int32_t end_at; /* end at this one */ - struct sctp_cwnd_log log[0]; + struct sctp_cwnd_log log[]; }; struct sctp_timeval { From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 08:45:13 2010 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 41899106566C; Fri, 22 Jan 2010 08:45:13 +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 2FF7E8FC0C; Fri, 22 Jan 2010 08:45:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M8jChv009732; Fri, 22 Jan 2010 08:45:12 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M8jC6v009730; Fri, 22 Jan 2010 08:45:12 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001220845.o0M8jC6v009730@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 22 Jan 2010 08:45: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: r202783 - head/sys/fs/pseudofs 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: Fri, 22 Jan 2010 08:45:13 -0000 Author: jh Date: Fri Jan 22 08:45:12 2010 New Revision: 202783 URL: http://svn.freebsd.org/changeset/base/202783 Log: Truncate read request rather than returning EIO if the request is larger than MAXPHYS + 1. This fixes a problem with cat(1) when it uses a large I/O buffer. Reported by: Fernando Apesteguía Suggested by: jilles Reviewed by: des Approved by: trasz (mentor) Modified: head/sys/fs/pseudofs/pseudofs_vnops.c Modified: head/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vnops.c Fri Jan 22 07:53:41 2010 (r202782) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Fri Jan 22 08:45:12 2010 (r202783) @@ -637,10 +637,8 @@ pfs_read(struct vop_read_args *va) error = EINVAL; goto ret; } - if (buflen > MAXPHYS + 1) { - error = EIO; - goto ret; - } + if (buflen > MAXPHYS + 1) + buflen = MAXPHYS + 1; sb = sbuf_new(sb, NULL, buflen, 0); if (sb == NULL) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 08:51:58 2010 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 C6EF91065672; Fri, 22 Jan 2010 08:51:58 +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 9C29A8FC16; Fri, 22 Jan 2010 08:51:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M8pwUY011733; Fri, 22 Jan 2010 08:51:58 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M8pwCI011730; Fri, 22 Jan 2010 08:51:58 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001220851.o0M8pwCI011730@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 22 Jan 2010 08:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202784 - head/sbin/mdconfig 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: Fri, 22 Jan 2010 08:51:58 -0000 Author: jh Date: Fri Jan 22 08:51:58 2010 New Revision: 202784 URL: http://svn.freebsd.org/changeset/base/202784 Log: Make mdconfig(8) WARNS=6 clean: - Constify geom_config_get() name argument. - Add void keyword for usage(). - Initialize mdunit to NULL. - Don't call md_prthumanval() at all if length is NULL. Approved by: trasz (mentor) Modified: head/sbin/mdconfig/Makefile head/sbin/mdconfig/mdconfig.c Modified: head/sbin/mdconfig/Makefile ============================================================================== --- head/sbin/mdconfig/Makefile Fri Jan 22 08:45:12 2010 (r202783) +++ head/sbin/mdconfig/Makefile Fri Jan 22 08:51:58 2010 (r202784) @@ -4,7 +4,6 @@ PROG= mdconfig MAN= mdconfig.8 MLINKS= mdconfig.8 vnconfig.8 -WARNS?= 2 DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} LDADD= -lutil -lgeom -lbsdxml -lsbuf Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Fri Jan 22 08:45:12 2010 (r202783) +++ head/sbin/mdconfig/mdconfig.c Fri Jan 22 08:51:58 2010 (r202784) @@ -41,7 +41,7 @@ static void usage(void); static int md_find(char *, const char *); static int md_query(char *name); static int md_list(char *units, int opt); -static char *geom_config_get(struct gconf *g, char *name); +static char *geom_config_get(struct gconf *g, const char *name); static void md_prthumanval(char *length); #define OPT_VERBOSE 0x01 @@ -52,7 +52,7 @@ static void md_prthumanval(char *length) #define CLASS_NAME_MD "MD" static void -usage() +usage(void) { fprintf(stderr, "usage: mdconfig -a -t type [-n] [-o [no]option] ... [-f file]\n" @@ -74,7 +74,7 @@ main(int argc, char **argv) int ch, fd, i, vflag; char *p; int cmdline = 0; - char *mdunit; + char *mdunit = NULL; bzero(&mdio, sizeof(mdio)); mdio.md_file = malloc(PATH_MAX); @@ -379,10 +379,9 @@ md_list(char *units, int opt) if (strcmp(type, "vnode") == 0) file = geom_config_get(gc, "file"); length = geom_config_get(gc, "length"); - if (length == NULL) - length = ""; printf("\t%s\t", type); - md_prthumanval(length); + if (length != NULL) + md_prthumanval(length); if (file != NULL) { printf("\t%s", file); file = NULL; @@ -409,7 +408,7 @@ md_list(char *units, int opt) * Returns value of 'name' from gconfig structure. */ static char * -geom_config_get(struct gconf *g, char *name) +geom_config_get(struct gconf *g, const char *name) { struct gconfig *gce; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:19:57 2010 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 86C90106566B; Fri, 22 Jan 2010 09:19:57 +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 756EE8FC0C; Fri, 22 Jan 2010 09:19:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9Jvts019726; Fri, 22 Jan 2010 09:19:57 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9JvQj019724; Fri, 22 Jan 2010 09:19:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001220919.o0M9JvQj019724@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 09:19:57 +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: r202785 - head/sys/mips/cavium 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: Fri, 22 Jan 2010 09:19:57 -0000 Author: imp Date: Fri Jan 22 09:19:57 2010 New Revision: 202785 URL: http://svn.freebsd.org/changeset/base/202785 Log: Jump to the mips reset vector. OR in the 0x80000000 for kseg0 and cast it to a long so it will work on 64-bit targets. reset now works on octeon, so I don't have to power cycle the board as often. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 08:51:58 2010 (r202784) +++ head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 09:19:57 2010 (r202785) @@ -99,7 +99,7 @@ platform_cpu_init() void platform_reset(void) { - ((void(*)(void))0x1fc00000)(); /* Jump to this hex address */ + ((void(*)(void))(long)0x9fc00000)(); /* Jump to MIPS reset vector */ } From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:23:35 2010 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 0AE9F106568B; Fri, 22 Jan 2010 09:23:35 +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 D41688FC0A; Fri, 22 Jan 2010 09:23:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9NYHG020803; Fri, 22 Jan 2010 09:23:34 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9NYBS020801; Fri, 22 Jan 2010 09:23:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001220923.o0M9NYBS020801@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 09:23:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202786 - head/sys/mips/cavium 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: Fri, 22 Jan 2010 09:23:35 -0000 Author: imp Date: Fri Jan 22 09:23:34 2010 New Revision: 202786 URL: http://svn.freebsd.org/changeset/base/202786 Log: Don't clear bss/sbss. The boot loader already does this. In addition, the Cavium version of the boot loader puts data just after &end, so our rounding up to the next page in clearing memory overwrote their data, which meant we'd get a lot of wrong values for parameters to the system. While I'm here, remove argc/argv parsing. Those values aren't passed in via a0 and a1, so it was a guaranted panic on some boards. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 09:19:57 2010 (r202785) +++ head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 09:23:34 2010 (r202786) @@ -643,14 +643,7 @@ platform_start(__register_t a0, __regist __register_t a3) { uint64_t platform_counter_freq; - vm_offset_t kernend; - int argc = a0; - char **argv = (char **)a1; - int i, mem; - - /* clear the BSS and SBSS segments */ - kernend = round_page((vm_offset_t)&end); - memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + int i, mem = 0; /* Initialize pcpu stuff */ mips_pcpu0_init(); @@ -660,17 +653,6 @@ platform_start(__register_t a0, __regist octeon_ciu_reset(); octeon_uart_write_string(0, "Platform Starting\n"); - /* - * Looking for mem=XXM argument - */ - mem = 0; /* Just something to start with */ - for (i=0; i < argc; i++) { - if (strncmp(argv[i], "mem=", 4) == 0) { - mem = strtol(argv[i] + 4, NULL, 0); - break; - } - } - bootverbose = 1; if (mem > 0) realmem = btoc(mem << 20); @@ -694,10 +676,6 @@ platform_start(__register_t a0, __regist platform_counter_freq = 330000000UL; /* XXX: from idt */ mips_timer_init_params(platform_counter_freq, 1); cninit(); - printf("cmd line: "); - for (i=0; i < argc; i++) - printf("%s ", argv[i]); - printf("\n"); init_param2(physmem); mips_cpu_init(); mutex_init(); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:27:32 2010 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 194D01065676; Fri, 22 Jan 2010 09:27:32 +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 072908FC12; Fri, 22 Jan 2010 09:27:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9RVjL022019; Fri, 22 Jan 2010 09:27:31 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9RV7c022017; Fri, 22 Jan 2010 09:27:31 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001220927.o0M9RV7c022017@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Jan 2010 09:27:31 +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: r202787 - stable/8/lib/libstand 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: Fri, 22 Jan 2010 09:27:32 -0000 Author: avg Date: Fri Jan 22 09:27:31 2010 New Revision: 202787 URL: http://svn.freebsd.org/changeset/base/202787 Log: MFC r202585: fix a comment typo Modified: stable/8/lib/libstand/bzipfs.c Directory Properties: stable/8/lib/libstand/ (props changed) Modified: stable/8/lib/libstand/bzipfs.c ============================================================================== --- stable/8/lib/libstand/bzipfs.c Fri Jan 22 09:23:34 2010 (r202786) +++ stable/8/lib/libstand/bzipfs.c Fri Jan 22 09:27:31 2010 (r202787) @@ -279,7 +279,7 @@ bzf_rewind(struct open_file *f) /* * Since bzip2 does not have an equivalent inflateReset function a crude * one needs to be provided. The functions all called in such a way that - * at any time an error occurs a role back can be done (effectively making + * at any time an error occurs a roll back can be done (effectively making * this rewind 'atomic', either the reset occurs successfully or not at all, * with no 'undefined' state happening). */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:30:10 2010 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 4395F106566C; Fri, 22 Jan 2010 09:30:10 +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 319578FC15; Fri, 22 Jan 2010 09:30:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9UAOx022817; Fri, 22 Jan 2010 09:30:10 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9UApw022815; Fri, 22 Jan 2010 09:30:10 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001220930.o0M9UApw022815@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Jan 2010 09:30:10 +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: r202788 - stable/7/lib/libstand 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: Fri, 22 Jan 2010 09:30:10 -0000 Author: avg Date: Fri Jan 22 09:30:09 2010 New Revision: 202788 URL: http://svn.freebsd.org/changeset/base/202788 Log: MFC r202585: fix a comment typo Modified: stable/7/lib/libstand/bzipfs.c Directory Properties: stable/7/lib/libstand/ (props changed) Modified: stable/7/lib/libstand/bzipfs.c ============================================================================== --- stable/7/lib/libstand/bzipfs.c Fri Jan 22 09:27:31 2010 (r202787) +++ stable/7/lib/libstand/bzipfs.c Fri Jan 22 09:30:09 2010 (r202788) @@ -279,7 +279,7 @@ bzf_rewind(struct open_file *f) /* * Since bzip2 does not have an equivalent inflateReset function a crude * one needs to be provided. The functions all called in such a way that - * at any time an error occurs a role back can be done (effectively making + * at any time an error occurs a roll back can be done (effectively making * this rewind 'atomic', either the reset occurs successfully or not at all, * with no 'undefined' state happening). */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:31:10 2010 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 EA8BB1065672; Fri, 22 Jan 2010 09:31:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D81EB8FC18; Fri, 22 Jan 2010 09:31:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9VAcE023167; Fri, 22 Jan 2010 09:31:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9VA5E023165; Fri, 22 Jan 2010 09:31:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001220931.o0M9VA5E023165@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 09:31: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: r202789 - head/sys/dev/sound/pci/hda 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: Fri, 22 Jan 2010 09:31:11 -0000 Author: mav Date: Fri Jan 22 09:31:10 2010 New Revision: 202789 URL: http://svn.freebsd.org/changeset/base/202789 Log: - Improve tracer, to handle more cases of input-to-output monitoring loopback. - Change the meaning of "mix" OSS control. Now it controls loopback level, according to comments in soundcard.h. - Allow AD1981HD codecs to use playback mixer. Now driver should be able to really use it. - Fix bug in shared muters operation. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:30:09 2010 (r202788) +++ head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:31:10 2010 (r202789) @@ -86,7 +86,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20100112_0140" +#define HDA_DRV_TEST_REV "20100122_0141" SND_DECLARE_FILE("$FreeBSD$"); @@ -3934,8 +3934,8 @@ hdac_audio_ctl_ossmixer_set(struct snd_m rvol = rvol * pdevinfo->right[j] / 100; } } - mute = (left == 0) ? HDA_AMP_MUTE_LEFT : 0; - mute |= (right == 0) ? HDA_AMP_MUTE_RIGHT : 0; + mute = (lvol == 0) ? HDA_AMP_MUTE_LEFT : 0; + mute |= (rvol == 0) ? HDA_AMP_MUTE_RIGHT : 0; lvol = (lvol * ctl->step + 50) / 100; rvol = (rvol * ctl->step + 50) / 100; hdac_audio_ctl_amp_set(ctl, mute, lvol, rvol); @@ -4757,37 +4757,6 @@ hdac_vendor_patch_parse(struct hdac_devi } switch (id) { -#if 0 - case HDA_CODEC_ALC883: - /* - * nid: 24/25 = External (jack) or Internal (fixed) Mic. - * Clear vref cap for jack connectivity. - */ - w = hdac_widget_get(devinfo, 24); - if (w != NULL && w->enable != 0 && w->type == - HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && - (w->wclass.pin.config & - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK) - w->wclass.pin.cap &= ~( - HDA_PARAM_PIN_CAP_VREF_CTRL_100_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_80_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_50_MASK); - w = hdac_widget_get(devinfo, 25); - if (w != NULL && w->enable != 0 && w->type == - HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && - (w->wclass.pin.config & - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK) - w->wclass.pin.cap &= ~( - HDA_PARAM_PIN_CAP_VREF_CTRL_100_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_80_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_50_MASK); - /* - * nid: 26 = Line-in, leave it alone. - */ - break; -#endif case HDA_CODEC_AD1983: /* * This codec has several possible usages, but none @@ -4900,10 +4869,19 @@ hdac_vendor_patch_parse(struct hdac_devi w = hdac_widget_get(devinfo, 31); if (w != NULL) w->enable = 0; - /* Disable playback mixer, use direct bypass. */ - w = hdac_widget_get(devinfo, 14); + /* Disable direct playback, use mixer. */ + w = hdac_widget_get(devinfo, 5); if (w != NULL) - w->enable = 0; + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 6); + if (w != NULL) + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 9); + if (w != NULL) + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 24); + if (w != NULL) + w->connsenable[0] = 0; break; } } @@ -5279,6 +5257,8 @@ hdac_audio_trace_to_out(struct hdac_devi " %*snid %d found output association %d\n", depth + 1, "", w->nid, w->bindas); ); + if (w->bindas >= 0) + w->pflags |= HDA_ADC_MONITOR; return (1); } else { HDA_BOOTHVERBOSE( @@ -5321,7 +5301,7 @@ hdac_audio_trace_to_out(struct hdac_devi } break; } - if (res) + if (res && w->bindas == -1) w->bindas = -2; HDA_BOOTHVERBOSE( @@ -5368,11 +5348,39 @@ hdac_audio_trace_as_extra(struct hdac_de " nid %d is input monitor\n", w->nid); ); - w->pflags |= HDA_ADC_MONITOR; w->ossdev = SOUND_MIXER_IMIX; } } + /* Other inputs monitor */ + /* Find input pins supplying signal for output associations. + Hope it will be input monitoring. */ + HDA_BOOTVERBOSE( + device_printf(devinfo->codec->sc->dev, + "Tracing other input monitors\n"); + ); + for (j = devinfo->startnode; j < devinfo->endnode; j++) { + w = hdac_widget_get(devinfo, j); + if (w == NULL || w->enable == 0) + continue; + if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) + continue; + if (w->bindas < 0 || as[w->bindas].dir != HDA_CTL_IN) + continue; + HDA_BOOTVERBOSE( + device_printf(devinfo->codec->sc->dev, + " Tracing nid %d to out\n", + j); + ); + if (hdac_audio_trace_to_out(devinfo, w->nid, 0)) { + HDA_BOOTVERBOSE( + device_printf(devinfo->codec->sc->dev, + " nid %d is input monitor\n", + w->nid); + ); + } + } + /* Beeper */ HDA_BOOTVERBOSE( device_printf(devinfo->codec->sc->dev, @@ -5748,6 +5756,7 @@ hdac_audio_disable_notselected(struct hd static void hdac_audio_disable_crossas(struct hdac_devinfo *devinfo) { + struct hdac_audio_as *ases = devinfo->function.audio.as; struct hdac_widget *w, *cw; struct hdac_audio_ctl *ctl; int i, j; @@ -5770,7 +5779,10 @@ hdac_audio_disable_crossas(struct hdac_d cw = hdac_widget_get(devinfo, w->conns[j]); if (cw == NULL || w->enable == 0) continue; - if (cw->bindas == -2) + if (cw->bindas == -2 || + ((w->pflags & HDA_ADC_MONITOR) && + cw->bindas >= 0 && + ases[cw->bindas].dir == HDA_CTL_IN)) continue; if (w->bindas == cw->bindas && (w->bindseqmask & cw->bindseqmask) != 0) @@ -5789,8 +5801,12 @@ hdac_audio_disable_crossas(struct hdac_d while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) { if (ctl->enable == 0 || ctl->childwidget == NULL) continue; - if (ctl->widget->bindas == -2 || - ctl->childwidget->bindas == -2) + if (ctl->widget->bindas == -2) + continue; + if (ctl->childwidget->bindas == -2 || + ((ctl->widget->pflags & HDA_ADC_MONITOR) && + ctl->childwidget->bindas >= 0 && + ases[ctl->childwidget->bindas].dir == HDA_CTL_IN)) continue; if (ctl->widget->bindas != ctl->childwidget->bindas || (ctl->widget->bindseqmask & ctl->childwidget->bindseqmask) == 0) { @@ -5909,7 +5925,7 @@ hdac_audio_ctl_source_amp(struct hdac_de * Find controls to control amplification for destination. */ static void -hdac_audio_ctl_dest_amp(struct hdac_devinfo *devinfo, nid_t nid, +hdac_audio_ctl_dest_amp(struct hdac_devinfo *devinfo, nid_t nid, int index, int ossdev, int depth, int need) { struct hdac_audio_as *as = devinfo->function.audio.as; @@ -5968,6 +5984,8 @@ hdac_audio_ctl_dest_amp(struct hdac_devi int tneed = need; if (w->connsenable[i] == 0) continue; + if (index >= 0 && i != index) + continue; ctl = hdac_audio_ctl_amp_get(devinfo, w->nid, HDA_CTL_IN, i, 1); if (ctl) { @@ -5977,7 +5995,7 @@ hdac_audio_ctl_dest_amp(struct hdac_devi ctl->possmask |= (1 << ossdev); tneed &= ~HDA_CTL_GIVE(ctl); } - hdac_audio_ctl_dest_amp(devinfo, w->conns[i], ossdev, + hdac_audio_ctl_dest_amp(devinfo, w->conns[i], -1, ossdev, depth + 1, tneed); } } @@ -6184,8 +6202,8 @@ hdac_audio_assign_mixers(struct hdac_dev { struct hdac_audio_as *as = devinfo->function.audio.as; struct hdac_audio_ctl *ctl; - struct hdac_widget *w; - int i; + struct hdac_widget *w, *cw; + int i, j; /* Assign mixers to the tree. */ for (i = devinfo->startnode; i < devinfo->endnode; i++) { @@ -6200,24 +6218,30 @@ hdac_audio_assign_mixers(struct hdac_dev continue; hdac_audio_ctl_source_amp(devinfo, w->nid, -1, w->ossdev, 1, 0, 1); - } else if ((w->pflags & HDA_ADC_MONITOR) != 0) { - if (w->ossdev < 0) - continue; - if (hdac_audio_ctl_source_amp(devinfo, w->nid, -1, - w->ossdev, 1, 0, 1)) { - /* If we are unable to control input monitor - as source - try to control it as destination. */ - hdac_audio_ctl_dest_amp(devinfo, w->nid, - w->ossdev, 0, 1); - } } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) { - hdac_audio_ctl_dest_amp(devinfo, w->nid, + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, SOUND_MIXER_RECLEV, 0, 1); } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && as[w->bindas].dir == HDA_CTL_OUT) { - hdac_audio_ctl_dest_amp(devinfo, w->nid, + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, SOUND_MIXER_VOLUME, 0, 1); } + if (w->pflags & HDA_ADC_MONITOR) { + for (j = 0; j < w->nconns; j++) { + if (!w->connsenable[j]) + continue; + cw = hdac_widget_get(devinfo, w->conns[j]); + if (cw == NULL || cw->enable == 0) + continue; + if (cw->bindas == -1) + continue; + if (cw->bindas >= 0 && + as[cw->bindas].dir != HDA_CTL_IN) + continue; + hdac_audio_ctl_dest_amp(devinfo, + w->nid, j, SOUND_MIXER_IMIX, 0, 1); + } + } } /* Treat unrequired as possible. */ i = 0; @@ -7160,7 +7184,7 @@ hdac_dump_mix(struct hdac_pcm_devinfo *p w = hdac_widget_get(devinfo, i); if (w == NULL || w->enable == 0) continue; - if ((w->pflags & HDA_ADC_MONITOR) == 0) + if (w->ossdev != SOUND_MIXER_IMIX) continue; if (printed == 0) { printed = 1; @@ -8126,7 +8150,7 @@ hdac_pcm_attach(device_t dev) hdac_dump_ctls(pdevinfo, "Line-in Volume", SOUND_MASK_LINE); hdac_dump_ctls(pdevinfo, "Speaker/Beep Volume", SOUND_MASK_SPEAKER); hdac_dump_ctls(pdevinfo, "Recording Level", SOUND_MASK_RECLEV); - hdac_dump_ctls(pdevinfo, "Input Mix Level", SOUND_MASK_IMIX); + hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IMIX); hdac_dump_ctls(pdevinfo, NULL, 0); device_printf(dev, "\n"); ); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:34:58 2010 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 493F6106566B; Fri, 22 Jan 2010 09:34:58 +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 3707E8FC08; Fri, 22 Jan 2010 09:34:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9Yw49024291; Fri, 22 Jan 2010 09:34:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9YwrS024289; Fri, 22 Jan 2010 09:34:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001220934.o0M9YwrS024289@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Jan 2010 09:34:58 +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: r202790 - stable/8/sys/dev/acpica 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: Fri, 22 Jan 2010 09:34:58 -0000 Author: avg Date: Fri Jan 22 09:34:57 2010 New Revision: 202790 URL: http://svn.freebsd.org/changeset/base/202790 Log: MFC r202558: acpi_ec: clean up 'private' ivar when freeing memory Modified: stable/8/sys/dev/acpica/acpi_ec.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_ec.c Fri Jan 22 09:31:10 2010 (r202789) +++ stable/8/sys/dev/acpica/acpi_ec.c Fri Jan 22 09:34:57 2010 (r202790) @@ -469,6 +469,7 @@ acpi_ec_attach(device_t dev) sc->ec_gpehandle = params->gpe_handle; sc->ec_uid = params->uid; sc->ec_suspending = FALSE; + acpi_set_private(dev, NULL); free(params, M_TEMP); /* Attach bus resources for data and command/status ports. */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:37:48 2010 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 21534106568D; Fri, 22 Jan 2010 09:37:48 +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 0E3C08FC0A; Fri, 22 Jan 2010 09:37:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9bljE025149; Fri, 22 Jan 2010 09:37:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9blgu025147; Fri, 22 Jan 2010 09:37:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001220937.o0M9blgu025147@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Jan 2010 09:37:47 +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: r202791 - stable/7/sys/dev/acpica 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: Fri, 22 Jan 2010 09:37:48 -0000 Author: avg Date: Fri Jan 22 09:37:47 2010 New Revision: 202791 URL: http://svn.freebsd.org/changeset/base/202791 Log: MFC r202558: acpi_ec: clean up 'private' ivar when freeing memory Modified: stable/7/sys/dev/acpica/acpi_ec.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_ec.c Fri Jan 22 09:34:57 2010 (r202790) +++ stable/7/sys/dev/acpica/acpi_ec.c Fri Jan 22 09:37:47 2010 (r202791) @@ -467,6 +467,7 @@ acpi_ec_attach(device_t dev) sc->ec_gpehandle = params->gpe_handle; sc->ec_uid = params->uid; sc->ec_suspending = FALSE; + acpi_set_private(dev, NULL); free(params, M_TEMP); /* Attach bus resources for data and command/status ports. */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:41:09 2010 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 C0D511065692; Fri, 22 Jan 2010 09:41:09 +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 AE99D8FC2B; Fri, 22 Jan 2010 09:41:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9f9Ac025984; Fri, 22 Jan 2010 09:41:09 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9f9tp025982; Fri, 22 Jan 2010 09:41:09 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001220941.o0M9f9tp025982@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Jan 2010 09:41: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: r202792 - stable/8/sys/dev/acpica 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: Fri, 22 Jan 2010 09:41:09 -0000 Author: avg Date: Fri Jan 22 09:41:09 2010 New Revision: 202792 URL: http://svn.freebsd.org/changeset/base/202792 Log: MFC r202567: acpi_ec: remove redundant acpi_disabled check Modified: stable/8/sys/dev/acpica/acpi_ec.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_ec.c Fri Jan 22 09:37:47 2010 (r202791) +++ stable/8/sys/dev/acpica/acpi_ec.c Fri Jan 22 09:41:09 2010 (r202792) @@ -366,8 +366,7 @@ acpi_ec_probe(device_t dev) if (params != NULL) { ecdt = 1; ret = 0; - } else if (!acpi_disabled("ec") && - ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { + } else if (ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { params = malloc(sizeof(struct acpi_ec_params), M_TEMP, M_WAITOK | M_ZERO); h = acpi_get_handle(dev); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:42:42 2010 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 43ECC1065692; Fri, 22 Jan 2010 09:42:42 +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 316678FC23; Fri, 22 Jan 2010 09:42:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9ggAf026393; Fri, 22 Jan 2010 09:42:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9gg7Y026376; Fri, 22 Jan 2010 09:42:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001220942.o0M9gg7Y026376@svn.freebsd.org> From: Andriy Gapon Date: Fri, 22 Jan 2010 09:42:42 +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: r202793 - stable/7/sys/dev/acpica 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: Fri, 22 Jan 2010 09:42:42 -0000 Author: avg Date: Fri Jan 22 09:42:41 2010 New Revision: 202793 URL: http://svn.freebsd.org/changeset/base/202793 Log: MFC r202567: acpi_ec: remove redundant acpi_disabled check Modified: stable/7/sys/dev/acpica/acpi_ec.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/acpica/acpi_ec.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_ec.c Fri Jan 22 09:41:09 2010 (r202792) +++ stable/7/sys/dev/acpica/acpi_ec.c Fri Jan 22 09:42:41 2010 (r202793) @@ -364,8 +364,7 @@ acpi_ec_probe(device_t dev) if (params != NULL) { ecdt = 1; ret = 0; - } else if (!acpi_disabled("ec") && - ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { + } else if (ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { params = malloc(sizeof(struct acpi_ec_params), M_TEMP, M_WAITOK | M_ZERO); h = acpi_get_handle(dev); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:54:40 2010 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 BE88E106568D; Fri, 22 Jan 2010 09:54:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 936C78FC13; Fri, 22 Jan 2010 09:54:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9seId029126; Fri, 22 Jan 2010 09:54:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9se66029124; Fri, 22 Jan 2010 09:54:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001220954.o0M9se66029124@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 09:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202796 - head/sys/dev/sound/pci/hda 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: Fri, 22 Jan 2010 09:54:40 -0000 Author: mav Date: Fri Jan 22 09:54:40 2010 New Revision: 202796 URL: http://svn.freebsd.org/changeset/base/202796 Log: Oops! r202789 broke recording from input mixer. Restore previous "mix" usage and use "igain" instead for input-to-output monitoring loopback. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:50:17 2010 (r202795) +++ head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:54:40 2010 (r202796) @@ -6226,6 +6226,15 @@ hdac_audio_assign_mixers(struct hdac_dev hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, SOUND_MIXER_VOLUME, 0, 1); } + if (w->ossdev == SOUND_MIXER_IMIX) { + if (hdac_audio_ctl_source_amp(devinfo, w->nid, -1, + w->ossdev, 1, 0, 1)) { + /* If we are unable to control input monitor + as source - try to control it as destination. */ + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, + w->ossdev, 0, 1); + } + } if (w->pflags & HDA_ADC_MONITOR) { for (j = 0; j < w->nconns; j++) { if (!w->connsenable[j]) @@ -6239,7 +6248,7 @@ hdac_audio_assign_mixers(struct hdac_dev as[cw->bindas].dir != HDA_CTL_IN) continue; hdac_audio_ctl_dest_amp(devinfo, - w->nid, j, SOUND_MIXER_IMIX, 0, 1); + w->nid, j, SOUND_MIXER_IGAIN, 0, 1); } } } @@ -6739,8 +6748,8 @@ hdac_dump_ctls(struct hdac_pcm_devinfo * if (flag == 0) { flag = ~(SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_CD | SOUND_MASK_LINE | SOUND_MASK_RECLEV | - SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_OGAIN | - SOUND_MASK_IMIX | SOUND_MASK_MONITOR); + SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_IGAIN | + SOUND_MASK_OGAIN | SOUND_MASK_IMIX | SOUND_MASK_MONITOR); } for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) { @@ -8150,7 +8159,8 @@ hdac_pcm_attach(device_t dev) hdac_dump_ctls(pdevinfo, "Line-in Volume", SOUND_MASK_LINE); hdac_dump_ctls(pdevinfo, "Speaker/Beep Volume", SOUND_MASK_SPEAKER); hdac_dump_ctls(pdevinfo, "Recording Level", SOUND_MASK_RECLEV); - hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IMIX); + hdac_dump_ctls(pdevinfo, "Input Mix Level", SOUND_MASK_IMIX); + hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IGAIN); hdac_dump_ctls(pdevinfo, NULL, 0); device_printf(dev, "\n"); ); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:55:13 2010 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 76C2A1065692; Fri, 22 Jan 2010 09:55:13 +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 658F18FC1E; Fri, 22 Jan 2010 09:55:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9tD1d029308; Fri, 22 Jan 2010 09:55:13 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9tD2g029306; Fri, 22 Jan 2010 09:55:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001220955.o0M9tD2g029306@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 09:55: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: r202797 - head/sys/mips/mips 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: Fri, 22 Jan 2010 09:55:13 -0000 Author: imp Date: Fri Jan 22 09:55:13 2010 New Revision: 202797 URL: http://svn.freebsd.org/changeset/base/202797 Log: Add a suggested improvement. Modified: head/sys/mips/mips/tick.c Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Fri Jan 22 09:54:40 2010 (r202796) +++ head/sys/mips/mips/tick.c Fri Jan 22 09:55:13 2010 (r202797) @@ -144,6 +144,7 @@ mips_timer_init_params(uint64_t platform /* * XXX: Some MIPS32 cores update the Count register only every two * pipeline cycles. + * We know this because of status registers in CP0, make it automatic. */ if (double_count != 0) counter_freq /= 2; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:04:25 2010 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 AE45C1065676; Fri, 22 Jan 2010 11:04:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA9F8FC13; Fri, 22 Jan 2010 11:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MB4P2A049142; Fri, 22 Jan 2010 11:04:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MB4PSL049140; Fri, 22 Jan 2010 11:04:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001221104.o0MB4PSL049140@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 11:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202798 - head/share/man/man4 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: Fri, 22 Jan 2010 11:04:25 -0000 Author: mav Date: Fri Jan 22 11:04:25 2010 New Revision: 202798 URL: http://svn.freebsd.org/changeset/base/202798 Log: Add "MIXER CONTROLS" chapter. Modified: head/share/man/man4/snd_hda.4 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Fri Jan 22 09:55:13 2010 (r202797) +++ head/share/man/man4/snd_hda.4 Fri Jan 22 11:04:25 2010 (r202798) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2010 +.Dd January 22, 2010 .Dt SND_HDA 4 .Os .Sh NAME @@ -459,6 +459,42 @@ mic and line-in) and headset (headphones .Li pcm1 for internal speaker playback. On headphones connection rear connectors will be muted. +.Sh MIXER CONTROLS +Depending on codec configuration, these controls and signal sources could be +reported to +.Xr sound 4 : +.Pp +.Bl -tag -width ".Va speaker" -offset indent +.It Va vol +overall output level (volume) +.It Va rec +overall recording level +.It Va igain +input-to-output monitoring loopback level +.It Va ogain +external amplifier control +.It Va pcm +PCM playback +.It Va mix +input mix +.It Va mic +first external or second internal microphone input +.It Va monitor +first internal or second external microphone input +.It Va line , Va line1 , Va line2, Va line3 +analog (line) inputs +.It Va dig1 , Va dig2 , Va dig3 +digital (S/PDIF, HDMI or DisplayPort) inputs +.It Va cd +CD input +.It Va speaker +PC speaker input +.It Va phin , Va phout , Va radio . Va video +other random inputs +.El +.Pp +Controls have different precision. Some could be just an on/off triggers. +Most of controls use logarithmic scale. .Sh HARDWARE The .Nm From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:16:47 2010 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 0EC691065670; Fri, 22 Jan 2010 11:16:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0B058FC08; Fri, 22 Jan 2010 11:16:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBGkvd052003; Fri, 22 Jan 2010 11:16:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBGko0052001; Fri, 22 Jan 2010 11:16:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001221116.o0MBGko0052001@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 11:16:46 +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: r202799 - stable/8/sys/dev/ppbus 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: Fri, 22 Jan 2010 11:16:47 -0000 Author: mav Date: Fri Jan 22 11:16:46 2010 New Revision: 202799 URL: http://svn.freebsd.org/changeset/base/202799 Log: MFC r197420: Lock bus scan. Modified: stable/8/sys/dev/ppbus/vpo.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ppbus/vpo.c ============================================================================== --- stable/8/sys/dev/ppbus/vpo.c Fri Jan 22 11:04:25 2010 (r202798) +++ stable/8/sys/dev/ppbus/vpo.c Fri Jan 22 11:16:46 2010 (r202799) @@ -176,9 +176,6 @@ vpo_attach(device_t dev) return (ENXIO); } ppb_unlock(ppbus); - - /* all went ok */ - vpo_cam_rescan(vpo); /* have CAM rescan the bus */ return (0); @@ -194,12 +191,15 @@ vpo_cam_rescan_callback(struct cam_perip static void vpo_cam_rescan(struct vpo_data *vpo) { + device_t ppbus = device_get_parent(vpo->vpo_dev); struct cam_path *path; union ccb *ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO); + ppb_lock(ppbus); if (xpt_create_path(&path, xpt_periph, cam_sim_path(vpo->sim), 0, 0) != CAM_REQ_CMP) { /* A failure is benign as the user can do a manual rescan */ + ppb_unlock(ppbus); free(ccb, M_TEMP); return; } @@ -209,6 +209,7 @@ vpo_cam_rescan(struct vpo_data *vpo) ccb->ccb_h.cbfcnp = vpo_cam_rescan_callback; ccb->crcn.flags = CAM_FLAG_NONE; xpt_action(ccb); + ppb_unlock(ppbus); /* The scan is in progress now. */ } From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:30:32 2010 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 C816D106566B; Fri, 22 Jan 2010 11:30:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5E458FC16; Fri, 22 Jan 2010 11:30:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBUWMh055106; Fri, 22 Jan 2010 11:30:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBUWaw055104; Fri, 22 Jan 2010 11:30:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001221130.o0MBUWaw055104@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 11:30:32 +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: r202800 - stable/8/sys/dev/sound/pcm 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: Fri, 22 Jan 2010 11:30:32 -0000 Author: mav Date: Fri Jan 22 11:30:32 2010 New Revision: 202800 URL: http://svn.freebsd.org/changeset/base/202800 Log: MFC r202166: Make default recording source choosing more intelligent. Change default recording level from 0 to 75. It should increase chances for things to work just out of the box. Modified: stable/8/sys/dev/sound/pcm/mixer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/8/sys/dev/sound/pcm/mixer.c Fri Jan 22 11:16:46 2010 (r202799) +++ stable/8/sys/dev/sound/pcm/mixer.c Fri Jan 22 11:30:32 2010 (r202800) @@ -87,7 +87,7 @@ static u_int16_t snd_mixerdefaults[SOUND [SOUND_MIXER_IGAIN] = 0, [SOUND_MIXER_LINE1] = 75, [SOUND_MIXER_VIDEO] = 75, - [SOUND_MIXER_RECLEV] = 0, + [SOUND_MIXER_RECLEV] = 75, [SOUND_MIXER_OGAIN] = 50, [SOUND_MIXER_MONITOR] = 75, }; @@ -352,7 +352,13 @@ mixer_setrecsrc(struct snd_mixer *mixer, dropmtx = 0; src &= mixer->recdevs; if (src == 0) - src = SOUND_MASK_MIC; + src = mixer->recdevs & SOUND_MASK_MIC; + if (src == 0) + src = mixer->recdevs & SOUND_MASK_MONITOR; + if (src == 0) + src = mixer->recdevs & SOUND_MASK_LINE; + if (src == 0 && mixer->recdevs != 0) + src = (1 << (ffs(mixer->recdevs) - 1)); /* It is safe to drop this mutex due to Giant. */ MIXER_SET_UNLOCK(mixer, dropmtx); recsrc = MIXER_SETRECSRC(mixer, src); @@ -716,7 +722,7 @@ mixer_init(device_t dev, kobj_class_t cl mixer_set(m, i, v | (v << 8)); } - mixer_setrecsrc(m, SOUND_MASK_MIC); + mixer_setrecsrc(m, 0); /* Set default input. */ unit = device_get_unit(dev); devunit = snd_mkunit(unit, SND_DEV_CTL, 0); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:31:50 2010 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 4D89D106566B; Fri, 22 Jan 2010 11:31:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21C348FC08; Fri, 22 Jan 2010 11:31:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBVoNP055458; Fri, 22 Jan 2010 11:31:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBVo29055455; Fri, 22 Jan 2010 11:31:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001221131.o0MBVo29055455@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 11:31:49 +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: r202801 - stable/8/sys/dev/sound/pcm 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: Fri, 22 Jan 2010 11:31:50 -0000 Author: mav Date: Fri Jan 22 11:31:49 2010 New Revision: 202801 URL: http://svn.freebsd.org/changeset/base/202801 Log: MFC r202267: Hide from default sndstat some information not used on daily basis, to make it readable by average user with average screen size. Modified: stable/8/sys/dev/sound/pcm/sndstat.c stable/8/sys/dev/sound/pcm/sndstat.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pcm/sndstat.c ============================================================================== --- stable/8/sys/dev/sound/pcm/sndstat.c Fri Jan 22 11:30:32 2010 (r202800) +++ stable/8/sys/dev/sound/pcm/sndstat.c Fri Jan 22 11:31:49 2010 (r202801) @@ -81,7 +81,7 @@ static int sndstat_files = 0; static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(none); -int snd_verbose = 1; +int snd_verbose = 0; TUNABLE_INT("hw.snd.verbose", &snd_verbose); #ifdef SND_DEBUG @@ -372,12 +372,10 @@ sndstat_prepare(struct sbuf *s) PCM_ACQUIRE_QUICK(d); sbuf_printf(s, "%s:", device_get_nameunit(ent->dev)); sbuf_printf(s, " <%s>", device_get_desc(ent->dev)); - sbuf_printf(s, " %s [%s]", ent->str, - (d->flags & SD_F_MPSAFE) ? "MPSAFE" : "GIANT"); + if (snd_verbose > 0) + sbuf_printf(s, " %s", ent->str); if (ent->handler) ent->handler(s, ent->dev, snd_verbose); - else - sbuf_printf(s, " [no handler]"); sbuf_printf(s, "\n"); PCM_RELEASE_QUICK(d); } Modified: stable/8/sys/dev/sound/pcm/sndstat.h ============================================================================== --- stable/8/sys/dev/sound/pcm/sndstat.h Fri Jan 22 11:30:32 2010 (r202800) +++ stable/8/sys/dev/sound/pcm/sndstat.h Fri Jan 22 11:31:49 2010 (r202801) @@ -37,9 +37,6 @@ struct pcm_channel *c; \ struct pcm_feeder *f; \ \ - if (verbose < 1) \ - return (0); \ - \ d = device_get_softc(dev); \ PCM_BUSYASSERT(d); \ \ @@ -48,9 +45,19 @@ return (0); \ } \ \ - sbuf_printf(s, " (%dp:%dv/%dr:%dv channels %splex%s)", \ - d->playcount, d->pvchancount, d->reccount, d->rvchancount, \ - (d->flags & SD_F_SIMPLEX) ? "sim" : "du", \ + if (verbose < 1) { \ + sbuf_printf(s, " (%s%s%s", \ + d->playcount ? "play" : "", \ + (d->playcount && d->reccount) ? "/" : "", \ + d->reccount ? "rec" : ""); \ + } else { \ + sbuf_printf(s, " (%dp:%dv/%dr:%dv", \ + d->playcount, d->pvchancount, \ + d->reccount, d->rvchancount); \ + } \ + sbuf_printf(s, "%s)%s", \ + ((d->playcount != 0 && d->reccount != 0) && \ + (d->flags & SD_F_SIMPLEX)) ? " simplex" : "", \ (device_get_unit(dev) == snd_unit) ? " default" : "") From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:37:19 2010 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 DD65D106566C; Fri, 22 Jan 2010 11:37:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA6C48FC19; Fri, 22 Jan 2010 11:37:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBbJrj056772; Fri, 22 Jan 2010 11:37:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBbJFB056769; Fri, 22 Jan 2010 11:37:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001221137.o0MBbJFB056769@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 11:37:19 +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: r202802 - stable/8/sys/dev/sound/pci/hda 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: Fri, 22 Jan 2010 11:37:20 -0000 Author: mav Date: Fri Jan 22 11:37:19 2010 New Revision: 202802 URL: http://svn.freebsd.org/changeset/base/202802 Log: MFC r202127, r202156: Add multichannel (4.0, 5.1 and 7.1) playback support. Stereo stream is no more duplicated to all ports. If you loose sound, check you are using right connectors. Front speakers connector is usually green, center/LFE - orange, rear - black, side - gray. Modified: stable/8/sys/dev/sound/pci/hda/hdac.c stable/8/sys/dev/sound/pci/hda/hdac_private.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 11:31:49 2010 (r202801) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 11:37:19 2010 (r202802) @@ -86,7 +86,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20091113_0138" +#define HDA_DRV_TEST_REV "20100112_0140" SND_DECLARE_FILE("$FreeBSD$"); @@ -3455,7 +3455,11 @@ hdac_stream_setup(struct hdac_chan *ch) int i, chn, totalchn, c; nid_t cad = ch->devinfo->codec->cad; uint16_t fmt, dfmt; + uint16_t chmap[2][5] = {{ 0x0010, 0x0001, 0x0201, 0x0231, 0x0231 }, /* 5.1 */ + { 0x0010, 0x0001, 0x2001, 0x2031, 0x2431 }};/* 7.1 */ + int map = -1; + totalchn = AFMT_CHANNEL(ch->fmt); HDA_BOOTHVERBOSE( device_printf(ch->pdevinfo->dev, "PCMDIR_%s: Stream setup fmt=%08x speed=%d\n", @@ -3469,7 +3473,6 @@ hdac_stream_setup(struct hdac_chan *ch) fmt |= ch->bit32 << 4; else fmt |= 1 << 4; - for (i = 0; i < HDA_RATE_TAB_LEN; i++) { if (hda_rate_tab[i].valid && ch->spd == hda_rate_tab[i].rate) { fmt |= hda_rate_tab[i].base; @@ -3478,10 +3481,13 @@ hdac_stream_setup(struct hdac_chan *ch) break; } } + fmt |= (totalchn - 1); - totalchn = AFMT_CHANNEL(ch->fmt); - if (totalchn > 1) - fmt |= 1; + /* Set channel mapping for known speaker setups. */ + if (as->pinset == 0x0007 || as->pinset == 0x0013) /* Standard 5.1 */ + map = 0; + else if (as->pinset == 0x0017) /* Standard 7.1 */ + map = 1; HDAC_WRITE_2(&sc->mem, ch->off + HDAC_SDFMT, fmt); @@ -3495,14 +3501,26 @@ hdac_stream_setup(struct hdac_chan *ch) if (w == NULL) continue; - if (as->hpredir >= 0 && i == as->pincnt) - chn = 0; + /* If HP redirection is enabled, but failed to use same + DAC, make last DAC to duplicate first one. */ + if (as->hpredir >= 0 && i == as->pincnt) { + c = (ch->sid << 4); + } else { + if (map >= 0) /* Map known speaker setups. */ + chn = (((chmap[map][totalchn / 2] >> i * 4) & + 0xf) - 1) * 2; + if (chn < 0 || chn >= totalchn) { + c = 0; + } else { + c = (ch->sid << 4) | chn; + } + } HDA_BOOTHVERBOSE( device_printf(ch->pdevinfo->dev, "PCMDIR_%s: Stream setup nid=%d: " - "fmt=0x%04x, dfmt=0x%04x\n", + "fmt=0x%04x, dfmt=0x%04x, chan=0x%04x\n", (ch->dir == PCMDIR_PLAY) ? "PLAY" : "REC", - ch->io[i], fmt, dfmt); + ch->io[i], fmt, dfmt, c); ); hdac_command(sc, HDA_CMD_SET_CONV_FMT(cad, ch->io[i], fmt), cad); @@ -3511,17 +3529,6 @@ hdac_stream_setup(struct hdac_chan *ch) HDA_CMD_SET_DIGITAL_CONV_FMT1(cad, ch->io[i], dfmt), cad); } - /* If HP redirection is enabled, but failed to use same - DAC make last DAC one to duplicate first one. */ - if (as->hpredir >= 0 && i == as->pincnt) { - c = (ch->sid << 4); - } else if (chn >= totalchn) { - /* This is until OSS will support multichannel. - Should be: c = 0; to disable unused DAC */ - c = (ch->sid << 4); - }else { - c = (ch->sid << 4) | chn; - } hdac_command(sc, HDA_CMD_SET_CONV_STREAM_CHAN(cad, ch->io[i], c), cad); #if 0 @@ -3532,12 +3539,36 @@ hdac_stream_setup(struct hdac_chan *ch) hdac_command(sc, HDA_CMD_SET_HDMI_CHAN_SLOT(cad, ch->io[i], 0x11), cad); #endif - chn += - HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(w->param.widget_cap) ? - 2 : 1; + chn += HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) + 1; } } +/* + * Greatest Common Divisor. + */ +static unsigned +gcd(unsigned a, unsigned b) +{ + u_int c; + + while (b != 0) { + c = a; + a = b; + b = (c % b); + } + return (a); +} + +/* + * Least Common Multiple. + */ +static unsigned +lcm(unsigned a, unsigned b) +{ + + return ((a * b) / gcd(a, b)); +} + static int hdac_channel_setfragments(kobj_t obj, void *data, uint32_t blksz, uint32_t blkcnt) @@ -3545,7 +3576,7 @@ hdac_channel_setfragments(kobj_t obj, vo struct hdac_chan *ch = data; struct hdac_softc *sc = ch->devinfo->codec->sc; - blksz &= HDA_BLK_ALIGN; + blksz -= blksz % lcm(HDAC_DMA_ALIGNMENT, sndbuf_getalign(ch->b)); if (blksz > (sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN)) blksz = sndbuf_getmaxsize(ch->b) / HDA_BDL_MIN; @@ -6436,7 +6467,8 @@ hdac_pcmchannel_setup(struct hdac_chan * struct hdac_audio_as *as = devinfo->function.audio.as; struct hdac_widget *w; uint32_t cap, fmtcap, pcmcap; - int i, j, ret, max; + int i, j, ret, channels, onlystereo; + uint16_t pinset; ch->caps = hdac_caps; ch->caps.fmtlist = ch->fmtlist; @@ -6446,11 +6478,13 @@ hdac_pcmchannel_setup(struct hdac_chan * ch->pcmrates[1] = 0; ret = 0; + channels = 0; + onlystereo = 1; + pinset = 0; fmtcap = devinfo->function.audio.supp_stream_formats; pcmcap = devinfo->function.audio.supp_pcm_size_rate; - max = (sizeof(ch->io) / sizeof(ch->io[0])) - 1; - for (i = 0; i < 16 && ret < max; i++) { + for (i = 0; i < 16; i++) { /* Check as is correct */ if (ch->as < 0) break; @@ -6468,15 +6502,11 @@ hdac_pcmchannel_setup(struct hdac_chan * w = hdac_widget_get(devinfo, as[ch->as].dacs[i]); if (w == NULL || w->enable == 0) continue; - if (!HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(w->param.widget_cap)) - continue; cap = w->param.supp_stream_formats; - /*if (HDA_PARAM_SUPP_STREAM_FORMATS_FLOAT32(cap)) { - }*/ if (!HDA_PARAM_SUPP_STREAM_FORMATS_PCM(cap) && !HDA_PARAM_SUPP_STREAM_FORMATS_AC3(cap)) continue; - /* Many codec does not declare AC3 support on SPDIF. + /* Many CODECs does not declare AC3 support on SPDIF. I don't beleave that they doesn't support it! */ if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) cap |= HDA_PARAM_SUPP_STREAM_FORMATS_AC3_MASK; @@ -6488,9 +6518,24 @@ hdac_pcmchannel_setup(struct hdac_chan * pcmcap &= w->param.supp_pcm_size_rate; } ch->io[ret++] = as[ch->as].dacs[i]; + /* Do not count redirection pin/dac channels. */ + if (i == 15 && as[ch->as].hpredir >= 0) + continue; + channels += HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) + 1; + if (HDA_PARAM_AUDIO_WIDGET_CAP_CC(w->param.widget_cap) != 1) + onlystereo = 0; + pinset |= (1 << i); } ch->io[ret] = -1; + if (as[ch->as].fakeredir) + ret--; + /* Standard speaks only about stereo pins and playback, ... */ + if ((!onlystereo) || as[ch->as].dir != HDA_CTL_OUT) + pinset = 0; + /* ..., but there it gives us info about speakers layout. */ + as[ch->as].pinset = pinset; + ch->supp_stream_formats = fmtcap; ch->supp_pcm_size_rate = pcmcap; @@ -6514,17 +6559,34 @@ hdac_pcmchannel_setup(struct hdac_chan * ch->bit32 = 3; else if (HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT(pcmcap)) ch->bit32 = 2; - if (!(devinfo->function.audio.quirks & HDA_QUIRK_FORCESTEREO)) - ch->fmtlist[i++] = - SND_FORMAT(AFMT_S16_LE, 1, 0); - ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 2, 0); - if (ch->bit32 > 0) { - if (!(devinfo->function.audio.quirks & - HDA_QUIRK_FORCESTEREO)) - ch->fmtlist[i++] = - SND_FORMAT(AFMT_S32_LE, 1, 0); - ch->fmtlist[i++] = - SND_FORMAT(AFMT_S32_LE, 2, 0); + if (!(devinfo->function.audio.quirks & HDA_QUIRK_FORCESTEREO)) { + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 1, 0); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 1, 0); + } + if (channels >= 2) { + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 2, 0); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 2, 0); + } + if (channels == 4 || /* Any 4-channel */ + pinset == 0x0007 || /* 5.1 */ + pinset == 0x0013 || /* 5.1 */ + pinset == 0x0017) { /* 7.1 */ + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 4, 0); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 4, 0); + } + if (channels == 6 || /* Any 6-channel */ + pinset == 0x0017) { /* 7.1 */ + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 6, 1); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 6, 1); + } + if (channels == 8) { /* Any 8-channel */ + ch->fmtlist[i++] = SND_FORMAT(AFMT_S16_LE, 8, 1); + if (ch->bit32) + ch->fmtlist[i++] = SND_FORMAT(AFMT_S32_LE, 8, 1); } } if (HDA_PARAM_SUPP_STREAM_FORMATS_AC3(fmtcap)) { Modified: stable/8/sys/dev/sound/pci/hda/hdac_private.h ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac_private.h Fri Jan 22 11:31:49 2010 (r202801) +++ stable/8/sys/dev/sound/pci/hda/hdac_private.h Fri Jan 22 11:37:19 2010 (r202802) @@ -221,6 +221,7 @@ struct hdac_audio_as { u_char pincnt; u_char fakeredir; u_char digital; + uint16_t pinset; nid_t hpredir; nid_t pins[16]; nid_t dacs[16]; @@ -281,7 +282,7 @@ struct hdac_chan { struct hdac_devinfo *devinfo; struct hdac_pcm_devinfo *pdevinfo; struct hdac_dma bdl_dma; - uint32_t spd, fmt, fmtlist[8], pcmrates[16]; + uint32_t spd, fmt, fmtlist[16], pcmrates[16]; uint32_t supp_stream_formats, supp_pcm_size_rate; uint32_t ptr, prevptr, blkcnt, blksz; uint32_t *dmapos; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:40:55 2010 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 BDBEE106566B; Fri, 22 Jan 2010 11:40:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 927848FC18; Fri, 22 Jan 2010 11:40:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBetmS057634; Fri, 22 Jan 2010 11:40:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBetqn057632; Fri, 22 Jan 2010 11:40:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001221140.o0MBetqn057632@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 11:40:55 +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: r202803 - stable/8/share/man/man4 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: Fri, 22 Jan 2010 11:40:55 -0000 Author: mav Date: Fri Jan 22 11:40:55 2010 New Revision: 202803 URL: http://svn.freebsd.org/changeset/base/202803 Log: MFC r202160: Update, reflecting added multichannel playback support. Modified: stable/8/share/man/man4/snd_hda.4 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) Modified: stable/8/share/man/man4/snd_hda.4 ============================================================================== --- stable/8/share/man/man4/snd_hda.4 Fri Jan 22 11:37:19 2010 (r202802) +++ stable/8/share/man/man4/snd_hda.4 Fri Jan 22 11:40:55 2010 (r202803) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 13, 2009 +.Dd January 12, 2010 .Dt SND_HDA 4 .Os .Sh NAME @@ -125,12 +125,14 @@ such as .Dq Li nofixedrate , will do the opposite and takes precedence. Options can be separated by whitespace and commas. +.Pp .Dq Li GPIO Ns s are a codec's General Purpose I/O pins which system integrators sometimes use to control external muters, amplifiers and so on. If you have no sound, or sound volume is not adequate, you may have to experiment a bit with the GPIO setup to find the optimal setup for your system. +.Pp The .Dq Li ivref Ns Ar X and @@ -178,6 +180,11 @@ A unique, per-association number used to particular association. Sequence numbers can be specified as numeric values from 0 to 15. .Pp +For output assotiations sequence numbers encode speaker pairs positions: +0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side. +Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro; +(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1. +.Pp The sequence number 15 has a special meaning for output associations. Output pins with this number and device type .Dq Ar Headphones @@ -639,6 +646,3 @@ to control external amplifiers. In some GPIO bits may be needed to make sound work on specific device. .Pp HDMI and DisplayPort audio may also require support from video driver. -.Pp -Due to OSS limitation multichannel (not multidevice) playback is not -supported. From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:42:23 2010 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 E77011065670; Fri, 22 Jan 2010 11:42:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D55D48FC19; Fri, 22 Jan 2010 11:42:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBgNq5058019; Fri, 22 Jan 2010 11:42:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBgNqV058017; Fri, 22 Jan 2010 11:42:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001221142.o0MBgNqV058017@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 11:42:23 +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: r202804 - stable/8/share/man/man4 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: Fri, 22 Jan 2010 11:42:24 -0000 Author: mav Date: Fri Jan 22 11:42:23 2010 New Revision: 202804 URL: http://svn.freebsd.org/changeset/base/202804 Log: MFC r202798: Add "MIXER CONTROLS" chapter. Modified: stable/8/share/man/man4/snd_hda.4 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) Modified: stable/8/share/man/man4/snd_hda.4 ============================================================================== --- stable/8/share/man/man4/snd_hda.4 Fri Jan 22 11:40:55 2010 (r202803) +++ stable/8/share/man/man4/snd_hda.4 Fri Jan 22 11:42:23 2010 (r202804) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2010 +.Dd January 22, 2010 .Dt SND_HDA 4 .Os .Sh NAME @@ -459,6 +459,42 @@ mic and line-in) and headset (headphones .Li pcm1 for internal speaker playback. On headphones connection rear connectors will be muted. +.Sh MIXER CONTROLS +Depending on codec configuration, these controls and signal sources could be +reported to +.Xr sound 4 : +.Pp +.Bl -tag -width ".Va speaker" -offset indent +.It Va vol +overall output level (volume) +.It Va rec +overall recording level +.It Va igain +input-to-output monitoring loopback level +.It Va ogain +external amplifier control +.It Va pcm +PCM playback +.It Va mix +input mix +.It Va mic +first external or second internal microphone input +.It Va monitor +first internal or second external microphone input +.It Va line , Va line1 , Va line2, Va line3 +analog (line) inputs +.It Va dig1 , Va dig2 , Va dig3 +digital (S/PDIF, HDMI or DisplayPort) inputs +.It Va cd +CD input +.It Va speaker +PC speaker input +.It Va phin , Va phout , Va radio . Va video +other random inputs +.El +.Pp +Controls have different precision. Some could be just an on/off triggers. +Most of controls use logarithmic scale. .Sh HARDWARE The .Nm From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:42:44 2010 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 C046D106566B; Fri, 22 Jan 2010 11:42:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACEA38FC1F; Fri, 22 Jan 2010 11:42:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBgiZQ058123; Fri, 22 Jan 2010 11:42:44 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBgi5l058119; Fri, 22 Jan 2010 11:42:44 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001221142.o0MBgi5l058119@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 22 Jan 2010 11:42:44 +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: r202805 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Fri, 22 Jan 2010 11:42:44 -0000 Author: trasz Date: Fri Jan 22 11:42:44 2010 New Revision: 202805 URL: http://svn.freebsd.org/changeset/base/202805 Log: MFC c195785: Fix permission handling for extended attributes in ZFS. Without this change, ZFS uses SunOS Alternate Data Streams semantics - each EA has its own permissions, which are set at EA creation time and - unlike SunOS - invisible to the user and impossible to change. From the user point of view, it's just broken: sometimes access is granted when it shouldn't be, sometimes it's denied when it shouldn't be. This patch makes it behave just like UFS, i.e. depend on current file permissions. Also, it fixes returned error codes (ENOATTR instead of ENOENT) and makes listextattr(2) return 0 instead of EPERM where there is no EA directory (i.e. the file never had any EA). Tested by: cperciva Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Fri Jan 22 11:42:23 2010 (r202804) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Fri Jan 22 11:42:44 2010 (r202805) @@ -2364,6 +2364,15 @@ zfs_zaccess(znode_t *zp, int mode, int f is_attr = ((zp->z_phys->zp_flags & ZFS_XATTR) && (ZTOV(zp)->v_type == VDIR)); +#ifdef __FreeBSD__ + /* + * In FreeBSD, we don't care about permissions of individual ADS. + * Note that not checking them is not just an optimization - without + * this shortcut, EA operations may bogusly fail with EACCES. + */ + if (zp->z_phys->zp_flags & ZFS_XATTR) + return (0); +#else /* * If attribute then validate against base file */ @@ -2389,6 +2398,7 @@ zfs_zaccess(znode_t *zp, int mode, int f mode |= ACE_READ_NAMED_ATTRS; } } +#endif if ((error = zfs_zaccess_common(check_zp, mode, &working_mode, &check_privs, skipaclchk, cr)) == 0) { Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Fri Jan 22 11:42:23 2010 (r202804) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Fri Jan 22 11:42:44 2010 (r202805) @@ -831,8 +831,14 @@ zfs_make_xattrdir(znode_t *zp, vattr_t * *xvpp = NULL; + /* + * In FreeBSD, access checking for creating an EA is being done + * in zfs_setextattr(), + */ +#ifndef __FreeBSD__ if (error = zfs_zaccess(zp, ACE_WRITE_NAMED_ATTRS, 0, B_FALSE, cr)) return (error); +#endif tx = dmu_tx_create(zfsvfs->z_os); dmu_tx_hold_bonus(tx, zp->z_id); @@ -906,12 +912,14 @@ top: ASSERT(zp->z_phys->zp_xattr == 0); -#ifdef TODO if (!(flags & CREATE_XATTR_DIR)) { zfs_dirent_unlock(dl); +#ifdef __FreeBSD__ + return (ENOATTR); +#else return (ENOENT); - } #endif + } if (zfsvfs->z_vfs->vfs_flag & VFS_RDONLY) { zfs_dirent_unlock(dl); Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Jan 22 11:42:23 2010 (r202804) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Jan 22 11:42:44 2010 (r202805) @@ -4537,6 +4537,11 @@ vop_getextattr { vnode_t *xvp = NULL, *vp; int error, flags; + error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, + ap->a_cred, ap->a_td, VREAD); + if (error != 0) + return (error); + error = zfs_create_attrname(ap->a_attrnamespace, ap->a_name, attrname, sizeof(attrname)); if (error != 0) @@ -4558,6 +4563,8 @@ vop_getextattr { vp = nd.ni_vp; NDFREE(&nd, NDF_ONLY_PNBUF); if (error != 0) { + if (error == ENOENT) + error = ENOATTR; ZFS_EXIT(zfsvfs); return (error); } @@ -4599,6 +4606,11 @@ vop_deleteextattr { vnode_t *xvp = NULL, *vp; int error, flags; + error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, + ap->a_cred, ap->a_td, VWRITE); + if (error != 0) + return (error); + error = zfs_create_attrname(ap->a_attrnamespace, ap->a_name, attrname, sizeof(attrname)); if (error != 0) @@ -4619,6 +4631,8 @@ vop_deleteextattr { vp = nd.ni_vp; NDFREE(&nd, NDF_ONLY_PNBUF); if (error != 0) { + if (error == ENOENT) + error = ENOATTR; ZFS_EXIT(zfsvfs); return (error); } @@ -4658,6 +4672,11 @@ vop_setextattr { vnode_t *xvp = NULL, *vp; int error, flags; + error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, + ap->a_cred, ap->a_td, VWRITE); + if (error != 0) + return (error); + error = zfs_create_attrname(ap->a_attrnamespace, ap->a_name, attrname, sizeof(attrname)); if (error != 0) @@ -4666,7 +4685,7 @@ vop_setextattr { ZFS_ENTER(zfsvfs); error = zfs_lookup(ap->a_vp, NULL, &xvp, NULL, 0, ap->a_cred, td, - LOOKUP_XATTR); + LOOKUP_XATTR | CREATE_XATTR_DIR); if (error != 0) { ZFS_EXIT(zfsvfs); return (error); @@ -4725,6 +4744,11 @@ vop_listextattr { vnode_t *xvp = NULL, *vp; int done, error, eof, pos; + error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, + ap->a_cred, ap->a_td, VREAD); + if (error) + return (error); + error = zfs_create_attrname(ap->a_attrnamespace, "", attrprefix, sizeof(attrprefix)); if (error != 0) @@ -4739,6 +4763,12 @@ vop_listextattr { error = zfs_lookup(ap->a_vp, NULL, &xvp, NULL, 0, ap->a_cred, td, LOOKUP_XATTR); if (error != 0) { + /* + * ENOATTR means that the EA directory does not yet exist, + * i.e. there are no extended attributes there. + */ + if (error == ENOATTR) + error = 0; ZFS_EXIT(zfsvfs); return (error); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:44:56 2010 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 825691065698; Fri, 22 Jan 2010 11:44:56 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0874B8FC1F; Fri, 22 Jan 2010 11:44:55 +0000 (UTC) Received: from outgoing.leidinger.net (pD954F1B8.dip.t-dialin.net [217.84.241.184]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 449A48443D3; Fri, 22 Jan 2010 12:44:41 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id C9FE23BD48; Thu, 21 Jan 2010 08:58:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1264060733; bh=vWei0EJRQrJ1P94CpbrKX2XFXWOJC5Tb/loKlcZm2U8=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=YBWb+QavFagu+/VZ3GVITBb3juBF6YLLs3lG9vfdZR2M/OOscrFG+AaVRz3qxE3/Q a2Q/44PnYBO42GkxRcPiF2WmQy4nHY5UsZbtpNuDQPPMcAaf3VVsgWEy2XOc1LSDt3 yfZdGpis4IpNqn8Hl8MHe6K5D2WeTOXJNXoud4EqIxzqQADBmotzo9VRHCN4uCH4Nu TO/XDSkmVH0qPd7kxg0uE8C8OUSdkVqmPFJ0ibCWoS/Vj+rDuehDQLgaiQ0zAgDpYC svbS6vK2ByAqRC+WmhlVNnfc04wk/3KLEIjixC12WlVXWVi/rmjf9jPX9Mrx7HwIhC 0U0y5FVEgn0VQ== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o0L7wpfS021961; Thu, 21 Jan 2010 08:58:52 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Thu, 21 Jan 2010 08:58:51 +0100 Message-ID: <20100121085851.67964fn6pkgeauww@webmail.leidinger.net> Date: Thu, 21 Jan 2010 08:58:51 +0100 From: Alexander Leidinger To: "Wojciech A. Koszek" References: <201001182246.o0IMk6dw000346@svn.freebsd.org> <20100119091500.17856jhlpl7mjsow@webmail.leidinger.net> <20100121015554.GI1990@FreeBSD.org> In-Reply-To: <20100121015554.GI1990@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 449A48443D3.8C0CC X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1264765484.14179@71d+qx1gmgCNXkDuRoNZ9w X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, emulation@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202598 - head/sys/compat/linux 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: Fri, 22 Jan 2010 11:44:56 -0000 Quoting "Wojciech A. Koszek" (from Thu, 21 Jan 2010 02:55:55 +0100): > On Tue, Jan 19, 2010 at 09:15:00AM +0100, Alexander Leidinger wrote: >> Quoting "Wojciech A. Koszek" (from Mon, 18 Jan 2010 >> 22:46:06 +0000 (UTC)): >> >>> Author: wkoszek >>> Date: Mon Jan 18 22:46:06 2010 >>> New Revision: 202598 >>> URL: http://svn.freebsd.org/changeset/base/202598 >>> >>> Log: >>> Let us to use our libusb(3) in Linuxolator. >>> >>> With this change, Linux binaries can work with our libusb(3) when >>> it's compiled against our header files on GNU/Linux system -- this >>> solves the problem with differences between /dev layouts. >>> >>> With ported libusb(3), I am able to use my USB JTAG cable with Linux >>> binaries that support it. >> >> The commit log is IMHO omitting the info if you checked (or not) that there >> is no linux ioctl in this range. It would also be nice if the comment in >> linux_ioctl.h tells to check that there is no clash with a linux ioctl when >> the min/max is changed. > > Sorry for delay. > > I have tested it against ioctl() calls submitted by ported libusb(3). > Apparently, all ioctl() requests in my execution path didn't hit our > emulator, > thus I was getting warnings about unsupported ioctl(). Thus, I > reserved a range > for them. However, it looks like conflict exists with Linux *SND* stuff. > > I believe the easiest solution would be based on picking "untypable" > values for > commands: > > #define BSDEMUL_USB_REQUEST _IOWR(3, 1, struct usb_ctl_request) > > > And putting them into linux_ioctl.h just like any other ioctl(). > Simple mapping > would be provided for those calls to our native USB stack. grep(1) > says 3 or 4 > passed as a ioctl() should be fine, since none of those seem to be used in > Linux. I could bring the same macros to ported libusb(3) easily, so > that we'd > be using something that Linuxolator can finally understand in a unique way. > > Does is sound like an acceptable solution? Unfortunately I do not follow you completely... My concern is that someone maybe want to implement an ioctl which falls in the same range. As long as the ioctl is not in a range of ioctls of a normal linux kernel, it is fine for me. If in doubt, add a kernel option to either enable or disable (I'm not sure what makes more sense) the FreeBSD-usb-forward-part. Bye, Alexander. -- Once a word has been allowed to escape, it cannot be recalled. -- Quintus Horatius Flaccus (Horace) http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:52:12 2010 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 C23251065679; Fri, 22 Jan 2010 11:52:12 +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 B13508FC23; Fri, 22 Jan 2010 11:52:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBqCOF060340; Fri, 22 Jan 2010 11:52:12 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBqCDg060338; Fri, 22 Jan 2010 11:52:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001221152.o0MBqCDg060338@svn.freebsd.org> From: Rui Paulo Date: Fri, 22 Jan 2010 11:52: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: r202806 - head/sys/mips/mips 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: Fri, 22 Jan 2010 11:52:12 -0000 Author: rpaulo Date: Fri Jan 22 11:52:12 2010 New Revision: 202806 URL: http://svn.freebsd.org/changeset/base/202806 Log: Remove duplicate bootverbose increment. Modified: head/sys/mips/mips/machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Fri Jan 22 11:42:44 2010 (r202805) +++ head/sys/mips/mips/machdep.c Fri Jan 22 11:52:12 2010 (r202806) @@ -161,7 +161,6 @@ cpu_startup(void *dummy) if (boothowto & RB_VERBOSE) bootverbose++; - bootverbose++; printf("real memory = %lu (%luK bytes)\n", ptoa(realmem), ptoa(realmem) / 1024); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 14:05:49 2010 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 2E1C7106566B; Fri, 22 Jan 2010 14:05:49 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 045B48FC08; Fri, 22 Jan 2010 14:05:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ME5mXX090360; Fri, 22 Jan 2010 14:05:48 GMT (envelope-from sepotvin@svn.freebsd.org) Received: (from sepotvin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ME5mjP090357; Fri, 22 Jan 2010 14:05:48 GMT (envelope-from sepotvin@svn.freebsd.org) Message-Id: <201001221405.o0ME5mjP090357@svn.freebsd.org> From: "Stephane E. Potvin" Date: Fri, 22 Jan 2010 14:05: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: r202807 - head/share/mk 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: Fri, 22 Jan 2010 14:05:49 -0000 Author: sepotvin Date: Fri Jan 22 14:05:48 2010 New Revision: 202807 URL: http://svn.freebsd.org/changeset/base/202807 Log: Introduce two new flags PO_CFLAGS and PO_CXXFLAGS to make it possible to have different flags when building profiled objects. MFC after: 1 month Modified: head/share/mk/bsd.lib.mk head/share/mk/sys.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Jan 22 11:52:12 2010 (r202806) +++ head/share/mk/bsd.lib.mk Fri Jan 22 14:05:48 2010 (r202807) @@ -67,7 +67,7 @@ PO_FLAG=-pg .endif .c.po: - ${CC} ${PO_FLAG} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} ${PO_FLAG} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif @@ -79,7 +79,7 @@ PO_FLAG=-pg .endif .cc.po .C.po .cpp.po .cxx.po: - ${CXX} ${PO_FLAG} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CXX} ${PO_FLAG} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .cc.So .C.So .cpp.So .cxx.So: ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -115,7 +115,7 @@ PO_FLAG=-pg .endif .asm.po: - ${CC} -x assembler-with-cpp -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif @@ -128,7 +128,7 @@ PO_FLAG=-pg .endif .S.po: - ${CC} -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Fri Jan 22 11:52:12 2010 (r202806) +++ head/share/mk/sys.mk Fri Jan 22 14:05:48 2010 (r202807) @@ -44,6 +44,7 @@ CFLAGS ?= -O2 -pipe CFLAGS += -fno-strict-aliasing .endif .endif +PO_CFLAGS ?= ${CFLAGS} # Turn CTF conversion off by default for now. This default could be # changed later if DTrace becomes popular. @@ -66,6 +67,7 @@ CFLAGS += -g CXX ?= c++ CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign} +PO_CXXFLAGS ?= ${CXXFLAGS} CPP ?= cpp From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 14:09:15 2010 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 66DF3106568B; Fri, 22 Jan 2010 14:09:15 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 569388FC27; Fri, 22 Jan 2010 14:09:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ME9F4P091173; Fri, 22 Jan 2010 14:09:15 GMT (envelope-from sepotvin@svn.freebsd.org) Received: (from sepotvin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ME9Fnh091170; Fri, 22 Jan 2010 14:09:15 GMT (envelope-from sepotvin@svn.freebsd.org) Message-Id: <201001221409.o0ME9Fnh091170@svn.freebsd.org> From: "Stephane E. Potvin" Date: Fri, 22 Jan 2010 14:09:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202808 - in head/gnu/lib: libstdc++ libsupc++ 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: Fri, 22 Jan 2010 14:09:15 -0000 Author: sepotvin Date: Fri Jan 22 14:09:15 2010 New Revision: 202808 URL: http://svn.freebsd.org/changeset/base/202808 Log: Use the new PO_CXXFLAGS from r202807 to remove the '-ffunction-sections' flag when compiling profiled objects as it's ignored by the compiler. This removes the associated warning for each file compiled. MFC after: 1 month Modified: head/gnu/lib/libstdc++/Makefile head/gnu/lib/libsupc++/Makefile Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Fri Jan 22 14:05:48 2010 (r202807) +++ head/gnu/lib/libstdc++/Makefile Fri Jan 22 14:09:15 2010 (r202808) @@ -21,6 +21,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated +PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} DPADD= ${LIBM} LDADD= -lm Modified: head/gnu/lib/libsupc++/Makefile ============================================================================== --- head/gnu/lib/libsupc++/Makefile Fri Jan 22 14:05:48 2010 (r202807) +++ head/gnu/lib/libsupc++/Makefile Fri Jan 22 14:09:15 2010 (r202808) @@ -23,6 +23,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections +PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} HDRS= exception new typeinfo cxxabi.h exception_defines.h INCS= ${HDRS:S;^;${SRCDIR}/;} From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 14:25:18 2010 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 355061065676; Fri, 22 Jan 2010 14:25:18 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 255D08FC15; Fri, 22 Jan 2010 14:25:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MEPIZc094893; Fri, 22 Jan 2010 14:25:18 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MEPIC9094891; Fri, 22 Jan 2010 14:25:18 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001221425.o0MEPIC9094891@svn.freebsd.org> From: Randall Stewart Date: Fri, 22 Jan 2010 14:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202809 - head/sys/mips/rmi 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: Fri, 22 Jan 2010 14:25:18 -0000 Author: rrs Date: Fri Jan 22 14:25:17 2010 New Revision: 202809 URL: http://svn.freebsd.org/changeset/base/202809 Log: This hopefully will fix the network problem I was seeing. Basically the msg ring interrupt was being re-enabled inside a spinlock as the thread set it self up for rescheduling. This won't work since inside the re-enable is another spin lock.. which means on return from the reenable the interrupts have been reenabled. Thus you would get a clock int and end up panicing holding a spin lock to long :-o Modified: head/sys/mips/rmi/xlr_machdep.c Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Fri Jan 22 14:09:15 2010 (r202808) +++ head/sys/mips/rmi/xlr_machdep.c Fri Jan 22 14:25:17 2010 (r202809) @@ -618,18 +618,14 @@ msgring_process_fast_intr(void *arg) */ disable_msgring_int(NULL); it->i_pending = 1; + thread_lock(td); if (TD_AWAITING_INTR(td)) { - thread_lock(td); CTR3(KTR_INTR, "%s: schedule pid %d (%s)", __func__, p->p_pid, p->p_comm); TD_CLR_IWAIT(td); sched_add(td, SRQ_INTR); - thread_unlock(td); - } else { - CTR4(KTR_INTR, "%s: pid %d (%s): state %d", - __func__, p->p_pid, p->p_comm, td->td_state); } - + thread_unlock(td); } #define MIT_DEAD 4 @@ -668,13 +664,17 @@ msgring_process(void *arg) atomic_store_rel_int(&ithd->i_pending, 0); xlr_msgring_handler(NULL); } + enable_msgring_int(NULL); if (!ithd->i_pending && !(ithd->i_flags & MIT_DEAD)) { thread_lock(td); + if (ithd->i_pending) { + thread_unlock(td); + continue; + } sched_class(td, PRI_ITHD); TD_SET_IWAIT(td); - thread_unlock(td); - enable_msgring_int(NULL); mi_switch(SW_VOL, NULL); + thread_unlock(td); } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 14:44:16 2010 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 4B0471065694; Fri, 22 Jan 2010 14:44:16 +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 3A2998FC13; Fri, 22 Jan 2010 14:44:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MEiGPT099064; Fri, 22 Jan 2010 14:44:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MEiGMp099059; Fri, 22 Jan 2010 14:44:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001221444.o0MEiGMp099059@svn.freebsd.org> From: John Baldwin Date: Fri, 22 Jan 2010 14:44:16 +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: r202810 - in stable/7/sys: kern sys 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: Fri, 22 Jan 2010 14:44:16 -0000 Author: jhb Date: Fri Jan 22 14:44:15 2010 New Revision: 202810 URL: http://svn.freebsd.org/changeset/base/202810 Log: MFC 193440,193442,193762,194019: - Support shared vnode locks for write operations when the offset is provided on filesystems that support it. This really improves mysql + innodb performance on ZFS. - When checking for shared writes, use the struct mount returned from vn_start_write. - Simply shared vnode locking and extend it to also include fsync. Also, in vop_write, no longer assert for exclusive locks on the vnode. - Stop asserting on exclusive locks in fsync since it can now support shared vnode locking on ZFS. Modified: stable/7/sys/kern/vfs_syscalls.c stable/7/sys/kern/vfs_vnops.c stable/7/sys/kern/vnode_if.src stable/7/sys/sys/mount.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Fri Jan 22 14:25:17 2010 (r202809) +++ stable/7/sys/kern/vfs_syscalls.c Fri Jan 22 14:44:15 2010 (r202810) @@ -3267,7 +3267,7 @@ fsync(td, uap) struct mount *mp; struct file *fp; int vfslocked; - int error; + int error, lock_flags; AUDIT_ARG(fd, uap->fd); if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0) @@ -3276,7 +3276,13 @@ fsync(td, uap) vfslocked = VFS_LOCK_GIANT(vp->v_mount); if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) goto drop; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + if (MNT_SHARED_WRITES(mp) || + ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) { + lock_flags = LK_SHARED; + } else { + lock_flags = LK_EXCLUSIVE; + } + vn_lock(vp, lock_flags | LK_RETRY, td); AUDIT_ARG(vnode, vp, ARG_VNODE1); if (vp->v_object != NULL) { VM_OBJECT_LOCK(vp->v_object); Modified: stable/7/sys/kern/vfs_vnops.c ============================================================================== --- stable/7/sys/kern/vfs_vnops.c Fri Jan 22 14:25:17 2010 (r202809) +++ stable/7/sys/kern/vfs_vnops.c Fri Jan 22 14:44:15 2010 (r202810) @@ -370,13 +370,9 @@ vn_rdwr(rw, vp, base, len, offset, segfl (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); - if (mp != NULL && - (mp->mnt_kern_flag & MNTK_SHARED_WRITES)) { - /* - * XXX See the next comment what should - * be done here too. - */ - lock_flags = LK_EXCLUSIVE; + if (MNT_SHARED_WRITES(mp) || + ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) { + lock_flags = LK_SHARED; } else { lock_flags = LK_EXCLUSIVE; } @@ -594,15 +590,10 @@ vn_write(fp, uio, active_cred, flags, td (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) goto unlock; - if (vp->v_mount != NULL && - (vp->v_mount->mnt_kern_flag & MNTK_SHARED_WRITES) && + if ((MNT_SHARED_WRITES(mp) || + ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) && (flags & FOF_OFFSET) != 0) { - /* - * XXX This should be LK_SHARED but the VFS in releng7 - * needs some patches before this can be done. - * See the similar comment above. - */ - lock_flags = LK_EXCLUSIVE; + lock_flags = LK_SHARED; } else { lock_flags = LK_EXCLUSIVE; } Modified: stable/7/sys/kern/vnode_if.src ============================================================================== --- stable/7/sys/kern/vnode_if.src Fri Jan 22 14:25:17 2010 (r202809) +++ stable/7/sys/kern/vnode_if.src Fri Jan 22 14:44:15 2010 (r202810) @@ -185,7 +185,7 @@ vop_read { }; -%% write vp E E E +%% write vp L L L %! write pre VOP_WRITE_PRE %! write post VOP_WRITE_POST @@ -245,7 +245,7 @@ vop_revoke { }; -%% fsync vp E E E +%% fsync vp L L L vop_fsync { IN struct vnode *vp; Modified: stable/7/sys/sys/mount.h ============================================================================== --- stable/7/sys/sys/mount.h Fri Jan 22 14:25:17 2010 (r202809) +++ stable/7/sys/sys/mount.h Fri Jan 22 14:44:15 2010 (r202810) @@ -339,6 +339,9 @@ void __mnt_vnode_markerfree(str #define MNTK_LOOKUP_SHARED 0x40000000 /* FS supports shared lock lookups */ #define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ +#define MNT_SHARED_WRITES(mp) (((mp) != NULL) && \ + ((mp)->mnt_kern_flag & MNTK_SHARED_WRITES)) + /* * Sysctl CTL_VFS definitions. * From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 15:12:01 2010 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 CF281106566C; Fri, 22 Jan 2010 15:12:01 +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 BE8018FC0A; Fri, 22 Jan 2010 15:12:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MFC17w005510; Fri, 22 Jan 2010 15:12:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MFC1Ne005509; Fri, 22 Jan 2010 15:12:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001221512.o0MFC1Ne005509@svn.freebsd.org> From: John Baldwin Date: Fri, 22 Jan 2010 15:12:01 +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: r202811 - stable/7/sys/kern 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: Fri, 22 Jan 2010 15:12:01 -0000 Author: jhb Date: Fri Jan 22 15:12:01 2010 New Revision: 202811 URL: http://svn.freebsd.org/changeset/base/202811 Log: MFC 191028: Use a shared vnode lock for reads in vn_rdwr(). Modified: stable/7/sys/kern/vfs_vnops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_vnops.c ============================================================================== --- stable/7/sys/kern/vfs_vnops.c Fri Jan 22 14:44:15 2010 (r202810) +++ stable/7/sys/kern/vfs_vnops.c Fri Jan 22 15:12:01 2010 (r202811) @@ -377,15 +377,8 @@ vn_rdwr(rw, vp, base, len, offset, segfl lock_flags = LK_EXCLUSIVE; } vn_lock(vp, lock_flags | LK_RETRY, td); - } else { - /* - * XXX This should be LK_SHARED but the VFS in releng7 - * needs some patches before this can be done. - * The same applies to the lock_flags above and to a - * similar place below. - */ - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); - } + } else + vn_lock(vp, LK_SHARED | LK_RETRY, td); } ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held"); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 16:05:11 2010 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 053C7106566C; Fri, 22 Jan 2010 16:05:11 +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 E903D8FC1D; Fri, 22 Jan 2010 16:05:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MG5ACs017562; Fri, 22 Jan 2010 16:05:10 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MG5A1l017559; Fri, 22 Jan 2010 16:05:10 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201001221605.o0MG5A1l017559@svn.freebsd.org> From: Ed Maste Date: Fri, 22 Jan 2010 16:05: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: r202812 - head/sys/dev/ichwd 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: Fri, 22 Jan 2010 16:05:11 -0000 Author: emaste Date: Fri Jan 22 16:05:10 2010 New Revision: 202812 URL: http://svn.freebsd.org/changeset/base/202812 Log: Add H55 ID from Mike Tancsa, with minor rewording from avg@. PR: kern/143068 Submitted by: Mike Tancsa (Sentex) MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Fri Jan 22 15:12:01 2010 (r202811) +++ head/sys/dev/ichwd/ichwd.c Fri Jan 22 16:05:10 2010 (r202812) @@ -109,6 +109,7 @@ static struct ichwd_device ichwd_devices { DEVICEID_ICH10D, "Intel ICH10D watchdog timer", 10 }, { DEVICEID_ICH10DO, "Intel ICH10DO watchdog timer", 10 }, { DEVICEID_ICH10R, "Intel ICH10R watchdog timer", 10 }, + { DEVICEID_H55, "Intel H55 watchdog timer", 10 }, { 0, NULL, 0 }, }; Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Fri Jan 22 15:12:01 2010 (r202811) +++ head/sys/dev/ichwd/ichwd.h Fri Jan 22 16:05:10 2010 (r202812) @@ -99,6 +99,7 @@ struct ichwd_softc { #define DEVICEID_ICH10D 0x3a1a #define DEVICEID_ICH10DO 0x3a14 #define DEVICEID_ICH10R 0x3a16 +#define DEVICEID_H55 0x3b06 /* ICH LPC Interface Bridge Registers (ICH5 and older) */ #define ICH_GEN_STA 0xd4 From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 17:02:07 2010 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 849A310656AC; Fri, 22 Jan 2010 17:02:07 +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 7088F8FC08; Fri, 22 Jan 2010 17:02:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MH27OO030590; Fri, 22 Jan 2010 17:02:07 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MH27aT030573; Fri, 22 Jan 2010 17:02:07 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001221702.o0MH27aT030573@svn.freebsd.org> From: John Baldwin Date: Fri, 22 Jan 2010 17:02:07 +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: r202814 - in stable/7/sys: cam/scsi i386/acpica kern net security/audit sys 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: Fri, 22 Jan 2010 17:02:07 -0000 Author: jhb Date: Fri Jan 22 17:02:07 2010 New Revision: 202814 URL: http://svn.freebsd.org/changeset/base/202814 Log: MFC 193951: Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use vnode interlock to protect the knote fields. The locking assumes that shared vnode lock is held, thus we get exclusive access to knote either by exclusive vnode lock protection, or by shared vnode lock + vnode interlock. Unlike the change in HEAD, this does not remove kl_locked() and replace it with kl_assert_locked() and kl_assert_unlocked(). Instead, the kl_locked can now be set to NULL in which case no assertion checks are performed on the lock. The vfs kqfilter code uses this mode to disable assertion checks. This preserves the existing ABI for knlist_init(). Add convenience function knlist_init_mtx to reduce number of arguments for typical knlist initialization. Reviewed by: kib Modified: stable/7/sys/cam/scsi/scsi_target.c stable/7/sys/i386/acpica/acpi_machdep.c stable/7/sys/kern/init_main.c stable/7/sys/kern/kern_event.c stable/7/sys/kern/kern_fork.c stable/7/sys/kern/sys_pipe.c stable/7/sys/kern/tty.c stable/7/sys/kern/uipc_mqueue.c stable/7/sys/kern/uipc_socket.c stable/7/sys/kern/vfs_aio.c stable/7/sys/kern/vfs_subr.c stable/7/sys/net/bpf.c stable/7/sys/net/if_tap.c stable/7/sys/net/if_tun.c stable/7/sys/security/audit/audit_pipe.c stable/7/sys/sys/event.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cam/scsi/scsi_target.c ============================================================================== --- stable/7/sys/cam/scsi/scsi_target.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/cam/scsi/scsi_target.c Fri Jan 22 17:02:07 2010 (r202814) @@ -194,7 +194,7 @@ targopen(struct cdev *dev, int flags, in TAILQ_INIT(&softc->work_queue); TAILQ_INIT(&softc->abort_queue); TAILQ_INIT(&softc->user_ccb_queue); - knlist_init(&softc->read_select.si_note, NULL, NULL, NULL, NULL); + knlist_init_mtx(&softc->read_select.si_note, NULL); return (0); } Modified: stable/7/sys/i386/acpica/acpi_machdep.c ============================================================================== --- stable/7/sys/i386/acpica/acpi_machdep.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/i386/acpica/acpi_machdep.c Fri Jan 22 17:02:07 2010 (r202814) @@ -258,7 +258,7 @@ apm_create_clone(struct cdev *dev, struc clone->acpi_sc = acpi_sc; clone->notify_status = APM_EV_NONE; bzero(&clone->sel_read, sizeof(clone->sel_read)); - knlist_init(&clone->sel_read.si_note, &acpi_mutex, NULL, NULL, NULL); + knlist_init_mtx(&clone->sel_read.si_note, &acpi_mutex); /* * The acpi device is always managed by devd(8) and is considered Modified: stable/7/sys/kern/init_main.c ============================================================================== --- stable/7/sys/kern/init_main.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/kern/init_main.c Fri Jan 22 17:02:07 2010 (r202814) @@ -435,7 +435,7 @@ proc0_init(void *dummy __unused) p->p_sysent = &null_sysvec; p->p_flag = P_SYSTEM | P_INMEM; p->p_state = PRS_NORMAL; - knlist_init(&p->p_klist, &p->p_mtx, NULL, NULL, NULL); + knlist_init_mtx(&p->p_klist, &p->p_mtx); STAILQ_INIT(&p->p_ktr); p->p_nice = NZERO; td->td_tid = PID_MAX + 1; Modified: stable/7/sys/kern/kern_event.c ============================================================================== --- stable/7/sys/kern/kern_event.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/kern/kern_event.c Fri Jan 22 17:02:07 2010 (r202814) @@ -206,11 +206,13 @@ SYSCTL_INT(_kern, OID_AUTO, kq_calloutma } while (0) #ifdef INVARIANTS #define KNL_ASSERT_LOCKED(knl) do { \ - if (!knl->kl_locked((knl)->kl_lockarg)) \ + if (knl->kl_locked != NULL && \ + !knl->kl_locked((knl)->kl_lockarg)) \ panic("knlist not locked, but should be"); \ } while (0) #define KNL_ASSERT_UNLOCKED(knl) do { \ - if (knl->kl_locked((knl)->kl_lockarg)) \ + if (knl->kl_locked != NULL && \ + knl->kl_locked((knl)->kl_lockarg)) \ panic("knlist locked, but should not be"); \ } while (0) #else /* !INVARIANTS */ @@ -576,7 +578,7 @@ kqueue(struct thread *td, struct kqueue_ mtx_init(&kq->kq_lock, "kqueue", NULL, MTX_DEF|MTX_DUPOK); TAILQ_INIT(&kq->kq_head); kq->kq_fdp = fdp; - knlist_init(&kq->kq_sel.si_note, &kq->kq_lock, NULL, NULL, NULL); + knlist_init_mtx(&kq->kq_sel.si_note, &kq->kq_lock); TASK_INIT(&kq->kq_task, 0, kqueue_task, kq); FILEDESC_XLOCK(fdp); @@ -1774,7 +1776,7 @@ knlist_init(struct knlist *knl, void *lo knl->kl_unlock = knlist_mtx_unlock; else knl->kl_unlock = kl_unlock; - if (kl_locked == NULL) + if (kl_locked == NULL && kl_lock == NULL && kl_unlock == NULL) knl->kl_locked = knlist_mtx_locked; else knl->kl_locked = kl_locked; @@ -1783,6 +1785,13 @@ knlist_init(struct knlist *knl, void *lo } void +knlist_init_mtx(struct knlist *knl, struct mtx *lock) +{ + + knlist_init(knl, lock, NULL, NULL, NULL); +} + +void knlist_destroy(struct knlist *knl) { Modified: stable/7/sys/kern/kern_fork.c ============================================================================== --- stable/7/sys/kern/kern_fork.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/kern/kern_fork.c Fri Jan 22 17:02:07 2010 (r202814) @@ -294,7 +294,7 @@ norfproc_fail: #ifdef MAC mac_init_proc(newproc); #endif - knlist_init(&newproc->p_klist, &newproc->p_mtx, NULL, NULL, NULL); + knlist_init_mtx(&newproc->p_klist, &newproc->p_mtx); STAILQ_INIT(&newproc->p_ktr); /* We have to lock the process tree while we look for a pid. */ Modified: stable/7/sys/kern/sys_pipe.c ============================================================================== --- stable/7/sys/kern/sys_pipe.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/kern/sys_pipe.c Fri Jan 22 17:02:07 2010 (r202814) @@ -332,10 +332,8 @@ pipe(td, uap) rpipe = &pp->pp_rpipe; wpipe = &pp->pp_wpipe; - knlist_init(&rpipe->pipe_sel.si_note, PIPE_MTX(rpipe), NULL, NULL, - NULL); - knlist_init(&wpipe->pipe_sel.si_note, PIPE_MTX(wpipe), NULL, NULL, - NULL); + knlist_init_mtx(&rpipe->pipe_sel.si_note, PIPE_MTX(rpipe)); + knlist_init_mtx(&wpipe->pipe_sel.si_note, PIPE_MTX(wpipe)); /* Only the forward direction pipe is backed by default */ if ((error = pipe_create(rpipe, 1)) != 0 || Modified: stable/7/sys/kern/tty.c ============================================================================== --- stable/7/sys/kern/tty.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/kern/tty.c Fri Jan 22 17:02:07 2010 (r202814) @@ -2904,8 +2904,8 @@ ttyalloc() mtx_lock(&tty_list_mutex); TAILQ_INSERT_TAIL(&tty_list, tp, t_list); mtx_unlock(&tty_list_mutex); - knlist_init(&tp->t_rsel.si_note, &tp->t_mtx, NULL, NULL, NULL); - knlist_init(&tp->t_wsel.si_note, &tp->t_mtx, NULL, NULL, NULL); + knlist_init_mtx(&tp->t_rsel.si_note, &tp->t_mtx); + knlist_init_mtx(&tp->t_wsel.si_note, &tp->t_mtx); return (tp); } Modified: stable/7/sys/kern/uipc_mqueue.c ============================================================================== --- stable/7/sys/kern/uipc_mqueue.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/kern/uipc_mqueue.c Fri Jan 22 17:02:07 2010 (r202814) @@ -1502,8 +1502,8 @@ mqueue_alloc(const struct mq_attr *attr) mq->mq_msgsize = default_msgsize; } mtx_init(&mq->mq_mutex, "mqueue", NULL, MTX_DEF); - knlist_init(&mq->mq_rsel.si_note, &mq->mq_mutex, NULL, NULL, NULL); - knlist_init(&mq->mq_wsel.si_note, &mq->mq_mutex, NULL, NULL, NULL); + knlist_init_mtx(&mq->mq_rsel.si_note, &mq->mq_mutex); + knlist_init_mtx(&mq->mq_wsel.si_note, &mq->mq_mutex); atomic_add_int(&curmq, 1); return (mq); } Modified: stable/7/sys/kern/uipc_socket.c ============================================================================== --- stable/7/sys/kern/uipc_socket.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/kern/uipc_socket.c Fri Jan 22 17:02:07 2010 (r202814) @@ -370,10 +370,8 @@ socreate(int dom, struct socket **aso, i #ifdef MAC mac_create_socket(cred, so); #endif - knlist_init(&so->so_rcv.sb_sel.si_note, SOCKBUF_MTX(&so->so_rcv), - NULL, NULL, NULL); - knlist_init(&so->so_snd.sb_sel.si_note, SOCKBUF_MTX(&so->so_snd), - NULL, NULL, NULL); + knlist_init_mtx(&so->so_rcv.sb_sel.si_note, SOCKBUF_MTX(&so->so_rcv)); + knlist_init_mtx(&so->so_snd.sb_sel.si_note, SOCKBUF_MTX(&so->so_snd)); so->so_count = 1; /* * Auto-sizing of socket buffers is managed by the protocols and @@ -439,10 +437,8 @@ sonewconn(struct socket *head, int conns mac_create_socket_from_socket(head, so); SOCK_UNLOCK(head); #endif - knlist_init(&so->so_rcv.sb_sel.si_note, SOCKBUF_MTX(&so->so_rcv), - NULL, NULL, NULL); - knlist_init(&so->so_snd.sb_sel.si_note, SOCKBUF_MTX(&so->so_snd), - NULL, NULL, NULL); + knlist_init_mtx(&so->so_rcv.sb_sel.si_note, SOCKBUF_MTX(&so->so_rcv)); + knlist_init_mtx(&so->so_snd.sb_sel.si_note, SOCKBUF_MTX(&so->so_snd)); if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat) || (*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) { sodealloc(so); Modified: stable/7/sys/kern/vfs_aio.c ============================================================================== --- stable/7/sys/kern/vfs_aio.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/kern/vfs_aio.c Fri Jan 22 17:02:07 2010 (r202814) @@ -1486,7 +1486,7 @@ aio_aqueue(struct thread *td, struct aio aiocbe = uma_zalloc(aiocb_zone, M_WAITOK | M_ZERO); aiocbe->inputcharge = 0; aiocbe->outputcharge = 0; - knlist_init(&aiocbe->klist, AIO_MTX(ki), NULL, NULL, NULL); + knlist_init_mtx(&aiocbe->klist, AIO_MTX(ki)); error = ops->copyin(job, &aiocbe->uaiocb); if (error) { @@ -2108,7 +2108,7 @@ kern_lio_listio(struct thread *td, int m lj->lioj_flags = 0; lj->lioj_count = 0; lj->lioj_finished_count = 0; - knlist_init(&lj->klist, AIO_MTX(ki), NULL, NULL, NULL); + knlist_init_mtx(&lj->klist, AIO_MTX(ki)); ksiginfo_init(&lj->lioj_ksi); /* Modified: stable/7/sys/kern/vfs_subr.c ============================================================================== --- stable/7/sys/kern/vfs_subr.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/kern/vfs_subr.c Fri Jan 22 17:02:07 2010 (r202814) @@ -107,7 +107,6 @@ static void vnlru_free(int); static void vgonel(struct vnode *); static void vfs_knllock(void *arg); static void vfs_knlunlock(void *arg); -static int vfs_knllocked(void *arg); static void destroy_vpollinfo(struct vpollinfo *vi); /* @@ -3227,7 +3226,7 @@ v_addpollinfo(struct vnode *vp) vi = uma_zalloc(vnodepoll_zone, M_WAITOK); mtx_init(&vi->vpi_lock, "vnode pollinfo", NULL, MTX_DEF); knlist_init(&vi->vpi_selinfo.si_note, vp, vfs_knllock, - vfs_knlunlock, vfs_knllocked); + vfs_knlunlock, NULL); VI_LOCK(vp); if (vp->v_pollinfo != NULL) { VI_UNLOCK(vp); @@ -3945,7 +3944,7 @@ static struct knlist fs_knlist; static void vfs_event_init(void *arg) { - knlist_init(&fs_knlist, NULL, NULL, NULL, NULL); + knlist_init_mtx(&fs_knlist, NULL); } /* XXX - correct order? */ SYSINIT(vfs_knlist, SI_SUB_VFS, SI_ORDER_ANY, vfs_event_init, NULL); @@ -4058,14 +4057,6 @@ vfs_knlunlock(void *arg) VOP_UNLOCK(vp, 0, curthread); } -static int -vfs_knllocked(void *arg) -{ - struct vnode *vp = arg; - - return (VOP_ISLOCKED(vp, curthread) == LK_EXCLUSIVE); -} - int vfs_kqfilter(struct vop_kqfilter_args *ap) { @@ -4116,27 +4107,37 @@ filt_vfsread(struct knote *kn, long hint { struct vnode *vp = (struct vnode *)kn->kn_hook; struct vattr va; + int res; /* * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. */ if (hint == NOTE_REVOKE) { + VI_LOCK(vp); kn->kn_flags |= (EV_EOF | EV_ONESHOT); + VI_UNLOCK(vp); return (1); } if (VOP_GETATTR(vp, &va, curthread->td_ucred, curthread)) return (0); + VI_LOCK(vp); kn->kn_data = va.va_size - kn->kn_fp->f_offset; - return (kn->kn_data != 0); + res = (kn->kn_data != 0); + VI_UNLOCK(vp); + return (res); } /*ARGSUSED*/ static int filt_vfswrite(struct knote *kn, long hint) { + struct vnode *vp = (struct vnode *)kn->kn_hook; + + VI_LOCK(vp); + /* * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. @@ -4145,19 +4146,27 @@ filt_vfswrite(struct knote *kn, long hin kn->kn_flags |= (EV_EOF | EV_ONESHOT); kn->kn_data = 0; + VI_UNLOCK(vp); return (1); } static int filt_vfsvnode(struct knote *kn, long hint) { + struct vnode *vp = (struct vnode *)kn->kn_hook; + int res; + + VI_LOCK(vp); if (kn->kn_sfflags & hint) kn->kn_fflags |= hint; if (hint == NOTE_REVOKE) { kn->kn_flags |= EV_EOF; + VI_UNLOCK(vp); return (1); } - return (kn->kn_fflags != 0); + res = (kn->kn_fflags != 0); + VI_UNLOCK(vp); + return (res); } int Modified: stable/7/sys/net/bpf.c ============================================================================== --- stable/7/sys/net/bpf.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/net/bpf.c Fri Jan 22 17:02:07 2010 (r202814) @@ -425,7 +425,7 @@ bpfopen(struct cdev *dev, int flags, int #endif mtx_init(&d->bd_mtx, devtoname(dev), "bpf cdev lock", MTX_DEF); callout_init(&d->bd_callout, CALLOUT_MPSAFE); - knlist_init(&d->bd_sel.si_note, &d->bd_mtx, NULL, NULL, NULL); + knlist_init_mtx(&d->bd_sel.si_note, &d->bd_mtx); return (0); } Modified: stable/7/sys/net/if_tap.c ============================================================================== --- stable/7/sys/net/if_tap.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/net/if_tap.c Fri Jan 22 17:02:07 2010 (r202814) @@ -462,7 +462,7 @@ tapcreate(struct cdev *dev) tp->tap_flags |= TAP_INITED; mtx_unlock(&tp->tap_mtx); - knlist_init(&tp->tap_rsel.si_note, NULL, NULL, NULL, NULL); + knlist_init_mtx(&tp->tap_rsel.si_note, NULL); TAPDEBUG("interface %s is created. minor = %#x\n", ifp->if_xname, minor(dev)); Modified: stable/7/sys/net/if_tun.c ============================================================================== --- stable/7/sys/net/if_tun.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/net/if_tun.c Fri Jan 22 17:02:07 2010 (r202814) @@ -380,7 +380,7 @@ tuncreate(const char *name, struct cdev IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_snd.ifq_drv_maxlen = 0; IFQ_SET_READY(&ifp->if_snd); - knlist_init(&sc->tun_rsel.si_note, NULL, NULL, NULL, NULL); + knlist_init_mtx(&sc->tun_rsel.si_note, NULL); if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); Modified: stable/7/sys/security/audit/audit_pipe.c ============================================================================== --- stable/7/sys/security/audit/audit_pipe.c Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/security/audit/audit_pipe.c Fri Jan 22 17:02:07 2010 (r202814) @@ -579,8 +579,7 @@ audit_pipe_alloc(void) return (NULL); ap->ap_qlimit = AUDIT_PIPE_QLIMIT_DEFAULT; TAILQ_INIT(&ap->ap_queue); - knlist_init(&ap->ap_selinfo.si_note, AUDIT_PIPE_MTX(ap), NULL, NULL, - NULL); + knlist_init_mtx(&ap->ap_selinfo.si_note, AUDIT_PIPE_MTX(ap)); AUDIT_PIPE_LOCK_INIT(ap); AUDIT_PIPE_SX_LOCK_INIT(ap); cv_init(&ap->ap_cv, "audit_pipe"); Modified: stable/7/sys/sys/event.h ============================================================================== --- stable/7/sys/sys/event.h Fri Jan 22 16:23:00 2010 (r202813) +++ stable/7/sys/sys/event.h Fri Jan 22 17:02:07 2010 (r202814) @@ -209,6 +209,7 @@ struct kevent_copyops { struct thread; struct proc; struct knlist; +struct mtx; extern void knote(struct knlist *list, long hint, int lockflags); extern void knote_fork(struct knlist *list, int pid); @@ -219,6 +220,7 @@ extern int knlist_empty(struct knlist *k extern void knlist_init(struct knlist *knl, void *lock, void (*kl_lock)(void *), void (*kl_unlock)(void *), int (*kl_locked)(void *)); +extern void knlist_init_mtx(struct knlist *knl, struct mtx *lock); extern void knlist_destroy(struct knlist *knl); extern void knlist_cleardel(struct knlist *knl, struct thread *td, int islocked, int killkn); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 17:03:50 2010 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 0CEC8106568B; Fri, 22 Jan 2010 17:03: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 EF1E48FC08; Fri, 22 Jan 2010 17:03:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MH3n8m031024; Fri, 22 Jan 2010 17:03:49 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MH3n3Z031022; Fri, 22 Jan 2010 17:03:49 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001221703.o0MH3n3Z031022@svn.freebsd.org> From: Christian Brueffer Date: Fri, 22 Jan 2010 17:03:49 +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: r202815 - stable/8/sys/kern 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: Fri, 22 Jan 2010 17:03:50 -0000 Author: brueffer Date: Fri Jan 22 17:03:49 2010 New Revision: 202815 URL: http://svn.freebsd.org/changeset/base/202815 Log: MFC: r201848 Free allocated sbufs before returning ENOMEM. Modified: stable/8/sys/kern/kern_cpu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_cpu.c ============================================================================== --- stable/8/sys/kern/kern_cpu.c Fri Jan 22 17:02:07 2010 (r202814) +++ stable/8/sys/kern/kern_cpu.c Fri Jan 22 17:03:49 2010 (r202815) @@ -935,8 +935,10 @@ cpufreq_levels_sysctl(SYSCTL_HANDLER_ARG /* Get settings from the device and generate the output string. */ count = CF_MAX_LEVELS; levels = malloc(count * sizeof(*levels), M_TEMP, M_NOWAIT); - if (levels == NULL) + if (levels == NULL) { + sbuf_delete(&sb); return (ENOMEM); + } error = CPUFREQ_LEVELS(sc->dev, levels, &count); if (error) { if (error == E2BIG) @@ -974,8 +976,10 @@ cpufreq_settings_sysctl(SYSCTL_HANDLER_A /* Get settings from the device and generate the output string. */ set_count = MAX_SETTINGS; sets = malloc(set_count * sizeof(*sets), M_TEMP, M_NOWAIT); - if (sets == NULL) + if (sets == NULL) { + sbuf_delete(&sb); return (ENOMEM); + } error = CPUFREQ_DRV_SETTINGS(dev, sets, &set_count); if (error) goto out; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 17:08:05 2010 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 6C3A1106568B; Fri, 22 Jan 2010 17:08:05 +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 5A5938FC1C; Fri, 22 Jan 2010 17:08:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MH85CY032057; Fri, 22 Jan 2010 17:08:05 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MH85ib032055; Fri, 22 Jan 2010 17:08:05 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001221708.o0MH85ib032055@svn.freebsd.org> From: Christian Brueffer Date: Fri, 22 Jan 2010 17:08:05 +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: r202816 - stable/7/sys/kern 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: Fri, 22 Jan 2010 17:08:05 -0000 Author: brueffer Date: Fri Jan 22 17:08:05 2010 New Revision: 202816 URL: http://svn.freebsd.org/changeset/base/202816 Log: MFC: r201848 Free allocated sbufs before returning ENOMEM. Modified: stable/7/sys/kern/kern_cpu.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_cpu.c ============================================================================== --- stable/7/sys/kern/kern_cpu.c Fri Jan 22 17:03:49 2010 (r202815) +++ stable/7/sys/kern/kern_cpu.c Fri Jan 22 17:08:05 2010 (r202816) @@ -926,8 +926,10 @@ cpufreq_levels_sysctl(SYSCTL_HANDLER_ARG /* Get settings from the device and generate the output string. */ count = CF_MAX_LEVELS; levels = malloc(count * sizeof(*levels), M_TEMP, M_NOWAIT); - if (levels == NULL) + if (levels == NULL) { + sbuf_delete(&sb); return (ENOMEM); + } error = CPUFREQ_LEVELS(sc->dev, levels, &count); if (error) { if (error == E2BIG) @@ -965,8 +967,10 @@ cpufreq_settings_sysctl(SYSCTL_HANDLER_A /* Get settings from the device and generate the output string. */ set_count = MAX_SETTINGS; sets = malloc(set_count * sizeof(*sets), M_TEMP, M_NOWAIT); - if (sets == NULL) + if (sets == NULL) { + sbuf_delete(&sb); return (ENOMEM); + } error = CPUFREQ_DRV_SETTINGS(dev, sets, &set_count); if (error) goto out; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 17:17:47 2010 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 98B5E1065676; Fri, 22 Jan 2010 17:17:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8790E8FC14; Fri, 22 Jan 2010 17:17:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MHHl9j034291; Fri, 22 Jan 2010 17:17:47 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MHHlIG034289; Fri, 22 Jan 2010 17:17:47 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001221717.o0MHHlIG034289@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Jan 2010 17:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202817 - head/usr.sbin/mergemaster 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: Fri, 22 Jan 2010 17:17:47 -0000 Author: dougb Date: Fri Jan 22 17:17:47 2010 New Revision: 202817 URL: http://svn.freebsd.org/changeset/base/202817 Log: Make -U once again honor -D after my change to consolidate setting of MTREEDB with DESTDIR. PR: bin/143089 Submitted by: Anton Yuzhaninov Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 22 17:08:05 2010 (r202816) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 22 17:17:47 2010 (r202817) @@ -261,11 +261,6 @@ if [ -r "$HOME/.mergemasterrc" ]; then . "$HOME/.mergemasterrc" fi -# Assign the location of the mtree database -# -MTREEDB=${MTREEDB:-${DESTDIR}/var/db} -MTREEFILE="${MTREEDB}/mergemaster.mtree" - # Check the command line options # while getopts ":ascrvhipCPm:t:du:w:D:A:FU" COMMAND_LINE_ARGUMENT ; do @@ -342,6 +337,11 @@ while getopts ":ascrvhipCPm:t:du:w:D:A:F esac done +# Assign the location of the mtree database +# +MTREEDB=${MTREEDB:-${DESTDIR}/var/db} +MTREEFILE="${MTREEDB}/mergemaster.mtree" + # Don't force the user to set this in the mergemaster rc file if [ -n "${PRESERVE_FILES}" -a -z "${PRESERVE_FILES_DIR}" ]; then PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 17:30:37 2010 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 40F3B106566B; Fri, 22 Jan 2010 17:30:37 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 152A88FC0A; Fri, 22 Jan 2010 17:30:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MHUaJd037165; Fri, 22 Jan 2010 17:30:36 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MHUaoP037163; Fri, 22 Jan 2010 17:30:36 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001221730.o0MHUaoP037163@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Jan 2010 17:30:36 +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: r202818 - stable/8/etc/namedb 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: Fri, 22 Jan 2010 17:30:37 -0000 Author: dougb Date: Fri Jan 22 17:30:36 2010 New Revision: 202818 URL: http://svn.freebsd.org/changeset/base/202818 Log: MFC r202582: Update named.conf for documentation IP addresses and domains Modified: stable/8/etc/namedb/named.conf Directory Properties: stable/8/etc/ (props changed) stable/8/etc/rc.d/ (props changed) Modified: stable/8/etc/namedb/named.conf ============================================================================== --- stable/8/etc/namedb/named.conf Fri Jan 22 17:17:47 2010 (r202817) +++ stable/8/etc/namedb/named.conf Fri Jan 22 17:30:36 2010 (r202818) @@ -125,7 +125,7 @@ zone "in-addr.arpa" { 1. Faster local resolution for your users 2. No spurious traffic will be sent from your network to the roots */ -// RFC 1912 +// RFC 1912 (and BCP 32 for localhost) zone "localhost" { type master; file "/etc/namedb/master/localhost-forward.db"; }; zone "127.in-addr.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; }; zone "255.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; @@ -159,8 +159,21 @@ zone "168.192.in-addr.arpa" { type maste // Link-local/APIPA (RFCs 3330 and 3927) zone "254.169.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; -// TEST-NET for Documentation (RFC 3330) +// TEST-NET-[1-3] for Documentation (RFC 5737) zone "2.0.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "100.51.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "113.0.203.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// IPv6 Range for Documentation (RFC 3849) +zone "0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// Domain Names for Documentation and Testing (BCP 32) +zone "test" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example" { type master; file "/etc/namedb/master/empty.db"; }; +zone "invalid" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.com" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.net" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.org" { type master; file "/etc/namedb/master/empty.db"; }; // Router Benchmark Testing (RFC 3330) zone "18.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 17:31:54 2010 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 791CA106568D; Fri, 22 Jan 2010 17:31:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DBA48FC1F; Fri, 22 Jan 2010 17:31:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MHVsae037480; Fri, 22 Jan 2010 17:31:54 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MHVsDi037478; Fri, 22 Jan 2010 17:31:54 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001221731.o0MHVsDi037478@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Jan 2010 17:31:54 +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: r202819 - stable/7/etc/namedb 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: Fri, 22 Jan 2010 17:31:54 -0000 Author: dougb Date: Fri Jan 22 17:31:54 2010 New Revision: 202819 URL: http://svn.freebsd.org/changeset/base/202819 Log: MFC r202582: Update named.conf for documentation IP addresses and domains Modified: stable/7/etc/namedb/named.conf Directory Properties: stable/7/etc/ (props changed) stable/7/etc/rc.d/ (props changed) Modified: stable/7/etc/namedb/named.conf ============================================================================== --- stable/7/etc/namedb/named.conf Fri Jan 22 17:30:36 2010 (r202818) +++ stable/7/etc/namedb/named.conf Fri Jan 22 17:31:54 2010 (r202819) @@ -125,7 +125,7 @@ zone "in-addr.arpa" { 1. Faster local resolution for your users 2. No spurious traffic will be sent from your network to the roots */ -// RFC 1912 +// RFC 1912 (and BCP 32 for localhost) zone "localhost" { type master; file "/etc/namedb/master/localhost-forward.db"; }; zone "127.in-addr.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; }; zone "255.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; @@ -159,8 +159,21 @@ zone "168.192.in-addr.arpa" { type maste // Link-local/APIPA (RFCs 3330 and 3927) zone "254.169.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; -// TEST-NET for Documentation (RFC 3330) +// TEST-NET-[1-3] for Documentation (RFC 5737) zone "2.0.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "100.51.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "113.0.203.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// IPv6 Range for Documentation (RFC 3849) +zone "0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// Domain Names for Documentation and Testing (BCP 32) +zone "test" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example" { type master; file "/etc/namedb/master/empty.db"; }; +zone "invalid" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.com" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.net" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.org" { type master; file "/etc/namedb/master/empty.db"; }; // Router Benchmark Testing (RFC 3330) zone "18.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 17:33:05 2010 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 63F8B1065670; Fri, 22 Jan 2010 17:33:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 389738FC22; Fri, 22 Jan 2010 17:33:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MHX5Ds037809; Fri, 22 Jan 2010 17:33:05 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MHX5uF037807; Fri, 22 Jan 2010 17:33:05 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001221733.o0MHX5uF037807@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Jan 2010 17:33:05 +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: r202820 - stable/6/etc/namedb 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: Fri, 22 Jan 2010 17:33:05 -0000 Author: dougb Date: Fri Jan 22 17:33:04 2010 New Revision: 202820 URL: http://svn.freebsd.org/changeset/base/202820 Log: MFC r202582: Update named.conf for documentation IP addresses and domains Modified: stable/6/etc/namedb/named.conf Directory Properties: stable/6/etc/ (props changed) Modified: stable/6/etc/namedb/named.conf ============================================================================== --- stable/6/etc/namedb/named.conf Fri Jan 22 17:31:54 2010 (r202819) +++ stable/6/etc/namedb/named.conf Fri Jan 22 17:33:04 2010 (r202820) @@ -149,7 +149,7 @@ zone "in-addr.arpa" { 1. Faster local resolution for your users 2. No spurious traffic will be sent from your network to the roots */ -// RFC 1912 +// RFC 1912 (and BCP 32 for localhost) zone "localhost" { type master; file "/etc/namedb/master/localhost-forward.db"; }; zone "127.in-addr.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; }; zone "255.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; @@ -183,8 +183,21 @@ zone "168.192.in-addr.arpa" { type maste // Link-local/APIPA (RFCs 3330 and 3927) zone "254.169.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; -// TEST-NET for Documentation (RFC 3330) +// TEST-NET-[1-3] for Documentation (RFC 5737) zone "2.0.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "100.51.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "113.0.203.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// IPv6 Range for Documentation (RFC 3849) +zone "0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// Domain Names for Documentation and Testing (BCP 32) +zone "test" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example" { type master; file "/etc/namedb/master/empty.db"; }; +zone "invalid" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.com" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.net" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.org" { type master; file "/etc/namedb/master/empty.db"; }; // Router Benchmark Testing (RFC 3330) zone "18.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 17:51:09 2010 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 CE3E01065692 for ; Fri, 22 Jan 2010 17:51:09 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 5DCCD8FC1C for ; Fri, 22 Jan 2010 17:51:08 +0000 (UTC) Received: (qmail 8703 invoked by uid 399); 22 Jan 2010 17:51:08 -0000 Received: from localhost (HELO ?192.168.0.110?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 22 Jan 2010 17:51:08 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B59E591.2010808@FreeBSD.org> Date: Fri, 22 Jan 2010 09:51:13 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: Gavin Atkinson References: <201001171110.o0HBAPmc002877@svn.freebsd.org> In-Reply-To: <201001171110.o0HBAPmc002877@svn.freebsd.org> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r202464 - stable/8/etc/rc.d 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: Fri, 22 Jan 2010 17:51:09 -0000 On 1/17/2010 3:10 AM, Gavin Atkinson wrote: > Author: gavin > Date: Sun Jan 17 11:10:24 2010 > New Revision: 202464 > URL: http://svn.freebsd.org/changeset/base/202464 > > Log: > Merge r201440, r201445 from head: FYI, all merges to things under etc/ should happen in etc/, not in directories below it. Mergeinfo for this commit (and the one in stable/7) needs to be pulled up. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 18:35:50 2010 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 B7AD410656AB; Fri, 22 Jan 2010 18:35:50 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A60348FC25; Fri, 22 Jan 2010 18:35:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MIZooj051636; Fri, 22 Jan 2010 18:35:50 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MIZoiZ051634; Fri, 22 Jan 2010 18:35:50 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001221835.o0MIZoiZ051634@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 22 Jan 2010 18:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202821 - head/sys/dev/bge 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: Fri, 22 Jan 2010 18:35:50 -0000 Author: yongari Date: Fri Jan 22 18:35:50 2010 New Revision: 202821 URL: http://svn.freebsd.org/changeset/base/202821 Log: Fix a long standing ASF heartbeat sending bug. The initial implementation of heartbeat interval was 2 but there was typo which caused the heartbeat is sent approximately every 5 seconds. This caused unintended controller reset by firmware because firmware thought OS was crashed. Submitted by: Floris Bos < info <> je-eigen-domein dot nl > Tested by: Andrzej Tobola < ato <> iem dot pw dot edu dot pl > Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Jan 22 17:33:04 2010 (r202820) +++ head/sys/dev/bge/if_bge.c Fri Jan 22 18:35:50 2010 (r202821) @@ -3677,7 +3677,7 @@ bge_asf_driver_up(struct bge_softc *sc) if (sc->bge_asf_count) sc->bge_asf_count --; else { - sc->bge_asf_count = 5; + sc->bge_asf_count = 2; bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW, BGE_FW_DRV_ALIVE); bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_LEN, 4); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 18:46:37 2010 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 D1DC4106566C; Fri, 22 Jan 2010 18:46:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C06698FC14; Fri, 22 Jan 2010 18:46:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MIkblI054035; Fri, 22 Jan 2010 18:46:37 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MIkb43054033; Fri, 22 Jan 2010 18:46:37 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001221846.o0MIkb43054033@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 22 Jan 2010 18:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202822 - head/sys/dev/bge 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: Fri, 22 Jan 2010 18:46:37 -0000 Author: yongari Date: Fri Jan 22 18:46:37 2010 New Revision: 202822 URL: http://svn.freebsd.org/changeset/base/202822 Log: Use new handshake command for BCM5750 or new controllers. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Jan 22 18:35:50 2010 (r202821) +++ head/sys/dev/bge/if_bge.c Fri Jan 22 18:46:37 2010 (r202822) @@ -2744,9 +2744,8 @@ bge_attach(device_t dev) & BGE_HWCFG_ASF) { sc->bge_asf_mode |= ASF_ENABLE; sc->bge_asf_mode |= ASF_STACKUP; - if (sc->bge_asicrev == BGE_ASICREV_BCM5750) { + if (BGE_IS_575X_PLUS(sc)) sc->bge_asf_mode |= ASF_NEW_HANDSHAKE; - } } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 19:22:37 2010 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 20103106566C; Fri, 22 Jan 2010 19:22:37 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5DB8FC0A; Fri, 22 Jan 2010 19:22:36 +0000 (UTC) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw0.york.ac.uk (8.13.6/8.13.6) with ESMTP id o0MJMXug018203; Fri, 22 Jan 2010 19:22:33 GMT Received: from ury.york.ac.uk ([144.32.108.81]) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1NYP5V-0002js-Fu; Fri, 22 Jan 2010 19:22:33 +0000 Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.14.3/8.14.3) with ESMTP id o0MJMX4l095554; Fri, 22 Jan 2010 19:22:33 GMT (envelope-from gavin@FreeBSD.org) Received: from localhost (gavin@localhost) by ury.york.ac.uk (8.14.3/8.14.3/Submit) with ESMTP id o0MJMXKj095547; Fri, 22 Jan 2010 19:22:33 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Fri, 22 Jan 2010 19:22:33 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Doug Barton In-Reply-To: <4B59E591.2010808@FreeBSD.org> Message-ID: References: <201001171110.o0HBAPmc002877@svn.freebsd.org> <4B59E591.2010808@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r202464 - stable/8/etc/rc.d 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: Fri, 22 Jan 2010 19:22:37 -0000 On Fri, 22 Jan 2010, Doug Barton wrote: > On 1/17/2010 3:10 AM, Gavin Atkinson wrote: > > Author: gavin > > Date: Sun Jan 17 11:10:24 2010 > > New Revision: 202464 > > URL: http://svn.freebsd.org/changeset/base/202464 > > > > Log: > > Merge r201440, r201445 from head: > > FYI, all merges to things under etc/ should happen in etc/, not in > directories below it. Mergeinfo for this commit (and the one in > stable/7) needs to be pulled up. OK, I'll see what I can do, although I may not get a chance until Sunday. Should this be documented on http://wiki.freebsd.org/SubversionPrimer/Merging? Thanks, Gavin From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 19:51:34 2010 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 B6E11106566B; Fri, 22 Jan 2010 19:51:34 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1FA58FC13; Fri, 22 Jan 2010 19:51:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MJpYAR068380; Fri, 22 Jan 2010 19:51:34 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MJpYlv068373; Fri, 22 Jan 2010 19:51:34 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001221951.o0MJpYlv068373@svn.freebsd.org> From: Brooks Davis Date: Fri, 22 Jan 2010 19:51:34 +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: r202823 - in stable/8: lib/libc/sys sys/kern sys/net sys/sys tools/regression/fifo/fifo_misc usr.bin/truss 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: Fri, 22 Jan 2010 19:51:34 -0000 Author: brooks Date: Fri Jan 22 19:51:34 2010 New Revision: 202823 URL: http://svn.freebsd.org/changeset/base/202823 Log: MFC r201350: The devices that supported EVFILT_NETDEV kqueue filters were removed in r195175. Remove all definitions, documentation, and usage. The change of function signature for vlan_link_state() was not merged to maintain the ABI. Modified: stable/8/lib/libc/sys/kqueue.2 stable/8/sys/kern/kern_event.c stable/8/sys/net/if.c stable/8/sys/sys/event.h stable/8/tools/regression/fifo/fifo_misc/fifo_misc.c stable/8/usr.bin/truss/syscalls.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/tools/regression/fifo/ (props changed) stable/8/usr.bin/truss/ (props changed) Modified: stable/8/lib/libc/sys/kqueue.2 ============================================================================== --- stable/8/lib/libc/sys/kqueue.2 Fri Jan 22 18:46:37 2010 (r202822) +++ stable/8/lib/libc/sys/kqueue.2 Fri Jan 22 19:51:34 2010 (r202823) @@ -438,19 +438,6 @@ There is a system wide limit on the numb which is controlled by the .Va kern.kq_calloutmax sysctl. -.It Dv EVFILT_NETDEV -Takes a descriptor to a network interface as the identifier, and the events to watch for in -.Va fflags . -It returns, when one or more of the requested events occur on the descriptor. -The events to monitor are: -.Bl -tag -width XXNOTE_LINKDOWN -.It Dv NOTE_LINKUP -The link is up. -.It Dv NOTE_LINKDOWN -The link is down. -.It Dv NOTE_LINKINV -The link state is invalid. -.El .Pp On return, .Va fflags @@ -595,13 +582,6 @@ system and this manual page were written .An Jonathan Lemon Aq jlemon@FreeBSD.org . .Sh BUGS The -.Dv EVFILT_NETDEV -filter is currently only implemented for devices that use the -.Xr miibus 4 -driver for LINKUP and LINKDOWN operations. -Therefore, it will not work with many non-ethernet devices. -.Pp -The .Fa timeout value is limited to 24 hours; longer timeouts will be silently reinterpreted as 24 hours. Modified: stable/8/sys/kern/kern_event.c ============================================================================== --- stable/8/sys/kern/kern_event.c Fri Jan 22 18:46:37 2010 (r202822) +++ stable/8/sys/kern/kern_event.c Fri Jan 22 19:51:34 2010 (r202823) @@ -264,7 +264,7 @@ static struct { { &proc_filtops }, /* EVFILT_PROC */ { &sig_filtops }, /* EVFILT_SIGNAL */ { &timer_filtops }, /* EVFILT_TIMER */ - { &file_filtops }, /* EVFILT_NETDEV */ + { &null_filtops }, /* former EVFILT_NETDEV */ { &fs_filtops }, /* EVFILT_FS */ { &null_filtops }, /* EVFILT_LIO */ { &user_filtops }, /* EVFILT_USER */ Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Fri Jan 22 18:46:37 2010 (r202822) +++ stable/8/sys/net/if.c Fri Jan 22 19:51:34 2010 (r202823) @@ -1878,19 +1878,12 @@ do_link_state_change(void *arg, int pend { struct ifnet *ifp = (struct ifnet *)arg; int link_state = ifp->if_link_state; - int link; CURVNET_SET(ifp->if_vnet); /* Notify that the link state has changed. */ rt_ifmsg(ifp); - if (link_state == LINK_STATE_UP) - link = NOTE_LINKUP; - else if (link_state == LINK_STATE_DOWN) - link = NOTE_LINKDOWN; - else - link = NOTE_LINKINV; if (ifp->if_vlantrunk != NULL) - (*vlan_link_state_p)(ifp, link); + (*vlan_link_state_p)(ifp, 0); if ((ifp->if_type == IFT_ETHER || ifp->if_type == IFT_L2VLAN) && IFP2AC(ifp)->ac_netgraph != NULL) Modified: stable/8/sys/sys/event.h ============================================================================== --- stable/8/sys/sys/event.h Fri Jan 22 18:46:37 2010 (r202822) +++ stable/8/sys/sys/event.h Fri Jan 22 19:51:34 2010 (r202823) @@ -38,7 +38,7 @@ #define EVFILT_PROC (-5) /* attached to struct proc */ #define EVFILT_SIGNAL (-6) /* attached to struct proc */ #define EVFILT_TIMER (-7) /* timers */ -#define EVFILT_NETDEV (-8) /* network devices */ +/* EVFILT_NETDEV (-8) no longer supported */ #define EVFILT_FS (-9) /* filesystem events */ #define EVFILT_LIO (-10) /* attached to lio requests */ #define EVFILT_USER (-11) /* User events */ @@ -131,13 +131,6 @@ struct kevent { #define NOTE_TRACKERR 0x00000002 /* could not track child */ #define NOTE_CHILD 0x00000004 /* am a child process */ -/* - * data/hint flags for EVFILT_NETDEV, shared with userspace - */ -#define NOTE_LINKUP 0x0001 /* link is up */ -#define NOTE_LINKDOWN 0x0002 /* link is down */ -#define NOTE_LINKINV 0x0004 /* link state is invalid */ - struct knote; SLIST_HEAD(klist, knote); struct kqueue; Modified: stable/8/tools/regression/fifo/fifo_misc/fifo_misc.c ============================================================================== --- stable/8/tools/regression/fifo/fifo_misc/fifo_misc.c Fri Jan 22 18:46:37 2010 (r202822) +++ stable/8/tools/regression/fifo/fifo_misc/fifo_misc.c Fri Jan 22 19:51:34 2010 (r202823) @@ -148,114 +148,6 @@ test_truncate(void) cleanfifo("testfifo", -1, -1); } -struct filter_entry { - int fe_filter; - const char *fe_name; - int fe_error; - const char *fe_errorname; -}; - -static const struct filter_entry good_filter_types[] = { - { EVFILT_READ, "EVFILT_READ", 0, "0" }, - { EVFILT_WRITE, "EVFILT_WRITE", 0, "0" }, -#if WORKING_EVFILT_VNODE_ON_FIFOS - { EVFILT_VNODE, "EVFILT_VNODE", EINVAL, "EINVAL" }, -#endif -}; -static const int good_filter_types_len = sizeof(good_filter_types) / - sizeof(good_filter_types[0]); - -static const struct filter_entry bad_filter_types[] = { - { EVFILT_NETDEV, "EVFILT_NETDEV", EINVAL, "EINVAL" }, -}; -static const int bad_filter_types_len = sizeof(bad_filter_types) / - sizeof(bad_filter_types[0]); - -/* - * kqueue event-related tests are in fifo_io.c; however, that tests only - * valid invocations of kqueue. Check to make sure that some invalid filters - * that are generally allowed on file descriptors are not allowed to be - * registered with kqueue, and that if attempts are made, we get the right - * error. - */ -static void -test_kqueue(void) -{ - int kqueue_fd, reader_fd, writer_fd; - struct kevent kev_set; - struct timespec timeout; - int i, ret; - - makefifo("testfifo", __func__); - - if (openfifo("testfifo", __func__, &reader_fd, &writer_fd) < 0) { - warn("%s: openfifo", __func__); - cleanfifo("testfifo", -1, -1); - exit(-1); - } - - kqueue_fd = kqueue(); - if (kqueue_fd < 0) { - warn("%s: kqueue", __func__); - cleanfifo("testfifo", reader_fd, writer_fd); - exit(-1); - } - - timeout.tv_sec = 0; - timeout.tv_nsec = 0; - - for (i = 0; i < good_filter_types_len; i++) { - bzero(&kev_set, sizeof(kev_set)); - EV_SET(&kev_set, reader_fd, good_filter_types[i].fe_filter, - EV_ADD, 0, 0, 0); - ret = kevent(kqueue_fd, &kev_set, 1, NULL, 0, &timeout); - if (ret < 0) { - warn("%s: kevent: adding good filter %s", __func__, - good_filter_types[i].fe_name); - close(kqueue_fd); - cleanfifo("testfifo", reader_fd, writer_fd); - exit(-1); - } - bzero(&kev_set, sizeof(kev_set)); - EV_SET(&kev_set, reader_fd, good_filter_types[i].fe_filter, - EV_DELETE, 0, 0, 0); - ret = kevent(kqueue_fd, &kev_set, 1, NULL, 0, &timeout); - if (ret < 0) { - warn("%s: kevent: deleting good filter %s", __func__, - good_filter_types[i].fe_name); - close(kqueue_fd); - cleanfifo("testfifo", reader_fd, writer_fd); - exit(-1); - } - } - - for (i = 0; i < bad_filter_types_len; i++) { - bzero(&kev_set, sizeof(kev_set)); - EV_SET(&kev_set, reader_fd, bad_filter_types[i].fe_filter, - EV_ADD, 0, 0, 0); - ret = kevent(kqueue_fd, &kev_set, 1, NULL, 0, &timeout); - if (ret >= 0) { - warnx("%s: kevent: bad filter %s succeeded, expected " - "EINVAL", __func__, bad_filter_types[i].fe_name); - close(kqueue_fd); - cleanfifo("testfifo", reader_fd, writer_fd); - exit(-1); - } - if (errno != bad_filter_types[i].fe_error) { - warn("%s: kevent: bad filter %s failed with error " - "not %s", __func__, - bad_filter_types[i].fe_name, - bad_filter_types[i].fe_errorname); - close(kqueue_fd); - cleanfifo("testfifo", reader_fd, writer_fd); - exit(-1); - } - } - - close(kqueue_fd); - cleanfifo("testfifo", reader_fd, writer_fd); -} - static int test_ioctl_setclearflag(int fd, int flag, const char *testname, const char *fdname, const char *flagname) @@ -345,7 +237,6 @@ main(int argc, char *argv[]) test_lseek(); test_truncate(); - test_kqueue(); test_ioctl(); return (0); Modified: stable/8/usr.bin/truss/syscalls.c ============================================================================== --- stable/8/usr.bin/truss/syscalls.c Fri Jan 22 18:46:37 2010 (r202822) +++ stable/8/usr.bin/truss/syscalls.c Fri Jan 22 19:51:34 2010 (r202823) @@ -259,7 +259,7 @@ struct xlat { static struct xlat kevent_filters[] = { X(EVFILT_READ) X(EVFILT_WRITE) X(EVFILT_AIO) X(EVFILT_VNODE) X(EVFILT_PROC) X(EVFILT_SIGNAL) X(EVFILT_TIMER) - X(EVFILT_NETDEV) X(EVFILT_FS) X(EVFILT_READ) XEND + X(EVFILT_FS) X(EVFILT_READ) XEND }; static struct xlat kevent_flags[] = { From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:02:22 2010 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 CA3E31065670; Fri, 22 Jan 2010 20:02:22 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7E918FC17; Fri, 22 Jan 2010 20:02:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MK2MUo070876; Fri, 22 Jan 2010 20:02:22 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MK2M9q070874; Fri, 22 Jan 2010 20:02:22 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001222002.o0MK2M9q070874@svn.freebsd.org> From: Gavin Atkinson Date: Fri, 22 Jan 2010 20:02:22 +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: r202824 - stable/8/sbin/dumpfs 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: Fri, 22 Jan 2010 20:02:22 -0000 Author: gavin Date: Fri Jan 22 20:02:22 2010 New Revision: 202824 URL: http://svn.freebsd.org/changeset/base/202824 Log: Merge r201647 from head: Print leading zeros in the UFS2 FSID. PR: bin/142155 Submitted by: Efstratios Karatzas gpf.kira gmail.com Approved by: ed (mentor, implicit) Modified: stable/8/sbin/dumpfs/dumpfs.c Directory Properties: stable/8/sbin/dumpfs/ (props changed) Modified: stable/8/sbin/dumpfs/dumpfs.c ============================================================================== --- stable/8/sbin/dumpfs/dumpfs.c Fri Jan 22 19:51:34 2010 (r202823) +++ stable/8/sbin/dumpfs/dumpfs.c Fri Jan 22 20:02:22 2010 (r202824) @@ -160,7 +160,7 @@ dumpfs(const char *name) fstime = afs.fs_old_time; printf("magic\t%x (UFS1)\ttime\t%s", afs.fs_magic, ctime(&fstime)); - printf("id\t[ %x %x ]\n", afs.fs_id[0], afs.fs_id[1]); + printf("id\t[ %08x %08x ]\n", afs.fs_id[0], afs.fs_id[1]); printf("ncg\t%d\tsize\t%jd\tblocks\t%jd\n", afs.fs_ncg, (intmax_t)fssize, (intmax_t)afs.fs_dsize); break; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:06:58 2010 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 243FB106566B; Fri, 22 Jan 2010 20:06:58 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11A328FC0C; Fri, 22 Jan 2010 20:06:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MK6v8w072015; Fri, 22 Jan 2010 20:06:57 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MK6vFR072013; Fri, 22 Jan 2010 20:06:57 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001222006.o0MK6vFR072013@svn.freebsd.org> From: Gavin Atkinson Date: Fri, 22 Jan 2010 20:06:57 +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: r202825 - stable/7/sbin/dumpfs 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: Fri, 22 Jan 2010 20:06:58 -0000 Author: gavin Date: Fri Jan 22 20:06:57 2010 New Revision: 202825 URL: http://svn.freebsd.org/changeset/base/202825 Log: Merge r201647 from head: Print leading zeros in the UFS2 FSID. PR: bin/142155 Submitted by: Efstratios Karatzas gpf.kira gmail.com Approved by: ed (mentor, implicit) Modified: stable/7/sbin/dumpfs/dumpfs.c Directory Properties: stable/7/sbin/dumpfs/ (props changed) Modified: stable/7/sbin/dumpfs/dumpfs.c ============================================================================== --- stable/7/sbin/dumpfs/dumpfs.c Fri Jan 22 20:02:22 2010 (r202824) +++ stable/7/sbin/dumpfs/dumpfs.c Fri Jan 22 20:06:57 2010 (r202825) @@ -160,7 +160,7 @@ dumpfs(const char *name) fstime = afs.fs_old_time; printf("magic\t%x (UFS1)\ttime\t%s", afs.fs_magic, ctime(&fstime)); - printf("id\t[ %x %x ]\n", afs.fs_id[0], afs.fs_id[1]); + printf("id\t[ %08x %08x ]\n", afs.fs_id[0], afs.fs_id[1]); printf("ncg\t%d\tsize\t%jd\tblocks\t%jd\n", afs.fs_ncg, (intmax_t)fssize, (intmax_t)afs.fs_dsize); break; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:10:13 2010 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 6CE921065670; Fri, 22 Jan 2010 20:10:13 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41F888FC12; Fri, 22 Jan 2010 20:10:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKADEx072734; Fri, 22 Jan 2010 20:10:13 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKADNd072732; Fri, 22 Jan 2010 20:10:13 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001222010.o0MKADNd072732@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 22 Jan 2010 20:10: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: r202826 - head/sys/dev/msk 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: Fri, 22 Jan 2010 20:10:13 -0000 Author: yongari Date: Fri Jan 22 20:10:12 2010 New Revision: 202826 URL: http://svn.freebsd.org/changeset/base/202826 Log: s/Mhz/MHz/g Submitted by: N.J. Mann njm dot me dot uk > Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Fri Jan 22 20:06:57 2010 (r202825) +++ head/sys/dev/msk/if_msk.c Fri Jan 22 20:10:12 2010 (r202826) @@ -1697,15 +1697,15 @@ mskc_attach(device_t dev) switch (sc->msk_hw_id) { case CHIP_ID_YUKON_EC: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_EC_U: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_JUMBO_NOCSUM; break; case CHIP_ID_YUKON_EX: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2 | MSK_FLAG_AUTOTX_CSUM; /* @@ -1723,11 +1723,11 @@ mskc_attach(device_t dev) sc->msk_pflags |= MSK_FLAG_JUMBO_NOCSUM; break; case CHIP_ID_YUKON_FE: - sc->msk_clock = 100; /* 100 Mhz */ + sc->msk_clock = 100; /* 100 MHz */ sc->msk_pflags |= MSK_FLAG_FASTETHER; break; case CHIP_ID_YUKON_FE_P: - sc->msk_clock = 50; /* 50 Mhz */ + sc->msk_clock = 50; /* 50 MHz */ sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2 | MSK_FLAG_AUTOTX_CSUM; if (sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) { @@ -1746,15 +1746,15 @@ mskc_attach(device_t dev) } break; case CHIP_ID_YUKON_XL: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_UL_2: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; default: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ break; } From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:15:49 2010 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 58BC01065698; Fri, 22 Jan 2010 20:15:49 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 476B38FC1C; Fri, 22 Jan 2010 20:15:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKFnIL074029; Fri, 22 Jan 2010 20:15:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKFn2X074027; Fri, 22 Jan 2010 20:15:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001222015.o0MKFn2X074027@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 22 Jan 2010 20:15: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: r202827 - head/sys/dev/msk 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: Fri, 22 Jan 2010 20:15:49 -0000 Author: yongari Date: Fri Jan 22 20:15:49 2010 New Revision: 202827 URL: http://svn.freebsd.org/changeset/base/202827 Log: Yukon Ultra2 has 126MHz clock. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Fri Jan 22 20:10:12 2010 (r202826) +++ head/sys/dev/msk/if_msk.c Fri Jan 22 20:15:49 2010 (r202827) @@ -1750,7 +1750,7 @@ mskc_attach(device_t dev) sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_UL_2: - sc->msk_clock = 156; /* 156 MHz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; default: From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:24:55 2010 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 D15631065744; Fri, 22 Jan 2010 20:24:55 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B51948FC14; Fri, 22 Jan 2010 20:24:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKOtmm076079; Fri, 22 Jan 2010 20:24:55 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKOtOh076074; Fri, 22 Jan 2010 20:24:55 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001222024.o0MKOtOh076074@svn.freebsd.org> From: Brooks Davis Date: Fri, 22 Jan 2010 20:24:55 +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: r202828 - stable/8/sys/dev/aic7xxx/aicasm 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: Fri, 22 Jan 2010 20:24:56 -0000 Author: brooks Date: Fri Jan 22 20:24:55 2010 New Revision: 202828 URL: http://svn.freebsd.org/changeset/base/202828 Log: MFC r201261: Add missing `void' keywords. Modified: stable/8/sys/dev/aic7xxx/aicasm/aicasm.c stable/8/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l stable/8/sys/dev/aic7xxx/aicasm/aicasm_scan.l stable/8/sys/dev/aic7xxx/aicasm/aicasm_symbol.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/aic7xxx/aicasm/aicasm.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aicasm/aicasm.c Fri Jan 22 20:15:49 2010 (r202827) +++ stable/8/sys/dev/aic7xxx/aicasm/aicasm.c Fri Jan 22 20:24:55 2010 (r202828) @@ -306,7 +306,7 @@ main(int argc, char *argv[]) } static void -usage() +usage(void) { (void)fprintf(stderr, @@ -318,7 +318,7 @@ usage() } static void -back_patch() +back_patch(void) { struct instruction *cur_instr; @@ -347,7 +347,7 @@ back_patch() } static void -output_code() +output_code(void) { struct instruction *cur_instr; patch_t *cur_patch; @@ -733,7 +733,7 @@ stop(const char *string, int err_code) } struct instruction * -seq_alloc() +seq_alloc(void) { struct instruction *new_instr; @@ -747,7 +747,7 @@ seq_alloc() } critical_section_t * -cs_alloc() +cs_alloc(void) { critical_section_t *new_cs; @@ -761,7 +761,7 @@ cs_alloc() } scope_t * -scope_alloc() +scope_alloc(void) { scope_t *new_scope; Modified: stable/8/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l ============================================================================== --- stable/8/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Fri Jan 22 20:15:49 2010 (r202827) +++ stable/8/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Fri Jan 22 20:24:55 2010 (r202828) @@ -152,7 +152,7 @@ MCARG [^(), \t]+ %% int -mmwrap() +mmwrap(void) { stop("EOF encountered in macro call", EX_DATAERR); return (1); Modified: stable/8/sys/dev/aic7xxx/aicasm/aicasm_scan.l ============================================================================== --- stable/8/sys/dev/aic7xxx/aicasm/aicasm_scan.l Fri Jan 22 20:15:49 2010 (r202827) +++ stable/8/sys/dev/aic7xxx/aicasm/aicasm_scan.l Fri Jan 22 20:24:55 2010 (r202828) @@ -590,7 +590,7 @@ next_substitution(struct symbol *mac_sym } int -yywrap() +yywrap(void) { include_t *include; Modified: stable/8/sys/dev/aic7xxx/aicasm/aicasm_symbol.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aicasm/aicasm_symbol.c Fri Jan 22 20:15:49 2010 (r202827) +++ stable/8/sys/dev/aic7xxx/aicasm/aicasm_symbol.c Fri Jan 22 20:24:55 2010 (r202828) @@ -129,7 +129,7 @@ symbol_delete(symbol_t *symbol) } void -symtable_open() +symtable_open(void) { symtable = dbopen(/*filename*/NULL, O_CREAT | O_NONBLOCK | O_RDWR, /*mode*/0, DB_HASH, @@ -143,7 +143,7 @@ symtable_open() } void -symtable_close() +symtable_close(void) { if (symtable != NULL) { DBT key; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:27:38 2010 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 734EB106566C; Fri, 22 Jan 2010 20:27:38 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id D364B8FC08; Fri, 22 Jan 2010 20:27:37 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so377903qwd.7 for ; Fri, 22 Jan 2010 12:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=YvJug5LDwwhEOdop41bkryQgXLkBJyQfVrk+S4ezRcA=; b=hdjWGztxAb+9m8HrJlwCnWufE0RC0yPXhDvadEkPeSCeRx2LFDMCjmz5usr1IwGhbF /XRWg3h+NKneKWW8PwPgpGKkozaCxvL5SS0TWAsLlJhG1JAAAZjdIWCY1ABAmr1Emhgn P9Qx6DOuBoURnfLzTBgUAFUmZfRS9mWj1CAPY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=BT1Q1qi6pZiZsPpdv19iIALvl4Ekwgs2RZclDC7VzIwccOkJ7PTwkropj4+8yk/P6o pUdZBkXBrxB4ooyrcaf/7bFrwecADSZ2J7kEqvEouRxB1mabZozd3Q7pNRGRnFNDMrIP OzMRR4jwOriXQGtWLvwuDfbo6oHa9rhm3Merk= Received: by 10.224.79.231 with SMTP id q39mr2290428qak.163.1264192057049; Fri, 22 Jan 2010 12:27:37 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 6sm5727844qwk.51.2010.01.22.12.27.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 22 Jan 2010 12:27:36 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 22 Jan 2010 12:27:34 -0800 From: Pyun YongHyeon Date: Fri, 22 Jan 2010 12:27:34 -0800 To: Pyun YongHyeon Message-ID: <20100122202734.GD20753@michelle.cdnetworks.com> References: <201001222015.o0MKFn2X074027@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001222015.o0MKFn2X074027@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202827 - head/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 20:27:38 -0000 On Fri, Jan 22, 2010 at 08:15:49PM +0000, Pyun YongHyeon wrote: > Author: yongari > Date: Fri Jan 22 20:15:49 2010 > New Revision: 202827 > URL: http://svn.freebsd.org/changeset/base/202827 > > Log: > Yukon Ultra2 has 126MHz clock. > Sorry, it should be read as 125MHz. From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:28:43 2010 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 07DF11065672; Fri, 22 Jan 2010 20:28:43 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id AD1C38FC12; Fri, 22 Jan 2010 20:28:42 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id o0MKRrM4075264; Fri, 22 Jan 2010 14:27:53 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id o0MKRraq075263; Fri, 22 Jan 2010 14:27:53 -0600 (CST) (envelope-from brooks) Date: Fri, 22 Jan 2010 14:27:53 -0600 From: Brooks Davis To: Brooks Davis Message-ID: <20100122202752.GA74843@lor.one-eyed-alien.net> References: <201001222024.o0MKOtOh076074@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: <201001222024.o0MKOtOh076074@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 22 Jan 2010 14:27:53 -0600 (CST) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r202828 - stable/8/sys/dev/aic7xxx/aicasm 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: Fri, 22 Jan 2010 20:28:43 -0000 --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 22, 2010 at 08:24:55PM +0000, Brooks Davis wrote: > Author: brooks > Date: Fri Jan 22 20:24:55 2010 > New Revision: 202828 > URL: http://svn.freebsd.org/changeset/base/202828 >=20 > Log: > MFC r201261: > Add missing `void' keywords. With this change it is again possible to build an 8-STABLE kernel on HEAD with config+make. -- Brooks --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFLWgpIXY6L6fI4GtQRAt0zAJ0RIBaxvb2zB+UTvjgvdRlRWiel4gCdHoY4 tGZJzZXf151W6++qA1KsfHA= =y55c -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:30:54 2010 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 6C6AC1065679; Fri, 22 Jan 2010 20:30:54 +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 5A5568FC18; Fri, 22 Jan 2010 20:30:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKUsH9077429; Fri, 22 Jan 2010 20:30:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKUsDw077427; Fri, 22 Jan 2010 20:30:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001222030.o0MKUsDw077427@svn.freebsd.org> From: John Baldwin Date: Fri, 22 Jan 2010 20:30:54 +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: r202829 - stable/7/sys/amd64/amd64 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: Fri, 22 Jan 2010 20:30:54 -0000 Author: jhb Date: Fri Jan 22 20:30:54 2010 New Revision: 202829 URL: http://svn.freebsd.org/changeset/base/202829 Log: MFC 189415: Make pmap_copy() more TLB friendly. Specifically, make it use the kernel's direct map instead of the pmap's recursive mapping to access the lowest level in the page table. Modified: stable/7/sys/amd64/amd64/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 20:24:55 2010 (r202828) +++ stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 20:30:54 2010 (r202829) @@ -3498,9 +3498,6 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm if (dst_addr != src_addr) return; - if (!pmap_is_current(src_pmap)) - return; - vm_page_lock_queues(); if (dst_pmap < src_pmap) { PMAP_LOCK(dst_pmap); @@ -3562,14 +3559,16 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm continue; } - srcmpte = PHYS_TO_VM_PAGE(srcptepaddr & PG_FRAME); + srcptepaddr &= PG_FRAME; + srcmpte = PHYS_TO_VM_PAGE(srcptepaddr); KASSERT(srcmpte->wire_count > 0, ("pmap_copy: source page table page is unused")); if (va_next > end_addr) va_next = end_addr; - src_pte = vtopte(addr); + src_pte = (pt_entry_t *)PHYS_TO_DMAP(srcptepaddr); + src_pte = &src_pte[pmap_pte_index(addr)]; while (addr < va_next) { pt_entry_t ptetemp; ptetemp = *src_pte; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:32:07 2010 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 86188106566C; Fri, 22 Jan 2010 20:32:07 +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 748B28FC0A; Fri, 22 Jan 2010 20:32:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKW71r077745; Fri, 22 Jan 2010 20:32:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKW79x077742; Fri, 22 Jan 2010 20:32:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222032.o0MKW79x077742@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202830 - in head/sys/mips: include mips 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: Fri, 22 Jan 2010 20:32:07 -0000 Author: imp Date: Fri Jan 22 20:32:07 2010 New Revision: 202830 URL: http://svn.freebsd.org/changeset/base/202830 Log: Create a method of last resort for rebooting the mips processor: jump to the reset vector. This works for many SoCs where other reset hardware is either missing or unknown. Modified: head/sys/mips/include/md_var.h head/sys/mips/mips/machdep.c Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Fri Jan 22 20:30:54 2010 (r202829) +++ head/sys/mips/include/md_var.h Fri Jan 22 20:32:07 2010 (r202830) @@ -52,6 +52,7 @@ uintptr_t MipsEmulateBranch(struct trapf void MipsSwitchFPState(struct thread *, struct trapframe *); u_long kvtop(void *addr); int is_physical_memory(vm_offset_t addr); +void mips_generic_reset(void); #define is_cacheable_mem(pa) is_physical_memory((pa)) Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Fri Jan 22 20:30:54 2010 (r202829) +++ head/sys/mips/mips/machdep.c Fri Jan 22 20:32:07 2010 (r202830) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -359,6 +360,17 @@ mips_vector_init(void) } /* + * Many SoCs have a means to reset the core itself. Others do not, or + * the method is unknown to us. For those cases, we jump to the mips + * reset vector and hope for the best. This works well in practice. + */ +void +mips_generic_reset() +{ + ((void(*)(void))(intptr_t)MIPS_VEC_RESET)(); +} + +/* * Initialise a struct pcpu. */ void From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:40:08 2010 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 0EFE3106566B; Fri, 22 Jan 2010 20:40:08 +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 F12978FC08; Fri, 22 Jan 2010 20:40:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKe7vO079531; Fri, 22 Jan 2010 20:40:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKe7TB079529; Fri, 22 Jan 2010 20:40:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222040.o0MKe7TB079529@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:40:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202831 - head/sys/mips/cavium 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: Fri, 22 Jan 2010 20:40:08 -0000 Author: imp Date: Fri Jan 22 20:40:07 2010 New Revision: 202831 URL: http://svn.freebsd.org/changeset/base/202831 Log: o Add support for memory above 256MB on the octeon. o Force the ebase to be 0x80000000 (the base that we're booted with may need to be respected in the future). o Initialize the clock early so we can initialize the console early o use panic where we can now use it. o Tag some code for parsing the boot records as belonging in the cavium sdk. o remove support for booting on ancient boards... # we make it further in bootstrapping now: interrupts being enabled in the # uarts are now taking us out, it seems, for reasons unknown. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 20:32:07 2010 (r202830) +++ head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 20:40:07 2010 (r202831) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #define MAX_APP_DESC_ADDR 0xafffffff #endif +static struct pcpu pcpu0; extern int *edata; extern int *end; @@ -87,6 +88,16 @@ static void octeon_boot_params_init(regi static uint64_t ciu_get_intr_sum_reg_addr(int core_num, int intx, int enx); static uint64_t ciu_get_intr_en_reg_addr(int core_num, int intx, int enx); +static __inline void +mips_wr_ebase(u_int32_t a0) +{ + __asm __volatile("mtc0 %[a0], $15, 1 ;" + : + : [a0] "r"(a0)); + + mips_barrier(); +} + void platform_cpu_init() { @@ -638,52 +649,122 @@ void ciu_enable_interrupts(int core_num, octeon_set_interrupts(cpu_status_bits); } +unsigned long +octeon_get_clock_rate(void) +{ + return octeon_cpu_clock; +} + +static void +octeon_memory_init(void) +{ + uint32_t realmem_bytes; + + if (octeon_board_real()) { + printf("octeon_dram == %llx\n", octeon_dram); + printf("reduced to ram: %u MB", (uint32_t) octeon_dram >> 20); + + realmem_bytes = (octeon_dram - PAGE_SIZE); + realmem_bytes &= ~(PAGE_SIZE - 1); + printf("Real memory bytes is %x\n", realmem_bytes); + } else { + /* Simulator we limit to 96 meg */ + realmem_bytes = (96 << 20); + } + /* phys_avail regions are in bytes */ + phys_avail[0] = (MIPS_KSEG0_TO_PHYS((vm_offset_t)&end) + PAGE_SIZE) & ~(PAGE_SIZE - 1); + if (octeon_board_real()) { + if (realmem_bytes > OCTEON_DRAM_FIRST_256_END) + phys_avail[1] = OCTEON_DRAM_FIRST_256_END; + else + phys_avail[1] = realmem_bytes; + realmem_bytes -= OCTEON_DRAM_FIRST_256_END; + realmem_bytes &= ~(PAGE_SIZE - 1); + printf("phys_avail[0] = %x phys_avail[1] = %x\n", + phys_avail[0], phys_avail[1]); + } else { + /* Simulator gets 96Meg period. */ + phys_avail[1] = (96 << 20); + } + /*- + * Octeon Memory looks as follows: + * PA + * 0000 0000 to 0x0 0000 0000 0000 + * 0FFF FFFF First 256 MB memory Maps to 0x0 0000 0FFF FFFF + * + * 1000 0000 to 0x1 0000 1000 0000 + * 1FFF FFFF Uncached Bu I/O space.converted to 0x1 0000 1FFF FFFF + * + * 2FFF FFFF to Cached 0x0 0000 2000 0000 + * FFFF FFFF all dram mem above the first 512M 0x3 FFFF FFFF FFFF + * + */ + physmem = btoc(phys_avail[1] - phys_avail[0]); + if ((octeon_board_real()) && + (realmem_bytes > OCTEON_DRAM_FIRST_256_END)) { + /* take out the upper non-cached 1/2 */ + realmem_bytes -= OCTEON_DRAM_FIRST_256_END; + realmem_bytes &= ~(PAGE_SIZE - 1); + /* Now map the rest of the memory */ + phys_avail[2] = 0x20000000; + printf("realmem_bytes is now at %x\n", realmem_bytes); + phys_avail[3] = ((uint32_t) 0x20000000 + realmem_bytes); + printf("Next block of memory goes from %x to %x\n", + phys_avail[2], phys_avail[3]); + physmem += btoc(phys_avail[3] - phys_avail[2]); + } else { + printf("realmem_bytes is %d\n", realmem_bytes); + } + realmem = physmem; + + printf("\nTotal DRAM Size 0x%X", (uint32_t) octeon_dram); + printf("\nBank 0 = 0x%8X -> 0x%8X", phys_avail[0], phys_avail[1]); + printf("\nBank 1 = 0x%8X -> 0x%8X\n", phys_avail[2], phys_avail[3]); + printf("\nphysmem: 0x%lx", physmem); + + Maxmem = physmem; + +} + void platform_start(__register_t a0, __register_t a1, __register_t a2 __unused, __register_t a3) { uint64_t platform_counter_freq; - int i, mem = 0; /* Initialize pcpu stuff */ mips_pcpu0_init(); + mips_timer_early_init(OCTEON_CLOCK_DEFAULT); + cninit(); + octeon_ciu_reset(); octeon_boot_params_init(a3); - /* XXX octeon boot decriptor has args in it... */ - octeon_ciu_reset(); - octeon_uart_write_string(0, "Platform Starting\n"); - bootverbose = 1; - if (mem > 0) - realmem = btoc(mem << 20); - else - realmem = btoc(32 << 20); - - for (i = 0; i < 10; i++) - phys_avail[i] = 0; - - /* phys_avail regions are in bytes */ - phys_avail[0] = MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); - phys_avail[1] = ctob(realmem); - - physmem = realmem; + cpuid_to_pcpu[0] = &pcpu0; - pmap_bootstrap(); - mips_proc0_init(); + /* + * For some reason on the cn38xx simulator ebase register is set to + * 0x80001000 at bootup time. Move it back to the default, but + * when we move to having support for multiple executives, we need + * to rethink this. + */ + mips_wr_ebase(0x80000000); + octeon_memory_init(); init_param1(); - /* TODO: parse argc,argv */ - platform_counter_freq = 330000000UL; /* XXX: from idt */ - mips_timer_init_params(platform_counter_freq, 1); - cninit(); init_param2(physmem); mips_cpu_init(); + pmap_bootstrap(); + mips_proc0_init(); mutex_init(); #ifdef DDB kdb_init(); #endif + platform_counter_freq = octeon_get_clock_rate(); + mips_timer_init_params(platform_counter_freq, 1); } +/* impSTART: This stuff should move back into the Cavium SDK */ /* **************************************************************************************** * @@ -788,7 +869,6 @@ uint8_t octeon_mac_addr[6] = { 0 }; int octeon_core_mask, octeon_mac_addr_count; int octeon_chip_rev_major = 0, octeon_chip_rev_minor = 0, octeon_chip_type = 0; -extern int32_t app_descriptor_addr; static octeon_boot_descriptor_t *app_desc_ptr; static cvmx_bootinfo_t *cvmx_desc_ptr; @@ -821,7 +901,6 @@ octeon_process_app_desc_ver_unknown(void octeon_dram = OCTEON_DRAM_DEFAULT; octeon_board_rev_major = octeon_board_rev_minor = octeon_board_type = 0; octeon_core_mask = 1; - octeon_cpu_clock = OCTEON_CLOCK_DEFAULT; octeon_chip_type = octeon_chip_rev_major = octeon_chip_rev_minor = 0; octeon_mac_addr[0] = 0x00; octeon_mac_addr[1] = 0x0f; octeon_mac_addr[2] = 0xb7; octeon_mac_addr[3] = 0x10; @@ -844,13 +923,10 @@ octeon_process_app_desc_ver_6(void) (cvmx_bootinfo_t *) ((intptr_t)cvmx_desc_ptr | MIPS_KSEG0_START); octeon_cvmx_bd_ver = (cvmx_desc_ptr->major_version * 100) + cvmx_desc_ptr->minor_version; - /* Too early for panic? */ if (cvmx_desc_ptr->major_version != 1) { - printf("Incompatible CVMX descriptor from bootloader: %d.%d %p\n", + panic("Incompatible CVMX descriptor from bootloader: %d.%d %p\n", (int) cvmx_desc_ptr->major_version, (int) cvmx_desc_ptr->minor_version, cvmx_desc_ptr); - while (1); /* Never return */ - return 1; /* Satisfy the compiler */ } octeon_core_mask = cvmx_desc_ptr->core_mask; @@ -876,53 +952,15 @@ octeon_process_app_desc_ver_6(void) return 0; } -static int -octeon_process_app_desc_ver_3_4_5(void) -{ - - octeon_cvmx_bd_ver = octeon_bd_ver; - octeon_core_mask = app_desc_ptr->core_mask; - - if (app_desc_ptr->desc_version > 3) - octeon_cpu_clock = app_desc_ptr->eclock_hz; - else - octeon_cpu_clock = OCTEON_CLOCK_DEFAULT; - if (app_desc_ptr->dram_size > 16*1024*1024) - octeon_dram = (uint64_t)app_desc_ptr->dram_size; - else - octeon_dram = (uint64_t)app_desc_ptr->dram_size << 20; - - if (app_desc_ptr->desc_version > 4) { - octeon_board_type = app_desc_ptr->board_type; - octeon_board_rev_major = app_desc_ptr->board_rev_major; - octeon_board_rev_minor = app_desc_ptr->board_rev_minor; - octeon_chip_type = app_desc_ptr->chip_type; - octeon_chip_rev_major = app_desc_ptr->chip_rev_major; - octeon_chip_rev_minor = app_desc_ptr->chip_rev_minor; - - octeon_mac_addr[0] = app_desc_ptr->mac_addr_base[0]; - octeon_mac_addr[1] = app_desc_ptr->mac_addr_base[1]; - octeon_mac_addr[2] = app_desc_ptr->mac_addr_base[2]; - octeon_mac_addr[3] = app_desc_ptr->mac_addr_base[3]; - octeon_mac_addr[4] = app_desc_ptr->mac_addr_base[4]; - octeon_mac_addr[5] = app_desc_ptr->mac_addr_base[5]; - octeon_mac_addr_count = app_desc_ptr->mac_addr_count; - } - return 0; -} - - static void octeon_boot_params_init(register_t ptr) { int bad_desc = 1; - + if (ptr != 0 && ptr < MAX_APP_DESC_ADDR) { app_desc_ptr = (octeon_boot_descriptor_t *)(intptr_t)ptr; octeon_bd_ver = app_desc_ptr->desc_version; - if ((octeon_bd_ver >= 3) && (octeon_bd_ver <= 5)) - bad_desc = octeon_process_app_desc_ver_3_4_5(); - else if (app_desc_ptr->desc_version == 6) + if (app_desc_ptr->desc_version == 6) bad_desc = octeon_process_app_desc_ver_6(); } if (bad_desc) @@ -937,7 +975,9 @@ octeon_boot_params_init(register_t ptr) printf(" Octeon Chip: %u Rev %u/%u", octeon_chip_type, octeon_chip_rev_major, octeon_chip_rev_minor); - printf(" Mac Address %02X.%02X.%02X.%02X.%02X.%02X\n", - octeon_mac_addr[0], octeon_mac_addr[1], octeon_mac_addr[2], - octeon_mac_addr[3], octeon_mac_addr[4], octeon_mac_addr[5]); + printf(" Mac Address %02X.%02X.%02X.%02X.%02X.%02X (%d)\n", + octeon_mac_addr[0], octeon_mac_addr[1], octeon_mac_addr[2], + octeon_mac_addr[3], octeon_mac_addr[4], octeon_mac_addr[5], + octeon_mac_addr_count); } +/* impEND: This stuff should move back into the Cavium SDK */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:41:43 2010 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 D0F33106566B; Fri, 22 Jan 2010 20:41: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 BEA218FC14; Fri, 22 Jan 2010 20:41:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKfheY079945; Fri, 22 Jan 2010 20:41:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKfhxV079943; Fri, 22 Jan 2010 20:41:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222041.o0MKfhxV079943@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:41: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: r202832 - head/sys/mips/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: Fri, 22 Jan 2010 20:41:43 -0000 Author: imp Date: Fri Jan 22 20:41:43 2010 New Revision: 202832 URL: http://svn.freebsd.org/changeset/base/202832 Log: make note of the nonsensical nature of the values in this hints file. Modified: head/sys/mips/conf/OCTEON1.hints Modified: head/sys/mips/conf/OCTEON1.hints ============================================================================== --- head/sys/mips/conf/OCTEON1.hints Fri Jan 22 20:40:07 2010 (r202831) +++ head/sys/mips/conf/OCTEON1.hints Fri Jan 22 20:41:43 2010 (r202832) @@ -1,13 +1,13 @@ -# /* -# * This product includes software developed by the University of - -# * California, Berkeley and its contributors." -# */ +# $FreeBSD$ # device.hints +# All these values are complete nonsense... hw.uart.console="io:0x1" hint.obio.0.at="nexus" hint.obio.0.maddr="0x1" +hint.obio.0.msize="0x1" hint.obio.0.flags="0x1" hint.uart.0.at="obio" hint.uart.0.maddr="0x1" hint.uart.0.flags="0x1" +hint.pcib.0.at="nexus" +hint.pci.0.at="pcib" From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:42:19 2010 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 35CE31065676; Fri, 22 Jan 2010 20:42:19 +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 24BB48FC18; Fri, 22 Jan 2010 20:42:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKgJtc080083; Fri, 22 Jan 2010 20:42:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKgJJs080081; Fri, 22 Jan 2010 20:42:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222042.o0MKgJJs080081@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202833 - head/sys/mips/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: Fri, 22 Jan 2010 20:42:19 -0000 Author: imp Date: Fri Jan 22 20:42:18 2010 New Revision: 202833 URL: http://svn.freebsd.org/changeset/base/202833 Log: Remove some irrelevant commented out make options. Modified: head/sys/mips/conf/OCTEON1-32 Modified: head/sys/mips/conf/OCTEON1-32 ============================================================================== --- head/sys/mips/conf/OCTEON1-32 Fri Jan 22 20:41:43 2010 (r202832) +++ head/sys/mips/conf/OCTEON1-32 Fri Jan 22 20:42:18 2010 (r202833) @@ -21,14 +21,10 @@ machine mips cpu CPU_MIPS4KC ident OCTEON1 -#makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" -#makeoptions LDSCRIPT_NAME= ldscript.mips.mips64 - # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" makeoptions TARGET_BIG_ENDIAN=defined makeoptions LDSCRIPT_NAME=ldscript.mips.octeon1.32 -#makeoptions TARGET_64BIT=defined options KERNVIRTADDR=0x80100000 makeoptions KERNLOADADDR=0x80100000 From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:44:34 2010 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 84B1E106568F; Fri, 22 Jan 2010 20:44:34 +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 739DC8FC1B; Fri, 22 Jan 2010 20:44:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKiYjq080639; Fri, 22 Jan 2010 20:44:34 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKiYd3080637; Fri, 22 Jan 2010 20:44:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222044.o0MKiYd3080637@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202834 - head/sys/mips/cavium 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: Fri, 22 Jan 2010 20:44:34 -0000 Author: imp Date: Fri Jan 22 20:44:34 2010 New Revision: 202834 URL: http://svn.freebsd.org/changeset/base/202834 Log: Declare octeon_get_clock_rate, now exported from octeon_machdep Modified: head/sys/mips/cavium/octeon_pcmap_regs.h Modified: head/sys/mips/cavium/octeon_pcmap_regs.h ============================================================================== --- head/sys/mips/cavium/octeon_pcmap_regs.h Fri Jan 22 20:42:18 2010 (r202833) +++ head/sys/mips/cavium/octeon_pcmap_regs.h Fri Jan 22 20:44:34 2010 (r202834) @@ -1,7 +1,9 @@ /* * This product includes software developed by the University of * California, Berkeley and its contributors." -*/ + */ + +/* $FreeBSD$ */ #ifndef __OCTEON_PCMAP_REGS_H__ #define __OCTEON_PCMAP_REGS_H__ @@ -904,8 +906,7 @@ extern uint64_t ciu_get_int_summary(int extern void octeon_ciu_start_gtimer(int timer, u_int one_shot, uint64_t time_cycles); extern void octeon_ciu_stop_gtimer(int timer); extern int octeon_board_real(void); - - +extern unsigned long octeon_get_clock_rate(void); typedef union { uint64_t word64; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:46:12 2010 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 ACBD11065670; Fri, 22 Jan 2010 20:46:11 +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 9AC318FC08; Fri, 22 Jan 2010 20:46:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKkBWd081040; Fri, 22 Jan 2010 20:46:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKkBnD081038; Fri, 22 Jan 2010 20:46:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001222046.o0MKkBnD081038@svn.freebsd.org> From: John Baldwin Date: Fri, 22 Jan 2010 20:46:11 +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: r202835 - stable/7/sys/amd64/amd64 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: Fri, 22 Jan 2010 20:46:12 -0000 Author: jhb Date: Fri Jan 22 20:46:11 2010 New Revision: 202835 URL: http://svn.freebsd.org/changeset/base/202835 Log: MFC 189551: Change pmap_enter_quick_locked() so that it uses the kernel's direct map instead of the pmap's recursive mapping to access the lowest level of the page table when it maps a user-space virtual address. Modified: stable/7/sys/amd64/amd64/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 20:44:34 2010 (r202834) +++ stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 20:46:11 2010 (r202835) @@ -3265,17 +3265,12 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ return (mpte); } } + pte = (pt_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(mpte)); + pte = &pte[pmap_pte_index(va)]; } else { mpte = NULL; + pte = vtopte(va); } - - /* - * This call to vtopte makes the assumption that we are - * entering the page into the current pmap. In order to support - * quick entry into any pmap, one would likely use pmap_pte. - * But that isn't as quick as vtopte. - */ - pte = vtopte(va); if (*pte) { if (mpte != NULL) { mpte->wire_count--; From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 20:52:32 2010 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 229951065672; Fri, 22 Jan 2010 20:52:32 +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 0FFE68FC08; Fri, 22 Jan 2010 20:52:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKqVGu082473; Fri, 22 Jan 2010 20:52:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKqVo9082471; Fri, 22 Jan 2010 20:52:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001222052.o0MKqVo9082471@svn.freebsd.org> From: John Baldwin Date: Fri, 22 Jan 2010 20:52:31 +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: r202836 - stable/7/sys/amd64/amd64 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: Fri, 22 Jan 2010 20:52:32 -0000 Author: jhb Date: Fri Jan 22 20:52:31 2010 New Revision: 202836 URL: http://svn.freebsd.org/changeset/base/202836 Log: MFC 189610: Eliminate the last use of the recursive mapping to access user-space page table pages. Now, all accesses to user-space page table pages are performed through the direct map. (The recursive mapping is only used to access kernel-space page table pages.) Eliminate the TLB invalidation on the recursive mapping when a user-space page table page is removed from the page table and when a user-space superpage is demoted. Modified: stable/7/sys/amd64/amd64/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 20:46:11 2010 (r202835) +++ stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 20:52:31 2010 (r202836) @@ -1278,7 +1278,6 @@ static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) { - vm_offset_t pteva; /* * unmap the page table page @@ -1287,19 +1286,16 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_of /* PDP page */ pml4_entry_t *pml4; pml4 = pmap_pml4e(pmap, va); - pteva = (vm_offset_t) PDPmap + amd64_ptob(m->pindex - (NUPDE + NUPDPE)); *pml4 = 0; } else if (m->pindex >= NUPDE) { /* PD page */ pdp_entry_t *pdp; pdp = pmap_pdpe(pmap, va); - pteva = (vm_offset_t) PDmap + amd64_ptob(m->pindex - NUPDE); *pdp = 0; } else { /* PTE page */ pd_entry_t *pd; pd = pmap_pde(pmap, va); - pteva = (vm_offset_t) PTmap + amd64_ptob(m->pindex); *pd = 0; } --pmap->pm_stats.resident_count; @@ -1325,12 +1321,6 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_of */ atomic_subtract_rel_int(&cnt.v_wire_count, 1); - /* - * Do an invltlb to make the invalidated mapping - * take effect immediately. - */ - pmap_invalidate_page(pmap, pteva); - /* * Put page on a list so that it is released after * *ALL* TLB shootdown is done @@ -2287,9 +2277,10 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t pde_store(pde, newpde); /* - * Invalidate a stale mapping of the page table page. + * Invalidate a stale recursive mapping of the page table page. */ - pmap_invalidate_page(pmap, (vm_offset_t)vtopte(va)); + if (va >= VM_MAXUSER_ADDRESS) + pmap_invalidate_page(pmap, (vm_offset_t)vtopte(va)); /* * Demote the pv entry. This depends on the earlier demotion @@ -3737,7 +3728,7 @@ pmap_page_is_mapped(vm_page_t m) void pmap_remove_pages(pmap_t pmap) { - pd_entry_t *pde; + pd_entry_t ptepde; pt_entry_t *pte, tpte; vm_page_t free = NULL; vm_page_t m, mpte, mt; @@ -3766,23 +3757,19 @@ pmap_remove_pages(pmap_t pmap) pv = &pc->pc_pventry[idx]; inuse &= ~bitmask; - pde = vtopde(pv->pv_va); - tpte = *pde; - if ((tpte & PG_PS) != 0) - pte = pde; - else { + pte = pmap_pdpe(pmap, pv->pv_va); + ptepde = *pte; + pte = pmap_pdpe_to_pde(pte, pv->pv_va); + tpte = *pte; + if ((tpte & (PG_PS | PG_V)) == PG_V) { + ptepde = tpte; pte = (pt_entry_t *)PHYS_TO_DMAP(tpte & PG_FRAME); pte = &pte[pmap_pte_index(pv->pv_va)]; tpte = *pte & ~PG_PTE_PAT; } - - if (tpte == 0) { - printf( - "TPTE at %p IS ZERO @ VA %08lx\n", - pte, pv->pv_va); + if ((tpte & PG_V) == 0) panic("bad pte"); - } /* * We cannot remove wired pages from a process' mapping at this time @@ -3839,8 +3826,6 @@ pmap_remove_pages(pmap_t pmap) pmap_add_delayed_free_list(mpte, &free, FALSE); atomic_subtract_int(&cnt.v_wire_count, 1); } - pmap_unuse_pt(pmap, pv->pv_va, - *pmap_pdpe(pmap, pv->pv_va), &free); } else { pmap->pm_stats.resident_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); @@ -3849,8 +3834,8 @@ pmap_remove_pages(pmap_t pmap) if (TAILQ_EMPTY(&pvh->pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); } - pmap_unuse_pt(pmap, pv->pv_va, *pde, &free); } + pmap_unuse_pt(pmap, pv->pv_va, ptepde, &free); } } if (allfree) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 21:23:09 2010 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 7DFE11065693; Fri, 22 Jan 2010 21:23:09 +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 6BF4E8FC22; Fri, 22 Jan 2010 21:23:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MLN9u0089386; Fri, 22 Jan 2010 21:23:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MLN9VW089383; Fri, 22 Jan 2010 21:23:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001222123.o0MLN9VW089383@svn.freebsd.org> From: John Baldwin Date: Fri, 22 Jan 2010 21:23:09 +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: r202837 - in stable/7/sys: amd64/amd64 i386/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: Fri, 22 Jan 2010 21:23:09 -0000 Author: jhb Date: Fri Jan 22 21:23:09 2010 New Revision: 202837 URL: http://svn.freebsd.org/changeset/base/202837 Log: MFC 189698,192035: Optimize the inner loop of pmap_copy(). Correct a rare use-after-free error in pmap_copy(). This error was introduced in amd64 revision 1.540 and i386 revision 1.547. However, it had no harmful effects until after a recent change, r189698, on amd64. (In other words, the error is harmless in RELENG_7.) The error is triggered by the failure to allocate a pv entry for the one and only mapping in a page table page. I am addressing the error by changing pmap_copy() to abort if either pv entry allocation or page table page allocation fails. This is appropriate because the creation of mappings by pmap_copy() is optional. They are a (possible) optimization, and not a requirement. Correct a nearby whitespace error in the i386 pmap_copy(). Modified: stable/7/sys/amd64/amd64/pmap.c stable/7/sys/i386/i386/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 20:52:31 2010 (r202836) +++ stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 21:23:09 2010 (r202837) @@ -3555,6 +3555,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm src_pte = (pt_entry_t *)PHYS_TO_DMAP(srcptepaddr); src_pte = &src_pte[pmap_pte_index(addr)]; + dstmpte = NULL; while (addr < va_next) { pt_entry_t ptetemp; ptetemp = *src_pte; @@ -3562,10 +3563,12 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm * we only virtual copy managed pages */ if ((ptetemp & PG_MANAGED) != 0) { - dstmpte = pmap_allocpte(dst_pmap, addr, - M_NOWAIT); - if (dstmpte == NULL) - break; + if (dstmpte != NULL && + dstmpte->pindex == pmap_pde_pindex(addr)) + dstmpte->wire_count++; + else if ((dstmpte = pmap_allocpte(dst_pmap, + addr, M_NOWAIT)) == NULL) + goto out; dst_pte = (pt_entry_t *) PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dstmpte)); dst_pte = &dst_pte[pmap_pte_index(addr)]; @@ -3588,6 +3591,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm addr); pmap_free_zero_pages(free); } + goto out; } if (dstmpte->wire_count >= srcmpte->wire_count) break; @@ -3596,6 +3600,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm src_pte++; } } +out: vm_page_unlock_queues(); PMAP_UNLOCK(src_pmap); PMAP_UNLOCK(dst_pmap); Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Fri Jan 22 20:52:31 2010 (r202836) +++ stable/7/sys/i386/i386/pmap.c Fri Jan 22 21:23:09 2010 (r202837) @@ -3673,7 +3673,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm dstmpte = pmap_allocpte(dst_pmap, addr, M_NOWAIT); if (dstmpte == NULL) - break; + goto out; dst_pte = pmap_pte_quick(dst_pmap, addr); if (*dst_pte == 0 && pmap_try_insert_pv_entry(dst_pmap, addr, @@ -3688,12 +3688,13 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm dst_pmap->pm_stats.resident_count++; } else { free = NULL; - if (pmap_unwire_pte_hold( dst_pmap, + if (pmap_unwire_pte_hold(dst_pmap, dstmpte, &free)) { pmap_invalidate_page(dst_pmap, addr); pmap_free_zero_pages(free); } + goto out; } if (dstmpte->wire_count >= srcmpte->wire_count) break; @@ -3702,6 +3703,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm src_pte++; } } +out: sched_unpin(); vm_page_unlock_queues(); PMAP_UNLOCK(src_pmap); From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 21:36:34 2010 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 764BA1065670; Fri, 22 Jan 2010 21:36: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 4B0918FC22; Fri, 22 Jan 2010 21:36:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MLaYq4092820; Fri, 22 Jan 2010 21:36:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MLaYQL092818; Fri, 22 Jan 2010 21:36:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001222136.o0MLaYQL092818@svn.freebsd.org> From: John Baldwin Date: Fri, 22 Jan 2010 21:36:34 +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: r202838 - stable/7/sys/amd64/amd64 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: Fri, 22 Jan 2010 21:36:34 -0000 Author: jhb Date: Fri Jan 22 21:36:34 2010 New Revision: 202838 URL: http://svn.freebsd.org/changeset/base/202838 Log: MFC 189783: Correct accounting errors in _pmap_allocpte(). Specifically, the pmap's resident page count and the global wired page count were not correctly maintained when page table page allocation failed. Modified: stable/7/sys/amd64/amd64/pmap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 21:23:09 2010 (r202837) +++ stable/7/sys/amd64/amd64/pmap.c Fri Jan 22 21:36:34 2010 (r202838) @@ -1442,8 +1442,6 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t * it isn't already there. */ - pmap->pm_stats.resident_count++; - if (ptepindex >= (NUPDE + NUPDPE)) { pml4_entry_t *pml4; vm_pindex_t pml4index; @@ -1469,7 +1467,8 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if (_pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index, flags) == NULL) { --m->wire_count; - vm_page_free(m); + atomic_subtract_int(&cnt.v_wire_count, 1); + vm_page_free_zero(m); return (NULL); } } else { @@ -1501,7 +1500,8 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if (_pmap_allocpte(pmap, NUPDE + pdpindex, flags) == NULL) { --m->wire_count; - vm_page_free(m); + atomic_subtract_int(&cnt.v_wire_count, 1); + vm_page_free_zero(m); return (NULL); } pdp = (pdp_entry_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME); @@ -1514,7 +1514,9 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if (_pmap_allocpte(pmap, NUPDE + pdpindex, flags) == NULL) { --m->wire_count; - vm_page_free(m); + atomic_subtract_int(&cnt.v_wire_count, + 1); + vm_page_free_zero(m); return (NULL); } } else { @@ -1530,6 +1532,8 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t *pd = VM_PAGE_TO_PHYS(m) | PG_U | PG_RW | PG_V | PG_A | PG_M; } + pmap->pm_stats.resident_count++; + return m; } From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 22:14:13 2010 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 40E3A106566B; Fri, 22 Jan 2010 22:14:13 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E37A8FC12; Fri, 22 Jan 2010 22:14:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MMED7D002284; Fri, 22 Jan 2010 22:14:13 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MMED3V002279; Fri, 22 Jan 2010 22:14:13 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201001222214.o0MMED3V002279@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Fri, 22 Jan 2010 22:14: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: r202839 - in head/sys/mips: atheros 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: Fri, 22 Jan 2010 22:14:13 -0000 Author: gonzo Date: Fri Jan 22 22:14:12 2010 New Revision: 202839 URL: http://svn.freebsd.org/changeset/base/202839 Log: - Add driver for PCF2123, SPI real time clock/calendar Added: head/sys/mips/atheros/pcf2123_rtc.c (contents, props changed) head/sys/mips/atheros/pcf2123reg.h (contents, props changed) Modified: head/sys/mips/atheros/files.ar71xx head/sys/mips/conf/AR71XX.hints Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Fri Jan 22 21:36:34 2010 (r202838) +++ head/sys/mips/atheros/files.ar71xx Fri Jan 22 22:14:12 2010 (r202839) @@ -7,6 +7,7 @@ mips/atheros/ar71xx_ohci.c optional ohci mips/atheros/ar71xx_pci.c optional pci mips/atheros/ar71xx_pci_bus_space.c optional pci mips/atheros/ar71xx_spi.c optional ar71xx_spi +mips/atheros/pcf2123_rtc.c optional pcf2123_rtc ar71xx_spi mips/atheros/ar71xx_wdog.c optional ar71xx_wdog mips/atheros/if_arge.c optional arge mips/atheros/uart_bus_ar71xx.c optional uart Added: head/sys/mips/atheros/pcf2123_rtc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/pcf2123_rtc.c Fri Jan 22 22:14:12 2010 (r202839) @@ -0,0 +1,204 @@ +/*- + * Copyright (c) 2010, Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "spibus_if.h" + +#include "clock_if.h" + +#define YEAR_BASE 1970 +#define PCF2123_DELAY 50 + +struct pcf2123_rtc_softc { + device_t dev; +}; + +static int pcf2123_rtc_probe(device_t dev); +static int pcf2123_rtc_attach(device_t dev); + +static int pcf2123_rtc_gettime(device_t dev, struct timespec *ts); +static int pcf2123_rtc_settime(device_t dev, struct timespec *ts); + +static int +pcf2123_rtc_probe(device_t dev) +{ + + device_set_desc(dev, "PCF2123 SPI RTC"); + return (0); +} + +static int +pcf2123_rtc_attach(device_t dev) +{ + struct pcf2123_rtc_softc *sc; + struct spi_command cmd; + unsigned char rxBuf[3]; + unsigned char txBuf[3]; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + + clock_register(dev, 1000000); + + memset(&cmd, 0, sizeof(cmd)); + memset(rxBuf, 0, sizeof(rxBuf)); + memset(txBuf, 0, sizeof(txBuf)); + + /* Make sure Ctrl1 and Ctrl2 are zeroes */ + txBuf[0] = PCF2123_WRITE(PCF2123_REG_CTRL1); + cmd.rx_cmd = rxBuf; + cmd.tx_cmd = txBuf; + cmd.rx_cmd_sz = sizeof(rxBuf); + cmd.tx_cmd_sz = sizeof(txBuf); + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + DELAY(PCF2123_DELAY); + + return (0); +} + +static int +pcf2123_rtc_gettime(device_t dev, struct timespec *ts) +{ + struct clocktime ct; + struct spi_command cmd; + unsigned char rxTimedate[8]; + unsigned char txTimedate[8]; + int err; + + memset(&cmd, 0, sizeof(cmd)); + memset(rxTimedate, 0, sizeof(rxTimedate)); + memset(txTimedate, 0, sizeof(txTimedate)); + + /* + * Counter is stopped when access to time registers is in progress + * So there is no need to stop/start counter + */ + /* Start reading from seconds */ + txTimedate[0] = PCF2123_READ(PCF2123_REG_SECONDS); + cmd.rx_cmd = rxTimedate; + cmd.tx_cmd = txTimedate; + cmd.rx_cmd_sz = sizeof(rxTimedate); + cmd.tx_cmd_sz = sizeof(txTimedate); + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + DELAY(PCF2123_DELAY); + + ct.nsec = 0; + ct.sec = FROMBCD(rxTimedate[1] & 0x7f); + ct.min = FROMBCD(rxTimedate[2] & 0x7f); + ct.hour = FROMBCD(rxTimedate[3] & 0x3f); + + ct.dow = FROMBCD(rxTimedate[5] & 0x3f); + + ct.day = FROMBCD(rxTimedate[4] & 0x3f); + ct.mon = FROMBCD(rxTimedate[6] & 0x1f); + ct.year = YEAR_BASE + FROMBCD(rxTimedate[7]); + + return (clock_ct_to_ts(&ct, ts)); +} + +static int +pcf2123_rtc_settime(device_t dev, struct timespec *ts) +{ + struct clocktime ct; + struct pcf2123_rtc_softc *sc; + struct spi_command cmd; + unsigned char rxTimedate[8]; + unsigned char txTimedate[8]; + int err; + + sc = device_get_softc(dev); + + /* Resolution: 1 sec */ + if (ts->tv_nsec >= 500000000) + ts->tv_sec++; + ts->tv_nsec = 0; + clock_ts_to_ct(ts, &ct); + + memset(&cmd, 0, sizeof(cmd)); + memset(rxTimedate, 0, sizeof(rxTimedate)); + memset(txTimedate, 0, sizeof(txTimedate)); + + /* Start reading from seconds */ + cmd.rx_cmd = rxTimedate; + cmd.tx_cmd = txTimedate; + cmd.rx_cmd_sz = sizeof(rxTimedate); + cmd.tx_cmd_sz = sizeof(txTimedate); + + /* + * Counter is stopped when access to time registers is in progress + * So there is no need to stop/start counter + */ + txTimedate[0] = PCF2123_WRITE(PCF2123_REG_SECONDS); + txTimedate[1] = TOBCD(ct.sec); + txTimedate[2] = TOBCD(ct.min); + txTimedate[3] = TOBCD(ct.hour); + txTimedate[4] = TOBCD(ct.day); + txTimedate[5] = TOBCD(ct.dow); + txTimedate[6] = TOBCD(ct.mon); + txTimedate[7] = TOBCD(ct.year - YEAR_BASE); + + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + DELAY(PCF2123_DELAY); + + return (err); +} + +static device_method_t pcf2123_rtc_methods[] = { + DEVMETHOD(device_probe, pcf2123_rtc_probe), + DEVMETHOD(device_attach, pcf2123_rtc_attach), + + DEVMETHOD(clock_gettime, pcf2123_rtc_gettime), + DEVMETHOD(clock_settime, pcf2123_rtc_settime), + + { 0, 0 }, +}; + +static driver_t pcf2123_rtc_driver = { + "rtc", + pcf2123_rtc_methods, + sizeof(struct pcf2123_rtc_softc), +}; +static devclass_t pcf2123_rtc_devclass; + +DRIVER_MODULE(pcf2123_rtc, spibus, pcf2123_rtc_driver, pcf2123_rtc_devclass, 0, 0); Added: head/sys/mips/atheros/pcf2123reg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/pcf2123reg.h Fri Jan 22 22:14:12 2010 (r202839) @@ -0,0 +1,67 @@ +/*- + * Copyright (c) 2009, Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* $FreeBSD$ */ + +#ifndef __PCF2123REG_H__ +#define __PCF2123REG_H__ + +/* Control and status */ +#define PCF2123_REG_CTRL1 0x0 +#define PCF2123_REG_CTRL2 0x1 + +/* Time and date */ +#define PCF2123_REG_SECONDS 0x2 +#define PCF2123_REG_MINUTES 0x3 +#define PCF2123_REG_HOURS 0x4 +#define PCF2123_REG_DAYS 0x5 +#define PCF2123_REG_WEEKDAYS 0x6 +#define PCF2123_REG_MONTHS 0x7 +#define PCF2123_REG_YEARS 0x8 + +/* Alarm registers */ +#define PCF2123_REG_MINUTE_ALARM 0x9 +#define PCF2123_REG_HOUR_ALARM 0xA +#define PCF2123_REG_DAY_ALARM 0xB +#define PCF2123_REG_WEEKDAY_ALARM 0xC + +/* Offset */ +#define PCF2123_REG_OFFSET 0xD + +/* Timer */ +#define PCF2123_REG_TIMER_CLKOUT 0xE +#define PCF2123_REG_COUNTDOWN_TIMER 0xF + +/* Commands */ +#define PCF2123_CMD_READ (1 << 7) +#define PCF2123_CMD_WRITE (0 << 7) + +#define PCF2123_READ(reg) (PCF2123_CMD_READ | (1 << 4) | (reg)) +#define PCF2123_WRITE(reg) (PCF2123_CMD_WRITE | (1 << 4) | (reg)) + +#endif /* __PCF2123REG_H__ */ + Modified: head/sys/mips/conf/AR71XX.hints ============================================================================== --- head/sys/mips/conf/AR71XX.hints Fri Jan 22 21:36:34 2010 (r202838) +++ head/sys/mips/conf/AR71XX.hints Fri Jan 22 22:14:12 2010 (r202839) @@ -55,5 +55,11 @@ hint.spi.0.msize=0x10 hint.mx25l.0.at="spibus0" hint.mx25l.0.cs=0 +# shares the same bus with mx25l. +# CE low for flash, CE high for RTC +# at the moment it's just stub until SPI bus is ready for such hacks +# hint.rtc.0.at="spibus0" +# hint.rtc.0.cs=0 + # Watchdog hint.ar71xx_wdog.0.at="nexus0" From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 23:13:47 2010 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 5E9D3106568D; Fri, 22 Jan 2010 23:13:47 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BD4B8FC13; Fri, 22 Jan 2010 23:13:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNDlHU017656; Fri, 22 Jan 2010 23:13:47 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNDlGi017645; Fri, 22 Jan 2010 23:13:47 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201001222313.o0MNDlGi017645@svn.freebsd.org> From: Florent Thoumie Date: Fri, 22 Jan 2010 23:13:47 +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: r202840 - in stable/8/usr.sbin/pkg_install: add create delete info lib updating version 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: Fri, 22 Jan 2010 23:13:47 -0000 Author: flz Date: Fri Jan 22 23:13:46 2010 New Revision: 202840 URL: http://svn.freebsd.org/changeset/base/202840 Log: Synchronize pkg_install with HEAD. Modified: stable/8/usr.sbin/pkg_install/add/main.c stable/8/usr.sbin/pkg_install/create/main.c stable/8/usr.sbin/pkg_install/delete/Makefile stable/8/usr.sbin/pkg_install/delete/main.c stable/8/usr.sbin/pkg_install/info/Makefile stable/8/usr.sbin/pkg_install/info/main.c stable/8/usr.sbin/pkg_install/lib/lib.h stable/8/usr.sbin/pkg_install/updating/Makefile stable/8/usr.sbin/pkg_install/version/Makefile stable/8/usr.sbin/pkg_install/version/main.c Modified: stable/8/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/add/main.c Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/add/main.c Fri Jan 22 23:13:46 2010 (r202840) @@ -344,7 +344,7 @@ getpackagesite(void) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: pkg_add [-viInfFrRMSK] [-t template] [-p prefix] [-P prefix] [-C chrootdir]", Modified: stable/8/usr.sbin/pkg_install/create/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/create/main.c Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/create/main.c Fri Jan 22 23:13:46 2010 (r202840) @@ -249,7 +249,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: pkg_create [-YNOhjnvyz] [-C conflicts] [-P pkgs] [-p prefix]", Modified: stable/8/usr.sbin/pkg_install/delete/Makefile ============================================================================== --- stable/8/usr.sbin/pkg_install/delete/Makefile Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/delete/Makefile Fri Jan 22 23:13:46 2010 (r202840) @@ -5,7 +5,6 @@ SRCS= main.c perform.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBMD} Modified: stable/8/usr.sbin/pkg_install/delete/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/delete/main.c Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/delete/main.c Fri Jan 22 23:13:46 2010 (r202840) @@ -170,7 +170,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: pkg_delete [-dDfGinrvxX] [-p prefix] pkg-name ...", Modified: stable/8/usr.sbin/pkg_install/info/Makefile ============================================================================== --- stable/8/usr.sbin/pkg_install/info/Makefile Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/info/Makefile Fri Jan 22 23:13:46 2010 (r202840) @@ -5,7 +5,6 @@ SRCS= main.c perform.c show.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/8/usr.sbin/pkg_install/info/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/info/main.c Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/info/main.c Fri Jan 22 23:13:46 2010 (r202840) @@ -282,7 +282,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]", Modified: stable/8/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- stable/8/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:13:46 2010 (r202840) @@ -84,14 +84,14 @@ #define DISPLAY_FNAME "+DISPLAY" #define MTREE_FNAME "+MTREE_DIRS" -#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 +#if defined(__FreeBSD_version) && __FreeBSD_version >= 900000 +#define INDEX_FNAME "INDEX-9" +#elif defined(__FreeBSD_version) && __FreeBSD_version >= 800000 #define INDEX_FNAME "INDEX-8" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 700000 #define INDEX_FNAME "INDEX-7" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 600000 #define INDEX_FNAME "INDEX-6" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 500036 -#define INDEX_FNAME "INDEX-5" #else #define INDEX_FNAME "INDEX" #endif @@ -102,10 +102,10 @@ #define PKG_PREFIX_VNAME "PKG_PREFIX" /* - * Version of the package tools - increase only when some - * functionality used by bsd.port.mk is changed, added or removed + * Version of the package tools - increase whenever you make a change + * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20090519 +#define PKG_INSTALL_VERSION 20090902 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: stable/8/usr.sbin/pkg_install/updating/Makefile ============================================================================== --- stable/8/usr.sbin/pkg_install/updating/Makefile Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/updating/Makefile Fri Jan 22 23:13:46 2010 (r202840) @@ -5,7 +5,6 @@ SRCS= main.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/8/usr.sbin/pkg_install/version/Makefile ============================================================================== --- stable/8/usr.sbin/pkg_install/version/Makefile Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/version/Makefile Fri Jan 22 23:13:46 2010 (r202840) @@ -5,7 +5,6 @@ SRCS= main.c perform.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/8/usr.sbin/pkg_install/version/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/version/main.c Fri Jan 22 22:14:12 2010 (r202839) +++ stable/8/usr.sbin/pkg_install/version/main.c Fri Jan 22 23:13:46 2010 (r202840) @@ -127,7 +127,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n", "usage: pkg_version [-hIoqv] [-l limchar] [-L limchar] [[-X] -s string] [-O origin] [index]", From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 23:17:07 2010 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 A5E98106568B; Fri, 22 Jan 2010 23:17:07 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 925138FC08; Fri, 22 Jan 2010 23:17:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNH73P018745; Fri, 22 Jan 2010 23:17:07 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNH7dd018727; Fri, 22 Jan 2010 23:17:07 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201001222317.o0MNH7dd018727@svn.freebsd.org> From: Florent Thoumie Date: Fri, 22 Jan 2010 23:17:07 +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: r202841 - in stable/7/usr.sbin/pkg_install: add create delete info lib updating version 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: Fri, 22 Jan 2010 23:17:07 -0000 Author: flz Date: Fri Jan 22 23:17:07 2010 New Revision: 202841 URL: http://svn.freebsd.org/changeset/base/202841 Log: Synchronize pkg_install with HEAD. Modified: stable/7/usr.sbin/pkg_install/add/main.c stable/7/usr.sbin/pkg_install/add/perform.c stable/7/usr.sbin/pkg_install/create/main.c stable/7/usr.sbin/pkg_install/create/perform.c stable/7/usr.sbin/pkg_install/delete/Makefile stable/7/usr.sbin/pkg_install/delete/main.c stable/7/usr.sbin/pkg_install/info/Makefile stable/7/usr.sbin/pkg_install/info/main.c stable/7/usr.sbin/pkg_install/info/perform.c stable/7/usr.sbin/pkg_install/lib/lib.h stable/7/usr.sbin/pkg_install/lib/pen.c stable/7/usr.sbin/pkg_install/lib/plist.c stable/7/usr.sbin/pkg_install/lib/url.c stable/7/usr.sbin/pkg_install/updating/Makefile stable/7/usr.sbin/pkg_install/version/Makefile stable/7/usr.sbin/pkg_install/version/main.c Modified: stable/7/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/7/usr.sbin/pkg_install/add/main.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/add/main.c Fri Jan 22 23:17:07 2010 (r202841) @@ -82,13 +82,15 @@ struct { { 700000, 700099, "/packages-7.0-release" }, { 701000, 701099, "/packages-7.1-release" }, { 702000, 702099, "/packages-7.2-release" }, + { 800000, 800499, "/packages-8.0-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, { 503100, 599000, "/packages-5-stable" }, { 600100, 699000, "/packages-6-stable" }, { 700100, 799000, "/packages-7-stable" }, - { 800000, 899000, "/packages-8-current" }, + { 800500, 899000, "/packages-8-stable" }, + { 900000, 999000, "/packages-9-current" }, { 0, 9999999, "/packages-current" }, { 0, 0, NULL } }; @@ -342,7 +344,7 @@ getpackagesite(void) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: pkg_add [-viInfFrRMSK] [-t template] [-p prefix] [-P prefix] [-C chrootdir]", Modified: stable/7/usr.sbin/pkg_install/add/perform.c ============================================================================== --- stable/7/usr.sbin/pkg_install/add/perform.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/add/perform.c Fri Jan 22 23:17:07 2010 (r202841) @@ -52,9 +52,6 @@ pkg_perform(char **pkgs) return err_cnt; } -static Package Plist; -static char *Home; - /* * This is seriously ugly code following. Written very fast! * [And subsequently made even worse.. Sigh! This code was just born @@ -63,10 +60,12 @@ static char *Home; static int pkg_do(char *pkg) { + Package Plist; char pkg_fullname[FILENAME_MAX]; char playpen[FILENAME_MAX]; char extract_contents[FILENAME_MAX]; - char *where_to, *extract; + char *extract; + const char *where_to; FILE *cfile; int code; PackingList p; @@ -87,6 +86,8 @@ pkg_do(char *pkg) strcpy(playpen, FirstPen); inPlace = 0; + memset(&Plist, '\0', sizeof(Plist)); + /* Are we coming in for a second pass, everything already extracted? */ if (!pkg) { fgets(playpen, FILENAME_MAX, stdin); @@ -102,11 +103,10 @@ pkg_do(char *pkg) else { /* Is it an ftp://foo.bar.baz/file.t[bg]z specification? */ if (isURL(pkg)) { - if (!(Home = fileGetURL(NULL, pkg, KeepPackage))) { + if (!(where_to = fileGetURL(NULL, pkg, KeepPackage))) { warnx("unable to fetch '%s' by URL", pkg); return 1; } - where_to = Home; strcpy(pkg_fullname, pkg); cfile = fopen(CONTENTS_FNAME, "r"); if (!cfile) { @@ -135,13 +135,11 @@ pkg_do(char *pkg) extract = NULL; sb.st_size = 100000; /* Make up a plausible average size */ } - Home = make_playpen(playpen, sb.st_size * 4); - if (!Home) + if (!(where_to = make_playpen(playpen, sb.st_size * 4))) errx(1, "unable to make playpen for %lld bytes", (long long)sb.st_size * 4); - where_to = Home; /* Since we can call ourselves recursively, keep notes on where we came from */ if (!getenv("_TOP")) - setenv("_TOP", Home, 1); + setenv("_TOP", where_to, 1); if (unpack(pkg_fullname, extract)) { warnx( "unable to extract table of contents file from '%s' - not a package?", @@ -280,6 +278,44 @@ pkg_do(char *pkg) warnx("-f specified; proceeding anyway"); } +#if ENSURE_THAT_ALL_REQUIREMENTS_ARE_MET + /* + * Before attempting to do the slave mode bit, ensure that we've + * downloaded & processed everything we need. + * It's possible that we haven't already installed all of our + * dependencies if the dependency list was misgenerated due to + * other dynamic dependencies or if a dependency was added to a + * package without all REQUIRED_BY packages being regenerated. + */ + for (p = pkg ? Plist.head : NULL; p; p = p->next) { + const char *ext; + char *deporigin; + + if (p->type != PLIST_PKGDEP) + continue; + deporigin = (p->next->type == PLIST_DEPORIGIN) ? p->next->name : NULL; + + if (isinstalledpkg(p->name) <= 0 && + !(deporigin != NULL && matchbyorigin(deporigin, NULL) != NULL)) { + char subpkg[FILENAME_MAX], *sep; + + strlcpy(subpkg, pkg, sizeof subpkg); + if ((sep = strrchr(subpkg, '/')) != NULL) { + *sep = '\0'; + if ((sep = strrchr(subpkg, '/')) != NULL) { + *sep = '\0'; + strlcat(subpkg, "/All/", sizeof subpkg); + strlcat(subpkg, p->name, sizeof subpkg); + if ((ext = strrchr(pkg, '.')) == NULL) + ext = ".tbz"; + strlcat(subpkg, ext, sizeof subpkg); + pkg_do(subpkg); + } + } + } + } +#endif + /* Now check the packing list for dependencies */ for (p = Plist.head; p ; p = p->next) { char *deporigin; @@ -295,7 +331,8 @@ pkg_do(char *pkg) } if (isinstalledpkg(p->name) <= 0 && !(deporigin != NULL && matchbyorigin(deporigin, NULL) != NULL)) { - char path[FILENAME_MAX], *cp = NULL; + char path[FILENAME_MAX]; + const char *cp = NULL; if (!Fake) { char prefixArg[2 + MAXPATHLEN]; /* "-P" + Prefix */ @@ -333,7 +370,7 @@ pkg_do(char *pkg) } else if ((cp = fileGetURL(pkg, p->name, KeepPackage)) != NULL) { if (Verbose) - printf("Finished loading %s over FTP.\n", p->name); + printf("Finished loading %s via a URL\n", p->name); if (!fexists("+CONTENTS")) { warnx("autoloaded package %s has no +CONTENTS file?", p->name); @@ -645,7 +682,8 @@ cleanup(int sig) printf("Signal %d received, cleaning up..\n", sig); if (!Fake && zapLogDir && LogDir[0]) vsystem("%s -rf %s", REMOVE_CMD, LogDir); - leave_playpen(); + while (leave_playpen()) + ; } if (sig) exit(1); Modified: stable/7/usr.sbin/pkg_install/create/main.c ============================================================================== --- stable/7/usr.sbin/pkg_install/create/main.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/create/main.c Fri Jan 22 23:17:07 2010 (r202841) @@ -249,7 +249,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: pkg_create [-YNOhjnvyz] [-C conflicts] [-P pkgs] [-p prefix]", Modified: stable/7/usr.sbin/pkg_install/create/perform.c ============================================================================== --- stable/7/usr.sbin/pkg_install/create/perform.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/create/perform.c Fri Jan 22 23:17:07 2010 (r202841) @@ -39,11 +39,10 @@ static void make_dist(const char *, cons static int create_from_installed_recursive(const char *, const char *); static int create_from_installed(const char *, const char *, const char *); -static char *home; - int pkg_perform(char **pkgs) { + static const char *home; char *pkg = *pkgs; /* Only one arg to create */ char *cp; FILE *pkg_in, *fp; Modified: stable/7/usr.sbin/pkg_install/delete/Makefile ============================================================================== --- stable/7/usr.sbin/pkg_install/delete/Makefile Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/delete/Makefile Fri Jan 22 23:17:07 2010 (r202841) @@ -5,7 +5,6 @@ SRCS= main.c perform.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBMD} Modified: stable/7/usr.sbin/pkg_install/delete/main.c ============================================================================== --- stable/7/usr.sbin/pkg_install/delete/main.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/delete/main.c Fri Jan 22 23:17:07 2010 (r202841) @@ -170,7 +170,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: pkg_delete [-dDfGinrvxX] [-p prefix] pkg-name ...", Modified: stable/7/usr.sbin/pkg_install/info/Makefile ============================================================================== --- stable/7/usr.sbin/pkg_install/info/Makefile Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/info/Makefile Fri Jan 22 23:17:07 2010 (r202841) @@ -5,7 +5,6 @@ SRCS= main.c perform.c show.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/7/usr.sbin/pkg_install/info/main.c ============================================================================== --- stable/7/usr.sbin/pkg_install/info/main.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/info/main.c Fri Jan 22 23:17:07 2010 (r202841) @@ -282,7 +282,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]", Modified: stable/7/usr.sbin/pkg_install/info/perform.c ============================================================================== --- stable/7/usr.sbin/pkg_install/info/perform.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/info/perform.c Fri Jan 22 23:17:07 2010 (r202841) @@ -85,8 +85,6 @@ pkg_perform(char **pkgs) return err_cnt; } -static char *Home; - static int pkg_do(char *pkg) { @@ -96,7 +94,7 @@ pkg_do(char *pkg) Package plist; FILE *fp; struct stat sb; - char *cp = NULL; + const char *cp = NULL; int code = 0; if (isURL(pkg)) { @@ -138,7 +136,7 @@ pkg_do(char *pkg) code = 1; goto bail; } - Home = make_playpen(PlayPen, sb.st_size / 2); + make_playpen(PlayPen, sb.st_size / 2); if (unpack(fname, "'+*'")) { warnx("error during unpacking, no info for '%s' available", pkg); code = 1; Modified: stable/7/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- stable/7/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:17:07 2010 (r202841) @@ -84,14 +84,14 @@ #define DISPLAY_FNAME "+DISPLAY" #define MTREE_FNAME "+MTREE_DIRS" -#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 +#if defined(__FreeBSD_version) && __FreeBSD_version >= 900000 +#define INDEX_FNAME "INDEX-9" +#elif defined(__FreeBSD_version) && __FreeBSD_version >= 800000 #define INDEX_FNAME "INDEX-8" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 700000 #define INDEX_FNAME "INDEX-7" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 600000 #define INDEX_FNAME "INDEX-6" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 500036 -#define INDEX_FNAME "INDEX-5" #else #define INDEX_FNAME "INDEX" #endif @@ -102,10 +102,10 @@ #define PKG_PREFIX_VNAME "PKG_PREFIX" /* - * Version of the package tools - increase only when some - * functionality used by bsd.port.mk is changed, added or removed + * Version of the package tools - increase whenever you make a change + * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20080708 +#define PKG_INSTALL_VERSION 20090902 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) @@ -159,9 +159,9 @@ STAILQ_HEAD(reqr_by_head, reqr_by_entry) int vsystem(const char *, ...); char *vpipe(const char *, ...); void cleanup(int); -char *make_playpen(char *, off_t); +const char *make_playpen(char *, off_t); char *where_playpen(void); -void leave_playpen(void); +int leave_playpen(void); off_t min_free(const char *); /* String */ @@ -183,7 +183,7 @@ Boolean isfile(const char *); Boolean isempty(const char *); Boolean issymlink(const char *); Boolean isURL(const char *); -char *fileGetURL(const char *, const char *, int); +const char *fileGetURL(const char *, const char *, int); char *fileFindByPath(const char *, const char *); char *fileGetContents(const char *); void write_file(const char *, const char *); Modified: stable/7/usr.sbin/pkg_install/lib/pen.c ============================================================================== --- stable/7/usr.sbin/pkg_install/lib/pen.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/lib/pen.c Fri Jan 22 23:17:07 2010 (r202841) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); /* For keeping track of where we are */ static char PenLocation[FILENAME_MAX]; -static char Previous[FILENAME_MAX]; char * where_playpen(void) @@ -76,12 +75,14 @@ find_play_pen(char *pen, off_t sz) static char *pstack[MAX_STACK]; static int pdepth = -1; -static void +static const char * pushPen(const char *pen) { if (++pdepth == MAX_STACK) errx(2, "%s: stack overflow.\n", __func__); pstack[pdepth] = strdup(pen); + + return pstack[pdepth]; } static void @@ -99,10 +100,11 @@ popPen(char *pen) * Make a temporary directory to play in and chdir() to it, returning * pathname of previous working directory. */ -char * +const char * make_playpen(char *pen, off_t sz) { char humbuf1[6], humbuf2[6]; + char cwd[FILENAME_MAX]; if (!find_play_pen(pen, sz)) return NULL; @@ -134,7 +136,7 @@ make_playpen(char *pen, off_t sz) "with more space and\ntry the command again", __func__, pen); } - if (!getcwd(Previous, FILENAME_MAX)) { + if (!getcwd(cwd, FILENAME_MAX)) { upchuck("getcwd"); return NULL; } @@ -144,34 +146,35 @@ make_playpen(char *pen, off_t sz) errx(2, "%s: can't chdir to '%s'", __func__, pen); } - if (PenLocation[0]) - pushPen(PenLocation); - strcpy(PenLocation, pen); - return Previous; + return pushPen(cwd); } /* Convenience routine for getting out of playpen */ -void +int leave_playpen() { + static char left[FILENAME_MAX]; void (*oldsig)(int); + if (!PenLocation[0]) + return 0; + /* Don't interrupt while we're cleaning up */ oldsig = signal(SIGINT, SIG_IGN); - if (Previous[0]) { - if (chdir(Previous) == FAIL) { - cleanup(0); - errx(2, "%s: can't chdir back to '%s'", __func__, Previous); - } - Previous[0] = '\0'; - } - if (PenLocation[0]) { - if (PenLocation[0] == '/' && vsystem("/bin/rm -rf %s", PenLocation)) - warnx("couldn't remove temporary dir '%s'", PenLocation); - popPen(PenLocation); + strcpy(left, PenLocation); + popPen(PenLocation); + + if (chdir(PenLocation) == FAIL) { + cleanup(0); + errx(2, "%s: can't chdir back to '%s'", __func__, PenLocation); } + + if (left[0] == '/' && vsystem("/bin/rm -rf %s", left)) + warnx("couldn't remove temporary dir '%s'", left); signal(SIGINT, oldsig); + + return 1; } off_t Modified: stable/7/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- stable/7/usr.sbin/pkg_install/lib/plist.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/lib/plist.c Fri Jan 22 23:17:07 2010 (r202841) @@ -285,6 +285,10 @@ read_plist(Package *pkg, FILE *fp) } if (*cp == '\0') { cp = NULL; + if (cmd == PLIST_PKGDEP) { + warnx("corrupted record (pkgdep line without argument), ignoring"); + cmd = FAIL; + } goto bottom; } if (cmd == PLIST_COMMENT && sscanf(cp, "PKG_FORMAT_REVISION:%d.%d\n", Modified: stable/7/usr.sbin/pkg_install/lib/url.c ============================================================================== --- stable/7/usr.sbin/pkg_install/lib/url.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/lib/url.c Fri Jan 22 23:17:07 2010 (r202841) @@ -32,10 +32,11 @@ __FBSDID("$FreeBSD$"); * Try and fetch a file by URL, returning the directory name for where * it's unpacked, if successful. */ -char * +const char * fileGetURL(const char *base, const char *spec, int keep_package) { - char *cp, *rp, *tmp; + const char *rp; + char *cp, *tmp; char fname[FILENAME_MAX]; char pen[FILENAME_MAX]; char pkg[FILENAME_MAX]; @@ -105,7 +106,7 @@ fileGetURL(const char *base, const char fetchDebug = (Verbose > 0); if ((ftp = fetchGetURL(fname, Verbose ? "v" : NULL)) == NULL) { - printf("Error: FTP Unable to get %s: %s\n", + printf("Error: Unable to get %s: %s\n", fname, fetchLastErrString); return NULL; } Modified: stable/7/usr.sbin/pkg_install/updating/Makefile ============================================================================== --- stable/7/usr.sbin/pkg_install/updating/Makefile Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/updating/Makefile Fri Jan 22 23:17:07 2010 (r202841) @@ -5,7 +5,6 @@ SRCS= main.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/7/usr.sbin/pkg_install/version/Makefile ============================================================================== --- stable/7/usr.sbin/pkg_install/version/Makefile Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/version/Makefile Fri Jan 22 23:17:07 2010 (r202841) @@ -5,7 +5,6 @@ SRCS= main.c perform.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/7/usr.sbin/pkg_install/version/main.c ============================================================================== --- stable/7/usr.sbin/pkg_install/version/main.c Fri Jan 22 23:13:46 2010 (r202840) +++ stable/7/usr.sbin/pkg_install/version/main.c Fri Jan 22 23:17:07 2010 (r202841) @@ -127,7 +127,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n", "usage: pkg_version [-hIoqv] [-l limchar] [-L limchar] [[-X] -s string] [-O origin] [index]", From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 23:19:34 2010 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 052E2106566B; Fri, 22 Jan 2010 23:19:34 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4F1A8FC13; Fri, 22 Jan 2010 23:19:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNJX13019622; Fri, 22 Jan 2010 23:19:33 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNJXDj019603; Fri, 22 Jan 2010 23:19:33 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201001222319.o0MNJXDj019603@svn.freebsd.org> From: Florent Thoumie Date: Fri, 22 Jan 2010 23:19: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: r202842 - in stable/6/usr.sbin/pkg_install: add create delete info lib updating version 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: Fri, 22 Jan 2010 23:19:34 -0000 Author: flz Date: Fri Jan 22 23:19:33 2010 New Revision: 202842 URL: http://svn.freebsd.org/changeset/base/202842 Log: Synchronize pkg_install with HEAD. Modified: stable/6/usr.sbin/pkg_install/add/main.c stable/6/usr.sbin/pkg_install/add/perform.c stable/6/usr.sbin/pkg_install/create/main.c stable/6/usr.sbin/pkg_install/create/perform.c stable/6/usr.sbin/pkg_install/delete/Makefile stable/6/usr.sbin/pkg_install/delete/main.c stable/6/usr.sbin/pkg_install/info/Makefile stable/6/usr.sbin/pkg_install/info/main.c stable/6/usr.sbin/pkg_install/info/perform.c stable/6/usr.sbin/pkg_install/lib/lib.h stable/6/usr.sbin/pkg_install/lib/pen.c stable/6/usr.sbin/pkg_install/lib/plist.c stable/6/usr.sbin/pkg_install/lib/url.c stable/6/usr.sbin/pkg_install/updating/Makefile stable/6/usr.sbin/pkg_install/version/Makefile stable/6/usr.sbin/pkg_install/version/main.c Modified: stable/6/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/add/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/add/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -81,13 +81,16 @@ struct { { 604000, 604099, "/packages-6.4-release" }, { 700000, 700099, "/packages-7.0-release" }, { 701000, 701099, "/packages-7.1-release" }, + { 702000, 702099, "/packages-7.2-release" }, + { 800000, 800499, "/packages-8.0-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, { 503100, 599000, "/packages-5-stable" }, { 600100, 699000, "/packages-6-stable" }, { 700100, 799000, "/packages-7-stable" }, - { 800000, 899000, "/packages-8-current" }, + { 800500, 899000, "/packages-8-stable" }, + { 900000, 999000, "/packages-9-current" }, { 0, 9999999, "/packages-current" }, { 0, 0, NULL } }; @@ -341,7 +344,7 @@ getpackagesite(void) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: pkg_add [-viInfFrRMSK] [-t template] [-p prefix] [-P prefix] [-C chrootdir]", Modified: stable/6/usr.sbin/pkg_install/add/perform.c ============================================================================== --- stable/6/usr.sbin/pkg_install/add/perform.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/add/perform.c Fri Jan 22 23:19:33 2010 (r202842) @@ -52,9 +52,6 @@ pkg_perform(char **pkgs) return err_cnt; } -static Package Plist; -static char *Home; - /* * This is seriously ugly code following. Written very fast! * [And subsequently made even worse.. Sigh! This code was just born @@ -63,10 +60,12 @@ static char *Home; static int pkg_do(char *pkg) { + Package Plist; char pkg_fullname[FILENAME_MAX]; char playpen[FILENAME_MAX]; char extract_contents[FILENAME_MAX]; - char *where_to, *extract; + char *extract; + const char *where_to; FILE *cfile; int code; PackingList p; @@ -87,6 +86,8 @@ pkg_do(char *pkg) strcpy(playpen, FirstPen); inPlace = 0; + memset(&Plist, '\0', sizeof(Plist)); + /* Are we coming in for a second pass, everything already extracted? */ if (!pkg) { fgets(playpen, FILENAME_MAX, stdin); @@ -102,11 +103,10 @@ pkg_do(char *pkg) else { /* Is it an ftp://foo.bar.baz/file.t[bg]z specification? */ if (isURL(pkg)) { - if (!(Home = fileGetURL(NULL, pkg, KeepPackage))) { + if (!(where_to = fileGetURL(NULL, pkg, KeepPackage))) { warnx("unable to fetch '%s' by URL", pkg); return 1; } - where_to = Home; strcpy(pkg_fullname, pkg); cfile = fopen(CONTENTS_FNAME, "r"); if (!cfile) { @@ -135,13 +135,11 @@ pkg_do(char *pkg) extract = NULL; sb.st_size = 100000; /* Make up a plausible average size */ } - Home = make_playpen(playpen, sb.st_size * 4); - if (!Home) + if (!(where_to = make_playpen(playpen, sb.st_size * 4))) errx(1, "unable to make playpen for %lld bytes", (long long)sb.st_size * 4); - where_to = Home; /* Since we can call ourselves recursively, keep notes on where we came from */ if (!getenv("_TOP")) - setenv("_TOP", Home, 1); + setenv("_TOP", where_to, 1); if (unpack(pkg_fullname, extract)) { warnx( "unable to extract table of contents file from '%s' - not a package?", @@ -280,6 +278,44 @@ pkg_do(char *pkg) warnx("-f specified; proceeding anyway"); } +#if ENSURE_THAT_ALL_REQUIREMENTS_ARE_MET + /* + * Before attempting to do the slave mode bit, ensure that we've + * downloaded & processed everything we need. + * It's possible that we haven't already installed all of our + * dependencies if the dependency list was misgenerated due to + * other dynamic dependencies or if a dependency was added to a + * package without all REQUIRED_BY packages being regenerated. + */ + for (p = pkg ? Plist.head : NULL; p; p = p->next) { + const char *ext; + char *deporigin; + + if (p->type != PLIST_PKGDEP) + continue; + deporigin = (p->next->type == PLIST_DEPORIGIN) ? p->next->name : NULL; + + if (isinstalledpkg(p->name) <= 0 && + !(deporigin != NULL && matchbyorigin(deporigin, NULL) != NULL)) { + char subpkg[FILENAME_MAX], *sep; + + strlcpy(subpkg, pkg, sizeof subpkg); + if ((sep = strrchr(subpkg, '/')) != NULL) { + *sep = '\0'; + if ((sep = strrchr(subpkg, '/')) != NULL) { + *sep = '\0'; + strlcat(subpkg, "/All/", sizeof subpkg); + strlcat(subpkg, p->name, sizeof subpkg); + if ((ext = strrchr(pkg, '.')) == NULL) + ext = ".tbz"; + strlcat(subpkg, ext, sizeof subpkg); + pkg_do(subpkg); + } + } + } + } +#endif + /* Now check the packing list for dependencies */ for (p = Plist.head; p ; p = p->next) { char *deporigin; @@ -295,7 +331,8 @@ pkg_do(char *pkg) } if (isinstalledpkg(p->name) <= 0 && !(deporigin != NULL && matchbyorigin(deporigin, NULL) != NULL)) { - char path[FILENAME_MAX], *cp = NULL; + char path[FILENAME_MAX]; + const char *cp = NULL; if (!Fake) { char prefixArg[2 + MAXPATHLEN]; /* "-P" + Prefix */ @@ -333,7 +370,7 @@ pkg_do(char *pkg) } else if ((cp = fileGetURL(pkg, p->name, KeepPackage)) != NULL) { if (Verbose) - printf("Finished loading %s over FTP.\n", p->name); + printf("Finished loading %s via a URL\n", p->name); if (!fexists("+CONTENTS")) { warnx("autoloaded package %s has no +CONTENTS file?", p->name); @@ -645,7 +682,8 @@ cleanup(int sig) printf("Signal %d received, cleaning up..\n", sig); if (!Fake && zapLogDir && LogDir[0]) vsystem("%s -rf %s", REMOVE_CMD, LogDir); - leave_playpen(); + while (leave_playpen()) + ; } if (sig) exit(1); Modified: stable/6/usr.sbin/pkg_install/create/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/create/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/create/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -249,7 +249,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: pkg_create [-YNOhjnvyz] [-C conflicts] [-P pkgs] [-p prefix]", Modified: stable/6/usr.sbin/pkg_install/create/perform.c ============================================================================== --- stable/6/usr.sbin/pkg_install/create/perform.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/create/perform.c Fri Jan 22 23:19:33 2010 (r202842) @@ -39,11 +39,10 @@ static void make_dist(const char *, cons static int create_from_installed_recursive(const char *, const char *); static int create_from_installed(const char *, const char *, const char *); -static char *home; - int pkg_perform(char **pkgs) { + static const char *home; char *pkg = *pkgs; /* Only one arg to create */ char *cp; FILE *pkg_in, *fp; Modified: stable/6/usr.sbin/pkg_install/delete/Makefile ============================================================================== --- stable/6/usr.sbin/pkg_install/delete/Makefile Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/delete/Makefile Fri Jan 22 23:19:33 2010 (r202842) @@ -5,7 +5,6 @@ SRCS= main.c perform.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBMD} Modified: stable/6/usr.sbin/pkg_install/delete/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/delete/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/delete/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -170,7 +170,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: pkg_delete [-dDfGinrvxX] [-p prefix] pkg-name ...", Modified: stable/6/usr.sbin/pkg_install/info/Makefile ============================================================================== --- stable/6/usr.sbin/pkg_install/info/Makefile Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/info/Makefile Fri Jan 22 23:19:33 2010 (r202842) @@ -5,7 +5,6 @@ SRCS= main.c perform.c show.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/6/usr.sbin/pkg_install/info/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/info/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/info/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -282,7 +282,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]", Modified: stable/6/usr.sbin/pkg_install/info/perform.c ============================================================================== --- stable/6/usr.sbin/pkg_install/info/perform.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/info/perform.c Fri Jan 22 23:19:33 2010 (r202842) @@ -85,8 +85,6 @@ pkg_perform(char **pkgs) return err_cnt; } -static char *Home; - static int pkg_do(char *pkg) { @@ -96,7 +94,7 @@ pkg_do(char *pkg) Package plist; FILE *fp; struct stat sb; - char *cp = NULL; + const char *cp = NULL; int code = 0; if (isURL(pkg)) { @@ -138,7 +136,7 @@ pkg_do(char *pkg) code = 1; goto bail; } - Home = make_playpen(PlayPen, sb.st_size / 2); + make_playpen(PlayPen, sb.st_size / 2); if (unpack(fname, "'+*'")) { warnx("error during unpacking, no info for '%s' available", pkg); code = 1; Modified: stable/6/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- stable/6/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:19:33 2010 (r202842) @@ -84,14 +84,14 @@ #define DISPLAY_FNAME "+DISPLAY" #define MTREE_FNAME "+MTREE_DIRS" -#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000 +#if defined(__FreeBSD_version) && __FreeBSD_version >= 900000 +#define INDEX_FNAME "INDEX-9" +#elif defined(__FreeBSD_version) && __FreeBSD_version >= 800000 #define INDEX_FNAME "INDEX-8" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 700000 #define INDEX_FNAME "INDEX-7" #elif defined(__FreeBSD_version) && __FreeBSD_version >= 600000 #define INDEX_FNAME "INDEX-6" -#elif defined(__FreeBSD_version) && __FreeBSD_version >= 500036 -#define INDEX_FNAME "INDEX-5" #else #define INDEX_FNAME "INDEX" #endif @@ -102,10 +102,10 @@ #define PKG_PREFIX_VNAME "PKG_PREFIX" /* - * Version of the package tools - increase only when some - * functionality used by bsd.port.mk is changed, added or removed + * Version of the package tools - increase whenever you make a change + * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20080708 +#define PKG_INSTALL_VERSION 20090902 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) @@ -159,9 +159,9 @@ STAILQ_HEAD(reqr_by_head, reqr_by_entry) int vsystem(const char *, ...); char *vpipe(const char *, ...); void cleanup(int); -char *make_playpen(char *, off_t); +const char *make_playpen(char *, off_t); char *where_playpen(void); -void leave_playpen(void); +int leave_playpen(void); off_t min_free(const char *); /* String */ @@ -183,7 +183,7 @@ Boolean isfile(const char *); Boolean isempty(const char *); Boolean issymlink(const char *); Boolean isURL(const char *); -char *fileGetURL(const char *, const char *, int); +const char *fileGetURL(const char *, const char *, int); char *fileFindByPath(const char *, const char *); char *fileGetContents(const char *); void write_file(const char *, const char *); Modified: stable/6/usr.sbin/pkg_install/lib/pen.c ============================================================================== --- stable/6/usr.sbin/pkg_install/lib/pen.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/lib/pen.c Fri Jan 22 23:19:33 2010 (r202842) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); /* For keeping track of where we are */ static char PenLocation[FILENAME_MAX]; -static char Previous[FILENAME_MAX]; char * where_playpen(void) @@ -76,12 +75,14 @@ find_play_pen(char *pen, off_t sz) static char *pstack[MAX_STACK]; static int pdepth = -1; -static void +static const char * pushPen(const char *pen) { if (++pdepth == MAX_STACK) errx(2, "%s: stack overflow.\n", __func__); pstack[pdepth] = strdup(pen); + + return pstack[pdepth]; } static void @@ -99,10 +100,11 @@ popPen(char *pen) * Make a temporary directory to play in and chdir() to it, returning * pathname of previous working directory. */ -char * +const char * make_playpen(char *pen, off_t sz) { char humbuf1[6], humbuf2[6]; + char cwd[FILENAME_MAX]; if (!find_play_pen(pen, sz)) return NULL; @@ -134,7 +136,7 @@ make_playpen(char *pen, off_t sz) "with more space and\ntry the command again", __func__, pen); } - if (!getcwd(Previous, FILENAME_MAX)) { + if (!getcwd(cwd, FILENAME_MAX)) { upchuck("getcwd"); return NULL; } @@ -144,34 +146,35 @@ make_playpen(char *pen, off_t sz) errx(2, "%s: can't chdir to '%s'", __func__, pen); } - if (PenLocation[0]) - pushPen(PenLocation); - strcpy(PenLocation, pen); - return Previous; + return pushPen(cwd); } /* Convenience routine for getting out of playpen */ -void +int leave_playpen() { + static char left[FILENAME_MAX]; void (*oldsig)(int); + if (!PenLocation[0]) + return 0; + /* Don't interrupt while we're cleaning up */ oldsig = signal(SIGINT, SIG_IGN); - if (Previous[0]) { - if (chdir(Previous) == FAIL) { - cleanup(0); - errx(2, "%s: can't chdir back to '%s'", __func__, Previous); - } - Previous[0] = '\0'; - } - if (PenLocation[0]) { - if (PenLocation[0] == '/' && vsystem("/bin/rm -rf %s", PenLocation)) - warnx("couldn't remove temporary dir '%s'", PenLocation); - popPen(PenLocation); + strcpy(left, PenLocation); + popPen(PenLocation); + + if (chdir(PenLocation) == FAIL) { + cleanup(0); + errx(2, "%s: can't chdir back to '%s'", __func__, PenLocation); } + + if (left[0] == '/' && vsystem("/bin/rm -rf %s", left)) + warnx("couldn't remove temporary dir '%s'", left); signal(SIGINT, oldsig); + + return 1; } off_t Modified: stable/6/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- stable/6/usr.sbin/pkg_install/lib/plist.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/lib/plist.c Fri Jan 22 23:19:33 2010 (r202842) @@ -285,6 +285,10 @@ read_plist(Package *pkg, FILE *fp) } if (*cp == '\0') { cp = NULL; + if (cmd == PLIST_PKGDEP) { + warnx("corrupted record (pkgdep line without argument), ignoring"); + cmd = FAIL; + } goto bottom; } if (cmd == PLIST_COMMENT && sscanf(cp, "PKG_FORMAT_REVISION:%d.%d\n", Modified: stable/6/usr.sbin/pkg_install/lib/url.c ============================================================================== --- stable/6/usr.sbin/pkg_install/lib/url.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/lib/url.c Fri Jan 22 23:19:33 2010 (r202842) @@ -32,10 +32,11 @@ __FBSDID("$FreeBSD$"); * Try and fetch a file by URL, returning the directory name for where * it's unpacked, if successful. */ -char * +const char * fileGetURL(const char *base, const char *spec, int keep_package) { - char *cp, *rp, *tmp; + const char *rp; + char *cp, *tmp; char fname[FILENAME_MAX]; char pen[FILENAME_MAX]; char pkg[FILENAME_MAX]; @@ -105,7 +106,7 @@ fileGetURL(const char *base, const char fetchDebug = (Verbose > 0); if ((ftp = fetchGetURL(fname, Verbose ? "v" : NULL)) == NULL) { - printf("Error: FTP Unable to get %s: %s\n", + printf("Error: Unable to get %s: %s\n", fname, fetchLastErrString); return NULL; } Modified: stable/6/usr.sbin/pkg_install/updating/Makefile ============================================================================== --- stable/6/usr.sbin/pkg_install/updating/Makefile Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/updating/Makefile Fri Jan 22 23:19:33 2010 (r202842) @@ -5,7 +5,6 @@ SRCS= main.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/6/usr.sbin/pkg_install/version/Makefile ============================================================================== --- stable/6/usr.sbin/pkg_install/version/Makefile Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/version/Makefile Fri Jan 22 23:19:33 2010 (r202842) @@ -5,7 +5,6 @@ SRCS= main.c perform.c CFLAGS+= -I${.CURDIR}/../lib -WARNS?= 6 WFORMAT?= 1 DPADD= ${LIBINSTALL} ${LIBFETCH} ${LIBMD} Modified: stable/6/usr.sbin/pkg_install/version/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/version/main.c Fri Jan 22 23:17:07 2010 (r202841) +++ stable/6/usr.sbin/pkg_install/version/main.c Fri Jan 22 23:19:33 2010 (r202842) @@ -127,7 +127,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n%s\n", "usage: pkg_version [-hIoqv] [-l limchar] [-L limchar] [[-X] -s string] [-O origin] [index]", From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 23:19:49 2010 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 21DA510656C2; Fri, 22 Jan 2010 23:19:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F13F8FC12; Fri, 22 Jan 2010 23:19:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNJmUO019758; Fri, 22 Jan 2010 23:19:48 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNJmaO019750; Fri, 22 Jan 2010 23:19:48 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001222319.o0MNJmaO019750@svn.freebsd.org> From: Xin LI Date: Fri, 22 Jan 2010 23:19: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: r202843 - in head: . etc/mtree share/doc/usd share/doc/usd/05.dc share/doc/usd/06.bc usr.bin/bc usr.bin/bc/USD.doc usr.bin/dc usr.bin/dc/USD.doc 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: Fri, 22 Jan 2010 23:19:49 -0000 Author: delphij Date: Fri Jan 22 23:19:48 2010 New Revision: 202843 URL: http://svn.freebsd.org/changeset/base/202843 Log: Move USD documents from /usr/share/doc/papers to to /usr/share/doc/usd. Reviewed by: gabor Added: head/share/doc/usd/05.dc/ head/share/doc/usd/05.dc/Makefile (contents, props changed) head/share/doc/usd/06.bc/ head/share/doc/usd/06.bc/Makefile (contents, props changed) Deleted: head/usr.bin/bc/USD.doc/Makefile head/usr.bin/dc/USD.doc/Makefile Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.usr.dist head/share/doc/usd/Makefile head/usr.bin/bc/Makefile head/usr.bin/dc/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jan 22 23:19:33 2010 (r202842) +++ head/ObsoleteFiles.inc Fri Jan 22 23:19:48 2010 (r202843) @@ -14,6 +14,9 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100122: move BSDL bc/dc USD documents to /usr/share/doc/usd +OLD_FILES+=usr/share/doc/papers/bc.ascii.gz +OLD_FILES+=usr/share/doc/papers/dc.ascii.gz # 20100120: replacing GNU bc/dc with BSDL versions OLD_FILES+=usr/share/examples/bc/ckbook.b OLD_FILES+=usr/share/examples/bc/pi.b Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Fri Jan 22 23:19:33 2010 (r202842) +++ head/etc/mtree/BSD.usr.dist Fri Jan 22 23:19:48 2010 (r202843) @@ -160,6 +160,10 @@ usd 04.csh .. + 05.dc + .. + 06.bc + .. 07.mail .. 10.exref Added: head/share/doc/usd/05.dc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/usd/05.dc/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -0,0 +1,9 @@ +# @(#)Makefile 8.1 (Berkeley) 6/8/93 +# $FreeBSD$ + +VOLUME= usd/05.dc +SRCS= dc +MACROS= -ms +SRCDIR= ${.CURDIR}/../../../../usr.bin/dc/USD.doc + +.include Added: head/share/doc/usd/06.bc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/usd/06.bc/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -0,0 +1,9 @@ +# @(#)Makefile 8.1 (Berkeley) 6/8/93 +# $FreeBSD$ + +VOLUME= usd/06.bc +SRCS= bc +MACROS= -ms +SRCDIR= ${.CURDIR}/../../../../usr.bin/bc/USD.doc + +.include Modified: head/share/doc/usd/Makefile ============================================================================== --- head/share/doc/usd/Makefile Fri Jan 22 23:19:33 2010 (r202842) +++ head/share/doc/usd/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -7,6 +7,8 @@ SUBDIR= title \ contents \ 04.csh \ + 05.dc \ + 06.bc \ 07.mail \ 10.exref \ 11.vitut \ Modified: head/usr.bin/bc/Makefile ============================================================================== --- head/usr.bin/bc/Makefile Fri Jan 22 23:19:33 2010 (r202842) +++ head/usr.bin/bc/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -4,7 +4,6 @@ PROG= bc SRCS= bc.y scan.l CFLAGS+= -I. -I${.CURDIR} -SUBDIR+= USD.doc FILES+= bc.library FILESDIR= ${SHAREDIR}/misc Modified: head/usr.bin/dc/Makefile ============================================================================== --- head/usr.bin/dc/Makefile Fri Jan 22 23:19:33 2010 (r202842) +++ head/usr.bin/dc/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -6,6 +6,4 @@ SRCS= dc.c bcode.c inout.c mem.c stack.c LDADD= -lcrypto DPADD= ${LIBCRYPTO} -SUBDIR+= USD.doc - .include From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 23:32:11 2010 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 07E9310656FE; Fri, 22 Jan 2010 23:32:11 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8E618FC0C; Fri, 22 Jan 2010 23:32:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNWAwh023820; Fri, 22 Jan 2010 23:32:10 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNWAk7023816; Fri, 22 Jan 2010 23:32:10 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201001222332.o0MNWAk7023816@svn.freebsd.org> From: Florent Thoumie Date: Fri, 22 Jan 2010 23:32: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: r202844 - in head/usr.sbin/pkg_install: lib updating 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: Fri, 22 Jan 2010 23:32:11 -0000 Author: flz Date: Fri Jan 22 23:32:10 2010 New Revision: 202844 URL: http://svn.freebsd.org/changeset/base/202844 Log: - Add support for UPDATING remote fetching. - Reorganize EXAMPLES section in pkg_updating(1). - Style fixes. - Bump PKG_INSTALL_VERSION to 20100122. Submitted by: beat MFC after: 1 week Modified: head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/updating/main.c head/usr.sbin/pkg_install/updating/pkg_updating.1 Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:19:48 2010 (r202843) +++ head/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:32:10 2010 (r202844) @@ -105,7 +105,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20090902 +#define PKG_INSTALL_VERSION 20100122 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: head/usr.sbin/pkg_install/updating/main.c ============================================================================== --- head/usr.sbin/pkg_install/updating/main.c Fri Jan 22 23:19:48 2010 (r202843) +++ head/usr.sbin/pkg_install/updating/main.c Fri Jan 22 23:32:10 2010 (r202844) @@ -10,7 +10,11 @@ #include __FBSDID("$FreeBSD$"); + +#include +#include #include +#include #include #include #include @@ -115,10 +119,10 @@ main(int argc, char *argv[]) if (argc != 0) { pflag = 1; while (*argv) { - if((curr = (INSTALLEDPORT *) + if ((curr = (INSTALLEDPORT *) malloc(sizeof(INSTALLEDPORT))) == NULL) (void)exit(EXIT_FAILURE); - strlcpy (curr->name, *argv, strlen(*argv) + 1); + strlcpy(curr->name, *argv, strlen(*argv) + 1); curr->next = head; head = curr; (void)*argv++; @@ -131,22 +135,22 @@ main(int argc, char *argv[]) */ if (pflag == 0) { /* Open /var/db/pkg and search for all installed ports. */ - if((dir = opendir(pkgdbpath)) != NULL) { + if ((dir = opendir(pkgdbpath)) != NULL) { while ((pkgdbdir = readdir(dir)) != NULL) { if (strcmp(pkgdbdir->d_name, ".") != 0 && - strcmp(pkgdbdir->d_name, "..") !=0) { + strcmp(pkgdbdir->d_name, "..") != 0) { /* Create path to +CONTENTS file for each installed port */ n = strlcpy(tmp_file, pkgdbpath, strlen(pkgdbpath)+1); n = strlcpy(tmp_file + n, "/", sizeof(tmp_file) - n); n = strlcat(tmp_file + n, pkgdbdir->d_name, sizeof(tmp_file) - n); - if(stat(tmp_file, &attribute) == -1) { + if (stat(tmp_file, &attribute) == -1) { fprintf(stderr, "can't open %s: %s\n", tmp_file, strerror(errno)); return EXIT_FAILURE; } - if(attribute.st_mode & S_IFREG) + if (attribute.st_mode & S_IFREG) continue; (void)strlcat(tmp_file + n, "/", sizeof(tmp_file) - n); @@ -155,7 +159,7 @@ main(int argc, char *argv[]) /* Open +CONTENT file */ fd = fopen(tmp_file, "r"); - if(fd == NULL) { + if (fd == NULL) { fprintf(stderr, "warning: can't open %s: %s\n", tmp_file, strerror(errno)); continue; @@ -165,14 +169,14 @@ main(int argc, char *argv[]) * Parses +CONTENT for ORIGIN line and * put element into linked list. */ - while(fgets(originline, maxcharperline, fd) != NULL) { + while (fgets(originline, maxcharperline, fd) != NULL) { tmpline1 = strstr(originline, origin); - if( tmpline1 != NULL ) { + if (tmpline1 != NULL) { /* Tmp variable to store port name. */ char *pname; pname = strrchr(originline, (int)':'); pname++; - if((curr = (INSTALLEDPORT *) + if ((curr = (INSTALLEDPORT *) malloc(sizeof(INSTALLEDPORT))) == NULL) (void)exit(EXIT_FAILURE); if (pname[strlen(pname) - 1] == '\n') @@ -183,7 +187,7 @@ main(int argc, char *argv[]) } } - if(ferror(fd)) { + if (ferror(fd)) { fprintf(stderr, "error reading input\n"); exit(EX_IOERR); } @@ -195,32 +199,41 @@ main(int argc, char *argv[]) } } - /* Open UPDATING file */ - fd = fopen(updatingfile, "r"); - if(fd == NULL) { + /* Fetch UPDATING file if needed and open file */ + if (isURL(updatingfile)) { + if ((fd = fetchGetURL(updatingfile, "")) == NULL) { + fprintf(stderr, "Error: Unable to get %s: %s\n", + updatingfile, fetchLastErrString); + exit(EX_UNAVAILABLE); + } + } + else { + fd = fopen(updatingfile, "r"); + } + if (fd == NULL) { fprintf(stderr, "can't open %s: %s\n", - updatingfile, strerror(errno)); + updatingfile, strerror(errno)); exit(EX_UNAVAILABLE); } /* Parse opened UPDATING file. */ - while(fgets(updatingline, maxcharperline, fd) != NULL) { + while (fgets(updatingline, maxcharperline, fd) != NULL) { /* No entry is found so far */ if (found == 0) { /* Search for AFFECTS line to parse the portname. */ tmpline1 = strstr(updatingline, affects); - if( tmpline1 != NULL ) { + if (tmpline1 != NULL) { curr = head; - while(curr != NULL) { + while (curr != NULL) { tmpline2 = strstr(updatingline, curr->name); - if( tmpline2 != NULL ) + if (tmpline2 != NULL) break; curr = curr->next; } - if( tmpline2 != NULL ) { + if (tmpline2 != NULL) { /* If -d is set, check if entry is newer than the date. */ - if ( (dflag == 1) && (strncmp(dateline, date, 8) < 0)) + if ((dflag == 1) && (strncmp(dateline, date, 8) < 0)) continue; printf("%s", dateline); printf("%s", updatingline); @@ -231,7 +244,7 @@ main(int argc, char *argv[]) /* Search for the end of an entry, if not found print the line. */ else { tmpline1 = strstr(updatingline, end); - if( tmpline1 == NULL ) + if (tmpline1 == NULL) printf("%s", updatingline); else { linelength = strlen(updatingline); @@ -245,7 +258,7 @@ main(int argc, char *argv[]) dateline = strdup(updatingline); } - if(ferror(fd)) { + if (ferror(fd)) { fprintf(stderr, "error reading input\n"); exit(EX_IOERR); } Modified: head/usr.sbin/pkg_install/updating/pkg_updating.1 ============================================================================== --- head/usr.sbin/pkg_install/updating/pkg_updating.1 Fri Jan 22 23:19:48 2010 (r202843) +++ head/usr.sbin/pkg_install/updating/pkg_updating.1 Fri Jan 22 23:32:10 2010 (r202844) @@ -45,26 +45,31 @@ Print help message. .El .Sh EXAMPLES .Bl -tag -width indent -.Dl pkg_updating +Shows all entries of all installed ports: .Pp -Shows all entries of all installed ports. +.Dl % pkg_updating .Pp -.Dl pkg_updating -d 20070101 +Shows all entries of all installed ports since 2007-01-01: .Pp -Shows all entries of all installed ports since 2007-01-01. +.Dl % pkg_updating -d 20070101 .Pp -.Dl pkg_updating apache mysql +Shows all entries for all apache and mysql ports: .Pp -Shows all entries for all apache and mysql ports. +.Dl % pkg_updating apache mysql .Pp -.Dl pkg_updating -d 20060101 apache +Shows all apache entries since 2006-01-01: .Pp -Shows all apache entries since 2006-01-01. -.Pp -.Dl pkg_updating -f /tmp/UPDATING +.Dl % pkg_updating -d 20060101 apache .Pp Defines that the UPDATING file is in /tmp and shows all entries of all -installed ports +installed ports: +.Pp +.Dl % pkg_updating -f /tmp/UPDATING +.Pp +Fetch UPDATING file from ftp mirror and show all entries of all +installed ports: +.Pp +.Dl % pkg_updating -f ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/UPDATING .Pp .El .Sh ENVIRONMENT From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 23:35:06 2010 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 8DC581065670; Fri, 22 Jan 2010 23:35:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6402C8FC18; Fri, 22 Jan 2010 23:35:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNZ6PR024736; Fri, 22 Jan 2010 23:35:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNZ6ej024733; Fri, 22 Jan 2010 23:35:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001222335.o0MNZ6ej024733@svn.freebsd.org> From: Xin LI Date: Fri, 22 Jan 2010 23:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202845 - head/usr.bin/bc 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: Fri, 22 Jan 2010 23:35:06 -0000 Author: delphij Date: Fri Jan 22 23:35:06 2010 New Revision: 202845 URL: http://svn.freebsd.org/changeset/base/202845 Log: - Remove --debug option and intentionally undocument -d, which is only kept for compatibility with 4.4BSD behavior. - Sync SYNOPSIS with usage(). - Use an alternative way to represent short and long options which have same semantics. Reviewed by: gabor Modified: head/usr.bin/bc/bc.1 head/usr.bin/bc/bc.y Modified: head/usr.bin/bc/bc.1 ============================================================================== --- head/usr.bin/bc/bc.1 Fri Jan 22 23:32:10 2010 (r202844) +++ head/usr.bin/bc/bc.1 Fri Jan 22 23:35:06 2010 (r202845) @@ -35,7 +35,7 @@ .\" .\" @(#)bc.1 6.8 (Berkeley) 8/8/91 .\" -.Dd May 31 2007 +.Dd January 22, 2010 .Dt BC 1 .Os .Sh NAME @@ -43,7 +43,7 @@ .Nd arbitrary-precision arithmetic language and calculator .Sh SYNOPSIS .Nm bc -.Op Fl cl +.Op Fl chlqv .Op Fl e Ar expression .Op Ar file ... .Sh DESCRIPTION @@ -56,8 +56,6 @@ any files given, then reads the standard Options available: .Bl -tag -width Ds .It Fl c -.It Fl d -.It Fl Fl debug .Nm is actually a preprocessor for .Xr dc 1 , @@ -71,24 +69,22 @@ instructions are sent to the standard ou instead of being interpreted by a running .Xr dc 1 process. -.It Fl e Ar exp -.It Fl Fl expression Ar exp +.It Fl e Ar expression , Fl Fl expression Ar expression Evaluate .Ar expression . If multiple .Fl e options are specified, they are processed in the order given, separated by newlines. -.It Fl h -.It Fl Fl help +.It Fl h , Fl Fl help Prints usage information. -.It Fl l -.It Fl Fl mathlib +.It Fl l , Fl Fl mathlib Allow specification of an arbitrary precision math library. The definitions in the library are available to command line expressions. -.It Fl v -.It Fl Fl version +Synonym for +.Fl l . +.It Fl v , Fl Fl version Prints version information. .El .Pp @@ -373,7 +369,7 @@ are extensions to that specification. .Sh HISTORY The .Nm -first command appeared in +command first appeared in .At v6 . A complete rewrite of the .Nm Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Fri Jan 22 23:32:10 2010 (r202844) +++ head/usr.bin/bc/bc.y Fri Jan 22 23:35:06 2010 (r202845) @@ -129,7 +129,6 @@ extern char *__progname; const struct option long_options[] = { - {"debug", no_argument, NULL, 'd'}, {"expression", required_argument, NULL, 'e'}, {"help", no_argument, NULL, 'h'}, {"mathlib", no_argument, NULL, 'l'}, @@ -1014,7 +1013,7 @@ init(void) static void usage(void) { - fprintf(stderr, "usage: %s [-cdhlqv] [-e expression] [file ...]\n", + fprintf(stderr, "usage: %s [-chlqv] [-e expression] [file ...]\n", __progname); exit(1); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 23:50:46 2010 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 9128110656A3; Fri, 22 Jan 2010 23:50:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80C7A8FC18; Fri, 22 Jan 2010 23:50:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNokBH029072; Fri, 22 Jan 2010 23:50:46 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNok8b029070; Fri, 22 Jan 2010 23:50:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001222350.o0MNok8b029070@svn.freebsd.org> From: Xin LI Date: Fri, 22 Jan 2010 23:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202847 - head/usr.bin/dc 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: Fri, 22 Jan 2010 23:50:46 -0000 Author: delphij Date: Fri Jan 22 23:50:46 2010 New Revision: 202847 URL: http://svn.freebsd.org/changeset/base/202847 Log: - Collapase short and long options together; - Use consistent marking up with bc(1)'s reference section. Reviewed by: gabor Modified: head/usr.bin/dc/dc.1 Modified: head/usr.bin/dc/dc.1 ============================================================================== --- head/usr.bin/dc/dc.1 Fri Jan 22 23:40:47 2010 (r202846) +++ head/usr.bin/dc/dc.1 Fri Jan 22 23:50:46 2010 (r202847) @@ -35,7 +35,7 @@ .\" .\" @(#)dc.1 8.1 (Berkeley) 6/6/93 .\" -.Dd Jan 28 2009 +.Dd January 22, 2010 .Dt DC 1 .Os .Sh NAME @@ -67,8 +67,7 @@ which implements functions and reasonabl structures for programs. The options are as follows: .Bl -tag -width Ds -.It Fl e Ar expr -.It Fl Fl expression Ar expr +.It Fl e Ar expr , Fl Fl expression Ar expr Evaluate .Ar expression . If multiple @@ -80,17 +79,14 @@ argument is given, execution will stop a given on the command line, otherwise processing will continue with the contents of .Ar filename . -.It Fl f Ar filename -.It Fl Fl file Ar filename +.It Fl f Ar filename , Fl Fl file Ar filename Process the content of the given file before further calculations are done. If multiple .Fl f options are specified, they will be processed in the order given. -.It Fl h -.It Fl Fl help +.It Fl h , Fl Fl help Print short usage info. -.It Fl V -.It Fl Fl version +.It Fl V , Fl Fl version Print version info. .It Fl x Enable extended register mode. @@ -513,12 +509,12 @@ operator. .El .Sh SEE ALSO .Xr bc 1 -.Rs -.%B USD:05 -.%A L. L. Cherry -.%A R. Morris -.%T "DC \- An Interactive Desk Calculator" -.Re +.Pp +.An -nosplit +.An L. L. Cherry , +.An R. Morris +"DC \- An Interactive Desk Calculator" +.Pa /usr/share/doc/usd/05.dc/ . .Sh STANDARDS The arithmetic operations of the .Nm From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:18:12 2010 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 AB256106566C; Sat, 23 Jan 2010 00:18: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 9A0298FC14; Sat, 23 Jan 2010 00:18:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0ICii036778; Sat, 23 Jan 2010 00:18:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0ICmH036771; Sat, 23 Jan 2010 00:18:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001230018.o0N0ICmH036771@svn.freebsd.org> From: Warner Losh Date: Sat, 23 Jan 2010 00:18: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: r202849 - in head/sys/mips: adm5120 alchemy atheros idt malta sentry5 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: Sat, 23 Jan 2010 00:18:12 -0000 Author: imp Date: Sat Jan 23 00:18:12 2010 New Revision: 202849 URL: http://svn.freebsd.org/changeset/base/202849 Log: Update from old DDB convetion to initialize debugger to new KDB way. Always call kdb_init(). If we have KDB enabled, then provide a handy place to break to the debugger. Modified: head/sys/mips/adm5120/adm5120_machdep.c head/sys/mips/alchemy/alchemy_machdep.c head/sys/mips/atheros/ar71xx_machdep.c head/sys/mips/idt/idt_machdep.c head/sys/mips/malta/malta_machdep.c head/sys/mips/sentry5/s5_machdep.c Modified: head/sys/mips/adm5120/adm5120_machdep.c ============================================================================== --- head/sys/mips/adm5120/adm5120_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/adm5120/adm5120_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -105,8 +105,10 @@ mips_init(void) pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/alchemy/alchemy_machdep.c ============================================================================== --- head/sys/mips/alchemy/alchemy_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/alchemy/alchemy_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -105,8 +105,11 @@ mips_init(void) pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB + kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/atheros/ar71xx_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -256,7 +256,9 @@ platform_start(__register_t a0 __unused, (32 << USB_CTRL_FLADJ_HOST_SHIFT) | (3 << USB_CTRL_FLADJ_A5_SHIFT)); DELAY(1000); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/idt/idt_machdep.c ============================================================================== --- head/sys/mips/idt/idt_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/idt/idt_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -191,7 +191,9 @@ platform_start(__register_t a0, __regist pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/malta/malta_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -189,8 +189,10 @@ mips_init(void) pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/sentry5/s5_machdep.c ============================================================================== --- head/sys/mips/sentry5/s5_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/sentry5/s5_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -136,8 +136,10 @@ mips_init(void) pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:24:33 2010 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 172281065731; Sat, 23 Jan 2010 00:24:33 +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 05BA38FC16; Sat, 23 Jan 2010 00:24:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0OWXn038556; Sat, 23 Jan 2010 00:24:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0OWEC038553; Sat, 23 Jan 2010 00:24:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001230024.o0N0OWEC038553@svn.freebsd.org> From: Warner Losh Date: Sat, 23 Jan 2010 00:24: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: r202850 - head/sys/mips/cavium 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: Sat, 23 Jan 2010 00:24:33 -0000 Author: imp Date: Sat Jan 23 00:24:31 2010 New Revision: 202850 URL: http://svn.freebsd.org/changeset/base/202850 Log: Migrate from old "DDB" style debugger to newer KDB style. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:18:12 2010 (r202849) +++ head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:24:31 2010 (r202850) @@ -110,7 +110,7 @@ platform_cpu_init() void platform_reset(void) { - ((void(*)(void))(long)0x9fc00000)(); /* Jump to MIPS reset vector */ + mips_generic_reset(); } @@ -757,8 +757,10 @@ platform_start(__register_t a0, __regist pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif platform_counter_freq = octeon_get_clock_rate(); mips_timer_init_params(platform_counter_freq, 1); From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:32:20 2010 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 1E8E6106566C; Sat, 23 Jan 2010 00:32:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B93A8FC16; Sat, 23 Jan 2010 00:32:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0WJZU040849; Sat, 23 Jan 2010 00:32:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0WJdF040840; Sat, 23 Jan 2010 00:32:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230032.o0N0WJdF040840@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 00:32:19 +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: r202852 - in stable/8: contrib/pf/man contrib/pf/pfctl 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: Sat, 23 Jan 2010 00:32:20 -0000 Author: delphij Date: Sat Jan 23 00:32:19 2010 New Revision: 202852 URL: http://svn.freebsd.org/changeset/base/202852 Log: MFC r200930: Adapt OpenBSD pf's "sloopy" TCP state machine which is useful for Direct Server Return mode, where not all packets would be visible to the load balancer or gateway. This commit should be reverted when we merge future pf versions. The benefit it would provide is that this version does not break any existing public interface and thus won't be a problem if we want to MFC it to earlier FreeBSD releases. Discussed with: mlaier Obtained from: OpenBSD Sponsored by: iXsystems, Inc. Modified: stable/8/contrib/pf/man/pf.conf.5 stable/8/contrib/pf/pfctl/parse.y stable/8/contrib/pf/pfctl/pf_print_state.c stable/8/contrib/pf/pfctl/pfctl_parser.c stable/8/sys/contrib/pf/net/if_pfsync.c stable/8/sys/contrib/pf/net/if_pfsync.h stable/8/sys/contrib/pf/net/pf.c stable/8/sys/contrib/pf/net/pfvar.h Directory Properties: stable/8/contrib/pf/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/contrib/pf/man/pf.conf.5 ============================================================================== --- stable/8/contrib/pf/man/pf.conf.5 Sat Jan 23 00:30:17 2010 (r202851) +++ stable/8/contrib/pf/man/pf.conf.5 Sat Jan 23 00:32:19 2010 (r202852) @@ -28,7 +28,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 30, 2006 +.Dd June 10, 2008 .Dt PF.CONF 5 .Os .Sh NAME @@ -2059,6 +2059,13 @@ Changes the timeout values used for stat For a list of all valid timeout names, see .Sx OPTIONS above. +.It Ar sloppy +Uses a sloppy TCP connection tracker that does not check sequence +numbers at all, which makes insertion and ICMP teardown attacks way +easier. +This is intended to be used in situations where one does not see all +packets of a connection, i.e. in asymmetric routing situations. +Cannot be used with modulate or synproxy state. .El .Pp Multiple options can be specified, separated by commas: @@ -2923,7 +2930,7 @@ tos = "tos" ( "lowdelay" | "t [ "0x" ] number ) state-opts = state-opt [ [ "," ] state-opts ] -state-opt = ( "max" number | "no-sync" | timeout | +state-opt = ( "max" number | "no-sync" | timeout | sloppy | "source-track" [ ( "rule" | "global" ) ] | "max-src-nodes" number | "max-src-states" number | "max-src-conn" number | Modified: stable/8/contrib/pf/pfctl/parse.y ============================================================================== --- stable/8/contrib/pf/pfctl/parse.y Sat Jan 23 00:30:17 2010 (r202851) +++ stable/8/contrib/pf/pfctl/parse.y Sat Jan 23 00:32:19 2010 (r202852) @@ -128,7 +128,7 @@ enum { PF_STATE_OPT_MAX, PF_STATE_OPT_NO PF_STATE_OPT_MAX_SRC_STATES, PF_STATE_OPT_MAX_SRC_CONN, PF_STATE_OPT_MAX_SRC_CONN_RATE, PF_STATE_OPT_MAX_SRC_NODES, PF_STATE_OPT_OVERLOAD, PF_STATE_OPT_STATELOCK, - PF_STATE_OPT_TIMEOUT }; + PF_STATE_OPT_TIMEOUT, PF_STATE_OPT_SLOPPY }; enum { PF_SRCTRACK_NONE, PF_SRCTRACK, PF_SRCTRACK_GLOBAL, PF_SRCTRACK_RULE }; @@ -423,7 +423,7 @@ typedef struct { %token QUEUE PRIORITY QLIMIT RTABLE %token LOAD RULESET_OPTIMIZATION %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE -%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH +%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY %token TAGGED TAG IFBOUND FLOATING STATEPOLICY ROUTE %token STRING %token PORTBINARY @@ -1891,6 +1891,14 @@ pfrule : action dir logquick interface statelock = 1; r.rule_flag |= o->data.statelock; break; + case PF_STATE_OPT_SLOPPY: + if (r.rule_flag & PFRULE_STATESLOPPY) { + yyerror("state sloppy option: " + "multiple definitions"); + YYERROR; + } + r.rule_flag |= PFRULE_STATESLOPPY; + break; case PF_STATE_OPT_TIMEOUT: if (o->data.timeout.number == PFTM_ADAPTIVE_START || @@ -3216,6 +3224,14 @@ state_opt_item : MAXIMUM number { $$->next = NULL; $$->tail = $$; } + | SLOPPY { + $$ = calloc(1, sizeof(struct node_state_opt)); + if ($$ == NULL) + err(1, "state_opt_item: calloc"); + $$->type = PF_STATE_OPT_SLOPPY; + $$->next = NULL; + $$->tail = $$; + } | STRING number { int i; @@ -4101,6 +4117,13 @@ filter_consistent(struct pf_rule *r, int yyerror("keep state on block rules doesn't make sense"); problems++; } + if (r->rule_flag & PFRULE_STATESLOPPY && + (r->keep_state == PF_STATE_MODULATE || + r->keep_state == PF_STATE_SYNPROXY)) { + yyerror("sloppy state matching cannot be used with " + "synproxy state or modulate state"); + problems++; + } return (-problems); } @@ -4969,6 +4992,7 @@ lookup(char *s) { "scrub", SCRUB}, { "set", SET}, { "skip", SKIP}, + { "sloppy", SLOPPY}, { "source-hash", SOURCEHASH}, { "source-track", SOURCETRACK}, { "state", STATE}, Modified: stable/8/contrib/pf/pfctl/pf_print_state.c ============================================================================== --- stable/8/contrib/pf/pfctl/pf_print_state.c Sat Jan 23 00:30:17 2010 (r202851) +++ stable/8/contrib/pf/pfctl/pf_print_state.c Sat Jan 23 00:32:19 2010 (r202852) @@ -294,6 +294,8 @@ print_state(struct pf_state *s, int opts printf(", anchor %u", s->anchor.nr); if (s->rule.nr != -1) printf(", rule %u", s->rule.nr); + if (s->state_flags & PFSTATE_SLOPPY) + printf(", sloppy"); if (s->src_node != NULL) printf(", source-track"); if (s->nat_src_node != NULL) Modified: stable/8/contrib/pf/pfctl/pfctl_parser.c ============================================================================== --- stable/8/contrib/pf/pfctl/pfctl_parser.c Sat Jan 23 00:30:17 2010 (r202851) +++ stable/8/contrib/pf/pfctl/pfctl_parser.c Sat Jan 23 00:32:19 2010 (r202852) @@ -873,6 +873,8 @@ print_rule(struct pf_rule *r, const char opts = 1; if (r->rule_flag & PFRULE_IFBOUND) opts = 1; + if (r->rule_flag & PFRULE_STATESLOPPY) + opts = 1; for (i = 0; !opts && i < PFTM_MAX; ++i) if (r->timeout[i]) opts = 1; @@ -939,6 +941,12 @@ print_rule(struct pf_rule *r, const char printf("if-bound"); opts = 0; } + if (r->rule_flag & PFRULE_STATESLOPPY) { + if (!opts) + printf(", "); + printf("sloppy"); + opts = 0; + } for (i = 0; i < PFTM_MAX; ++i) if (r->timeout[i]) { int j; Modified: stable/8/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- stable/8/sys/contrib/pf/net/if_pfsync.c Sat Jan 23 00:30:17 2010 (r202851) +++ stable/8/sys/contrib/pf/net/if_pfsync.c Sat Jan 23 00:32:19 2010 (r202852) @@ -465,7 +465,7 @@ pfsync_insert_net_state(struct pfsync_st st->direction = sp->direction; st->log = sp->log; st->timeout = sp->timeout; - st->allow_opts = sp->allow_opts; + st->state_flags = sp->state_flags; bcopy(sp->id, &st->id, sizeof(st->id)); st->creatorid = sp->creatorid; @@ -1578,7 +1578,7 @@ pfsync_pack_state(u_int8_t action, struc sp->proto = st->proto; sp->direction = st->direction; sp->log = st->log; - sp->allow_opts = st->allow_opts; + sp->state_flags = st->state_flags; sp->timeout = st->timeout; if (flags & PFSYNC_FLAG_STALE) Modified: stable/8/sys/contrib/pf/net/if_pfsync.h ============================================================================== --- stable/8/sys/contrib/pf/net/if_pfsync.h Sat Jan 23 00:30:17 2010 (r202851) +++ stable/8/sys/contrib/pf/net/if_pfsync.h Sat Jan 23 00:32:19 2010 (r202852) @@ -80,7 +80,7 @@ struct pfsync_state { u_int8_t proto; u_int8_t direction; u_int8_t log; - u_int8_t allow_opts; + u_int8_t state_flags; u_int8_t timeout; u_int8_t sync_flags; u_int8_t updates; Modified: stable/8/sys/contrib/pf/net/pf.c ============================================================================== --- stable/8/sys/contrib/pf/net/pf.c Sat Jan 23 00:30:17 2010 (r202851) +++ stable/8/sys/contrib/pf/net/pf.c Sat Jan 23 00:32:19 2010 (r202852) @@ -253,6 +253,13 @@ int pf_test_fragment(struct pf_rule * struct pfi_kif *, struct mbuf *, void *, struct pf_pdesc *, struct pf_rule **, struct pf_ruleset **); +int pf_tcp_track_full(struct pf_state_peer *, + struct pf_state_peer *, struct pf_state **, + struct pfi_kif *, struct mbuf *, int, + struct pf_pdesc *, u_short *, int *); +int pf_tcp_track_sloppy(struct pf_state_peer *, + struct pf_state_peer *, struct pf_state **, + struct pf_pdesc *, u_short *); int pf_test_state_tcp(struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -3528,7 +3535,10 @@ cleanup: s->nat_rule.ptr = nr; s->anchor.ptr = a; STATE_INC_COUNTERS(s); - s->allow_opts = r->allow_opts; + if (r->allow_opts) + s->state_flags |= PFSTATE_ALLOWOPTS; + if (r->rule_flag & PFRULE_STATESLOPPY) + s->state_flags |= PFSTATE_SLOPPY; s->log = r->log & PF_LOG_ALL; if (nr != NULL) s->log |= nr->log & PF_LOG_ALL; @@ -3925,7 +3935,10 @@ cleanup: s->nat_rule.ptr = nr; s->anchor.ptr = a; STATE_INC_COUNTERS(s); - s->allow_opts = r->allow_opts; + if (r->allow_opts) + s->state_flags |= PFSTATE_ALLOWOPTS; + if (r->rule_flag & PFRULE_STATESLOPPY) + s->state_flags |= PFSTATE_SLOPPY; s->log = r->log & PF_LOG_ALL; if (nr != NULL) s->log |= nr->log & PF_LOG_ALL; @@ -4238,7 +4251,10 @@ cleanup: s->nat_rule.ptr = nr; s->anchor.ptr = a; STATE_INC_COUNTERS(s); - s->allow_opts = r->allow_opts; + if (r->allow_opts) + s->state_flags |= PFSTATE_ALLOWOPTS; + if (r->rule_flag & PFRULE_STATESLOPPY) + s->state_flags |= PFSTATE_SLOPPY; s->log = r->log & PF_LOG_ALL; if (nr != NULL) s->log |= nr->log & PF_LOG_ALL; @@ -4525,7 +4541,10 @@ cleanup: s->nat_rule.ptr = nr; s->anchor.ptr = a; STATE_INC_COUNTERS(s); - s->allow_opts = r->allow_opts; + if (r->allow_opts) + s->state_flags |= PFSTATE_ALLOWOPTS; + if (r->rule_flag & PFRULE_STATESLOPPY) + s->state_flags |= PFSTATE_SLOPPY; s->log = r->log & PF_LOG_ALL; if (nr != NULL) s->log |= nr->log & PF_LOG_ALL; @@ -4666,165 +4685,15 @@ pf_test_fragment(struct pf_rule **rm, in } int -pf_test_state_tcp(struct pf_state **state, int direction, struct pfi_kif *kif, - struct mbuf *m, int off, void *h, struct pf_pdesc *pd, - u_short *reason) -{ - struct pf_state_cmp key; - struct tcphdr *th = pd->hdr.tcp; - u_int16_t win = ntohs(th->th_win); - u_int32_t ack, end, seq, orig_seq; - u_int8_t sws, dws; - int ackskew; - int copyback = 0; - struct pf_state_peer *src, *dst; - - key.af = pd->af; - key.proto = IPPROTO_TCP; - if (direction == PF_IN) { - PF_ACPY(&key.ext.addr, pd->src, key.af); - PF_ACPY(&key.gwy.addr, pd->dst, key.af); - key.ext.port = th->th_sport; - key.gwy.port = th->th_dport; - } else { - PF_ACPY(&key.lan.addr, pd->src, key.af); - PF_ACPY(&key.ext.addr, pd->dst, key.af); - key.lan.port = th->th_sport; - key.ext.port = th->th_dport; - } - - STATE_LOOKUP(); - - if (direction == (*state)->direction) { - src = &(*state)->src; - dst = &(*state)->dst; - } else { - src = &(*state)->dst; - dst = &(*state)->src; - } - - if ((*state)->src.state == PF_TCPS_PROXY_SRC) { - if (direction != (*state)->direction) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_SYNPROXY_DROP); - } - if (th->th_flags & TH_SYN) { - if (ntohl(th->th_seq) != (*state)->src.seqlo) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_DROP); - } -#ifdef __FreeBSD__ - pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, -#else - pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, -#endif - pd->src, th->th_dport, th->th_sport, - (*state)->src.seqhi, ntohl(th->th_seq) + 1, - TH_SYN|TH_ACK, 0, (*state)->src.mss, 0, 1, - 0, NULL, NULL); - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_SYNPROXY_DROP); - } else if (!(th->th_flags & TH_ACK) || - (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || - (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_DROP); - } else if ((*state)->src_node != NULL && - pf_src_connlimit(state)) { - REASON_SET(reason, PFRES_SRCLIMIT); - return (PF_DROP); - } else - (*state)->src.state = PF_TCPS_PROXY_DST; - } - if ((*state)->src.state == PF_TCPS_PROXY_DST) { - struct pf_state_host *src, *dst; - - if (direction == PF_OUT) { - src = &(*state)->gwy; - dst = &(*state)->ext; - } else { - src = &(*state)->ext; - dst = &(*state)->lan; - } - if (direction == (*state)->direction) { - if (((th->th_flags & (TH_SYN|TH_ACK)) != TH_ACK) || - (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || - (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_DROP); - } - (*state)->src.max_win = MAX(ntohs(th->th_win), 1); - if ((*state)->dst.seqhi == 1) - (*state)->dst.seqhi = htonl(arc4random()); -#ifdef __FreeBSD__ - pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, - &src->addr, -#else - pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, -#endif - &dst->addr, src->port, dst->port, - (*state)->dst.seqhi, 0, TH_SYN, 0, - (*state)->src.mss, 0, 0, (*state)->tag, NULL, NULL); - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_SYNPROXY_DROP); - } else if (((th->th_flags & (TH_SYN|TH_ACK)) != - (TH_SYN|TH_ACK)) || - (ntohl(th->th_ack) != (*state)->dst.seqhi + 1)) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_DROP); - } else { - (*state)->dst.max_win = MAX(ntohs(th->th_win), 1); - (*state)->dst.seqlo = ntohl(th->th_seq); -#ifdef __FreeBSD__ - pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, -#else - pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, -#endif - pd->src, th->th_dport, th->th_sport, - ntohl(th->th_ack), ntohl(th->th_seq) + 1, - TH_ACK, (*state)->src.max_win, 0, 0, 0, - (*state)->tag, NULL, NULL); -#ifdef __FreeBSD__ - pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, - &src->addr, -#else - pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, -#endif - &dst->addr, src->port, dst->port, - (*state)->src.seqhi + 1, (*state)->src.seqlo + 1, - TH_ACK, (*state)->dst.max_win, 0, 0, 1, - 0, NULL, NULL); - (*state)->src.seqdiff = (*state)->dst.seqhi - - (*state)->src.seqlo; - (*state)->dst.seqdiff = (*state)->src.seqhi - - (*state)->dst.seqlo; - (*state)->src.seqhi = (*state)->src.seqlo + - (*state)->dst.max_win; - (*state)->dst.seqhi = (*state)->dst.seqlo + - (*state)->src.max_win; - (*state)->src.wscale = (*state)->dst.wscale = 0; - (*state)->src.state = (*state)->dst.state = - TCPS_ESTABLISHED; - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_SYNPROXY_DROP); - } - } - - if (((th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN) && - dst->state >= TCPS_FIN_WAIT_2 && - src->state >= TCPS_FIN_WAIT_2) { - if (pf_status.debug >= PF_DEBUG_MISC) { - printf("pf: state reuse "); - pf_print_state(*state); - pf_print_flags(th->th_flags); - printf("\n"); - } - /* XXX make sure it's the same direction ?? */ - (*state)->src.state = (*state)->dst.state = TCPS_CLOSED; - pf_unlink_state(*state); - *state = NULL; - return (PF_DROP); - } +pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, + struct pf_state **state, struct pfi_kif *kif, struct mbuf *m, int off, + struct pf_pdesc *pd, u_short *reason, int *copyback) +{ + struct tcphdr *th = pd->hdr.tcp; + u_int16_t win = ntohs(th->th_win); + u_int32_t ack, end, seq, orig_seq; + u_int8_t sws, dws; + int ackskew; if (src->wscale && dst->wscale && !(th->th_flags & TH_SYN)) { sws = src->wscale & PF_WSCALE_MASK; @@ -4863,7 +4732,7 @@ pf_test_state_tcp(struct pf_state **stat pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + src->seqdiff), 0); pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); - copyback = 1; + *copyback = 1; } else { ack = ntohl(th->th_ack); } @@ -4915,7 +4784,7 @@ pf_test_state_tcp(struct pf_state **stat pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + src->seqdiff), 0); pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); - copyback = 1; + *copyback = 1; } end = seq + pd->p_len; if (th->th_flags & TH_SYN) @@ -4961,7 +4830,7 @@ pf_test_state_tcp(struct pf_state **stat */ if (dst->seqdiff && (th->th_off << 2) > sizeof(struct tcphdr)) { if (pf_modulate_sack(m, off, pd, th, dst)) - copyback = 1; + *copyback = 1; } @@ -4980,7 +4849,7 @@ pf_test_state_tcp(struct pf_state **stat if (dst->scrub || src->scrub) { if (pf_normalize_tcp_stateful(m, off, pd, reason, th, - *state, src, dst, ©back)) + *state, src, dst, copyback)) return (PF_DROP); } @@ -5082,7 +4951,7 @@ pf_test_state_tcp(struct pf_state **stat if (dst->scrub || src->scrub) { if (pf_normalize_tcp_stateful(m, off, pd, reason, th, - *state, src, dst, ©back)) + *state, src, dst, copyback)) return (PF_DROP); } @@ -5132,7 +5001,11 @@ pf_test_state_tcp(struct pf_state **stat pf_print_state(*state); pf_print_flags(th->th_flags); printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " +#ifdef notyet "pkts=%llu:%llu dir=%s,%s\n", +#else + "pkts=%llu:%llu%s\n", +#endif seq, orig_seq, ack, pd->p_len, ackskew, #ifdef __FreeBSD__ (unsigned long long)(*state)->packets[0], @@ -5140,8 +5013,12 @@ pf_test_state_tcp(struct pf_state **stat #else (*state)->packets[0], (*state)->packets[1], #endif +#ifdef notyet direction == PF_IN ? "in" : "out", direction == (*state)->direction ? "fwd" : "rev"); +#else + ""); +#endif printf("pf: State failure on: %c %c %c %c | %c %c\n", SEQ_GEQ(src->seqhi, end) ? ' ' : '1', SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws)) ? @@ -5156,6 +5033,246 @@ pf_test_state_tcp(struct pf_state **stat } /* Any packets which have gotten here are to be passed */ + return (PF_PASS); +} + +int +pf_tcp_track_sloppy(struct pf_state_peer *src, struct pf_state_peer *dst, + struct pf_state **state, struct pf_pdesc *pd, u_short *reason) +{ + struct tcphdr *th = pd->hdr.tcp; + + if (th->th_flags & TH_SYN) + if (src->state < TCPS_SYN_SENT) + src->state = TCPS_SYN_SENT; + if (th->th_flags & TH_FIN) + if (src->state < TCPS_CLOSING) + src->state = TCPS_CLOSING; + if (th->th_flags & TH_ACK) { + if (dst->state == TCPS_SYN_SENT) { + dst->state = TCPS_ESTABLISHED; + if (src->state == TCPS_ESTABLISHED && + (*state)->src_node != NULL && + pf_src_connlimit(state)) { + REASON_SET(reason, PFRES_SRCLIMIT); + return (PF_DROP); + } + } else if (dst->state == TCPS_CLOSING) { + dst->state = TCPS_FIN_WAIT_2; + } else if (src->state == TCPS_SYN_SENT && + dst->state < TCPS_SYN_SENT) { + /* + * Handle a special sloppy case where we only see one + * half of the connection. If there is a ACK after + * the initial SYN without ever seeing a packet from + * the destination, set the connection to established. + */ + dst->state = src->state = TCPS_ESTABLISHED; + if ((*state)->src_node != NULL && + pf_src_connlimit(state)) { + REASON_SET(reason, PFRES_SRCLIMIT); + return (PF_DROP); + } + } else if (src->state == TCPS_CLOSING && + dst->state == TCPS_ESTABLISHED && + dst->seqlo == 0) { + /* + * Handle the closing of half connections where we + * don't see the full bidirectional FIN/ACK+ACK + * handshake. + */ + dst->state = TCPS_CLOSING; + } + } + if (th->th_flags & TH_RST) + src->state = dst->state = TCPS_TIME_WAIT; + + /* update expire time */ + (*state)->expire = time_second; + if (src->state >= TCPS_FIN_WAIT_2 && + dst->state >= TCPS_FIN_WAIT_2) + (*state)->timeout = PFTM_TCP_CLOSED; + else if (src->state >= TCPS_CLOSING && + dst->state >= TCPS_CLOSING) + (*state)->timeout = PFTM_TCP_FIN_WAIT; + else if (src->state < TCPS_ESTABLISHED || + dst->state < TCPS_ESTABLISHED) + (*state)->timeout = PFTM_TCP_OPENING; + else if (src->state >= TCPS_CLOSING || + dst->state >= TCPS_CLOSING) + (*state)->timeout = PFTM_TCP_CLOSING; + else + (*state)->timeout = PFTM_TCP_ESTABLISHED; + + return (PF_PASS); +} + + +int +pf_test_state_tcp(struct pf_state **state, int direction, struct pfi_kif *kif, + struct mbuf *m, int off, void *h, struct pf_pdesc *pd, + u_short *reason) +{ + struct pf_state_cmp key; + struct tcphdr *th = pd->hdr.tcp; + int copyback = 0; + struct pf_state_peer *src, *dst; + + key.af = pd->af; + key.proto = IPPROTO_TCP; + if (direction == PF_IN) { + PF_ACPY(&key.ext.addr, pd->src, key.af); + PF_ACPY(&key.gwy.addr, pd->dst, key.af); + key.ext.port = th->th_sport; + key.gwy.port = th->th_dport; + } else { + PF_ACPY(&key.lan.addr, pd->src, key.af); + PF_ACPY(&key.ext.addr, pd->dst, key.af); + key.lan.port = th->th_sport; + key.ext.port = th->th_dport; + } + + STATE_LOOKUP(); + + if (direction == (*state)->direction) { + src = &(*state)->src; + dst = &(*state)->dst; + } else { + src = &(*state)->dst; + dst = &(*state)->src; + } + + if ((*state)->src.state == PF_TCPS_PROXY_SRC) { + if (direction != (*state)->direction) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_SYNPROXY_DROP); + } + if (th->th_flags & TH_SYN) { + if (ntohl(th->th_seq) != (*state)->src.seqlo) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_DROP); + } +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, +#else + pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, +#endif + pd->src, th->th_dport, th->th_sport, + (*state)->src.seqhi, ntohl(th->th_seq) + 1, + TH_SYN|TH_ACK, 0, (*state)->src.mss, 0, 1, + 0, NULL, NULL); + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_SYNPROXY_DROP); + } else if (!(th->th_flags & TH_ACK) || + (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || + (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_DROP); + } else if ((*state)->src_node != NULL && + pf_src_connlimit(state)) { + REASON_SET(reason, PFRES_SRCLIMIT); + return (PF_DROP); + } else + (*state)->src.state = PF_TCPS_PROXY_DST; + } + if ((*state)->src.state == PF_TCPS_PROXY_DST) { + struct pf_state_host *src, *dst; + + if (direction == PF_OUT) { + src = &(*state)->gwy; + dst = &(*state)->ext; + } else { + src = &(*state)->ext; + dst = &(*state)->lan; + } + if (direction == (*state)->direction) { + if (((th->th_flags & (TH_SYN|TH_ACK)) != TH_ACK) || + (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || + (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_DROP); + } + (*state)->src.max_win = MAX(ntohs(th->th_win), 1); + if ((*state)->dst.seqhi == 1) + (*state)->dst.seqhi = htonl(arc4random()); +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, + &src->addr, +#else + pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, +#endif + &dst->addr, src->port, dst->port, + (*state)->dst.seqhi, 0, TH_SYN, 0, + (*state)->src.mss, 0, 0, (*state)->tag, NULL, NULL); + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_SYNPROXY_DROP); + } else if (((th->th_flags & (TH_SYN|TH_ACK)) != + (TH_SYN|TH_ACK)) || + (ntohl(th->th_ack) != (*state)->dst.seqhi + 1)) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_DROP); + } else { + (*state)->dst.max_win = MAX(ntohs(th->th_win), 1); + (*state)->dst.seqlo = ntohl(th->th_seq); +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, +#else + pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, +#endif + pd->src, th->th_dport, th->th_sport, + ntohl(th->th_ack), ntohl(th->th_seq) + 1, + TH_ACK, (*state)->src.max_win, 0, 0, 0, + (*state)->tag, NULL, NULL); +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, + &src->addr, +#else + pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, +#endif + &dst->addr, src->port, dst->port, + (*state)->src.seqhi + 1, (*state)->src.seqlo + 1, + TH_ACK, (*state)->dst.max_win, 0, 0, 1, + 0, NULL, NULL); + (*state)->src.seqdiff = (*state)->dst.seqhi - + (*state)->src.seqlo; + (*state)->dst.seqdiff = (*state)->src.seqhi - + (*state)->dst.seqlo; + (*state)->src.seqhi = (*state)->src.seqlo + + (*state)->dst.max_win; + (*state)->dst.seqhi = (*state)->dst.seqlo + + (*state)->src.max_win; + (*state)->src.wscale = (*state)->dst.wscale = 0; + (*state)->src.state = (*state)->dst.state = + TCPS_ESTABLISHED; + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_SYNPROXY_DROP); + } + } + + if (((th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN) && + dst->state >= TCPS_FIN_WAIT_2 && + src->state >= TCPS_FIN_WAIT_2) { + if (pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: state reuse "); + pf_print_state(*state); + pf_print_flags(th->th_flags); + printf("\n"); + } + /* XXX make sure it's the same direction ?? */ + (*state)->src.state = (*state)->dst.state = TCPS_CLOSED; + pf_unlink_state(*state); + *state = NULL; + return (PF_DROP); + } + + if ((*state)->state_flags & PFSTATE_SLOPPY) { + if (pf_tcp_track_sloppy(src, dst, state, pd, reason) == PF_DROP) + return (PF_DROP); + } else { + if (pf_tcp_track_full(src, dst, state, kif, m, off, pd, reason, + ©back) == PF_DROP) + return (PF_DROP); + } /* translate source/destination address, if necessary */ if (STATE_TRANSLATE(*state)) { @@ -5533,8 +5650,9 @@ pf_test_state_icmp(struct pf_state **sta copyback = 1; } - if (!SEQ_GEQ(src->seqhi, seq) || - !SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws))) { + if (!((*state)->state_flags & PFSTATE_SLOPPY) && + (!SEQ_GEQ(src->seqhi, seq) || + !SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws)))) { if (pf_status.debug >= PF_DEBUG_MISC) { printf("pf: BAD ICMP %d:%d ", icmptype, pd->hdr.icmp->icmp_code); @@ -7052,7 +7170,7 @@ pf_test(int dir, struct ifnet *ifp, stru done: if (action == PF_PASS && h->ip_hl > 5 && - !((s && s->allow_opts) || r->allow_opts)) { + !((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) { action = PF_DROP; REASON_SET(&reason, PFRES_IPOPTIONS); log = 1; @@ -7513,7 +7631,7 @@ pf_test6(int dir, struct ifnet *ifp, str done: /* handle dangerous IPv6 extension headers. */ if (action == PF_PASS && rh_cnt && - !((s && s->allow_opts) || r->allow_opts)) { + !((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) { action = PF_DROP; REASON_SET(&reason, PFRES_IPOPTIONS); log = 1; Modified: stable/8/sys/contrib/pf/net/pfvar.h ============================================================================== --- stable/8/sys/contrib/pf/net/pfvar.h Sat Jan 23 00:30:17 2010 (r202851) +++ stable/8/sys/contrib/pf/net/pfvar.h Sat Jan 23 00:32:19 2010 (r202852) @@ -700,6 +700,7 @@ struct pf_rule { /* rule flags again */ #define PFRULE_IFBOUND 0x00010000 /* if-bound */ +#define PFRULE_STATESLOPPY 0x00020000 /* sloppy state tracking */ #define PFSTATE_HIWAT 10000 /* default state table size */ #define PFSTATE_ADAPT_START 6000 /* default adaptive timeout start */ @@ -800,7 +801,9 @@ struct pf_state { u_int8_t pad; #endif u_int8_t log; - u_int8_t allow_opts; + u_int8_t state_flags; +#define PFSTATE_ALLOWOPTS 0x01 +#define PFSTATE_SLOPPY 0x02 u_int8_t timeout; u_int8_t sync_flags; #define PFSTATE_NOSYNC 0x01 From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:41:05 2010 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 2CB501065679; Sat, 23 Jan 2010 00:41:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19E3C8FC18; Sat, 23 Jan 2010 00:41:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0f4L7042844; Sat, 23 Jan 2010 00:41:04 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0f4w3042835; Sat, 23 Jan 2010 00:41:04 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230041.o0N0f4w3042835@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 00:41:04 +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: r202853 - in stable/7: contrib/pf/man contrib/pf/pfctl 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: Sat, 23 Jan 2010 00:41:05 -0000 Author: delphij Date: Sat Jan 23 00:41:04 2010 New Revision: 202853 URL: http://svn.freebsd.org/changeset/base/202853 Log: MFC r200930: Adapt OpenBSD pf's "sloopy" TCP state machine which is useful for Direct Server Return mode, where not all packets would be visible to the load balancer or gateway. This commit should be reverted when we merge future pf versions. The benefit it would provide is that this version does not break any existing public interface and thus won't be a problem if we want to MFC it to earlier FreeBSD releases. Discussed with: mlaier Obtained from: OpenBSD Sponsored by: iXsystems, Inc. Modified: stable/7/contrib/pf/man/pf.conf.5 stable/7/contrib/pf/pfctl/parse.y stable/7/contrib/pf/pfctl/pf_print_state.c stable/7/contrib/pf/pfctl/pfctl_parser.c stable/7/sys/contrib/pf/net/if_pfsync.c stable/7/sys/contrib/pf/net/if_pfsync.h stable/7/sys/contrib/pf/net/pf.c stable/7/sys/contrib/pf/net/pfvar.h Directory Properties: stable/7/contrib/pf/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/contrib/pf/man/pf.conf.5 ============================================================================== --- stable/7/contrib/pf/man/pf.conf.5 Sat Jan 23 00:32:19 2010 (r202852) +++ stable/7/contrib/pf/man/pf.conf.5 Sat Jan 23 00:41:04 2010 (r202853) @@ -28,7 +28,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 30, 2006 +.Dd June 10, 2008 .Dt PF.CONF 5 .Os .Sh NAME @@ -2059,6 +2059,13 @@ Changes the timeout values used for stat For a list of all valid timeout names, see .Sx OPTIONS above. +.It Ar sloppy +Uses a sloppy TCP connection tracker that does not check sequence +numbers at all, which makes insertion and ICMP teardown attacks way +easier. +This is intended to be used in situations where one does not see all +packets of a connection, i.e. in asymmetric routing situations. +Cannot be used with modulate or synproxy state. .El .Pp Multiple options can be specified, separated by commas: @@ -2923,7 +2930,7 @@ tos = "tos" ( "lowdelay" | "t [ "0x" ] number ) state-opts = state-opt [ [ "," ] state-opts ] -state-opt = ( "max" number | "no-sync" | timeout | +state-opt = ( "max" number | "no-sync" | timeout | sloppy | "source-track" [ ( "rule" | "global" ) ] | "max-src-nodes" number | "max-src-states" number | "max-src-conn" number | Modified: stable/7/contrib/pf/pfctl/parse.y ============================================================================== --- stable/7/contrib/pf/pfctl/parse.y Sat Jan 23 00:32:19 2010 (r202852) +++ stable/7/contrib/pf/pfctl/parse.y Sat Jan 23 00:41:04 2010 (r202853) @@ -128,7 +128,7 @@ enum { PF_STATE_OPT_MAX, PF_STATE_OPT_NO PF_STATE_OPT_MAX_SRC_STATES, PF_STATE_OPT_MAX_SRC_CONN, PF_STATE_OPT_MAX_SRC_CONN_RATE, PF_STATE_OPT_MAX_SRC_NODES, PF_STATE_OPT_OVERLOAD, PF_STATE_OPT_STATELOCK, - PF_STATE_OPT_TIMEOUT }; + PF_STATE_OPT_TIMEOUT, PF_STATE_OPT_SLOPPY }; enum { PF_SRCTRACK_NONE, PF_SRCTRACK, PF_SRCTRACK_GLOBAL, PF_SRCTRACK_RULE }; @@ -423,7 +423,7 @@ typedef struct { %token QUEUE PRIORITY QLIMIT RTABLE %token LOAD RULESET_OPTIMIZATION %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE -%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH +%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY %token TAGGED TAG IFBOUND FLOATING STATEPOLICY ROUTE %token STRING %token PORTBINARY @@ -1891,6 +1891,14 @@ pfrule : action dir logquick interface statelock = 1; r.rule_flag |= o->data.statelock; break; + case PF_STATE_OPT_SLOPPY: + if (r.rule_flag & PFRULE_STATESLOPPY) { + yyerror("state sloppy option: " + "multiple definitions"); + YYERROR; + } + r.rule_flag |= PFRULE_STATESLOPPY; + break; case PF_STATE_OPT_TIMEOUT: if (o->data.timeout.number == PFTM_ADAPTIVE_START || @@ -3216,6 +3224,14 @@ state_opt_item : MAXIMUM number { $$->next = NULL; $$->tail = $$; } + | SLOPPY { + $$ = calloc(1, sizeof(struct node_state_opt)); + if ($$ == NULL) + err(1, "state_opt_item: calloc"); + $$->type = PF_STATE_OPT_SLOPPY; + $$->next = NULL; + $$->tail = $$; + } | STRING number { int i; @@ -4101,6 +4117,13 @@ filter_consistent(struct pf_rule *r, int yyerror("keep state on block rules doesn't make sense"); problems++; } + if (r->rule_flag & PFRULE_STATESLOPPY && + (r->keep_state == PF_STATE_MODULATE || + r->keep_state == PF_STATE_SYNPROXY)) { + yyerror("sloppy state matching cannot be used with " + "synproxy state or modulate state"); + problems++; + } return (-problems); } @@ -4969,6 +4992,7 @@ lookup(char *s) { "scrub", SCRUB}, { "set", SET}, { "skip", SKIP}, + { "sloppy", SLOPPY}, { "source-hash", SOURCEHASH}, { "source-track", SOURCETRACK}, { "state", STATE}, Modified: stable/7/contrib/pf/pfctl/pf_print_state.c ============================================================================== --- stable/7/contrib/pf/pfctl/pf_print_state.c Sat Jan 23 00:32:19 2010 (r202852) +++ stable/7/contrib/pf/pfctl/pf_print_state.c Sat Jan 23 00:41:04 2010 (r202853) @@ -294,6 +294,8 @@ print_state(struct pf_state *s, int opts printf(", anchor %u", s->anchor.nr); if (s->rule.nr != -1) printf(", rule %u", s->rule.nr); + if (s->state_flags & PFSTATE_SLOPPY) + printf(", sloppy"); if (s->src_node != NULL) printf(", source-track"); if (s->nat_src_node != NULL) Modified: stable/7/contrib/pf/pfctl/pfctl_parser.c ============================================================================== --- stable/7/contrib/pf/pfctl/pfctl_parser.c Sat Jan 23 00:32:19 2010 (r202852) +++ stable/7/contrib/pf/pfctl/pfctl_parser.c Sat Jan 23 00:41:04 2010 (r202853) @@ -873,6 +873,8 @@ print_rule(struct pf_rule *r, const char opts = 1; if (r->rule_flag & PFRULE_IFBOUND) opts = 1; + if (r->rule_flag & PFRULE_STATESLOPPY) + opts = 1; for (i = 0; !opts && i < PFTM_MAX; ++i) if (r->timeout[i]) opts = 1; @@ -939,6 +941,12 @@ print_rule(struct pf_rule *r, const char printf("if-bound"); opts = 0; } + if (r->rule_flag & PFRULE_STATESLOPPY) { + if (!opts) + printf(", "); + printf("sloppy"); + opts = 0; + } for (i = 0; i < PFTM_MAX; ++i) if (r->timeout[i]) { int j; Modified: stable/7/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- stable/7/sys/contrib/pf/net/if_pfsync.c Sat Jan 23 00:32:19 2010 (r202852) +++ stable/7/sys/contrib/pf/net/if_pfsync.c Sat Jan 23 00:41:04 2010 (r202853) @@ -465,7 +465,7 @@ pfsync_insert_net_state(struct pfsync_st st->direction = sp->direction; st->log = sp->log; st->timeout = sp->timeout; - st->allow_opts = sp->allow_opts; + st->state_flags = sp->state_flags; bcopy(sp->id, &st->id, sizeof(st->id)); st->creatorid = sp->creatorid; @@ -1578,7 +1578,7 @@ pfsync_pack_state(u_int8_t action, struc sp->proto = st->proto; sp->direction = st->direction; sp->log = st->log; - sp->allow_opts = st->allow_opts; + sp->state_flags = st->state_flags; sp->timeout = st->timeout; if (flags & PFSYNC_FLAG_STALE) Modified: stable/7/sys/contrib/pf/net/if_pfsync.h ============================================================================== --- stable/7/sys/contrib/pf/net/if_pfsync.h Sat Jan 23 00:32:19 2010 (r202852) +++ stable/7/sys/contrib/pf/net/if_pfsync.h Sat Jan 23 00:41:04 2010 (r202853) @@ -80,7 +80,7 @@ struct pfsync_state { u_int8_t proto; u_int8_t direction; u_int8_t log; - u_int8_t allow_opts; + u_int8_t state_flags; u_int8_t timeout; u_int8_t sync_flags; u_int8_t updates; Modified: stable/7/sys/contrib/pf/net/pf.c ============================================================================== --- stable/7/sys/contrib/pf/net/pf.c Sat Jan 23 00:32:19 2010 (r202852) +++ stable/7/sys/contrib/pf/net/pf.c Sat Jan 23 00:41:04 2010 (r202853) @@ -254,6 +254,13 @@ int pf_test_fragment(struct pf_rule * struct pfi_kif *, struct mbuf *, void *, struct pf_pdesc *, struct pf_rule **, struct pf_ruleset **); +int pf_tcp_track_full(struct pf_state_peer *, + struct pf_state_peer *, struct pf_state **, + struct pfi_kif *, struct mbuf *, int, + struct pf_pdesc *, u_short *, int *); +int pf_tcp_track_sloppy(struct pf_state_peer *, + struct pf_state_peer *, struct pf_state **, + struct pf_pdesc *, u_short *); int pf_test_state_tcp(struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -3529,7 +3536,10 @@ cleanup: s->nat_rule.ptr = nr; s->anchor.ptr = a; STATE_INC_COUNTERS(s); - s->allow_opts = r->allow_opts; + if (r->allow_opts) + s->state_flags |= PFSTATE_ALLOWOPTS; + if (r->rule_flag & PFRULE_STATESLOPPY) + s->state_flags |= PFSTATE_SLOPPY; s->log = r->log & PF_LOG_ALL; if (nr != NULL) s->log |= nr->log & PF_LOG_ALL; @@ -3926,7 +3936,10 @@ cleanup: s->nat_rule.ptr = nr; s->anchor.ptr = a; STATE_INC_COUNTERS(s); - s->allow_opts = r->allow_opts; + if (r->allow_opts) + s->state_flags |= PFSTATE_ALLOWOPTS; + if (r->rule_flag & PFRULE_STATESLOPPY) + s->state_flags |= PFSTATE_SLOPPY; s->log = r->log & PF_LOG_ALL; if (nr != NULL) s->log |= nr->log & PF_LOG_ALL; @@ -4239,7 +4252,10 @@ cleanup: s->nat_rule.ptr = nr; s->anchor.ptr = a; STATE_INC_COUNTERS(s); - s->allow_opts = r->allow_opts; + if (r->allow_opts) + s->state_flags |= PFSTATE_ALLOWOPTS; + if (r->rule_flag & PFRULE_STATESLOPPY) + s->state_flags |= PFSTATE_SLOPPY; s->log = r->log & PF_LOG_ALL; if (nr != NULL) s->log |= nr->log & PF_LOG_ALL; @@ -4526,7 +4542,10 @@ cleanup: s->nat_rule.ptr = nr; s->anchor.ptr = a; STATE_INC_COUNTERS(s); - s->allow_opts = r->allow_opts; + if (r->allow_opts) + s->state_flags |= PFSTATE_ALLOWOPTS; + if (r->rule_flag & PFRULE_STATESLOPPY) + s->state_flags |= PFSTATE_SLOPPY; s->log = r->log & PF_LOG_ALL; if (nr != NULL) s->log |= nr->log & PF_LOG_ALL; @@ -4667,165 +4686,15 @@ pf_test_fragment(struct pf_rule **rm, in } int -pf_test_state_tcp(struct pf_state **state, int direction, struct pfi_kif *kif, - struct mbuf *m, int off, void *h, struct pf_pdesc *pd, - u_short *reason) -{ - struct pf_state_cmp key; - struct tcphdr *th = pd->hdr.tcp; - u_int16_t win = ntohs(th->th_win); - u_int32_t ack, end, seq, orig_seq; - u_int8_t sws, dws; - int ackskew; - int copyback = 0; - struct pf_state_peer *src, *dst; - - key.af = pd->af; - key.proto = IPPROTO_TCP; - if (direction == PF_IN) { - PF_ACPY(&key.ext.addr, pd->src, key.af); - PF_ACPY(&key.gwy.addr, pd->dst, key.af); - key.ext.port = th->th_sport; - key.gwy.port = th->th_dport; - } else { - PF_ACPY(&key.lan.addr, pd->src, key.af); - PF_ACPY(&key.ext.addr, pd->dst, key.af); - key.lan.port = th->th_sport; - key.ext.port = th->th_dport; - } - - STATE_LOOKUP(); - - if (direction == (*state)->direction) { - src = &(*state)->src; - dst = &(*state)->dst; - } else { - src = &(*state)->dst; - dst = &(*state)->src; - } - - if ((*state)->src.state == PF_TCPS_PROXY_SRC) { - if (direction != (*state)->direction) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_SYNPROXY_DROP); - } - if (th->th_flags & TH_SYN) { - if (ntohl(th->th_seq) != (*state)->src.seqlo) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_DROP); - } -#ifdef __FreeBSD__ - pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, -#else - pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, -#endif - pd->src, th->th_dport, th->th_sport, - (*state)->src.seqhi, ntohl(th->th_seq) + 1, - TH_SYN|TH_ACK, 0, (*state)->src.mss, 0, 1, - 0, NULL, NULL); - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_SYNPROXY_DROP); - } else if (!(th->th_flags & TH_ACK) || - (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || - (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_DROP); - } else if ((*state)->src_node != NULL && - pf_src_connlimit(state)) { - REASON_SET(reason, PFRES_SRCLIMIT); - return (PF_DROP); - } else - (*state)->src.state = PF_TCPS_PROXY_DST; - } - if ((*state)->src.state == PF_TCPS_PROXY_DST) { - struct pf_state_host *src, *dst; - - if (direction == PF_OUT) { - src = &(*state)->gwy; - dst = &(*state)->ext; - } else { - src = &(*state)->ext; - dst = &(*state)->lan; - } - if (direction == (*state)->direction) { - if (((th->th_flags & (TH_SYN|TH_ACK)) != TH_ACK) || - (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || - (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_DROP); - } - (*state)->src.max_win = MAX(ntohs(th->th_win), 1); - if ((*state)->dst.seqhi == 1) - (*state)->dst.seqhi = htonl(arc4random()); -#ifdef __FreeBSD__ - pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, - &src->addr, -#else - pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, -#endif - &dst->addr, src->port, dst->port, - (*state)->dst.seqhi, 0, TH_SYN, 0, - (*state)->src.mss, 0, 0, (*state)->tag, NULL, NULL); - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_SYNPROXY_DROP); - } else if (((th->th_flags & (TH_SYN|TH_ACK)) != - (TH_SYN|TH_ACK)) || - (ntohl(th->th_ack) != (*state)->dst.seqhi + 1)) { - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_DROP); - } else { - (*state)->dst.max_win = MAX(ntohs(th->th_win), 1); - (*state)->dst.seqlo = ntohl(th->th_seq); -#ifdef __FreeBSD__ - pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, -#else - pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, -#endif - pd->src, th->th_dport, th->th_sport, - ntohl(th->th_ack), ntohl(th->th_seq) + 1, - TH_ACK, (*state)->src.max_win, 0, 0, 0, - (*state)->tag, NULL, NULL); -#ifdef __FreeBSD__ - pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, - &src->addr, -#else - pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, -#endif - &dst->addr, src->port, dst->port, - (*state)->src.seqhi + 1, (*state)->src.seqlo + 1, - TH_ACK, (*state)->dst.max_win, 0, 0, 1, - 0, NULL, NULL); - (*state)->src.seqdiff = (*state)->dst.seqhi - - (*state)->src.seqlo; - (*state)->dst.seqdiff = (*state)->src.seqhi - - (*state)->dst.seqlo; - (*state)->src.seqhi = (*state)->src.seqlo + - (*state)->dst.max_win; - (*state)->dst.seqhi = (*state)->dst.seqlo + - (*state)->src.max_win; - (*state)->src.wscale = (*state)->dst.wscale = 0; - (*state)->src.state = (*state)->dst.state = - TCPS_ESTABLISHED; - REASON_SET(reason, PFRES_SYNPROXY); - return (PF_SYNPROXY_DROP); - } - } - - if (((th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN) && - dst->state >= TCPS_FIN_WAIT_2 && - src->state >= TCPS_FIN_WAIT_2) { - if (pf_status.debug >= PF_DEBUG_MISC) { - printf("pf: state reuse "); - pf_print_state(*state); - pf_print_flags(th->th_flags); - printf("\n"); - } - /* XXX make sure it's the same direction ?? */ - (*state)->src.state = (*state)->dst.state = TCPS_CLOSED; - pf_unlink_state(*state); - *state = NULL; - return (PF_DROP); - } +pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, + struct pf_state **state, struct pfi_kif *kif, struct mbuf *m, int off, + struct pf_pdesc *pd, u_short *reason, int *copyback) +{ + struct tcphdr *th = pd->hdr.tcp; + u_int16_t win = ntohs(th->th_win); + u_int32_t ack, end, seq, orig_seq; + u_int8_t sws, dws; + int ackskew; if (src->wscale && dst->wscale && !(th->th_flags & TH_SYN)) { sws = src->wscale & PF_WSCALE_MASK; @@ -4864,7 +4733,7 @@ pf_test_state_tcp(struct pf_state **stat pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + src->seqdiff), 0); pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); - copyback = 1; + *copyback = 1; } else { ack = ntohl(th->th_ack); } @@ -4916,7 +4785,7 @@ pf_test_state_tcp(struct pf_state **stat pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + src->seqdiff), 0); pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); - copyback = 1; + *copyback = 1; } end = seq + pd->p_len; if (th->th_flags & TH_SYN) @@ -4962,7 +4831,7 @@ pf_test_state_tcp(struct pf_state **stat */ if (dst->seqdiff && (th->th_off << 2) > sizeof(struct tcphdr)) { if (pf_modulate_sack(m, off, pd, th, dst)) - copyback = 1; + *copyback = 1; } @@ -4981,7 +4850,7 @@ pf_test_state_tcp(struct pf_state **stat if (dst->scrub || src->scrub) { if (pf_normalize_tcp_stateful(m, off, pd, reason, th, - *state, src, dst, ©back)) + *state, src, dst, copyback)) return (PF_DROP); } @@ -5083,7 +4952,7 @@ pf_test_state_tcp(struct pf_state **stat if (dst->scrub || src->scrub) { if (pf_normalize_tcp_stateful(m, off, pd, reason, th, - *state, src, dst, ©back)) + *state, src, dst, copyback)) return (PF_DROP); } @@ -5133,7 +5002,11 @@ pf_test_state_tcp(struct pf_state **stat pf_print_state(*state); pf_print_flags(th->th_flags); printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " +#ifdef notyet "pkts=%llu:%llu dir=%s,%s\n", +#else + "pkts=%llu:%llu%s\n", +#endif seq, orig_seq, ack, pd->p_len, ackskew, #ifdef __FreeBSD__ (unsigned long long)(*state)->packets[0], @@ -5141,8 +5014,12 @@ pf_test_state_tcp(struct pf_state **stat #else (*state)->packets[0], (*state)->packets[1], #endif +#ifdef notyet direction == PF_IN ? "in" : "out", direction == (*state)->direction ? "fwd" : "rev"); +#else + ""); +#endif printf("pf: State failure on: %c %c %c %c | %c %c\n", SEQ_GEQ(src->seqhi, end) ? ' ' : '1', SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws)) ? @@ -5157,6 +5034,246 @@ pf_test_state_tcp(struct pf_state **stat } /* Any packets which have gotten here are to be passed */ + return (PF_PASS); +} + +int +pf_tcp_track_sloppy(struct pf_state_peer *src, struct pf_state_peer *dst, + struct pf_state **state, struct pf_pdesc *pd, u_short *reason) +{ + struct tcphdr *th = pd->hdr.tcp; + + if (th->th_flags & TH_SYN) + if (src->state < TCPS_SYN_SENT) + src->state = TCPS_SYN_SENT; + if (th->th_flags & TH_FIN) + if (src->state < TCPS_CLOSING) + src->state = TCPS_CLOSING; + if (th->th_flags & TH_ACK) { + if (dst->state == TCPS_SYN_SENT) { + dst->state = TCPS_ESTABLISHED; + if (src->state == TCPS_ESTABLISHED && + (*state)->src_node != NULL && + pf_src_connlimit(state)) { + REASON_SET(reason, PFRES_SRCLIMIT); + return (PF_DROP); + } + } else if (dst->state == TCPS_CLOSING) { + dst->state = TCPS_FIN_WAIT_2; + } else if (src->state == TCPS_SYN_SENT && + dst->state < TCPS_SYN_SENT) { + /* + * Handle a special sloppy case where we only see one + * half of the connection. If there is a ACK after + * the initial SYN without ever seeing a packet from + * the destination, set the connection to established. + */ + dst->state = src->state = TCPS_ESTABLISHED; + if ((*state)->src_node != NULL && + pf_src_connlimit(state)) { + REASON_SET(reason, PFRES_SRCLIMIT); + return (PF_DROP); + } + } else if (src->state == TCPS_CLOSING && + dst->state == TCPS_ESTABLISHED && + dst->seqlo == 0) { + /* + * Handle the closing of half connections where we + * don't see the full bidirectional FIN/ACK+ACK + * handshake. + */ + dst->state = TCPS_CLOSING; + } + } + if (th->th_flags & TH_RST) + src->state = dst->state = TCPS_TIME_WAIT; + + /* update expire time */ + (*state)->expire = time_second; + if (src->state >= TCPS_FIN_WAIT_2 && + dst->state >= TCPS_FIN_WAIT_2) + (*state)->timeout = PFTM_TCP_CLOSED; + else if (src->state >= TCPS_CLOSING && + dst->state >= TCPS_CLOSING) + (*state)->timeout = PFTM_TCP_FIN_WAIT; + else if (src->state < TCPS_ESTABLISHED || + dst->state < TCPS_ESTABLISHED) + (*state)->timeout = PFTM_TCP_OPENING; + else if (src->state >= TCPS_CLOSING || + dst->state >= TCPS_CLOSING) + (*state)->timeout = PFTM_TCP_CLOSING; + else + (*state)->timeout = PFTM_TCP_ESTABLISHED; + + return (PF_PASS); +} + + +int +pf_test_state_tcp(struct pf_state **state, int direction, struct pfi_kif *kif, + struct mbuf *m, int off, void *h, struct pf_pdesc *pd, + u_short *reason) +{ + struct pf_state_cmp key; + struct tcphdr *th = pd->hdr.tcp; + int copyback = 0; + struct pf_state_peer *src, *dst; + + key.af = pd->af; + key.proto = IPPROTO_TCP; + if (direction == PF_IN) { + PF_ACPY(&key.ext.addr, pd->src, key.af); + PF_ACPY(&key.gwy.addr, pd->dst, key.af); + key.ext.port = th->th_sport; + key.gwy.port = th->th_dport; + } else { + PF_ACPY(&key.lan.addr, pd->src, key.af); + PF_ACPY(&key.ext.addr, pd->dst, key.af); + key.lan.port = th->th_sport; + key.ext.port = th->th_dport; + } + + STATE_LOOKUP(); + + if (direction == (*state)->direction) { + src = &(*state)->src; + dst = &(*state)->dst; + } else { + src = &(*state)->dst; + dst = &(*state)->src; + } + + if ((*state)->src.state == PF_TCPS_PROXY_SRC) { + if (direction != (*state)->direction) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_SYNPROXY_DROP); + } + if (th->th_flags & TH_SYN) { + if (ntohl(th->th_seq) != (*state)->src.seqlo) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_DROP); + } +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, +#else + pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, +#endif + pd->src, th->th_dport, th->th_sport, + (*state)->src.seqhi, ntohl(th->th_seq) + 1, + TH_SYN|TH_ACK, 0, (*state)->src.mss, 0, 1, + 0, NULL, NULL); + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_SYNPROXY_DROP); + } else if (!(th->th_flags & TH_ACK) || + (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || + (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_DROP); + } else if ((*state)->src_node != NULL && + pf_src_connlimit(state)) { + REASON_SET(reason, PFRES_SRCLIMIT); + return (PF_DROP); + } else + (*state)->src.state = PF_TCPS_PROXY_DST; + } + if ((*state)->src.state == PF_TCPS_PROXY_DST) { + struct pf_state_host *src, *dst; + + if (direction == PF_OUT) { + src = &(*state)->gwy; + dst = &(*state)->ext; + } else { + src = &(*state)->ext; + dst = &(*state)->lan; + } + if (direction == (*state)->direction) { + if (((th->th_flags & (TH_SYN|TH_ACK)) != TH_ACK) || + (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || + (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_DROP); + } + (*state)->src.max_win = MAX(ntohs(th->th_win), 1); + if ((*state)->dst.seqhi == 1) + (*state)->dst.seqhi = htonl(arc4random()); +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, + &src->addr, +#else + pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, +#endif + &dst->addr, src->port, dst->port, + (*state)->dst.seqhi, 0, TH_SYN, 0, + (*state)->src.mss, 0, 0, (*state)->tag, NULL, NULL); + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_SYNPROXY_DROP); + } else if (((th->th_flags & (TH_SYN|TH_ACK)) != + (TH_SYN|TH_ACK)) || + (ntohl(th->th_ack) != (*state)->dst.seqhi + 1)) { + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_DROP); + } else { + (*state)->dst.max_win = MAX(ntohs(th->th_win), 1); + (*state)->dst.seqlo = ntohl(th->th_seq); +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, pd->dst, +#else + pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst, +#endif + pd->src, th->th_dport, th->th_sport, + ntohl(th->th_ack), ntohl(th->th_seq) + 1, + TH_ACK, (*state)->src.max_win, 0, 0, 0, + (*state)->tag, NULL, NULL); +#ifdef __FreeBSD__ + pf_send_tcp(NULL, (*state)->rule.ptr, pd->af, + &src->addr, +#else + pf_send_tcp((*state)->rule.ptr, pd->af, &src->addr, +#endif + &dst->addr, src->port, dst->port, + (*state)->src.seqhi + 1, (*state)->src.seqlo + 1, + TH_ACK, (*state)->dst.max_win, 0, 0, 1, + 0, NULL, NULL); + (*state)->src.seqdiff = (*state)->dst.seqhi - + (*state)->src.seqlo; + (*state)->dst.seqdiff = (*state)->src.seqhi - + (*state)->dst.seqlo; + (*state)->src.seqhi = (*state)->src.seqlo + + (*state)->dst.max_win; + (*state)->dst.seqhi = (*state)->dst.seqlo + + (*state)->src.max_win; + (*state)->src.wscale = (*state)->dst.wscale = 0; + (*state)->src.state = (*state)->dst.state = + TCPS_ESTABLISHED; + REASON_SET(reason, PFRES_SYNPROXY); + return (PF_SYNPROXY_DROP); + } + } + + if (((th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN) && + dst->state >= TCPS_FIN_WAIT_2 && + src->state >= TCPS_FIN_WAIT_2) { + if (pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: state reuse "); + pf_print_state(*state); + pf_print_flags(th->th_flags); + printf("\n"); + } + /* XXX make sure it's the same direction ?? */ + (*state)->src.state = (*state)->dst.state = TCPS_CLOSED; + pf_unlink_state(*state); + *state = NULL; + return (PF_DROP); + } + + if ((*state)->state_flags & PFSTATE_SLOPPY) { + if (pf_tcp_track_sloppy(src, dst, state, pd, reason) == PF_DROP) + return (PF_DROP); + } else { + if (pf_tcp_track_full(src, dst, state, kif, m, off, pd, reason, + ©back) == PF_DROP) + return (PF_DROP); + } /* translate source/destination address, if necessary */ if (STATE_TRANSLATE(*state)) { @@ -5534,8 +5651,9 @@ pf_test_state_icmp(struct pf_state **sta copyback = 1; } - if (!SEQ_GEQ(src->seqhi, seq) || - !SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws))) { + if (!((*state)->state_flags & PFSTATE_SLOPPY) && + (!SEQ_GEQ(src->seqhi, seq) || + !SEQ_GEQ(seq, src->seqlo - (dst->max_win << dws)))) { if (pf_status.debug >= PF_DEBUG_MISC) { printf("pf: BAD ICMP %d:%d ", icmptype, pd->hdr.icmp->icmp_code); @@ -7045,7 +7163,7 @@ pf_test(int dir, struct ifnet *ifp, stru done: if (action == PF_PASS && h->ip_hl > 5 && - !((s && s->allow_opts) || r->allow_opts)) { + !((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) { action = PF_DROP; REASON_SET(&reason, PFRES_IPOPTIONS); log = 1; @@ -7506,7 +7624,7 @@ pf_test6(int dir, struct ifnet *ifp, str done: /* handle dangerous IPv6 extension headers. */ if (action == PF_PASS && rh_cnt && - !((s && s->allow_opts) || r->allow_opts)) { + !((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) { action = PF_DROP; REASON_SET(&reason, PFRES_IPOPTIONS); log = 1; Modified: stable/7/sys/contrib/pf/net/pfvar.h ============================================================================== --- stable/7/sys/contrib/pf/net/pfvar.h Sat Jan 23 00:32:19 2010 (r202852) +++ stable/7/sys/contrib/pf/net/pfvar.h Sat Jan 23 00:41:04 2010 (r202853) @@ -700,6 +700,7 @@ struct pf_rule { /* rule flags again */ #define PFRULE_IFBOUND 0x00010000 /* if-bound */ +#define PFRULE_STATESLOPPY 0x00020000 /* sloppy state tracking */ #define PFSTATE_HIWAT 10000 /* default state table size */ #define PFSTATE_ADAPT_START 6000 /* default adaptive timeout start */ @@ -800,7 +801,9 @@ struct pf_state { u_int8_t pad; #endif u_int8_t log; - u_int8_t allow_opts; + u_int8_t state_flags; +#define PFSTATE_ALLOWOPTS 0x01 +#define PFSTATE_SLOPPY 0x02 u_int8_t timeout; u_int8_t sync_flags; #define PFSTATE_NOSYNC 0x01 From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:43:45 2010 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 406941065670; Sat, 23 Jan 2010 00:43:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D3508FC1C; Sat, 23 Jan 2010 00:43:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0hjqC043550; Sat, 23 Jan 2010 00:43:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0hjti043542; Sat, 23 Jan 2010 00:43:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230043.o0N0hjti043542@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 00:43:45 +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: r202855 - in stable/8: lib/libc/sys share/man/man3 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: Sat, 23 Jan 2010 00:43:45 -0000 Author: delphij Date: Sat Jan 23 00:43:44 2010 New Revision: 202855 URL: http://svn.freebsd.org/changeset/base/202855 Log: MFC r201892: Add a set of manual pages for pthread[_attr]_[sg]etaffinity(3). Reviewed by: davidxu Added: stable/8/share/man/man3/pthread_affinity_np.3 - copied unchanged from r201892, head/share/man/man3/pthread_affinity_np.3 stable/8/share/man/man3/pthread_attr_affinity_np.3 - copied unchanged from r201892, head/share/man/man3/pthread_attr_affinity_np.3 Modified: stable/8/lib/libc/sys/cpuset.2 stable/8/lib/libc/sys/cpuset_getaffinity.2 stable/8/share/man/man3/Makefile stable/8/share/man/man3/pthread.3 stable/8/share/man/man3/pthread_attr.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/share/man/man3/ (props changed) Modified: stable/8/lib/libc/sys/cpuset.2 ============================================================================== --- stable/8/lib/libc/sys/cpuset.2 Sat Jan 23 00:42:01 2010 (r202854) +++ stable/8/lib/libc/sys/cpuset.2 Sat Jan 23 00:43:44 2010 (r202855) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2008 +.Dd January 8, 2010 .Dt CPUSET 2 .Os .Sh NAME @@ -216,7 +216,9 @@ for allocation. .Xr cpuset 1 , .Xr cpuset_getaffinity 2 , .Xr cpuset_setaffinity 2 , -.Xr CPU_SET 3 +.Xr CPU_SET 3 , +.Xr pthread_affinity_np 3 , +.Xr pthread_attr_affinity_np 3 .Sh HISTORY The .Nm Modified: stable/8/lib/libc/sys/cpuset_getaffinity.2 ============================================================================== --- stable/8/lib/libc/sys/cpuset_getaffinity.2 Sat Jan 23 00:42:01 2010 (r202854) +++ stable/8/lib/libc/sys/cpuset_getaffinity.2 Sat Jan 23 00:43:44 2010 (r202855) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2008 +.Dd January 8, 2010 .Dt CPUSET 2 .Os .Sh NAME @@ -147,7 +147,9 @@ operation. .Xr cpuset 2 , .Xr cpuset_getid 2 , .Xr cpuset_setid 2 , -.Xr CPU_SET 3 +.Xr CPU_SET 3 , +.Xr pthread_affinity_np 3 , +.Xr pthread_attr_affinity_np 3 .Sh HISTORY The .Nm Modified: stable/8/share/man/man3/Makefile ============================================================================== --- stable/8/share/man/man3/Makefile Sat Jan 23 00:42:01 2010 (r202854) +++ stable/8/share/man/man3/Makefile Sat Jan 23 00:43:44 2010 (r202855) @@ -155,8 +155,10 @@ MLINKS+= tree.3 RB_EMPTY.3 \ .if ${MK_LIBTHR} != "no" PTHREAD_MAN= pthread.3 \ + pthread_affinity_np.3 \ pthread_atfork.3 \ pthread_attr.3 \ + pthread_attr_affinity_np.3 \ pthread_attr_get_np.3 \ pthread_attr_setcreatesuspend_np.3 \ pthread_barrierattr.3 \ @@ -218,7 +220,9 @@ PTHREAD_MAN= pthread.3 \ pthread_testcancel.3 \ pthread_yield.3 -PTHREAD_MLINKS= pthread_attr.3 pthread_attr_destroy.3 \ +PTHREAD_MLINKS= pthread_affinity_np.3 pthread_getaffinity_np.3 \ + pthread_affinity_np.3 pthread_setaffinity_np.3 +PTHREAD_MLINKS+=pthread_attr.3 pthread_attr_destroy.3 \ pthread_attr.3 pthread_attr_getdetachstate.3 \ pthread_attr.3 pthread_attr_getguardsize.3 \ pthread_attr.3 pthread_attr_getinheritsched.3 \ @@ -238,6 +242,8 @@ PTHREAD_MLINKS= pthread_attr.3 pthread_a pthread_attr.3 pthread_attr_setstack.3 \ pthread_attr.3 pthread_attr_setstackaddr.3 \ pthread_attr.3 pthread_attr_setstacksize.3 +PTHREAD_MLINKS+=pthread_attr_affinity_np.3 pthread_attr_getaffinity_np.3 \ + pthread_attr_affinity_np.3 pthread_attr_setaffinity_np.3 PTHREAD_MLINKS+=pthread_barrierattr.3 pthread_barrierattr_destroy.3 \ pthread_barrierattr.3 pthread_barrierattr_getpshared.3 \ pthread_barrierattr.3 pthread_barrierattr_init.3 \ Modified: stable/8/share/man/man3/pthread.3 ============================================================================== --- stable/8/share/man/man3/pthread.3 Sat Jan 23 00:42:01 2010 (r202854) +++ stable/8/share/man/man3/pthread.3 Sat Jan 23 00:43:44 2010 (r202855) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 1, 2009 +.Dd January 8, 2010 .Dt PTHREAD 3 .Os .Sh NAME @@ -478,7 +478,9 @@ functions and the thread functions. Threaded applications are linked with this library. .Sh SEE ALSO .Xr libthr 3 , +.Xr pthread_affinity_np 3 , .Xr pthread_atfork 3 , +.Xr pthread_attr 3 , .Xr pthread_cancel 3 , .Xr pthread_cleanup_pop 3 , .Xr pthread_cleanup_push 3 , Copied: stable/8/share/man/man3/pthread_affinity_np.3 (from r201892, head/share/man/man3/pthread_affinity_np.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man3/pthread_affinity_np.3 Sat Jan 23 00:43:44 2010 (r202855, copy of r201892, head/share/man/man3/pthread_affinity_np.3) @@ -0,0 +1,157 @@ +.\"- +.\" Copyright (c) 2010 Xin LI +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 8, 2010 +.Dt PTHREAD_AFFINITY_NP 3 +.Os +.Sh NAME +.Nm pthread_getaffinity_np , +.Nm pthread_setaffinity_np +.Nd manage CPU affinity +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In pthread_np.h +.Ft int +.Fn pthread_getaffinity_np "pthread_t td" "size_t cpusetsize" "cpuset_t *cpusetp" +.Ft int +.Fn pthread_setaffinity_np "pthread_t td" "size_t cpusetsize" "const cpuset_t *cpusetp" +.Sh DESCRIPTION +.Fn pthread_getaffinity_np +and +.Fn pthread_setaffinity_np +allow the manipulation of sets of CPUs available to specified thread. +.Pp +Masks of type +.Ft cpuset_t +are composed using the +.Xr CPU_SET 2 +macros. +The kernel tolerates large sets as long as all CPUs specified +in the set exist. +Sets smaller than the kernel uses generate an error on calls to +.Fn pthread_getaffinity_np +even if the result set would fit within the user supplied set. +Calls to +.Fn pthread_setaffinity_np +tolerate small sets with no restrictions. +.Pp +The supplied mask should have a size of +.Fa cpusetsize +bytes. +This size is usually provided by calling +.Li sizeof(cpuset_t) +which is ultimately determined by the value of +.Dv CPU_SETSIZE +as defined in +.In sys/cpuset.h . +.Pp +.Fn pthread_getaffinity_np +retrieves the +mask from the thread specified by +.Fa td , +and stores it in the space provided by +.Fa cpumaskp . +.Pp +.Fn pthread_setaffinity_np +attempts to set the mask for the thread specified by +.Fa td +to the value in +.Fa cpumaskp . +.Pp +.Sh RETURN VALUES +If successful, the +.Fn pthread_getaffinity_np +and +.Fn pthread_setaffinity_np +functions will return zero. +Otherwise an error number will be returned +to indicate the error. +.Sh ERRORS +The +.Fn pthread_getaffinity_np +and +.Fn pthread_setaffinity_np +functions may fail if: +.Bl -tag -width Er +.It Bq Er EDEADLK +The +.Fn pthread_setaffinity_np +call would leave a thread without a valid CPU to run on because the set +does not overlap with the thread's anonymous mask. +.It Bq Er EFAULT +The +.Fa cpumaskp +pointer passed was invalid. +.It Bq Er ESRCH +The thread specified by the +.Fa td +argument could not be found. +.It Bq Er ERANGE +The +.Fa cpusetsize +was either preposterously large or smaller than the kernel set size. +.It Bq Er EPERM +The calling thread did not have the credentials required to complete the +operation. +.El +.Sh SEE ALSO +.Xr cpuset 1 , +.Xr cpuset 2 , +.Xr cpuset_getid 2 , +.Xr cpuset_setid 2 , +.Xr CPU_SET 3 , +.Xr pthread 3 , +.Xr pthread_attr_get_affinity_np 3 , +.Xr pthread_attr_set_affinity_np 3 . +.Sh STANDARDS +The +.Nm pthread_getaffinity_np +and +.Nm pthread_setaffinity_np +functions are non-standard +.Fx +extensions and may be not available on other operating systems. +.Sh HISTORY +The +.Nm pthread_getaffinity_np +and +.Nm pthread_setaffinity_np +function first appeared in +.Fx 7.2 . +.Sh AUTHORS +.An -nosplit +The +.Nm pthread_getaffinity_np +and +.Nm pthread_setaffinity_np +functions were written by +.An David Xu +.Aq davidxu@FreeBSD.org , +and this manpage was written by +.An Xin LI +.Aq delphij@FreeBSD.org . Modified: stable/8/share/man/man3/pthread_attr.3 ============================================================================== --- stable/8/share/man/man3/pthread_attr.3 Sat Jan 23 00:42:01 2010 (r202854) +++ stable/8/share/man/man3/pthread_attr.3 Sat Jan 23 00:43:44 2010 (r202855) @@ -26,7 +26,7 @@ .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd April 28, 2000 +.Dd January 8, 2010 .Dt PTHREAD_ATTR 3 .Os .Sh NAME @@ -209,9 +209,9 @@ Invalid or unsupported value for .El .Sh SEE ALSO .Xr pthread_attr_get_np 3 , +.Xr pthread_attr_affinity_np 3 , .Xr pthread_create 3 .Sh STANDARDS -The .Fn pthread_attr_init , .Fn pthread_attr_destroy , .Fn pthread_attr_setstacksize , Copied: stable/8/share/man/man3/pthread_attr_affinity_np.3 (from r201892, head/share/man/man3/pthread_attr_affinity_np.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man3/pthread_attr_affinity_np.3 Sat Jan 23 00:43:44 2010 (r202855, copy of r201892, head/share/man/man3/pthread_attr_affinity_np.3) @@ -0,0 +1,150 @@ +.\"- +.\" Copyright (c) 2010 Xin LI +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 8, 2010 +.Dt PTHREAD_ATTR_AFFINITY_NP 3 +.Os +.Sh NAME +.Nm pthread_attr_getaffinity_np , +.Nm pthread_attr_setaffinity_np +.Nd manage CPU affinity in thread attribute object +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In pthread_np.h +.Ft int +.Fn pthread_attr_getaffinity_np "const pthread_attr_t *pattr" "size_t cpusetsize" "cpuset_t *cpusetp" +.Ft int +.Fn pthread_attr_setaffinity_np "pthread_attr_t *pattr" "size_t cpusetsize" "const cpuset_t *cpusetp" +.Sh DESCRIPTION +.Fn pthread_attr_getaffinity_np +and +.Fn pthread_attr_setaffinity_np +allow the manipulation of sets of CPUs available to specified thread attribute object. +.Pp +Masks of type +.Ft cpuset_t +are composed using the +.Xr CPU_SET 2 +macros. +The kernel tolerates large sets as long as all CPUs specified +in the set exist. +Sets smaller than the kernel uses generate an error on calls to +.Fn pthread_attr_getaffinity_np +even if the result set would fit within the user supplied set. +Calls to +.Fn pthread_attr_setaffinity_np +tolerate small sets with no restrictions. +.Pp +The supplied mask should have a size of +.Fa cpusetsize +bytes. +This size is usually provided by calling +.Li sizeof(cpuset_t) +which is ultimately determined by the value of +.Dv CPU_SETSIZE +as defined in +.In sys/cpuset.h . +.Pp +.Fn pthread_attr_getaffinity_np +retrieves the +mask from the thread attribute object specified by +.Fa pattr , +and stores it in the space provided by +.Fa cpumaskp . +.Pp +.Fn pthread_attr_setaffinity_np +set the mask for the thread attribute object specified by +.Fa pattr +to the value in +.Fa cpumaskp . +.Pp +.Sh RETURN VALUES +If successful, the +.Fn pthread_attr_getaffinity_np +and +.Fn pthread_attr_setaffinity_np +functions will return zero. +Otherwise an error number will be returned +to indicate the error. +.Sh ERRORS +The +.Fn pthread_attr_getaffinity_np +and +.Fn pthread_attr_setaffinity_np +functions will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa pattr +or the attribute specified by it is NULL. +.El +.Pp +The +.Fn pthread_attr_setaffinity_np +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa pattr +or the attribute specified by it is NULL. +.It Bq Er ENOMEM +Insufficient memory exists to store the cpuset mask. +.El +.Sh SEE ALSO +.Xr cpuset 1 , +.Xr cpuset 2 , +.Xr cpuset_getid 2 , +.Xr cpuset_setid 2 , +.Xr CPU_SET 3 , +.Xr pthread_get_affinity_np 3 , +.Xr pthread_set_affinity_np 3 . +.Sh STANDARDS +The +.Nm pthread_attr_getaffinity_np +and +.Nm pthread_attr_setaffinity_np +functions are non-standard +.Fx +extensions and may be not available on other operating systems. +.Sh HISTORY +The +.Nm pthread_attr_getaffinity_np +and +.Nm pthread_attr_setaffinity_np +functions first appeared in +.Fx 7.2 . +.Sh AUTHORS +.An -nosplit +The +.Nm pthread_attr_getaffinity_np +and +.Nm pthread_attr_setaffinity_np +functions were written by +.An David Xu Aq davidxu@FreeBSD.org , +and this manpage was written by +.An Xin LI Aq delphij@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:46:55 2010 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 D7D35106566C; Sat, 23 Jan 2010 00:46:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4AC08FC08; Sat, 23 Jan 2010 00:46:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0ktFv044321; Sat, 23 Jan 2010 00:46:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0ktIv044313; Sat, 23 Jan 2010 00:46:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230046.o0N0ktIv044313@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 00:46:55 +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: r202856 - in stable/7: lib/libc/sys share/man/man3 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: Sat, 23 Jan 2010 00:46:56 -0000 Author: delphij Date: Sat Jan 23 00:46:55 2010 New Revision: 202856 URL: http://svn.freebsd.org/changeset/base/202856 Log: MFC r201892: Add a set of manual pages for pthread[_attr]_[sg]etaffinity(3). Reviewed by: davidxu Added: stable/7/share/man/man3/pthread_affinity_np.3 - copied unchanged from r201892, head/share/man/man3/pthread_affinity_np.3 stable/7/share/man/man3/pthread_attr_affinity_np.3 - copied unchanged from r201892, head/share/man/man3/pthread_attr_affinity_np.3 Modified: stable/7/lib/libc/sys/cpuset.2 stable/7/lib/libc/sys/cpuset_getaffinity.2 stable/7/share/man/man3/Makefile stable/7/share/man/man3/pthread.3 stable/7/share/man/man3/pthread_attr.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) stable/7/share/man/man3/ (props changed) Modified: stable/7/lib/libc/sys/cpuset.2 ============================================================================== --- stable/7/lib/libc/sys/cpuset.2 Sat Jan 23 00:43:44 2010 (r202855) +++ stable/7/lib/libc/sys/cpuset.2 Sat Jan 23 00:46:55 2010 (r202856) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2008 +.Dd January 8, 2010 .Dt CPUSET 2 .Os .Sh NAME @@ -216,7 +216,9 @@ for allocation. .Xr cpuset 1 , .Xr cpuset_getaffinity 2 , .Xr cpuset_setaffinity 2 , -.Xr CPU_SET 3 +.Xr CPU_SET 3 , +.Xr pthread_affinity_np 3 , +.Xr pthread_attr_affinity_np 3 .Sh HISTORY The .Nm Modified: stable/7/lib/libc/sys/cpuset_getaffinity.2 ============================================================================== --- stable/7/lib/libc/sys/cpuset_getaffinity.2 Sat Jan 23 00:43:44 2010 (r202855) +++ stable/7/lib/libc/sys/cpuset_getaffinity.2 Sat Jan 23 00:46:55 2010 (r202856) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2008 +.Dd January 8, 2010 .Dt CPUSET 2 .Os .Sh NAME @@ -147,7 +147,9 @@ operation. .Xr cpuset 2 , .Xr cpuset_getid 2 , .Xr cpuset_setid 2 , -.Xr CPU_SET 3 +.Xr CPU_SET 3 , +.Xr pthread_affinity_np 3 , +.Xr pthread_attr_affinity_np 3 .Sh HISTORY The .Nm Modified: stable/7/share/man/man3/Makefile ============================================================================== --- stable/7/share/man/man3/Makefile Sat Jan 23 00:43:44 2010 (r202855) +++ stable/7/share/man/man3/Makefile Sat Jan 23 00:46:55 2010 (r202856) @@ -152,8 +152,10 @@ MLINKS+= tree.3 RB_EMPTY.3 \ .if ${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no" PTHREAD_MAN= pthread.3 \ + pthread_affinity_np.3 \ pthread_atfork.3 \ pthread_attr.3 \ + pthread_attr_affinity_np.3 \ pthread_attr_get_np.3 \ pthread_attr_setcreatesuspend_np.3 \ pthread_barrierattr.3 \ @@ -215,7 +217,9 @@ PTHREAD_MAN= pthread.3 \ pthread_testcancel.3 \ pthread_yield.3 -PTHREAD_MLINKS= pthread_attr.3 pthread_attr_destroy.3 \ +PTHREAD_MLINKS= pthread_affinity_np.3 pthread_getaffinity_np.3 \ + pthread_affinity_np.3 pthread_setaffinity_np.3 +PTHREAD_MLINKS+=pthread_attr.3 pthread_attr_destroy.3 \ pthread_attr.3 pthread_attr_getdetachstate.3 \ pthread_attr.3 pthread_attr_getguardsize.3 \ pthread_attr.3 pthread_attr_getinheritsched.3 \ @@ -235,6 +239,8 @@ PTHREAD_MLINKS= pthread_attr.3 pthread_a pthread_attr.3 pthread_attr_setstack.3 \ pthread_attr.3 pthread_attr_setstackaddr.3 \ pthread_attr.3 pthread_attr_setstacksize.3 +PTHREAD_MLINKS+=pthread_attr_affinity_np.3 pthread_attr_getaffinity_np.3 \ + pthread_attr_affinity_np.3 pthread_attr_setaffinity_np.3 PTHREAD_MLINKS+=pthread_barrierattr.3 pthread_barrierattr_destroy.3 \ pthread_barrierattr.3 pthread_barrierattr_getpshared.3 \ pthread_barrierattr.3 pthread_barrierattr_init.3 \ Modified: stable/7/share/man/man3/pthread.3 ============================================================================== --- stable/7/share/man/man3/pthread.3 Sat Jan 23 00:43:44 2010 (r202855) +++ stable/7/share/man/man3/pthread.3 Sat Jan 23 00:46:55 2010 (r202856) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 19, 2007 +.Dd January 8, 2010 .Dt PTHREAD 3 .Os .Sh NAME @@ -478,7 +478,9 @@ They contain both thread-safe versions o functions and the thread functions. Threaded applications are linked with one of these libraries. .Sh SEE ALSO +.Xr pthread_affinity_np 3 , .Xr pthread_atfork 3 , +.Xr pthread_attr 3 , .Xr pthread_cancel 3 , .Xr pthread_cleanup_pop 3 , .Xr pthread_cleanup_push 3 , Copied: stable/7/share/man/man3/pthread_affinity_np.3 (from r201892, head/share/man/man3/pthread_affinity_np.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man3/pthread_affinity_np.3 Sat Jan 23 00:46:55 2010 (r202856, copy of r201892, head/share/man/man3/pthread_affinity_np.3) @@ -0,0 +1,157 @@ +.\"- +.\" Copyright (c) 2010 Xin LI +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 8, 2010 +.Dt PTHREAD_AFFINITY_NP 3 +.Os +.Sh NAME +.Nm pthread_getaffinity_np , +.Nm pthread_setaffinity_np +.Nd manage CPU affinity +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In pthread_np.h +.Ft int +.Fn pthread_getaffinity_np "pthread_t td" "size_t cpusetsize" "cpuset_t *cpusetp" +.Ft int +.Fn pthread_setaffinity_np "pthread_t td" "size_t cpusetsize" "const cpuset_t *cpusetp" +.Sh DESCRIPTION +.Fn pthread_getaffinity_np +and +.Fn pthread_setaffinity_np +allow the manipulation of sets of CPUs available to specified thread. +.Pp +Masks of type +.Ft cpuset_t +are composed using the +.Xr CPU_SET 2 +macros. +The kernel tolerates large sets as long as all CPUs specified +in the set exist. +Sets smaller than the kernel uses generate an error on calls to +.Fn pthread_getaffinity_np +even if the result set would fit within the user supplied set. +Calls to +.Fn pthread_setaffinity_np +tolerate small sets with no restrictions. +.Pp +The supplied mask should have a size of +.Fa cpusetsize +bytes. +This size is usually provided by calling +.Li sizeof(cpuset_t) +which is ultimately determined by the value of +.Dv CPU_SETSIZE +as defined in +.In sys/cpuset.h . +.Pp +.Fn pthread_getaffinity_np +retrieves the +mask from the thread specified by +.Fa td , +and stores it in the space provided by +.Fa cpumaskp . +.Pp +.Fn pthread_setaffinity_np +attempts to set the mask for the thread specified by +.Fa td +to the value in +.Fa cpumaskp . +.Pp +.Sh RETURN VALUES +If successful, the +.Fn pthread_getaffinity_np +and +.Fn pthread_setaffinity_np +functions will return zero. +Otherwise an error number will be returned +to indicate the error. +.Sh ERRORS +The +.Fn pthread_getaffinity_np +and +.Fn pthread_setaffinity_np +functions may fail if: +.Bl -tag -width Er +.It Bq Er EDEADLK +The +.Fn pthread_setaffinity_np +call would leave a thread without a valid CPU to run on because the set +does not overlap with the thread's anonymous mask. +.It Bq Er EFAULT +The +.Fa cpumaskp +pointer passed was invalid. +.It Bq Er ESRCH +The thread specified by the +.Fa td +argument could not be found. +.It Bq Er ERANGE +The +.Fa cpusetsize +was either preposterously large or smaller than the kernel set size. +.It Bq Er EPERM +The calling thread did not have the credentials required to complete the +operation. +.El +.Sh SEE ALSO +.Xr cpuset 1 , +.Xr cpuset 2 , +.Xr cpuset_getid 2 , +.Xr cpuset_setid 2 , +.Xr CPU_SET 3 , +.Xr pthread 3 , +.Xr pthread_attr_get_affinity_np 3 , +.Xr pthread_attr_set_affinity_np 3 . +.Sh STANDARDS +The +.Nm pthread_getaffinity_np +and +.Nm pthread_setaffinity_np +functions are non-standard +.Fx +extensions and may be not available on other operating systems. +.Sh HISTORY +The +.Nm pthread_getaffinity_np +and +.Nm pthread_setaffinity_np +function first appeared in +.Fx 7.2 . +.Sh AUTHORS +.An -nosplit +The +.Nm pthread_getaffinity_np +and +.Nm pthread_setaffinity_np +functions were written by +.An David Xu +.Aq davidxu@FreeBSD.org , +and this manpage was written by +.An Xin LI +.Aq delphij@FreeBSD.org . Modified: stable/7/share/man/man3/pthread_attr.3 ============================================================================== --- stable/7/share/man/man3/pthread_attr.3 Sat Jan 23 00:43:44 2010 (r202855) +++ stable/7/share/man/man3/pthread_attr.3 Sat Jan 23 00:46:55 2010 (r202856) @@ -26,7 +26,7 @@ .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd April 28, 2000 +.Dd January 8, 2010 .Dt PTHREAD_ATTR 3 .Os .Sh NAME @@ -209,9 +209,9 @@ Invalid or unsupported value for .El .Sh SEE ALSO .Xr pthread_attr_get_np 3 , +.Xr pthread_attr_affinity_np 3 , .Xr pthread_create 3 .Sh STANDARDS -The .Fn pthread_attr_init , .Fn pthread_attr_destroy , .Fn pthread_attr_setstacksize , Copied: stable/7/share/man/man3/pthread_attr_affinity_np.3 (from r201892, head/share/man/man3/pthread_attr_affinity_np.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man3/pthread_attr_affinity_np.3 Sat Jan 23 00:46:55 2010 (r202856, copy of r201892, head/share/man/man3/pthread_attr_affinity_np.3) @@ -0,0 +1,150 @@ +.\"- +.\" Copyright (c) 2010 Xin LI +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 8, 2010 +.Dt PTHREAD_ATTR_AFFINITY_NP 3 +.Os +.Sh NAME +.Nm pthread_attr_getaffinity_np , +.Nm pthread_attr_setaffinity_np +.Nd manage CPU affinity in thread attribute object +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In pthread_np.h +.Ft int +.Fn pthread_attr_getaffinity_np "const pthread_attr_t *pattr" "size_t cpusetsize" "cpuset_t *cpusetp" +.Ft int +.Fn pthread_attr_setaffinity_np "pthread_attr_t *pattr" "size_t cpusetsize" "const cpuset_t *cpusetp" +.Sh DESCRIPTION +.Fn pthread_attr_getaffinity_np +and +.Fn pthread_attr_setaffinity_np +allow the manipulation of sets of CPUs available to specified thread attribute object. +.Pp +Masks of type +.Ft cpuset_t +are composed using the +.Xr CPU_SET 2 +macros. +The kernel tolerates large sets as long as all CPUs specified +in the set exist. +Sets smaller than the kernel uses generate an error on calls to +.Fn pthread_attr_getaffinity_np +even if the result set would fit within the user supplied set. +Calls to +.Fn pthread_attr_setaffinity_np +tolerate small sets with no restrictions. +.Pp +The supplied mask should have a size of +.Fa cpusetsize +bytes. +This size is usually provided by calling +.Li sizeof(cpuset_t) +which is ultimately determined by the value of +.Dv CPU_SETSIZE +as defined in +.In sys/cpuset.h . +.Pp +.Fn pthread_attr_getaffinity_np +retrieves the +mask from the thread attribute object specified by +.Fa pattr , +and stores it in the space provided by +.Fa cpumaskp . +.Pp +.Fn pthread_attr_setaffinity_np +set the mask for the thread attribute object specified by +.Fa pattr +to the value in +.Fa cpumaskp . +.Pp +.Sh RETURN VALUES +If successful, the +.Fn pthread_attr_getaffinity_np +and +.Fn pthread_attr_setaffinity_np +functions will return zero. +Otherwise an error number will be returned +to indicate the error. +.Sh ERRORS +The +.Fn pthread_attr_getaffinity_np +and +.Fn pthread_attr_setaffinity_np +functions will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa pattr +or the attribute specified by it is NULL. +.El +.Pp +The +.Fn pthread_attr_setaffinity_np +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa pattr +or the attribute specified by it is NULL. +.It Bq Er ENOMEM +Insufficient memory exists to store the cpuset mask. +.El +.Sh SEE ALSO +.Xr cpuset 1 , +.Xr cpuset 2 , +.Xr cpuset_getid 2 , +.Xr cpuset_setid 2 , +.Xr CPU_SET 3 , +.Xr pthread_get_affinity_np 3 , +.Xr pthread_set_affinity_np 3 . +.Sh STANDARDS +The +.Nm pthread_attr_getaffinity_np +and +.Nm pthread_attr_setaffinity_np +functions are non-standard +.Fx +extensions and may be not available on other operating systems. +.Sh HISTORY +The +.Nm pthread_attr_getaffinity_np +and +.Nm pthread_attr_setaffinity_np +functions first appeared in +.Fx 7.2 . +.Sh AUTHORS +.An -nosplit +The +.Nm pthread_attr_getaffinity_np +and +.Nm pthread_attr_setaffinity_np +functions were written by +.An David Xu Aq davidxu@FreeBSD.org , +and this manpage was written by +.An Xin LI Aq delphij@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:49:11 2010 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 1DF661065676; Sat, 23 Jan 2010 00:49:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D0428FC17; Sat, 23 Jan 2010 00:49:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0nA0P044890; Sat, 23 Jan 2010 00:49:10 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0nAFH044888; Sat, 23 Jan 2010 00:49:10 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230049.o0N0nAFH044888@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 00:49:10 +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: r202857 - stable/8/share/man/man4 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: Sat, 23 Jan 2010 00:49:11 -0000 Author: delphij Date: Sat Jan 23 00:49:10 2010 New Revision: 202857 URL: http://svn.freebsd.org/changeset/base/202857 Log: MFC r201894: Fix formatting. Modified: stable/8/share/man/man4/uart.4 Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/de.4 (props changed) Modified: stable/8/share/man/man4/uart.4 ============================================================================== --- stable/8/share/man/man4/uart.4 Sat Jan 23 00:46:55 2010 (r202856) +++ stable/8/share/man/man4/uart.4 Sat Jan 23 00:49:10 2010 (r202857) @@ -28,11 +28,9 @@ .Dd March 12, 2008 .Dt UART 4 .Os -.\" .Sh NAME .Nm uart .Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices -.\" .Sh SYNOPSIS .Cd "device uart" .Pp @@ -42,7 +40,6 @@ .Cd "device scc" .Cd "device uart" .Pp -.Bd -ragged offset -compact In .Pa /boot/device.hints : .Cd hint.uart.0.disabled="1" From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:49:51 2010 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 0680F1065694; Sat, 23 Jan 2010 00:49:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E94458FC1D; Sat, 23 Jan 2010 00:49:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0nouQ045091; Sat, 23 Jan 2010 00:49:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0no7B045089; Sat, 23 Jan 2010 00:49:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230049.o0N0no7B045089@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 00:49:50 +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: r202858 - stable/7/share/man/man4 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: Sat, 23 Jan 2010 00:49:51 -0000 Author: delphij Date: Sat Jan 23 00:49:50 2010 New Revision: 202858 URL: http://svn.freebsd.org/changeset/base/202858 Log: MFC r201894: Fix formatting. Modified: stable/7/share/man/man4/uart.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/uart.4 ============================================================================== --- stable/7/share/man/man4/uart.4 Sat Jan 23 00:49:10 2010 (r202857) +++ stable/7/share/man/man4/uart.4 Sat Jan 23 00:49:50 2010 (r202858) @@ -28,11 +28,9 @@ .Dd March 12, 2008 .Dt UART 4 .Os -.\" .Sh NAME .Nm uart .Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices -.\" .Sh SYNOPSIS .Cd "device uart" .Pp @@ -42,7 +40,6 @@ .Cd "device scc" .Cd "device uart" .Pp -.Bd -ragged offset -compact In .Pa /boot/device.hints : .Cd hint.uart.0.disabled="1" From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:52:33 2010 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 4507F106566B; Sat, 23 Jan 2010 00:52:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33E7E8FC15; Sat, 23 Jan 2010 00:52:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0qXoc045838; Sat, 23 Jan 2010 00:52:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0qXb8045836; Sat, 23 Jan 2010 00:52:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230052.o0N0qXb8045836@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 00:52:33 +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: r202859 - stable/8/usr.sbin/burncd 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: Sat, 23 Jan 2010 00:52:33 -0000 Author: delphij Date: Sat Jan 23 00:52:32 2010 New Revision: 202859 URL: http://svn.freebsd.org/changeset/base/202859 Log: MFC r202709: Give the right value when complaining it being wrong. Reported by: danfe Modified: stable/8/usr.sbin/burncd/burncd.c Directory Properties: stable/8/usr.sbin/burncd/ (props changed) Modified: stable/8/usr.sbin/burncd/burncd.c ============================================================================== --- stable/8/usr.sbin/burncd/burncd.c Sat Jan 23 00:49:50 2010 (r202858) +++ stable/8/usr.sbin/burncd/burncd.c Sat Jan 23 00:52:32 2010 (r202859) @@ -151,7 +151,7 @@ main(int argc, char **argv) else speed = atoi(env_speed) * 177; if (speed <= 0) - errx(EX_USAGE, "Invalid speed: %s", optarg); + errx(EX_USAGE, "Invalid speed: %s", env_speed); if (argc == 0) usage(); From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 00:53:03 2010 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 E1FD21065679; Sat, 23 Jan 2010 00:53:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D14728FC24; Sat, 23 Jan 2010 00:53:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0r3HY046041; Sat, 23 Jan 2010 00:53:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0r3tu046039; Sat, 23 Jan 2010 00:53:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230053.o0N0r3tu046039@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 00:53:03 +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: r202860 - stable/7/usr.sbin/burncd 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: Sat, 23 Jan 2010 00:53:04 -0000 Author: delphij Date: Sat Jan 23 00:53:03 2010 New Revision: 202860 URL: http://svn.freebsd.org/changeset/base/202860 Log: MFC r202709: Give the right value when complaining it being wrong. Reported by: danfe Modified: stable/7/usr.sbin/burncd/burncd.c Directory Properties: stable/7/usr.sbin/burncd/ (props changed) Modified: stable/7/usr.sbin/burncd/burncd.c ============================================================================== --- stable/7/usr.sbin/burncd/burncd.c Sat Jan 23 00:52:32 2010 (r202859) +++ stable/7/usr.sbin/burncd/burncd.c Sat Jan 23 00:53:03 2010 (r202860) @@ -151,7 +151,7 @@ main(int argc, char **argv) else speed = atoi(env_speed) * 177; if (speed <= 0) - errx(EX_USAGE, "Invalid speed: %s", optarg); + errx(EX_USAGE, "Invalid speed: %s", env_speed); if (argc == 0) usage(); From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 01:20:59 2010 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 A80B2106566B; Sat, 23 Jan 2010 01:20:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D2898FC23; Sat, 23 Jan 2010 01:20:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N1KxwJ052998; Sat, 23 Jan 2010 01:20:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N1KxJV052995; Sat, 23 Jan 2010 01:20:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230120.o0N1KxJV052995@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 01:20: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: r202861 - stable/7/sys/dev/bge 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: Sat, 23 Jan 2010 01:20:59 -0000 Author: delphij Date: Sat Jan 23 01:20:59 2010 New Revision: 202861 URL: http://svn.freebsd.org/changeset/base/202861 Log: MFC r202268: o Add PCI ID for BCM 5756. o Don't enable BGE_FLAG_BER_BUG on both 5722 and 5756, and based on their PCI IDs rather than their chip IDs. Reported by: several PC-BSD users via kmoore Reviewed by: yongari, imp, jhb, davidch Sponsored by: iXsystems, Inc. Modified: stable/7/sys/dev/bge/if_bge.c stable/7/sys/dev/bge/if_bgereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bge/if_bge.c ============================================================================== --- stable/7/sys/dev/bge/if_bge.c Sat Jan 23 00:53:03 2010 (r202860) +++ stable/7/sys/dev/bge/if_bge.c Sat Jan 23 01:20:59 2010 (r202861) @@ -187,6 +187,7 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM5754M }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5755 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5755M }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5756 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761E }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761S }, @@ -2612,7 +2613,8 @@ bge_attach(device_t dev) sc->bge_asicrev == BGE_ASICREV_BCM5761 || sc->bge_asicrev == BGE_ASICREV_BCM5784 || sc->bge_asicrev == BGE_ASICREV_BCM5787) { - if (sc->bge_chipid != BGE_CHIPID_BCM5722_A0) + if (pci_get_device(dev) != BCOM_DEVICEID_BCM5722 && + pci_get_device(dev) != BCOM_DEVICEID_BCM5756) sc->bge_flags |= BGE_FLAG_JITTER_BUG; } else if (sc->bge_asicrev != BGE_ASICREV_BCM5906) sc->bge_flags |= BGE_FLAG_BER_BUG; Modified: stable/7/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/7/sys/dev/bge/if_bgereg.h Sat Jan 23 00:53:03 2010 (r202860) +++ stable/7/sys/dev/bge/if_bgereg.h Sat Jan 23 01:20:59 2010 (r202861) @@ -2138,6 +2138,7 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM5754M 0x1672 #define BCOM_DEVICEID_BCM5755 0x167B #define BCOM_DEVICEID_BCM5755M 0x1673 +#define BCOM_DEVICEID_BCM5756 0x1674 #define BCOM_DEVICEID_BCM5761 0x1681 #define BCOM_DEVICEID_BCM5761E 0x1680 #define BCOM_DEVICEID_BCM5761S 0x1688 From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 01:25:09 2010 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 A1E791065676; Sat, 23 Jan 2010 01:25:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7706D8FC16; Sat, 23 Jan 2010 01:25:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N1P9m2054152; Sat, 23 Jan 2010 01:25:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N1P9VT054149; Sat, 23 Jan 2010 01:25:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001230125.o0N1P9VT054149@svn.freebsd.org> From: Xin LI Date: Sat, 23 Jan 2010 01:25: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: r202862 - stable/8/sys/dev/bge 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: Sat, 23 Jan 2010 01:25:09 -0000 Author: delphij Date: Sat Jan 23 01:25:09 2010 New Revision: 202862 URL: http://svn.freebsd.org/changeset/base/202862 Log: MFC r202268: o Add PCI ID for BCM 5756. o Don't enable BGE_FLAG_BER_BUG on both 5722 and 5756, and based on their PCI IDs rather than their chip IDs. Reported by: several PC-BSD users via kmoore Reviewed by: yongari, imp, jhb, davidch Sponsored by: iXsystems, Inc. Modified: stable/8/sys/dev/bge/if_bge.c stable/8/sys/dev/bge/if_bgereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Sat Jan 23 01:20:59 2010 (r202861) +++ stable/8/sys/dev/bge/if_bge.c Sat Jan 23 01:25:09 2010 (r202862) @@ -187,6 +187,7 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM5754M }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5755 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5755M }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5756 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761E }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761S }, @@ -2612,7 +2613,8 @@ bge_attach(device_t dev) sc->bge_asicrev == BGE_ASICREV_BCM5761 || sc->bge_asicrev == BGE_ASICREV_BCM5784 || sc->bge_asicrev == BGE_ASICREV_BCM5787) { - if (sc->bge_chipid != BGE_CHIPID_BCM5722_A0) + if (pci_get_device(dev) != BCOM_DEVICEID_BCM5722 && + pci_get_device(dev) != BCOM_DEVICEID_BCM5756) sc->bge_flags |= BGE_FLAG_JITTER_BUG; } else if (sc->bge_asicrev != BGE_ASICREV_BCM5906) sc->bge_flags |= BGE_FLAG_BER_BUG; Modified: stable/8/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/8/sys/dev/bge/if_bgereg.h Sat Jan 23 01:20:59 2010 (r202861) +++ stable/8/sys/dev/bge/if_bgereg.h Sat Jan 23 01:25:09 2010 (r202862) @@ -2138,6 +2138,7 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM5754M 0x1672 #define BCOM_DEVICEID_BCM5755 0x167B #define BCOM_DEVICEID_BCM5755M 0x1673 +#define BCOM_DEVICEID_BCM5756 0x1674 #define BCOM_DEVICEID_BCM5761 0x1681 #define BCOM_DEVICEID_BCM5761E 0x1680 #define BCOM_DEVICEID_BCM5761S 0x1688 From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 01:44:31 2010 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 2F9101065679; Sat, 23 Jan 2010 01:44:31 +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 1F1088FC15; Sat, 23 Jan 2010 01:44:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N1iVi1059106; Sat, 23 Jan 2010 01:44:31 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N1iVed059104; Sat, 23 Jan 2010 01:44:31 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001230144.o0N1iVed059104@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 23 Jan 2010 01:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202863 - head/sys/dev/cxgb 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: Sat, 23 Jan 2010 01:44:31 -0000 Author: np Date: Sat Jan 23 01:44:30 2010 New Revision: 202863 URL: http://svn.freebsd.org/changeset/base/202863 Log: Don't forget to release the adapter lock for a no-op. Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Sat Jan 23 01:25:09 2010 (r202862) +++ head/sys/dev/cxgb/cxgb_main.c Sat Jan 23 01:44:30 2010 (r202863) @@ -2074,6 +2074,8 @@ fail: p->if_flags = ifp->if_flags; } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) error = cxgb_uninit_locked(p); + else + ADAPTER_UNLOCK(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); break; From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 03:19:13 2010 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 ACD6A106566B; Sat, 23 Jan 2010 03:19:13 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 813018FC14; Sat, 23 Jan 2010 03:19:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N3JDGe080696; Sat, 23 Jan 2010 03:19:13 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N3JD36080692; Sat, 23 Jan 2010 03:19:13 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001230319.o0N3JD36080692@svn.freebsd.org> From: Neel Natu Date: Sat, 23 Jan 2010 03:19: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: r202864 - in head/sys/mips: include mips sibyte 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: Sat, 23 Jan 2010 03:19:13 -0000 Author: neel Date: Sat Jan 23 03:19:13 2010 New Revision: 202864 URL: http://svn.freebsd.org/changeset/base/202864 Log: Remove Sibyte specific code from locore.S that sets the k0seg coherency. Move it to platform_start() instead. Approved by: imp (mentor) Modified: head/sys/mips/include/cpu.h head/sys/mips/mips/locore.S head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Sat Jan 23 01:44:30 2010 (r202863) +++ head/sys/mips/include/cpu.h Sat Jan 23 03:19:13 2010 (r202864) @@ -163,11 +163,8 @@ * The bits in the CONFIG register */ #define CFG_K0_UNCACHED 2 -#if defined(CPU_SB1) -#define CFG_K0_COHERENT 5 /* cacheable coherent */ -#else #define CFG_K0_CACHED 3 -#endif +#define CFG_K0_MASK 0x7 /* * The bits in the context register. Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Sat Jan 23 01:44:30 2010 (r202863) +++ head/sys/mips/mips/locore.S Sat Jan 23 03:19:13 2010 (r202864) @@ -128,11 +128,7 @@ VECTOR(_locore, unknown) mtc0 t2, COP_0_STATUS_REG COP0_SYNC /* Make sure KSEG0 is cached */ -#ifdef CPU_SB1 - li t0, CFG_K0_COHERENT -#else li t0, CFG_K0_CACHED -#endif mtc0 t0, MIPS_COP_0_CONFIG COP0_SYNC Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Sat Jan 23 01:44:30 2010 (r202863) +++ head/sys/mips/sibyte/sb_machdep.c Sat Jan 23 03:19:13 2010 (r202864) @@ -230,12 +230,29 @@ platform_trap_exit(void) } +static void +kseg0_map_coherent(void) +{ + uint32_t config; + const int CFG_K0_COHERENT = 5; + + config = mips_rd_config(); + config &= ~CFG_K0_MASK; + config |= CFG_K0_COHERENT; + mips_wr_config(config); +} + void platform_start(__register_t a0, __register_t a1, __register_t a2, __register_t a3) { vm_offset_t kernend; + /* + * Make sure that kseg0 is mapped cacheable-coherent + */ + kseg0_map_coherent(); + /* clear the BSS and SBSS segments */ memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata); kernend = round_page((vm_offset_t)&end); From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 05:37:11 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 94EEC106568D for ; Sat, 23 Jan 2010 05:37:11 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from xps.daemonology.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with SMTP id 13D4615148F for ; Sat, 23 Jan 2010 05:37:10 +0000 (UTC) Received: (qmail 21445 invoked from network); 23 Jan 2010 05:37:10 -0000 Received: from unknown (HELO xps.daemonology.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2010 05:37:10 -0000 Message-ID: <4B5A8B06.2090608@freebsd.org> Date: Fri, 22 Jan 2010 21:37:10 -0800 From: Colin Percival User-Agent: Thunderbird 2.0.0.23 (X11/20091215) MIME-Version: 1.0 To: Edward Tomasz Napierala References: <201001221142.o0MBgi5l058119@svn.freebsd.org> In-Reply-To: <201001221142.o0MBgi5l058119@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r202805 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Sat, 23 Jan 2010 05:37:11 -0000 Edward Tomasz Napierala wrote: > Log: > MFC c195785: Thanks! > Fix permission handling for extended attributes in ZFS. [...] For the record, ZFS extattrs on stable/7 are still completely broken for reasons entirely unrelated to this (namei_atvp is not implemented, and as a result any attempt to look for extended attributes end up looking for files in .) but I have a patch which I expect to commit RSN (just waiting for review). -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 05:59:10 2010 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 B51441065676; Sat, 23 Jan 2010 05:59:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A40118FC0C; Sat, 23 Jan 2010 05:59:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N5xA1c015699; Sat, 23 Jan 2010 05:59:10 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N5xAeN015697; Sat, 23 Jan 2010 05:59:10 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201001230559.o0N5xAeN015697@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 23 Jan 2010 05:59: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: r202865 - 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: Sat, 23 Jan 2010 05:59:10 -0000 Author: gonzo Date: Sat Jan 23 05:59:10 2010 New Revision: 202865 URL: http://svn.freebsd.org/changeset/base/202865 Log: - Move .text and all sections up to .bss inclusive to the beginning of the script. Trampoline kernel builder assumes that .text goes right after headers and places startup function first in .text segment. Modified: head/sys/conf/ldscript.mips Modified: head/sys/conf/ldscript.mips ============================================================================== --- head/sys/conf/ldscript.mips Sat Jan 23 03:19:13 2010 (r202864) +++ head/sys/conf/ldscript.mips Sat Jan 23 05:59:10 2010 (r202865) @@ -44,6 +44,25 @@ SECTIONS { /* Read-only sections, merged into text segment: */ . = KERNLOADADDR + SIZEOF_HEADERS; + .text : + { + *(.trap) + *(.text) + *(.text.*) + *(.stub) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t.*) + } =0x1000000 + .fini : + { + KEEP (*(.fini)) + } =0x1000000 + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } @@ -163,25 +182,6 @@ SECTIONS { KEEP (*(.init)) } =0x1000000 - .text : - { - *(.trap) - *(.text) - *(.text.*) - *(.stub) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.gnu.linkonce.t.*) - } =0x1000000 - .fini : - { - KEEP (*(.fini)) - } =0x1000000 - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); - .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } .reginfo : { *(.reginfo) } .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) } .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) } From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 06:29:35 2010 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 4BC731065672; Sat, 23 Jan 2010 06:29:35 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39A558FC16; Sat, 23 Jan 2010 06:29:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N6TZsb022393; Sat, 23 Jan 2010 06:29:35 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N6TZMY022390; Sat, 23 Jan 2010 06:29:35 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001230629.o0N6TZMY022390@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 23 Jan 2010 06:29: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: r202866 - stable/8/sys/boot/ia64/efi 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: Sat, 23 Jan 2010 06:29:35 -0000 Author: marcel Date: Sat Jan 23 06:29:34 2010 New Revision: 202866 URL: http://svn.freebsd.org/changeset/base/202866 Log: MFC rev 202552: Add command-line option -dev to set the default value of the currdev variable. Modified: stable/8/sys/boot/ia64/efi/main.c stable/8/sys/boot/ia64/efi/version Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/boot/ia64/efi/main.c ============================================================================== --- stable/8/sys/boot/ia64/efi/main.c Sat Jan 23 05:59:10 2010 (r202865) +++ stable/8/sys/boot/ia64/efi/main.c Sat Jan 23 06:29:34 2010 (r202866) @@ -50,7 +50,6 @@ extern char bootprog_rev[]; extern char bootprog_date[]; extern char bootprog_maker[]; -struct devdesc currdev; /* our current device */ struct arch_switch archsw; /* MI/MD interface boundary */ extern u_int64_t ia64_pal_entry; @@ -101,10 +100,49 @@ find_pal_proc(void) return; } +static int +usc2cmp(CHAR16 *s1, CHAR16 *s2) +{ + + while (*s1 == *s2++) { + if (*s1++ == 0) + return (0); + } + return (*s1 - *(s2 - 1)); +} + +static char * +get_dev_option(int argc, CHAR16 *argv[]) +{ + static char dev[32]; + CHAR16 *arg; + char *devp; + int i, j; + + devp = NULL; + for (i = 0; i < argc; i++) { + if (usc2cmp(argv[i], L"-dev") == 0 && i < argc - 1) { + arg = argv[i + 1]; + j = 0; + while (j < sizeof(dev) && *arg != 0) + dev[j++] = *arg++; + if (j == sizeof(dev)) + j--; + dev[j] = '\0'; + devp = dev; + break; + } + } + + return (devp); +} + EFI_STATUS main(int argc, CHAR16 *argv[]) { + struct devdesc currdev; EFI_LOADED_IMAGE *img; + char *dev; int i; /* @@ -115,6 +153,10 @@ main(int argc, CHAR16 *argv[]) */ cons_probe(); + printf("\n"); + printf("%s, Revision %s\n", bootprog_name, bootprog_rev); + printf("(%s, %s)\n", bootprog_maker, bootprog_date); + find_pal_proc(); /* @@ -124,16 +166,6 @@ main(int argc, CHAR16 *argv[]) if (devsw[i]->dv_init != NULL) (devsw[i]->dv_init)(); - /* Get our loaded image protocol interface structure. */ - BS->HandleProtocol(IH, &imgid, (VOID**)&img); - - printf("\n"); - printf("%s, Revision %s\n", bootprog_name, bootprog_rev); - printf("(%s, %s)\n", bootprog_maker, bootprog_date); - - efi_handle_lookup(img->DeviceHandle, &currdev.d_dev, &currdev.d_unit); - currdev.d_type = currdev.d_dev->dv_type; - /* * Disable the watchdog timer. By default the boot manager sets * the timer to 5 minutes before invoking a boot option. If we @@ -145,13 +177,24 @@ main(int argc, CHAR16 *argv[]) */ BS->SetWatchdogTimer(0, 0, 0, NULL); - env_setenv("currdev", EV_VOLATILE, ia64_fmtdev(&currdev), - ia64_setcurrdev, env_nounset); + /* Get our loaded image protocol interface structure. */ + BS->HandleProtocol(IH, &imgid, (VOID**)&img); + + bzero(&currdev, sizeof(currdev)); + efi_handle_lookup(img->DeviceHandle, &currdev.d_dev, &currdev.d_unit); + currdev.d_type = currdev.d_dev->dv_type; + env_setenv("loaddev", EV_VOLATILE, ia64_fmtdev(&currdev), env_noset, env_nounset); + dev = get_dev_option(argc, argv); + if (dev == NULL) + dev = ia64_fmtdev(&currdev); + + env_setenv("currdev", EV_VOLATILE, dev, ia64_setcurrdev, env_nounset); + setenv("LINES", "24", 1); /* optional */ - + archsw.arch_autoload = ia64_autoload; archsw.arch_getdev = ia64_getdev; archsw.arch_copyin = ia64_copyin; Modified: stable/8/sys/boot/ia64/efi/version ============================================================================== --- stable/8/sys/boot/ia64/efi/version Sat Jan 23 05:59:10 2010 (r202865) +++ stable/8/sys/boot/ia64/efi/version Sat Jan 23 06:29:34 2010 (r202866) @@ -3,6 +3,7 @@ $FreeBSD$ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important. Make sure the current version number is on line 6. +2.1: Add support for "-dev " argument parsing. 2.0: Provide devices based on the block I/O protocol, rather than the simple file services protocol. Use the FreeBSD file system code on top of those devices to access files. From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 06:42:47 2010 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 D436F10656B3; Sat, 23 Jan 2010 06:42:47 +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 C35A88FC14; Sat, 23 Jan 2010 06:42:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N6gl3x025362; Sat, 23 Jan 2010 06:42:47 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N6glho025356; Sat, 23 Jan 2010 06:42:47 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001230642.o0N6glho025356@svn.freebsd.org> From: Warner Losh Date: Sat, 23 Jan 2010 06:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202867 - head/sys/mips/cavium 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: Sat, 23 Jan 2010 06:42:47 -0000 Author: imp Date: Sat Jan 23 06:42:47 2010 New Revision: 202867 URL: http://svn.freebsd.org/changeset/base/202867 Log: Eliminate octeonregs.h. It was a copy of maltaregs.h with s/malta/octeon/gi done... Deleted: head/sys/mips/cavium/octeonreg.h Modified: head/sys/mips/cavium/obio.c head/sys/mips/cavium/octeon_machdep.c head/sys/mips/cavium/octeon_pcmap_regs.h head/sys/mips/cavium/uart_bus_octeonusart.c head/sys/mips/cavium/uart_cpu_octeonusart.c Modified: head/sys/mips/cavium/obio.c ============================================================================== --- head/sys/mips/cavium/obio.c Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/obio.c Sat Jan 23 06:42:47 2010 (r202867) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include int obio_probe(device_t); @@ -81,7 +81,7 @@ obio_attach(device_t dev) struct obio_softc *sc = device_get_softc(dev); sc->oba_st = mips_bus_space_generic; - sc->oba_addr = OCTEON_UART0ADR; + sc->oba_addr = OCTEON_MIO_UART0; sc->oba_size = 0x10000; sc->oba_rman.rm_type = RMAN_ARRAY; sc->oba_rman.rm_descr = "OBIO I/O"; @@ -126,7 +126,8 @@ obio_alloc_resource(device_t bus, device case SYS_RES_IOPORT: rm = &sc->oba_rman; bt = sc->oba_st; - bh = device_get_unit(child) ? OCTEON_UART1ADR : OCTEON_UART0ADR; + bh = device_get_unit(child) ? + OCTEON_MIO_UART1 : OCTEON_MIO_UART0; start = bh; break; default: Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 06:42:47 2010 (r202867) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/mips/cavium/octeon_pcmap_regs.h ============================================================================== --- head/sys/mips/cavium/octeon_pcmap_regs.h Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/octeon_pcmap_regs.h Sat Jan 23 06:42:47 2010 (r202867) @@ -52,8 +52,7 @@ extern struct pcpu *cpuid_to_pcpu[]; #define OCTEON_SYNCW __asm __volatile (".word 0x10f" : : ) #define OCTEON_SYNCWS __asm __volatile (".word 0x14f" : : ) -//#if defined(__mips_n32) || defined(__mips_n64) -#if defined(__not_used) +#if defined(__mips_n32) || defined(__mips_n64) static inline void oct_write64 (uint64_t csr_addr, uint64_t val64) { @@ -951,6 +950,8 @@ typedef union { /* * Octeon UART unit */ +#define OCTEON_MIO_UART0 0x8001180000000800ull +#define OCTEON_MIO_UART1 0x8001180000000C00ull #define OCTEON_MIO_UART0_THR 0x8001180000000840ull #define OCTEON_MIO_UART1_THR 0x8001180000000C40ull #define OCTEON_MIO_UART0_LSR 0x8001180000000828ull @@ -960,6 +961,7 @@ typedef union { #define OCTEON_MIO_UART0_USR 0x8001180000000938ull #define OCTEON_MIO_UART1_USR 0x8001180000000D38ull #define OCTEON_MIO_ADDR_HI24 0x800118 +#define OCTEON_MIO_UART_SIZE 0x400ull /* Modified: head/sys/mips/cavium/uart_bus_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_bus_octeonusart.c Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/uart_bus_octeonusart.c Sat Jan 23 06:42:47 2010 (r202867) @@ -53,10 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include -/* - * XXXMIPS: - */ -#include +#include #include "uart_if.h" @@ -96,7 +93,6 @@ uart_octeon_probe(device_t dev) sc = device_get_softc(dev); sc->sc_class = &uart_oct16550_class; -#if 1 /* * We inherit the settings from the systme console. Note, the bst * bad bus_space_map are bogus here, but obio doesn't yet support @@ -105,10 +101,9 @@ uart_octeon_probe(device_t dev) sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); sc->sc_bas.bst = uart_bus_space_mem; - if (bus_space_map(sc->sc_bas.bst, OCTEON_UART0ADR, OCTEON_UART_SIZE, + if (bus_space_map(sc->sc_bas.bst, OCTEON_MIO_UART0, OCTEON_MIO_UART_SIZE, 0, &sc->sc_bas.bsh) != 0) return (ENXIO); -#endif return (uart_bus_probe(dev, sc->sc_bas.regshft, 0, 0, unit)); } Modified: head/sys/mips/cavium/uart_cpu_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_cpu_octeonusart.c Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/uart_cpu_octeonusart.c Sat Jan 23 06:42:47 2010 (r202867) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include bus_space_tag_t uart_bus_space_io; @@ -177,7 +176,7 @@ uart_cpu_getdev(int devtype, struct uart */ di->ops = uart_getops(class); di->bas.chan = 0; - if (bus_space_map(di->bas.bst, OCTEON_UART0ADR, OCTEON_UART_SIZE, + if (bus_space_map(di->bas.bst, OCTEON_MIO_UART0, OCTEON_MIO_UART_SIZE, 0, &di->bas.bsh) != 0) return (ENXIO); di->bas.regshft = 0; From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 07:52:13 2010 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 9E947106566C; Sat, 23 Jan 2010 07:52:13 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 751598FC14; Sat, 23 Jan 2010 07:52:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7qDJ8040484; Sat, 23 Jan 2010 07:52:13 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7qD5Q040482; Sat, 23 Jan 2010 07:52:13 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230752.o0N7qD5Q040482@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:52: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: r202868 - head/lib/libarchive 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: Sat, 23 Jan 2010 07:52:13 -0000 Author: kientzle Date: Sat Jan 23 07:52:13 2010 New Revision: 202868 URL: http://svn.freebsd.org/changeset/base/202868 Log: Fix a memory leak when a filter fails to initialize. Modified: head/lib/libarchive/archive_read.c Modified: head/lib/libarchive/archive_read.c ============================================================================== --- head/lib/libarchive/archive_read.c Sat Jan 23 06:42:47 2010 (r202867) +++ head/lib/libarchive/archive_read.c Sat Jan 23 07:52:13 2010 (r202868) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); static int build_stream(struct archive_read *); static int choose_format(struct archive_read *); +static int cleanup_filters(struct archive_read *); static struct archive_vtable *archive_read_vtable(void); static int _archive_read_close(struct archive *); static int _archive_read_finish(struct archive *); @@ -393,14 +394,13 @@ build_stream(struct archive_read *a) free(filter); return (r); } + a->filter = filter; /* Verify the filter by asking it for some data. */ __archive_read_filter_ahead(filter, 1, &avail); if (avail < 0) { - /* If the read failed, bail out now. */ - free(filter); - return (avail); + cleanup_filters(a); + return (ARCHIVE_FATAL); } - a->filter = filter; } } @@ -738,18 +738,10 @@ _archive_read_close(struct archive *_a) /* TODO: Clean up the formatters. */ - /* Clean up the filter pipeline. */ - while (a->filter != NULL) { - struct archive_read_filter *t = a->filter->upstream; - if (a->filter->close != NULL) { - r1 = (a->filter->close)(a->filter); - if (r1 < r) - r = r1; - } - free(a->filter->buffer); - free(a->filter); - a->filter = t; - } + /* Release the filter objects. */ + r1 = cleanup_filters(a); + if (r1 < r) + r = r1; /* Release the bidder objects. */ n = sizeof(a->bidders)/sizeof(a->bidders[0]); @@ -764,6 +756,25 @@ _archive_read_close(struct archive *_a) return (r); } +static int +cleanup_filters(struct archive_read *a) +{ + int r = ARCHIVE_OK; + /* Clean up the filter pipeline. */ + while (a->filter != NULL) { + struct archive_read_filter *t = a->filter->upstream; + if (a->filter->close != NULL) { + int r1 = (a->filter->close)(a->filter); + if (r1 < r) + r = r1; + } + free(a->filter->buffer); + free(a->filter); + a->filter = t; + } + return r; +} + /* * Release memory and other resources. */ From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 07:52:45 2010 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 5516C106568D; Sat, 23 Jan 2010 07:52:45 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 458F78FC27; Sat, 23 Jan 2010 07:52:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7qjw2040649; Sat, 23 Jan 2010 07:52:45 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7qjvS040647; Sat, 23 Jan 2010 07:52:45 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230752.o0N7qjvS040647@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202869 - head/lib/libarchive 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: Sat, 23 Jan 2010 07:52:45 -0000 Author: kientzle Date: Sat Jan 23 07:52:44 2010 New Revision: 202869 URL: http://svn.freebsd.org/changeset/base/202869 Log: Initialize the allocated 'struct zip'. Modified: head/lib/libarchive/archive_write_set_format_zip.c Modified: head/lib/libarchive/archive_write_set_format_zip.c ============================================================================== --- head/lib/libarchive/archive_write_set_format_zip.c Sat Jan 23 07:52:13 2010 (r202868) +++ head/lib/libarchive/archive_write_set_format_zip.c Sat Jan 23 07:52:44 2010 (r202869) @@ -231,7 +231,7 @@ archive_write_set_format_zip(struct arch if (a->format_destroy != NULL) (a->format_destroy)(a); - zip = (struct zip *) malloc(sizeof(*zip)); + zip = (struct zip *) calloc(1, sizeof(*zip)); if (zip == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate zip data"); return (ARCHIVE_FATAL); From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 07:54:07 2010 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 4BF3D106568D; Sat, 23 Jan 2010 07:54:07 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0058FC22; Sat, 23 Jan 2010 07:54:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7s753040991; Sat, 23 Jan 2010 07:54:07 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7s70b040987; Sat, 23 Jan 2010 07:54:07 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201001230754.o0N7s70b040987@svn.freebsd.org> From: Joerg Wunsch Date: Sat, 23 Jan 2010 07:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202870 - head/sys/dev/ieee488 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: Sat, 23 Jan 2010 07:54:07 -0000 Author: joerg Date: Sat Jan 23 07:54:06 2010 New Revision: 202870 URL: http://svn.freebsd.org/changeset/base/202870 Log: Overhaul of the pcii driver: . Properly allocate all IO space resources. These cards scatter their IO addresses over a range of 0x1600 bytes, and they require an additional address for "special interrupt handling". . Implement the "special interrupt handling" per the GPIB-PCIIA Technical Reference Manual; this was apparently not declared for the clone card this driver has been originally implemented for, but it turned out to be needed for both, an original NI brand PCII/PCIIA card as well as the Axiom AX5488 clone. . Add some diagnostic messages for various resource allocation etc. failures during probe. . Add some comments about the structure of the IO address space that is used by these cards. MFC after: 1 day Modified: head/sys/dev/ieee488/pcii.c head/sys/dev/ieee488/upd7210.c head/sys/dev/ieee488/upd7210.h Modified: head/sys/dev/ieee488/pcii.c ============================================================================== --- head/sys/dev/ieee488/pcii.c Sat Jan 23 07:52:44 2010 (r202869) +++ head/sys/dev/ieee488/pcii.c Sat Jan 23 07:54:06 2010 (r202870) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 Poul-Henning Kamp + * Copyright (c) 2010 Joerg Wunsch * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,6 +34,8 @@ * * Tested and known working: * "B&C Microsystems PC488A-0" + * "National Instruments GPIB-PCII/PCIIA" (in PCIIa mode) + * "Axiom AX5488" * */ @@ -56,7 +59,7 @@ __FBSDID("$FreeBSD$"); struct pcii_softc { int foo; - struct resource *res[3]; + struct resource *res[11]; void *intr_handler; struct upd7210 upd7210; }; @@ -79,6 +82,14 @@ static struct resource_spec pcii_res_spe { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE}, { SYS_RES_DRQ, 0, RF_ACTIVE | RF_SHAREABLE | RF_OPTIONAL}, { SYS_RES_IOPORT, 0, RF_ACTIVE}, + { SYS_RES_IOPORT, 1, RF_ACTIVE}, + { SYS_RES_IOPORT, 2, RF_ACTIVE}, + { SYS_RES_IOPORT, 3, RF_ACTIVE}, + { SYS_RES_IOPORT, 4, RF_ACTIVE}, + { SYS_RES_IOPORT, 5, RF_ACTIVE}, + { SYS_RES_IOPORT, 6, RF_ACTIVE}, + { SYS_RES_IOPORT, 7, RF_ACTIVE}, + { SYS_RES_IOPORT, 8, RF_ACTIVE | RF_SHAREABLE}, { -1, 0, 0 } }; @@ -92,7 +103,7 @@ static int pcii_probe(device_t dev) { int rid, i, j; - u_long start, count; + u_long start, count, addr; int error = 0; struct pcii_softc *sc; @@ -102,30 +113,89 @@ pcii_probe(device_t dev) rid = 0; if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count) != 0) return ENXIO; - if ((start & 0x3ff) != 0x2e1) + /* + * The PCIIA decodes a fixed pattern of 0x2e1 for the lower 10 + * address bits A0 ... A9. Bits A10 through A12 are used by + * the µPD7210 register select lines. This makes the + * individual 7210 register being 0x400 bytes apart in the ISA + * bus address space. Address bits A13 and A14 are compared + * to a DIP switch setting on the card, allowing for up to 4 + * different cards being installed (at base addresses 0x2e1, + * 0x22e1, 0x42e1, and 0x62e1, respectively). A15 has been + * used to select an optional on-board time-of-day clock chip + * (MM58167A) on the original PCIIA rather than the µPD7210 + * (which is not implemented on later boards). The + * documentation states the respective addresses for that chip + * should be handled as reserved addresses, which we don't do + * (right now). Finally, the IO addresses 0x2f0 ... 0x2f7 for + * a "special interrupt handling feature" (re-enable + * interrupts so the IRQ can be shared). + * + * Usually, the user will only set the base address in the + * device hints, so we handle the rest here. + * + * (Source: GPIB-PCIIA Technical Reference Manual, September + * 1989 Edition, National Instruments.) + */ + if ((start & 0x3ff) != 0x2e1) { + printf("pcii_probe: PCIIA base address 0x%lx not " + "0x2e1/0x22e1/0x42e1/0x62e1\n", + start); return (ENXIO); - count = 1; - if (bus_set_resource(dev, SYS_RES_IOPORT, rid, start, count) != 0) + } + + for (rid = 0, addr = start; rid < 8; rid++, addr += 0x400) { + if (bus_set_resource(dev, SYS_RES_IOPORT, rid, addr, 1) != 0) { + printf("pcii_probe: could not set IO port 0x%lx\n", + addr); + return (ENXIO); + } + } + if (bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &count) != 0) { + printf("pcii_probe: cannot obtain IRQ level\n"); + return ENXIO; + } + if (start > 7) { + printf("pcii_probe: IRQ level %lu too high\n", start); return ENXIO; + } + + if (bus_set_resource(dev, SYS_RES_IOPORT, 8, 0x2f0 + start, 1) != 0) { + printf("pcii_probe: could not set IO port 0x%3lx\n", + 0x2f0 + start); + return (ENXIO); + } + error = bus_alloc_resources(dev, pcii_res_spec, sc->res); - if (error) + if (error) { + printf("pcii_probe: Could not allocate resources\n"); return (error); + } error = ENXIO; + /* + * Perform some basic tests on the µPD7210 registers. At + * least *some* register must read different from 0x00 or + * 0xff. + */ for (i = 0; i < 8; i++) { - j = bus_read_1(sc->res[2], i * 0x400); + j = bus_read_1(sc->res[2 + i], 0); if (j != 0x00 && j != 0xff) error = 0; } + /* SPSR/SPMR read/write test */ if (!error) { - bus_write_1(sc->res[2], 3 * 0x400, 0x55); - if (bus_read_1(sc->res[2], 3 * 0x400) != 0x55) + bus_write_1(sc->res[2 + 3], 0, 0x55); + if (bus_read_1(sc->res[2 + 3], 0) != 0x55) error = ENXIO; } if (!error) { - bus_write_1(sc->res[2], 3 * 0x400, 0xaa); - if (bus_read_1(sc->res[2], 3 * 0x400) != 0xaa) + bus_write_1(sc->res[2 + 3], 0, 0xaa); + if (bus_read_1(sc->res[2 + 3], 0) != 0xaa) error = ENXIO; } + if (error) + printf("pcii_probe: probe failure\n"); + bus_release_resources(dev, pcii_res_spec, sc->res); return (error); } @@ -134,6 +204,7 @@ static int pcii_attach(device_t dev) { struct pcii_softc *sc; + u_long start, count; int unit; int rid; int error = 0; @@ -144,6 +215,11 @@ pcii_attach(device_t dev) device_set_desc(dev, "PCII IEEE-4888 controller"); + if (bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &count) != 0) { + printf("pcii_attach: cannot obtain IRQ number\n"); + return ENXIO; + } + error = bus_alloc_resources(dev, pcii_res_spec, sc->res); if (error) return (error); @@ -157,9 +233,9 @@ pcii_attach(device_t dev) } for (rid = 0; rid < 8; rid++) { - sc->upd7210.reg_res[rid] = sc->res[2]; - sc->upd7210.reg_offset[rid] = 0x400 * rid; + sc->upd7210.reg_res[rid] = sc->res[2 + rid]; } + sc->upd7210.irq_clear_res = sc->res[10]; if (sc->res[1] == NULL) sc->upd7210.dmachan = -1; Modified: head/sys/dev/ieee488/upd7210.c ============================================================================== --- head/sys/dev/ieee488/upd7210.c Sat Jan 23 07:52:44 2010 (r202869) +++ head/sys/dev/ieee488/upd7210.c Sat Jan 23 07:54:06 2010 (r202870) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 Poul-Henning Kamp + * Copyright (c) 2010 Joerg Wunsch * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -71,7 +72,7 @@ upd7210_rd(struct upd7210 *u, enum upd72 { u_int r; - r = bus_read_1(u->reg_res[reg], u->reg_offset[reg]); + r = bus_read_1(u->reg_res[reg], 0); u->rreg[reg] = r; return (r); } @@ -80,7 +81,7 @@ void upd7210_wr(struct upd7210 *u, enum upd7210_wreg reg, u_int val) { - bus_write_1(u->reg_res[reg], u->reg_offset[reg], val); + bus_write_1(u->reg_res[reg], 0, val); u->wreg[reg] = val; if (reg == AUXMR) u->wreg[8 + (val >> 5)] = val & 0x1f; @@ -96,19 +97,35 @@ upd7210intr(void *arg) mtx_lock(&u->mutex); isr1 = upd7210_rd(u, ISR1); isr2 = upd7210_rd(u, ISR2); - if (u->busy == 0 || u->irq == NULL || !u->irq(u, 1)) { + if (isr1 != 0 || isr2 != 0) { + if (u->busy == 0 || u->irq == NULL || !u->irq(u, 1)) { #if 0 - printf("upd7210intr [%02x %02x %02x", - upd7210_rd(u, DIR), isr1, isr2); - printf(" %02x %02x %02x %02x %02x] ", - upd7210_rd(u, SPSR), - upd7210_rd(u, ADSR), - upd7210_rd(u, CPTR), - upd7210_rd(u, ADR0), + printf("upd7210intr [%02x %02x %02x", + upd7210_rd(u, DIR), isr1, isr2); + printf(" %02x %02x %02x %02x %02x] ", + upd7210_rd(u, SPSR), + upd7210_rd(u, ADSR), + upd7210_rd(u, CPTR), + upd7210_rd(u, ADR0), upd7210_rd(u, ADR1)); - upd7210_print_isr(isr1, isr2); - printf("\n"); + upd7210_print_isr(isr1, isr2); + printf("\n"); #endif + } + /* + * "special interrupt handling" + * + * In order to implement shared IRQs, the original + * PCIIa uses IO locations 0x2f0 + (IRQ#) as an output + * location. If an ISR for a particular card has + * detected this card triggered the IRQ, it must reset + * the card's IRQ by writing (anything) to that IO + * location. + * + * Some clones apparently don't implement this + * feature, but National Instrument cards do. + */ + bus_write_1(u->irq_clear_res, 0, 42); } mtx_unlock(&u->mutex); } Modified: head/sys/dev/ieee488/upd7210.h ============================================================================== --- head/sys/dev/ieee488/upd7210.h Sat Jan 23 07:52:44 2010 (r202869) +++ head/sys/dev/ieee488/upd7210.h Sat Jan 23 07:54:06 2010 (r202870) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 Poul-Henning Kamp + * Copyright (c) 2010 Joerg Wunsch * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,7 +49,7 @@ typedef int upd7210_irq_t(struct upd7210 struct upd7210 { struct resource *reg_res[8]; - u_int reg_offset[8]; + struct resource *irq_clear_res; int dmachan; int unit; From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 07:54:16 2010 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 4DBC710657AB; Sat, 23 Jan 2010 07:54:16 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DAE98FC13; Sat, 23 Jan 2010 07:54:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7sGnX041060; Sat, 23 Jan 2010 07:54:16 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7sGuW041058; Sat, 23 Jan 2010 07:54:16 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230754.o0N7sGuW041058@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202871 - head/lib/libarchive 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: Sat, 23 Jan 2010 07:54:16 -0000 Author: kientzle Date: Sat Jan 23 07:54:15 2010 New Revision: 202871 URL: http://svn.freebsd.org/changeset/base/202871 Log: If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't be processed any further) and a suitable error string. In particular, this improves the error-reporting when cpio -o is given a nonexistent filename. Modified: head/lib/libarchive/archive_read_disk_entry_from_file.c Modified: head/lib/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- head/lib/libarchive/archive_read_disk_entry_from_file.c Sat Jan 23 07:54:06 2010 (r202870) +++ head/lib/libarchive/archive_read_disk_entry_from_file.c Sat Jan 23 07:54:15 2010 (r202871) @@ -121,18 +121,27 @@ archive_read_disk_entry_from_file(struct */ #if HAVE_FSTAT if (fd >= 0) { - if (fstat(fd, &s) != 0) - return (ARCHIVE_FATAL); + if (fstat(fd, &s) != 0) { + archive_set_error(&a->archive, errno, + "Can't fstat"); + return (ARCHIVE_FAILED); + } } else #endif #if HAVE_LSTAT if (!a->follow_symlinks) { - if (lstat(path, &s) != 0) - return (ARCHIVE_FATAL); + if (lstat(path, &s) != 0) { + archive_set_error(&a->archive, errno, + "Can't lstat %s", path); + return (ARCHIVE_FAILED); + } } else #endif - if (stat(path, &s) != 0) - return (ARCHIVE_FATAL); + if (stat(path, &s) != 0) { + archive_set_error(&a->archive, errno, + "Can't stat %s", path); + return (ARCHIVE_FAILED); + } st = &s; } archive_entry_copy_stat(entry, st); @@ -159,7 +168,7 @@ archive_read_disk_entry_from_file(struct if (lnklen < 0) { archive_set_error(&a->archive, errno, "Couldn't read link data"); - return (ARCHIVE_WARN); + return (ARCHIVE_FAILED); } linkbuffer[lnklen] = 0; archive_entry_set_symlink(entry, linkbuffer); From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 07:55:54 2010 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 53514106568D; Sat, 23 Jan 2010 07:55:54 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42C3E8FC14; Sat, 23 Jan 2010 07:55:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7tsuk041443; Sat, 23 Jan 2010 07:55:54 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7tsx2041441; Sat, 23 Jan 2010 07:55:54 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230755.o0N7tsx2041441@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202872 - head/lib/libarchive 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: Sat, 23 Jan 2010 07:55:54 -0000 Author: kientzle Date: Sat Jan 23 07:55:53 2010 New Revision: 202872 URL: http://svn.freebsd.org/changeset/base/202872 Log: Use a simpler memory-management strategy for the file objects. Instead of trying to reference-count them and free them as soon as they are no longer needed, we now just keep them around and free them all when we release the archive object. This fixes a number of minor memory leaks, especially when reading damaged archives. Modified: head/lib/libarchive/archive_read_support_format_iso9660.c Modified: head/lib/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_iso9660.c Sat Jan 23 07:54:15 2010 (r202871) +++ head/lib/libarchive/archive_read_support_format_iso9660.c Sat Jan 23 07:55:53 2010 (r202872) @@ -258,9 +258,9 @@ struct content { /* In-memory storage for a directory record. */ struct file_info { + struct file_info *use_next; struct file_info *parent; struct file_info *next; - int refcount; int subdirs; uint64_t key; /* Heap Key. */ uint64_t offset; /* Offset on disk. */ @@ -331,6 +331,7 @@ struct iso9660 { int64_t previous_number; struct archive_string previous_pathname; + struct file_info *use_files; struct heap_queue pending_files; struct { struct file_info *first; @@ -396,7 +397,8 @@ static void parse_rockridge_TF1(struct f const unsigned char *, int); static void parse_rockridge_ZF1(struct file_info *, const unsigned char *, int); -static void release_file(struct iso9660 *, struct file_info *); +static void register_file(struct iso9660 *, struct file_info *); +static void release_files(struct iso9660 *); static unsigned toi(const void *p, int n); static inline void cache_add_entry(struct iso9660 *iso9660, struct file_info *file); @@ -980,7 +982,6 @@ read_children(struct archive_read *a, st } con = malloc(sizeof(struct content)); if (con == NULL) { - release_file(iso9660, child); archive_set_error( &a->archive, ENOMEM, "No memory for " @@ -998,7 +999,6 @@ read_children(struct archive_read *a, st multi->size += child->size; if (!child->multi_extent) multi = NULL; - release_file(iso9660, child); } } else add_entry(iso9660, child); @@ -1029,10 +1029,8 @@ relocate_dir(struct iso9660 *iso9660, st /* This case is wrong pattern. */ return (0); if (re->offset == file->cl_offset) { - re->parent->refcount--; re->parent->subdirs--; re->parent = file->parent; - re->parent->refcount++; re->parent->subdirs++; cache_add_to_next_of_parent(iso9660, re); return (1); @@ -1077,10 +1075,8 @@ read_entries(struct archive_read *a) /* * Relocate directory which rr_moved has. */ - while ((file = heap_get_entry(&(iso9660->cl_files))) != NULL) { + while ((file = heap_get_entry(&(iso9660->cl_files))) != NULL) relocate_dir(iso9660, file); - release_file(iso9660, file); - } /* If rr_moved directory still has children, * Add rr_moved into pending_files to show @@ -1092,10 +1088,8 @@ read_entries(struct archive_read *a) * is broken), the entries won't be exposed. */ while ((file = heap_get_entry(&(iso9660->re_dirs))) != NULL) cache_add_entry(iso9660, file); - } else { + } else iso9660->rr_moved->parent->subdirs--; - release_file(iso9660, iso9660->rr_moved); - } } else { /* * In case ISO image is broken. If the name of rr_moved @@ -1174,7 +1168,6 @@ archive_read_format_iso9660_read_header( if (vd == &(iso9660->primary) && !iso9660->seenRockridge && iso9660->seenJoliet) { /* Switch reading data from primary to joliet. */ - release_file(iso9660, file); vd = &(iso9660->joliet); skipsize = LOGICAL_BLOCK_SIZE * vd->location; skipsize -= iso9660->current_position; @@ -1214,10 +1207,8 @@ archive_read_format_iso9660_read_header( /* Get the next entry that appears after the current offset. */ r = next_entry_seek(a, iso9660, &file); - if (r != ARCHIVE_OK) { - release_file(iso9660, file); + if (r != ARCHIVE_OK) return (r); - } iso9660->entry_bytes_remaining = file->size; iso9660->entry_sparse_offset = 0; /* Offset for sparse-file-aware clients. */ @@ -1227,7 +1218,6 @@ archive_read_format_iso9660_read_header( "File is beyond end-of-media: %s", file->name); iso9660->entry_bytes_remaining = 0; iso9660->entry_sparse_offset = 0; - release_file(iso9660, file); return (ARCHIVE_WARN); } @@ -1263,7 +1253,6 @@ archive_read_format_iso9660_read_header( archive_entry_unset_size(entry); iso9660->entry_bytes_remaining = 0; iso9660->entry_sparse_offset = 0; - release_file(iso9660, file); return (ARCHIVE_OK); } @@ -1291,7 +1280,6 @@ archive_read_format_iso9660_read_header( file->offset, iso9660->current_position); iso9660->entry_bytes_remaining = 0; iso9660->entry_sparse_offset = 0; - release_file(iso9660, file); return (ARCHIVE_WARN); } @@ -1331,8 +1319,6 @@ archive_read_format_iso9660_read_header( file->exposed = 1; } - release_file(iso9660, file); - if (rd_r != ARCHIVE_OK) return (rd_r); return (ARCHIVE_OK); @@ -1648,14 +1634,10 @@ static int archive_read_format_iso9660_cleanup(struct archive_read *a) { struct iso9660 *iso9660; - struct file_info *file; int r = ARCHIVE_OK; iso9660 = (struct iso9660 *)(a->format->data); - while ((file = cache_get_entry(iso9660)) != NULL) - release_file(iso9660, file); - while ((file = next_entry(iso9660)) != NULL) - release_file(iso9660, file); + release_files(iso9660); free(iso9660->read_ce_req.reqs); archive_string_free(&iso9660->pathname); archive_string_free(&iso9660->previous_pathname); @@ -1736,8 +1718,6 @@ parse_file_info(struct archive_read *a, } memset(file, 0, sizeof(*file)); file->parent = parent; - if (parent != NULL) - parent->refcount++; file->offset = iso9660->logical_block_size * (uint64_t)location; file->size = toi(isodirrec + DR_size_offset, DR_size_size); file->mtime = isodate7(isodirrec + DR_date_offset); @@ -1869,8 +1849,6 @@ parse_file_info(struct archive_read *a, rr_start += iso9660->suspOffset; r = parse_rockridge(a, file, rr_start, rr_end); if (r != ARCHIVE_OK) { - if (parent != NULL) - parent->refcount--; free(file); return (NULL); } @@ -1880,6 +1858,7 @@ parse_file_info(struct archive_read *a, iso9660->opt_support_rockridge = 0; } + file->nlinks = 1;/* Reset nlink. we'll calculate it later. */ /* Tell file's parent how many children that parent has. */ if (parent != NULL && (flags & 0x02) && file->cl_offset == 0) parent->subdirs++; @@ -1908,6 +1887,7 @@ parse_file_info(struct archive_read *a, fprintf(stderr, "\n"); } #endif + register_file(iso9660, file); return (file); } @@ -2460,18 +2440,24 @@ parse_rockridge_ZF1(struct file_info *fi } } +static void +register_file(struct iso9660 *iso9660, struct file_info *file) +{ + + file->use_next = iso9660->use_files; + iso9660->use_files = file; +} static void -release_file(struct iso9660 *iso9660, struct file_info *file) +release_files(struct iso9660 *iso9660) { - struct file_info *parent; struct content *con, *connext; + struct file_info *file; - if (file == NULL) - return; + file = iso9660->use_files; + while (file != NULL) { + struct file_info *next = file->use_next; - if (file->refcount == 0) { - parent = file->parent; archive_string_free(&file->name); archive_string_free(&file->symlink); con = file->contents.first; @@ -2481,10 +2467,7 @@ release_file(struct iso9660 *iso9660, st con = connext; } free(file); - if (parent != NULL) { - parent->refcount--; - release_file(iso9660, parent); - } + file = next; } } @@ -2568,7 +2551,6 @@ next_cache_entry(struct iso9660 *iso9660 * happen. */ file->next = NULL; - file->refcount++; *empty_files.last = file; empty_files.last = &(file->next); } else { @@ -2611,7 +2593,6 @@ static inline void cache_add_entry(struct iso9660 *iso9660, struct file_info *file) { file->next = NULL; - file->refcount++; *iso9660->cache_files.last = file; iso9660->cache_files.last = &(file->next); } @@ -2621,7 +2602,6 @@ cache_add_to_next_of_parent(struct iso96 { file->next = file->parent->next; file->parent->next = file; - file->refcount++; if (iso9660->cache_files.last == &(file->parent->next)) iso9660->cache_files.last = &(file->next); } @@ -2633,7 +2613,6 @@ cache_get_entry(struct iso9660 *iso9660) if ((file = iso9660->cache_files.first) != NULL) { iso9660->cache_files.first = file->next; - file->refcount--; if (iso9660->cache_files.first == NULL) iso9660->cache_files.last = &(iso9660->cache_files.first); } @@ -2669,7 +2648,6 @@ heap_add_entry(struct heap_queue *heap, } file_key = file->key = key; - file->refcount++; /* * Start with hole at end, walk it up tree to find insertion point. @@ -2703,7 +2681,6 @@ heap_get_entry(struct heap_queue *heap) * The first file in the list is the earliest; we'll return this. */ r = heap->files[0]; - r->refcount--; /* * Move the last item in the heap to the root of the tree From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 07:57:17 2010 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 B41BE1065672; Sat, 23 Jan 2010 07:57:17 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A45808FC12; Sat, 23 Jan 2010 07:57:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7vHGM041805; Sat, 23 Jan 2010 07:57:17 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7vHTM041803; Sat, 23 Jan 2010 07:57:17 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230757.o0N7vHTM041803@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:57: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: r202873 - head/lib/libarchive 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: Sat, 23 Jan 2010 07:57:17 -0000 Author: kientzle Date: Sat Jan 23 07:57:17 2010 New Revision: 202873 URL: http://svn.freebsd.org/changeset/base/202873 Log: Don't try to hardlink block or character device nodes that come out of cpio archives. Modified: head/lib/libarchive/archive_entry_link_resolver.c Modified: head/lib/libarchive/archive_entry_link_resolver.c ============================================================================== --- head/lib/libarchive/archive_entry_link_resolver.c Sat Jan 23 07:55:53 2010 (r202872) +++ head/lib/libarchive/archive_entry_link_resolver.c Sat Jan 23 07:57:17 2010 (r202873) @@ -181,8 +181,10 @@ archive_entry_linkify(struct archive_ent /* If it has only one link, then we're done. */ if (archive_entry_nlink(*e) == 1) return; - /* Directories never have hardlinks. */ - if (archive_entry_filetype(*e) == AE_IFDIR) + /* Directories, devices never have hardlinks. */ + if (archive_entry_filetype(*e) == AE_IFDIR + || archive_entry_filetype(*e) == AE_IFBLK + || archive_entry_filetype(*e) == AE_IFCHR) return; switch (res->strategy) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 08:15:11 2010 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 3787D106566C; Sat, 23 Jan 2010 08:15:11 +0000 (UTC) (envelope-from j@uriah.heep.sax.de) Received: from uriah.heep.sax.de (uriah.heep.sax.de [213.240.137.9]) by mx1.freebsd.org (Postfix) with ESMTP id D87CF8FC20; Sat, 23 Jan 2010 08:15:10 +0000 (UTC) Received: by uriah.heep.sax.de (Postfix, from userid 107) id 63DE613; Sat, 23 Jan 2010 08:56:39 +0100 (MET) Date: Sat, 23 Jan 2010 08:56:39 +0100 From: Joerg Wunsch To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100123075639.GA52582@uriah.heep.sax.de> References: <201001230754.o0N7s70b040987@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001230754.o0N7s70b040987@svn.freebsd.org> X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-GPG-Fingerprint: 5E84 F980 C3CA FD4B B584 1070 F48C A81B 69A8 5873 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r202870 - head/sys/dev/ieee488 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joerg Wunsch List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 08:15:11 -0000 As Joerg Wunsch wrote: > . Implement the "special interrupt handling" per the GPIB-PCIIA > Technical Reference Manual; this was apparently not declared for the > clone card this driver has been originally implemented for, [...] s/declared/required/ -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 08:37:04 2010 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 70EE4106566B; Sat, 23 Jan 2010 08:37:04 +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 60F788FC1A; Sat, 23 Jan 2010 08:37:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N8b4Ec050726; Sat, 23 Jan 2010 08:37:04 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N8b46w050724; Sat, 23 Jan 2010 08:37:04 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001230837.o0N8b46w050724@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 23 Jan 2010 08:37:04 +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: r202874 - stable/8/sys/dev/cxgb 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: Sat, 23 Jan 2010 08:37:04 -0000 Author: np Date: Sat Jan 23 08:37:04 2010 New Revision: 202874 URL: http://svn.freebsd.org/changeset/base/202874 Log: MFC r202863 Don't forget to release the adapter lock for a no-op. Modified: stable/8/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_main.c Sat Jan 23 07:57:17 2010 (r202873) +++ stable/8/sys/dev/cxgb/cxgb_main.c Sat Jan 23 08:37:04 2010 (r202874) @@ -2078,6 +2078,8 @@ fail: p->if_flags = ifp->if_flags; } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) error = cxgb_uninit_locked(p); + else + ADAPTER_UNLOCK(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); break; From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 08:43:11 2010 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 9C6D2106566C; Sat, 23 Jan 2010 08:43:11 +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 8C83C8FC15; Sat, 23 Jan 2010 08:43:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N8hBrt052112; Sat, 23 Jan 2010 08:43:11 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N8hB0u052110; Sat, 23 Jan 2010 08:43:11 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001230843.o0N8hB0u052110@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 23 Jan 2010 08:43:11 +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: r202875 - stable/7/sys/dev/cxgb 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: Sat, 23 Jan 2010 08:43:11 -0000 Author: np Date: Sat Jan 23 08:43:11 2010 New Revision: 202875 URL: http://svn.freebsd.org/changeset/base/202875 Log: MFC r202863 Don't forget to release the adapter lock for a no-op. Modified: stable/7/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Sat Jan 23 08:37:04 2010 (r202874) +++ stable/7/sys/dev/cxgb/cxgb_main.c Sat Jan 23 08:43:11 2010 (r202875) @@ -2061,6 +2061,8 @@ fail: p->if_flags = ifp->if_flags; } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) error = cxgb_uninit_locked(p); + else + ADAPTER_UNLOCK(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); break; From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 08:43:21 2010 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 D5319106566C; Sat, 23 Jan 2010 08:43:21 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C59F38FC08; Sat, 23 Jan 2010 08:43:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N8hLpZ052183; Sat, 23 Jan 2010 08:43:21 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N8hLrY052179; Sat, 23 Jan 2010 08:43:21 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001230843.o0N8hLrY052179@svn.freebsd.org> From: Ed Schouten Date: Sat, 23 Jan 2010 08:43: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: r202876 - head/lib/libc/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: Sat, 23 Jan 2010 08:43:21 -0000 Author: ed Date: Sat Jan 23 08:43:21 2010 New Revision: 202876 URL: http://svn.freebsd.org/changeset/base/202876 Log: Just ignore the timestamps given to pututxline(). I've noticed many applications do a bad job at timekeeping, for several reasons: - Applications like screen(1) don't update time records when restoring the old user login record. - Many applications only set ut_tv.tv_sec, not ut_tv.tv_usec. This causes many problems for tools such as ac(8), which require the timestamps to be properly ordered. This is why I've decided to let the utmpx code obtain valid timestamps itself. Modified: head/lib/libc/gen/getutxent.3 head/lib/libc/gen/pututxline.c head/lib/libc/gen/utxdb.c Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Sat Jan 23 08:43:11 2010 (r202875) +++ head/lib/libc/gen/getutxent.3 Sat Jan 23 08:43:21 2010 (r202876) @@ -311,13 +311,9 @@ will only be written to Entries of type .Dv USER_PROCESS will also be written to -.Pa /var/run/utx.active . -It will only be written to -.Pa /var/log/utx.lastlogin -if -.Fa ut_tv -for that user has a greater value than the existing entry or when no -entry for the user has been found. +.Pa /var/run/utx.active +and +.Pa /var/log/utx.lastlogin . .Pp Entries of type .Dv DEAD_PROCESS @@ -345,6 +341,8 @@ to be discarded. All entries whose type has not been mentioned previously, are discarded by this implementation of .Fn pututxline . +This implementation also ignores the value of +.Fa ut_tv . .Sh RETURN VALUES The .Fn getutxent , Modified: head/lib/libc/gen/pututxline.c ============================================================================== --- head/lib/libc/gen/pututxline.c Sat Jan 23 08:43:11 2010 (r202875) +++ head/lib/libc/gen/pututxline.c Sat Jan 23 08:43:21 2010 (r202876) @@ -132,13 +132,6 @@ utx_active_remove(struct futx *fu) if (memcmp(fu->fu_id, fe.fu_id, sizeof fe.fu_id) != 0) continue; - /* - * Prevent login sessions from having a negative - * timespan. - */ - if (be64toh(fu->fu_tv) < be64toh(fe.fu_tv)) - fu->fu_tv = fe.fu_tv; - /* Terminate session. */ fseeko(fp, -(off_t)sizeof fe, SEEK_CUR); fwrite(fu, sizeof *fu, 1, fp); @@ -175,17 +168,12 @@ utx_lastlogin_add(const struct futx *fu) while (fread(&fe, sizeof fe, 1, fp) == 1) { if (strncmp(fu->fu_user, fe.fu_user, sizeof fe.fu_user) != 0) continue; - - /* Prevent lowering the time value. */ - if (be64toh(fu->fu_tv) <= be64toh(fe.fu_tv)) - goto done; /* Found a previous lastlogin entry for this user. */ fseeko(fp, -(off_t)sizeof fe, SEEK_CUR); break; } fwrite(fu, sizeof *fu, 1, fp); -done: fclose(fp); } Modified: head/lib/libc/gen/utxdb.c ============================================================================== --- head/lib/libc/gen/utxdb.c Sat Jan 23 08:43:11 2010 (r202875) +++ head/lib/libc/gen/utxdb.c Sat Jan 23 08:43:21 2010 (r202876) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #include #include #include @@ -50,9 +51,11 @@ __FBSDID("$FreeBSD$"); #define UTOF_TYPE(ut, fu) do { \ (fu)->fu_type = (ut)->ut_type; \ } while (0) -#define UTOF_TV(ut, fu) do { \ - (fu)->fu_tv = htobe64((uint64_t)(ut)->ut_tv.tv_sec * 1000000 + \ - (uint64_t)(ut)->ut_tv.tv_usec); \ +#define UTOF_TV(fu) do { \ + struct timeval tv; \ + gettimeofday(&tv, NULL); \ + (fu)->fu_tv = htobe64((uint64_t)tv.tv_sec * 1000000 + \ + (uint64_t)tv.tv_usec); \ } while (0) void @@ -96,7 +99,7 @@ utx_to_futx(const struct utmpx *ut, stru } UTOF_TYPE(ut, fu); - UTOF_TV(ut, fu); + UTOF_TV(fu); } #define FTOU_STRING(fu, ut, field) do { \ From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 11:09:34 2010 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 9FA9F1065672; Sat, 23 Jan 2010 11:09:34 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89D168FC1A; Sat, 23 Jan 2010 11:09:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NB9YCQ086627; Sat, 23 Jan 2010 11:09:34 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NB9YV6086604; Sat, 23 Jan 2010 11:09:34 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201001231109.o0NB9YV6086604@svn.freebsd.org> From: Roman Divacky Date: Sat, 23 Jan 2010 11:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202878 - in vendor/llvm/dist: . bindings/ocaml/llvm cmake/modules docs include/llvm include/llvm-c include/llvm/ADT include/llvm/Analysis include/llvm/CodeGen include/llvm/MC include/l... 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: Sat, 23 Jan 2010 11:09:34 -0000 Author: rdivacky Date: Sat Jan 23 11:09:33 2010 New Revision: 202878 URL: http://svn.freebsd.org/changeset/base/202878 Log: Update LLVM to r94309. Added: vendor/llvm/dist/include/llvm/Analysis/DOTGraphTraitsPass.h vendor/llvm/dist/include/llvm/MC/MCDirectives.h vendor/llvm/dist/include/llvm/MC/MCParser/ vendor/llvm/dist/include/llvm/MC/MCParser/AsmCond.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmLexer.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmLexer.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParser.h vendor/llvm/dist/include/llvm/MC/MCParser/MCParsedAsmOperand.h vendor/llvm/dist/include/llvm/Support/SMLoc.h vendor/llvm/dist/include/llvm/Target/Mangler.h vendor/llvm/dist/include/llvm/Target/TargetAsmLexer.h vendor/llvm/dist/lib/MC/MCParser/ vendor/llvm/dist/lib/MC/MCParser/AsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/CMakeLists.txt vendor/llvm/dist/lib/MC/MCParser/MCAsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/MCAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/Makefile vendor/llvm/dist/lib/MC/MCParser/TargetAsmParser.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430BranchSelector.cpp vendor/llvm/dist/lib/Target/Mangler.cpp vendor/llvm/dist/lib/Target/TargetAsmLexer.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmLexer.cpp vendor/llvm/dist/test/Analysis/PostDominators/pr6047_a.ll vendor/llvm/dist/test/Analysis/PostDominators/pr6047_b.ll vendor/llvm/dist/test/Analysis/PostDominators/pr6047_c.ll vendor/llvm/dist/test/Analysis/PostDominators/pr6047_d.ll vendor/llvm/dist/test/CodeGen/ARM/ctz.ll vendor/llvm/dist/test/CodeGen/PowerPC/stubs.ll vendor/llvm/dist/test/CodeGen/Thumb/2010-01-15-local-alloc-spill-physical.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-01-19-RemovePredicates.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-15-SelectionDAGCycle.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-19-OptExtBug.ll vendor/llvm/dist/test/CodeGen/X86/bigstructret2.ll vendor/llvm/dist/test/CodeGen/X86/neg-shl-add.ll vendor/llvm/dist/test/DebugInfo/2010-01-19-DbgScope.ll vendor/llvm/dist/test/FrontendC/2010-01-18-Inlined-Debug.c vendor/llvm/dist/test/FrontendC/pr5406.c vendor/llvm/dist/test/Transforms/InstCombine/bitcast-sext-vector.ll vendor/llvm/dist/test/Transforms/InstCombine/fsub.ll vendor/llvm/dist/test/Transforms/InstCombine/idioms.ll vendor/llvm/dist/test/Transforms/Mem2Reg/ConvertDebugInfo.ll vendor/llvm/dist/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll vendor/llvm/dist/unittests/Support/System.cpp vendor/llvm/dist/utils/GetSourceVersion (contents, props changed) Deleted: vendor/llvm/dist/include/llvm/MC/MCAsmLexer.h vendor/llvm/dist/include/llvm/MC/MCAsmParser.h vendor/llvm/dist/include/llvm/MC/MCParsedAsmOperand.h vendor/llvm/dist/include/llvm/Support/Mangler.h vendor/llvm/dist/lib/CodeGen/MachO.h vendor/llvm/dist/lib/CodeGen/MachOCodeEmitter.cpp vendor/llvm/dist/lib/CodeGen/MachOCodeEmitter.h vendor/llvm/dist/lib/CodeGen/MaxStackAlignment.cpp vendor/llvm/dist/lib/MC/MCAsmLexer.cpp vendor/llvm/dist/lib/MC/MCAsmParser.cpp vendor/llvm/dist/lib/MC/TargetAsmParser.cpp vendor/llvm/dist/lib/VMCore/Mangler.cpp vendor/llvm/dist/test/CodeGen/Generic/GC/frame_size.ll vendor/llvm/dist/test/CodeGen/X86/2007-08-13-SpillerReuse.ll vendor/llvm/dist/test/CodeGen/X86/illegal-asm.ll vendor/llvm/dist/test/CodeGen/X86/remat-mov-1.ll vendor/llvm/dist/test/CodeGen/X86/subreg-to-reg-5.ll vendor/llvm/dist/test/Transforms/InstCombine/apint-elim-logicalops.ll vendor/llvm/dist/test/Transforms/InstCombine/fsub-fadd.ll vendor/llvm/dist/test/Transforms/InstCombine/fsub-fsub.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/icmp_use_postinc.ll Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/Makefile vendor/llvm/dist/Makefile.rules vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake vendor/llvm/dist/docs/BitCodeFormat.html vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/include/llvm-c/Core.h vendor/llvm/dist/include/llvm/ADT/DenseMapInfo.h vendor/llvm/dist/include/llvm/ADT/ImmutableMap.h vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/DominatorInternals.h vendor/llvm/dist/include/llvm/Analysis/IVUsers.h vendor/llvm/dist/include/llvm/Analysis/LoopPass.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/Attributes.h vendor/llvm/dist/include/llvm/CallGraphSCCPass.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/FileWriters.h vendor/llvm/dist/include/llvm/CodeGen/LinkAllCodegenComponents.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/SchedulerRegistry.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/InstrTypes.h vendor/llvm/dist/include/llvm/IntrinsicInst.h vendor/llvm/dist/include/llvm/LinkAllVMCore.h vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCExpr.h vendor/llvm/dist/include/llvm/MC/MCSectionELF.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/MCSymbol.h vendor/llvm/dist/include/llvm/MC/MCValue.h vendor/llvm/dist/include/llvm/MC/SectionKind.h vendor/llvm/dist/include/llvm/Metadata.h vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/PassAnalysisSupport.h vendor/llvm/dist/include/llvm/PassManagers.h vendor/llvm/dist/include/llvm/PassSupport.h vendor/llvm/dist/include/llvm/Support/CFG.h vendor/llvm/dist/include/llvm/Support/DebugLoc.h vendor/llvm/dist/include/llvm/Support/PassNameParser.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/raw_ostream.h vendor/llvm/dist/include/llvm/System/Host.h vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetAsmParser.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetLoweringObjectFile.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetRegistry.h vendor/llvm/dist/include/llvm/Transforms/IPO/InlinerPass.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/lib/Analysis/AliasAnalysisCounter.cpp vendor/llvm/dist/lib/Analysis/AliasDebugger.cpp vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/DomPrinter.cpp vendor/llvm/dist/lib/Analysis/IPA/Andersens.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraph.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/IPA/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/IPA/Makefile vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/Makefile vendor/llvm/dist/lib/Analysis/ProfileEstimatorPass.cpp vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp vendor/llvm/dist/lib/Analysis/ProfileInfoLoaderPass.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Archive/Makefile vendor/llvm/dist/lib/AsmParser/LLLexer.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/AsmParser/LLToken.h vendor/llvm/dist/lib/AsmParser/Makefile vendor/llvm/dist/lib/AsmParser/Parser.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/Makefile vendor/llvm/dist/lib/Bitcode/Writer/Makefile vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/Makefile vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/ELFWriter.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachOWriter.cpp vendor/llvm/dist/lib/CodeGen/MachOWriter.h vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/Makefile vendor/llvm/dist/lib/CodeGen/OptimizeExts.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/Makefile vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Makefile vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/Makefile vendor/llvm/dist/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp vendor/llvm/dist/lib/ExecutionEngine/Makefile vendor/llvm/dist/lib/Linker/LinkModules.cpp vendor/llvm/dist/lib/Linker/Makefile vendor/llvm/dist/lib/MC/CMakeLists.txt vendor/llvm/dist/lib/MC/MCAsmInfo.cpp vendor/llvm/dist/lib/MC/MCAsmInfoCOFF.cpp vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCInst.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCNullStreamer.cpp vendor/llvm/dist/lib/MC/MCSectionELF.cpp vendor/llvm/dist/lib/MC/MCStreamer.cpp vendor/llvm/dist/lib/MC/MCSymbol.cpp vendor/llvm/dist/lib/MC/MCValue.cpp vendor/llvm/dist/lib/MC/Makefile vendor/llvm/dist/lib/Support/Debug.cpp vendor/llvm/dist/lib/Support/SourceMgr.cpp vendor/llvm/dist/lib/Support/StringExtras.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/System/Host.cpp vendor/llvm/dist/lib/System/Unix/TimeValue.inc vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.h vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMMCAsmInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/Makefile vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/ARM/Makefile vendor/llvm/dist/lib/Target/ARM/README.txt vendor/llvm/dist/lib/Target/ARM/TargetInfo/Makefile vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Alpha/Makefile vendor/llvm/dist/lib/Target/Alpha/TargetInfo/Makefile vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Blackfin/Makefile vendor/llvm/dist/lib/Target/Blackfin/TargetInfo/Makefile vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp vendor/llvm/dist/lib/Target/CBackend/Makefile vendor/llvm/dist/lib/Target/CBackend/TargetInfo/Makefile vendor/llvm/dist/lib/Target/CMakeLists.txt vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/CellSPU/Makefile vendor/llvm/dist/lib/Target/CellSPU/SPUMCAsmInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/TargetInfo/Makefile vendor/llvm/dist/lib/Target/CppBackend/CPPBackend.cpp vendor/llvm/dist/lib/Target/CppBackend/Makefile vendor/llvm/dist/lib/Target/CppBackend/TargetInfo/Makefile vendor/llvm/dist/lib/Target/MSIL/MSILWriter.cpp vendor/llvm/dist/lib/Target/MSIL/MSILWriter.h vendor/llvm/dist/lib/Target/MSIL/Makefile vendor/llvm/dist/lib/Target/MSIL/TargetInfo/Makefile vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430MCInstLower.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/MSP430/CMakeLists.txt vendor/llvm/dist/lib/Target/MSP430/MSP430.h vendor/llvm/dist/lib/Target/MSP430/MSP430.td vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.h vendor/llvm/dist/lib/Target/MSP430/MSP430InstrFormats.td vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.h vendor/llvm/dist/lib/Target/MSP430/Makefile vendor/llvm/dist/lib/Target/MSP430/TargetInfo/Makefile vendor/llvm/dist/lib/Target/Makefile vendor/llvm/dist/lib/Target/Mips/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/Makefile vendor/llvm/dist/lib/Target/Mips/MipsCallingConv.td vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/TargetInfo/Makefile vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h vendor/llvm/dist/lib/Target/PIC16/Makefile vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Passes/Makefile vendor/llvm/dist/lib/Target/PIC16/TargetInfo/Makefile vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/Makefile vendor/llvm/dist/lib/Target/PowerPC/PPCMCAsmInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/PowerPC/TargetInfo/Makefile vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp vendor/llvm/dist/lib/Target/Sparc/Makefile vendor/llvm/dist/lib/Target/Sparc/TargetInfo/Makefile vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp vendor/llvm/dist/lib/Target/SystemZ/Makefile vendor/llvm/dist/lib/Target/SystemZ/SystemZMCAsmInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZMCAsmInfo.h vendor/llvm/dist/lib/Target/SystemZ/TargetInfo/Makefile vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/AsmParser/Makefile vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/Makefile vendor/llvm/dist/lib/Target/X86/Makefile vendor/llvm/dist/lib/Target/X86/TargetInfo/Makefile vendor/llvm/dist/lib/Target/X86/X86COFFMachineModuleInfo.cpp vendor/llvm/dist/lib/Target/X86/X86COFFMachineModuleInfo.h vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86Instr64bit.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.h vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.cpp vendor/llvm/dist/lib/Target/XCore/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/Makefile vendor/llvm/dist/lib/Target/XCore/TargetInfo/Makefile vendor/llvm/dist/lib/Transforms/Hello/Makefile vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/Makefile vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/Makefile vendor/llvm/dist/lib/Transforms/Instrumentation/Makefile vendor/llvm/dist/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/Makefile vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/Makefile vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/Attributes.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/CMakeLists.txt vendor/llvm/dist/lib/VMCore/ConstantFold.cpp vendor/llvm/dist/lib/VMCore/Constants.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/IntrinsicInst.cpp vendor/llvm/dist/lib/VMCore/Makefile vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Pass.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/projects/CMakeLists.txt vendor/llvm/dist/projects/Makefile vendor/llvm/dist/test/Assembler/functionlocal-metadata.ll vendor/llvm/dist/test/CodeGen/ARM/indirectbr.ll vendor/llvm/dist/test/CodeGen/ARM/vbits.ll vendor/llvm/dist/test/CodeGen/CellSPU/call_indirect.ll vendor/llvm/dist/test/CodeGen/MSP430/bit.ll vendor/llvm/dist/test/CodeGen/MSP430/setcc.ll vendor/llvm/dist/test/CodeGen/PIC16/globals.ll vendor/llvm/dist/test/CodeGen/PowerPC/2008-12-12-EH.ll vendor/llvm/dist/test/CodeGen/PowerPC/sections.ll vendor/llvm/dist/test/CodeGen/Thumb/2009-12-17-pre-regalloc-taildup.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-01-06-TailDuplicateLabels.ll vendor/llvm/dist/test/CodeGen/X86/2008-04-02-unnamedEH.ll vendor/llvm/dist/test/CodeGen/X86/2008-09-18-inline-asm-2.ll vendor/llvm/dist/test/CodeGen/X86/2008-12-19-EarlyClobberBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-04-sext-i64-gep.ll vendor/llvm/dist/test/CodeGen/X86/2009-09-10-SpillComments.ll vendor/llvm/dist/test/CodeGen/X86/bss_pagealigned.ll vendor/llvm/dist/test/CodeGen/X86/full-lsr.ll vendor/llvm/dist/test/CodeGen/X86/global-sections.ll vendor/llvm/dist/test/CodeGen/X86/i128-and-beyond.ll vendor/llvm/dist/test/CodeGen/X86/loop-hoist.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce4.ll vendor/llvm/dist/test/CodeGen/X86/pr3495-2.ll vendor/llvm/dist/test/CodeGen/X86/pr3495.ll vendor/llvm/dist/test/CodeGen/X86/ptrtoint-constexpr.ll vendor/llvm/dist/test/CodeGen/X86/remat-mov-0.ll vendor/llvm/dist/test/CodeGen/X86/remat-scalar-zero.ll vendor/llvm/dist/test/CodeGen/X86/splat-scalar-load.ll vendor/llvm/dist/test/CodeGen/X86/stride-reuse.ll vendor/llvm/dist/test/CodeGen/X86/tail-opts.ll vendor/llvm/dist/test/CodeGen/X86/unaligned-load.ll vendor/llvm/dist/test/CodeGen/X86/xor.ll vendor/llvm/dist/test/MC/AsmParser/X86/x86_instructions.s vendor/llvm/dist/test/MC/AsmParser/directive_ascii.s vendor/llvm/dist/test/MC/AsmParser/directive_lcomm.s vendor/llvm/dist/test/MC/AsmParser/directive_space.s vendor/llvm/dist/test/Transforms/ConstProp/constant-expr.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/gep-with-mul-base.ll vendor/llvm/dist/test/Transforms/InstCombine/canonicalize_branch.ll vendor/llvm/dist/test/Transforms/InstCombine/signext.ll vendor/llvm/dist/test/Transforms/InstCombine/xor2.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/related_indvars.ll vendor/llvm/dist/test/Transforms/Reassociate/inverses.ll vendor/llvm/dist/test/lit.cfg vendor/llvm/dist/tools/bugpoint/Miscompilation.cpp vendor/llvm/dist/tools/gold/Makefile vendor/llvm/dist/tools/llc/Makefile vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/lli/Makefile vendor/llvm/dist/tools/llvm-ar/Makefile vendor/llvm/dist/tools/llvm-as/Makefile vendor/llvm/dist/tools/llvm-bcanalyzer/Makefile vendor/llvm/dist/tools/llvm-config/Makefile vendor/llvm/dist/tools/llvm-config/llvm-config.in.in vendor/llvm/dist/tools/llvm-dis/Makefile vendor/llvm/dist/tools/llvm-extract/Makefile vendor/llvm/dist/tools/llvm-ld/Makefile vendor/llvm/dist/tools/llvm-link/Makefile vendor/llvm/dist/tools/llvm-mc/AsmLexer.cpp vendor/llvm/dist/tools/llvm-mc/AsmLexer.h vendor/llvm/dist/tools/llvm-mc/AsmParser.cpp vendor/llvm/dist/tools/llvm-mc/AsmParser.h vendor/llvm/dist/tools/llvm-mc/CMakeLists.txt vendor/llvm/dist/tools/llvm-mc/Makefile vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvm-nm/Makefile vendor/llvm/dist/tools/llvm-prof/Makefile vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/lto/LTOModule.cpp vendor/llvm/dist/tools/lto/Makefile vendor/llvm/dist/tools/opt/Makefile vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp vendor/llvm/dist/unittests/VMCore/PassManagerTest.cpp vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/buildit/build_llvm vendor/llvm/dist/utils/lit/lit/Test.py vendor/llvm/dist/utils/llvm.grm vendor/llvm/dist/utils/mkpatch vendor/llvm/dist/utils/vim/llvm.vim Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/CMakeLists.txt Sat Jan 23 11:09:33 2010 (r202878) @@ -304,6 +304,7 @@ add_subdirectory(lib/Linker) add_subdirectory(lib/Analysis) add_subdirectory(lib/Analysis/IPA) add_subdirectory(lib/MC) +add_subdirectory(lib/MC/MCParser) add_subdirectory(test) add_subdirectory(utils/FileCheck) Modified: vendor/llvm/dist/Makefile ============================================================================== --- vendor/llvm/dist/Makefile Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/Makefile Sat Jan 23 11:09:33 2010 (r202878) @@ -66,7 +66,8 @@ ifeq ($(MAKECMDGOALS),tools-only) endif ifeq ($(MAKECMDGOALS),install-clang) - DIRS := tools/clang/tools/driver tools/clang/lib/Headers tools/clang/docs + DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ + tools/clang/lib/Runtime tools/clang/docs OPTIONAL_DIRS := NO_INSTALL = 1 endif Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/Makefile.rules Sat Jan 23 11:09:33 2010 (r202878) @@ -439,6 +439,17 @@ else endif endif +ifeq ($(HOST_OS),MingW) + # Work around PR4957 + CPP.Defines += -D__NO_CTYPE_INLINE + ifeq ($(LLVM_CROSS_COMPILING),1) + # Work around http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525016 + ifdef TOOLNAME + LD.Flags += -Wl,--allow-multiple-definition + endif + endif +endif + CXX.Flags += -Woverloaded-virtual CPP.BaseFlags += $(CPP.Defines) AR.Flags := cru @@ -457,15 +468,6 @@ ifeq ($(ARCH),Alpha) LD.Flags += -Wl,--no-relax endif -ifeq ($(HOST_OS),MingW) - ifeq ($(LLVM_CROSS_COMPILING),1) - # Work around http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525016 - ifdef TOOLNAME - LD.Flags += -Wl,--allow-multiple-definition - endif - endif -endif - ifdef ENABLE_EXPENSIVE_CHECKS # GNU libstdc++ uses RTTI if you define _GLIBCXX_DEBUG, which we did above. # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40160 @@ -1351,17 +1353,17 @@ DEPEND_OPTIONS = -MMD -MP -MF "$(ObjDir) DEPEND_MOVEFILE = then $(MV) -f "$(ObjDir)/$*.d.tmp" "$(ObjDir)/$*.d"; \ else $(RM) "$(ObjDir)/$*.d.tmp"; exit 1; fi -$(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) +$(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_SRC_DIR)/Makefile $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG) $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ $(DEPEND_MOVEFILE) -$(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) +$(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_SRC_DIR)/Makefile $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG) $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ $(DEPEND_MOVEFILE) -$(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES) +$(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_SRC_DIR)/Makefile $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) $(Verb) if $(Compile.C) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ $(DEPEND_MOVEFILE) Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml Sat Jan 23 11:09:33 2010 (r202878) @@ -93,7 +93,6 @@ module Attribute = struct | Noredzone | Noimplicitfloat | Naked - | Inlinehint end module Icmp = struct @@ -848,7 +847,7 @@ module ModuleProvider = struct = "LLVMCreateModuleProviderForExistingModule" external dispose : llmoduleprovider -> unit = "llvm_dispose_module_provider" end - + (*===-- Memory buffers ----------------------------------------------------===*) Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli Sat Jan 23 11:09:33 2010 (r202878) @@ -143,7 +143,6 @@ module Attribute : sig | Noredzone | Noimplicitfloat | Naked - | Inlinehint end (** The predicate for an integer comparison ([icmp]) instruction. Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c Sat Jan 23 11:09:33 2010 (r202878) @@ -112,9 +112,9 @@ CAMLprim LLVMContextRef llvm_global_cont /*===-- Modules -----------------------------------------------------------===*/ -/* string -> llmodule */ -CAMLprim LLVMModuleRef llvm_create_module(value ModuleID) { - return LLVMModuleCreateWithName(String_val(ModuleID)); +/* llcontext -> string -> llmodule */ +CAMLprim LLVMModuleRef llvm_create_module(LLVMContextRef C, value ModuleID) { + return LLVMModuleCreateWithNameInContext(String_val(ModuleID), C); } /* llmodule -> unit */ Modified: vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Sat Jan 23 11:09:33 2010 (r202878) @@ -1,4 +1,4 @@ -set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC) +set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMCParser LLVMSupport) set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMARMInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMARMInfo LLVMSupport) @@ -14,7 +14,7 @@ set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMSupport) -set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa) +set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa) set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget) @@ -27,9 +27,10 @@ set(MSVC_LIB_DEPS_LLVMExecutionEngine LL set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget) -set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMJIT LLVMAnalysis LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem) set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils LLVMipa) set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMSystem LLVMTarget) @@ -56,8 +57,8 @@ set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLV set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa) -set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMX86Info) -set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMX86CodeGen LLVMX86Info) +set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMX86Info) +set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMX86CodeGen LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport) Modified: vendor/llvm/dist/docs/BitCodeFormat.html ============================================================================== --- vendor/llvm/dist/docs/BitCodeFormat.html Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/docs/BitCodeFormat.html Sat Jan 23 11:09:33 2010 (r202878) @@ -138,8 +138,7 @@ bitcode, while application-specific prog A bitstream literally consists of a stream of bits, which are read in order starting with the least significant bit of each byte. The stream is made up of a number of primitive values that encode a stream of unsigned integer values. -These -integers are are encoded in two ways: either as Fixed +These integers are encoded in two ways: either as Fixed Width Integers or as Variable Width Integers.

@@ -1158,7 +1157,7 @@ fields of FUNCTION records.

src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> Chris Lattner
The LLVM Compiler Infrastructure
-Last modified: $Date: 2009-10-29 05:25:46 +0100 (Thu, 29 Oct 2009) $ +Last modified: $Date: 2010-01-20 18:53:51 +0100 (Wed, 20 Jan 2010) $ Modified: vendor/llvm/dist/docs/LangRef.html ============================================================================== --- vendor/llvm/dist/docs/LangRef.html Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/docs/LangRef.html Sat Jan 23 11:09:33 2010 (r202878) @@ -924,9 +924,9 @@ define [linkage]
-

Named metadata is a collection of metadata. Metadata - node and null are the only valid named metadata operands. - Metadata strings are not allowed as an named metadata operand.

+

Named metadata is a collection of metadata. Metadata + nodes (but not metadata strings) and null are the only valid operands for + a named metadata.

Syntax:
@@ -1083,11 +1083,6 @@ define void @f() optsize { ... } function into callers whenever possible, ignoring any active inlining size threshold for this caller. -
inlinehint
-
This attribute indicates that the source code contained a hint that inlining - this function is desirable (such as the "inline" keyword in C/C++). It - is just a hint; it imposes no requirements on the inliner.
-
noinline
This attribute indicates that the inliner should never inline this function in any situation. This attribute may not be used together with @@ -2340,41 +2335,6 @@ has undefined behavior.

- - - -
- -

Metadata provides a way to attach arbitrary data to the instruction - stream without affecting the behaviour of the program. There are two - metadata primitives, strings and nodes. All metadata has the - metadata type and is identified in syntax by a preceding exclamation - point ('!').

- -

A metadata string is a string surrounded by double quotes. It can contain - any character by escaping non-printable characters with "\xx" where "xx" is - the two digit hex code. For example: "!"test\00"".

- -

Metadata nodes are represented with notation similar to structure constants - (a comma separated list of elements, surrounded by braces and preceded by an - exclamation point). For example: "!{ metadata !"test\00", i32 - 10}".

- -

A metadata node will attempt to track changes to the values it holds. In the - event that a value is deleted, it will be replaced with a typeless - "null", such as "metadata !{null, i32 10}".

- -

A named metadata is a collection of - metadata nodes. For example: "!foo = metadata !{!4, !3}". - -

Optimizations may rely on metadata to provide additional information about - the program that isn't available in the instructions, or that isn't easily - computable. Similarly, the code generator may expect a certain metadata - format to be used to express debugging information.

- -
- @@ -2444,6 +2404,35 @@ call void asm alignstack "eieio", ""()
+ + + +
+ +

LLVM IR allows metadata to be attached to instructions in the program that + can convey extra information about the code to the optimizers and code + generator. One example application of metadata is source-level debug + information. There are two metadata primitives: strings and nodes. All + metadata has the metadata type and is identified in syntax by a + preceding exclamation point ('!').

+ +

A metadata string is a string surrounded by double quotes. It can contain + any character by escaping non-printable characters with "\xx" where "xx" is + the two digit hex code. For example: "!"test\00"".

+ +

Metadata nodes are represented with notation similar to structure constants + (a comma separated list of elements, surrounded by braces and preceded by an + exclamation point). For example: "!{ metadata !"test\00", i32 + 10}". Metadata nodes can have any values as their operand.

+ +

A named metadata is a collection of + metadata nodes, which can be looked up in the module symbol table. For + example: "!foo = metadata !{!4, !3}". + +

+
@@ -2840,6 +2829,9 @@ IfUnequal: block to the "normal" label. If the callee unwinds then no return value is available.

+

Note that the code generator does not yet completely support unwind, and +that the invoke/unwind semantics are likely to change in future versions.

+
Example:
   %retval = invoke i32 @Test(i32 15) to label %Continue
@@ -2876,6 +2868,9 @@ Instruction 
specified by the invoke instruction. If there is no invoke instruction in the dynamic call chain, undefined behavior results.

+

Note that the code generator does not yet completely support unwind, and +that the invoke/unwind semantics are likely to change in future versions.

+ @@ -7350,7 +7345,7 @@ LLVM.

Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-01-11 20:35:55 +0100 (Mon, 11 Jan 2010) $ + Last modified: $Date: 2010-01-15 22:50:19 +0100 (Fri, 15 Jan 2010) $ Modified: vendor/llvm/dist/docs/ReleaseNotes.html ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.html Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/docs/ReleaseNotes.html Sat Jan 23 11:09:33 2010 (r202878) @@ -59,6 +59,7 @@ Almost dead code. lib/Transforms/IPO/MergeFunctions.cpp => consider for 2.8. llvm/Analysis/PointerTracking.h => Edwin wants this, consider for 2.8. ABCD, SCCVN, GEPSplitterPass + MSIL backend? --> @@ -1349,7 +1350,7 @@ lists.

src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
- Last modified: $Date: 2010-01-09 23:30:40 +0100 (Sat, 09 Jan 2010) $ + Last modified: $Date: 2010-01-16 22:25:13 +0100 (Sat, 16 Jan 2010) $ Modified: vendor/llvm/dist/include/llvm-c/Core.h ============================================================================== --- vendor/llvm/dist/include/llvm-c/Core.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm-c/Core.h Sat Jan 23 11:09:33 2010 (r202878) @@ -117,8 +117,7 @@ typedef enum { LLVMNoCaptureAttribute = 1<<21, LLVMNoRedZoneAttribute = 1<<22, LLVMNoImplicitFloatAttribute = 1<<23, - LLVMNakedAttribute = 1<<24, - LLVMInlineHintAttribute = 1<<25 + LLVMNakedAttribute = 1<<24 } LLVMAttribute; typedef enum { @@ -1008,7 +1007,7 @@ namespace llvm { \ template \ inline T *unwrap(ref P) { \ - T *Q = dynamic_cast(unwrap(P)); \ + T *Q = (T*)unwrap(P); \ assert(Q && "Invalid cast!"); \ return Q; \ } Modified: vendor/llvm/dist/include/llvm/ADT/DenseMapInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/DenseMapInfo.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm/ADT/DenseMapInfo.h Sat Jan 23 11:09:33 2010 (r202878) @@ -92,6 +92,19 @@ template<> struct DenseMapInfo struct DenseMapInfo { + static inline long long getEmptyKey() { return 0x7fffffffffffffffLL; } + static inline long long getTombstoneKey() { return -0x7fffffffffffffffLL-1; } + static unsigned getHashValue(const long long& Val) { + return (unsigned)(Val * 37LL); + } + static bool isEqual(const long long& LHS, + const long long& RHS) { + return LHS == RHS; + } +}; + // Provide DenseMapInfo for all pairs whose members have info. template struct DenseMapInfo > { Modified: vendor/llvm/dist/include/llvm/ADT/ImmutableMap.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/ImmutableMap.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm/ADT/ImmutableMap.h Sat Jan 23 11:09:33 2010 (r202878) @@ -217,7 +217,7 @@ public: // Utility methods. //===--------------------------------------------------===// - inline unsigned getHeight() const { return Root ? Root->getHeight() : 0; } + unsigned getHeight() const { return Root ? Root->getHeight() : 0; } static inline void Profile(FoldingSetNodeID& ID, const ImmutableMap& M) { ID.AddPointer(M.Root); Modified: vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h Sat Jan 23 11:09:33 2010 (r202878) @@ -51,13 +51,11 @@ public: /// getLeft - Returns a pointer to the left subtree. This value /// is NULL if there is no left subtree. - ImutAVLTree *getLeft() const { - return reinterpret_cast(Left & ~LeftFlags); - } + ImutAVLTree *getLeft() const { return Left; } /// getRight - Returns a pointer to the right subtree. This value is /// NULL if there is no right subtree. - ImutAVLTree* getRight() const { return Right; } + ImutAVLTree *getRight() const { return Right; } /// getHeight - Returns the height of the tree. A tree with no subtrees /// has a height of 1. @@ -190,23 +188,22 @@ public: unsigned HL = getLeft() ? getLeft()->verify() : 0; unsigned HR = getRight() ? getRight()->verify() : 0; - assert (getHeight() == ( HL > HR ? HL : HR ) + 1 - && "Height calculation wrong."); - - assert ((HL > HR ? HL-HR : HR-HL) <= 2 - && "Balancing invariant violated."); - - - assert (!getLeft() - || ImutInfo::isLess(ImutInfo::KeyOfValue(getLeft()->getValue()), - ImutInfo::KeyOfValue(getValue())) - && "Value in left child is not less that current value."); + assert(getHeight() == ( HL > HR ? HL : HR ) + 1 + && "Height calculation wrong"); + assert((HL > HR ? HL-HR : HR-HL) <= 2 + && "Balancing invariant violated"); - assert (!getRight() - || ImutInfo::isLess(ImutInfo::KeyOfValue(getValue()), - ImutInfo::KeyOfValue(getRight()->getValue())) - && "Current value is not less that value of right child."); + assert(!getLeft() + || ImutInfo::isLess(ImutInfo::KeyOfValue(getLeft()->getValue()), + ImutInfo::KeyOfValue(getValue())) + && "Value in left child is not less that current value"); + + + assert(!getRight() + || ImutInfo::isLess(ImutInfo::KeyOfValue(getValue()), + ImutInfo::KeyOfValue(getRight()->getValue())) + && "Current value is not less that value of right child"); return getHeight(); } @@ -221,9 +218,11 @@ public: //===----------------------------------------------------===// private: - uintptr_t Left; + ImutAVLTree* Left; ImutAVLTree* Right; - unsigned Height; + unsigned Height : 28; + unsigned Mutable : 1; + unsigned CachedDigest : 1; value_type Value; uint32_t Digest; @@ -232,15 +231,12 @@ private: //===----------------------------------------------------===// private: - - enum { Mutable = 0x1, NoCachedDigest = 0x2, LeftFlags = 0x3 }; - /// ImutAVLTree - Internal constructor that is only called by /// ImutAVLFactory. - ImutAVLTree(ImutAVLTree* l, ImutAVLTree* r, value_type_ref v, unsigned height) - : Left(reinterpret_cast(l) | (Mutable | NoCachedDigest)), - Right(r), Height(height), Value(v), Digest(0) {} - + ImutAVLTree(ImutAVLTree* l, ImutAVLTree* r, value_type_ref v, + unsigned height) + : Left(l), Right(r), Height(height), Mutable(true), CachedDigest(false), + Value(v), Digest(0) {} /// isMutable - Returns true if the left and right subtree references /// (as well as height) can be changed. If this method returns false, @@ -248,11 +244,11 @@ private: /// object should always have this method return true. Further, if this /// method returns false for an instance of ImutAVLTree, all subtrees /// will also have this method return false. The converse is not true. - bool isMutable() const { return Left & Mutable; } + bool isMutable() const { return Mutable; } /// hasCachedDigest - Returns true if the digest for this tree is cached. /// This can only be true if the tree is immutable. - bool hasCachedDigest() const { return !(Left & NoCachedDigest); } + bool hasCachedDigest() const { return CachedDigest; } //===----------------------------------------------------===// // Mutating operations. A tree root can be manipulated as @@ -269,13 +265,13 @@ private: /// it is an error to call setLeft(), setRight(), and setHeight(). void MarkImmutable() { assert(isMutable() && "Mutable flag already removed."); - Left &= ~Mutable; + Mutable = false; } /// MarkedCachedDigest - Clears the NoCachedDigest flag for a tree. void MarkedCachedDigest() { assert(!hasCachedDigest() && "NoCachedDigest flag already removed."); - Left &= ~NoCachedDigest; + CachedDigest = true; } /// setLeft - Changes the reference of the left subtree. Used internally @@ -283,7 +279,8 @@ private: void setLeft(ImutAVLTree* NewLeft) { assert(isMutable() && "Only a mutable tree can have its left subtree changed."); - Left = reinterpret_cast(NewLeft) | LeftFlags; + Left = NewLeft; + CachedDigest = false; } /// setRight - Changes the reference of the right subtree. Used internally @@ -293,9 +290,7 @@ private: "Only a mutable tree can have its right subtree changed."); Right = NewRight; - // Set the NoCachedDigest flag. - Left = Left | NoCachedDigest; - + CachedDigest = false; } /// setHeight - Changes the height of the tree. Used internally by @@ -397,7 +392,7 @@ public: private: bool isEmpty(TreeTy* T) const { return !T; } - unsigned Height(TreeTy* T) const { return T ? T->getHeight() : 0; } + unsigned Height(TreeTy* T) const { return T ? T->getHeight() : 0; } TreeTy* Left(TreeTy* T) const { return T->getLeft(); } TreeTy* Right(TreeTy* T) const { return T->getRight(); } value_type_ref Value(TreeTy* T) const { return T->Value; } @@ -405,7 +400,7 @@ private: unsigned IncrementHeight(TreeTy* L, TreeTy* R) const { unsigned hl = Height(L); unsigned hr = Height(R); - return ( hl > hr ? hl : hr ) + 1; + return (hl > hr ? hl : hr) + 1; } static bool CompareTreeWithSection(TreeTy* T, @@ -434,17 +429,17 @@ private: TreeTy* CreateNode(TreeTy* L, value_type_ref V, TreeTy* R) { BumpPtrAllocator& A = getAllocator(); TreeTy* T = (TreeTy*) A.Allocate(); - new (T) TreeTy(L,R,V,IncrementHeight(L,R)); + new (T) TreeTy(L, R, V, IncrementHeight(L,R)); return T; } TreeTy* CreateNode(TreeTy* L, TreeTy* OldTree, TreeTy* R) { - assert (!isEmpty(OldTree)); + assert(!isEmpty(OldTree)); if (OldTree->isMutable()) { OldTree->setLeft(L); OldTree->setRight(R); - OldTree->setHeight(IncrementHeight(L,R)); + OldTree->setHeight(IncrementHeight(L, R)); return OldTree; } else @@ -459,8 +454,7 @@ private: unsigned hr = Height(R); if (hl > hr + 2) { - assert (!isEmpty(L) && - "Left tree cannot be empty to have a height >= 2."); + assert(!isEmpty(L) && "Left tree cannot be empty to have a height >= 2"); TreeTy* LL = Left(L); TreeTy* LR = Right(L); @@ -468,8 +462,7 @@ private: if (Height(LL) >= Height(LR)) return CreateNode(LL, L, CreateNode(LR,V,R)); - assert (!isEmpty(LR) && - "LR cannot be empty because it has a height >= 1."); + assert(!isEmpty(LR) && "LR cannot be empty because it has a height >= 1"); TreeTy* LRL = Left(LR); TreeTy* LRR = Right(LR); @@ -477,8 +470,7 @@ private: return CreateNode(CreateNode(LL,L,LRL), LR, CreateNode(LRR,V,R)); } else if (hr > hl + 2) { - assert (!isEmpty(R) && - "Right tree cannot be empty to have a height >= 2."); + assert(!isEmpty(R) && "Right tree cannot be empty to have a height >= 2"); TreeTy* RL = Left(R); TreeTy* RR = Right(R); @@ -486,8 +478,7 @@ private: if (Height(RR) >= Height(RL)) return CreateNode(CreateNode(L,V,RL), R, RR); - assert (!isEmpty(RL) && - "RL cannot be empty because it has a height >= 1."); + assert(!isEmpty(RL) && "RL cannot be empty because it has a height >= 1"); TreeTy* RLL = Left(RL); TreeTy* RLR = Right(RL); @@ -505,7 +496,7 @@ private: if (isEmpty(T)) return CreateNode(T, V, T); - assert (!T->isMutable()); + assert(!T->isMutable()); key_type_ref K = ImutInfo::KeyOfValue(V); key_type_ref KCurrent = ImutInfo::KeyOfValue(Value(T)); @@ -526,7 +517,7 @@ private: if (isEmpty(T)) return T; - assert (!T->isMutable()); + assert(!T->isMutable()); key_type_ref KCurrent = ImutInfo::KeyOfValue(Value(T)); @@ -548,7 +539,7 @@ private: } TreeTy* RemoveMinBinding(TreeTy* T, TreeTy*& NodeRemoved) { - assert (!isEmpty(T)); + assert(!isEmpty(T)); if (isEmpty(Left(T))) { NodeRemoved = T; @@ -641,12 +632,12 @@ public: } TreeTy* operator*() const { - assert (!stack.empty()); + assert(!stack.empty()); return reinterpret_cast(stack.back() & ~Flags); } uintptr_t getVisitState() { - assert (!stack.empty()); + assert(!stack.empty()); return stack.back() & Flags; } @@ -658,7 +649,7 @@ public: } void SkipToParent() { - assert (!stack.empty()); + assert(!stack.empty()); stack.pop_back(); if (stack.empty()) @@ -672,7 +663,7 @@ public: stack.back() |= VisitedRight; break; default: - assert (false && "Unreachable."); + assert(false && "Unreachable."); } } @@ -690,10 +681,10 @@ public: inline bool operator!=(const _Self& x) const { return !operator==(x); } _Self& operator++() { - assert (!stack.empty()); + assert(!stack.empty()); TreeTy* Current = reinterpret_cast(stack.back() & ~Flags); - assert (Current); + assert(Current); switch (getVisitState()) { case VisitedNone: @@ -717,17 +708,17 @@ public: break; default: - assert (false && "Unreachable."); + assert(false && "Unreachable."); } return *this; } _Self& operator--() { - assert (!stack.empty()); + assert(!stack.empty()); TreeTy* Current = reinterpret_cast(stack.back() & ~Flags); - assert (Current); + assert(Current); switch (getVisitState()) { case VisitedNone: @@ -752,7 +743,7 @@ public: break; default: - assert (false && "Unreachable."); + assert(false && "Unreachable."); } return *this; @@ -1051,7 +1042,7 @@ public: // Utility methods. //===--------------------------------------------------===// - inline unsigned getHeight() const { return Root ? Root->getHeight() : 0; } + unsigned getHeight() const { return Root ? Root->getHeight() : 0; } static inline void Profile(FoldingSetNodeID& ID, const ImmutableSet& S) { ID.AddPointer(S.Root); Added: vendor/llvm/dist/include/llvm/Analysis/DOTGraphTraitsPass.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/Analysis/DOTGraphTraitsPass.h Sat Jan 23 11:09:33 2010 (r202878) @@ -0,0 +1,83 @@ +//===-- DOTGraphTraitsPass.h - Print/View dotty graphs-----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Templates to create dotty viewer and printer passes for GraphTraits graphs. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ANALYSIS_DOT_GRAPHTRAITS_PASS_H +#define LLVM_ANALYSIS_DOT_GRAPHTRAITS_PASS_H + +#include "llvm/Pass.h" +#include "llvm/Analysis/CFGPrinter.h" + +namespace llvm { +template +struct DOTGraphTraitsViewer : public FunctionPass { + std::string Name; + + DOTGraphTraitsViewer(std::string GraphName, const void *ID) : FunctionPass(ID) { + Name = GraphName; + } + + virtual bool runOnFunction(Function &F) { + Analysis *Graph; + std::string Title, GraphName; + Graph = &getAnalysis(); + GraphName = DOTGraphTraits::getGraphName(Graph); + Title = GraphName + " for '" + F.getNameStr() + "' function"; + ViewGraph(Graph, Name, Simple, Title); + + return false; + } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + AU.addRequired(); + } +}; + +template +struct DOTGraphTraitsPrinter : public FunctionPass { + + std::string Name; + + DOTGraphTraitsPrinter(std::string GraphName, const void *ID) + : FunctionPass(ID) { + Name = GraphName; + } + + virtual bool runOnFunction(Function &F) { + Analysis *Graph; + std::string Filename = Name + "." + F.getNameStr() + ".dot"; + errs() << "Writing '" << Filename << "'..."; + + std::string ErrorInfo; + raw_fd_ostream File(Filename.c_str(), ErrorInfo); + Graph = &getAnalysis(); + + std::string Title, GraphName; + GraphName = DOTGraphTraits::getGraphName(Graph); + Title = GraphName + " for '" + F.getNameStr() + "' function"; + + if (ErrorInfo.empty()) + WriteGraph(File, Graph, Simple, Name, Title); + else + errs() << " error opening file for writing!"; + errs() << "\n"; + return false; + } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + AU.addRequired(); + } +}; +} +#endif Modified: vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h Sat Jan 23 11:09:33 2010 (r202878) @@ -475,7 +475,7 @@ namespace llvm { /// is not associated with any DWARF tag. class DILocation : public DIDescriptor { public: - explicit DILocation(MDNode *N) : DIDescriptor(N) { ; } + explicit DILocation(MDNode *N) : DIDescriptor(N) { } unsigned getLineNumber() const { return getUnsignedField(0); } unsigned getColumnNumber() const { return getUnsignedField(1); } @@ -587,7 +587,7 @@ namespace llvm { StringRef DisplayName, StringRef LinkageName, DICompileUnit CompileUnit, unsigned LineNo, - DIType Type, bool isLocalToUnit, + DIType Ty, bool isLocalToUnit, bool isDefinition, unsigned VK = 0, unsigned VIndex = 0, @@ -603,21 +603,21 @@ namespace llvm { StringRef DisplayName, StringRef LinkageName, DICompileUnit CompileUnit, - unsigned LineNo, DIType Type, bool isLocalToUnit, + unsigned LineNo, DIType Ty, bool isLocalToUnit, bool isDefinition, llvm::GlobalVariable *GV); /// CreateVariable - Create a new descriptor for the specified variable. DIVariable CreateVariable(unsigned Tag, DIDescriptor Context, StringRef Name, DICompileUnit CompileUnit, unsigned LineNo, - DIType Type); + DIType Ty); /// CreateComplexVariable - Create a new descriptor for the specified /// variable which has a complex address expression for its address. DIVariable CreateComplexVariable(unsigned Tag, DIDescriptor Context, const std::string &Name, DICompileUnit CompileUnit, unsigned LineNo, - DIType Type, + DIType Ty, SmallVector &addr); /// CreateLexicalBlock - This creates a descriptor for a lexical block @@ -656,13 +656,6 @@ namespace llvm { Constant *GetTagConstant(unsigned TAG); }; - /// Finds the dbg.declare intrinsic corresponding to this value if any. - /// It looks through pointer casts too. - const DbgDeclareInst *findDbgDeclare(const Value *V); - - /// Find the debug info descriptor corresponding to this global variable. - Value *findDbgGlobalDeclare(GlobalVariable *V); - bool getLocationInfo(const Value *V, std::string &DisplayName, std::string &Type, unsigned &LineNo, std::string &File, std::string &Dir); Modified: vendor/llvm/dist/include/llvm/Analysis/DominatorInternals.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/DominatorInternals.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm/Analysis/DominatorInternals.h Sat Jan 23 11:09:33 2010 (r202878) @@ -262,29 +262,17 @@ void Calculate(DominatorTreeBase >::ChildIteratorType CI = GraphTraits >::child_begin(W), - E = GraphTraits >::child_end(W); CI != E; ++CI) { + E = GraphTraits >::child_end(W); CI != E; ++CI) if (DT.Info.count(*CI)) { // Only if this predecessor is reachable! unsigned SemiU = DT.Info[Eval(DT, *CI)].Semi; if (SemiU < WInfo.Semi) WInfo.Semi = SemiU; } - else { - // if the child has no DFS number it is not post-dominated by any exit, - // and so is the current block. - HasChildOutsideDFS = true; - } - } - - // if some child has no DFS number it is not post-dominated by any exit, - // and so is the current block. - if (DT.isPostDominator() && HasChildOutsideDFS) - WInfo.Semi = 0; DT.Info[DT.Vertex[WInfo.Semi]].Bucket.push_back(W); Modified: vendor/llvm/dist/include/llvm/Analysis/IVUsers.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/IVUsers.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm/Analysis/IVUsers.h Sat Jan 23 11:09:33 2010 (r202878) @@ -212,6 +212,11 @@ public: /// value of the OperandValToReplace of the given IVStrideUse. const SCEV *getReplacementExpr(const IVStrideUse &U) const; + /// getCanonicalExpr - Return a SCEV expression which computes the + /// value of the SCEV of the given IVStrideUse, ignoring the + /// isUseOfPostIncrementedValue flag. + const SCEV *getCanonicalExpr(const IVStrideUse &U) const; + void print(raw_ostream &OS, const Module* = 0) const; /// dump - This method is used for debugging. Modified: vendor/llvm/dist/include/llvm/Analysis/LoopPass.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/LoopPass.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm/Analysis/LoopPass.h Sat Jan 23 11:09:33 2010 (r202878) @@ -28,8 +28,8 @@ class PMStack; class LoopPass : public Pass { public: - explicit LoopPass(intptr_t pid) : Pass(pid) {} - explicit LoopPass(void *pid) : Pass(pid) {} + explicit LoopPass(intptr_t pid) : Pass(PT_Loop, pid) {} + explicit LoopPass(void *pid) : Pass(PT_Loop, pid) {} // runOnLoop - This method should be implemented by the subclass to perform // whatever action is necessary for the specified Loop. @@ -94,6 +94,9 @@ public: return "Loop Pass Manager"; } + virtual PMDataManager *getAsPMDataManager() { return this; } + virtual Pass *getAsPass() { return this; } + /// Print passes managed by this manager void dumpPassStructure(unsigned Offset); Modified: vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Sat Jan 23 11:09:33 2010 (r202878) @@ -167,7 +167,7 @@ namespace llvm { }; friend class SCEVCallbackVH; - friend struct SCEVExpander; + friend class SCEVExpander; /// F - The function we are analyzing. /// @@ -181,6 +181,10 @@ namespace llvm { /// TargetData *TD; + /// DT - The dominator tree. + /// + DominatorTree *DT; + /// CouldNotCompute - This SCEV is used to represent unknown trip /// counts and things. SCEVCouldNotCompute CouldNotCompute; Modified: vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h Sat Jan 23 08:45:22 2010 (r202877) +++ vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h Sat Jan 23 11:09:33 2010 (r202878) @@ -26,19 +26,47 @@ namespace llvm { /// Clients should create an instance of this class when rewriting is needed, /// and destroy it when finished to allow the release of the associated /// memory. - struct SCEVExpander : public SCEVVisitor { + class SCEVExpander : public SCEVVisitor { + public: ScalarEvolution &SE; + + private: std::map, AssertingVH > InsertedExpressions; std::set InsertedValues; + /// PostIncLoop - When non-null, expanded addrecs referring to the given + /// loop expanded in post-inc mode. For example, expanding {1,+,1} in + /// post-inc mode returns the add instruction that adds one to the phi + /// for {0,+,1}, as opposed to a new phi starting at 1. This is only + /// supported in non-canonical mode. + const Loop *PostIncLoop; + + /// IVIncInsertPos - When this is non-null, addrecs expanded in the + /// loop it indicates should be inserted with increments at + /// IVIncInsertPos. + const Loop *IVIncInsertLoop; + + /// IVIncInsertPos - When expanding addrecs in the IVIncInsertLoop loop, + /// insert the IV increment at this position. + Instruction *IVIncInsertPos; + + /// CanonicalMode - When true, expressions are expanded in "canonical" + /// form. In particular, addrecs are expanded as arithmetic based on + /// a canonical induction variable. When false, expression are expanded + /// in a more literal form. + bool CanonicalMode; + + protected: typedef IRBuilder BuilderType; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 11:10:27 2010 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 295A21065672; Sat, 23 Jan 2010 11:10:27 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 138BA8FC16; Sat, 23 Jan 2010 11:10:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NBAR6a086870; Sat, 23 Jan 2010 11:10:27 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NBAR9O086866; Sat, 23 Jan 2010 11:10:27 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201001231110.o0NBAR9O086866@svn.freebsd.org> From: Roman Divacky Date: Sat, 23 Jan 2010 11:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202879 - in vendor/clang/dist: clang.xcodeproj include/clang-c include/clang/AST include/clang/Analysis include/clang/Analysis/PathSensitive include/clang/Basic include/clang/Driver in... 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: Sat, 23 Jan 2010 11:10:27 -0000 Author: rdivacky Date: Sat Jan 23 11:10:26 2010 New Revision: 202879 URL: http://svn.freebsd.org/changeset/base/202879 Log: Update clang to r94309. Added: vendor/clang/dist/include/clang/AST/UnresolvedSet.h vendor/clang/dist/include/clang/Basic/MacroBuilder.h vendor/clang/dist/include/clang/Basic/Specifiers.h vendor/clang/dist/lib/CodeGen/CGVTT.cpp vendor/clang/dist/test/CXX/class.access/class.access.base/p1.cpp vendor/clang/dist/test/CodeCompletion/call.c vendor/clang/dist/test/CodeGenCXX/vtt-layout.cpp vendor/clang/dist/test/Index/Inputs/remap-load-to.c vendor/clang/dist/test/Index/load-exprs.c vendor/clang/dist/test/Index/remap-cursor-at.c vendor/clang/dist/test/Index/remap-load.c vendor/clang/dist/test/PCH/cxx_exprs.cpp vendor/clang/dist/test/PCH/cxx_exprs.h vendor/clang/dist/test/Rewriter/rewrite-extern-c.mm vendor/clang/dist/test/Rewriter/rewrite-typeof.mm vendor/clang/dist/test/SemaCXX/warn-unreachable.cpp vendor/clang/dist/test/SemaObjC/method-unused-attribute.m vendor/clang/dist/test/SemaObjC/property-category-impl.m vendor/clang/dist/test/SemaObjC/unimplemented-protocol-prop.m vendor/clang/dist/test/SemaObjCXX/cstyle-block-pointer-cast.mm vendor/clang/dist/test/SemaObjCXX/pointer-to-objc-pointer-conv.mm vendor/clang/dist/test/SemaTemplate/instantiate-local-class.cpp vendor/clang/dist/tools/CIndex/CXCursor.cpp vendor/clang/dist/tools/CIndex/CXCursor.h vendor/clang/dist/utils/OptionalTests/ vendor/clang/dist/utils/OptionalTests/Extra/ vendor/clang/dist/utils/OptionalTests/Extra/README.txt vendor/clang/dist/utils/OptionalTests/Extra/Runtime/ vendor/clang/dist/utils/OptionalTests/Extra/Runtime/darwin-clang_rt.c vendor/clang/dist/utils/OptionalTests/README.txt vendor/clang/dist/utils/OptionalTests/lit.cfg Deleted: vendor/clang/dist/include/clang/Parse/AccessSpecifier.h vendor/clang/dist/lib/CodeGen/TargetABIInfo.cpp vendor/clang/dist/test/Analysis/NSString-failed-cases.m vendor/clang/dist/test/Driver/darwin-arm.c vendor/clang/dist/test/Index/c-index-api-fn-scan.m vendor/clang/dist/test/Index/comments.c vendor/clang/dist/test/Index/find-decls.c vendor/clang/dist/test/Index/find-defs.c vendor/clang/dist/test/Index/find-refs.c vendor/clang/dist/test/Index/multiple-redecls.c vendor/clang/dist/test/Index/objc-decls.m vendor/clang/dist/test/Index/objc-message.m vendor/clang/dist/test/Index/resolve-loc.c vendor/clang/dist/test/Preprocessor/foo.framework/ vendor/clang/dist/test/Preprocessor/framework-include.m Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/CXXInheritance.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/AST/TypeLocVisitor.h vendor/clang/dist/include/clang/Analysis/CFG.h vendor/clang/dist/include/clang/Analysis/PathSensitive/AnalysisContext.h vendor/clang/dist/include/clang/Analysis/PathSensitive/CheckerVisitor.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Store.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/Makefile vendor/clang/dist/include/clang/Basic/Version.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h vendor/clang/dist/include/clang/Frontend/PreprocessorOptions.h vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/DeclSpec.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Rewrite/DeltaTree.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/CXXInheritance.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprCXX.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypeLoc.cpp vendor/clang/dist/lib/Analysis/AnalysisContext.cpp vendor/clang/dist/lib/Analysis/ArrayBoundChecker.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/CastToStructChecker.cpp vendor/clang/dist/lib/Analysis/GRExprEngine.cpp vendor/clang/dist/lib/Analysis/MallocChecker.cpp vendor/clang/dist/lib/Analysis/RegionStore.cpp vendor/clang/dist/lib/Analysis/ReturnPointerRangeChecker.cpp vendor/clang/dist/lib/Basic/Makefile vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/CodeGen/CMakeLists.txt vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.h vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/Makefile vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Frontend/CacheTokens.cpp vendor/clang/dist/lib/Frontend/DeclXML.cpp vendor/clang/dist/lib/Frontend/HTMLDiagnostics.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp vendor/clang/dist/lib/Frontend/PCHReaderStmt.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp vendor/clang/dist/lib/Frontend/PCHWriterStmt.cpp vendor/clang/dist/lib/Frontend/PlistDiagnostics.cpp vendor/clang/dist/lib/Frontend/PrintParserCallbacks.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/StmtXML.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Frontend/TypeXML.cpp vendor/clang/dist/lib/Index/ResolveLocation.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Makefile vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/MinimalAction.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Rewrite/DeltaTree.cpp vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaInit.h vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaOverload.h vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/Analysis/malloc.c vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/outofbound.c vendor/clang/dist/test/CodeGen/2009-10-20-GlobalDebug.c vendor/clang/dist/test/CodeGenCXX/copy-assign-synthesis-3.cpp vendor/clang/dist/test/CodeGenCXX/debug-info.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp vendor/clang/dist/test/CodeGenCXX/temp-order.cpp vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/FixIt/typo.m vendor/clang/dist/test/Index/TestClassDecl.m vendor/clang/dist/test/Index/TestClassForwardDecl.m vendor/clang/dist/test/Index/c-index-api-loadTU-test.m vendor/clang/dist/test/Index/c-index-getCursor-test.m vendor/clang/dist/test/Index/cindex-from-source.m vendor/clang/dist/test/Lexer/constants-ms.c vendor/clang/dist/test/Misc/tabstop.c vendor/clang/dist/test/Rewriter/rewrite-byref-vars.mm vendor/clang/dist/test/Rewriter/rewrite-protocol-type-1.m vendor/clang/dist/test/Sema/block-literal.c vendor/clang/dist/test/Sema/block-misc.c vendor/clang/dist/test/Sema/compound-literal.c vendor/clang/dist/test/Sema/scope-check.c vendor/clang/dist/test/Sema/warn-unreachable.c vendor/clang/dist/test/SemaCXX/access-control-check.cpp vendor/clang/dist/test/SemaCXX/anonymous-union.cpp vendor/clang/dist/test/SemaCXX/enum.cpp vendor/clang/dist/test/SemaCXX/new-delete.cpp vendor/clang/dist/test/SemaCXX/overload-call.cpp vendor/clang/dist/test/SemaCXX/unused.cpp vendor/clang/dist/test/SemaCXX/virtual-override.cpp vendor/clang/dist/test/SemaObjC/property-category-2.m vendor/clang/dist/test/SemaObjC/property-user-setter.m vendor/clang/dist/test/SemaObjC/property.m vendor/clang/dist/test/SemaObjC/super.m vendor/clang/dist/test/SemaTemplate/dependent-base-classes.cpp vendor/clang/dist/test/SemaTemplate/dependent-base-member-init.cpp vendor/clang/dist/test/SemaTemplate/dependent-expr.cpp vendor/clang/dist/test/SemaTemplate/friend-template.cpp vendor/clang/dist/test/SemaTemplate/member-template-access-expr.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndex.exports vendor/clang/dist/tools/CIndex/CIndexCodeCompletion.cpp vendor/clang/dist/tools/CIndex/CIndexUSRs.cpp vendor/clang/dist/tools/CIndex/CIndexer.cpp vendor/clang/dist/tools/CIndex/CIndexer.h vendor/clang/dist/tools/CIndex/CMakeLists.txt vendor/clang/dist/tools/CIndex/Makefile vendor/clang/dist/tools/CMakeLists.txt vendor/clang/dist/tools/Makefile vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/driver/CMakeLists.txt vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/www/analyzer/scan-build.html vendor/clang/dist/www/hacking.html Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj ============================================================================== --- vendor/clang/dist/clang.xcodeproj/project.pbxproj Sat Jan 23 11:09:33 2010 (r202878) +++ vendor/clang/dist/clang.xcodeproj/project.pbxproj Sat Jan 23 11:10:26 2010 (r202879) @@ -21,7 +21,6 @@ 1A2A54BD0FD1DD1C00F4CE45 /* HTMLPrint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */; }; 1A2A54BE0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */; }; 1A2A54BF0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */; }; - 1A2A54C00FD1DD1C00F4CE45 /* RewriteBlocks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54AF0FD1DD1C00F4CE45 /* RewriteBlocks.cpp */; }; 1A2A54C10FD1DD1C00F4CE45 /* RewriteMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B00FD1DD1C00F4CE45 /* RewriteMacros.cpp */; }; 1A2A54C20FD1DD1C00F4CE45 /* RewriteObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B10FD1DD1C00F4CE45 /* RewriteObjC.cpp */; }; 1A2A54C30FD1DD1C00F4CE45 /* RewriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B20FD1DD1C00F4CE45 /* RewriteTest.cpp */; }; @@ -44,10 +43,20 @@ 1A81AA19108144F40094E50B /* CGVtable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A81AA18108144F40094E50B /* CGVtable.cpp */; }; 1A869A700BA2164C008DA07A /* LiteralSupport.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A869A6E0BA2164C008DA07A /* LiteralSupport.h */; }; 1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */; }; + 1A97825B1108BA18002B98FC /* CGVTT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A97825A1108BA18002B98FC /* CGVTT.cpp */; }; 1A986AB710D0746D00A8EA9E /* CGDeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */; }; 1AA1D91810125DE30078DEBC /* RecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */; }; 1AA963C410D85A7300786C86 /* FullExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA963C310D85A7300786C86 /* FullExpr.cpp */; }; 1ABC36940C7A4BDC006DB0AB /* CGBuiltin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABC36930C7A4BDC006DB0AB /* CGBuiltin.cpp */; }; + 1ACB57E41105820D0047B991 /* CompilerInstance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */; }; + 1ACB57E51105820D0047B991 /* CompilerInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */; }; + 1ACB57E61105820D0047B991 /* DeclXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DD1105820D0047B991 /* DeclXML.cpp */; }; + 1ACB57E71105820D0047B991 /* FrontendAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DE1105820D0047B991 /* FrontendAction.cpp */; }; + 1ACB57E81105820D0047B991 /* FrontendActions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DF1105820D0047B991 /* FrontendActions.cpp */; }; + 1ACB57E91105820D0047B991 /* FrontendOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E01105820D0047B991 /* FrontendOptions.cpp */; }; + 1ACB57EA1105820D0047B991 /* LangStandards.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E11105820D0047B991 /* LangStandards.cpp */; }; + 1ACB57EB1105820D0047B991 /* TypeXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E21105820D0047B991 /* TypeXML.cpp */; }; + 1ACB57EC1105820D0047B991 /* VerifyDiagnosticsClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E31105820D0047B991 /* VerifyDiagnosticsClient.cpp */; }; 1ADD795410A90C6100741BBA /* TypePrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADD795110A90C6100741BBA /* TypePrinter.cpp */; }; 1ADD795510A90C6100741BBA /* TypeLoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADD795210A90C6100741BBA /* TypeLoc.cpp */; }; 1ADD795610A90C6100741BBA /* TemplateBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADD795310A90C6100741BBA /* TemplateBase.cpp */; }; @@ -59,7 +68,6 @@ 3507E4C20E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */; }; 352246E70F5C6BE000D0D279 /* HTMLDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */; }; 352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */; }; - 352246E90F5C6BE000D0D279 /* ManagerRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E30F5C6BE000D0D279 /* ManagerRegistry.cpp */; }; 352246EA0F5C6BE000D0D279 /* PlistDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */; }; 352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */; }; 352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */; }; @@ -360,7 +368,6 @@ 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLPrint.cpp; path = lib/Frontend/HTMLPrint.cpp; sourceTree = ""; }; 1A2A54AD0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintParserCallbacks.cpp; path = lib/Frontend/PrintParserCallbacks.cpp; sourceTree = ""; }; 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrintPreprocessedOutput.cpp; path = lib/Frontend/PrintPreprocessedOutput.cpp; sourceTree = ""; }; - 1A2A54AF0FD1DD1C00F4CE45 /* RewriteBlocks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RewriteBlocks.cpp; path = lib/Frontend/RewriteBlocks.cpp; sourceTree = ""; }; 1A2A54B00FD1DD1C00F4CE45 /* RewriteMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RewriteMacros.cpp; path = lib/Frontend/RewriteMacros.cpp; sourceTree = ""; }; 1A2A54B10FD1DD1C00F4CE45 /* RewriteObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = RewriteObjC.cpp; path = lib/Frontend/RewriteObjC.cpp; sourceTree = ""; tabWidth = 2; }; 1A2A54B20FD1DD1C00F4CE45 /* RewriteTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RewriteTest.cpp; path = lib/Frontend/RewriteTest.cpp; sourceTree = ""; }; @@ -398,6 +405,7 @@ 1A81AA5D108278A20094E50B /* CGVtable.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGVtable.h; path = lib/CodeGen/CGVtable.h; sourceTree = ""; tabWidth = 2; }; 1A869A6E0BA2164C008DA07A /* LiteralSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiteralSupport.h; sourceTree = ""; }; 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiteralSupport.cpp; sourceTree = ""; }; + 1A97825A1108BA18002B98FC /* CGVTT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CGVTT.cpp; path = lib/CodeGen/CGVTT.cpp; sourceTree = ""; }; 1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGDeclCXX.cpp; path = lib/CodeGen/CGDeclCXX.cpp; sourceTree = ""; tabWidth = 2; }; 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = RecordLayoutBuilder.cpp; path = lib/AST/RecordLayoutBuilder.cpp; sourceTree = ""; tabWidth = 2; }; 1AA1D91710125DE30078DEBC /* RecordLayoutBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = RecordLayoutBuilder.h; path = lib/AST/RecordLayoutBuilder.h; sourceTree = ""; tabWidth = 2; }; @@ -405,6 +413,15 @@ 1AA963C310D85A7300786C86 /* FullExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = FullExpr.cpp; path = lib/AST/FullExpr.cpp; sourceTree = ""; tabWidth = 2; }; 1AB290021045858B00FE33D8 /* PartialDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = PartialDiagnostic.h; sourceTree = ""; tabWidth = 2; }; 1ABC36930C7A4BDC006DB0AB /* CGBuiltin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGBuiltin.cpp; path = lib/CodeGen/CGBuiltin.cpp; sourceTree = ""; tabWidth = 2; }; + 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerInstance.cpp; path = lib/Frontend/CompilerInstance.cpp; sourceTree = ""; }; + 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerInvocation.cpp; path = lib/Frontend/CompilerInvocation.cpp; sourceTree = ""; }; + 1ACB57DD1105820D0047B991 /* DeclXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclXML.cpp; path = lib/Frontend/DeclXML.cpp; sourceTree = ""; }; + 1ACB57DE1105820D0047B991 /* FrontendAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FrontendAction.cpp; path = lib/Frontend/FrontendAction.cpp; sourceTree = ""; }; + 1ACB57DF1105820D0047B991 /* FrontendActions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FrontendActions.cpp; path = lib/Frontend/FrontendActions.cpp; sourceTree = ""; }; + 1ACB57E01105820D0047B991 /* FrontendOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FrontendOptions.cpp; path = lib/Frontend/FrontendOptions.cpp; sourceTree = ""; }; + 1ACB57E11105820D0047B991 /* LangStandards.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LangStandards.cpp; path = lib/Frontend/LangStandards.cpp; sourceTree = ""; }; + 1ACB57E21105820D0047B991 /* TypeXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeXML.cpp; path = lib/Frontend/TypeXML.cpp; sourceTree = ""; }; + 1ACB57E31105820D0047B991 /* VerifyDiagnosticsClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VerifyDiagnosticsClient.cpp; path = lib/Frontend/VerifyDiagnosticsClient.cpp; sourceTree = ""; }; 1ADD795110A90C6100741BBA /* TypePrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypePrinter.cpp; path = lib/AST/TypePrinter.cpp; sourceTree = ""; }; 1ADD795210A90C6100741BBA /* TypeLoc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeLoc.cpp; path = lib/AST/TypeLoc.cpp; sourceTree = ""; }; 1ADD795310A90C6100741BBA /* TemplateBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TemplateBase.cpp; path = lib/AST/TemplateBase.cpp; sourceTree = ""; }; @@ -418,7 +435,6 @@ 3507E4C10E27FE2D00FB7B57 /* CheckObjCInstMethSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckObjCInstMethSignature.cpp; path = lib/Analysis/CheckObjCInstMethSignature.cpp; sourceTree = ""; }; 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLDiagnostics.cpp; path = lib/Frontend/HTMLDiagnostics.cpp; sourceTree = ""; }; 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitHeaderSearch.cpp; path = lib/Frontend/InitHeaderSearch.cpp; sourceTree = ""; }; - 352246E30F5C6BE000D0D279 /* ManagerRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ManagerRegistry.cpp; path = lib/Frontend/ManagerRegistry.cpp; sourceTree = ""; }; 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlistDiagnostics.cpp; path = lib/Frontend/PlistDiagnostics.cpp; sourceTree = ""; }; 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticBuffer.cpp; path = lib/Frontend/TextDiagnosticBuffer.cpp; sourceTree = ""; }; 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticPrinter.cpp; path = lib/Frontend/TextDiagnosticPrinter.cpp; sourceTree = ""; }; @@ -922,16 +938,22 @@ 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */, 1A2A54A60FD1DD1C00F4CE45 /* Backend.cpp */, 1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */, + 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */, + 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */, + 1ACB57DD1105820D0047B991 /* DeclXML.cpp */, 1A2A54A80FD1DD1C00F4CE45 /* DependencyFile.cpp */, 1A2A54A90FD1DD1C00F4CE45 /* DiagChecker.cpp */, 1A2A54AA0FD1DD1C00F4CE45 /* DocumentXML.cpp */, DEF1683F0F9548DC0098507F /* FixItRewriter.cpp */, + 1ACB57DE1105820D0047B991 /* FrontendAction.cpp */, + 1ACB57DF1105820D0047B991 /* FrontendActions.cpp */, + 1ACB57E01105820D0047B991 /* FrontendOptions.cpp */, 1A2A54AB0FD1DD1C00F4CE45 /* GeneratePCH.cpp */, 352246E10F5C6BE000D0D279 /* HTMLDiagnostics.cpp */, 1A2A54AC0FD1DD1C00F4CE45 /* HTMLPrint.cpp */, 352246E20F5C6BE000D0D279 /* InitHeaderSearch.cpp */, DECB6F060F9D93A800F5FBC7 /* InitPreprocessor.cpp */, - 352246E30F5C6BE000D0D279 /* ManagerRegistry.cpp */, + 1ACB57E11105820D0047B991 /* LangStandards.cpp */, DEF165740F8FB3510098507F /* PCHReader.cpp */, DECB77780FA579B000F5FBC7 /* PCHReaderDecl.cpp */, DECB77120FA5752300F5FBC7 /* PCHReaderStmt.cpp */, @@ -943,11 +965,12 @@ 1A2A54AE0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp */, 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */, 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */, - 1A2A54AF0FD1DD1C00F4CE45 /* RewriteBlocks.cpp */, + 1ACB57E21105820D0047B991 /* TypeXML.cpp */, 1A2A54B00FD1DD1C00F4CE45 /* RewriteMacros.cpp */, 1A2A54B10FD1DD1C00F4CE45 /* RewriteObjC.cpp */, 1A2A54B20FD1DD1C00F4CE45 /* RewriteTest.cpp */, 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */, + 1ACB57E31105820D0047B991 /* VerifyDiagnosticsClient.cpp */, 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */, ); name = Frontend; @@ -1296,6 +1319,7 @@ 35475B230E7997680000BFE4 /* CGValue.h */, 1A81AA18108144F40094E50B /* CGVtable.cpp */, 1A81AA5D108278A20094E50B /* CGVtable.h */, + 1A97825A1108BA18002B98FC /* CGVTT.cpp */, DE928B800C0A615B00231DA4 /* CodeGenFunction.h */, DE928B820C0A616000231DA4 /* CodeGenFunction.cpp */, DE928B7C0C0A615100231DA4 /* CodeGenModule.h */, @@ -1844,7 +1868,6 @@ DEB07AC80F4A427E00F5A2BE /* SemaAttr.cpp in Sources */, 352246E70F5C6BE000D0D279 /* HTMLDiagnostics.cpp in Sources */, 352246E80F5C6BE000D0D279 /* InitHeaderSearch.cpp in Sources */, - 352246E90F5C6BE000D0D279 /* ManagerRegistry.cpp in Sources */, 352246EA0F5C6BE000D0D279 /* PlistDiagnostics.cpp in Sources */, 352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */, 352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */, @@ -1892,7 +1915,6 @@ 1A2A54BD0FD1DD1C00F4CE45 /* HTMLPrint.cpp in Sources */, 1A2A54BE0FD1DD1C00F4CE45 /* PrintParserCallbacks.cpp in Sources */, 1A2A54BF0FD1DD1C00F4CE45 /* PrintPreprocessedOutput.cpp in Sources */, - 1A2A54C00FD1DD1C00F4CE45 /* RewriteBlocks.cpp in Sources */, 1A2A54C10FD1DD1C00F4CE45 /* RewriteMacros.cpp in Sources */, 1A2A54C20FD1DD1C00F4CE45 /* RewriteObjC.cpp in Sources */, 1A2A54C30FD1DD1C00F4CE45 /* RewriteTest.cpp in Sources */, @@ -1935,6 +1957,16 @@ 1A986AB710D0746D00A8EA9E /* CGDeclCXX.cpp in Sources */, E16B523510D30B2400430AC9 /* cc1_main.cpp in Sources */, 1AA963C410D85A7300786C86 /* FullExpr.cpp in Sources */, + 1ACB57E41105820D0047B991 /* CompilerInstance.cpp in Sources */, + 1ACB57E51105820D0047B991 /* CompilerInvocation.cpp in Sources */, + 1ACB57E61105820D0047B991 /* DeclXML.cpp in Sources */, + 1ACB57E71105820D0047B991 /* FrontendAction.cpp in Sources */, + 1ACB57E81105820D0047B991 /* FrontendActions.cpp in Sources */, + 1ACB57E91105820D0047B991 /* FrontendOptions.cpp in Sources */, + 1ACB57EA1105820D0047B991 /* LangStandards.cpp in Sources */, + 1ACB57EB1105820D0047B991 /* TypeXML.cpp in Sources */, + 1ACB57EC1105820D0047B991 /* VerifyDiagnosticsClient.cpp in Sources */, + 1A97825B1108BA18002B98FC /* CGVTT.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Sat Jan 23 11:09:33 2010 (r202878) +++ vendor/clang/dist/include/clang-c/Index.h Sat Jan 23 11:10:26 2010 (r202879) @@ -34,77 +34,42 @@ extern "C" { #define CINDEX_LINKAGE #endif -/* - Clang indeX abstractions. The backing store for the following API's will be - clangs AST file (currently based on PCH). AST files are created as follows: - - "clang -emit-ast -o ". - - Naming Conventions: To avoid namespace pollution, data types are prefixed - with "CX" and functions are prefixed with "clang_". -*/ -typedef void *CXIndex; /* An indexing instance. */ +/** \defgroup CINDEX C Interface to Clang + * + * The C Interface to Clang provides a relatively small API that exposes + * facilities for parsing source code into an abstract syntax tree (AST), + * loading already-parsed ASTs, traversing the AST, associating + * physical source locations with elements within the AST, and other + * facilities that support Clang-based development tools. + * + * This C interface to Clang will never provide all of the information + * representation stored in Clang's C++ AST, nor should it: the intent is to + * maintain an API that is relatively stable from one release to the next, + * providing only the basic functionality needed to support development tools. + * + * To avoid namespace pollution, data types are prefixed with "CX" and + * functions are prefixed with "clang_". + * + * @{ + */ + +/** + * \brief An "index" that consists of a set of translation units that would + * typically be linked together into an executable or library. + */ +typedef void *CXIndex; +/** + * \brief A single translation unit, which resides in an index. + */ typedef void *CXTranslationUnit; /* A translation unit instance. */ -typedef void *CXFile; /* A source file */ -typedef void *CXDecl; /* A specific declaration within a translation unit. */ -typedef void *CXStmt; /* A specific statement within a function/method */ - -/* Cursors represent declarations, definitions, and references. */ -enum CXCursorKind { - /* Declarations */ - CXCursor_FirstDecl = 1, - CXCursor_TypedefDecl = 2, - CXCursor_StructDecl = 3, - CXCursor_UnionDecl = 4, - CXCursor_ClassDecl = 5, - CXCursor_EnumDecl = 6, - CXCursor_FieldDecl = 7, - CXCursor_EnumConstantDecl = 8, - CXCursor_FunctionDecl = 9, - CXCursor_VarDecl = 10, - CXCursor_ParmDecl = 11, - CXCursor_ObjCInterfaceDecl = 12, - CXCursor_ObjCCategoryDecl = 13, - CXCursor_ObjCProtocolDecl = 14, - CXCursor_ObjCPropertyDecl = 15, - CXCursor_ObjCIvarDecl = 16, - CXCursor_ObjCInstanceMethodDecl = 17, - CXCursor_ObjCClassMethodDecl = 18, - CXCursor_LastDecl = 18, - - /* Definitions */ - CXCursor_FirstDefn = 32, - CXCursor_FunctionDefn = 32, - CXCursor_ObjCClassDefn = 33, - CXCursor_ObjCCategoryDefn = 34, - CXCursor_ObjCInstanceMethodDefn = 35, - CXCursor_ObjCClassMethodDefn = 36, - CXCursor_LastDefn = 36, - - /* References */ - CXCursor_FirstRef = 40, /* Decl references */ - CXCursor_ObjCSuperClassRef = 40, - CXCursor_ObjCProtocolRef = 41, - CXCursor_ObjCClassRef = 42, - - CXCursor_ObjCSelectorRef = 43, /* Expression references */ - CXCursor_ObjCIvarRef = 44, - CXCursor_VarRef = 45, - CXCursor_FunctionRef = 46, - CXCursor_EnumConstantRef = 47, - CXCursor_MemberRef = 48, - CXCursor_LastRef = 48, - - /* Error conditions */ - CXCursor_FirstInvalid = 70, - CXCursor_InvalidFile = 70, - CXCursor_NoDeclFound = 71, - CXCursor_NotImplemented = 72, - CXCursor_LastInvalid = 72 -}; - +/** + * \brief Opaque pointer representing client data that will be passed through + * to various callbacks and visitors. + */ +typedef void *CXClientData; + /** * \brief Provides the contents of a file that has not yet been saved to disk. * @@ -133,27 +98,19 @@ struct CXUnsavedFile { unsigned long Length; }; -/* A cursor into the CXTranslationUnit. */ - -typedef struct { - enum CXCursorKind kind; - CXDecl decl; - CXStmt stmt; /* expression reference */ - CXDecl referringDecl; -} CXCursor; - -/* A unique token for looking up "visible" CXDecls from a CXTranslationUnit. */ -typedef struct { - CXIndex index; - void *data; -} CXEntity; - /** - * For functions returning a string that might or might not need - * to be internally allocated and freed. - * Use clang_getCString to access the C string value. - * Use clang_disposeString to free the value. - * Treat it as an opaque type. + * \defgroup CINDEX_STRING String manipulation routines + * + * @{ + */ + +/** + * \brief A character string. + * + * The \c CXString type is used to return strings from the interface when + * the ownership of that string might different from one call to the next. + * Use \c clang_getCString() to retrieve the string data and, once finished + * with the string data, call \c clang_disposeString() to free the string. */ typedef struct { const char *Spelling; @@ -162,12 +119,20 @@ typedef struct { int MustFreeString; } CXString; -/* Get C string pointer from a CXString. */ +/** + * \brief Retrieve the character data associated with the given string. + */ CINDEX_LINKAGE const char *clang_getCString(CXString string); -/* Free CXString. */ +/** + * \brief Free the given string, + */ CINDEX_LINKAGE void clang_disposeString(CXString string); +/** + * @} + */ + /** * \brief clang_createIndex() provides a shared context for creating * translation units. It provides two options: @@ -191,14 +156,16 @@ CINDEX_LINKAGE void clang_disposeString( * TU = clang_createTranslationUnit(Idx, "IndexTest.pch"); * * // This will load all the symbols from 'IndexTest.pch' - * clang_loadTranslationUnit(TU, TranslationUnitVisitor, 0); + * clang_visitChildren(clang_getTranslationUnitCursor(TU), + * TranslationUnitVisitor, 0); * clang_disposeTranslationUnit(TU); * * // This will load all the symbols from 'IndexTest.c', excluding symbols * // from 'IndexTest.pch'. * char *args[] = { "-Xclang", "-include-pch=IndexTest.pch", 0 }; * TU = clang_createTranslationUnitFromSourceFile(Idx, "IndexTest.c", 2, args); - * clang_loadTranslationUnit(TU, TranslationUnitVisitor, 0); + * clang_visitChildren(clang_getTranslationUnitCursor(TU), + * TranslationUnitVisitor, 0); * clang_disposeTranslationUnit(TU); * * This process of creating the 'pch', loading it separately, and using it (via @@ -211,7 +178,7 @@ CINDEX_LINKAGE void clang_disposeIndex(C CINDEX_LINKAGE CXString clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit); -/* +/** * \brief Request that AST's be generated external for API calls which parse * source code on the fly, e.g. \see createTranslationUnitFromSourceFile. * @@ -224,7 +191,7 @@ clang_getTranslationUnitSpelling(CXTrans CINDEX_LINKAGE void clang_setUseExternalASTGeneration(CXIndex index, int value); -/* +/** * \brief Create a translation unit from an AST file (-emit-ast). */ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit( @@ -255,137 +222,632 @@ CINDEX_LINKAGE void clang_disposeTransla * * \param source_filename - The name of the source file to load, or NULL if the * source file is included in clang_command_line_args. + * + * \param num_unsaved_files the number of unsaved file entries in \p + * unsaved_files. + * + * \param unsaved_files the files that have not yet been saved to disk + * but may be required for code completion, including the contents of + * those files. */ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile( - CXIndex CIdx, - const char *source_filename, - int num_clang_command_line_args, - const char **clang_command_line_args -); + CXIndex CIdx, + const char *source_filename, + int num_clang_command_line_args, + const char **clang_command_line_args, + unsigned num_unsaved_files, + struct CXUnsavedFile *unsaved_files); -/* - Usage: clang_loadTranslationUnit(). Will load the toplevel declarations - within a translation unit, issuing a 'callback' for each one. - - void printObjCInterfaceNames(CXTranslationUnit X, CXCursor C) { - if (clang_getCursorKind(C) == Cursor_Declaration) { - CXDecl D = clang_getCursorDecl(C); - if (clang_getDeclKind(D) == CXDecl_ObjC_interface) - printf("@interface %s in file %s on line %d column %d\n", - clang_getDeclSpelling(D), clang_getCursorSource(C), - clang_getCursorLine(C), clang_getCursorColumn(C)); - } - } - static void usage { - clang_loadTranslationUnit(CXTranslationUnit, printObjCInterfaceNames); - } -*/ -typedef void *CXClientData; -typedef void (*CXTranslationUnitIterator)(CXTranslationUnit, CXCursor, - CXClientData); -CINDEX_LINKAGE void clang_loadTranslationUnit(CXTranslationUnit, - CXTranslationUnitIterator, - CXClientData); - -/* - Usage: clang_loadDeclaration(). Will load the declaration, issuing a - 'callback' for each declaration/reference within the respective declaration. - - For interface declarations, this will index the super class, protocols, - ivars, methods, etc. For structure declarations, this will index the fields. - For functions, this will index the parameters (and body, for function - definitions), local declarations/references. - - void getInterfaceDetails(CXDecl X, CXCursor C) { - switch (clang_getCursorKind(C)) { - case Cursor_ObjC_ClassRef: - CXDecl SuperClass = clang_getCursorDecl(C); - case Cursor_ObjC_ProtocolRef: - CXDecl AdoptsProtocol = clang_getCursorDecl(C); - case Cursor_Declaration: - CXDecl AnIvarOrMethod = clang_getCursorDecl(C); - } - } - static void usage() { - if (clang_getDeclKind(D) == CXDecl_ObjC_interface) { - clang_loadDeclaration(D, getInterfaceDetails); - } - } -*/ -typedef void (*CXDeclIterator)(CXDecl, CXCursor, CXClientData); - -CINDEX_LINKAGE void clang_loadDeclaration(CXDecl, CXDeclIterator, CXClientData); +/** + * \defgroup CINDEX_FILES File manipulation routines + * + * @{ + */ + +/** + * \brief A particular source file that is part of a translation unit. + */ +typedef void *CXFile; + -/* - * CXFile Operations. +/** + * \brief Retrieve the complete file and path name of the given file. */ CINDEX_LINKAGE const char *clang_getFileName(CXFile SFile); + +/** + * \brief Retrieve the last modification time of the given file. + */ CINDEX_LINKAGE time_t clang_getFileTime(CXFile SFile); -/* - * CXEntity Operations. +/** + * \brief Retrieve a file handle within the given translation unit. + * + * \param tu the translation unit + * + * \param file_name the name of the file. + * + * \returns the file handle for the named file in the translation unit \p tu, + * or a NULL file handle if the file was not a part of this translation unit. + */ +CINDEX_LINKAGE CXFile clang_getFile(CXTranslationUnit tu, + const char *file_name); + +/** + * @} + */ + +/** + * \defgroup CINDEX_LOCATIONS Physical source locations + * + * Clang represents physical source locations in its abstract syntax tree in + * great detail, with file, line, and column information for the majority of + * the tokens parsed in the source code. These data types and functions are + * used to represent source location information, either for a particular + * point in the program or for a range of points in the program, and extract + * specific location information from those data types. + * + * @{ + */ + +/** + * \brief Identifies a specific source location within a translation + * unit. + * + * Use clang_getInstantiationLocation() to map a source location to a + * particular file, line, and column. + */ +typedef struct { + void *ptr_data; + unsigned int_data; +} CXSourceLocation; + +/** + * \brief Identifies a range of source locations in the source code. + * + * Use clang_getRangeStart() and clang_getRangeEnd() to retrieve the + * starting and end locations from a source range, respectively. + */ +typedef struct { + void *ptr_data; + unsigned begin_int_data; + unsigned end_int_data; +} CXSourceRange; + +/** + * \brief Retrieve a NULL (invalid) source location. + */ +CINDEX_LINKAGE CXSourceLocation clang_getNullLocation(); + +/** + * \determine Determine whether two source locations, which must refer into + * the same translation unit, refer to exactly the same point in the source + * code. + * + * \returns non-zero if the source locations refer to the same location, zero + * if they refer to different locations. + */ +CINDEX_LINKAGE unsigned clang_equalLocations(CXSourceLocation loc1, + CXSourceLocation loc2); + +/** + * \brief Retrieves the source location associated with a given + * file/line/column in a particular translation unit. + */ +CINDEX_LINKAGE CXSourceLocation clang_getLocation(CXTranslationUnit tu, + CXFile file, + unsigned line, + unsigned column); + +/** + * \brief Retrieve a source range given the beginning and ending source + * locations. + */ +CINDEX_LINKAGE CXSourceRange clang_getRange(CXSourceLocation begin, + CXSourceLocation end); + +/** + * \brief Retrieve the file, line, and column represented by the + * given source location. + * + * \param location the location within a source file that will be + * decomposed into its parts. + * + * \param file if non-NULL, will be set to the file to which the given + * source location points. + * + * \param line if non-NULL, will be set to the line to which the given + * source location points. + * + * \param column if non-NULL, will be set to the column to which the + * given source location points. + */ +CINDEX_LINKAGE void clang_getInstantiationLocation(CXSourceLocation location, + CXFile *file, + unsigned *line, + unsigned *column); + +/** + * \brief Retrieve a source location representing the first + * character within a source range. + */ +CINDEX_LINKAGE CXSourceLocation clang_getRangeStart(CXSourceRange range); + +/** + * \brief Retrieve a source location representing the last + * character within a source range. + */ +CINDEX_LINKAGE CXSourceLocation clang_getRangeEnd(CXSourceRange range); + +/** + * @} + */ + +/** + * \brief Describes the kind of entity that a cursor refers to. */ +enum CXCursorKind { + /* Declarations */ + CXCursor_FirstDecl = 1, + /** + * \brief A declaration whose specific kind is not exposed via this + * interface. + * + * Unexposed declarations have the same operations as any other kind + * of declaration; one can extract their location information, + * spelling, find their definitions, etc. However, the specific kind + * of the declaration is not reported. + */ + CXCursor_UnexposedDecl = 1, + /** \brief A C or C++ struct. */ + CXCursor_StructDecl = 2, + /** \brief A C or C++ union. */ + CXCursor_UnionDecl = 3, + /** \brief A C++ class. */ + CXCursor_ClassDecl = 4, + /** \brief An enumeration. */ + CXCursor_EnumDecl = 5, + /** + * \brief A field (in C) or non-static data member (in C++) in a + * struct, union, or C++ class. + */ + CXCursor_FieldDecl = 6, + /** \brief An enumerator constant. */ + CXCursor_EnumConstantDecl = 7, + /** \brief A function. */ + CXCursor_FunctionDecl = 8, + /** \brief A variable. */ + CXCursor_VarDecl = 9, + /** \brief A function or method parameter. */ + CXCursor_ParmDecl = 10, + /** \brief An Objective-C @interface. */ + CXCursor_ObjCInterfaceDecl = 11, + /** \brief An Objective-C @interface for a category. */ + CXCursor_ObjCCategoryDecl = 12, + /** \brief An Objective-C @protocol declaration. */ + CXCursor_ObjCProtocolDecl = 13, + /** \brief An Objective-C @property declaration. */ + CXCursor_ObjCPropertyDecl = 14, + /** \brief An Objective-C instance variable. */ + CXCursor_ObjCIvarDecl = 15, + /** \brief An Objective-C instance method. */ + CXCursor_ObjCInstanceMethodDecl = 16, + /** \brief An Objective-C class method. */ + CXCursor_ObjCClassMethodDecl = 17, + /** \brief An Objective-C @implementation. */ + CXCursor_ObjCImplementationDecl = 18, + /** \brief An Objective-C @implementation for a category. */ + CXCursor_ObjCCategoryImplDecl = 19, + /** \brief A typedef */ + CXCursor_TypedefDecl = 20, + CXCursor_LastDecl = 20, + + /* References */ + CXCursor_FirstRef = 40, /* Decl references */ + CXCursor_ObjCSuperClassRef = 40, + CXCursor_ObjCProtocolRef = 41, + CXCursor_ObjCClassRef = 42, + /** + * \brief A reference to a type declaration. + * + * A type reference occurs anywhere where a type is named but not + * declared. For example, given: + * + * \code + * typedef unsigned size_type; + * size_type size; + * \endcode + * + * The typedef is a declaration of size_type (CXCursor_TypedefDecl), + * while the type of the variable "size" is referenced. The cursor + * referenced by the type of size is the typedef for size_type. + */ + CXCursor_TypeRef = 43, + CXCursor_LastRef = 43, + + /* Error conditions */ + CXCursor_FirstInvalid = 70, + CXCursor_InvalidFile = 70, + CXCursor_NoDeclFound = 71, + CXCursor_NotImplemented = 72, + CXCursor_LastInvalid = 72, + + /* Expressions */ + CXCursor_FirstExpr = 100, -/* clang_getDeclaration() maps from a CXEntity to the matching CXDecl (if any) - * in a specified translation unit. */ -CINDEX_LINKAGE CXDecl clang_getDeclaration(CXEntity, CXTranslationUnit); - -/* - * CXDecl Operations. - */ -CINDEX_LINKAGE CXCursor clang_getCursorFromDecl(CXDecl); -CINDEX_LINKAGE CXEntity clang_getEntityFromDecl(CXIndex, CXDecl); -CINDEX_LINKAGE CXString clang_getDeclSpelling(CXDecl); -CINDEX_LINKAGE unsigned clang_getDeclLine(CXDecl); -CINDEX_LINKAGE unsigned clang_getDeclColumn(CXDecl); -CINDEX_LINKAGE CXString clang_getDeclUSR(CXDecl); -CINDEX_LINKAGE const char *clang_getDeclSource(CXDecl); /* deprecate */ -CINDEX_LINKAGE CXFile clang_getDeclSourceFile(CXDecl); - -typedef struct CXSourceLineColumn { - unsigned line; - unsigned column; -} CXSourceLineColumn; - -typedef struct CXDeclExtent { - CXSourceLineColumn begin; - CXSourceLineColumn end; -} CXSourceExtent; - -/* clang_getDeclExtent() returns the physical extent of a declaration. The - * beginning line/column pair points to the start of the first token in the - * declaration, and the ending line/column pair points to the last character in - * the last token of the declaration. - */ -CINDEX_LINKAGE CXSourceExtent clang_getDeclExtent(CXDecl); - -/* - * CXCursor Operations. - */ -/** - Usage: clang_getCursor() will translate a source/line/column position - into an AST cursor (to derive semantic information from the source code). - */ -CINDEX_LINKAGE CXCursor clang_getCursor(CXTranslationUnit, - const char *source_name, - unsigned line, unsigned column); - + /** + * \brief An expression whose specific kind is not exposed via this + * interface. + * + * Unexposed expressions have the same operations as any other kind + * of expression; one can extract their location information, + * spelling, children, etc. However, the specific kind of the + * expression is not reported. + */ + CXCursor_UnexposedExpr = 100, + + /** + * \brief An expression that refers to some value declaration, such + * as a function, varible, or enumerator. + */ + CXCursor_DeclRefExpr = 101, + + /** + * \brief An expression that refers to a member of a struct, union, + * class, Objective-C class, etc. + */ + CXCursor_MemberRefExpr = 102, + + /** \brief An expression that calls a function. */ + CXCursor_CallExpr = 103, + + /** \brief An expression that sends a message to an Objective-C + object or class. */ + CXCursor_ObjCMessageExpr = 104, + CXCursor_LastExpr = 104, + + /* Statements */ + CXCursor_FirstStmt = 200, + /** + * \brief A statement whose specific kind is not exposed via this + * interface. + * + * Unexposed statements have the same operations as any other kind of + * statement; one can extract their location information, spelling, + * children, etc. However, the specific kind of the statement is not + * reported. + */ + CXCursor_UnexposedStmt = 200, + CXCursor_LastStmt = 200, + + /** + * \brief Cursor that represents the translation unit itself. + * + * The translation unit cursor exists primarily to act as the root + * cursor for traversing the contents of a translation unit. + */ + CXCursor_TranslationUnit = 300 +}; + +/** + * \brief A cursor representing some element in the abstract syntax tree for + * a translation unit. + * + * The cursor abstraction unifies the different kinds of entities in a + * program--declaration, statements, expressions, references to declarations, + * etc.--under a single "cursor" abstraction with a common set of operations. + * Common operation for a cursor include: getting the physical location in + * a source file where the cursor points, getting the name associated with a + * cursor, and retrieving cursors for any child nodes of a particular cursor. + * + * Cursors can be produced in two specific ways. + * clang_getTranslationUnitCursor() produces a cursor for a translation unit, + * from which one can use clang_visitChildren() to explore the rest of the + * translation unit. clang_getCursor() maps from a physical source location + * to the entity that resides at that location, allowing one to map from the + * source code into the AST. + */ +typedef struct { + enum CXCursorKind kind; + void *data[3]; +} CXCursor; + +/** + * \defgroup CINDEX_CURSOR_MANIP Cursor manipulations + * + * @{ + */ + +/** + * \brief Retrieve the NULL cursor, which represents no entity. + */ CINDEX_LINKAGE CXCursor clang_getNullCursor(void); + +/** + * \brief Retrieve the cursor that represents the given translation unit. + * + * The translation unit cursor can be used to start traversing the + * various declarations within the given translation unit. + */ +CINDEX_LINKAGE CXCursor clang_getTranslationUnitCursor(CXTranslationUnit); +/** + * \brief Determine whether two cursors are equivalent. + */ +CINDEX_LINKAGE unsigned clang_equalCursors(CXCursor, CXCursor); + +/** + * \brief Retrieve the kind of the given cursor. + */ CINDEX_LINKAGE enum CXCursorKind clang_getCursorKind(CXCursor); + +/** + * \brief Determine whether the given cursor kind represents a declaration. + */ CINDEX_LINKAGE unsigned clang_isDeclaration(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents a simple + * reference. + * + * Note that other kinds of cursors (such as expressions) can also refer to + * other cursors. Use clang_getCursorReferenced() to determine whether a + * particular cursor refers to another entity. + */ CINDEX_LINKAGE unsigned clang_isReference(enum CXCursorKind); -CINDEX_LINKAGE unsigned clang_isDefinition(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents an expression. + */ +CINDEX_LINKAGE unsigned clang_isExpression(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents a statement. + */ +CINDEX_LINKAGE unsigned clang_isStatement(enum CXCursorKind); + +/** + * \brief Determine whether the given cursor kind represents an invalid + * cursor. + */ CINDEX_LINKAGE unsigned clang_isInvalid(enum CXCursorKind); -CINDEX_LINKAGE unsigned clang_equalCursors(CXCursor, CXCursor); +/** + * \brief Determine whether the given cursor kind represents a translation + * unit. + */ +CINDEX_LINKAGE unsigned clang_isTranslationUnit(enum CXCursorKind); + +/** + * @} + */ + +/** + * \defgroup CINDEX_CURSOR_SOURCE Mapping between cursors and source code + * + * Cursors represent a location within the Abstract Syntax Tree (AST). These + * routines help map between cursors and the physical locations where the + * described entities occur in the source code. The mapping is provided in + * both directions, so one can map from source code to the AST and back. + * + * @{ + */ + +/** + * \brief Map a source location to the cursor that describes the entity at that + * location in the source code. + * + * clang_getCursor() maps an arbitrary source location within a translation + * unit down to the most specific cursor that describes the entity at that + * location. For example, given an expression \c x + y, invoking + * clang_getCursor() with a source location pointing to "x" will return the + * cursor for "x"; similarly for "y". If the cursor points anywhere between + * "x" or "y" (e.g., on the + or the whitespace around it), clang_getCursor() + * will return a cursor referring to the "+" expression. + * + * \returns a cursor representing the entity at the given source location, or + * a NULL cursor if no such entity can be found. + */ +CINDEX_LINKAGE CXCursor clang_getCursor(CXTranslationUnit, CXSourceLocation); + +/** + * \brief Retrieve the physical location of the source constructor referenced + * by the given cursor. + * + * The location of a declaration is typically the location of the name of that + * declaration, where the name of that declaration would occur if it is + * unnamed, or some keyword that introduces that particular declaration. + * The location of a reference is where that reference occurs within the + * source code. + */ +CINDEX_LINKAGE CXSourceLocation clang_getCursorLocation(CXCursor); + +/** + * \brief Retrieve the physical extent of the source construct referenced by + * the given cursor. + * + * The extent of a cursor starts with the file/line/column pointing at the + * first character within the source construct that the cursor refers to and + * ends with the last character withinin that source construct. For a + * declaration, the extent covers the declaration itself. For a reference, + * the extent covers the location of the reference (e.g., where the referenced + * entity was actually used). + */ +CINDEX_LINKAGE CXSourceRange clang_getCursorExtent(CXCursor); -CINDEX_LINKAGE unsigned clang_getCursorLine(CXCursor); -CINDEX_LINKAGE unsigned clang_getCursorColumn(CXCursor); +/** + * @} + */ + +/** + * \defgroup CINDEX_CURSOR_TRAVERSAL Traversing the AST with cursors + * + * These routines provide the ability to traverse the abstract syntax tree + * using cursors. + * + * @{ + */ + +/** + * \brief Describes how the traversal of the children of a particular + * cursor should proceed after visiting a particular child cursor. + * + * A value of this enumeration type should be returned by each + * \c CXCursorVisitor to indicate how clang_visitChildren() proceed. + */ +enum CXChildVisitResult { + /** + * \brief Terminates the cursor traversal. + */ + CXChildVisit_Break, + /** + * \brief Continues the cursor traversal with the next sibling of + * the cursor just visited, without visiting its children. + */ + CXChildVisit_Continue, + /** + * \brief Recursively traverse the children of this cursor, using + * the same visitor and client data. + */ + CXChildVisit_Recurse +}; + +/** + * \brief Visitor invoked for each cursor found by a traversal. + * + * This visitor function will be invoked for each cursor found by + * clang_visitCursorChildren(). Its first argument is the cursor being + * visited, its second argument is the parent visitor for that cursor, + * and its third argument is the client data provided to + * clang_visitCursorChildren(). + * + * The visitor should return one of the \c CXChildVisitResult values + * to direct clang_visitCursorChildren(). + */ +typedef enum CXChildVisitResult (*CXCursorVisitor)(CXCursor cursor, + CXCursor parent, + CXClientData client_data); + +/** + * \brief Visit the children of a particular cursor. + * + * This function visits all the direct children of the given cursor, + * invoking the given \p visitor function with the cursors of each + * visited child. The traversal may be recursive, if the visitor returns + * \c CXChildVisit_Recurse. The traversal may also be ended prematurely, if + * the visitor returns \c CXChildVisit_Break. + * + * \param tu the translation unit into which the cursor refers. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 11:42:31 2010 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 880D2106568D; Sat, 23 Jan 2010 11:42:31 +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 774608FC1C; Sat, 23 Jan 2010 11:42:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NBgVYi094079; Sat, 23 Jan 2010 11:42:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NBgVxb094077; Sat, 23 Jan 2010 11:42:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001231142.o0NBgVxb094077@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 11:42: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: r202880 - head/etc/rc.d 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: Sat, 23 Jan 2010 11:42:31 -0000 Author: kib Date: Sat Jan 23 11:42:31 2010 New Revision: 202880 URL: http://svn.freebsd.org/changeset/base/202880 Log: Do not check for existence of symlink source for the link action. This does not work for link in subdirectory, and sometimes it is useful to create symlink in advance for dynamically created device node. MFC after: 1 week Modified: head/etc/rc.d/devfs Modified: head/etc/rc.d/devfs ============================================================================== --- head/etc/rc.d/devfs Sat Jan 23 11:10:26 2010 (r202879) +++ head/etc/rc.d/devfs Sat Jan 23 11:42:31 2010 (r202880) @@ -44,7 +44,7 @@ read_devfs_conf() while read action devicelist parameter; do case "${action}" in l*) for device in ${devicelist}; do - if [ -c ${device} -a ! -e ${parameter} ]; then + if [ ! -e ${parameter} ]; then ln -fs ${device} ${parameter} fi done From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 11:43:30 2010 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 BD723106566C; Sat, 23 Jan 2010 11:43:30 +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 AC18B8FC08; Sat, 23 Jan 2010 11:43:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NBhUvq094344; Sat, 23 Jan 2010 11:43:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NBhUJI094341; Sat, 23 Jan 2010 11:43:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001231143.o0NBhUJI094341@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 11:43:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202881 - in head/sys: kern sys 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: Sat, 23 Jan 2010 11:43:30 -0000 Author: kib Date: Sat Jan 23 11:43:30 2010 New Revision: 202881 URL: http://svn.freebsd.org/changeset/base/202881 Log: Staticise sigqueue manipulation functions used only in kern_sig.c. MFC after: 1 week Modified: head/sys/kern/kern_sig.c head/sys/sys/signalvar.h Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sat Jan 23 11:42:31 2010 (r202880) +++ head/sys/kern/kern_sig.c Sat Jan 23 11:43:30 2010 (r202881) @@ -279,7 +279,7 @@ sigqueue_init(sigqueue_t *list, struct p * 0 - signal not found * others - signal number */ -int +static int sigqueue_get(sigqueue_t *sq, int signo, ksiginfo_t *si) { struct proc *p = sq->sq_proc; @@ -341,7 +341,7 @@ sigqueue_take(ksiginfo_t *ksi) SIGDELSET(sq->sq_signals, ksi->ksi_signo); } -int +static int sigqueue_add(sigqueue_t *sq, int signo, ksiginfo_t *si) { struct proc *p = sq->sq_proc; @@ -426,7 +426,7 @@ sigqueue_flush(sigqueue_t *sq) SIGEMPTYSET(sq->sq_kill); } -void +static void sigqueue_collect_set(sigqueue_t *sq, sigset_t *set) { ksiginfo_t *ksi; @@ -438,7 +438,7 @@ sigqueue_collect_set(sigqueue_t *sq, sig SIGSETOR(*set, sq->sq_kill); } -void +static void sigqueue_move_set(sigqueue_t *src, sigqueue_t *dst, sigset_t *setp) { sigset_t tmp, set; @@ -482,7 +482,7 @@ sigqueue_move_set(sigqueue_t *src, sigqu sigqueue_collect_set(src, &src->sq_signals); } -void +static void sigqueue_move(sigqueue_t *src, sigqueue_t *dst, int signo) { sigset_t set; @@ -492,7 +492,7 @@ sigqueue_move(sigqueue_t *src, sigqueue_ sigqueue_move_set(src, dst, &set); } -void +static void sigqueue_delete_set(sigqueue_t *sq, sigset_t *set) { struct proc *p = sq->sq_proc; @@ -526,7 +526,7 @@ sigqueue_delete(sigqueue_t *sq, int sign } /* Remove a set of signals for a process */ -void +static void sigqueue_delete_set_proc(struct proc *p, sigset_t *set) { sigqueue_t worklist; @@ -553,7 +553,7 @@ sigqueue_delete_proc(struct proc *p, int sigqueue_delete_set_proc(p, &set); } -void +static void sigqueue_delete_stopmask_proc(struct proc *p) { sigset_t set; Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Sat Jan 23 11:42:31 2010 (r202880) +++ head/sys/sys/signalvar.h Sat Jan 23 11:43:30 2010 (r202881) @@ -355,18 +355,10 @@ void ksiginfo_free(ksiginfo_t *); void sigqueue_init(struct sigqueue *queue, struct proc *p); void sigqueue_flush(struct sigqueue *queue); void sigqueue_delete_proc(struct proc *p, int sig); -void sigqueue_delete_set(struct sigqueue *queue, sigset_t *set); void sigqueue_delete(struct sigqueue *queue, int sig); -void sigqueue_move_set(struct sigqueue *src, sigqueue_t *dst, sigset_t *); -int sigqueue_get(struct sigqueue *queue, int sig, ksiginfo_t *info); -int sigqueue_add(struct sigqueue *queue, int sig, ksiginfo_t *info); -void sigqueue_collect_set(struct sigqueue *queue, sigset_t *set); -void sigqueue_move(struct sigqueue *, struct sigqueue *, int sig); -void sigqueue_delete_set_proc(struct proc *, sigset_t *); -void sigqueue_delete_stopmask_proc(struct proc *); void sigqueue_take(ksiginfo_t *ksi); int kern_sigtimedwait(struct thread *, sigset_t, - ksiginfo_t *, struct timespec *); + ksiginfo_t *, struct timespec *); int kern_sigprocmask(struct thread *td, int how, sigset_t *set, sigset_t *oset, int flags); /* From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 11:45:35 2010 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 A8B79106566B; Sat, 23 Jan 2010 11:45:35 +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 95E858FC31; Sat, 23 Jan 2010 11:45:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NBjZwn094869; Sat, 23 Jan 2010 11:45:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NBjZmS094863; Sat, 23 Jan 2010 11:45:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001231145.o0NBjZmS094863@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 11:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202882 - in head/sys: amd64/amd64 amd64/ia32 i386/i386 kern sys 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: Sat, 23 Jan 2010 11:45:35 -0000 Author: kib Date: Sat Jan 23 11:45:35 2010 New Revision: 202882 URL: http://svn.freebsd.org/changeset/base/202882 Log: For PT_TO_SCE stop that stops the ptraced process upon syscall entry, syscall arguments are collected before ptracestop() is called. As a consequence, debugger cannot modify syscall or its arguments. For i386, amd64 and ia32 on amd64 MD syscall(), reread syscall number and arguments after ptracestop(), if debugger modified anything in the process environment. Since procfs stopeven requires number of syscall arguments in p_xstat, this cannot be solved by moving stop/trace point before argument fetching. Move the code to read arguments into separate function fetch_syscall_args() to avoid code duplication. Note that ktrace point for modified syscall is intentionally recorded twice, once with original arguments, and second time with the arguments set by debugger. PT_TO_SCX stop is executed after cpu_syscall_set_retval() already. Reported by: Ali Polatel Briefly discussed with: jhb MFC after: 3 weeks Modified: head/sys/amd64/amd64/trap.c head/sys/amd64/ia32/ia32_syscall.c head/sys/i386/i386/trap.c head/sys/kern/sys_process.c head/sys/sys/proc.h Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/amd64/amd64/trap.c Sat Jan 23 11:45:35 2010 (r202882) @@ -885,95 +885,131 @@ dblfault_handler(struct trapframe *frame panic("double fault"); } -/* - * syscall - system call request C handler - * - * A system call is essentially treated as a trap. - */ -void -syscall(struct trapframe *frame) -{ - caddr_t params; +struct syscall_args { + u_int code; struct sysent *callp; - struct thread *td = curthread; - struct proc *p = td->td_proc; - register_t orig_tf_rflags; - int error; - int narg; register_t args[8]; register_t *argp; - u_int code; - int reg, regcnt; - ksiginfo_t ksi; - - PCPU_INC(cnt.v_syscall); + int narg; +}; -#ifdef DIAGNOSTIC - if (ISPL(frame->tf_cs) != SEL_UPL) { - panic("syscall"); - /* NOT REACHED */ - } -#endif +static int +fetch_syscall_args(struct thread *td, struct syscall_args *sa) +{ + struct proc *p; + struct trapframe *frame; + caddr_t params; + int reg, regcnt, error; + p = td->td_proc; + frame = td->td_frame; reg = 0; regcnt = 6; - td->td_pticks = 0; - td->td_frame = frame; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); + params = (caddr_t)frame->tf_rsp + sizeof(register_t); - code = frame->tf_rax; - orig_tf_rflags = frame->tf_rflags; + sa->code = frame->tf_rax; if (p->p_sysent->sv_prepsyscall) { - (*p->p_sysent->sv_prepsyscall)(frame, (int *)args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(frame, (int *)sa->args, + &sa->code, ¶ms); } else { - if (code == SYS_syscall || code == SYS___syscall) { - code = frame->tf_rdi; + if (sa->code == SYS_syscall || sa->code == SYS___syscall) { + sa->code = frame->tf_rdi; reg++; regcnt--; } } - if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; + sa->code &= p->p_sysent->sv_mask; - if (code >= p->p_sysent->sv_size) - callp = &p->p_sysent->sv_table[0]; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; else - callp = &p->p_sysent->sv_table[code]; + sa->callp = &p->p_sysent->sv_table[sa->code]; - narg = callp->sy_narg; - KASSERT(narg <= sizeof(args) / sizeof(args[0]), + sa->narg = sa->callp->sy_narg; + KASSERT(sa->narg <= sizeof(sa->args) / sizeof(sa->args[0]), ("Too many syscall arguments!")); error = 0; - argp = &frame->tf_rdi; - argp += reg; - bcopy(argp, args, sizeof(args[0]) * regcnt); - if (narg > regcnt) { + sa->argp = &frame->tf_rdi; + sa->argp += reg; + bcopy(sa->argp, sa->args, sizeof(sa->args[0]) * regcnt); + if (sa->narg > regcnt) { KASSERT(params != NULL, ("copyin args with no params!")); - error = copyin(params, &args[regcnt], - (narg - regcnt) * sizeof(args[0])); + error = copyin(params, &sa->args[regcnt], + (sa->narg - regcnt) * sizeof(sa->args[0])); } - argp = &args[0]; + sa->argp = &sa->args[0]; + /* + * This may result in two records if debugger modified + * registers or memory during sleep at stop/ptrace point. + */ #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(code, narg, argp); + ktrsyscall(sa->code, sa->narg, sa->argp); #endif + return (error); +} - CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_name, code); +/* + * syscall - system call request C handler + * + * A system call is essentially treated as a trap. + */ +void +syscall(struct trapframe *frame) +{ + struct thread *td; + struct proc *p; + struct syscall_args sa; + register_t orig_tf_rflags; + int error; + ksiginfo_t ksi; + PCPU_INC(cnt.v_syscall); + td = curthread; + p = td->td_proc; td->td_syscalls++; +#ifdef DIAGNOSTIC + if (ISPL(frame->tf_cs) != SEL_UPL) { + panic("syscall"); + /* NOT REACHED */ + } +#endif + + td->td_pticks = 0; + td->td_frame = frame; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + orig_tf_rflags = frame->tf_rflags; + if (p->p_flag & P_TRACED) { + PROC_LOCK(p); + td->td_dbgflags &= ~TDB_USERWR; + PROC_UNLOCK(p); + } + error = fetch_syscall_args(td, &sa); + + CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, + td->td_proc->p_pid, td->td_name, sa.code); + if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = frame->tf_rdx; - STOPEVENT(p, S_SCE, narg); - + STOPEVENT(p, S_SCE, sa.narg); PTRACESTOP_SC(p, td, S_PT_SCE); + if (td->td_dbgflags & TDB_USERWR) { + /* + * Reread syscall number and arguments if + * debugger modified registers or memory. + */ + error = fetch_syscall_args(td, &sa); + if (error != 0) + goto retval; + td->td_retval[1] = frame->tf_rdx; + } #ifdef KDTRACE_HOOKS /* @@ -981,13 +1017,13 @@ syscall(struct trapframe *frame) * callback and if there is a probe active for the * syscall 'entry', process the probe. */ - if (systrace_probe_func != NULL && callp->sy_entry != 0) - (*systrace_probe_func)(callp->sy_entry, code, callp, - args); + if (systrace_probe_func != NULL && sa.callp->sy_entry != 0) + (*systrace_probe_func)(sa.callp->sy_entry, sa.code, + sa.callp, sa.args); #endif - AUDIT_SYSCALL_ENTER(code, td); - error = (*callp->sy_call)(td, argp); + AUDIT_SYSCALL_ENTER(sa.code, td); + error = (*sa.callp->sy_call)(td, sa.argp); AUDIT_SYSCALL_EXIT(error, td); /* Save the latest error return value. */ @@ -999,12 +1035,12 @@ syscall(struct trapframe *frame) * callback and if there is a probe active for the * syscall 'return', process the probe. */ - if (systrace_probe_func != NULL && callp->sy_return != 0) - (*systrace_probe_func)(callp->sy_return, code, callp, - args); + if (systrace_probe_func != NULL && sa.callp->sy_return != 0) + (*systrace_probe_func)(sa.callp->sy_return, sa.code, + sa.callp, sa.args); #endif } - + retval: cpu_set_syscall_retval(td, error); /* @@ -1023,14 +1059,16 @@ syscall(struct trapframe *frame) * Check for misbehavior. */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???")); KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", - td->td_locks)); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???", td->td_locks)); /* * Handle reschedule and other end-of-syscall issues @@ -1038,11 +1076,11 @@ syscall(struct trapframe *frame) userret(td, frame); CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_name, code); + td->td_proc->p_pid, td->td_name, sa.code); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(code, error, td->td_retval[0]); + ktrsysret(sa.code, error, td->td_retval[0]); #endif /* @@ -1050,7 +1088,7 @@ syscall(struct trapframe *frame) * register set. If we ever support an emulation where this * is not the case, this code will need to be revisited. */ - STOPEVENT(p, S_SCX, code); + STOPEVENT(p, S_SCX, sa.code); PTRACESTOP_SC(p, td, S_PT_SCX); } Modified: head/sys/amd64/ia32/ia32_syscall.c ============================================================================== --- head/sys/amd64/ia32/ia32_syscall.c Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/amd64/ia32/ia32_syscall.c Sat Jan 23 11:45:35 2010 (r202882) @@ -88,101 +88,136 @@ extern const char *freebsd32_syscallname void ia32_syscall(struct trapframe *frame); /* Called from asm code */ -void -ia32_syscall(struct trapframe *frame) -{ +struct ia32_syscall_args { + u_int code; caddr_t params; - int i; struct sysent *callp; - struct thread *td = curthread; - struct proc *p = td->td_proc; - register_t orig_tf_rflags; - int error; + u_int64_t args64[8]; int narg; +}; + +static int +fetch_ia32_syscall_args(struct thread *td, struct ia32_syscall_args *sa) +{ + struct proc *p; + struct trapframe *frame; u_int32_t args[8]; - u_int64_t args64[8]; - u_int code; - ksiginfo_t ksi; + int error, i; - PCPU_INC(cnt.v_syscall); - td->td_pticks = 0; - td->td_frame = frame; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); - params = (caddr_t)frame->tf_rsp + sizeof(u_int32_t); - code = frame->tf_rax; - orig_tf_rflags = frame->tf_rflags; + p = td->td_proc; + frame = td->td_frame; + + sa->params = (caddr_t)frame->tf_rsp + sizeof(u_int32_t); + sa->code = frame->tf_rax; if (p->p_sysent->sv_prepsyscall) { /* * The prep code is MP aware. */ - (*p->p_sysent->sv_prepsyscall)(frame, args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(frame, args, &sa->code, + &sa->params); } else { /* * Need to check if this is a 32 bit or 64 bit syscall. * fuword is MP aware. */ - if (code == SYS_syscall) { + if (sa->code == SYS_syscall) { /* * Code is first argument, followed by actual args. */ - code = fuword32(params); - params += sizeof(int); - } else if (code == SYS___syscall) { + sa->code = fuword32(sa->params); + sa->params += sizeof(int); + } else if (sa->code == SYS___syscall) { /* * Like syscall, but code is a quad, so as to maintain * quad alignment for the rest of the arguments. * We use a 32-bit fetch in case params is not * aligned. */ - code = fuword32(params); - params += sizeof(quad_t); + sa->code = fuword32(sa->params); + sa->params += sizeof(quad_t); } } - if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; - - if (code >= p->p_sysent->sv_size) - callp = &p->p_sysent->sv_table[0]; + sa->code &= p->p_sysent->sv_mask; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; else - callp = &p->p_sysent->sv_table[code]; - - narg = callp->sy_narg; + sa->callp = &p->p_sysent->sv_table[sa->code]; + sa->narg = sa->callp->sy_narg; - /* - * copyin and the ktrsyscall()/ktrsysret() code is MP-aware - */ - if (params != NULL && narg != 0) - error = copyin(params, (caddr_t)args, - (u_int)(narg * sizeof(int))); + if (sa->params != NULL && sa->narg != 0) + error = copyin(sa->params, (caddr_t)args, + (u_int)(sa->narg * sizeof(int))); else error = 0; - for (i = 0; i < narg; i++) - args64[i] = args[i]; + for (i = 0; i < sa->narg; i++) + sa->args64[i] = args[i]; #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(code, narg, args64); + ktrsyscall(sa->code, sa->narg, sa->args64); #endif + + return (error); +} + +void +ia32_syscall(struct trapframe *frame) +{ + struct thread *td; + struct proc *p; + struct ia32_syscall_args sa; + register_t orig_tf_rflags; + int error; + ksiginfo_t ksi; + + PCPU_INC(cnt.v_syscall); + td = curthread; + p = td->td_proc; + td->td_syscalls++; + + td->td_pticks = 0; + td->td_frame = frame; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + orig_tf_rflags = frame->tf_rflags; + if (p->p_flag & P_TRACED) { + PROC_LOCK(p); + td->td_dbgflags &= ~TDB_USERWR; + PROC_UNLOCK(p); + } + error = fetch_ia32_syscall_args(td, &sa); + CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_proc->p_comm, code); + td->td_proc->p_pid, td->td_name, sa.code); if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = frame->tf_rdx; - STOPEVENT(p, S_SCE, narg); - + STOPEVENT(p, S_SCE, sa.narg); PTRACESTOP_SC(p, td, S_PT_SCE); + if (td->td_dbgflags & TDB_USERWR) { + /* + * Reread syscall number and arguments if + * debugger modified registers or memory. + */ + error = fetch_ia32_syscall_args(td, &sa); + if (error != 0) + goto retval; + td->td_retval[1] = frame->tf_rdx; + } - AUDIT_SYSCALL_ENTER(code, td); - error = (*callp->sy_call)(td, args64); + AUDIT_SYSCALL_ENTER(sa.code, td); + error = (*sa.callp->sy_call)(td, sa.args64); AUDIT_SYSCALL_EXIT(error, td); - } + /* Save the latest error return value. */ + td->td_errno = error; + } + retval: cpu_set_syscall_retval(td, error); /* @@ -201,14 +236,16 @@ ia32_syscall(struct trapframe *frame) * Check for misbehavior. */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???"); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + freebsd32_syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", - (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???")); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + freebsd32_syscallnames[sa.code] : "???")); KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", - (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???", - td->td_locks)); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + freebsd32_syscallnames[sa.code] : "???", td->td_locks)); /* * Handle reschedule and other end-of-syscall issues @@ -216,10 +253,10 @@ ia32_syscall(struct trapframe *frame) userret(td, frame); CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_proc->p_comm, code); + td->td_proc->p_pid, td->td_proc->p_comm, sa.code); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(code, error, td->td_retval[0]); + ktrsysret(sa.code, error, td->td_retval[0]); #endif /* @@ -227,7 +264,7 @@ ia32_syscall(struct trapframe *frame) * register set. If we ever support an emulation where this * is not the case, this code will need to be revisited. */ - STOPEVENT(p, S_SCX, code); + STOPEVENT(p, S_SCX, sa.code); PTRACESTOP_SC(p, td, S_PT_SCX); } Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/i386/i386/trap.c Sat Jan 23 11:45:35 2010 (r202882) @@ -969,97 +969,130 @@ dblfault_handler() panic("double fault"); } -/* - * syscall - system call request C handler - * - * A system call is essentially treated as a trap. - */ -void -syscall(struct trapframe *frame) -{ - caddr_t params; +struct syscall_args { + u_int code; struct sysent *callp; - struct thread *td = curthread; - struct proc *p = td->td_proc; - register_t orig_tf_eflags; - int error; - int narg; int args[8]; - u_int code; - ksiginfo_t ksi; + register_t *argp; + int narg; +}; - PCPU_INC(cnt.v_syscall); +static int +fetch_syscall_args(struct thread *td, struct syscall_args *sa) +{ + struct proc *p; + struct trapframe *frame; + caddr_t params; + int error; -#ifdef DIAGNOSTIC - if (ISPL(frame->tf_cs) != SEL_UPL) { - panic("syscall"); - /* NOT REACHED */ - } -#endif + p = td->td_proc; + frame = td->td_frame; - td->td_pticks = 0; - td->td_frame = frame; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); params = (caddr_t)frame->tf_esp + sizeof(int); - code = frame->tf_eax; - orig_tf_eflags = frame->tf_eflags; + sa->code = frame->tf_eax; if (p->p_sysent->sv_prepsyscall) { - (*p->p_sysent->sv_prepsyscall)(frame, args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(frame, sa->args, &sa->code, + ¶ms); } else { /* * Need to check if this is a 32 bit or 64 bit syscall. */ - if (code == SYS_syscall) { + if (sa->code == SYS_syscall) { /* * Code is first argument, followed by actual args. */ - code = fuword(params); + sa->code = fuword(params); params += sizeof(int); - } else if (code == SYS___syscall) { + } else if (sa->code == SYS___syscall) { /* * Like syscall, but code is a quad, so as to maintain * quad alignment for the rest of the arguments. */ - code = fuword(params); + sa->code = fuword(params); params += sizeof(quad_t); } } if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; - - if (code >= p->p_sysent->sv_size) - callp = &p->p_sysent->sv_table[0]; + sa->code &= p->p_sysent->sv_mask; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; else - callp = &p->p_sysent->sv_table[code]; + sa->callp = &p->p_sysent->sv_table[sa->code]; + sa->narg = sa->callp->sy_narg; - narg = callp->sy_narg; - - if (params != NULL && narg != 0) - error = copyin(params, (caddr_t)args, - (u_int)(narg * sizeof(int))); + if (params != NULL && sa->narg != 0) + error = copyin(params, (caddr_t)sa->args, + (u_int)(sa->narg * sizeof(int))); else error = 0; #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(code, narg, args); + ktrsyscall(sa->code, sa->narg, sa->args); #endif + return (error); +} - CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_name, code); +/* + * syscall - system call request C handler + * + * A system call is essentially treated as a trap. + */ +void +syscall(struct trapframe *frame) +{ + struct thread *td; + struct proc *p; + struct syscall_args sa; + register_t orig_tf_eflags; + int error; + ksiginfo_t ksi; + PCPU_INC(cnt.v_syscall); + td = curthread; + p = td->td_proc; td->td_syscalls++; +#ifdef DIAGNOSTIC + if (ISPL(frame->tf_cs) != SEL_UPL) { + panic("syscall"); + /* NOT REACHED */ + } +#endif + + td->td_pticks = 0; + td->td_frame = frame; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + orig_tf_eflags = frame->tf_eflags; + if (p->p_flag & P_TRACED) { + PROC_LOCK(p); + td->td_dbgflags &= ~TDB_USERWR; + PROC_UNLOCK(p); + } + error = fetch_syscall_args(td, &sa); + + CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, + td->td_proc->p_pid, td->td_name, sa.code); + if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = frame->tf_edx; - STOPEVENT(p, S_SCE, narg); - + STOPEVENT(p, S_SCE, sa.narg); PTRACESTOP_SC(p, td, S_PT_SCE); + if (td->td_dbgflags & TDB_USERWR) { + /* + * Reread syscall number and arguments if + * debugger modified registers or memory. + */ + error = fetch_syscall_args(td, &sa); + if (error != 0) + goto retval; + td->td_retval[1] = frame->tf_edx; + } #ifdef KDTRACE_HOOKS /* @@ -1067,13 +1100,13 @@ syscall(struct trapframe *frame) * callback and if there is a probe active for the * syscall 'entry', process the probe. */ - if (systrace_probe_func != NULL && callp->sy_entry != 0) - (*systrace_probe_func)(callp->sy_entry, code, callp, - args); + if (systrace_probe_func != NULL && sa.callp->sy_entry != 0) + (*systrace_probe_func)(sa.callp->sy_entry, sa.code, + sa.callp, sa.args); #endif - AUDIT_SYSCALL_ENTER(code, td); - error = (*callp->sy_call)(td, args); + AUDIT_SYSCALL_ENTER(sa.code, td); + error = (*sa.callp->sy_call)(td, sa.args); AUDIT_SYSCALL_EXIT(error, td); /* Save the latest error return value. */ @@ -1085,12 +1118,12 @@ syscall(struct trapframe *frame) * callback and if there is a probe active for the * syscall 'return', process the probe. */ - if (systrace_probe_func != NULL && callp->sy_return != 0) - (*systrace_probe_func)(callp->sy_return, code, callp, - args); + if (systrace_probe_func != NULL && sa.callp->sy_return != 0) + (*systrace_probe_func)(sa.callp->sy_return, sa.code, + sa.callp, sa.args); #endif } - + retval: cpu_set_syscall_retval(td, error); /* @@ -1109,14 +1142,16 @@ syscall(struct trapframe *frame) * Check for misbehavior. */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???")); KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", - td->td_locks)); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???", td->td_locks)); /* * Handle reschedule and other end-of-syscall issues @@ -1124,11 +1159,11 @@ syscall(struct trapframe *frame) userret(td, frame); CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_name, code); + td->td_proc->p_pid, td->td_name, sa.code); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(code, error, td->td_retval[0]); + ktrsysret(sa.code, error, td->td_retval[0]); #endif /* @@ -1136,7 +1171,7 @@ syscall(struct trapframe *frame) * register set. If we ever support an emulation where this * is not the case, this code will need to be revisited. */ - STOPEVENT(p, S_SCX, code); + STOPEVENT(p, S_SCX, sa.code); PTRACESTOP_SC(p, td, S_PT_SCX); } Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/kern/sys_process.c Sat Jan 23 11:45:35 2010 (r202882) @@ -816,6 +816,7 @@ kern_ptrace(struct thread *td, int req, case PT_WRITE_I: case PT_WRITE_D: + td2->td_dbgflags |= TDB_USERWR; write = 1; /* FALLTHROUGH */ case PT_READ_I: @@ -884,6 +885,7 @@ kern_ptrace(struct thread *td, int req, break; case PIOD_WRITE_D: case PIOD_WRITE_I: + td2->td_dbgflags |= TDB_USERWR; uio.uio_rw = UIO_WRITE; break; default: @@ -906,6 +908,7 @@ kern_ptrace(struct thread *td, int req, goto sendsig; /* in PT_CONTINUE above */ case PT_SETREGS: + td2->td_dbgflags |= TDB_USERWR; error = PROC_WRITE(regs, td2, addr); break; @@ -914,6 +917,7 @@ kern_ptrace(struct thread *td, int req, break; case PT_SETFPREGS: + td2->td_dbgflags |= TDB_USERWR; error = PROC_WRITE(fpregs, td2, addr); break; @@ -922,6 +926,7 @@ kern_ptrace(struct thread *td, int req, break; case PT_SETDBREGS: + td2->td_dbgflags |= TDB_USERWR; error = PROC_WRITE(dbregs, td2, addr); break; Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/sys/proc.h Sat Jan 23 11:45:35 2010 (r202882) @@ -341,6 +341,7 @@ do { \ /* Userland debug flags */ #define TDB_SUSPEND 0x00000001 /* Thread is suspended by debugger */ #define TDB_XSIG 0x00000002 /* Thread is exchanging signal under trace */ +#define TDB_USERWR 0x00000004 /* Debugger modified memory or registers */ /* * "Private" flags kept in td_pflags: From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 11:51:31 2010 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 55AD01065672; Sat, 23 Jan 2010 11:51:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id B5A538FC15; Sat, 23 Jan 2010 11:51:30 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0NBpHQr080652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jan 2010 13:51:17 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0NBpHOu099813; Sat, 23 Jan 2010 13:51:17 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0NBpHHq099812; Sat, 23 Jan 2010 13:51:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 23 Jan 2010 13:51:17 +0200 From: Kostik Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100123115117.GH59590@deviant.kiev.zoral.com.ua> References: <201001231145.o0NBjZmS094863@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A3bjmUvO/1DXpqhN" Content-Disposition: inline In-Reply-To: <201001231145.o0NBjZmS094863@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r202882 - in head/sys: amd64/amd64 amd64/ia32 i386/i386 kern sys 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: Sat, 23 Jan 2010 11:51:31 -0000 --A3bjmUvO/1DXpqhN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 23, 2010 at 11:45:35AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sat Jan 23 11:45:35 2010 > New Revision: 202882 > URL: http://svn.freebsd.org/changeset/base/202882 >=20 > Log: > For PT_TO_SCE stop that stops the ptraced process upon syscall entry, > syscall arguments are collected before ptracestop() is called. As a > consequence, debugger cannot modify syscall or its arguments. > =20 > For i386, amd64 and ia32 on amd64 MD syscall(), reread syscall number > and arguments after ptracestop(), if debugger modified anything in the > process environment. Since procfs stopeven requires number of syscall > arguments in p_xstat, this cannot be solved by moving stop/trace point > before argument fetching. I am willing to help architecture maintainers to implement this for corresponding architectures, if any help is needed. --A3bjmUvO/1DXpqhN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkta4rQACgkQC3+MBN1Mb4gZBACg1cPe5dm46YV9QgWn8dmzr8hk TWQAoJl4uNHjVUEPe92WqFDq9FS/CA35 =xfZt -----END PGP SIGNATURE----- --A3bjmUvO/1DXpqhN-- From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 12:48:47 2010 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 0F8C5106566C; Sat, 23 Jan 2010 12:48:47 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F29EA8FC0C; Sat, 23 Jan 2010 12:48:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NCmkaY008878; Sat, 23 Jan 2010 12:48:46 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NCmk4v008877; Sat, 23 Jan 2010 12:48:46 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001231248.o0NCmk4v008877@svn.freebsd.org> From: Antoine Brodin Date: Sat, 23 Jan 2010 12:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202883 - head/lib/libc/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: Sat, 23 Jan 2010 12:48:47 -0000 Author: antoine Date: Sat Jan 23 12:48:46 2010 New Revision: 202883 URL: http://svn.freebsd.org/changeset/base/202883 Log: Reapply r201145 to lib/libc/gen/sem.c Modified: head/lib/libc/gen/sem.c Modified: head/lib/libc/gen/sem.c ============================================================================== --- head/lib/libc/gen/sem.c Sat Jan 23 11:45:35 2010 (r202882) +++ head/lib/libc/gen/sem.c Sat Jan 23 12:48:46 2010 (r202883) @@ -106,7 +106,7 @@ typedef struct sem* sem_t; static sem_t sem_alloc(unsigned int value, semid_t semid, int system_sem); static void sem_free(sem_t sem); -static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(&named_sems); +static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(named_sems); static pthread_mutex_t named_sems_mtx = PTHREAD_MUTEX_INITIALIZER; FB10_COMPAT(_libc_sem_init_compat, sem_init); From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 13:08:47 2010 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 D61A9106566B; Sat, 23 Jan 2010 13:08:47 +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 AB5798FC12; Sat, 23 Jan 2010 13:08:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ND8liA013294; Sat, 23 Jan 2010 13:08:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ND8lfd013292; Sat, 23 Jan 2010 13:08:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001231308.o0ND8lfd013292@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 13:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202884 - head/share/man/man3 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: Sat, 23 Jan 2010 13:08:47 -0000 Author: kib Date: Sat Jan 23 13:08:47 2010 New Revision: 202884 URL: http://svn.freebsd.org/changeset/base/202884 Log: Document pthread_timedjoin_np. Note implementation-defined EOPNOTSUPP error [1]. PR: threads/143115 [1] MFC after: 3 days Modified: head/share/man/man3/pthread_join.3 Modified: head/share/man/man3/pthread_join.3 ============================================================================== --- head/share/man/man3/pthread_join.3 Sat Jan 23 12:48:46 2010 (r202883) +++ head/share/man/man3/pthread_join.3 Sat Jan 23 13:08:47 2010 (r202884) @@ -30,11 +30,12 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 1996 +.Dd January 23, 2010 .Dt PTHREAD_JOIN 3 .Os .Sh NAME -.Nm pthread_join +.Nm pthread_join , +.Nm pthread_timedjoin_np .Nd wait for thread termination .Sh LIBRARY .Lb libpthread @@ -42,6 +43,8 @@ .In pthread.h .Ft int .Fn pthread_join "pthread_t thread" "void **value_ptr" +.Ft int +.Fn pthread_timedjoin_np "pthread_t thread" "void **value_ptr" "const struct timespec *abstime" .Sh DESCRIPTION The .Fn pthread_join @@ -70,18 +73,30 @@ If the thread calling .Fn pthread_join is cancelled, then the target thread is not detached. .Pp +The +.Fn pthread_timedjoin_np +function is equivalent to the +.Fn pthread_join +function except it will return +.Er ETIMEDOUT +if target thread does not exit before specified absolute time passes. +.Pp A thread that has exited but remains unjoined counts against [_POSIX_THREAD_THREADS_MAX]. .Sh RETURN VALUES If successful, the .Fn pthread_join -function will return zero. +and +.Fn pthread_timedjoin_np +functions will return zero. Otherwise an error number will be returned to indicate the error. .Sh ERRORS The .Fn pthread_join -function will fail if: +and +.Fn pthread_timedjoin_np +functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL The implementation has detected that the value specified by @@ -95,6 +110,19 @@ thread ID, A deadlock was detected or the value of .Fa thread specifies the calling thread. +.It Bq Er EOPNOTSUPP +The implementation detected that another caller is already waiting on +.Fa thread . +.El +.Pp +Additionally, the +.Fn pthread_join +function will fail if: +.Bl -tag -width Er +.It Bq Er ETIMEDOUT +The specified absolute time passed while +.Fn pthread_timedjoin_np +waited for thread exit. .El .Sh SEE ALSO .Xr wait 2 , @@ -104,3 +132,9 @@ The .Fn pthread_join function conforms to .St -p1003.1-96 . +The +.Fn pthread_timedjoin_np +is +.Fx +extension, first appeared in +.Fx 6.1 . From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 14:12:41 2010 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 13C291065694; Sat, 23 Jan 2010 14:12:41 +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 015AB8FC20; Sat, 23 Jan 2010 14:12:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NECetF027471; Sat, 23 Jan 2010 14:12:40 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NECeOj027468; Sat, 23 Jan 2010 14:12:40 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001231412.o0NECeOj027468@svn.freebsd.org> From: Christian Brueffer Date: Sat, 23 Jan 2010 14:12:40 +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: r202885 - stable/8/share/man/man3 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: Sat, 23 Jan 2010 14:12:41 -0000 Author: brueffer Date: Sat Jan 23 14:12:40 2010 New Revision: 202885 URL: http://svn.freebsd.org/changeset/base/202885 Log: MFC: r202162 Various fixes. Modified: stable/8/share/man/man3/pthread_affinity_np.3 stable/8/share/man/man3/pthread_attr_affinity_np.3 Directory Properties: stable/8/share/man/man3/ (props changed) Modified: stable/8/share/man/man3/pthread_affinity_np.3 ============================================================================== --- stable/8/share/man/man3/pthread_affinity_np.3 Sat Jan 23 13:08:47 2010 (r202884) +++ stable/8/share/man/man3/pthread_affinity_np.3 Sat Jan 23 14:12:40 2010 (r202885) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd January 12, 2010 .Dt PTHREAD_AFFINITY_NP 3 .Os .Sh NAME @@ -44,17 +44,17 @@ .Fn pthread_getaffinity_np and .Fn pthread_setaffinity_np -allow the manipulation of sets of CPUs available to specified thread. +allow the manipulation of sets of CPUs available to the specified thread. .Pp Masks of type .Ft cpuset_t are composed using the -.Xr CPU_SET 2 +.Xr CPU_SET 3 macros. The kernel tolerates large sets as long as all CPUs specified in the set exist. Sets smaller than the kernel uses generate an error on calls to -.Fn pthread_getaffinity_np +.Fn pthread_getaffinity_np even if the result set would fit within the user supplied set. Calls to .Fn pthread_setaffinity_np @@ -75,14 +75,13 @@ retrieves the mask from the thread specified by .Fa td , and stores it in the space provided by -.Fa cpumaskp . +.Fa cpusetp . .Pp .Fn pthread_setaffinity_np attempts to set the mask for the thread specified by .Fa td to the value in -.Fa cpumaskp . -.Pp +.Fa cpusetp . .Sh RETURN VALUES If successful, the .Fn pthread_getaffinity_np @@ -105,7 +104,7 @@ call would leave a thread without a vali does not overlap with the thread's anonymous mask. .It Bq Er EFAULT The -.Fa cpumaskp +.Fa cpusetp pointer passed was invalid. .It Bq Er ESRCH The thread specified by the @@ -127,7 +126,7 @@ operation. .Xr CPU_SET 3 , .Xr pthread 3 , .Xr pthread_attr_get_affinity_np 3 , -.Xr pthread_attr_set_affinity_np 3 . +.Xr pthread_attr_set_affinity_np 3 .Sh STANDARDS The .Nm pthread_getaffinity_np Modified: stable/8/share/man/man3/pthread_attr_affinity_np.3 ============================================================================== --- stable/8/share/man/man3/pthread_attr_affinity_np.3 Sat Jan 23 13:08:47 2010 (r202884) +++ stable/8/share/man/man3/pthread_attr_affinity_np.3 Sat Jan 23 14:12:40 2010 (r202885) @@ -31,7 +31,7 @@ .Sh NAME .Nm pthread_attr_getaffinity_np , .Nm pthread_attr_setaffinity_np -.Nd manage CPU affinity in thread attribute object +.Nd manage CPU affinity in thread attribute objects .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS @@ -41,20 +41,21 @@ .Ft int .Fn pthread_attr_setaffinity_np "pthread_attr_t *pattr" "size_t cpusetsize" "const cpuset_t *cpusetp" .Sh DESCRIPTION +The .Fn pthread_attr_getaffinity_np and .Fn pthread_attr_setaffinity_np -allow the manipulation of sets of CPUs available to specified thread attribute object. +functions allow the manipulation of sets of CPUs available to the specified thread attribute object. .Pp Masks of type .Ft cpuset_t are composed using the -.Xr CPU_SET 2 +.Xr CPU_SET 3 macros. The kernel tolerates large sets as long as all CPUs specified in the set exist. Sets smaller than the kernel uses generate an error on calls to -.Fn pthread_attr_getaffinity_np +.Fn pthread_attr_getaffinity_np even if the result set would fit within the user supplied set. Calls to .Fn pthread_attr_setaffinity_np @@ -75,14 +76,13 @@ retrieves the mask from the thread attribute object specified by .Fa pattr , and stores it in the space provided by -.Fa cpumaskp . +.Fa cpusetp . .Pp .Fn pthread_attr_setaffinity_np -set the mask for the thread attribute object specified by +sets the mask for the thread attribute object specified by .Fa pattr to the value in -.Fa cpumaskp . -.Pp +.Fa cpusetp . .Sh RETURN VALUES If successful, the .Fn pthread_attr_getaffinity_np @@ -101,7 +101,8 @@ functions will fail if: .It Bq Er EINVAL The .Fa pattr -or the attribute specified by it is NULL. +or the attribute specified by it is +.Dv NULL . .El .Pp The @@ -111,7 +112,8 @@ function will fail if: .It Bq Er EINVAL The .Fa pattr -or the attribute specified by it is NULL. +or the attribute specified by it is +.Dv NULL . .It Bq Er ENOMEM Insufficient memory exists to store the cpuset mask. .El @@ -122,7 +124,7 @@ Insufficient memory exists to store the .Xr cpuset_setid 2 , .Xr CPU_SET 3 , .Xr pthread_get_affinity_np 3 , -.Xr pthread_set_affinity_np 3 . +.Xr pthread_set_affinity_np 3 .Sh STANDARDS The .Nm pthread_attr_getaffinity_np From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 14:13:22 2010 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 07DF910656B8; Sat, 23 Jan 2010 14:13:22 +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 E9B068FC28; Sat, 23 Jan 2010 14:13:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NEDLRC027684; Sat, 23 Jan 2010 14:13:21 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NEDLFH027681; Sat, 23 Jan 2010 14:13:21 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001231413.o0NEDLFH027681@svn.freebsd.org> From: Christian Brueffer Date: Sat, 23 Jan 2010 14:13:21 +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: r202886 - stable/7/share/man/man3 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: Sat, 23 Jan 2010 14:13:22 -0000 Author: brueffer Date: Sat Jan 23 14:13:21 2010 New Revision: 202886 URL: http://svn.freebsd.org/changeset/base/202886 Log: MFC: r202162 Various fixes. Modified: stable/7/share/man/man3/pthread_affinity_np.3 stable/7/share/man/man3/pthread_attr_affinity_np.3 Directory Properties: stable/7/share/man/man3/ (props changed) Modified: stable/7/share/man/man3/pthread_affinity_np.3 ============================================================================== --- stable/7/share/man/man3/pthread_affinity_np.3 Sat Jan 23 14:12:40 2010 (r202885) +++ stable/7/share/man/man3/pthread_affinity_np.3 Sat Jan 23 14:13:21 2010 (r202886) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd January 12, 2010 .Dt PTHREAD_AFFINITY_NP 3 .Os .Sh NAME @@ -44,17 +44,17 @@ .Fn pthread_getaffinity_np and .Fn pthread_setaffinity_np -allow the manipulation of sets of CPUs available to specified thread. +allow the manipulation of sets of CPUs available to the specified thread. .Pp Masks of type .Ft cpuset_t are composed using the -.Xr CPU_SET 2 +.Xr CPU_SET 3 macros. The kernel tolerates large sets as long as all CPUs specified in the set exist. Sets smaller than the kernel uses generate an error on calls to -.Fn pthread_getaffinity_np +.Fn pthread_getaffinity_np even if the result set would fit within the user supplied set. Calls to .Fn pthread_setaffinity_np @@ -75,14 +75,13 @@ retrieves the mask from the thread specified by .Fa td , and stores it in the space provided by -.Fa cpumaskp . +.Fa cpusetp . .Pp .Fn pthread_setaffinity_np attempts to set the mask for the thread specified by .Fa td to the value in -.Fa cpumaskp . -.Pp +.Fa cpusetp . .Sh RETURN VALUES If successful, the .Fn pthread_getaffinity_np @@ -105,7 +104,7 @@ call would leave a thread without a vali does not overlap with the thread's anonymous mask. .It Bq Er EFAULT The -.Fa cpumaskp +.Fa cpusetp pointer passed was invalid. .It Bq Er ESRCH The thread specified by the @@ -127,7 +126,7 @@ operation. .Xr CPU_SET 3 , .Xr pthread 3 , .Xr pthread_attr_get_affinity_np 3 , -.Xr pthread_attr_set_affinity_np 3 . +.Xr pthread_attr_set_affinity_np 3 .Sh STANDARDS The .Nm pthread_getaffinity_np Modified: stable/7/share/man/man3/pthread_attr_affinity_np.3 ============================================================================== --- stable/7/share/man/man3/pthread_attr_affinity_np.3 Sat Jan 23 14:12:40 2010 (r202885) +++ stable/7/share/man/man3/pthread_attr_affinity_np.3 Sat Jan 23 14:13:21 2010 (r202886) @@ -31,7 +31,7 @@ .Sh NAME .Nm pthread_attr_getaffinity_np , .Nm pthread_attr_setaffinity_np -.Nd manage CPU affinity in thread attribute object +.Nd manage CPU affinity in thread attribute objects .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS @@ -41,20 +41,21 @@ .Ft int .Fn pthread_attr_setaffinity_np "pthread_attr_t *pattr" "size_t cpusetsize" "const cpuset_t *cpusetp" .Sh DESCRIPTION +The .Fn pthread_attr_getaffinity_np and .Fn pthread_attr_setaffinity_np -allow the manipulation of sets of CPUs available to specified thread attribute object. +functions allow the manipulation of sets of CPUs available to the specified thread attribute object. .Pp Masks of type .Ft cpuset_t are composed using the -.Xr CPU_SET 2 +.Xr CPU_SET 3 macros. The kernel tolerates large sets as long as all CPUs specified in the set exist. Sets smaller than the kernel uses generate an error on calls to -.Fn pthread_attr_getaffinity_np +.Fn pthread_attr_getaffinity_np even if the result set would fit within the user supplied set. Calls to .Fn pthread_attr_setaffinity_np @@ -75,14 +76,13 @@ retrieves the mask from the thread attribute object specified by .Fa pattr , and stores it in the space provided by -.Fa cpumaskp . +.Fa cpusetp . .Pp .Fn pthread_attr_setaffinity_np -set the mask for the thread attribute object specified by +sets the mask for the thread attribute object specified by .Fa pattr to the value in -.Fa cpumaskp . -.Pp +.Fa cpusetp . .Sh RETURN VALUES If successful, the .Fn pthread_attr_getaffinity_np @@ -101,7 +101,8 @@ functions will fail if: .It Bq Er EINVAL The .Fa pattr -or the attribute specified by it is NULL. +or the attribute specified by it is +.Dv NULL . .El .Pp The @@ -111,7 +112,8 @@ function will fail if: .It Bq Er EINVAL The .Fa pattr -or the attribute specified by it is NULL. +or the attribute specified by it is +.Dv NULL . .It Bq Er ENOMEM Insufficient memory exists to store the cpuset mask. .El @@ -122,7 +124,7 @@ Insufficient memory exists to store the .Xr cpuset_setid 2 , .Xr CPU_SET 3 , .Xr pthread_get_affinity_np 3 , -.Xr pthread_set_affinity_np 3 . +.Xr pthread_set_affinity_np 3 .Sh STANDARDS The .Nm pthread_attr_getaffinity_np From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 14:56:17 2010 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 559461065693; Sat, 23 Jan 2010 14:56:17 +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 44CF68FC20; Sat, 23 Jan 2010 14:56:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NEuHla037080; Sat, 23 Jan 2010 14:56:17 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NEuHNc037078; Sat, 23 Jan 2010 14:56:17 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201001231456.o0NEuHNc037078@svn.freebsd.org> From: Ken Smith Date: Sat, 23 Jan 2010 14:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202887 - svnadmin/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: Sat, 23 Jan 2010 14:56:17 -0000 Author: kensmith Date: Sat Jan 23 14:56:16 2010 New Revision: 202887 URL: http://svn.freebsd.org/changeset/base/202887 Log: Turn on approval checking for stable/7 to mark the beginning of Code Freeze for the 7.3-RELEASE cycle. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Sat Jan 23 14:13:21 2010 (r202886) +++ svnadmin/conf/approvers Sat Jan 23 14:56:16 2010 (r202887) @@ -18,7 +18,7 @@ # #^head/ re #^stable/8/ re -#^stable/7/ re +^stable/7/ re ^releng/8.0/ (security-officer|so) ^releng/7.[0-2]/ (security-officer|so) ^releng/6.[0-4]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 15:28:18 2010 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 DD5A710656C2; Sat, 23 Jan 2010 15:28:18 +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 CBEE98FC13; Sat, 23 Jan 2010 15:28:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NFSIdQ044147; Sat, 23 Jan 2010 15:28:18 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NFSIDg044145; Sat, 23 Jan 2010 15:28:18 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201001231528.o0NFSIDg044145@svn.freebsd.org> From: Ken Smith Date: Sat, 23 Jan 2010 15:28:18 +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: r202888 - stable/7/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: Sat, 23 Jan 2010 15:28:19 -0000 Author: kensmith Date: Sat Jan 23 15:28:18 2010 New Revision: 202888 URL: http://svn.freebsd.org/changeset/base/202888 Log: Adjust to indicate we've begun the 7.3-RELEASE release cycle. Approved by: re (implicit) Modified: stable/7/sys/conf/newvers.sh Modified: stable/7/sys/conf/newvers.sh ============================================================================== --- stable/7/sys/conf/newvers.sh Sat Jan 23 14:56:16 2010 (r202887) +++ stable/7/sys/conf/newvers.sh Sat Jan 23 15:28:18 2010 (r202888) @@ -31,8 +31,8 @@ # $FreeBSD$ TYPE="FreeBSD" -REVISION="7.2" -BRANCH="STABLE" +REVISION="7.3" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 15:54:22 2010 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 50EAF1065670; Sat, 23 Jan 2010 15:54:22 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7968FC0A; Sat, 23 Jan 2010 15:54:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NFsMFE049841; Sat, 23 Jan 2010 15:54:22 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NFsMbx049837; Sat, 23 Jan 2010 15:54:22 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001231554.o0NFsMbx049837@svn.freebsd.org> From: Attilio Rao Date: Sat, 23 Jan 2010 15:54: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: r202889 - head/sys/kern 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: Sat, 23 Jan 2010 15:54:22 -0000 Author: attilio Date: Sat Jan 23 15:54:21 2010 New Revision: 202889 URL: http://svn.freebsd.org/changeset/base/202889 Log: - Fix a race in sched_switch() of sched_4bsd. In the case of the thread being on a sleepqueue or a turnstile, the sched_lock was acquired (without the aid of the td_lock interface) and the td_lock was dropped. This was going to break locking rules on other threads willing to access to the thread (via the td_lock interface) and modify his flags (allowed as long as the container lock was different by the one used in sched_switch). In order to prevent this situation, while sched_lock is acquired there the td_lock gets blocked. [0] - Merge the ULE's internal function thread_block_switch() into the global thread_lock_block() and make the former semantic as the default for thread_lock_block(). This means that thread_lock_block() will not disable interrupts when called (and consequently thread_unlock_block() will not re-enabled them when called). This should be done manually when necessary. Note, however, that ULE's thread_unblock_switch() is not reaped because it does reflect a difference in semantic due in ULE (the td_lock may not be necessarilly still blocked_lock when calling this). While asymmetric, it does describe a remarkable difference in semantic that is good to keep in mind. [0] Reported by: Kohji Okuno Tested by: Giovanni Trematerra MFC: 2 weeks Modified: head/sys/kern/kern_mutex.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sat Jan 23 15:28:18 2010 (r202888) +++ head/sys/kern/kern_mutex.c Sat Jan 23 15:54:21 2010 (r202889) @@ -616,7 +616,6 @@ thread_lock_block(struct thread *td) { struct mtx *lock; - spinlock_enter(); THREAD_LOCK_ASSERT(td, MA_OWNED); lock = td->td_lock; td->td_lock = &blocked_lock; @@ -631,7 +630,6 @@ thread_lock_unblock(struct thread *td, s mtx_assert(new, MA_OWNED); MPASS(td->td_lock == &blocked_lock); atomic_store_rel_ptr((volatile void *)&td->td_lock, (uintptr_t)new); - spinlock_exit(); } void Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sat Jan 23 15:28:18 2010 (r202888) +++ head/sys/kern/sched_4bsd.c Sat Jan 23 15:54:21 2010 (r202889) @@ -920,9 +920,11 @@ sched_sleep(struct thread *td, int pri) void sched_switch(struct thread *td, struct thread *newtd, int flags) { + struct mtx *tmtx; struct td_sched *ts; struct proc *p; + tmtx = NULL; ts = td->td_sched; p = td->td_proc; @@ -931,10 +933,11 @@ sched_switch(struct thread *td, struct t /* * Switch to the sched lock to fix things up and pick * a new thread. + * Block the td_lock in order to avoid breaking the critical path. */ if (td->td_lock != &sched_lock) { mtx_lock_spin(&sched_lock); - thread_unlock(td); + tmtx = thread_lock_block(td); } if ((td->td_flags & TDF_NOLOAD) == 0) @@ -1004,7 +1007,7 @@ sched_switch(struct thread *td, struct t (*dtrace_vtime_switch_func)(newtd); #endif - cpu_switch(td, newtd, td->td_lock); + cpu_switch(td, newtd, tmtx != NULL ? tmtx : td->td_lock); lock_profile_obtain_lock_success(&sched_lock.lock_object, 0, 0, __FILE__, __LINE__); /* Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sat Jan 23 15:28:18 2010 (r202888) +++ head/sys/kern/sched_ule.c Sat Jan 23 15:54:21 2010 (r202889) @@ -301,7 +301,6 @@ static int sched_pickcpu(struct thread * static void sched_balance(void); static int sched_balance_pair(struct tdq *, struct tdq *); static inline struct tdq *sched_setcpu(struct thread *, int, int); -static inline struct mtx *thread_block_switch(struct thread *); static inline void thread_unblock_switch(struct thread *, struct mtx *); static struct mtx *sched_switch_migrate(struct tdq *, struct thread *, int); static int sysctl_kern_sched_topology_spec(SYSCTL_HANDLER_ARGS); @@ -1106,9 +1105,11 @@ sched_setcpu(struct thread *td, int cpu, * The hard case, migration, we need to block the thread first to * prevent order reversals with other cpus locks. */ + spinlock_enter(); thread_lock_block(td); TDQ_LOCK(tdq); thread_lock_unblock(td, TDQ_LOCKPTR(tdq)); + spinlock_exit(); return (tdq); } @@ -1715,23 +1716,6 @@ sched_unlend_user_prio(struct thread *td } /* - * Block a thread for switching. Similar to thread_block() but does not - * bump the spin count. - */ -static inline struct mtx * -thread_block_switch(struct thread *td) -{ - struct mtx *lock; - - THREAD_LOCK_ASSERT(td, MA_OWNED); - lock = td->td_lock; - td->td_lock = &blocked_lock; - mtx_unlock_spin(lock); - - return (lock); -} - -/* * Handle migration from sched_switch(). This happens only for * cpu binding. */ @@ -1749,7 +1733,7 @@ sched_switch_migrate(struct tdq *tdq, st * not holding either run-queue lock. */ spinlock_enter(); - thread_block_switch(td); /* This releases the lock on tdq. */ + thread_lock_block(td); /* This releases the lock on tdq. */ /* * Acquire both run-queue locks before placing the thread on the new @@ -1769,7 +1753,8 @@ sched_switch_migrate(struct tdq *tdq, st } /* - * Release a thread that was blocked with thread_block_switch(). + * Variadic version of thread_lock_unblock() that does not assume td_lock + * is blocked. */ static inline void thread_unblock_switch(struct thread *td, struct mtx *mtx) @@ -1825,7 +1810,7 @@ sched_switch(struct thread *td, struct t } else { /* This thread must be going to sleep. */ TDQ_LOCK(tdq); - mtx = thread_block_switch(td); + mtx = thread_lock_block(td); tdq_load_rem(tdq, td); } /* From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 16:29:05 2010 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 669651065672; Sat, 23 Jan 2010 16:29:04 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 547CA8FC15; Sat, 23 Jan 2010 16:29:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NGT4Vb057512; Sat, 23 Jan 2010 16:29:04 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NGT4jK057510; Sat, 23 Jan 2010 16:29:04 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201001231629.o0NGT4jK057510@svn.freebsd.org> From: Robert Noland Date: Sat, 23 Jan 2010 16:29:04 +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: r202890 - stable/8/sys/dev/agp 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: Sat, 23 Jan 2010 16:29:05 -0000 Author: rnoland Date: Sat Jan 23 16:29:04 2010 New Revision: 202890 URL: http://svn.freebsd.org/changeset/base/202890 Log: MFC r200764 Fix a handful of issues with via agp support. * Read the pci capability register to identify AGP 3 support * Add missing smaller aperture sizes for AGP3 chips. * Fix the aperture size calculation on AGP2 chips. All sizes between 32M and 256M reported as 256M. * Add \n to error string. Modified: stable/8/sys/dev/agp/agp_via.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/agp/agp_via.c ============================================================================== --- stable/8/sys/dev/agp/agp_via.c Sat Jan 23 15:54:21 2010 (r202889) +++ stable/8/sys/dev/agp/agp_via.c Sat Jan 23 16:29:04 2010 (r202890) @@ -165,39 +165,16 @@ agp_via_attach(device_t dev) struct agp_gatt *gatt; int error; u_int32_t agpsel; + u_int32_t capid; - /* XXX: This should be keying off of whether the bridge is AGP3 capable, - * rather than a bunch of device ids for chipsets that happen to do 8x. - */ - switch (pci_get_devid(dev)) { - case 0x01981106: - case 0x02591106: - case 0x02691106: - case 0x02961106: - case 0x03141106: - case 0x03241106: - case 0x03271106: - case 0x03641106: - case 0x31231106: - case 0x31681106: - case 0x31891106: - case 0x32051106: - case 0x32581106: - case 0xb1981106: - /* The newer VIA chipsets will select the AGP version based on - * what AGP versions the card supports. We still have to - * program it using the v2 registers if it has chosen to use - * compatibility mode. - */ + sc->regs = via_v2_regs; + + /* Look at the capability register to see if we handle AGP3 */ + capid = pci_read_config(dev, agp_find_caps(dev) + AGP_CAPID, 4); + if (((capid >> 20) & 0x0f) >= 3) { agpsel = pci_read_config(dev, AGP_VIA_AGPSEL, 1); if ((agpsel & (1 << 1)) == 0) sc->regs = via_v3_regs; - else - sc->regs = via_v2_regs; - break; - default: - sc->regs = via_v2_regs; - break; } error = agp_generic_attach(dev); @@ -235,7 +212,7 @@ agp_via_attach(device_t dev) pci_write_config(dev, sc->regs[REG_ATTBASE], gatt->ag_physical, 4); /* Enable the aperture. */ - gartctrl = pci_read_config(dev, sc->regs[REG_ATTBASE], 4); + gartctrl = pci_read_config(dev, sc->regs[REG_GARTCTRL], 4); pci_write_config(dev, sc->regs[REG_GARTCTRL], gartctrl | (3 << 7), 4); } @@ -268,7 +245,7 @@ agp_via_get_aperture(device_t dev) u_int32_t apsize; if (sc->regs == via_v2_regs) { - apsize = pci_read_config(dev, sc->regs[REG_APSIZE], 1) & 0x1f; + apsize = pci_read_config(dev, sc->regs[REG_APSIZE], 1); /* * The size is determined by the number of low bits of @@ -295,8 +272,14 @@ agp_via_get_aperture(device_t dev) return 0x04000000; case 0xf38: return 0x02000000; + case 0xf3c: + return 0x01000000; + case 0xf3e: + return 0x00800000; + case 0xf3f: + return 0x00400000; default: - device_printf(dev, "Invalid aperture setting 0x%x", + device_printf(dev, "Invalid aperture setting 0x%x\n", pci_read_config(dev, sc->regs[REG_APSIZE], 2)); return 0; } @@ -345,6 +328,15 @@ agp_via_set_aperture(device_t dev, u_int case 0x02000000: key = 0xf38; break; + case 0x01000000: + key = 0xf3c; + break; + case 0x00800000: + key = 0xf3e; + break; + case 0x00400000: + key = 0xf3f; + break; default: device_printf(dev, "Invalid aperture size (%dMb)\n", aperture / 1024 / 1024); From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 16:40:36 2010 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 61F83106566C; Sat, 23 Jan 2010 16:40:36 +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 4E6B08FC12; Sat, 23 Jan 2010 16:40:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NGeaXN060145; Sat, 23 Jan 2010 16:40:36 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NGear0060139; Sat, 23 Jan 2010 16:40:36 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001231640.o0NGear0060139@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 23 Jan 2010 16:40:36 +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: r202891 - in stable/8: sys/kern sys/netinet sys/netinet6 sys/sys usr.sbin/jail 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: Sat, 23 Jan 2010 16:40:36 -0000 Author: bz Date: Sat Jan 23 16:40:35 2010 New Revision: 202891 URL: http://svn.freebsd.org/changeset/base/202891 Log: MFC r202468: Add ip4.saddrsel/ip4.nosaddrsel (and equivalent for ip6) to control whether to use source address selection (default) or the primary jail address for unbound outgoing connections. This is intended to be used by people upgrading from single-IP jails to multi-IP jails but not having to change firewall rules, application ACLs, ... but to force their connections (unless otherwise changed) to the primry jail IP they had been used for years, as well as for people prefering to implement similar policies. Note that for IPv6, if configured incorrectly, this might lead to scope violations, which single-IPv6 jails could as well, as by the design of jails. [1] Reviewed by: jamie, hrs (ipv6 part) Pointed out by: hrs [1] Modified: stable/8/sys/kern/kern_jail.c stable/8/sys/netinet/in_pcb.c stable/8/sys/netinet6/in6_src.c stable/8/sys/sys/jail.h stable/8/usr.sbin/jail/jail.8 Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/usr.sbin/jail/ (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Sat Jan 23 16:29:04 2010 (r202890) +++ stable/8/sys/kern/kern_jail.c Sat Jan 23 16:40:35 2010 (r202891) @@ -77,6 +77,21 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); +/* Keep struct prison prison0 and some code in kern_jail_set() readable. */ +#ifdef INET +#ifdef INET6 +#define _PR_IP_SADDRSEL PR_IP4_SADDRSEL|PR_IP6_SADDRSEL +#else +#define _PR_IP_SADDRSEL PR_IP4_SADDRSEL +#endif +#else /* !INET */ +#ifdef INET6 +#define _PR_IP_SADDRSEL PR_IP6_SADDRSEL +#else +#define _PR_IP_SADDRSEL 0 +#endif +#endif + /* prison0 describes what is "real" about the system. */ struct prison prison0 = { .pr_id = 0, @@ -89,9 +104,9 @@ struct prison prison0 = { .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(&prison0.pr_children), #ifdef VIMAGE - .pr_flags = PR_HOST|PR_VNET, + .pr_flags = PR_HOST|PR_VNET|_PR_IP_SADDRSEL, #else - .pr_flags = PR_HOST, + .pr_flags = PR_HOST|_PR_IP_SADDRSEL, #endif .pr_allow = PR_ALLOW_ALL, }; @@ -129,10 +144,22 @@ static int prison_restrict_ip6(struct pr */ static char *pr_flag_names[] = { [0] = "persist", +#ifdef INET + [7] = "ip4.saddrsel", +#endif +#ifdef INET6 + [8] = "ip6.saddrsel", +#endif }; static char *pr_flag_nonames[] = { [0] = "nopersist", +#ifdef INET + [7] = "ip4.nosaddrsel", +#endif +#ifdef INET6 + [8] = "ip6.nosaddrsel", +#endif }; struct jailsys_flags { @@ -1199,6 +1226,9 @@ kern_jail_set(struct thread *td, struct #endif } #endif + /* Source address selection is always on by default. */ + pr->pr_flags |= _PR_IP_SADDRSEL; + pr->pr_securelevel = ppr->pr_securelevel; pr->pr_allow = JAIL_DEFAULT_ALLOW & ppr->pr_allow; pr->pr_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS; @@ -2659,6 +2689,41 @@ prison_get_ip4(struct ucred *cred, struc } /* + * Return 1 if we should do proper source address selection or are not jailed. + * We will return 0 if we should bypass source address selection in favour + * of the primary jail IPv4 address. Only in this case *ia will be updated and + * returned in NBO. + * Return EAFNOSUPPORT, in case this jail does not allow IPv4. + */ +int +prison_saddrsel_ip4(struct ucred *cred, struct in_addr *ia) +{ + struct prison *pr; + struct in_addr lia; + int error; + + KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); + KASSERT(ia != NULL, ("%s: ia is NULL", __func__)); + + if (!jailed(cred)) + return (1); + + pr = cred->cr_prison; + if (pr->pr_flags & PR_IP4_SADDRSEL) + return (1); + + lia.s_addr = INADDR_ANY; + error = prison_get_ip4(cred, &lia); + if (error) + return (error); + if (lia.s_addr == INADDR_ANY) + return (1); + + ia->s_addr = lia.s_addr; + return (0); +} + +/* * Return true if pr1 and pr2 have the same IPv4 address restrictions. */ int @@ -2964,6 +3029,41 @@ prison_get_ip6(struct ucred *cred, struc } /* + * Return 1 if we should do proper source address selection or are not jailed. + * We will return 0 if we should bypass source address selection in favour + * of the primary jail IPv6 address. Only in this case *ia will be updated and + * returned in NBO. + * Return EAFNOSUPPORT, in case this jail does not allow IPv6. + */ +int +prison_saddrsel_ip6(struct ucred *cred, struct in6_addr *ia6) +{ + struct prison *pr; + struct in6_addr lia6; + int error; + + KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); + KASSERT(ia6 != NULL, ("%s: ia6 is NULL", __func__)); + + if (!jailed(cred)) + return (1); + + pr = cred->cr_prison; + if (pr->pr_flags & PR_IP6_SADDRSEL) + return (1); + + lia6 = in6addr_any; + error = prison_get_ip6(cred, &lia6); + if (error) + return (error); + if (IN6_IS_ADDR_UNSPECIFIED(&lia6)) + return (1); + + bcopy(&lia6, ia6, sizeof(struct in6_addr)); + return (0); +} + +/* * Return true if pr1 and pr2 have the same IPv6 address restrictions. */ int @@ -4116,12 +4216,18 @@ SYSCTL_JAIL_PARAM_SYS_NODE(ip4, CTLFLAG_ "Jail IPv4 address virtualization"); SYSCTL_JAIL_PARAM_STRUCT(_ip4, addr, CTLFLAG_RW, sizeof(struct in_addr), "S,in_addr,a", "Jail IPv4 addresses"); +SYSCTL_JAIL_PARAM(_ip4, saddrsel, CTLTYPE_INT | CTLFLAG_RW, + "B", "Do (not) use IPv4 source address selection rather than the " + "primary jail IPv4 address."); #endif #ifdef INET6 SYSCTL_JAIL_PARAM_SYS_NODE(ip6, CTLFLAG_RDTUN, "Jail IPv6 address virtualization"); SYSCTL_JAIL_PARAM_STRUCT(_ip6, addr, CTLFLAG_RW, sizeof(struct in6_addr), "S,in6_addr,a", "Jail IPv6 addresses"); +SYSCTL_JAIL_PARAM(_ip6, saddrsel, CTLTYPE_INT | CTLFLAG_RW, + "B", "Do (not) use IPv6 source address selection rather than the " + "primary jail IPv6 address."); #endif SYSCTL_JAIL_PARAM_NODE(allow, "Jail permission flags"); Modified: stable/8/sys/netinet/in_pcb.c ============================================================================== --- stable/8/sys/netinet/in_pcb.c Sat Jan 23 16:29:04 2010 (r202890) +++ stable/8/sys/netinet/in_pcb.c Sat Jan 23 16:40:35 2010 (r202891) @@ -552,6 +552,13 @@ in_pcbladdr(struct inpcb *inp, struct in KASSERT(laddr != NULL, ("%s: laddr NULL", __func__)); + /* + * Bypass source address selection and use the primary jail IP + * if requested. + */ + if (cred != NULL && !prison_saddrsel_ip4(cred, laddr)) + return (0); + error = 0; bzero(&sro, sizeof(sro)); Modified: stable/8/sys/netinet6/in6_src.c ============================================================================== --- stable/8/sys/netinet6/in6_src.c Sat Jan 23 16:29:04 2010 (r202890) +++ stable/8/sys/netinet6/in6_src.c Sat Jan 23 16:40:35 2010 (r202891) @@ -271,6 +271,13 @@ in6_selectsrc(struct sockaddr_in6 *dstso } /* + * Bypass source address selection and use the primary jail IP + * if requested. + */ + if (cred != NULL && !prison_saddrsel_ip6(cred, srcp)) + return (0); + + /* * If the address is not specified, choose the best one based on * the outgoing interface and the destination address. */ Modified: stable/8/sys/sys/jail.h ============================================================================== --- stable/8/sys/sys/jail.h Sat Jan 23 16:29:04 2010 (r202890) +++ stable/8/sys/sys/jail.h Sat Jan 23 16:40:35 2010 (r202891) @@ -191,6 +191,10 @@ struct prison { #define PR_VNET 0x00000010 /* Virtual network stack */ #define PR_IP4_DISABLE 0x00000020 /* Disable IPv4 */ #define PR_IP6_DISABLE 0x00000040 /* Disable IPv6 */ +#define PR_IP4_SADDRSEL 0x00000080 /* Do IPv4 src addr sel. or use the */ + /* primary jail address. */ +#define PR_IP6_SADDRSEL 0x00000100 /* Do IPv6 src addr sel. or use the */ + /* primary jail address. */ /* Internal flag bits */ #define PR_REMOVE 0x01000000 /* In process of being removed */ @@ -362,12 +366,14 @@ int prison_get_ip4(struct ucred *cred, s int prison_local_ip4(struct ucred *cred, struct in_addr *ia); int prison_remote_ip4(struct ucred *cred, struct in_addr *ia); int prison_check_ip4(struct ucred *cred, struct in_addr *ia); +int prison_saddrsel_ip4(struct ucred *, struct in_addr *); #ifdef INET6 int prison_equal_ip6(struct prison *, struct prison *); int prison_get_ip6(struct ucred *, struct in6_addr *); int prison_local_ip6(struct ucred *, struct in6_addr *, int); int prison_remote_ip6(struct ucred *, struct in6_addr *); int prison_check_ip6(struct ucred *, struct in6_addr *); +int prison_saddrsel_ip6(struct ucred *, struct in6_addr *); #endif int prison_check_af(struct ucred *cred, int af); int prison_if(struct ucred *cred, struct sockaddr *sa); Modified: stable/8/usr.sbin/jail/jail.8 ============================================================================== --- stable/8/usr.sbin/jail/jail.8 Sat Jan 23 16:29:04 2010 (r202890) +++ stable/8/usr.sbin/jail/jail.8 Sat Jan 23 16:40:35 2010 (r202891) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2009 +.Dd January 17, 2010 .Dt JAIL 8 .Os .Sh NAME @@ -252,6 +252,13 @@ match. It is only possible to start multiple jails with the same IP address, if none of the jails has more than this single overlapping IP address assigned to itself. +.It Va ip4.saddrsel +A boolean option to change the formerly mentioned behaviour and disable +IPv4 source address selection for the prison in favour of the primary +IPv4 address of the jail. +Source address selection is enabled by default for all jails and a +.Va ip4.nosaddrsel +setting of a parent jail is not inherited for any child jails. .It Va ip4 Control the availablity of IPv4 addresses. Possible values are @@ -267,9 +274,10 @@ Setting the .Va ip4.addr parameter implies a value of .Dq new . -.It Va ip6.addr , Va ip6 -A list of IPv6 addresses assigned to the prison, the counterpart to -.Va ip4.addr +.It Va ip6.addr , Va ip6.saddrsel , Va ip6 +A set of IPv6 options for the prison, the counterparts to +.Va ip4.addr , +.Va ip4.saddrsel and .Va ip4 above. From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 17:00:08 2010 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 E1006106566B; Sat, 23 Jan 2010 17:00:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 646488FC1C; Sat, 23 Jan 2010 17:00:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 64D8F41C751; Sat, 23 Jan 2010 18:00:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id dkT5Qeq1Sjjj; Sat, 23 Jan 2010 18:00:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 0756541C712; Sat, 23 Jan 2010 18:00:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 5B2C64448EC; Sat, 23 Jan 2010 16:58:27 +0000 (UTC) Date: Sat, 23 Jan 2010 16:58:27 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Joerg Wunsch In-Reply-To: <201001230754.o0N7s70b040987@svn.freebsd.org> Message-ID: <20100123165730.J50938@maildrop.int.zabbadoz.net> References: <201001230754.o0N7s70b040987@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202870 - head/sys/dev/ieee488 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: Sat, 23 Jan 2010 17:00:08 -0000 On Sat, 23 Jan 2010, Joerg Wunsch wrote: > Author: joerg > Date: Sat Jan 23 07:54:06 2010 > New Revision: 202870 > URL: http://svn.freebsd.org/changeset/base/202870 > > Log: > Overhaul of the pcii driver: > ... > > MFC after: 1 day If it's not security related - we don't do that and still use a minmium of 3 days to catch problems ... like that this seems to have broken HEAD. -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 17:31:14 2010 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 1071A106566C; Sat, 23 Jan 2010 17:31:14 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3DAB8FC15; Sat, 23 Jan 2010 17:31:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NHVDKq071239; Sat, 23 Jan 2010 17:31:13 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NHVDNY071237; Sat, 23 Jan 2010 17:31:13 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001231731.o0NHVDNY071237@svn.freebsd.org> From: Antoine Brodin Date: Sat, 23 Jan 2010 17:31: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: r202892 - head/usr.bin 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: Sat, 23 Jan 2010 17:31:14 -0000 Author: antoine Date: Sat Jan 23 17:31:13 2010 New Revision: 202892 URL: http://svn.freebsd.org/changeset/base/202892 Log: Unbreak world WITHOUT_OPENSSL: the new dc(1) depends on crypto(3) and bc(1) depends on dc(1). Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Jan 23 16:40:35 2010 (r202891) +++ head/usr.bin/Makefile Sat Jan 23 17:31:13 2010 (r202892) @@ -18,7 +18,7 @@ SUBDIR= alias \ awk \ banner \ basename \ - bc \ + ${_bc} \ ${_biff} \ ${_bluetooth} \ brandelf \ @@ -50,7 +50,7 @@ SUBDIR= alias \ ${_csup} \ ${_ctags} \ cut \ - dc \ + ${_dc} \ ${_dig} \ dirname \ du \ @@ -280,7 +280,9 @@ _hesinfo= hesinfo .endif .if ${MK_OPENSSL} != "no" +_bc= bc _chkey= chkey +_dc= dc _newkey= newkey .if ${MK_LIBTHR} != "no" _csup= csup From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 17:58:40 2010 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 CA25F1065672; Sat, 23 Jan 2010 17:58:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9A5C8FC20; Sat, 23 Jan 2010 17:58:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NHweYA077273; Sat, 23 Jan 2010 17:58:40 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NHweYO077271; Sat, 23 Jan 2010 17:58:40 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001231758.o0NHweYO077271@svn.freebsd.org> From: Ed Schouten Date: Sat, 23 Jan 2010 17:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202893 - head/lib/libc/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: Sat, 23 Jan 2010 17:58:40 -0000 Author: ed Date: Sat Jan 23 17:58:40 2010 New Revision: 202893 URL: http://svn.freebsd.org/changeset/base/202893 Log: EMPTY records don't have a timestamp. Modified: head/lib/libc/gen/getutxent.3 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Sat Jan 23 17:31:13 2010 (r202892) +++ head/lib/libc/gen/getutxent.3 Sat Jan 23 17:58:40 2010 (r202893) @@ -138,7 +138,8 @@ Other fields inside the structure are: .Bl -tag -width ut_user .It Fa ut_tv The time the event occured. -This field is used for all types of entries. +This field is used for all types of entries, except +.Dv EMPTY . .It Fa ut_id An identifier that is used to refer to the entry. This identifier can be used to remove or replace a login entry by From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 18:42:29 2010 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 16A9C1065676; Sat, 23 Jan 2010 18:42:29 +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 0576B8FC1C; Sat, 23 Jan 2010 18:42:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NIgSG1086960; Sat, 23 Jan 2010 18:42:28 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NIgSa5086957; Sat, 23 Jan 2010 18:42:28 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001231842.o0NIgSa5086957@svn.freebsd.org> From: Alan Cox Date: Sat, 23 Jan 2010 18:42: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: r202894 - in head/sys/i386: i386 include 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: Sat, 23 Jan 2010 18:42:29 -0000 Author: alc Date: Sat Jan 23 18:42:28 2010 New Revision: 202894 URL: http://svn.freebsd.org/changeset/base/202894 Log: Handle a race between pmap_kextract() and pmap_promote_pde(). This race is known to cause a kernel crash in ZFS on i386 when superpage promotion is enabled. Tested by: netchild MFC after: 1 week Modified: head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Jan 23 17:58:40 2010 (r202893) +++ head/sys/i386/i386/pmap.c Sat Jan 23 18:42:28 2010 (r202894) @@ -243,8 +243,9 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -pt_entry_t *CMAP1 = 0; +pt_entry_t *CMAP1 = 0, *KPTmap; static pt_entry_t *CMAP3; +static pd_entry_t *KPTD; caddr_t CADDR1 = 0, ptvmmap = 0; static caddr_t CADDR3; struct msgbuf *msgbufp = 0; @@ -421,6 +422,21 @@ pmap_bootstrap(vm_paddr_t firstaddr) SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE))) /* + * KPTmap is used by pmap_kextract(). + */ + SYSMAP(pt_entry_t *, KPTD, KPTmap, KVA_PAGES) + + for (i = 0; i < NKPT; i++) + KPTD[i] = (KPTphys + (i << PAGE_SHIFT)) | PG_RW | PG_V; + + /* + * Adjust the start of the KPTD and KPTmap so that the implementation + * of pmap_kextract() and pmap_growkernel() can be made simpler. + */ + KPTD -= KPTDI; + KPTmap -= i386_btop(KPTDI << PDRSHIFT); + + /* * ptemap is used for pmap_pte_quick */ SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1); @@ -1839,6 +1855,7 @@ pmap_growkernel(vm_offset_t addr) vm_page_t nkpg; pd_entry_t newpdir; pt_entry_t *pde; + boolean_t updated_PTD; mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { @@ -1878,14 +1895,20 @@ pmap_growkernel(vm_offset_t addr) pmap_zero_page(nkpg); ptppaddr = VM_PAGE_TO_PHYS(nkpg); newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); - pdir_pde(PTD, kernel_vm_end) = newpdir; + pdir_pde(KPTD, kernel_vm_end) = newpdir; + updated_PTD = FALSE; mtx_lock_spin(&allpmaps_lock); LIST_FOREACH(pmap, &allpmaps, pm_list) { + if ((pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & + PG_FRAME)) + updated_PTD = TRUE; pde = pmap_pde(pmap, kernel_vm_end); pde_store(pde, newpdir); } mtx_unlock_spin(&allpmaps_lock); + KASSERT(updated_PTD, + ("pmap_growkernel: current page table is not in allpmaps")); kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Sat Jan 23 17:58:40 2010 (r202893) +++ head/sys/i386/include/pmap.h Sat Jan 23 18:42:28 2010 (r202894) @@ -265,6 +265,16 @@ pte_load_store_ma(pt_entry_t *ptep, pt_e #define pde_store_ma(ptep, pte) pte_load_store_ma((ptep), (pt_entry_t)pte) #elif !defined(XEN) + +/* + * KPTmap is a linear mapping of the kernel page table. It differs from the + * recursive mapping in two ways: (1) it only provides access to kernel page + * table pages, and not user page table pages, and (2) it provides access to + * a kernel page table page after the corresponding virtual addresses have + * been promoted to a 2/4MB page mapping. + */ +extern pt_entry_t *KPTmap; + /* * Routine: pmap_kextract * Function: @@ -279,10 +289,17 @@ pmap_kextract(vm_offset_t va) if ((pa = PTD[va >> PDRSHIFT]) & PG_PS) { pa = (pa & PG_PS_FRAME) | (va & PDRMASK); } else { - pa = *vtopte(va); + /* + * Beware of a concurrent promotion that changes the PDE at + * this point! For example, vtopte() must not be used to + * access the PTE because it would use the new PDE. It is, + * however, safe to use the old PDE because the page table + * page is preserved by the promotion. + */ + pa = KPTmap[i386_btop(va)]; pa = (pa & PG_FRAME) | (va & PAGE_MASK); } - return pa; + return (pa); } #define PT_UPDATES_FLUSH() From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 19:01:26 2010 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 EF92C106566C; Sat, 23 Jan 2010 19:01:25 +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 DD95C8FC19; Sat, 23 Jan 2010 19:01:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NJ1PMV091558; Sat, 23 Jan 2010 19:01:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NJ1Peo091556; Sat, 23 Jan 2010 19:01:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001231901.o0NJ1Peo091556@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 19:01:25 +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: r202895 - stable/7/sys/kern 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: Sat, 23 Jan 2010 19:01:26 -0000 Author: kib Date: Sat Jan 23 19:01:25 2010 New Revision: 202895 URL: http://svn.freebsd.org/changeset/base/202895 Log: MFC r186277: The quotactl, statfs and fstatfs syscall implementations may dereference NULL pointer to struct mount if the looked up vnode is reclaimed. Also, these syscalls only mnt_ref() the mp, still allowing it to be unmounted; only struct mount memory is kept from being reused. Lock the vnode when doing name lookup, then reference its mount point, unlock the vnode and vfs_busy the mountpoint. This sequence shall take care of both races. MFC r188141 (by trasz): In some situations, mnt_lockref could go negative due to vfs_unbusy() being called without calling vfs_busy() first. This made umount(8) hang waiting for mnt_lockref to become zero, which would never happen. MFC r196887: In fhopen, vfs_ref() the mount point while vnode is unlocked, to prevent vn_start_write(NULL, &mp) from operating on potentially freed or reused struct mount *. Remove unmatched vfs_rel() in cleanup. Approved by: re (bz) Modified: stable/7/sys/kern/vfs_syscalls.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Sat Jan 23 18:42:28 2010 (r202894) +++ stable/7/sys/kern/vfs_syscalls.c Sat Jan 23 19:01:25 2010 (r202895) @@ -200,19 +200,21 @@ quotactl(td, uap) AUDIT_ARG(uid, uap->uid); if (jailed(td->td_ucred) && !prison_quotas) return (EPERM); - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE | AUDITVNODE1, + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1, UIO_USERSPACE, uap->path, td); if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); mp = nd.ni_vp->v_mount; - if ((error = vfs_busy(mp, 0, NULL, td))) { - vrele(nd.ni_vp); + vfs_ref(mp); + vput(nd.ni_vp); + error = vfs_busy(mp, 0, NULL, td); + vfs_rel(mp); + if (error) { VFS_UNLOCK_GIANT(vfslocked); return (error); } - vrele(nd.ni_vp); error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg, td); vfs_unbusy(mp, td); VFS_UNLOCK_GIANT(vfslocked); @@ -306,6 +308,12 @@ kern_statfs(struct thread *td, char *pat vfs_ref(mp); NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_vp); + error = vfs_busy(mp, 0, NULL, td); + vfs_rel(mp); + if (error) { + VFS_UNLOCK_GIANT(vfslocked); + return (error); + } #ifdef MAC error = mac_check_mount_stat(td->td_ucred, mp); if (error) @@ -329,7 +337,7 @@ kern_statfs(struct thread *td, char *pat } *buf = *sp; out: - vfs_rel(mp); + vfs_unbusy(mp); VFS_UNLOCK_GIANT(vfslocked); if (mtx_owned(&Giant)) printf("statfs(%d): %s: %d\n", vfslocked, path, error); @@ -387,10 +395,16 @@ kern_fstatfs(struct thread *td, int fd, vfs_ref(mp); VOP_UNLOCK(vp, 0, td); fdrop(fp, td); - if (vp->v_iflag & VI_DOOMED) { + if (mp == NULL) { error = EBADF; goto out; } + error = vfs_busy(mp, 0, NULL, td); + vfs_rel(mp); + if (error) { + VFS_UNLOCK_GIANT(vfslocked); + return (error); + } #ifdef MAC error = mac_check_mount_stat(td->td_ucred, mp); if (error) @@ -415,7 +429,7 @@ kern_fstatfs(struct thread *td, int fd, *buf = *sp; out: if (mp) - vfs_rel(mp); + vfs_unbusy(mp); VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -4177,13 +4191,16 @@ fhopen(td, uap) goto bad; } if (fmode & O_TRUNC) { + vfs_ref(mp); VOP_UNLOCK(vp, 0, td); /* XXX */ if ((error = vn_start_write(NULL, &mp, V_WAIT | PCATCH)) != 0) { vrele(vp); + vfs_rel(mp); goto out; } VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); /* XXX */ + vfs_rel(mp); #ifdef MAC /* * We don't yet have fp->f_cred, so use td->td_ucred, which @@ -4261,7 +4278,6 @@ fhopen(td, uap) VOP_UNLOCK(vp, 0, td); fdrop(fp, td); - vfs_rel(mp); VFS_UNLOCK_GIANT(vfslocked); td->td_retval[0] = indx; return (0); From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 19:29:43 2010 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 404951065697; Sat, 23 Jan 2010 19:29:43 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9C68FC15; Sat, 23 Jan 2010 19:29:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NJThSl097785; Sat, 23 Jan 2010 19:29:43 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NJTh3F097783; Sat, 23 Jan 2010 19:29:43 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001231929.o0NJTh3F097783@svn.freebsd.org> From: Antoine Brodin Date: Sat, 23 Jan 2010 19:29: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: r202896 - head 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: Sat, 23 Jan 2010 19:29:43 -0000 Author: antoine Date: Sat Jan 23 19:29:42 2010 New Revision: 202896 URL: http://svn.freebsd.org/changeset/base/202896 Log: Unbreak world: - WITHOUT_OPENSSH (and WITH_KERBEROS) - WITHOUT_KERBEROS and WITH_GSSAPI PR: 137483 Submitted by: bf MFC after: 2 weeks Note: this breaks harder world WITHOUT_GSSAPI (and WITH_KERBEROS), but well Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jan 23 19:01:25 2010 (r202895) +++ head/Makefile.inc1 Sat Jan 23 19:29:42 2010 (r202896) @@ -1136,14 +1136,16 @@ _cddl_lib= cddl/lib _secure_lib_libcrypto= secure/lib/libcrypto _secure_lib_libssl= secure/lib/libssl lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L -.if ${MK_OPENSSH} != "no" -_secure_lib_libssh= secure/lib/libssh -secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L .if ${MK_KERBEROS} != "no" kerberos5/lib/libgssapi_krb5__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libmd__L kerberos5/lib/libroken__L secure/lib/libcrypto__L \ lib/libcrypt__L +.endif +.if ${MK_OPENSSH} != "no" +_secure_lib_libssh= secure/lib/libssh +secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L +.if ${MK_KERBEROS_SUPPORT} != "no" secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libgssapi_krb5__L .endif .endif @@ -1151,6 +1153,10 @@ secure/lib/libssh__L: lib/libgssapi__L k _secure_lib= secure/lib .endif +.if ${MK_GSSAPI} != "no" +_lib_libgssapi= lib/libgssapi +.endif + .if ${MK_IPX} != "no" _lib_libipx= lib/libipx .endif @@ -1163,7 +1169,6 @@ _kerberos5_lib_libhx509= kerberos5/lib/l _kerberos5_lib_libroken= kerberos5/lib/libroken _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm _kerberos5_lib_libgssapi_krb5= kerberos5/lib/libgssapi_krb5 -_lib_libgssapi= lib/libgssapi .endif .if ${MK_NIS} != "no" From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 19:47:14 2010 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 E89A5106568D for ; Sat, 23 Jan 2010 19:47:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 7440B8FC19 for ; Sat, 23 Jan 2010 19:47:14 +0000 (UTC) Received: (qmail 6897 invoked by uid 399); 23 Jan 2010 19:47:13 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 23 Jan 2010 19:47:13 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B5B5247.4010306@FreeBSD.org> Date: Sat, 23 Jan 2010 11:47:19 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.5) Gecko/20100114 Thunderbird/3.0 MIME-Version: 1.0 To: Florent Thoumie References: <201001222319.o0MNJXDj019603@svn.freebsd.org> In-Reply-To: <201001222319.o0MNJXDj019603@svn.freebsd.org> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-6@freebsd.org Subject: Re: svn commit: r202842 - in stable/6/usr.sbin/pkg_install: add create delete info lib updating version 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: Sat, 23 Jan 2010 19:47:15 -0000 On 01/22/10 15:19, Florent Thoumie wrote: > Author: flz > Date: Fri Jan 22 23:19:33 2010 > New Revision: 202842 > URL: http://svn.freebsd.org/changeset/base/202842 > > Log: > Synchronize pkg_install with HEAD. I am not of the camp that believes repeating the entire commit message (or messages) is always necessary, however a brief summary of the changes is usually desirable. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 20:04:38 2010 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 70853106566B for ; Sat, 23 Jan 2010 20:04:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 017BB8FC1D for ; Sat, 23 Jan 2010 20:04:37 +0000 (UTC) Received: (qmail 27173 invoked by uid 399); 23 Jan 2010 20:04:37 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 23 Jan 2010 20:04:37 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B5B565C.3020604@FreeBSD.org> Date: Sat, 23 Jan 2010 12:04:44 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.5) Gecko/20100114 Thunderbird/3.0 MIME-Version: 1.0 To: Antoine Brodin References: <201001231731.o0NHVDNY071237@svn.freebsd.org> In-Reply-To: <201001231731.o0NHVDNY071237@svn.freebsd.org> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202892 - head/usr.bin 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: Sat, 23 Jan 2010 20:04:38 -0000 On 01/23/10 09:31, Antoine Brodin wrote: > Author: antoine > Date: Sat Jan 23 17:31:13 2010 > New Revision: 202892 > URL: http://svn.freebsd.org/changeset/base/202892 > > Log: > Unbreak world WITHOUT_OPENSSL: > the new dc(1) depends on crypto(3) and bc(1) depends on dc(1). The dependency on crytpo(3) seems problematic. What's the nature of the dependency and how hard would it be to work around? Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 20:28:38 2010 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 5A9721065676; Sat, 23 Jan 2010 20:28:38 +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 305048FC1C; Sat, 23 Jan 2010 20:28:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NKScK1010998; Sat, 23 Jan 2010 20:28:38 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NKScOx010995; Sat, 23 Jan 2010 20:28:38 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001232028.o0NKScOx010995@svn.freebsd.org> From: Alan Cox Date: Sat, 23 Jan 2010 20:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202897 - head/sys/amd64/amd64 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: Sat, 23 Jan 2010 20:28:38 -0000 Author: alc Date: Sat Jan 23 20:28:37 2010 New Revision: 202897 URL: http://svn.freebsd.org/changeset/base/202897 Log: Simplify the mapping of the system message buffer. Use the direct map just like ia64 does. Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Jan 23 19:29:42 2010 (r202896) +++ head/sys/amd64/amd64/machdep.c Sat Jan 23 20:28:37 2010 (r202897) @@ -157,6 +157,8 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, extern vm_offset_t ksym_start, ksym_end; #endif +struct msgbuf *msgbufp; + /* Intel ICH registers */ #define ICH_PMBASE 0x400 #define ICH_SMI_EN ICH_PMBASE + 0x30 @@ -1275,7 +1277,7 @@ add_smap_entry(struct bios_smap *smap, v static void getmemsize(caddr_t kmdp, u_int64_t first) { - int i, off, physmap_idx, pa_indx, da_indx; + int i, physmap_idx, pa_indx, da_indx; vm_paddr_t pa, physmap[PHYSMAP_SIZE]; u_long physmem_tunable; pt_entry_t *pte; @@ -1508,9 +1510,7 @@ do_next: phys_avail[pa_indx] -= round_page(MSGBUF_SIZE); /* Map the message buffer. */ - for (off = 0; off < round_page(MSGBUF_SIZE); off += PAGE_SIZE) - pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] + - off); + msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]); } u_int64_t Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jan 23 19:29:42 2010 (r202896) +++ head/sys/amd64/amd64/pmap.c Sat Jan 23 20:28:37 2010 (r202897) @@ -105,7 +105,6 @@ __FBSDID("$FreeBSD$"); * and to when physical maps must be made correct. */ -#include "opt_msgbuf.h" #include "opt_pmap.h" #include "opt_vm.h" @@ -116,7 +115,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -206,7 +204,6 @@ static int shpgperproc = PMAP_SHPGPERPRO */ pt_entry_t *CMAP1 = 0; caddr_t CADDR1 = 0; -struct msgbuf *msgbufp = 0; /* * Crashdump maps. @@ -570,11 +567,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ SYSMAP(caddr_t, unused, crashdumpmap, MAXDUMPPGS) - /* - * msgbufp is used to map the system message buffer. - */ - SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE))) - virtual_avail = va; *CMAP1 = 0; From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 21:33:34 2010 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 05C10106566C; Sat, 23 Jan 2010 21:33:34 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E89C48FC0A; Sat, 23 Jan 2010 21:33:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NLXXRV025418; Sat, 23 Jan 2010 21:33:33 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NLXXNY025414; Sat, 23 Jan 2010 21:33:33 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201001232133.o0NLXXNY025414@svn.freebsd.org> From: Joerg Wunsch Date: Sat, 23 Jan 2010 21:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202898 - head/sys/dev/ieee488 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: Sat, 23 Jan 2010 21:33:34 -0000 Author: joerg Date: Sat Jan 23 21:33:33 2010 New Revision: 202898 URL: http://svn.freebsd.org/changeset/base/202898 Log: Fix breakage introduced to the tnt4882 driver in r202870. This PCI frontend uses the same uPD7210 backend as the pcii ISA frontend, so the backend has to cope with both situations. Also, hide the first printf in pcii_probe (address mismatch) behind bootverbose as the ISA bus parent tries to probe all configured ISA devices against each driver, so a the console has been cluttered with this message for a bunch of unrelated driver probes. MFC after: 3 days Modified: head/sys/dev/ieee488/pcii.c head/sys/dev/ieee488/tnt4882.c head/sys/dev/ieee488/upd7210.c head/sys/dev/ieee488/upd7210.h Modified: head/sys/dev/ieee488/pcii.c ============================================================================== --- head/sys/dev/ieee488/pcii.c Sat Jan 23 20:28:37 2010 (r202897) +++ head/sys/dev/ieee488/pcii.c Sat Jan 23 21:33:33 2010 (r202898) @@ -138,9 +138,10 @@ pcii_probe(device_t dev) * 1989 Edition, National Instruments.) */ if ((start & 0x3ff) != 0x2e1) { - printf("pcii_probe: PCIIA base address 0x%lx not " - "0x2e1/0x22e1/0x42e1/0x62e1\n", - start); + if (bootverbose) + printf("pcii_probe: PCIIA base address 0x%lx not " + "0x2e1/0x22e1/0x42e1/0x62e1\n", + start); return (ENXIO); } @@ -234,6 +235,7 @@ pcii_attach(device_t dev) for (rid = 0; rid < 8; rid++) { sc->upd7210.reg_res[rid] = sc->res[2 + rid]; + sc->upd7210.reg_offset[rid] = 0; } sc->upd7210.irq_clear_res = sc->res[10]; Modified: head/sys/dev/ieee488/tnt4882.c ============================================================================== --- head/sys/dev/ieee488/tnt4882.c Sat Jan 23 20:28:37 2010 (r202897) +++ head/sys/dev/ieee488/tnt4882.c Sat Jan 23 21:33:33 2010 (r202898) @@ -309,6 +309,9 @@ tnt_attach(device_t dev) /* No DMA help */ sc->upd7210.dmachan = -1; + /* No "special interrupt handling" needed here. */ + sc->upd7210.irq_clear_res = NULL; + upd7210attach(&sc->upd7210); return (0); Modified: head/sys/dev/ieee488/upd7210.c ============================================================================== --- head/sys/dev/ieee488/upd7210.c Sat Jan 23 20:28:37 2010 (r202897) +++ head/sys/dev/ieee488/upd7210.c Sat Jan 23 21:33:33 2010 (r202898) @@ -72,7 +72,7 @@ upd7210_rd(struct upd7210 *u, enum upd72 { u_int r; - r = bus_read_1(u->reg_res[reg], 0); + r = bus_read_1(u->reg_res[reg], u->reg_offset[reg]); u->rreg[reg] = r; return (r); } @@ -81,7 +81,7 @@ void upd7210_wr(struct upd7210 *u, enum upd7210_wreg reg, u_int val) { - bus_write_1(u->reg_res[reg], 0, val); + bus_write_1(u->reg_res[reg], u->reg_offset[reg], val); u->wreg[reg] = val; if (reg == AUXMR) u->wreg[8 + (val >> 5)] = val & 0x1f; @@ -125,7 +125,8 @@ upd7210intr(void *arg) * Some clones apparently don't implement this * feature, but National Instrument cards do. */ - bus_write_1(u->irq_clear_res, 0, 42); + if (u->irq_clear_res != NULL) + bus_write_1(u->irq_clear_res, 0, 42); } mtx_unlock(&u->mutex); } Modified: head/sys/dev/ieee488/upd7210.h ============================================================================== --- head/sys/dev/ieee488/upd7210.h Sat Jan 23 20:28:37 2010 (r202897) +++ head/sys/dev/ieee488/upd7210.h Sat Jan 23 21:33:33 2010 (r202898) @@ -50,6 +50,7 @@ typedef int upd7210_irq_t(struct upd7210 struct upd7210 { struct resource *reg_res[8]; struct resource *irq_clear_res; + u_int reg_offset[8]; int dmachan; int unit; From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 21:59:51 2010 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 D6977106566C; Sat, 23 Jan 2010 21:59:51 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id 606ED8FC1C; Sat, 23 Jan 2010 21:59:50 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-232-148.belrs3.nsw.optusnet.com.au [122.106.232.148]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0NLxmBZ031827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Jan 2010 08:59:49 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o0NLxjNW000329; Sun, 24 Jan 2010 08:59:45 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o0NLxjnb000328; Sun, 24 Jan 2010 08:59:45 +1100 (EST) (envelope-from peter) Date: Sun, 24 Jan 2010 08:59:45 +1100 From: Peter Jeremy To: Warner Losh Message-ID: <20100123215945.GF31243@server.vk2pj.dyndns.org> References: <201001230024.o0N0OWEC038553@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="l+goss899txtYvYf" Content-Disposition: inline In-Reply-To: <201001230024.o0N0OWEC038553@svn.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc 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: r202850 - head/sys/mips/cavium 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: Sat, 23 Jan 2010 21:59:51 -0000 --l+goss899txtYvYf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Jan-23 00:24:31 +0000, Warner Losh wrote: >Author: imp >Date: Sat Jan 23 00:24:31 2010 >New Revision: 202850 >URL: http://svn.freebsd.org/changeset/base/202850 > >Log: > Migrate from old "DDB" style debugger to newer KDB style. > >Modified: > head/sys/mips/cavium/octeon_machdep.c > >Modified: head/sys/mips/cavium/octeon_machdep.c >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >--- head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:18:12 2010 (r20284= 9) >+++ head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:24:31 2010 (r20285= 0) >@@ -110,7 +110,7 @@ platform_cpu_init() > void > platform_reset(void) > { >- ((void(*)(void))(long)0x9fc00000)(); /* Jump to MIPS reset vector */ >+ mips_generic_reset(); > } Was this bit intended? It doesn't tally with the log message. --=20 Peter Jeremy --l+goss899txtYvYf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAktbcVEACgkQ/opHv/APuIeB4QCfc62/hljZfq08+RkBLDgnOmXQ QhkAoLnCRCx8+bQx43g6lmkqaF+pEaBX =aO3P -----END PGP SIGNATURE----- --l+goss899txtYvYf-- From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 22:11:03 2010 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 E648D106566B; Sat, 23 Jan 2010 22:11:03 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BEA0D8FC12; Sat, 23 Jan 2010 22:11:03 +0000 (UTC) Received: from [192.168.2.102] (host86-179-176-160.range86-179.btcentralplus.com [86.179.176.160]) by cyrus.watson.org (Postfix) with ESMTPSA id 82AE746B5B; Sat, 23 Jan 2010 17:11:02 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <20091215013718.D984@besplex.bde.org> Date: Sat, 23 Jan 2010 22:10:58 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <86386F14-AB22-47F9-A4B1-6EC8B90444B4@FreeBSD.org> References: <200912141219.nBECJLfJ026164@svn.freebsd.org> <20091215013718.D984@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1077) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r200509 - stable/8/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: Sat, 23 Jan 2010 22:11:04 -0000 On 14 Dec 2009, at 16:08, Bruce Evans wrote: > On Mon, 14 Dec 2009, Robert Watson wrote: >=20 >> Log: >> Merge r197808 from head to stable/8: >>=20 >> In rtld's map_object(), use pread(..., 0) rather than read() to = read the >> ELF header from the front of the file. As all other I/O on the = binary >> is done using mmap(), this avoids the need for seek privileges on = the >> file descriptor during run-time linking. >=20 > Doesn't/shouldn't pread() require seek privileges? It certainly uses = them. I think there are actually multiple notions of "seek": - Manipulation of the file descriptor offset, which occurs explicitly = with lseek(2) or implicitly with read(2)/write(2)/..., but not with = pread(2)/pwrite(2)/sendfile(2)/... - Underlying object offset, such as the current location of the head = relative to a tape in a tape drive, which will be manipulated implicitly = as IO requests go down the stack regardless of the file descriptor = offset changing For the purposes of our ongoing capability project, the right to seek = refers to changing the file descriptor offset, as in most instances = we're interested in, the underlying object is a file rather than a = special device. In particular, we want to be able to pass around = capabilities for key libraries (the runtime linker itself, libc, etc) = and share them between mutually untrusting processes, and not have the = file descriptor offset allow interference between them. Further confusing matters, we maintain file descriptor-level offsets for = some stream-oriented objects, such as tty's, but not others, such as = sockets. Robert= From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 22:11:18 2010 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 B0F77106575B; Sat, 23 Jan 2010 22:11:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EBCF8FC12; Sat, 23 Jan 2010 22:11:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NMBIAu033773; Sat, 23 Jan 2010 22:11:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NMBILS033771; Sat, 23 Jan 2010 22:11:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001232211.o0NMBILS033771@svn.freebsd.org> From: Marius Strobl Date: Sat, 23 Jan 2010 22:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202900 - head/sys/sparc64/sparc64 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: Sat, 23 Jan 2010 22:11:18 -0000 Author: marius Date: Sat Jan 23 22:11:18 2010 New Revision: 202900 URL: http://svn.freebsd.org/changeset/base/202900 Log: Merge r202882 from amd64/i386: For PT_TO_SCE stop that stops the ptraced process upon syscall entry, syscall arguments are collected before ptracestop() is called. As a consequence, debugger cannot modify syscall or its arguments. In syscall(), reread syscall number and arguments after ptracestop(), if debugger modified anything in the process environment. Since procfs stopevent requires number of syscall arguments in p_xstat, this cannot be solved by moving stop/trace point before argument fetching. Move the code to read arguments into separate function fetch_syscall_args() to avoid code duplication. Note that ktrace point for modified syscall is intentionally recorded twice, once with original arguments, and second time with the arguments set by debugger. PT_TO_SCX stop is executed after cpu_syscall_set_retval() already. Reviewed by: kib Modified: head/sys/sparc64/sparc64/trap.c Modified: head/sys/sparc64/sparc64/trap.c ============================================================================== --- head/sys/sparc64/sparc64/trap.c Sat Jan 23 21:47:07 2010 (r202899) +++ head/sys/sparc64/sparc64/trap.c Sat Jan 23 22:11:18 2010 (r202900) @@ -93,9 +93,18 @@ __FBSDID("$FreeBSD$"); #include #include +struct syscall_args { + u_long code; + struct sysent *callp; + register_t args[8]; + register_t *argp; + int narg; +}; + void trap(struct trapframe *tf); void syscall(struct trapframe *tf); +static int fetch_syscall_args(struct thread *td, struct syscall_args *sa); static int trap_pfault(struct thread *td, struct trapframe *tf); extern char copy_fault[]; @@ -522,137 +531,163 @@ trap_pfault(struct thread *td, struct tr /* Maximum number of arguments that can be passed via the out registers. */ #define REG_MAXARGS 6 -/* - * Syscall handler. The arguments to the syscall are passed in the o registers - * by the caller, and are saved in the trap frame. The syscall number is passed - * in %g1 (and also saved in the trap frame). - */ -void -syscall(struct trapframe *tf) +static int +fetch_syscall_args(struct thread *td, struct syscall_args *sa) { - struct sysent *callp; - struct thread *td; - register_t args[8]; - register_t *argp; + struct trapframe *tf; struct proc *p; - u_long code; int reg; int regcnt; - int narg; int error; - td = curthread; - KASSERT(td != NULL, ("trap: curthread NULL")); - KASSERT(td->td_proc != NULL, ("trap: curproc NULL")); - p = td->td_proc; - - PCPU_INC(cnt.v_syscall); - - td->td_pticks = 0; - td->td_frame = tf; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); - code = tf->tf_global[1]; - - /* - * For syscalls, we don't want to retry the faulting instruction - * (usually), instead we need to advance one instruction. - */ - td->td_pcb->pcb_tpc = tf->tf_tpc; - TF_DONE(tf); - + tf = td->td_frame; reg = 0; regcnt = REG_MAXARGS; + + sa->code = tf->tf_global[1]; + if (p->p_sysent->sv_prepsyscall) { - /* - * The prep code is MP aware. - */ #if 0 - (*p->p_sysent->sv_prepsyscall)(tf, args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(tf, sa->args, &sa->code, + ¶ms); #endif - } else if (code == SYS_syscall || code == SYS___syscall) { - code = tf->tf_out[reg++]; + } else if (sa->code == SYS_syscall || sa->code == SYS___syscall) { + sa->code = tf->tf_out[reg++]; regcnt--; } if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; + sa->code &= p->p_sysent->sv_mask; - if (code >= p->p_sysent->sv_size) - callp = &p->p_sysent->sv_table[0]; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; else - callp = &p->p_sysent->sv_table[code]; - - narg = callp->sy_narg; + sa->callp = &p->p_sysent->sv_table[sa->code]; - KASSERT(narg <= sizeof(args) / sizeof(args[0]), + sa->narg = sa->callp->sy_narg; + KASSERT(sa->narg <= sizeof(sa->args) / sizeof(sa->args[0]), ("Too many syscall arguments!")); error = 0; - argp = args; - bcopy(&tf->tf_out[reg], args, sizeof(args[0]) * regcnt); - if (narg > regcnt) + sa->argp = sa->args; + bcopy(&tf->tf_out[reg], sa->args, sizeof(sa->args[0]) * regcnt); + if (sa->narg > regcnt) error = copyin((void *)(tf->tf_out[6] + SPOFF + - offsetof(struct frame, fr_pad[6])), - &args[regcnt], (narg - regcnt) * sizeof(args[0])); - - CTR5(KTR_SYSC, "syscall: td=%p %s(%#lx, %#lx, %#lx)", td, - syscallnames[code], argp[0], argp[1], argp[2]); + offsetof(struct frame, fr_pad[6])), &sa->args[regcnt], + (sa->narg - regcnt) * sizeof(sa->args[0])); + /* + * This may result in two records if debugger modified + * registers or memory during sleep at stop/ptrace point. + */ #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(code, narg, argp); + ktrsyscall(sa->code, sa->narg, sa->argp); #endif + return (error); +} +/* + * Syscall handler + * The arguments to the syscall are passed in the out registers by the caller, + * and are saved in the trap frame. The syscall number is passed in %g1 (and + * also saved in the trap frame). + */ +void +syscall(struct trapframe *tf) +{ + struct syscall_args sa; + struct thread *td; + struct proc *p; + int error; + + td = curthread; + KASSERT(td != NULL, ("trap: curthread NULL")); + KASSERT(td->td_proc != NULL, ("trap: curproc NULL")); + + PCPU_INC(cnt.v_syscall); + p = td->td_proc; td->td_syscalls++; + td->td_pticks = 0; + td->td_frame = tf; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + if ((p->p_flag & P_TRACED) != 0) { + PROC_LOCK(p); + td->td_dbgflags &= ~TDB_USERWR; + PROC_UNLOCK(p); + } + + /* + * For syscalls, we don't want to retry the faulting instruction + * (usually), instead we need to advance one instruction. + */ + td->td_pcb->pcb_tpc = tf->tf_tpc; + TF_DONE(tf); + + error = fetch_syscall_args(td, &sa); + CTR5(KTR_SYSC, "syscall: td=%p %s(%#lx, %#lx, %#lx)", td, + syscallnames[sa.code], sa.argp[0], sa.argp[1], sa.argp[2]); + if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = 0; - STOPEVENT(p, S_SCE, narg); /* MP aware */ - + STOPEVENT(p, S_SCE, sa.narg); PTRACESTOP_SC(p, td, S_PT_SCE); + if ((td->td_dbgflags & TDB_USERWR) != 0) { + /* + * Reread syscall number and arguments if + * debugger modified registers or memory. + */ + error = fetch_syscall_args(td, &sa); + if (error != 0) + goto retval; + td->td_retval[1] = 0; + } - AUDIT_SYSCALL_ENTER(code, td); - error = (*callp->sy_call)(td, argp); + AUDIT_SYSCALL_ENTER(sa.code, td); + error = (*sa.callp->sy_call)(td, sa.argp); AUDIT_SYSCALL_EXIT(error, td); - CTR5(KTR_SYSC, "syscall: p=%p error=%d %s return %#lx %#lx ", p, - error, syscallnames[code], td->td_retval[0], + CTR5(KTR_SYSC, "syscall: p=%p error=%d %s return %#lx %#lx", + p, error, syscallnames[sa.code], td->td_retval[0], td->td_retval[1]); } - + retval: cpu_set_syscall_retval(td, error); /* * Check for misbehavior. */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???")); KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", - td->td_locks)); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???", td->td_locks)); /* - * Handle reschedule and other end-of-syscall issues + * Handle reschedule and other end-of-syscall issues. */ userret(td, tf); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(code, error, td->td_retval[0]); + ktrsysret(sa.code, error, td->td_retval[0]); #endif /* * This works because errno is findable through the * register set. If we ever support an emulation where this * is not the case, this code will need to be revisited. */ - STOPEVENT(p, S_SCX, code); + STOPEVENT(p, S_SCX, sa.code); PTRACESTOP_SC(p, td, S_PT_SCX); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 22:37:35 2010 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 1454E106566C; Sat, 23 Jan 2010 22:37:35 +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 02A4C8FC15; Sat, 23 Jan 2010 22:37:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NMbYtJ039528; Sat, 23 Jan 2010 22:37:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NMbYPl039526; Sat, 23 Jan 2010 22:37:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001232237.o0NMbYPl039526@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 22:37:34 +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: r202902 - stable/7/sys/kern 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: Sat, 23 Jan 2010 22:37:35 -0000 Author: kib Date: Sat Jan 23 22:37:34 2010 New Revision: 202902 URL: http://svn.freebsd.org/changeset/base/202902 Log: Fix vfs_unbusy() calls in r202895. Reported by: Michael Butler Approved by: re (bz) Modified: stable/7/sys/kern/vfs_syscalls.c Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Sat Jan 23 22:21:56 2010 (r202901) +++ stable/7/sys/kern/vfs_syscalls.c Sat Jan 23 22:37:34 2010 (r202902) @@ -337,7 +337,7 @@ kern_statfs(struct thread *td, char *pat } *buf = *sp; out: - vfs_unbusy(mp); + vfs_unbusy(mp, td); VFS_UNLOCK_GIANT(vfslocked); if (mtx_owned(&Giant)) printf("statfs(%d): %s: %d\n", vfslocked, path, error); @@ -429,7 +429,7 @@ kern_fstatfs(struct thread *td, int fd, *buf = *sp; out: if (mp) - vfs_unbusy(mp); + vfs_unbusy(mp, td); VFS_UNLOCK_GIANT(vfslocked); return (error); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 22:38:02 2010 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 14A7D1065670; Sat, 23 Jan 2010 22:38:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE58F8FC08; Sat, 23 Jan 2010 22:38:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NMc1RI039661; Sat, 23 Jan 2010 22:38:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NMc17q039658; Sat, 23 Jan 2010 22:38:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001232238.o0NMc17q039658@svn.freebsd.org> From: Marius Strobl Date: Sat, 23 Jan 2010 22:38: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: r202903 - head/sys/fs/cd9660 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: Sat, 23 Jan 2010 22:38:02 -0000 Author: marius Date: Sat Jan 23 22:38:01 2010 New Revision: 202903 URL: http://svn.freebsd.org/changeset/base/202903 Log: On LP64 struct ifid is 64-bit aligned while struct fid is 32-bit aligned so on architectures with strict alignment requirements we can't just simply cast the latter to the former but need to copy it bytewise instead. PR: 143010 MFC after: 3 days Modified: head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/cd9660/cd9660_vnops.c Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Sat Jan 23 22:37:34 2010 (r202902) +++ head/sys/fs/cd9660/cd9660_vfsops.c Sat Jan 23 22:38:01 2010 (r202903) @@ -589,17 +589,19 @@ cd9660_fhtovp(mp, fhp, vpp) struct fid *fhp; struct vnode **vpp; { - struct ifid *ifhp = (struct ifid *)fhp; + struct ifid ifh; struct iso_node *ip; struct vnode *nvp; int error; + memcpy(&ifh, fhp, sizeof(ifh)); + #ifdef ISOFS_DBG printf("fhtovp: ino %d, start %ld\n", - ifhp->ifid_ino, ifhp->ifid_start); + ifh.ifid_ino, ifh.ifid_start); #endif - if ((error = VFS_VGET(mp, ifhp->ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { + if ((error = VFS_VGET(mp, ifh.ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { *vpp = NULLVP; return (error); } Modified: head/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vnops.c Sat Jan 23 22:37:34 2010 (r202902) +++ head/sys/fs/cd9660/cd9660_vnops.c Sat Jan 23 22:38:01 2010 (r202903) @@ -819,20 +819,25 @@ cd9660_vptofh(ap) struct fid *a_fhp; } */ *ap; { + struct ifid ifh; struct iso_node *ip = VTOI(ap->a_vp); - struct ifid *ifhp; - ifhp = (struct ifid *)ap->a_fhp; - ifhp->ifid_len = sizeof(struct ifid); + ifh.ifid_len = sizeof(struct ifid); - ifhp->ifid_ino = ip->i_number; - ifhp->ifid_start = ip->iso_start; + ifh.ifid_ino = ip->i_number; + ifh.ifid_start = ip->iso_start; + /* + * This intentionally uses sizeof(ifh) in order to not copy stack + * garbage on ILP32. + */ + memcpy(ap->a_fhp, &ifh, sizeof(ifh)); #ifdef ISOFS_DBG printf("vptofh: ino %d, start %ld\n", - ifhp->ifid_ino,ifhp->ifid_start); + ifh.ifid_ino, ifh.ifid_start); #endif - return 0; + + return (0); } /* From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 23:16:50 2010 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 602CE106566B; Sat, 23 Jan 2010 23:16:50 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1EA8FC0C; Sat, 23 Jan 2010 23:16:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NNGo3Q048259; Sat, 23 Jan 2010 23:16:50 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NNGovT048257; Sat, 23 Jan 2010 23:16:50 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001232316.o0NNGovT048257@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 23 Jan 2010 23:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202904 - head/sys/ia64/ia64 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: Sat, 23 Jan 2010 23:16:50 -0000 Author: marcel Date: Sat Jan 23 23:16:50 2010 New Revision: 202904 URL: http://svn.freebsd.org/changeset/base/202904 Log: Remove cpu_boot() and call efi_reset_system() directly from cpu_reset(). Modified: head/sys/ia64/ia64/machdep.c Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Sat Jan 23 22:38:01 2010 (r202903) +++ head/sys/ia64/ia64/machdep.c Sat Jan 23 23:16:50 2010 (r202904) @@ -373,13 +373,6 @@ cpu_startup(void *dummy) SYSINIT(cpu_startup, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); void -cpu_boot(int howto) -{ - - efi_reset_system(); -} - -void cpu_flush_dcache(void *ptr, size_t len) { vm_offset_t lim, va; @@ -434,7 +427,7 @@ void cpu_reset() { - cpu_boot(0); + efi_reset_system(); } void